diff --git a/lib/ice-coder.js b/lib/ice-coder.js index b1d82cb..868747d 100644 --- a/lib/ice-coder.js +++ b/lib/ice-coder.js @@ -1790,7 +1790,7 @@ var ICEcoder = { }, // Update the settings used when we make a change to them - useNewSettings: function(themeURL,codeAssist,lockedNav,tagWrapperCommand,autoComplete,visibleTabs,fontSize,lineWrapping,indentWithTabs,indentSize,refreshFM) { + useNewSettings: function(themeURL,codeAssist,lockedNav,tagWrapperCommand,autoComplete,visibleTabs,fontSize,lineWrapping,indentWithTabs,indentSize,pluginPanelAligned,refreshFM) { var styleNode, strCSS, cMCSS, activeLineBG; // Add new stylesheet for selected theme @@ -1842,6 +1842,9 @@ var ICEcoder = { top.ICEcoder.autoComplete = autoComplete; } + top.get('plugins').style.left = pluginPanelAligned == "left" ? "0" : "auto"; + top.get('plugins').style.right = pluginPanelAligned == "right" ? "0" : "auto"; + // Finally, refresh the file manager if we need to if (refreshFM) {top.ICEcoder.refreshFileManager()}; }, diff --git a/lib/ice-coder.min.js b/lib/ice-coder.min.js index 6bddb0a..c22032e 100644 --- a/lib/ice-coder.min.js +++ b/lib/ice-coder.min.js @@ -39,11 +39,11 @@ b+"?")&&(top.ICEcoder.serverQueue("add","lib/file-control.php?action=delete&file a[0].lastIndexOf("|"));top.ICEcoder.pasteFiles(a);"undefined"!=typeof b&&(top.ICEcoder.copiedFiles=b)},uploadFilesSelect:function(a){top.get("uploadDir").value=a;top.get("fileInput").click()},uploadFilesSubmit:function(a){""!=top.get("fileInput").value&&(top.ICEcoder.showHide("show",top.get("loadingMask")),top.get("uploadFilesForm").submit(),event.preventDefault())},showMenu:function(a){var b,c;0!=top.ICEcoder.selectedFiles.length&&-1!=top.ICEcoder.selectedFiles.indexOf(top.ICEcoder.rightClickedFile.replace(/\//g, "|"))||top.ICEcoder.selectFileFolder(a);a=129;c=window.innerHeight;"undefined"!=typeof top.ICEcoder.thisFileFolderLink&&""!=top.ICEcoder.thisFileFolderLink&&(b=-1c&&(b-=b+a-c),top.get("fileMenu").style.top=b+"px");return!1},showFileMenu:function(){top.get("fileMenu").style.display="inline-block";setTimeout(function(){top.get("fileMenu").style.opacity= -"1"},4)},hideFileMenu:function(){top.get("fileMenu").style.display="none";top.get("fileMenu").style.opacity="0"},updateFileManagerList:function(a,b,c,d,e,f){var g,m,h,k,p,n,l,q;if("add"==a&&!top.get("filesFrame").contentWindow.document.getElementById(b.replace(/\/$/,"").replace(/\//g,"|")+"|"+c)){g=-1        '+c+' '+d+"";if(3>k.childNodes.length)l=document.createElement("ul"),k=h.parentNode.parentNode,k.parentNode.insertBefore(l,k.nextSibling),l=document.createElement("li"),l.className=m,l.draggable=!0,l.ondrag=function(a){top.ICEcoder.draggingWithKeyTest(a);top.ICEcoder.getcMInstance()&&top.ICEcoder.getcMInstance().focus()},l.ondragend=function(){top.ICEcoder.dropFile(this)},l.innerHTML=n,k.nextSibling.appendChild(l),k.nextSibling.appendChild(p);else for(h= -0;hc||"folder"==g&&"file"==l||h==k.childNodes.length-1)){l=document.createElement("li");l.className=m;l.draggable=!0;l.ondrag=function(a){top.ICEcoder.draggingWithKeyTest(a);top.ICEcoder.getcMInstance()&&top.ICEcoder.getcMInstance().focus()};l.ondragend=function(){top.ICEcoder.dropFile(this)};l.innerHTML=n;h== -k.childNodes.length-1?(k.appendChild(l),k.appendChild(p)):(k.insertBefore(l,k.childNodes[h]),k.insertBefore(p,k.childNodes[h+1]));break}"file"!=g||f||(top.ICEcoder.openFiles[top.ICEcoder.selectedTab-1]=b+c)}"rename"==a&&(f=e.replace(/\//g,"|"),h=top.get("filesFrame").contentWindow.document.getElementById(f),h.innerHTML=c,h.id=b.replace(/\//g,"|")+"|"+c,h.parentNode.title=h.id.replace(/\|/g,"/"),targetElemPerms=top.get("filesFrame").contentWindow.document.getElementById(f+"_perms"),targetElemPerms.id= +"1"},4)},hideFileMenu:function(){top.get("fileMenu").style.display="none";top.get("fileMenu").style.opacity="0"},updateFileManagerList:function(a,b,c,d,e,f){var g,m,h,l,n,p,k,q;if("add"==a&&!top.get("filesFrame").contentWindow.document.getElementById(b.replace(/\/$/,"").replace(/\//g,"|")+"|"+c)){g=-1        '+c+' '+d+"";if(3>l.childNodes.length)k=document.createElement("ul"),l=h.parentNode.parentNode,l.parentNode.insertBefore(k,l.nextSibling),k=document.createElement("li"),k.className=m,k.draggable=!0,k.ondrag=function(a){top.ICEcoder.draggingWithKeyTest(a);top.ICEcoder.getcMInstance()&&top.ICEcoder.getcMInstance().focus()},k.ondragend=function(){top.ICEcoder.dropFile(this)},k.innerHTML=p,l.nextSibling.appendChild(k),l.nextSibling.appendChild(n);else for(h= +0;hc||"folder"==g&&"file"==k||h==l.childNodes.length-1)){k=document.createElement("li");k.className=m;k.draggable=!0;k.ondrag=function(a){top.ICEcoder.draggingWithKeyTest(a);top.ICEcoder.getcMInstance()&&top.ICEcoder.getcMInstance().focus()};k.ondragend=function(){top.ICEcoder.dropFile(this)};k.innerHTML=p;h== +l.childNodes.length-1?(l.appendChild(k),l.appendChild(n)):(l.insertBefore(k,l.childNodes[h]),l.insertBefore(n,l.childNodes[h+1]));break}"file"!=g||f||(top.ICEcoder.openFiles[top.ICEcoder.selectedTab-1]=b+c)}"rename"==a&&(f=e.replace(/\//g,"|"),h=top.get("filesFrame").contentWindow.document.getElementById(f),h.innerHTML=c,h.id=b.replace(/\//g,"|")+"|"+c,h.parentNode.title=h.id.replace(/\|/g,"/"),targetElemPerms=top.get("filesFrame").contentWindow.document.getElementById(f+"_perms"),targetElemPerms.id= b.replace(/\//g,"|")+"|"+c+"_perms");"move"==a&&(top.ICEcoder.updateFileManagerList("add",b,c),top.ICEcoder.updateFileManagerList("delete",e.substr(0,e.lastIndexOf("/")),c));"chmod"==a&&(f=top.ICEcoder.rightClickedFile.replace(/\|/g,"/"),h=top.get("filesFrame").contentWindow.document.getElementById(f.replace(/\//g,"|")+"_perms"),h.innerHTML=d);"delete"==a&&(h=top.get("filesFrame").contentWindow.document.getElementById(b.replace(/\/$/,"").replace(/\//g,"|")+"|"+c).parentNode.parentNode,top.ICEcoder.openCloseDir(h.childNodes[0], !1),h.parentNode.removeChild(h))},fMIcon:function(a){"save"==a&&0d.index+d[0].length;);(b=top.get("content").contentWindow.document.getElementById("cssColor"))&&b.parentNode.removeChild(b); top.ICEcoder.codeAssist&&"CSS"==top.ICEcoder.caretLocType&&(b=top.document.createElement("div"),b.id="cssColor",b.style.position="absolute",b.style.display="block",b.style.width=b.style.height="20px",b.style.zIndex="1000",b.style.background=d?d[0]:"",b.style.cursor="pointer",b.onclick=function(){top.ICEcoder.showColorPicker(d[0])},""==b.style.backgroundColor&&(b.style.display="none"),top.get("header").appendChild(b),a.addWidget(a.getCursor(),top.get("cssColor"),!0))}},showColorPicker:function(a){top.get("blackMask").style.visibility= "visible";top.get("mediaContainer").innerHTML='



'; -farbtastic("picker","color");a&&top.get("picker").farbtastic.setColor(a)},drawCanvasImage:function(a){var b,c,d,e,f,g,m,h,k,p,n;b=top.get("canvasPicker").getContext("2d");c=new Image;c.src=a.src;c.onload=function(){top.get("canvasPicker").width=a.width;top.get("canvasPicker").height=a.height;b.drawImage(c,0,0,a.width,a.height)};top.get("canvasPicker").onmousemove=function(a){d=a.pageX-this.offsetLeft;e=a.pageY-this.offsetTop;f=b.getImageData(d,e,1,1).data;g=f[0];m=f[1];h=f[2];k=g+","+m+","+h;p=top.ICEcoder.rgbToHex(g, -m,h);top.get("rgbMouseXY").value=k;top.get("hexMouseXY").value="#"+p;top.get("hexMouseXY").style.backgroundColor=top.get("rgbMouseXY").style.backgroundColor="#"+p;n=128>g||128>m||128>h&&200>g&&200>m&&50g||128>m||128>h&&200>g&&200>m&&50';top.ICEcoder.showHide("show",top.get("blackMask"))},propertiesScreen:function(a){top.get("mediaContainer").innerHTML='';top.ICEcoder.showHide("show", -top.get("blackMask"))},pluginsManager:function(){top.get("mediaContainer").innerHTML='';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;fchMod "+ -b+" on
"+a)},openPreviewWindow:function(){if(0chMod "+b+" on
"+a)},openPreviewWindow:function(){if(0