Changeset 559659
- Timestamp:
- 06/18/2012 04:13:14 AM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
templ33t/branches/01_02_handling_posts/templ33t.js
r556483 r559659 36 36 37 37 //alert(TL33T_def.toString()); 38 39 // save current template index 40 ctemp = jQuery('select#page_template').prop('selectedIndex'); 38 39 if(jQuery('select#page_template').length > 0) { 40 41 // save current template index 42 ctemp = jQuery('select#page_template').prop('selectedIndex'); 43 44 // add event listener to template select 45 jQuery('select#page_template').change(templ33t_switchTemplate); 46 47 } 41 48 42 49 //alert(getUserSetting('editor')+' = '+(!getUserSetting('editor'))); … … 45 52 ctmode = (getUserSetting('editor') == 'tinymce' || !getUserSetting('editor') ? false : true); 46 53 47 // add event listener to template select48 jQuery('select#page_template').change(templ33t_switchTemplate);49 50 54 // set up templ33t 51 55 if(jQuery('div#templ33t_control').length) { … … 171 175 var fromcustom = (jQuery('#postdivrich').css('display') == 'none'); 172 176 var tocustom; 173 var tslg = jQuery('select#page_template'). val() == 'default' ? TL33T_current.default_template : jQuery('select#page_template').val();177 var tslg = jQuery('select#page_template').length == 0 || jQuery('select#page_template').val() == 'default' ? TL33T_current.default_template : jQuery('select#page_template').val(); 174 178 if(nobj.parent().index() > 0) 175 179 tocustom = TL33T_def[tslg].blocks[(nobj.parent().index() - 1)].custom; … … 262 266 } else { 263 267 264 var tslg = jQuery('select#page_template'). val() == 'default' ? TL33T_current.default_template : jQuery('select#page_template').val();268 var tslg = jQuery('select#page_template').length == 0 || jQuery('select#page_template').val() == 'default' ? TL33T_current.default_template : jQuery('select#page_template').val(); 265 269 266 270 if(!TL33T_def[tslg].blocks[(jQuery(this).index() - 1)].custom) {
Note: See TracChangeset
for help on using the changeset viewer.