Changeset 28540 for trunk/admin/themes/default/template/cat_modify.tpl
- Timestamp:
- May 26, 2014, 6:56:39 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/admin/themes/default/template/cat_modify.tpl
r28533 r28540 21 21 valueField: 'id', 22 22 labelField: 'fullname', 23 sortField: ' fullname',23 sortField: 'global_rank', 24 24 searchField: ['fullname'], 25 25 plugins: ['remove_button'] … … 29 29 categories.push({ 30 30 id: 0, 31 fullname: '------------' 31 fullname: '------------', 32 global_rank: 0 32 33 }); 33 34 … … 35 36 categories = jQuery.grep(categories, function(cat) { 36 37 return !(/\b{$CAT_ID}\b/.test(cat.uppercats)); 37 });38 39 categories.sort(function(a, b) {40 return a.fullname.localeCompare(b.fullname);41 38 }); 42 39 … … 52 49 // prevent empty value 53 50 if (this.selectize.getValue() == '') { 54 this.selectize.setValue( categories[0].id);51 this.selectize.setValue(0); 55 52 } 56 53 this.selectize.on('dropdown_close', function() { 57 54 if (this.getValue() == '') { 58 this.setValue( categories[0].id);55 this.setValue(0); 59 56 } 60 57 });
Note: See TracChangeset
for help on using the changeset viewer.