mirror of
https://github.com/icecoder/ICEcoder.git
synced 2026-03-03 07:13:59 +01:00
accountLogin and login related items removed
accountLogin removed as an aliasArray to create login param not needed on init function Remove the if & else condition depending on login, this is not done here anymore No need to set login, not there anymore refreshFileManager no longer needs to take action on logging in, user would already be logged in
This commit is contained in:
33
lib/coder.js
33
lib/coder.js
@@ -31,7 +31,7 @@ var ICEcoder = {
|
||||
|
||||
// Set our aliases
|
||||
initAliases: function() {
|
||||
var aliasArray = ["header","files","account","accountLogin","fmLock","filesFrame","editor","tabsBar","findBar","content","footer","nestValid","nestDisplay","charDisplay"];
|
||||
var aliasArray = ["header","files","account","fmLock","filesFrame","editor","tabsBar","findBar","content","footer","nestValid","nestDisplay","charDisplay"];
|
||||
|
||||
// Create our ID aliases
|
||||
for (var i=0;i<aliasArray.length;i++) {
|
||||
@@ -40,21 +40,13 @@ var ICEcoder = {
|
||||
},
|
||||
|
||||
// On load, set the layout and get the nest location
|
||||
init: function(login) {
|
||||
init: function() {
|
||||
// Set layout & the nest location
|
||||
ICEcoder.setLayout();
|
||||
|
||||
// Hide the loading screen
|
||||
// Hide the loading screen & auto open last files?
|
||||
top.document.getElementById('loadingMask').style.visibility = "hidden";
|
||||
|
||||
// If we're logging in, slide the login area to reveal the icons
|
||||
if (login) {
|
||||
top.document.getElementById('accountLogin').style.top = "-50px";
|
||||
setTimeout(function() {top.document.getElementById('accountLoginContainer').style.display = "none";},300);
|
||||
if (top.openLastFiles) {top.ICEcoder.autoOpenFiles()};
|
||||
} else {
|
||||
top.document.getElementsByName('loginPassword')[0].focus();
|
||||
}
|
||||
if (top.openLastFiles) {top.ICEcoder.autoOpenFiles()};
|
||||
|
||||
// Add drag based events to our tabs
|
||||
var tabs = document.querySelectorAll('.tab');
|
||||
@@ -79,7 +71,7 @@ var ICEcoder = {
|
||||
// Apply sizes to various elements of the page
|
||||
headerH = 40, footerH = 30, accountH = 50, tabsBarH = 21, findBarH = 28;
|
||||
this.header.style.width = this.tabsBar.style.width = this.findBar.style.width = winW + "px";
|
||||
this.files.style.width = this.accountLogin.style.width = this.editor.style.left = this.filesW + "px";
|
||||
this.files.style.width = this.editor.style.left = this.filesW + "px";
|
||||
this.account.style.height = this.accountH + "px";
|
||||
this.fmLock.style.marginLeft = (this.filesW-42) + "px";
|
||||
this.filesFrame.style.height = (winH-headerH-accountH-footerH) + "px";
|
||||
@@ -1550,7 +1542,7 @@ var ICEcoder = {
|
||||
},
|
||||
|
||||
// Refresh file manager on demand
|
||||
refreshFileManager: function(loginAttempt) {
|
||||
refreshFileManager: function() {
|
||||
top.document.getElementById('progressBar').style.webkitAnimation = top.document.getElementById('progressBar').style.mozAnimation = '';
|
||||
setTimeout(function () {
|
||||
top.document.getElementById('progressBar').style.webkitAnimation = top.document.getElementById('progressBar').style.mozAnimation = 'fullexpand 10s ease-out';
|
||||
@@ -1561,19 +1553,6 @@ var ICEcoder = {
|
||||
top.ICEcoder.filesFrame.onload = function() {
|
||||
top.ICEcoder.filesFrame.style.opacity="1";
|
||||
top.document.getElementById('loadingMask').style.visibility = "hidden";
|
||||
if (loginAttempt) {
|
||||
if (loginAttempt == "loginOK") {
|
||||
if (top.ICEcoder.openFiles.length==0) {
|
||||
top.ICEcoder.content.style.visibility='visible';
|
||||
top.ICEcoder.content.src = "editor.php";
|
||||
}
|
||||
top.document.getElementById('accountLogin').style.top = "-50px";
|
||||
setTimeout(function() {top.document.getElementById('accountLoginContainer').style.display = "none";},300);
|
||||
if (top.openLastFiles) {top.ICEcoder.autoOpenFiles()};
|
||||
} else {
|
||||
top.ICEcoder.message('Sorry, that\'s not correct.');
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
Reference in New Issue
Block a user