Changeset 16012 for extensions/GrumPluginClasses/js/ui.inputSwitchButton.js
- Timestamp:
- Jun 24, 2012, 9:18:26 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/GrumPluginClasses/js/ui.inputSwitchButton.js
r12215 r16012 1 1 /** 2 2 * ----------------------------------------------------------------------------- 3 * file: ui.input Checkbox.js4 * file version: 1.0. 05 * date: 201 1-06-183 * file: ui.inputSwitchButton.js 4 * file version: 1.0.1 5 * date: 2012-06-18 6 6 * 7 7 * A jQuery plugin provided by the piwigo's plugin "GrumPluginClasses" … … 11 11 * email : grum@piwigo.com 12 12 * website : http://photos.grum.fr 13 * PWG user : http://forum.phpwebgallery.net/profile.php?id=370614 13 * 15 14 * << May the Little SpaceFrog be with you ! >> … … 24 23 * | 1.0.0 | 2011/06/18 | first release 25 24 * | | | 26 * | | |25 * | 1.0.1 | 2012/06/18 | * improve memory managment 27 26 * | | | 28 27 * | | | … … 53 52 properties = $this.data('properties'), 54 53 options = 55 { 54 { 56 55 values: 57 56 { … … 99 98 { 100 99 // default values for the plugin 101 var properties=this.data('properties'); 102 $this.unbind('.inputSwitchButton'); 103 this.removeClass('ui-inputSwitchButton'); 100 var $this=$(this); 101 102 $this 103 .unbind('.inputSwitchButton') 104 .removeData() 105 .removeClass('ui-inputSwitchButton ui-inputSwitchButton-unchecked ui-inputSwitchButton-checked'); 106 delete $this; 104 107 } 105 108 ); … … 136 139 } 137 140 }, // disabled 138 141 139 142 values: function (values) 140 143 { … … 191 194 { 192 195 var options = this.data('options'); 193 196 194 197 return(properties.checked?options.values.checked:options.values.unchecked); 195 198 } … … 283 286 return(options.values); 284 287 }, //setValues 285 286 288 289 287 290 setGroup: function (object, value) 288 291 { … … 298 301 if(listGroup==null) listGroup=[]; 299 302 p=$.inArray(object.attr('id'), listGroup); 300 if(p>-1) listGroup.splice(p,1); 303 if(p>-1) listGroup.splice(p,1); 301 304 $(document).data('isbGroup_'+options.group, listGroup); 302 } 305 } 303 306 options.group=value; 304 307 listGroup=$(document).data('isbGroup_'+value); … … 307 310 $(document).data('isbGroup_'+value, listGroup); 308 311 } 309 }, 310 312 }, 313 311 314 switchValue: function (object) 312 315 { … … 340 343 } 341 344 } 342 345 343 346 object 344 347 .addClass('ui-inputSwitchButton-checked')
Note: See TracChangeset
for help on using the changeset viewer.