Changeset 7181 for extensions/GrumPluginClasses/js/ui.categorySelector.js
- Timestamp:
- Oct 14, 2010, 4:16:32 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/GrumPluginClasses/js/ui.categorySelector.js
r7175 r7181 2 2 * ----------------------------------------------------------------------------- 3 3 * file: ui.categorySelector.js 4 * file version: 1.0. 04 * file version: 1.0.1 5 5 * date: 2010-10-10 6 6 * … … 21 21 * 22 22 * | release | date | 23 * | 1.0.0 | 2010/10/10 | first release23 * | 1.0.0 | 2010/10/10 | * first release 24 24 * | | | 25 * | 1.0.1 | 2010/10/14 | * fix bug on 'value' functions ':none', ':all' and 26 * | | | ':invert' 25 27 * | | | 26 * | | | 27 * | | | 28 * | | | * add 'name' property 28 29 * | | | 29 30 * | | | … … 500 501 }, // userMode 501 502 503 name: function () 504 { 505 var options=this.data('options'), 506 properties=this.data('properties'), 507 objects=this.data('objects'); 508 509 if(!options.multiple) 510 { 511 return(properties.categories[properties.index].name); 512 } 513 else 514 { 515 var listNames=[]; 516 for(var i=0;i<properties.index.length;i++) 517 { 518 listNames.push(properties.categories[properties.index[i]].name); 519 } 520 return(listNames); 521 } 522 }, // userMode 523 502 524 value: function (value) 503 525 { … … 1047 1069 case ':invert': 1048 1070 if(!options.multiple) return(false); 1049 1071 properties.index=[]; 1050 1072 objects.list.find('.ui-category-selector-item').each( 1051 1073 function () … … 1079 1101 { 1080 1102 $this.addClass('ui-category-selector-selected-item'); 1103 tmp=privateMethods.findIndexByValue(object, $this.attr('catId')); 1104 if(tmp>-1) properties.index.push(tmp); 1081 1105 } 1082 1106 } … … 1088 1112 case ':none': 1089 1113 if(!options.multiple) return(false); 1114 1115 properties.index=[]; 1090 1116 objects.list.find('.ui-category-selector-selected-item').each( 1091 1117 function () … … 1118 1144 case ':all': 1119 1145 if(!options.multiple) return(false); 1146 properties.index=[]; 1120 1147 objects.list.find('.ui-category-selector-item').each( 1121 1148 function () … … 1139 1166 } 1140 1167 } 1141 1142 if(apply) $this.addClass('ui-category-selector-selected-item'); 1168 if(apply) 1169 { 1170 tmp=privateMethods.findIndexByValue(object, $this.attr('catId')); 1171 if(tmp>-1) properties.index.push(tmp); 1172 1173 $this.addClass('ui-category-selector-selected-item'); 1174 } 1143 1175 } 1144 1176 );
Note: See TracChangeset
for help on using the changeset viewer.