includes/clientside/static/theme-manager.js
changeset 823 4596c40aaa94
parent 699 c7d737202d59
child 1227 bdac73ed481e
equal deleted inserted replaced
822:3b951ea8e758 823:4596c40aaa94
    44   var req = toJSONString({
    44   var req = toJSONString({
    45       mode: 'install',
    45       mode: 'install',
    46       theme_id: theme_id
    46       theme_id: theme_id
    47     });
    47     });
    48   // we've finished nukeing the existing interface, request editor data
    48   // we've finished nukeing the existing interface, request editor data
    49   ajaxPost(makeUrlNS('Admin', 'ThemeManager/action.json'), 'r=' + ajaxEscape(req), function()
    49   ajaxPost(makeUrlNS('Admin', 'ThemeManager/action.json'), 'r=' + ajaxEscape(req), function(ajax)
    50     {
    50     {
    51       if ( ajax.readyState == 4 && ajax.status == 200 )
    51       if ( ajax.readyState == 4 && ajax.status == 200 )
    52       {
    52       {
    53         var response = String(ajax.responseText + '');
    53         var response = String(ajax.responseText + '');
    54         if ( response.substr(0, 1) == '{' )
    54         if ( response.substr(0, 1) == '{' )
   119       var req = toJSONString({
   119       var req = toJSONString({
   120           mode: 'fetch_theme',
   120           mode: 'fetch_theme',
   121           theme_id: theme_id
   121           theme_id: theme_id
   122         });
   122         });
   123       // we've finished nukeing the existing interface, request editor data
   123       // we've finished nukeing the existing interface, request editor data
   124       ajaxPost(makeUrlNS('Admin', 'ThemeManager/action.json'), 'r=' + ajaxEscape(req), function()
   124       ajaxPost(makeUrlNS('Admin', 'ThemeManager/action.json'), 'r=' + ajaxEscape(req), function(ajax)
   125         {
   125         {
   126           if ( ajax.readyState == 4 && ajax.status == 200 )
   126           if ( ajax.readyState == 4 && ajax.status == 200 )
   127           {
   127           {
   128             theme_list.innerHTML = '';
   128             theme_list.innerHTML = '';
   129             var response = String(ajax.responseText + '');
   129             var response = String(ajax.responseText + '');
   482   
   482   
   483   var req = toJSONString({
   483   var req = toJSONString({
   484       mode: 'uid_lookup',
   484       mode: 'uid_lookup',
   485       username: f_useradd.value
   485       username: f_useradd.value
   486     });
   486     });
   487   ajaxPost(makeUrlNS('Admin', 'ThemeManager/action.json'), 'r=' + ajaxEscape(req), function()
   487   ajaxPost(makeUrlNS('Admin', 'ThemeManager/action.json'), 'r=' + ajaxEscape(req), function(ajax)
   488     {
   488     {
   489       if ( ajax.readyState == 4 && ajax.status == 200 )
   489       if ( ajax.readyState == 4 && ajax.status == 200 )
   490       {
   490       {
   491         var img = document.getElementById('themeed_useradd_status');
   491         var img = document.getElementById('themeed_useradd_status');
   492         var f_useradd = document.getElementById('themeed_field_adduser');
   492         var f_useradd = document.getElementById('themeed_field_adduser');
   602   
   602   
   603   json_send = ajaxEscape(toJSONString(json_send));
   603   json_send = ajaxEscape(toJSONString(json_send));
   604   
   604   
   605   // Request the save
   605   // Request the save
   606   var parent = document.getElementById('ajaxPageContainer');
   606   var parent = document.getElementById('ajaxPageContainer');
   607   ajaxPost(makeUrlNS('Admin', 'ThemeManager/action.json'), 'r=' + json_send, function()
   607   ajaxPost(makeUrlNS('Admin', 'ThemeManager/action.json'), 'r=' + json_send, function(ajax)
   608     {
   608     {
   609       if ( ajax.readyState == 4 && ajax.status == 200 )
   609       if ( ajax.readyState == 4 && ajax.status == 200 )
   610       {
   610       {
   611         // process response
   611         // process response
   612         var response = String(ajax.responseText + '');
   612         var response = String(ajax.responseText + '');
   636   
   636   
   637   json_send = ajaxEscape(toJSONString(json_send));
   637   json_send = ajaxEscape(toJSONString(json_send));
   638   
   638   
   639   // Request the action
   639   // Request the action
   640   var parent = document.getElementById('ajaxPageContainer');
   640   var parent = document.getElementById('ajaxPageContainer');
   641   ajaxPost(makeUrlNS('Admin', 'ThemeManager/action.json'), 'r=' + json_send, function()
   641   ajaxPost(makeUrlNS('Admin', 'ThemeManager/action.json'), 'r=' + json_send, function(ajax)
   642     {
   642     {
   643       if ( ajax.readyState == 4 && ajax.status == 200 )
   643       if ( ajax.readyState == 4 && ajax.status == 200 )
   644       {
   644       {
   645         // process response
   645         // process response
   646         var response = String(ajax.responseText + '');
   646         var response = String(ajax.responseText + '');