Compare commits
No commits in common. "e2ea4e3aabfb3970a644965450a49d995fa3a56a" and "fcc27eb900dfa9fabecee48af2670ed2a2872faa" have entirely different histories.
e2ea4e3aab
...
fcc27eb900
3 changed files with 13 additions and 49 deletions
|
|
@ -212,40 +212,11 @@ pandora.ui.embedDialog = function(/*[url, ]callback*/) {
|
||||||
}).join(find.operator);
|
}).join(find.operator);
|
||||||
}
|
}
|
||||||
|
|
||||||
function getData() {
|
|
||||||
var type = $input.type.value(),
|
|
||||||
view = $list.options('selected')[0];
|
|
||||||
return Ox.map($input, function($element, key) {
|
|
||||||
return Ox.contains(Ox.getObjectById(views, view).inputs, key)
|
|
||||||
&& (
|
|
||||||
!Ox.contains(['map', 'calendar'], view)
|
|
||||||
|| ($input.mapMode.value() == 'item' && key != 'find')
|
|
||||||
|| ($input.mapMode.value() == 'find' && key != 'item')
|
|
||||||
)
|
|
||||||
&& $element.value ? $element.value() : void 0;
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
function formatHTML() {
|
function formatHTML() {
|
||||||
var type = $input.type.value(),
|
var type = $input.type.value();
|
||||||
view = $list.options('selected')[0],
|
|
||||||
value = $input.link.value(),
|
|
||||||
data = getData();
|
|
||||||
if (view == 'document') {
|
|
||||||
var prefix = type == 'iframe'
|
|
||||||
? (pandora.site.site.https ? 'https' : 'http')
|
|
||||||
+ '://' + pandora.site.site.url + '/'
|
|
||||||
: '/',
|
|
||||||
page = type == 'iframe' ? 'documents' : 'document',
|
|
||||||
resolution = 480;
|
|
||||||
if (value == '...' || !value.length) {
|
|
||||||
value = '<img src="' + prefix + 'documents/' + data.document + '/' + resolution + 'p.jpg">';
|
|
||||||
}
|
|
||||||
return '<a href="' + prefix + page + '/' + data.document + '">' + value + '</a>';
|
|
||||||
}
|
|
||||||
return type == 'link'
|
return type == 'link'
|
||||||
? '<a href="' + formatURL()
|
? '<a href="' + formatURL()
|
||||||
+ '">' + value
|
+ '">' + $input.link.value()
|
||||||
+ '</a>'
|
+ '</a>'
|
||||||
: '<iframe src="' + formatURL()
|
: '<iframe src="' + formatURL()
|
||||||
+ '" width="' + $input.width.value()
|
+ '" width="' + $input.width.value()
|
||||||
|
|
@ -256,7 +227,15 @@ pandora.ui.embedDialog = function(/*[url, ]callback*/) {
|
||||||
function formatURL() {
|
function formatURL() {
|
||||||
var type = $input.type.value(),
|
var type = $input.type.value(),
|
||||||
view = $list.options('selected')[0],
|
view = $list.options('selected')[0],
|
||||||
data = getData(),
|
data = Ox.map($input, function($element, key) {
|
||||||
|
return Ox.contains(Ox.getObjectById(views, view).inputs, key)
|
||||||
|
&& (
|
||||||
|
!Ox.contains(['map', 'calendar'], view)
|
||||||
|
|| ($input.mapMode.value() == 'item' && key != 'find')
|
||||||
|
|| ($input.mapMode.value() == 'find' && key != 'item')
|
||||||
|
)
|
||||||
|
&& $element.value ? $element.value() : void 0;
|
||||||
|
}),
|
||||||
options = Ox.serialize({
|
options = Ox.serialize({
|
||||||
title: data.title || void 0,
|
title: data.title || void 0,
|
||||||
showTimeline: data.showTimeline || void 0,
|
showTimeline: data.showTimeline || void 0,
|
||||||
|
|
|
||||||
|
|
@ -938,18 +938,6 @@ pandora.ui.mainMenu = function() {
|
||||||
key_control_p: function() {
|
key_control_p: function() {
|
||||||
window.open(document.location.href + '#?print=true', '_blank');
|
window.open(document.location.href + '#?print=true', '_blank');
|
||||||
},
|
},
|
||||||
key_control_e: function() {
|
|
||||||
if (
|
|
||||||
!pandora.hasDialogOrScreen() &&
|
|
||||||
pandora.enableBatchEdit(ui.section)
|
|
||||||
) {
|
|
||||||
if (ui.section == 'documents') {
|
|
||||||
pandora.ui.editDocumentsDialog().open();
|
|
||||||
} else {
|
|
||||||
pandora.ui.editDialog().open();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
key_control_shift_e: function() {
|
key_control_shift_e: function() {
|
||||||
if (
|
if (
|
||||||
!pandora.hasDialogOrScreen() &&
|
!pandora.hasDialogOrScreen() &&
|
||||||
|
|
@ -1179,7 +1167,7 @@ pandora.ui.mainMenu = function() {
|
||||||
return { id: 'itemMenu', title: Ox._('Item'), items: [
|
return { id: 'itemMenu', title: Ox._('Item'), items: [
|
||||||
{ id: 'add', title: Ox._('Add {0}...', [Ox._('Document')]), disabled: !pandora.hasCapability('canAddItems') },
|
{ id: 'add', title: Ox._('Add {0}...', [Ox._('Document')]), disabled: !pandora.hasCapability('canAddItems') },
|
||||||
{ id: 'edit', title: Ox._('Edit {0}...', [Ox._('Document')]), disabled: true /*fixme: !canEdit */ },
|
{ id: 'edit', title: Ox._('Edit {0}...', [Ox._('Document')]), disabled: true /*fixme: !canEdit */ },
|
||||||
{ id: 'batchedit', title: Ox._('Batch Edit {0}...', [Ox._('Documents')]), disabled: !pandora.enableBatchEdit(ui.section), keyboard: 'control e' },
|
{ id: 'batchedit', title: Ox._('Batch Edit {0}...', [Ox._('Documents')]), disabled: !pandora.enableBatchEdit(ui.section), keyboard: 'shift control e' },
|
||||||
{},
|
{},
|
||||||
{ id: 'selectall', title: Ox._('Select All {0}', [listItemsName]), disabled: !canSelect, keyboard: 'control a' },
|
{ id: 'selectall', title: Ox._('Select All {0}', [listItemsName]), disabled: !canSelect, keyboard: 'control a' },
|
||||||
{ id: 'selectnone', title: Ox._('Select None'), disabled: !canSelect, keyboard: 'shift control a' },
|
{ id: 'selectnone', title: Ox._('Select None'), disabled: !canSelect, keyboard: 'shift control a' },
|
||||||
|
|
|
||||||
|
|
@ -312,10 +312,7 @@ if __name__ == "__main__":
|
||||||
run('./manage.py', 'compile_pyc', '-p', '.')
|
run('./manage.py', 'compile_pyc', '-p', '.')
|
||||||
os.chdir(join(base, 'pandora'))
|
os.chdir(join(base, 'pandora'))
|
||||||
diff = get('./manage.py', 'sqldiff', '-a').strip()
|
diff = get('./manage.py', 'sqldiff', '-a').strip()
|
||||||
if diff not in [
|
if diff != '-- No differences':
|
||||||
'-- No differences',
|
|
||||||
'BEGIN;\n-- Model missing for table: cache\nCOMMIT;'
|
|
||||||
]:
|
|
||||||
print('Database has changed, please make a backup and run %s db' % sys.argv[0])
|
print('Database has changed, please make a backup and run %s db' % sys.argv[0])
|
||||||
elif not development:
|
elif not development:
|
||||||
print('pan.do/ra is at the latest release,\nyou can run "%s dev" to update to the development version' % sys.argv[0])
|
print('pan.do/ra is at the latest release,\nyou can run "%s dev" to update to the development version' % sys.argv[0])
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue