Last change
on this file since 532 was
483,
checked in by hendrikvanantwerpen, 11 years ago
|
Added Dojo 1.9.3 release.
|
File size:
711 bytes
|
Line | |
---|
1 | define([ |
---|
2 | "dojo/_base/declare", |
---|
3 | "dojo/dom-class", |
---|
4 | "dijit/form/_ToggleButtonMixin", |
---|
5 | "./Button" |
---|
6 | ], function(declare, domClass, ToggleButtonMixin, Button){ |
---|
7 | |
---|
8 | return declare("dojox.mobile.ToggleButton", [Button, ToggleButtonMixin], { |
---|
9 | // summary: |
---|
10 | // A non-templated button widget that can be in two states (checked or not). |
---|
11 | // Can be base class for things like tabs or checkbox or radio buttons |
---|
12 | |
---|
13 | baseClass: "mblToggleButton", |
---|
14 | |
---|
15 | _setCheckedAttr: function(){ |
---|
16 | this.inherited(arguments); |
---|
17 | var newStateClasses = (this.baseClass+' '+this["class"]).replace(/(\S+)\s*/g, "$1Checked ").split(" "); |
---|
18 | domClass[this.checked ? "add" : "remove"](this.focusNode || this.domNode, newStateClasses); |
---|
19 | } |
---|
20 | }); |
---|
21 | }); |
---|
Note: See
TracBrowser
for help on using the repository browser.