diff options
Diffstat (limited to 'sca-cpp/trunk/hosting/server/htdocs/clone/index.html')
-rw-r--r-- | sca-cpp/trunk/hosting/server/htdocs/clone/index.html | 36 |
1 files changed, 24 insertions, 12 deletions
diff --git a/sca-cpp/trunk/hosting/server/htdocs/clone/index.html b/sca-cpp/trunk/hosting/server/htdocs/clone/index.html index f5557efcd3..0a2f7733bc 100644 --- a/sca-cpp/trunk/hosting/server/htdocs/clone/index.html +++ b/sca-cpp/trunk/hosting/server/htdocs/clone/index.html @@ -41,22 +41,31 @@ </div> <script type="text/javascript"> +(function() { -// Get the app name +/** + * Get the app name. + */ var appname = ui.fragmentParams(location)['app']; -// Set page titles -document.title = ui.windowtitle(location.hostname) + ' - ' + config.clone + ' - ' + appname; -$('viewhead').innerHTML = '<span class="smenu">' + config.clone + ' ' + appname + '</span>'; -$('cloneAppOKButton').value = config.clone; -$('cloneAppOKButton').title = config.clone + ' this app'; +/** + * Set page titles. + */ +document.title = config.windowtitle() + ' - ' + config.clone() + ' - ' + appname; +$('viewhead').innerHTML = '<span class="smenu">' + config.clone() + ' ' + appname + '</span>'; +$('cloneAppOKButton').value = config.clone(); +$('cloneAppOKButton').title = config.clone() + ' this app'; -// Set images +/** + * Set images. + */ $('appimg').src = ui.b64img(appcache.get('/public/app.b64')); -// Init service references -var editWidget = sca.component("EditWidget"); -var apps = sca.reference(editWidget, "apps"); +/** + * Init service references. + */ +var editorComp = sca.component("Editor"); +var apps = sca.reference(editorComp, "apps"); /** * The current app entry and corresponding saved XML content. @@ -79,7 +88,7 @@ function getapp(name) { showError('App not available'); return false; } - showStatus(defaultStatus()); + showOnlineStatus(); appentry = doc != null? car(elementsToValues(atom.readATOMEntry(mklist(doc)))) : mklist("'entry", mklist("'title", ''), mklist("'id", name)); $('appTitle').value = cadr(assoc("'title", cdr(appentry))); @@ -137,9 +146,12 @@ $('cloneAppCancelButton').onclick = function() { history.back(); }; -// Get the current app +/** + * Get the current app. + */ getapp(appname); +})(); </script> </div> |