refactor) #left, #right -> #js-left, #js-right

This commit is contained in:
coderaiser 2014-01-20 03:49:36 -05:00
parent 1e6c7cf2c9
commit 590dc58fe5
4 changed files with 15 additions and 14 deletions

View file

@ -276,8 +276,8 @@
else {
p.name = INDEX_PATH,
lPanel = CloudFunc.buildFromJSON(pJSON, FileTemplate, PathTemplate, LinkTemplate),
lList = '<div id=left class=panel>' + lPanel + '</div>' +
'<div id=right class=panel>' + lPanel + '</div>';
lList = '<div id="js-left" class="panel left">' + lPanel + '</div>' +
'<div id="js-right" class="panel right">' + lPanel + '</div>';
main.sendResponse(p, indexProcessing({
additional : lList,

View file

@ -31,7 +31,7 @@ body {
background-color:white;
}
.fm, #left>li, #right>li, .path, .fm-header,
.fm, .left>li, .right>li, .path, .fm-header,
.mini-icon, .name, .size, .owner, .mode, .keyspanel, .cmd-button {
-webkit-user-select : none;
-moz-user-select : none;
@ -167,7 +167,7 @@ body {
font-weight: bold;
}
.left, #left {
.left {
float:left;
}
@ -180,7 +180,7 @@ body {
color: rgb(254,159,224);
}
.right, #right {
.right {
float:right;
}
.panel {
@ -323,7 +323,7 @@ a:hover, a:active {
width:94%;
}
/* если правая панель не помещаеться - прячем её */
#right, .cmd-button#f5, .cmd-button#f6 {
.right, .cmd-button#f5, .cmd-button#f6 {
display: none;
}
}

View file

@ -453,7 +453,7 @@ var Util, DOM, CloudFunc;
* используеться при первом заходе в корень
*/
function getJSONfromFileTable() {
var lLeft = DOM.getById('left'),
var lLeft = DOM.getById('js-left'),
lPath = DOM.getByClass('path')[0].textContent,
lFileTable = {

View file

@ -1499,15 +1499,16 @@ var CloudCmd, Util, DOM, CloudFunc, Dialog;
* @param pPanel_o = {active: true}
*/
this.getPanel = function(pActive) {
var files, panel, id,
current = this.getCurrentFile();
files = current.parentElement;
panel = files.parentElement;
var id = 'js-',
current = this.getCurrentFile(),
files = current.parentElement,
panel = files.parentElement,
isLeft = DOM.isContainClass(panel, 'left');
/* if {active : false} getting passive panel */
if (pActive && !pActive.active) {
id = panel.id === 'left' ? 'right' : 'left';
panel = this.getById(id);
id += isLeft ? 'right' : 'left';
panel = this.getById(id);
}
/* if two panels showed
@ -1515,7 +1516,7 @@ var CloudCmd, Util, DOM, CloudFunc, Dialog;
* panel
*/
if (window.innerWidth < CloudCmd.MIN_ONE_PANEL_WIDTH)
panel = this.getById('left');
panel = this.getById('js-left');
if (!panel)