forked from 0x2620/pandora
only create rightPanel if section is items
This commit is contained in:
parent
a739033aaf
commit
3c87a63420
2 changed files with 6 additions and 11 deletions
|
@ -14,14 +14,16 @@ pandora.ui.mainPanel = function() {
|
||||||
+ Ox.SYMBOLS.SHIFT + 'S</span>'
|
+ Ox.SYMBOLS.SHIFT + 'S</span>'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
element: pandora.$ui.rightPanel = pandora.ui.rightPanel()
|
element: pandora.user.ui.section == 'items' ? pandora.$ui.rightPanel = pandora.ui.rightPanel()
|
||||||
|
: pandora.user.ui.section == 'edits' ? pandora.$ui.editPanel = pandora.ui.editPanel()
|
||||||
|
: pandora.$ui.textPanel = pandora.ui.textPanel()
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
orientation: 'horizontal'
|
orientation: 'horizontal'
|
||||||
})
|
})
|
||||||
.bindEvent({
|
.bindEvent({
|
||||||
pandora_edit: function(data) {
|
pandora_edit: function(data) {
|
||||||
that.replaceElement(1, pandora.$ui.rightPanel = pandora.ui.rightPanel());
|
that.replaceElement(1, pandora.$ui.editPanel = pandora.ui.editPanel());
|
||||||
},
|
},
|
||||||
pandora_find: function() {
|
pandora_find: function() {
|
||||||
var previousUI = pandora.UI.getPrevious();
|
var previousUI = pandora.UI.getPrevious();
|
||||||
|
@ -83,7 +85,7 @@ pandora.ui.mainPanel = function() {
|
||||||
data.value == that.options('elements')[0].collapsed && that.toggle(0);
|
data.value == that.options('elements')[0].collapsed && that.toggle(0);
|
||||||
},
|
},
|
||||||
pandora_text: function(data) {
|
pandora_text: function(data) {
|
||||||
that.replaceElement(1, pandora.$ui.rightPanel = pandora.ui.rightPanel());
|
that.replaceElement(1, pandora.$ui.textPanel = pandora.ui.textPanel());
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
return that;
|
return that;
|
||||||
|
|
|
@ -3,9 +3,7 @@
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
pandora.ui.rightPanel = function() {
|
pandora.ui.rightPanel = function() {
|
||||||
var that;
|
var that = Ox.SplitPanel({
|
||||||
if (pandora.user.ui.section == 'items') {
|
|
||||||
that = Ox.SplitPanel({
|
|
||||||
elements: [
|
elements: [
|
||||||
{
|
{
|
||||||
element: pandora.$ui.toolbar = pandora.ui.toolbar(),
|
element: pandora.$ui.toolbar = pandora.ui.toolbar(),
|
||||||
|
@ -61,11 +59,6 @@ pandora.ui.rightPanel = function() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
} else if (pandora.user.ui.section == 'texts') {
|
|
||||||
that = pandora.$ui.textPanel = pandora.ui.textPanel();
|
|
||||||
} else if (pandora.user.ui.section == 'edits') {
|
|
||||||
that = pandora.$ui.editPanel = pandora.ui.editPanel();
|
|
||||||
}
|
|
||||||
return that;
|
return that;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue