mirror of
https://github.com/icecoder/ICEcoder.git
synced 2026-03-03 07:13:59 +01:00
showManual section and pluginManager function
showManual function can now take a section param and append to iFrame URL to target a section of the manual if required. Used from Plugin Manager only for now. pluginsManager is a new function to display the Plugins Manager on demand
This commit is contained in:
@@ -1769,8 +1769,11 @@ var ICEcoder = {
|
||||
},
|
||||
|
||||
// Show the ICEcoder manual, loaded remotely
|
||||
showManual: function(version) {
|
||||
top.get('mediaContainer').innerHTML = '<iframe src="http://icecoder.net/manual?version='+version+'" class="whiteGlow" style="width: 500px; height: 500px"></iframe>';
|
||||
showManual: function(version,section) {
|
||||
var sectionExtra;
|
||||
|
||||
sectionExtra = section ? "#"+section : "";
|
||||
top.get('mediaContainer').innerHTML = '<iframe src="http://icecoder.net/manual?version='+version+sectionExtra+'" class="whiteGlow" style="width: 500px; height: 500px"></iframe>';
|
||||
top.ICEcoder.showHide('show',top.get('blackMask'));
|
||||
},
|
||||
|
||||
@@ -1780,6 +1783,12 @@ var ICEcoder = {
|
||||
top.ICEcoder.showHide('show',top.get('blackMask'));
|
||||
},
|
||||
|
||||
// Show the plugins manager
|
||||
pluginsManager: function() {
|
||||
top.get('mediaContainer').innerHTML = '<iframe src="lib/plugins-manager.php" class="whiteGlow" style="width: 800px; height: 450px"></iframe>';
|
||||
top.ICEcoder.showHide('show',top.get('blackMask'));
|
||||
},
|
||||
|
||||
// Update the settings used when we make a change to them
|
||||
useNewSettings: function(themeURL,codeAssist,lockedNav,tagWrapperCommand,autoComplete,visibleTabs,fontSize,lineWrapping,indentWithTabs,indentSize,refreshFM) {
|
||||
var styleNode, strCSS, cMCSS, activeLineBG;
|
||||
|
||||
18
lib/ice-coder.min.js
vendored
18
lib/ice-coder.min.js
vendored
@@ -79,15 +79,15 @@ b);top.ICEcoder.serverMessage(c.split(":")[1])},6E4*d):top.ICEcoder["plugTimer"+
|
||||
setTimeout(function(){top.ICEcoder.filesFrame.contentWindow.frames.fileControl.location.href=ICEcoder.serverQueueItems[0]},1)},cancelAllActions:function(){window.stop();0<ICEcoder.serverQueueItems.length&&ICEcoder.serverQueueItems.splice(1,ICEcoder.serverQueueItems.length);top.ICEcoder.showHide("hide",top.get("loadingMask"));top.ICEcoder.serverMessage('<b style="color: #d00">Cancelled tasks</b>');setTimeout(function(){top.ICEcoder.serverMessage()},2E3)},setPreviousFiles:function(){var a;a=top.ICEcoder.openFiles.join(",").replace(/\//g,
|
||||
"|").replace(/(\|\[NEW\])|(,\|\[NEW\])/g,"").replace(/(^,)|(,$)/g,"");""==a&&(a="CLEAR");top.ICEcoder.serverQueue("add","lib/settings.php?saveFiles="+a)},autoOpenFiles:function(){if(0<top.ICEcoder.previousFiles.length&&top.ICEcoder.ask("Open previous files?\n\n"+top.ICEcoder.previousFiles.length+" files:\n"+top.ICEcoder.previousFiles.join("\n").replace(/\|/g,"/").replace(RegExp(top.docRoot+top.iceRoot,"gi"),"")))for(var a=0;a<top.ICEcoder.previousFiles.length;a++)top.ICEcoder.rightClickedFile=top.ICEcoder.thisFileFolderLink=
|
||||
top.ICEcoder.previousFiles[a].replace("|","/"),top.ICEcoder.thisFileFolderType="file",top.ICEcoder.openFile()},settingsScreen:function(a){a||(top.get("mediaContainer").innerHTML='<iframe src="lib/settings-screen.php" class="whiteGlow" style="width: 970px; height: 610px"></iframe>');top.ICEcoder.showHide(a?"hide":"show",top.get("blackMask"))},helpScreen:function(){top.get("mediaContainer").innerHTML='<iframe src="lib/help.php" class="whiteGlow" style="width: 800px; height: 450px"></iframe>';top.ICEcoder.showHide("show",
|
||||
top.get("blackMask"))},showManual:function(a){top.get("mediaContainer").innerHTML='<iframe src="http://icecoder.net/manual?version='+a+'" class="whiteGlow" style="width: 500px; height: 500px"></iframe>';top.ICEcoder.showHide("show",top.get("blackMask"))},propertiesScreen:function(a){top.get("mediaContainer").innerHTML='<iframe src="lib/properties.php?fileName='+a.replace(/\//g,"|")+'" class="whiteGlow" style="width: 660px; height: 330px"></iframe>';top.ICEcoder.showHide("show",top.get("blackMask"))},
|
||||
useNewSettings:function(a,b,c,d,e,f,g,m,h,k,p){var n;top.ICEcoder.theme=a.slice(a.lastIndexOf("/")+1,a.lastIndexOf("."));"editor"==top.ICEcoder.theme&&(top.ICEcoder.theme="icecoder");n=document.createElement("link");n.setAttribute("rel","stylesheet");n.setAttribute("type","text/css");n.setAttribute("href",a);top.ICEcoder.content.contentWindow.document.getElementsByTagName("head")[0].appendChild(n);a=-1<"3024-day base16-light eclipse elegant neat paraiso-light solarized xq-light".split(" ").indexOf(top.ICEcoder.theme)?
|
||||
"#ccc":"#000";top.ICEcoder.switchTab(top.ICEcoder.selectedTab);b!=top.ICEcoder.codeAssist&&(top.get("codeAssist").checked=b,top.ICEcoder.codeAssistToggle());c!=top.ICEcoder.lockedNav&&top.ICEcoder.lockUnlockNav();c||(ICEcoder.changeFilesW("contract"),top.ICEcoder.hideFileMenu());c=ICEcoder.content.contentWindow.document.styleSheets[4];b=c.rules?"rules":"cssRules";c[b][0].style.fontSize=g;c[b][4].style["border-left-width"]=f?"1px":"0";c[b][4].style["margin-left"]=f?"-1px":"0";c[b][2].style.cssText=
|
||||
"background-color: "+a+" !important";top.ICEcoder.lineWrapping=m;top.ICEcoder.indentWithTabs=h;top.ICEcoder.indentSize=k;for(f=0;f<ICEcoder.cMInstances.length;f++)ICEcoder.content.contentWindow["cM"+ICEcoder.cMInstances[f]].setOption("lineWrapping",top.ICEcoder.lineWrapping),ICEcoder.content.contentWindow["cM"+ICEcoder.cMInstances[f]].setOption("indentWithTabs",top.ICEcoder.indentWithTabs),ICEcoder.content.contentWindow["cM"+ICEcoder.cMInstances[f]].setOption("indentUnit",top.ICEcoder.indentSize),
|
||||
ICEcoder.content.contentWindow["cM"+ICEcoder.cMInstances[f]].setOption("tabSize",top.ICEcoder.indentSize);d!=top.ICEcoder.tagWrapperCommand&&(top.ICEcoder.tagWrapperCommand=d);e!=top.ICEcoder.autoComplete&&(top.ICEcoder.autoComplete=e);p&&top.ICEcoder.refreshFileManager()},updateResultsDisplay:function(a){ICEcoder.findReplace(top.get("find").value,!0,!1);top.get("results").style.display="show"==a?"inline-block":"none"},fullScreenSwitcher:function(){"undefined"!=typeof document.cancelFullScreen?document.fullScreen?
|
||||
document.cancelFullScreen():document.body.requestFullScreen():"undefined"!=typeof document.mozCancelFullScreen?document.mozFullScreen?document.mozCancelFullScreen():document.body.mozRequestFullScreen():"undefined"!=typeof document.webkitCancelFullScreen&&(document.webkitIsFullScreen?document.webkitCancelFullScreen():document.body.webkitRequestFullScreen(Element.ALLOW_KEYBOARD_INPUT))},zipIt:function(a){a=a.replace(/\//g,"|");top.ICEcoder.filesFrame.contentWindow.frames.fileControl.location.href="plugins/zip-it/index.php?zip="+
|
||||
a},downloadFile:function(a){a=a.replace(/\//g,"|");top.ICEcoder.filesFrame.contentWindow.frames.fileControl.location.href="lib/download.php?file="+a},chmod:function(a,b){a=a.replace(top.iceRoot,"");top.ICEcoder.showHide("hide",top.get("blackMask"));top.ICEcoder.serverQueue("add","lib/file-control.php?action=perms&file="+a+"&perms="+b);top.ICEcoder.serverMessage("<b>chMod "+b+" on </b><br>"+a)},openPreviewWindow:function(){if(0<top.ICEcoder.openFiles.length){var a,b,c;b=top.ICEcoder.openFiles[top.ICEcoder.selectedTab-
|
||||
1];c=b.substr(b.lastIndexOf("/")+1);c=c.substr(c.lastIndexOf(".")+1);a=ICEcoder.getcMInstance();top.ICEcoder.previewWindow=window.open(b,"previewWindow");-1<["md"].indexOf(c)&&(top.ICEcoder.previewWindow.onload=function(){top.ICEcoder.previewWindow.document.documentElement.innerHTML=mmd(a.getValue())})}},openTerminal:function(){top.ICEcoder.demoMode?top.ICEcoder.message("Sorry, you need to be logged in to use the terminal"):window.open("terminal")},logout:function(){window.location+="?logout"},message:function(a){alert(a)},
|
||||
ask:function(a){return confirm(a)},getInput:function(a,b){return prompt(a,b)},dataMessage:function(a){var b;b=top.ICEcoder.content.contentWindow.document.getElementById("dataMessage");b.style.display="block";b.innerHTML=a},update:function(){confirm("Updating is currently an experimental feature. While it should work fine, please note there may be issues here, plus the following isn't yet part of this:\n\n- Settings not ported to new version\n- Plugins not ported to new version\n- Any mods you've made not ported to new version\n\nIf you have write access on the whole of ICEcoder (ie, running locally) it should work fine. If tho you need to recover ICEcoder for any reason, you'll find this current version in its tmp dir.\n\nClick OK to proceed with an auto-update or cancel to visit the ICEcoder site so you can grab the zip and update manually")?
|
||||
top.get("blackMask"))},showManual:function(a,b){var c;c=b?"#"+b:"";top.get("mediaContainer").innerHTML='<iframe src="http://icecoder.net/manual?version='+a+c+'" class="whiteGlow" style="width: 500px; height: 500px"></iframe>';top.ICEcoder.showHide("show",top.get("blackMask"))},propertiesScreen:function(a){top.get("mediaContainer").innerHTML='<iframe src="lib/properties.php?fileName='+a.replace(/\//g,"|")+'" class="whiteGlow" style="width: 660px; height: 330px"></iframe>';top.ICEcoder.showHide("show",
|
||||
top.get("blackMask"))},pluginsManager:function(){top.get("mediaContainer").innerHTML='<iframe src="lib/plugins-manager.php" class="whiteGlow" style="width: 800px; height: 450px"></iframe>';top.ICEcoder.showHide("show",top.get("blackMask"))},useNewSettings:function(a,b,c,d,e,f,g,m,h,k,p){var n;top.ICEcoder.theme=a.slice(a.lastIndexOf("/")+1,a.lastIndexOf("."));"editor"==top.ICEcoder.theme&&(top.ICEcoder.theme="icecoder");n=document.createElement("link");n.setAttribute("rel","stylesheet");n.setAttribute("type",
|
||||
"text/css");n.setAttribute("href",a);top.ICEcoder.content.contentWindow.document.getElementsByTagName("head")[0].appendChild(n);a=-1<"3024-day base16-light eclipse elegant neat paraiso-light solarized xq-light".split(" ").indexOf(top.ICEcoder.theme)?"#ccc":"#000";top.ICEcoder.switchTab(top.ICEcoder.selectedTab);b!=top.ICEcoder.codeAssist&&(top.get("codeAssist").checked=b,top.ICEcoder.codeAssistToggle());c!=top.ICEcoder.lockedNav&&top.ICEcoder.lockUnlockNav();c||(ICEcoder.changeFilesW("contract"),
|
||||
top.ICEcoder.hideFileMenu());c=ICEcoder.content.contentWindow.document.styleSheets[4];b=c.rules?"rules":"cssRules";c[b][0].style.fontSize=g;c[b][4].style["border-left-width"]=f?"1px":"0";c[b][4].style["margin-left"]=f?"-1px":"0";c[b][2].style.cssText="background-color: "+a+" !important";top.ICEcoder.lineWrapping=m;top.ICEcoder.indentWithTabs=h;top.ICEcoder.indentSize=k;for(f=0;f<ICEcoder.cMInstances.length;f++)ICEcoder.content.contentWindow["cM"+ICEcoder.cMInstances[f]].setOption("lineWrapping",top.ICEcoder.lineWrapping),
|
||||
ICEcoder.content.contentWindow["cM"+ICEcoder.cMInstances[f]].setOption("indentWithTabs",top.ICEcoder.indentWithTabs),ICEcoder.content.contentWindow["cM"+ICEcoder.cMInstances[f]].setOption("indentUnit",top.ICEcoder.indentSize),ICEcoder.content.contentWindow["cM"+ICEcoder.cMInstances[f]].setOption("tabSize",top.ICEcoder.indentSize);d!=top.ICEcoder.tagWrapperCommand&&(top.ICEcoder.tagWrapperCommand=d);e!=top.ICEcoder.autoComplete&&(top.ICEcoder.autoComplete=e);p&&top.ICEcoder.refreshFileManager()},updateResultsDisplay:function(a){ICEcoder.findReplace(top.get("find").value,
|
||||
!0,!1);top.get("results").style.display="show"==a?"inline-block":"none"},fullScreenSwitcher:function(){"undefined"!=typeof document.cancelFullScreen?document.fullScreen?document.cancelFullScreen():document.body.requestFullScreen():"undefined"!=typeof document.mozCancelFullScreen?document.mozFullScreen?document.mozCancelFullScreen():document.body.mozRequestFullScreen():"undefined"!=typeof document.webkitCancelFullScreen&&(document.webkitIsFullScreen?document.webkitCancelFullScreen():document.body.webkitRequestFullScreen(Element.ALLOW_KEYBOARD_INPUT))},
|
||||
zipIt:function(a){a=a.replace(/\//g,"|");top.ICEcoder.filesFrame.contentWindow.frames.fileControl.location.href="plugins/zip-it/index.php?zip="+a},downloadFile:function(a){a=a.replace(/\//g,"|");top.ICEcoder.filesFrame.contentWindow.frames.fileControl.location.href="lib/download.php?file="+a},chmod:function(a,b){a=a.replace(top.iceRoot,"");top.ICEcoder.showHide("hide",top.get("blackMask"));top.ICEcoder.serverQueue("add","lib/file-control.php?action=perms&file="+a+"&perms="+b);top.ICEcoder.serverMessage("<b>chMod "+
|
||||
b+" on </b><br>"+a)},openPreviewWindow:function(){if(0<top.ICEcoder.openFiles.length){var a,b,c;b=top.ICEcoder.openFiles[top.ICEcoder.selectedTab-1];c=b.substr(b.lastIndexOf("/")+1);c=c.substr(c.lastIndexOf(".")+1);a=ICEcoder.getcMInstance();top.ICEcoder.previewWindow=window.open(b,"previewWindow");-1<["md"].indexOf(c)&&(top.ICEcoder.previewWindow.onload=function(){top.ICEcoder.previewWindow.document.documentElement.innerHTML=mmd(a.getValue())})}},openTerminal:function(){top.ICEcoder.demoMode?top.ICEcoder.message("Sorry, you need to be logged in to use the terminal"):
|
||||
window.open("terminal")},logout:function(){window.location+="?logout"},message:function(a){alert(a)},ask:function(a){return confirm(a)},getInput:function(a,b){return prompt(a,b)},dataMessage:function(a){var b;b=top.ICEcoder.content.contentWindow.document.getElementById("dataMessage");b.style.display="block";b.innerHTML=a},update:function(){confirm("Updating is currently an experimental feature. While it should work fine, please note there may be issues here, plus the following isn't yet part of this:\n\n- Settings not ported to new version\n- Plugins not ported to new version\n- Any mods you've made not ported to new version\n\nIf you have write access on the whole of ICEcoder (ie, running locally) it should work fine. If tho you need to recover ICEcoder for any reason, you'll find this current version in its tmp dir.\n\nClick OK to proceed with an auto-update or cancel to visit the ICEcoder site so you can grab the zip and update manually")?
|
||||
(top.ICEcoder.showHide("show",top.get("loadingMask")),window.location="lib/updater.php"):window.open("http://icecoder.net")},switchTab:function(a,b){var c;ICEcoder.selectedTab=a;if(c=ICEcoder.getcMInstance()){ICEcoder.switchMode();for(var d=0;d<ICEcoder.cMInstances.length;d++)ICEcoder.content.contentWindow["cM"+ICEcoder.cMInstances[d]].getWrapperElement().style.display="none";c.setOption("theme",top.ICEcoder.theme);c.getWrapperElement().style.display="block";b||setTimeout(function(){top.ICEcoder.focus()},
|
||||
4);c.refresh();ICEcoder.redoTabHighlight(ICEcoder.selectedTab);top.ICEcoder.findMode=!1;ICEcoder.findReplace(top.get("find").value,!0,!1);top.ICEcoder.getCaretPosition();top.ICEcoder.updateCharDisplay();top.ICEcoder.updateByteDisplay()}},newTab:function(){var a;ICEcoder.cMInstances.push(ICEcoder.nextcMInstance);ICEcoder.selectedTab=ICEcoder.cMInstances.length;ICEcoder.showHide("show",ICEcoder.content);ICEcoder.content.contentWindow.createNewCMInstance(ICEcoder.nextcMInstance);ICEcoder.setLayout();
|
||||
ICEcoder.thisFileFolderType="file";ICEcoder.thisFileFolderLink="/[NEW]";ICEcoder.openFile();a=ICEcoder.getcMInstance("new");ICEcoder.switchTab(ICEcoder.openFiles.length);a.removeLineClass(ICEcoder["cMActiveLine"+ICEcoder.cMInstances[top.ICEcoder.selectedTab-1]],"background");ICEcoder["cMActiveLine"+ICEcoder.selectedTab]=a.addLineClass(0,"background","cm-s-activeLine");ICEcoder.nextcMInstance++},createNewTab:function(){var a;top.ICEcoder.openFiles.push(top.ICEcoder.shortURL);top.get("tab"+top.ICEcoder.openFiles.length).style.display=
|
||||
|
||||
Reference in New Issue
Block a user