includes/clientside/static/ajax.js
changeset 537 547b7ba6d535
parent 527 21e11f564463
child 539 1beddd693f2d
equal deleted inserted replaced
536:218a627eb53e 537:547b7ba6d535
   273   
   273   
   274   // buttons
   274   // buttons
   275   var btn_submit = document.createElement('a');
   275   var btn_submit = document.createElement('a');
   276   btn_submit.href = '#';
   276   btn_submit.href = '#';
   277   btn_submit.appendChild(document.createTextNode($lang.get('etc_go')));
   277   btn_submit.appendChild(document.createTextNode($lang.get('etc_go')));
   278   btn_submit.className = 'fakebutton fakebutton-submit';
   278   btn_submit.className = 'abutton abutton_green';
   279   
   279   
   280   var btn_cancel = document.createElement('a');
   280   var btn_cancel = document.createElement('a');
   281   btn_cancel.href = '#';
   281   btn_cancel.href = '#';
   282   btn_cancel.appendChild(document.createTextNode($lang.get('etc_cancel')));
   282   btn_cancel.appendChild(document.createTextNode($lang.get('etc_cancel')));
   283   btn_cancel.className = 'fakebutton';
   283   btn_cancel.className = 'abutton';
   284   
   284   
   285   btndiv.appendChild(btn_submit);
   285   btndiv.appendChild(btn_submit);
   286   btndiv.appendChild(document.createTextNode(' | '));
   286   btndiv.appendChild(document.createTextNode(' | '));
   287   btndiv.appendChild(btn_cancel);
   287   btndiv.appendChild(btn_cancel);
   288   div.appendChild(btndiv);
   288   div.appendChild(btndiv);
   826   id = id.substr(0, 1).toUpperCase() + id.substr(1);
   826   id = id.substr(0, 1).toUpperCase() + id.substr(1);
   827   id = id.replace(/_/g, ' ');
   827   id = id.replace(/_/g, ' ');
   828   id = id.replace(/-/g, ' ');
   828   id = id.replace(/-/g, ' ');
   829   return id;
   829   return id;
   830 }
   830 }
   831 
       
   832 /*
       
   833 function ajaxChangeStyle()
       
   834 {
       
   835   // IE <6 pseudo-compatibility
       
   836   if ( KILL_SWITCH )
       
   837     return true;
       
   838   var win = document.getElementById("cn2");
       
   839   win.innerHTML = ' \
       
   840     <form action="'+ENANO_SPECIAL_CHANGESTYLE+'" onsubmit="jws.closeWin(\'root2\');" method="post" style="text-align: center"> \
       
   841     <h3>Select a theme...</h3>\
       
   842     <select id="mdgThemeID" name="theme" onchange="ajaxGetStyles(this.value);"> \
       
   843     '+ENANO_THEME_LIST+' \
       
   844     </select> \
       
   845     <div id="styleSelector"></div>\
       
   846     <br /><br />\
       
   847     <input type="hidden" name="return_to" value="'+title+'" />\
       
   848     <input id="styleSubmitter" type="submit" style="display: none; font-weight: bold" value="Change theme" /> \
       
   849     <input type="button" value="Cancel" onclick="jws.closeWin(\'root2\');" /> \
       
   850     </form> \
       
   851   ';
       
   852   ajaxGetStyles(ENANO_CURRENT_THEME);
       
   853   jws.openWin('root2', 340, 300);
       
   854 }
       
   855 
       
   856 function ajaxGetStyles(id) {
       
   857   setAjaxLoading();
       
   858   ajaxGet(stdAjaxPrefix+'&_mode=getstyles&id='+id, function() {
       
   859     if ( ajax.readyState == 4 && ajax.status == 200 ) {
       
   860       unsetAjaxLoading();
       
   861       eval(ajax.responseText);
       
   862       html = '<h3>And a style...</h3><select id="mdgStyleID" name="style">';
       
   863       for(i=0;i<list.length;i++) {
       
   864         lname = list[i].substr(0, 1).toUpperCase() + list[i].substr(1, list[i].length);
       
   865         html = html + '<option value="'+list[i]+'">'+lname+'</option>';
       
   866       }
       
   867       html = html + '</select>';
       
   868       document.getElementById('styleSelector').innerHTML = html;
       
   869       document.getElementById('styleSubmitter').style.display = 'inline'; 
       
   870     }
       
   871   });
       
   872 }
       
   873 */
       
   874 
   831 
   875 function ajaxSwapCSS()
   832 function ajaxSwapCSS()
   876 {
   833 {
   877   // IE <6 pseudo-compatibility
   834   // IE <6 pseudo-compatibility
   878   if ( KILL_SWITCH )
   835   if ( KILL_SWITCH )