update entities dialog (handle instances w/o entities)
This commit is contained in:
parent
50fcb08a86
commit
ddf9b90f70
1 changed files with 11 additions and 5 deletions
|
@ -8,9 +8,10 @@ pandora.ui.entitiesDialog = function(options) {
|
||||||
dialogWidth = Math.round(window.innerWidth * 0.9),
|
dialogWidth = Math.round(window.innerWidth * 0.9),
|
||||||
|
|
||||||
selected = [],
|
selected = [],
|
||||||
type = pandora.site.entities[0].id,
|
|
||||||
|
|
||||||
ui = pandora.user.ui,
|
ui = pandora.user.ui,
|
||||||
|
type = ui.entitiesType || (
|
||||||
|
pandora.site.entities.length ? pandora.site.entities[0].id : ''
|
||||||
|
),
|
||||||
|
|
||||||
$entitiesSelect = Ox.Select({
|
$entitiesSelect = Ox.Select({
|
||||||
items: pandora.site.entities.map(function(type) {
|
items: pandora.site.entities.map(function(type) {
|
||||||
|
@ -23,7 +24,6 @@ pandora.ui.entitiesDialog = function(options) {
|
||||||
})
|
})
|
||||||
.bindEvent({
|
.bindEvent({
|
||||||
change: function(data) {
|
change: function(data) {
|
||||||
Ox.print('@@@@', data);
|
|
||||||
type = data.value;
|
type = data.value;
|
||||||
pandora.UI.set({entitiesType: type});
|
pandora.UI.set({entitiesType: type});
|
||||||
$list.reloadList();
|
$list.reloadList();
|
||||||
|
@ -221,7 +221,7 @@ pandora.ui.entitiesDialog = function(options) {
|
||||||
resize: updateForm
|
resize: updateForm
|
||||||
}),
|
}),
|
||||||
|
|
||||||
$content = Ox.SplitPanel({
|
$content = pandora.site.entities.length ? Ox.SplitPanel({
|
||||||
elements: [
|
elements: [
|
||||||
{
|
{
|
||||||
element: $listPanel,
|
element: $listPanel,
|
||||||
|
@ -240,7 +240,13 @@ pandora.ui.entitiesDialog = function(options) {
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
orientation: 'horizontal'
|
orientation: 'horizontal'
|
||||||
}),
|
}) : Ox.Element()
|
||||||
|
.css({
|
||||||
|
fontSize: '12px',
|
||||||
|
paddingTop: '32px',
|
||||||
|
textAlign: 'center'
|
||||||
|
})
|
||||||
|
.html(Ox._('No entities defined.'))),
|
||||||
|
|
||||||
that = Ox.Dialog({
|
that = Ox.Dialog({
|
||||||
buttons: [
|
buttons: [
|
||||||
|
|
Loading…
Reference in a new issue