Compare commits

...

33 Commits

Author SHA1 Message Date
Matt Pass
f0d4ef75d3 Design improvements for readability of shortcuts 2012-05-10 20:43:52 +01:00
Matt Pass
ec27eb53bc Close button now has 30% white BG, transparent on file deselect 2012-05-10 20:42:49 +01:00
Matt Pass
6512d4895b Nav design improvements & fix to .file types
Nav highlighting & changed status indication now improved
Fixed problem when adding .files it sees it as a folder
2012-05-10 18:43:11 +01:00
Matt Pass
de81341452 Version number update only 2012-05-10 18:41:40 +01:00
Matt Pass
97e6906f17 2 x new filetypes added, some hidden code renamed ready for next lot 2012-05-10 18:41:03 +01:00
Matt Pass
feeb3907bf Nav tab close button now round 2012-05-10 18:40:26 +01:00
Matt Pass
955d7714a2 Design improvements to the nav tabs 2012-05-10 18:40:04 +01:00
Matt Pass
e506d5a535 Couple of new filetype icons 2012-05-10 18:39:40 +01:00
Matt Pass
09ff2f279d Plenty of adjustments to give a new darker styling
Felt the file manager on the left being white was a bit jarring on the eyes
A darker background would be more suitable for long periods
Also decided to overhaul icons and give everything a modern feel
Previously it looked a bit dated, now looks much fresher
2012-05-09 17:22:18 +01:00
Matt Pass
e17a240661 Links in FM now white to suit dark BG removed CSS for unused filetypes
Plus added a couple of more specific filetypes
Commented out a few as I'll add them v/soon (before next point release)
2012-05-09 17:18:28 +01:00
Matt Pass
a6e244a82f No longer considers .asp/.aspx in restrictedFiles, considers .rb instead 2012-05-09 17:16:35 +01:00
Matt Pass
491fb4c243 Adjustments to colours/styling of tabs, items in FM & new Help popup
Minor alts to suit different states of tabs
Also minor alts to select/deselect of files/folders in file manager to suit darker style
New function to show/hide help popup on demand
2012-05-09 17:15:06 +01:00
Matt Pass
ca46e36e5a Minor alts to graphics to fit new styling
Slight adjustments to contrast of graphics
2012-05-09 17:10:28 +01:00
Matt Pass
09e3ece5a7 Help popup by clicking logo
You can now access help popup by clicking ICEcoder logo
2012-05-09 17:09:20 +01:00
Matt Pass
57e820501a Help popup added
New help popup screen, accessed by clicking ICEcoder logo
Shows shortcut keys for now
2012-05-09 17:08:14 +01:00
Matt Pass
1577118643 New & updated file manager icons
Added a few more specific icons such as html, js, ruby etc
Now starting to look more modern
Udpdated some general icons such as directory & refresh too
2012-05-09 17:06:17 +01:00
Matt Pass
856a0c9f31 Removing old icons
Removed many icons from the file manager
This is because I won't be supporting these file types, they're general purpose, or look dated
Will look to add css, sql, doc, pdf, swf, xls and more in the future
2012-05-09 17:04:17 +01:00
Matt Pass
c621479709 Dealing with new files & lastOpenedFiles array
[NEW] or 'blank' files not allowed into lastOpenedFiles array
Only update settings file if we have something to save
Otherwise, clear server message and remove from server queue
2012-05-08 18:31:35 +01:00
Matt Pass
b7769e6203 Dealing with fileMDT for new files
Don't tack fileMDT onto query string if it's undefined (ie, new files)
New file saves then possible if we don't have a fileMDT on query string
2012-05-08 18:29:03 +01:00
Matt Pass
b1e27282a9 Clear server message as well as remove from server queue 2012-05-08 18:26:21 +01:00
Matt Pass
c19df45ec1 New openFilesMDT array, stop erroneously showing changed tab & minor fixes
openFilesMDTs array now stores modified datetimes for collab edits
Stop clearing value of editor instance to avoid change tab error
New code to work with openFilesMDTs array
Stop switching to another tab unless we're closing current
2012-05-08 07:56:13 +01:00
Matt Pass
0ca29f9201 Additional if check on file datetime for collab edits
Wrapped an additional if around the save operations
This is to check if we have latest file, allowing collab edits
(if we attempt save and don't have latest modified date time, alert user
Other minor updates to work with new MDT vars, params, arrays
clearstatcache necessary to get latest modified datetime
2012-05-08 07:51:31 +01:00
Matt Pass
e208b45a88 v0.6.61 dev, .sql now restricted filetype and settings BG colour change 2012-05-08 07:47:31 +01:00
Matt Pass
b8f7be6376 Default BG now dark grey 2012-05-08 07:42:44 +01:00
mattpass
5ae958e349 Merge pull request #50 from WimTibackx/master
Fixes error #49 by isset catching missing GET & POST key errors in a stricter environment. Merged.
2012-05-07 13:09:54 -07:00
Wim Tibackx
7237ef8c69 One more... 2012-05-07 21:56:00 +02:00
Wim Tibackx
215a4ab362 Fix my earlier settings screw-up... Sorry! 2012-05-07 21:52:54 +02:00
Wim Tibackx
8c83378b8b Fixing issue #49: Notices in settings.php (unknown POST/GET-keys). About fix for issue #49 (example: lib/settings.php line 46): If isset(post theme) gives false, post theme would've given that too. If it gives true, validation is still the same as before. 2012-05-07 21:20:58 +02:00
mattpass
9d14ca1eb2 Update README.md 2012-05-07 13:01:33 +02:00
mattpass
78067a8dec Update README.md 2012-05-07 12:51:49 +02:00
mattpass
d12ea02c42 Update README.md 2012-05-07 12:40:31 +02:00
mattpass
3ceb519b8a Update README.md 2012-05-07 12:23:47 +02:00
mattpass
5508cd1074 Update README.md 2012-05-07 12:19:34 +02:00
40 changed files with 233 additions and 137 deletions

View File

@@ -1,27 +1,66 @@
ICE coder :: Matt Pass
#ICEcoder
##Web based IDE for smart web development
Demo: http://www.mattpass.com/_coder
Early version of the web based IDE which allows for creation of websites in the web browser. Uses the brilliant CodeMirror for code highlighting & editing, with a slick IDE wrapped around it to make the whole thing work.
Early version of the web based IDE which allows for creation of websites in the web browser.
###Features you'd expect
* Context aware code highlighting
* Supports HTML, CSS, JavaScript, PHP & Ruby
* Smart tab key system (selected text indents line)
* File manager
* Find & replace/replace all
* Document tabs indicate current doc & changes made
* Code folding
* Open last files on load
* Web based, access from anywhere
* Free, open source & customisable
Uses the brilliant CodeMirror plus some other PHP & JS code to deal with file handling and make the whole thing work. Also has the extra plugin 'Adminer' for DB management.
###Cool features you wouldn't expect
* Find & replace in current doc, open docs, files & filenames
* Found match & current position counter
* Indicates content type cursor is on
* Account login to keep certain files secure
* Restrict files, ban files and restrict by IP
* Settings to change functionality & editor theme
* Code Assist system
* Displays nest position of text cursor, hover to select, click to set cursor
* Nest structure OK/broken indicator
* Highlight word and press CTRL+I to Google search that
* Adds end tags as you type and in a context aware way
* Can rename open files (whoaah!)
* CTRL+Enter open current webpage in new tab
* CTRL+S+Enter opens a sticky tab to show live edits
* ESC = Comment/Uncomment line, incl partial lines
* Image viewer
* Colour preview block on CSS colours, ie red, #ff0000 or RGBA(255,0,0,0.5)
* MySQL Database management via Adminer plugin
* Backs up files every 10 mins or on click of backup plugin icon
###Installation
####Step 1: Clone the repo
```
$ git clone git@github:mattpass/ICEcoder
```
####Step 2: Upload all the files
```
Linux or Windows hosting OK
Upload to a new sub-dir URL such as yourdomain.com/_coder
Set public write permissions on the lib/settings.php file
```
####Step 3: Start coding
```
Visit the sub-dir URL in your browser and enter a password
Now you're setup, auto-logged in too and ready to code
```
Suitable for commercial & non-commercial projects, just let me know if it's useful to you and any cool customisations you make to it. I take no responsibility for anything, your usage is all down to you.
Is fully open source and I'd encourage you to take it, make it your own and customise to your hearts content! :)
Suitable for commercial & non-commercial projects, just let me know if it's useful to you and any cool customisations you make to it.
Please feel free to assist with the development of this and maybe in time we can produce a fantastic web based IDE for web devs.
INSTALLATION
1.Open /lib/settings.php and adjust variables to suit
2.Upload all the files to a Linux or Windows host under a new sub-dir URL such as yourdomain.com/_coder. Set public write permissions on the settings.php file
3.Visit this URL in your browser and set a password
4.Now you have top level access and can save (CTRL+S), delete (DEL) etc
Plenty of comments included in the code to assist with understanding.
Plenty of comments included in the code to assist with understanding, customising etc.
Comments, improvements & feedback welcomed!

Binary file not shown.

Binary file not shown.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 464 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 603 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 618 B

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 579 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 537 B

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 651 B

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 653 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 582 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 954 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 734 B

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 633 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 668 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 385 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 447 B

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 591 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 538 B

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 606 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 588 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 856 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 626 B

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 859 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 663 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 56 B

After

Width:  |  Height:  |  Size: 56 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 377 B

After

Width:  |  Height:  |  Size: 1.2 KiB

View File

@@ -92,7 +92,7 @@ lastOpenFiles = [<?php
<?php echo $pluginsDisplay; ?>
</div>
<div class="version"><?php echo $versionNo;?></div>
<img src="images/ice-coder.gif" class="logo" onContextMenu="ICEcoder.settingsScreen('show')">
<img src="images/ice-coder.gif" class="logo" onClick="ICEcoder.helpScreen('show')" onContextMenu="ICEcoder.settingsScreen('show')">
</div>
<div id="files" class="files" onMouseOver="ICEcoder.changeFilesW('expand')" onMouseOut="ICEcoder.changeFilesW('contract'); top.document.getElementById('fileMenu').style.display='none';">

View File

@@ -18,10 +18,11 @@ table, caption, tbody, tfoot, thead, tr, th, td {
}
body {overflow: hidden;
-webkit-user-select: none;
-moz-user-select: none;
-o-user-select:none;
user-select: none;
-webkit-user-select: none;
-moz-user-select: none;
-o-user-select:none;
user-select: none;
background-color: #222222;
}
h1 {font-size: 36px; font-weight: normal; color: #888888; margin-bottom: 20px}
@@ -77,7 +78,7 @@ h2 {font-size: 18px; font-weight: normal; color: #ffffff}
.header .version {position: relative; display: inline-block; margin-top: 25px; font-size: 10px; color: #bbbbbb}
.header .logo {position: relative; margin: 5px 10px 0px 5px; cursor: pointer}
.files {position: absolute; display: inline-block; height: 100%; width: 250px; background-color: #e0e0e0; background-image: url('../images/files-arrow.gif'); background-repeat: no-repeat; background-position: 100% 50%; overflow: hidden; z-index: 1;
.files {position: absolute; display: inline-block; height: 100%; width: 250px; background-color: #444444; background-image: url('../images/files-arrow.gif'); background-repeat: no-repeat; background-position: 100% 50%; overflow: hidden; z-index: 1;
-webkit-box-shadow: 0px 0px 10px 4px rgba(0,0,0,0.4);
-moz-box-shadow: 0px 0px 10px 4px rgba(0,0,0,0.4);
box-shadow: 0px 0px 10px 4px rgba(0,0,0,0.4);
@@ -103,7 +104,7 @@ h2 {font-size: 18px; font-weight: normal; color: #ffffff}
.files .button:hover {background-color: #444444; color: #eeeeee}
.files .lock {position: relative; margin-left: 225px; margin-top: -20px; z-index: 1}
.files .frame {display: inline-block; width: 250px}
.files .serverMessage {position: absolute; display: inline-block; width: 180px; bottom: 0px; margin-bottom: 30px; background-color: rgba(255,255,255,0.8); font-size: 10px; padding: 7px 12px; opacity: 0;
.files .serverMessage {position: absolute; display: inline-block; width: 450px; bottom: 0px; margin-bottom: 30px; background-color: rgba(255,255,255,0.8); font-size: 10px; padding: 7px 12px; opacity: 0;
-webkit-transition: all 0.2s;
-moz-transition: all 0.2s;
-o-transition: all 0.2s;
@@ -111,17 +112,17 @@ h2 {font-size: 18px; font-weight: normal; color: #ffffff}
}
.files .serverMessage b {font-size: 10px}
.editor {position: absolute; display: inline-block; top: 0px; left: 15px; width: 2400px; background-color: #fbfbfb;}
.editor .tabsBar {display: inline-block; height: 21px; width: 2400px; margin-top: 40px; padding-left: 41px; border-bottom: solid 1px #888888; background-color: #eeeeee;}
.tabsBar .tab {display: inline-block; display: none; background-image: url('../images/nav-bg.gif'); background-repeat: repeat-x; background-position: 0px 0px; padding: 4px 8px 2px 8px; font-size: 10px; border-left: solid 1px #ffffff; border-right: solid 1px #bbbbbb; color: #ffffff; cursor: pointer;
-webkit-transition: all 0.2s;
-moz-transition: all 0.2s;
-o-transition: all 0.2s;
transition: all 0.2s;
.editor {position: absolute; display: inline-block; top: 0px; left: 15px; width: 2400px}
.editor .tabsBar {display: inline-block; height: 22px; width: 2400px; margin-top: 40px; padding-left: 41px; background-color: #888888;}
.tabsBar .tab {display: inline-block; display: none; background-image: url('../images/nav-bg.gif'); background-repeat: repeat-x; background-position: 0px 0px; padding: 5px 8px 2px 8px; font-size: 10px; border-left: solid 1px #ffffff; border-right: solid 1px #777777; color: #ffffff; cursor: pointer;
-webkit-transition: all 0.15s;
-moz-transition: all 0.15s;
-o-transition: all 0.15s;
transition: all 0.15s;
}
.tabsBar .tab img {margin: 1px 0px 0px 5px}
.tabsBar .newTab {display: inline-block; background-image: url('../images/nav-bg.gif'); background-repeat: repeat-x; background-position: 0px 0px; padding: 5px 5px 1px 5px; border-left: solid 1px #ffffff; border-right: solid 1px #bbbbbb; cursor: pointer;}
.editor .findBar {display: inline-block; height: 28px; width: 2400px; background-color: #eeeeee}
.tabsBar .tab .closeTab {margin: 1px 0px 0px 5px; border-radius: 6px}
.tabsBar .newTab {display: inline-block; background-image: url('../images/nav-bg.gif'); background-repeat: repeat-x; background-position: 0px 0px; padding: 6px 5px 1px 5px; border-left: solid 1px #ffffff; border-right: solid 1px #777777; cursor: pointer;}
.editor .findBar {display: inline-block; height: 28px; width: 2400px; color: #ffffff; background-color: #141414}
.findBar .findReplace {position: absolute; z-index: 1}
.findReplace select {position: relative; font-size: 10px; margin: 8px 2px 0px 2px; top: -2px;}
.findReplace .findText {display: inline-block; height: 21px; font-size: 10px; margin: 8px 2px 0px 2px; margin-left: 43px}

View File

@@ -16,6 +16,7 @@ var ICEcoder = {
delKeyDown: false, // Indicates if DEL keydown
canSwitchTabs: true, // Stops switching of tabs when trying to close
openFiles: [], // Array of open file URLs
openFileMDTs: [], // Array of open file modification datetimes
cMInstances: [], // List of CodeMirror instance no's
nextcMInstance: 1, // Next available CodeMirror instance no
selectedFiles: [], // Array of selected files
@@ -367,11 +368,15 @@ var ICEcoder = {
// Reset all tabs to be without a highlight and then highlight the selected
redoTabHighlight: function(selectedTab) {
var bgVPos;
var bgVPos, tColor;
for(var i=1;i<=ICEcoder.changedContent.length;i++) {
ICEcoder.changedContent[i-1]==1 ? bgVPos = -44 : bgVPos = 0;
i==selectedTab ? ICEcoder.changedContent[selectedTab-1]==1 ? bgVPos = -33 : bgVPos = -22 : bgVPos = bgVPos;
if (document.getElementById('closeTabButton'+i)) {
ICEcoder.changedContent[i-1]==1 ? document.getElementById('closeTabButton'+i).style.backgroundColor = "#bb0000" : document.getElementById('closeTabButton'+i).style.backgroundColor = "rgba(255,255,255,0.3)";
}
i==selectedTab ? tColor = "#ffffff" : tColor = "#000000";
document.getElementById('tab'+i).style.color = tColor;
i==selectedTab ? bgVPos = -22 : bgVPos = 0;
document.getElementById('tab'+i).style.backgroundPosition = "0px "+bgVPos+"px";
}
ICEcoder.changedContent[selectedTab-1]==1 ? top.ICEcoder.fMIconVis('fMSave',1) : top.ICEcoder.fMIconVis('fMSave',0.3);
@@ -406,7 +411,7 @@ var ICEcoder = {
top.ICEcoder.openFiles.push(top.ICEcoder.shortURL);
// Setup a new tab
closeTabLink = '<a nohref onClick="parent.ICEcoder.closeTab('+(top.ICEcoder.openFiles.length)+')"><img src="images/nav-close.gif"></a>';
closeTabLink = '<a nohref onClick="top.ICEcoder.closeTab('+(top.ICEcoder.openFiles.length)+')"><img src="images/nav-close.gif" id="closeTabButton'+(top.ICEcoder.openFiles.length)+'" class="closeTab"></a>';
top.document.getElementById('tab'+(top.ICEcoder.openFiles.length)).style.display = "inline-block";
top.document.getElementById('tab'+(top.ICEcoder.openFiles.length)).innerHTML = top.ICEcoder.openFiles[top.ICEcoder.openFiles.length-1] + " " + closeTabLink;
@@ -428,7 +433,7 @@ var ICEcoder = {
top.ICEcoder.openFiles[tabNum] = newName;
// Setup a new tab
closeTabLink = '<a nohref onClick="parent.ICEcoder.closeTab('+tabNum+')"><img src="images/nav-close.gif"></a>';
closeTabLink = '<a nohref onClick="parent.ICEcoder.closeTab('+tabNum+')"><img src="images/nav-close.gif" id="closeTabButton'+tabNum+'" class="closeTab"></a>';
top.document.getElementById('tab'+tabNum).innerHTML = top.ICEcoder.openFiles[tabNum] + " " + closeTabLink;
},
@@ -505,7 +510,7 @@ var ICEcoder = {
// Alter array indicating which files have changed
redoChangedContent: function(evt) {
var key;
key = evt.keyCode ? evt.keyCode : evt.which ? evt.which : evt.charCode;
// Exclude a few keys such as Escape...
if (top.ICEcoder.ctrlKeyDown==false && key!=27 && key!=20 && (key<16||key>19) && (key<37||key>40) && (key!=144||key!=145) && (key!=44||key!=45) && (key<33||key>36) && (key!=91||key!=92) && (key<112||key>123)) {
@@ -531,21 +536,20 @@ var ICEcoder = {
ICEcoder.openFiles[i-1] = ICEcoder.openFiles[i];
// reduce the tab reference number on the closeTab link by 1
top.document.getElementById('tab'+i).innerHTML = top.document.getElementById('tab'+i).innerHTML.replace(("closeTab("+(i+1)+")"),"closeTab("+i+")");
top.document.getElementById('tab'+i).innerHTML = top.document.getElementById('tab'+i).innerHTML.replace(("closeTab("+(i+1)+")"),"closeTab("+i+")").replace(("closeTabButton("+(i+1)+")"),"closeTabButton("+i+")");
}
// hide the instance we're closing by setting the hide class, clear the value & remove from the array
// hide the instance we're closing by setting the hide class and removing from the array
ICEcoder.content.contentWindow['cM'+top.ICEcoder.cMInstances[closeTabNum-1]].setOption('theme',top.theme+' hidden');
ICEcoder.content.contentWindow['cM'+top.ICEcoder.cMInstances[closeTabNum-1]].setValue('');
top.ICEcoder.cMInstances.splice(closeTabNum-1,1);
// clear the rightmost tab (or only one left in a 1 tab scenario) & remove from the array
top.document.getElementById('tab'+ICEcoder.openFiles.length).style.display = "none";
top.document.getElementById('tab'+ICEcoder.openFiles.length).innerHTML = "";
ICEcoder.openFiles.pop();
// Determin the new selectedTab number, reduced by 1 if we have some tabs, 0 for a reset state
ICEcoder.openFiles.length>0 ? ICEcoder.selectedTab-=1 : ICEcoder.selectedTab = 0;
ICEcoder.openFileMDTs.pop();
// If we're closing the selected tab, determin the new selectedTab number, reduced by 1 if we have some tabs, 0 for a reset state
if (ICEcoder.selectedTab==closeTabNum) {
ICEcoder.openFiles.length>0 ? ICEcoder.selectedTab-=1 : ICEcoder.selectedTab = 0;
}
if (ICEcoder.openFiles.length>0 && ICEcoder.selectedTab==0) {ICEcoder.selectedTab=1};
// hide the content area if we have no tabs open
@@ -557,7 +561,6 @@ var ICEcoder = {
ICEcoder.switchMode();
ICEcoder.switchTab(ICEcoder.selectedTab);
}
// Highlight the selected tab after splicing the change state out of the array
top.ICEcoder.changedContent.splice(closeTabNum-1,1);
top.parent.ICEcoder.redoTabHighlight(ICEcoder.selectedTab);
@@ -688,8 +691,8 @@ var ICEcoder = {
// Select or deselect file
selectDeselectFile: function(action,file) {
action == "select" ? file.style.backgroundColor="#888888" : file.style.backgroundColor="#dddddd";
action == "select" ? file.style.color="#f8f8f8" : file.style.color="#000000";
action == "select" ? file.style.backgroundColor="#888888" : file.style.backgroundColor="transparent";
action == "select" ? file.style.color="#ffffff" : file.style.color="#eeeeee";
},
// Create a new file (start & instant save)
@@ -761,8 +764,8 @@ var ICEcoder = {
var saveType;
saveAs ? saveType = "saveAs" : saveType = "save";
top.ICEcoder.serverQueue("add","lib/file-control.php?action=save&file="+ICEcoder.openFiles[ICEcoder.selectedTab-1].replace(/\//g,"|")+"&saveType="+saveType);
top.ICEcoder.serverQueue("add","lib/file-control.php?action=save&file="+ICEcoder.openFiles[ICEcoder.selectedTab-1].replace(/\//g,"|")+"&fileMDT="+ICEcoder.openFileMDTs[ICEcoder.selectedTab-1]+"&saveType="+saveType);
top.ICEcoder.serverMessage('<b>Saving</b><br>'+ICEcoder.openFiles[ICEcoder.selectedTab-1]);
},
@@ -777,7 +780,7 @@ var ICEcoder = {
if(top.ICEcoder.openFiles[i]==shortURL.replace(/\|/g,"/")) {
// rename array item and the tab
top.ICEcoder.openFiles[i] = renamedFile;
closeTabLink = '<a nohref onClick="top.ICEcoder.files.contentWindow.closeTab('+(i+1)+')"><img src="images/nav-close.gif"></a>';
closeTabLink = '<a nohref onClick="top.ICEcoder.files.contentWindow.closeTab('+(i+1)+')"><img src="images/nav-close.gif" id="closeTabButton'+(i+1)+'" class="closeTab"></a>';
top.document.getElementById('tab'+(i+1)).innerHTML = top.ICEcoder.openFiles[i] + " " + closeTabLink;
}
}
@@ -818,7 +821,7 @@ var ICEcoder = {
if (!foundFile) {top.ICEcoder.selectFileFolder()};
if ("undefined" != typeof top.ICEcoder.thisFileFolderLink && top.ICEcoder.thisFileFolderLink!="") {
top.ICEcoder.selectedFiles[0].indexOf(".")>0 ? menuType = "file" : menuType = "folder";
top.ICEcoder.selectedFiles[0].indexOf(".")>-1 ? menuType = "file" : menuType = "folder";
folderMenuItems = top.document.getElementById('folderMenuItems');
menuType == "folder" && top.ICEcoder.selectedFiles.length == 1 ? folderMenuItems.style.display = "block" : folderMenuItems.style.display = "none";
top.ICEcoder.selectedFiles.length > 1 ? singleFileMenuItems.style.display = "none" : singleFileMenuItems.style.display = "block";
@@ -1114,7 +1117,7 @@ var ICEcoder = {
if (action=="add") {
// Determin if this is a file or folder and based on that, set the CSS styling & link
file.indexOf(".")>0 ? actionElemType = "file" : actionElemType = "folder";
file.indexOf(".")>-1 ? actionElemType = "file" : actionElemType = "folder";
actionElemType=="file" ? cssStyle = "pft-file ext-" + file.substr(file.indexOf(".")+1,file.length) : cssStyle = "pft-directory";
actionElemType=="file" ? hrefLink = "nohref" : hrefLink = "href=\"#\"";
@@ -1286,7 +1289,7 @@ var ICEcoder = {
if (ICEcoder.selectedFiles.length==1) {
top.ICEcoder.rightClickedFile=top.ICEcoder.thisFileFolderLink=top.fullPath+top.ICEcoder.selectedFiles[0].replace('|','/');
if (action=="open" && ICEcoder.selectedFiles[0].indexOf(".")>0) {
if (action=="open" && ICEcoder.selectedFiles[0].indexOf(".")>-1) {
top.ICEcoder.thisFileFolderType='file';
top.ICEcoder.openFile();
}
@@ -1392,13 +1395,18 @@ var ICEcoder = {
lastOpenedFiles = "";
// Generate a comma seperated list
for (var i=0;i<top.ICEcoder.openFiles.length;i++) {
if (top.ICEcoder.openFiles[i]!="/[NEW]") {
if (top.ICEcoder.openFiles[i]!="" && top.ICEcoder.openFiles[i].indexOf("[NEW]")==-1) {
lastOpenedFiles += top.ICEcoder.openFiles[i].replace(/\//g,"|");
if (i<top.ICEcoder.openFiles.length-1) {lastOpenedFiles += ","};
}
}
// Then send through to the settings page to update setting
top.ICEcoder.serverQueue("add","lib/settings.php?saveFiles="+lastOpenedFiles);
if (lastOpenedFiles!="") {
// Then send through to the settings page to update setting
top.ICEcoder.serverQueue("add","lib/settings.php?saveFiles="+lastOpenedFiles);
} else {
top.ICEcoder.serverMessage();
top.ICEcoder.serverQueue("del",0);
}
},
// Opens the last files we had open
@@ -1437,6 +1445,14 @@ var ICEcoder = {
top.ICEcoder.showHide(vis,top.document.getElementById('blackMask'));
},
// Show the help screen
helpScreen: function(vis) {
if (vis=="show") {
top.document.getElementById('mediaContainer').innerHTML = '<iframe src="lib/help.php" class="whiteGlow" style="width: 400px; height: 400px"></iframe>';
}
top.ICEcoder.showHide(vis,top.document.getElementById('blackMask'));
},
// Update the settings used when we make a change to them
useNewSettings: function(themeURL,tabsIndent,codeAssist,lockedNav,visibleTabs,refreshFM) {
var styleNode, strCSS, cMCSS;

View File

@@ -138,21 +138,28 @@ if ($_GET['action']=="save") {
$saveFile = str_replace("\\","/",$_SERVER['DOCUMENT_ROOT']).$file;
$saveFile = str_replace("//","/",$saveFile);
if ((file_exists($saveFile) && is_writable($saveFile)) || $_POST['newFileName']!="") {
$fh = fopen($saveFile, 'w') or die("can't open file");
fwrite($fh, $_POST['contents']);
fclose($fh);
if (filemtime($saveFile)==$_GET['fileMDT']||!(isset($_GET['fileMDT']))) {
$fh = fopen($saveFile, 'w') or die("Sorry, cannot save");
fwrite($fh, $_POST['contents']);
fclose($fh);
clearstatcache();
echo '<script>top.ICEcoder.openFileMDTs[top.ICEcoder.selectedTab-1]="'.filemtime($saveFile).'";</script>';
if (isset($_POST['newFileName'])&&$_POST['newFileName']!="") {
// Reload file manager & stop CTRL+s being sticky
$fileName = substr($file,strrpos($file,"/")+1);
$fileLoc = substr($file,0,strrpos($file,"/"));
if ($fileLoc=="") {$fileLoc = "/";};
echo '<script>top.ICEcoder.selectedFiles=[];top.ICEcoder.updateFileManagerList(\'add\',\''.$fileLoc.'\',\''.$fileName.'\')</script>';
if (isset($_POST['newFileName'])&&$_POST['newFileName']!="") {
// Reload file manager & stop CTRL+s being sticky
$fileName = substr($file,strrpos($file,"/")+1);
$fileLoc = substr($file,0,strrpos($file,"/"));
if ($fileLoc=="") {$fileLoc = "/";};
echo '<script>top.ICEcoder.selectedFiles=[];top.ICEcoder.updateFileManagerList(\'add\',\''.$fileLoc.'\',\''.$fileName.'\')</script>';
}
if (isset($_POST['newFileName'])&&$_POST['newFileName']!="") {
echo '<script>top.ICEcoder.renameTab(top.ICEcoder.selectedTab,\''.$file.'\');</script>';
}
echo '<script>top.ICEcoder.serverMessage();top.ICEcoder.serverQueue("del",0);if (top.ICEcoder.stickyTabWindow.location) {top.ICEcoder.stickyTabWindow.location.reload()};action="doneSave";</script>';
} else {
echo "<script>alert('Sorry, this file has changed, cannot save\\n".$file."');</script>";
echo '<script>top.ICEcoder.serverMessage();top.ICEcoder.serverQueue("del",0);action="nothing";</script>';
}
if (isset($_POST['newFileName'])&&$_POST['newFileName']!="") {
echo '<script>top.ICEcoder.renameTab(top.ICEcoder.selectedTab,\''.$file.'\');</script>';
}
echo '<script>top.ICEcoder.serverMessage();top.ICEcoder.serverQueue("del",0);if (top.ICEcoder.stickyTabWindow.location) {top.ICEcoder.stickyTabWindow.location.reload()};action="doneSave";</script>';
} else {
echo "<script>alert('Sorry, cannot write\\n".$file."');</script>";
echo '<script>top.ICEcoder.serverMessage();top.ICEcoder.serverQueue("del",0);action="nothing";</script>';
@@ -193,6 +200,7 @@ if (action=="load") {
top.ICEcoder.content.contentWindow['cM'+top.ICEcoder.cMInstances[top.ICEcoder.selectedTab-1]].setLineClass(top.ICEcoder['cMActiveLine'+top.ICEcoder.selectedTab], null);
top.ICEcoder['cMActiveLine'+top.ICEcoder.selectedTab] = top.ICEcoder.content.contentWindow['cM'+top.ICEcoder.cMInstances[top.ICEcoder.selectedTab-1]].setLineClass(0, "cm-s-activeLine");
top.ICEcoder.nextcMInstance++;
top.ICEcoder.openFileMDTs.push('<?php echo filemtime($file); ?>');
top.ICEcoder.loadingFile = false;
}
@@ -206,7 +214,7 @@ if (action=="load") {
}
</script>
<form name="saveFile" action="file-control.php?action=save&file=<?php if (isset($file)) {echo $file;};?>" method="POST">
<form name="saveFile" action="file-control.php?action=save&file=<?php if (isset($file)) {echo $file;}; if (isset($_GET['fileMDT']) && $_GET['fileMDT']!="undefined") {echo "&fileMDT=".$_GET['fileMDT'];};?>" method="POST">
<textarea name="contents"></textarea>
<input type="hidden" name="newFileName" value="">
</form>

View File

@@ -30,7 +30,7 @@ body {margin: 0px; overflow: auto}
}
.fileManager span {font-family: helvetica, arial, swiss, verdana;}
.fileManager a {color: #000000; text-decoration: none;}
.fileManager a {color: #eeeeee; text-decoration: none;}
.fileManager .open {font-style: italic;}
.fileManager .closed {font-style: normal;}
.fileManager .pft-directory {list-style-image: url(../images/file-manager-icons/directory.png);}
@@ -40,61 +40,24 @@ body {margin: 0px; overflow: auto}
.fileManager LI.pft-file { list-style-image: url(../images/file-manager-icons/file.png); }
/* Additional file types */
.fileManager LI.ext-3gp { list-style-image: url(../images/file-manager-icons/film.png); }
.fileManager LI.ext-afp { list-style-image: url(../images/file-manager-icons/code.png); }
.fileManager LI.ext-afpa { list-style-image: url(../images/file-manager-icons/code.png); }
.fileManager LI.ext-asp { list-style-image: url(../images/file-manager-icons/code.png); }
.fileManager LI.ext-aspx { list-style-image: url(../images/file-manager-icons/code.png); }
.fileManager LI.ext-avi { list-style-image: url(../images/file-manager-icons/film.png); }
.fileManager LI.ext-bat { list-style-image: url(../images/file-manager-icons/application.png); }
.fileManager LI.ext-bmp { list-style-image: url(../images/file-manager-icons/picture.png); }
.fileManager LI.ext-c { list-style-image: url(../images/file-manager-icons/code.png); }
.fileManager LI.ext-cfm { list-style-image: url(../images/file-manager-icons/code.png); }
.fileManager LI.ext-cgi { list-style-image: url(../images/file-manager-icons/code.png); }
.fileManager LI.ext-com { list-style-image: url(../images/file-manager-icons/application.png); }
.fileManager LI.ext-cpp { list-style-image: url(../images/file-manager-icons/code.png); }
.fileManager LI.ext-css { list-style-image: url(../images/file-manager-icons/css.png); }
.fileManager LI.ext-doc { list-style-image: url(../images/file-manager-icons/doc.png); }
.fileManager LI.ext-exe { list-style-image: url(../images/file-manager-icons/application.png); }
.fileManager LI.ext-gif { list-style-image: url(../images/file-manager-icons/picture.png); }
.fileManager LI.ext-fla { list-style-image: url(../images/file-manager-icons/flash.png); }
.fileManager LI.ext-h { list-style-image: url(../images/file-manager-icons/code.png); }
.fileManager LI.ext-gif { list-style-image: url(../images/file-manager-icons/gif.png); }
.fileManager LI.ext-htm { list-style-image: url(../images/file-manager-icons/html.png); }
.fileManager LI.ext-html { list-style-image: url(../images/file-manager-icons/html.png); }
.fileManager LI.ext-jar { list-style-image: url(../images/file-manager-icons/java.png); }
.fileManager LI.ext-jpg { list-style-image: url(../images/file-manager-icons/picture.png); }
.fileManager LI.ext-jpeg { list-style-image: url(../images/file-manager-icons/picture.png); }
.fileManager LI.ext-js { list-style-image: url(../images/file-manager-icons/script.png); }
.fileManager LI.ext-lasso { list-style-image: url(../images/file-manager-icons/code.png); }
.fileManager LI.ext-log { list-style-image: url(../images/file-manager-icons/txt.png); }
.fileManager LI.ext-m4p { list-style-image: url(../images/file-manager-icons/music.png); }
.fileManager LI.ext-mov { list-style-image: url(../images/file-manager-icons/film.png); }
.fileManager LI.ext-mp3 { list-style-image: url(../images/file-manager-icons/music.png); }
.fileManager LI.ext-mp4 { list-style-image: url(../images/file-manager-icons/film.png); }
.fileManager LI.ext-mpg { list-style-image: url(../images/file-manager-icons/film.png); }
.fileManager LI.ext-mpeg { list-style-image: url(../images/file-manager-icons/film.png); }
.fileManager LI.ext-ogg { list-style-image: url(../images/file-manager-icons/music.png); }
.fileManager LI.ext-pcx { list-style-image: url(../images/file-manager-icons/picture.png); }
.fileManager LI.ext-pdf { list-style-image: url(../images/file-manager-icons/pdf.png); }
.fileManager LI.ext-jpg { list-style-image: url(../images/file-manager-icons/jpg.png); }
.fileManager LI.ext-jpeg { list-style-image: url(../images/file-manager-icons/jpg.png); }
.fileManager LI.ext-js { list-style-image: url(../images/file-manager-icons/js.png); }
/*.fileManager LI.ext-pdf { list-style-image: url(../images/file-manager-icons/pdf.png); } */
.fileManager LI.ext-php { list-style-image: url(../images/file-manager-icons/php.png); }
.fileManager LI.ext-png { list-style-image: url(../images/file-manager-icons/picture.png); }
.fileManager LI.ext-ppt { list-style-image: url(../images/file-manager-icons/ppt.png); }
.fileManager LI.ext-psd { list-style-image: url(../images/file-manager-icons/psd.png); }
.fileManager LI.ext-pl { list-style-image: url(../images/file-manager-icons/script.png); }
.fileManager LI.ext-py { list-style-image: url(../images/file-manager-icons/script.png); }
.fileManager LI.ext-png { list-style-image: url(../images/file-manager-icons/png.png); }
.fileManager LI.ext-rb { list-style-image: url(../images/file-manager-icons/ruby.png); }
.fileManager LI.ext-rbx { list-style-image: url(../images/file-manager-icons/ruby.png); }
.fileManager LI.ext-rhtml { list-style-image: url(../images/file-manager-icons/ruby.png); }
.fileManager LI.ext-rpm { list-style-image: url(../images/file-manager-icons/linux.png); }
.fileManager LI.ext-ruby { list-style-image: url(../images/file-manager-icons/ruby.png); }
.fileManager LI.ext-sql { list-style-image: url(../images/file-manager-icons/db.png); }
.fileManager LI.ext-swf { list-style-image: url(../images/file-manager-icons/flash.png); }
.fileManager LI.ext-tif { list-style-image: url(../images/file-manager-icons/picture.png); }
.fileManager LI.ext-tiff { list-style-image: url(../images/file-manager-icons/picture.png); }
/*.fileManager LI.ext-sql { list-style-image: url(../images/file-manager-icons/sql.png); } */
/*.fileManager LI.ext-swf { list-style-image: url(../images/file-manager-icons/swf.png); } */
.fileManager LI.ext-txt { list-style-image: url(../images/file-manager-icons/txt.png); }
.fileManager LI.ext-vb { list-style-image: url(../images/file-manager-icons/code.png); }
.fileManager LI.ext-wav { list-style-image: url(../images/file-manager-icons/music.png); }
.fileManager LI.ext-wmv { list-style-image: url(../images/file-manager-icons/film.png); }
.fileManager LI.ext-xls { list-style-image: url(../images/file-manager-icons/xls.png); }
.fileManager LI.ext-xml { list-style-image: url(../images/file-manager-icons/code.png); }
.fileManager LI.ext-zip { list-style-image: url(../images/file-manager-icons/zip.png); }
/*.fileManager LI.ext-xls { list-style-image: url(../images/file-manager-icons/xls.png); } */
/*.fileManager LI.ext-xml { list-style-image: url(../images/file-manager-icons/xml.png); } */
/*.fileManager LI.ext-zip { list-style-image: url(../images/file-manager-icons/zip.png); } */

31
lib/help.css Normal file
View File

@@ -0,0 +1,31 @@
/* First, reset everything to a standard */
html, body, div, span, applet, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, big, cite, code,
del, dfn, em, font, img, ins, kbd, q, s, samp,
small, strike, strong, sub, sup, tt, var,
b, u, i, center,
dl, dt, dd, ol, ul, li,
fieldset, form, label, legend,
table, caption, tbody, tfoot, thead, tr, th, td {
border: 0px;
margin: 0px;
padding: 0px;
outline: 0px;
font-size: 12px;
vertical-align: top;
}
body {overflow: hidden;
-webkit-user-select: none;
-moz-user-select: none;
-o-user-select:none;
user-select: none;
}
h1 {font-size: 36px; font-weight: normal; color: #888888; margin-bottom: 20px}
.help {font-family: arial, verdana, helvetica, sans-serif; background-color: #1c1c19; color: #ffffff; padding: 20px}
.help .key {display: inline-block; width: 175px; text-align: right; margin-right: 5px; float: left}
.help .key .plus {color: #888888}
.help .shortcut {display: inline-block; width: 175px; color: #888888; margin-left: 5px; float: left}

38
lib/help.php Normal file
View File

@@ -0,0 +1,38 @@
<?php include("settings.php");?>
<!DOCTYPE html>
<html>
<head>
<title>ICE Coder - <?php echo $versionNo;?> :: Help & Shortcuts</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<link rel="stylesheet" type="text/css" href="help.css">
</head>
<body class="help">
<h1 id="title">help</h1>
<h2>In file manager</h2>
<span class="key">Delete</span> <span class="shortcut">Delete file</span><br><br>
<h2>Within document</h2>
<span class="key">CTRL <span class="plus">+</span> I</span> <span class="shortcut">Search selected text</span><br>
<span class="key">Esc</span> <span class="shortcut">Comment / uncomment text</span><br>
<span class="key">Tab</span> <span class="shortcut">Insert tab / indent selected text</span><br><br>
<h2>Anywhere</h2>
<span class="key">CTRL <span class="plus">+</span> F</span> <span class="shortcut">Find</span><br>
<span class="key">CTRL <span class="plus">+</span> G</span> <span class="shortcut">Go to line</span><br>
<span class="key">CTRL <span class="plus">+</span> S</span> <span class="shortcut">Save</span><br>
<span class="key">CTRL <span class="plus">+</span> Shift <span class="plus">+</span> S</span> <span class="shortcut">Save as...</span><br>
<span class="key">CTRL <span class="plus">+</span> Enter</span> <span class="shortcut">View webpage</span><br>
<span class="key">CTRL <span class="plus">+</span> S <span class="plus">+</span> Enter</span> <span class="shortcut">Save & create sticky tab</span><br>
<span class="key">Esc</span> <span class="shortcut">Cancel tasks</span><br><br>
<h2>Clicking logo</h2>
<span class="key">Left click</span> <span class="shortcut">Help</span><br>
<span class="key">Right click</span> <span class="shortcut">Settings</span><br>
</body>
</html>

View File

@@ -16,7 +16,7 @@ function generateHash($plainText,$salt=null) {
// Start of settings
// -----------------
$versionNo = "v 0.6.6";
$versionNo = "v 0.6.7";
$codeMirrorDir = "CodeMirror-2.24";
$cMThisVer = 2.24;
$tabsIndent = true;
@@ -26,8 +26,8 @@ $codeAssist = true;
$visibleTabs = false;
$lockedNav = true;
$accountPassword = "";
$restrictedFiles = array("wp-",".php",".asp",".aspx");
$bannedFiles = array("_coder","wp-",".exe",".sql");
$restrictedFiles = array("wp-",".php",".rb",".sql");
$bannedFiles = array("_coder","wp-",".exe");
$allowedIPs = array("*");
$plugins = array(
array("Database Admin","images/database.png","margin-top: 3px","plugins/adminer/adminer-3.3.3-mysql-en.php","_blank",""),
@@ -43,7 +43,7 @@ $lastOpenedFiles = "";
// Update this settings file?
if ($_POST["theme"] && $_SESSION['userLevel'] == 10) {
if (isset($_POST["theme"]) && $_POST["theme"] && $_SESSION['userLevel'] == 10) {
$settingsFile = 'settings.php';
$settingsContents = file_get_contents($settingsFile);
// Replace our lastOpenedFiles var with the the current
@@ -97,7 +97,7 @@ if ($_POST["theme"] && $_SESSION['userLevel'] == 10) {
}
// Save the currently opened files for next time
if ($_GET['saveFiles']) {
if (isset($_GET["saveFiles"]) && $_GET['saveFiles']) {
if ($_SESSION['userLevel'] == 10) {
$settingsFile = 'settings.php';
$settingsContents = file_get_contents($settingsFile);
@@ -110,7 +110,7 @@ if ($_GET['saveFiles']) {
fwrite($fh, $settingsContents);
fclose($fh);
}
echo '<script>top.ICEcoder.serverQueue("del",0);</script>';
echo '<script>top.ICEcoder.serverMessage();top.ICEcoder.serverQueue("del",0);</script>';
}
// Establish our user level
@@ -144,9 +144,9 @@ if ($shortURLStarts[count($shortURLStarts)-1]!="") {$trimArray=1;} else {$trimAr
$shortURLStarts = $shortURLStarts[count($shortURLStarts)-$trimArray];
// If we're updating or calling from the index.php page, do/redo plugins & last opened files
if (($_POST["theme"] && $_SESSION['userLevel'] == 10) || strpos($_SERVER['PHP_SELF'],"index.php")>0) {
if ((isset($_POST["theme"]) && $_POST["theme"] && $_SESSION['userLevel'] == 10) || strpos($_SERVER['PHP_SELF'],"index.php")>0) {
// If we're updating, we need to recreate the plugins array
if ($_POST["theme"] && $_SESSION['userLevel'] == 10) {
if (isset($_POST["theme"]) && $_POST["theme"] && $_SESSION['userLevel'] == 10) {
$plugins = array();
$pluginsArray = explode("====================",str_replace("\"","",str_replace("\r","",str_replace("\n","",$_POST['plugins']))));
for ($i=0;$i<count($pluginsArray);$i++) {
@@ -162,7 +162,7 @@ if (($_POST["theme"] && $_SESSION['userLevel'] == 10) || strpos($_SERVER['PHP_SE
};
// If we're updating, replace the plugin display with our newly established one
if ($_POST["theme"] && $_SESSION['userLevel'] == 10) {
if (isset($_POST["theme"]) && $_POST["theme"] && $_SESSION['userLevel'] == 10) {
echo "<script>top.document.getElementById('pluginsContainer').innerHTML = '".$pluginsDisplay."';</script>";
}
@@ -175,7 +175,7 @@ if (($_POST["theme"] && $_SESSION['userLevel'] == 10) || strpos($_SERVER['PHP_SE
};
// If we're updating our settings, clear existing setIntervals & the array refs, then start new ones
if ($_POST["theme"] && $_SESSION['userLevel'] == 10) {
if (isset($_POST["theme"]) && $_POST["theme"] && $_SESSION['userLevel'] == 10) {
?>
<script>
for (i=0;i<=top.ICEcoder.pluginIntervalRefs.length-1;i++) {
@@ -204,7 +204,7 @@ if ($accountPassword == "" && isset($_GET['settings'])) {
<link rel="stylesheet" type="text/css" href="coder.css">
</head>
<body>
<body style="background-color: #ffffff">
<div class="screenContainer">
<div class="screenVCenter">
@@ -224,7 +224,7 @@ if ($accountPassword == "" && isset($_GET['settings'])) {
</html>
<?php
} else {
// If the password hasn't been set, set it, but only if we're including
// If the password hasn't been set, set it, but only if we're including
// from the index.php file (as this file is included from multiple places)
if ($accountPassword == "" && strpos($_SERVER['PHP_SELF'],"index.php")>0) {
// If we're setting a password