forked from 0x2620/pandora
update entity dialog
This commit is contained in:
parent
3de663dad4
commit
a4b022368e
1 changed files with 25 additions and 2 deletions
|
@ -10,11 +10,34 @@ pandora.ui.entityDialog = function() {
|
||||||
.css({overflowY: 'auto'}),
|
.css({overflowY: 'auto'}),
|
||||||
|
|
||||||
that = Ox.Dialog({
|
that = Ox.Dialog({
|
||||||
|
buttons: (ui.canManageEntities ? [
|
||||||
|
Ox.Button({
|
||||||
|
id: 'edit',
|
||||||
|
title: Ox._('Edit Entity...')
|
||||||
|
})
|
||||||
|
.bindEvent({
|
||||||
|
click: function() {
|
||||||
|
that.close();
|
||||||
|
pandora.$ui.entitiesDialog = pandora.ui.entitiesDialog().open();
|
||||||
|
}
|
||||||
|
}),
|
||||||
|
{}
|
||||||
|
] : []).concat([
|
||||||
|
Ox.Button({
|
||||||
|
id: 'close',
|
||||||
|
title: Ox._('Close')
|
||||||
|
})
|
||||||
|
.bindEvent({
|
||||||
|
click: function() {
|
||||||
|
that.close();
|
||||||
|
}
|
||||||
|
})
|
||||||
|
]),
|
||||||
closeButton: true,
|
closeButton: true,
|
||||||
content: $content,
|
content: $content,
|
||||||
fixedSize: true,
|
fixedSize: true,
|
||||||
focus: false,
|
|
||||||
height: 416,
|
height: 416,
|
||||||
|
keyboard: {escape: 'close'},
|
||||||
padding: 0,
|
padding: 0,
|
||||||
removeOnClose: true,
|
removeOnClose: true,
|
||||||
title: '',
|
title: '',
|
||||||
|
@ -51,7 +74,7 @@ pandora.ui.entityDialog = function() {
|
||||||
}
|
}
|
||||||
|
|
||||||
function setTitle() {
|
function setTitle() {
|
||||||
ui.entity && pandora.api.getEntity({
|
ui.part.entities && pandora.api.getEntity({
|
||||||
id: ui.part.entities
|
id: ui.part.entities
|
||||||
}, function(result) {
|
}, function(result) {
|
||||||
that.options({title: result.data.name});
|
that.options({title: result.data.name});
|
||||||
|
|
Loading…
Reference in a new issue