make menu entries and shortcuts for advanced find functional
This commit is contained in:
parent
94757187fb
commit
788c122cc7
3 changed files with 23 additions and 8 deletions
|
@ -1,7 +1,7 @@
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<title>We will be back in a moment.</title>
|
<title>We will be back in a moment</title>
|
||||||
<link rel="stylesheet" type="text/css" href="/static/oxjs/build/Ox.UI/css/Ox.UI.css"/>
|
<link rel="stylesheet" type="text/css" href="/static/oxjs/build/Ox.UI/css/Ox.UI.css"/>
|
||||||
<style>
|
<style>
|
||||||
body {
|
body {
|
||||||
|
@ -14,6 +14,6 @@
|
||||||
</head>
|
</head>
|
||||||
<body class="OxThemeModern">
|
<body class="OxThemeModern">
|
||||||
<img src="/static/png/logo256.png" style="width: 256px"/>
|
<img src="/static/png/logo256.png" style="width: 256px"/>
|
||||||
<div style="padding-top: 16px">We will be back in a moment.</div>
|
<div style="padding-top: 16px">We will be back in a moment</div>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
|
@ -111,6 +111,7 @@ pandora.ui.findElement = function() {
|
||||||
findKey = Ox.getObjectById(pandora.site.findKeys, key);
|
findKey = Ox.getObjectById(pandora.site.findKeys, key);
|
||||||
value === '' && Ox.Log('', 'Warning: autocomplete function should never be called with empty value');
|
value === '' && Ox.Log('', 'Warning: autocomplete function should never be called with empty value');
|
||||||
if (findKey.autocomplete) {
|
if (findKey.autocomplete) {
|
||||||
|
Ox.Log('AUTO', '_list/select', pandora.user.ui._list, pandora.$ui.findListSelect.value())
|
||||||
pandora.api.autocomplete({
|
pandora.api.autocomplete({
|
||||||
key: key,
|
key: key,
|
||||||
query: {
|
query: {
|
||||||
|
@ -120,10 +121,7 @@ pandora.ui.findElement = function() {
|
||||||
operator: '&'
|
operator: '&'
|
||||||
},
|
},
|
||||||
range: [0, 20],
|
range: [0, 20],
|
||||||
sort: [{
|
sort: [{key: 'votes', operator: '-'}],
|
||||||
key: 'votes',
|
|
||||||
operator: '-'
|
|
||||||
}],
|
|
||||||
value: value
|
value: value
|
||||||
}, function(result) {
|
}, function(result) {
|
||||||
callback(result.data.items);
|
callback(result.data.items);
|
||||||
|
@ -139,7 +137,11 @@ pandora.ui.findElement = function() {
|
||||||
pandora.$ui.findInput.options(
|
pandora.$ui.findInput.options(
|
||||||
findState.key == 'advanced'
|
findState.key == 'advanced'
|
||||||
? {placeholder: 'Edit Query...', value: ''}
|
? {placeholder: 'Edit Query...', value: ''}
|
||||||
: {placeholder: '', value: findState.value}
|
: {
|
||||||
|
autocomplete: autocompleteFunction(),
|
||||||
|
placeholder: '',
|
||||||
|
value: findState.value
|
||||||
|
}
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
return that;
|
return that;
|
||||||
|
|
|
@ -253,6 +253,10 @@ pandora.ui.mainMenu = function() {
|
||||||
pandora.UI.set({showAnnotations: !ui.showAnnotations});
|
pandora.UI.set({showAnnotations: !ui.showAnnotations});
|
||||||
} else if (data.id == 'showtimeline') {
|
} else if (data.id == 'showtimeline') {
|
||||||
pandora.UI.set({showTimeline: !ui.showTimeline});
|
pandora.UI.set({showTimeline: !ui.showTimeline});
|
||||||
|
} else if (data.id == 'advancedfind') {
|
||||||
|
if (!pandora.hasDialogOrScreen()) {
|
||||||
|
pandora.$ui.filterDialog = pandora.ui.filterDialog().open();
|
||||||
|
}
|
||||||
} else if (data.id == 'titles') {
|
} else if (data.id == 'titles') {
|
||||||
(pandora.$ui.titlesDialog || (
|
(pandora.$ui.titlesDialog || (
|
||||||
pandora.$ui.titlesDialog = pandora.ui.titlesDialog()
|
pandora.$ui.titlesDialog = pandora.ui.titlesDialog()
|
||||||
|
@ -308,7 +312,16 @@ pandora.ui.mainMenu = function() {
|
||||||
},
|
},
|
||||||
key_control_f: function() {
|
key_control_f: function() {
|
||||||
if (!pandora.hasDialogOrScreen()) {
|
if (!pandora.hasDialogOrScreen()) {
|
||||||
|
if (pandora.user.ui._findState.key != 'advanced') {
|
||||||
pandora.$ui.findInput.focusInput(true);
|
pandora.$ui.findInput.focusInput(true);
|
||||||
|
} else {
|
||||||
|
pandora.$ui.filterDialog = pandora.ui.filterDialog().open();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
key_control_shift_f: function() {
|
||||||
|
if (!pandora.hasDialogOrScreen()) {
|
||||||
|
pandora.$ui.filterDialog = pandora.ui.filterDialog().open();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
key_control_shift_w: function() {
|
key_control_shift_w: function() {
|
||||||
|
|
Loading…
Reference in a new issue