Changeset 28613 for trunk/admin/themes
- Timestamp:
- Jun 2, 2014, 11:56:54 PM (10 years ago)
- Location:
- trunk/admin/themes/default
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/admin/themes/default/js/LocalStorageCache.js
r28555 r28613 171 171 }); 172 172 }; 173 174 // redefine Selectize templates without escape 175 AbstractSelectizer.getRender = function(field_label, lang) { 176 lang = lang || { 'Add': 'Add' }; 177 178 return { 179 'option': function(data, escape) { 180 return '<div class="option">' + data[field_label] + '</div>'; 181 }, 182 'item': function(data, escape) { 183 return '<div class="item">' + data[field_label] + '</div>'; 184 }, 185 'option_create': function(data, escape) { 186 return '<div class="create">' + lang['Add'] + ' <strong>' + data.input + '</strong>…</div>'; 187 } 188 }; 189 }; 173 190 174 191 … … 207 224 sortField: 'global_rank', 208 225 searchField: ['fullname'], 209 plugins: ['remove_button'] 226 plugins: ['remove_button'], 227 render: AbstractSelectizer.getRender('fullname', options.lang) 210 228 }); 211 229 … … 254 272 sortField: 'name', 255 273 searchField: ['name'], 256 plugins: ['remove_button'] 274 plugins: ['remove_button'], 275 render: AbstractSelectizer.getRender('name', options.lang) 257 276 }); 258 277 … … 295 314 sortField: 'name', 296 315 searchField: ['name'], 297 plugins: ['remove_button'] 316 plugins: ['remove_button'], 317 render: AbstractSelectizer.getRender('name', options.lang) 298 318 }); 299 319 … … 348 368 sortField: 'username', 349 369 searchField: ['username'], 350 plugins: ['remove_button'] 370 plugins: ['remove_button'], 371 render: AbstractSelectizer.getRender('username', options.lang) 351 372 }); 352 373 -
trunk/admin/themes/default/template/batch_manager_global.tpl
r28555 r28613 75 75 }); 76 76 77 tagsCache.selectize(jQuery('[data-selectize=tags]')); 77 tagsCache.selectize(jQuery('[data-selectize=tags]'), { lang: { 78 'Add': '{'Create'|translate}' 79 }}); 78 80 79 81 {* <!-- CATEGORIES --> *} -
trunk/admin/themes/default/template/batch_manager_unit.tpl
r28563 r28613 17 17 }); 18 18 19 tagsCache.selectize(jQuery('[data-selectize=tags]')); 19 tagsCache.selectize(jQuery('[data-selectize=tags]'), { lang: { 20 'Add': '{'Create'|translate}' 21 }}); 20 22 21 23 {* <!-- DATEPICKER --> *} -
trunk/admin/themes/default/template/picture_modify.tpl
r28555 r28613 26 26 }); 27 27 28 tagsCache.selectize(jQuery('[data-selectize=tags]')); 28 tagsCache.selectize(jQuery('[data-selectize=tags]'), { lang: { 29 'Add': '{'Create'|translate}' 30 }}); 29 31 30 32 {* <!-- DATEPICKER --> *}
Note: See TracChangeset
for help on using the changeset viewer.