-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathSubstation1.js
51 lines (43 loc) · 1.46 KB
/
Substation1.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
define([
"dojo/_base/declare",
"dijit/_WidgetBase",
"dijit/form/FilteringSelect",
"dijit/form/Button",
// "dijit/_OnDijitClickMixin",
"dijit/_TemplatedMixin",
'dijit/_WidgetsInTemplateMixin',
"dojo/text!./demo/templates/Substation.html"
],function(declare, _WidgetBase, /*_OnDijitClickMixin,*/ FilteringSelect, Button,_TemplatedMixin,_WidgetsInTemplateMixin, template){
return declare( [_WidgetBase, /* _OnDijitClickMixin,*/ _TemplatedMixin,_WidgetsInTemplateMixin], {
// set our template
templateString: template,
// some properties
// baseClass: "someWidget",
title: "", // we'll set this from the widget def
// hidden counter
_counter: 1,
_firstClicked: false,
// define an onClick handler
_onClick: function(){
if(this._firstClicked){
this.titleNode.innerHTML = this.title + " was clicked " + (++this._counter) + " times.";
} else {
this.titleNode.innerHTML = this.title + " was clicked!";
this._firstClicked = true;
}
},
_btnOnClick:function(){
alert("button click");
},
_sOnClick:function(){
alert("in dijitButton");
this.dijiButton.innerHTML="hello";
},
fillNameList:function(){
},
getStationList:function(){
},
fillCodeList:function(){
}
});
});