All pastes #125471 Raw Edit

Stuff

public xml v1 · immutable
·published 2006-08-10 17:54 UTC
rendered paste body
<script type="text/javascript">  var plugins = ["EntitlementServices", "EntitledProducts", "EntitledCustomers"]  var plugininfo = {"EntitlementServices": "Services and Permissions", "EntitledCustomers": "Entitlements", "EntitledProducts": "Products and Channels"}  //<!--  function JAXCall(plugin)  {    var req = getXMLHttpRequest();    url = '../' + plugin + '/sync'    req.open('GET', url, false);    req.send('');    logDebug("Returned status", req.status);    logDebug("Returned text", req.responseText);    if (req.status==200)    {      return req.responseText;    }    else {      return "Failed fetching " + url + ' ' + req.statusText;    }  }  function doSync(plugin, divinquestion)  {    //Set up the display with a spinny place holder    logDebug(plugininfo);    statusspan = SPAN({'style': 'float: right;'}, IMG({"src": basepath + "static/images/circle-ball-dark-antialiased.gif", 'alt': 'In progress'}, null));    newdiv = DIV({'style': 'clear: right;'}, SPAN({'style': 'float: left;'}, "Synchronizing " + plugininfo[plugin]), statusspan);    appendChildNodes(divinquestion, newdiv);    //Make the call    log("sync call to " + plugininfo[plugin] + " goes here");    message = JAXCall(plugin);    report(statusspan, message);  }  function report(statusspan, message)  {    //show the result    result = SPAN({'style': 'float: right;'}, message);    logDebug("calling swapdom");    swapDOM(statusspan, result);  }  function sync()  {    // Clear the div    var maindiv = getElement('syncResults');    replaceChildNodes(maindiv, null);    for (var i in plugins)    {      logDebug("Sync'ing", plugins[i]);      doSync(plugins[i], maindiv);    }    return false;  }  //--></script><div>  <div id="entSync">    <h3>Entitlement Server Synchronization</h3>    <div id="syncResults">      Click the start button to begin synchronization.      <p>        <a href="#" onclick="javascript:sync();">        <img src="/rAA/static/images/start_button.png" />        </a>      </p>    </div>    <br />  </div></div>