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