always use ui.part.documents and ui.part.entities, remove ui.document/ui.entity from default config, fixes #2064
This commit is contained in:
parent
0fffc1f497
commit
ea6a79cc10
7 changed files with 9 additions and 20 deletions
|
@ -853,7 +853,6 @@
|
|||
"columnWidth": {}
|
||||
}
|
||||
},
|
||||
"document": "",
|
||||
"documents": {},
|
||||
"documentSize": 256,
|
||||
"documentsSelection": {},
|
||||
|
@ -872,7 +871,6 @@
|
|||
],
|
||||
"editView": "list",
|
||||
"embedSize": 256,
|
||||
"entity": "",
|
||||
"entitiesSelection": {},
|
||||
"entitiesType": "",
|
||||
"filters": [
|
||||
|
|
|
@ -868,7 +868,6 @@
|
|||
"columnWidth": {}
|
||||
}
|
||||
},
|
||||
"document": "",
|
||||
"documents": {},
|
||||
"documentSize": 256,
|
||||
"documentsSelection": {},
|
||||
|
@ -887,7 +886,6 @@
|
|||
],
|
||||
"editView": "list",
|
||||
"embedSize": 256,
|
||||
"entity": "",
|
||||
"entitiesSelection": {},
|
||||
"entitiesType": "",
|
||||
"filters": [
|
||||
|
|
|
@ -753,7 +753,6 @@
|
|||
"columnWidth": {}
|
||||
}
|
||||
},
|
||||
"document": "",
|
||||
"documents": {},
|
||||
"documentSize": 256,
|
||||
"documentsSelection": {},
|
||||
|
@ -772,7 +771,6 @@
|
|||
],
|
||||
"editView": "list",
|
||||
"embedSize": 256,
|
||||
"entity": "",
|
||||
"entitiesSelection": {},
|
||||
"entitiesType": "",
|
||||
"filters": [
|
||||
|
|
|
@ -797,7 +797,6 @@ examples (config.SITENAME.jsonc) that are part of this pan.do/ra distribution.
|
|||
"columnWidth": {}
|
||||
}
|
||||
},
|
||||
"document": "",
|
||||
"documents": {},
|
||||
"documentSize": 256,
|
||||
"documentsSelection": {},
|
||||
|
@ -816,7 +815,6 @@ examples (config.SITENAME.jsonc) that are part of this pan.do/ra distribution.
|
|||
],
|
||||
"editView": "list",
|
||||
"embedSize": 256,
|
||||
"entity": "",
|
||||
"entitiesSelection": {},
|
||||
"entitiesType": "",
|
||||
"filters": [
|
||||
|
|
|
@ -9,7 +9,7 @@ pandora.openDocumentDialog = function(options) {
|
|||
pandora.$ui.documentDialog && options.ids && options.ids.length == 1
|
||||
&& Ox.getObjectById(pandora.$ui.documentDialog.getItems(), options.ids[0])
|
||||
) {
|
||||
pandora.UI.set({document: options.ids[0]});
|
||||
pandora.UI.set({'part.documents': options.ids[0]});
|
||||
} else if (options.ids) {
|
||||
pandora.api.findDocuments({
|
||||
query: {
|
||||
|
@ -80,7 +80,7 @@ pandora.ui.documentDialog = function(options) {
|
|||
})
|
||||
.bindEvent({
|
||||
close: function() {
|
||||
pandora.UI.set({document: ''});
|
||||
pandora.UI.set({'part.documents': ''});
|
||||
delete pandora.$ui.documentDialog;
|
||||
},
|
||||
resize: function(data) {
|
||||
|
@ -95,7 +95,7 @@ pandora.ui.documentDialog = function(options) {
|
|||
{position: $content.getArea().map(Math.round)}
|
||||
);
|
||||
},
|
||||
pandora_document: function(data) {
|
||||
'pandora_part.documents': function(data) {
|
||||
if (data.value) {
|
||||
if (Ox.getObjectById(items, data.value)) {
|
||||
item = Ox.getObjectById(items, data.value);
|
||||
|
@ -109,7 +109,7 @@ pandora.ui.documentDialog = function(options) {
|
|||
}
|
||||
},
|
||||
pandora_item: function(data) {
|
||||
pandora.UI.set({document: ''});
|
||||
pandora.UI.set({'part.documents': ''});
|
||||
}
|
||||
}),
|
||||
|
||||
|
@ -150,12 +150,9 @@ pandora.ui.documentDialog = function(options) {
|
|||
[items.length > 1 ? 'show' : 'hide']()
|
||||
.bindEvent({
|
||||
click: function(data) {
|
||||
var offset = data.id == 'previous' ? -1 : 1;
|
||||
options.index = Ox.mod(options.index + offset, items.length);
|
||||
pandora.$ui[
|
||||
isItemView ? 'documents' : 'documentsDialogPanel'
|
||||
].selectSelected(offset);
|
||||
pandora.UI.set({document: items[options.index].id});
|
||||
].selectSelected(data.id == 'previous' ? -1 : 1);
|
||||
}
|
||||
});
|
||||
|
||||
|
|
|
@ -740,15 +740,15 @@ pandora.ui.documentsPanel = function(options) {
|
|||
);
|
||||
},
|
||||
key_escape: function() {
|
||||
pandora.UI.set({document: ''});
|
||||
pandora.UI.set({'part.documents': ''});
|
||||
},
|
||||
open: openDocuments,
|
||||
openpreview: openDocuments,
|
||||
select: function(data) {
|
||||
pandora.UI.set(
|
||||
'documentsSelection.' + (isItemView ? ui.item : ''),
|
||||
data.ids
|
||||
'documentsSelection.' + (isItemView ? ui.item : ''), data.ids
|
||||
);
|
||||
ui.part.documents && pandora.UI.set('part.documents', data.ids[0]);
|
||||
},
|
||||
sort: function(data) {
|
||||
pandora.UI.set({documentsSort: [data]});
|
||||
|
|
|
@ -55,7 +55,7 @@ pandora.ui.entityDialog = function() {
|
|||
.bindEvent({
|
||||
close: function() {
|
||||
pandora.UI.set({
|
||||
entity: '',
|
||||
'part.entities': '',
|
||||
page: ''
|
||||
});
|
||||
delete pandora.$ui.entityDialog;
|
||||
|
|
Loading…
Reference in a new issue