forked from 0x2620/pandora
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>
|
||||
<html>
|
||||
<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"/>
|
||||
<style>
|
||||
body {
|
||||
|
@ -14,6 +14,6 @@
|
|||
</head>
|
||||
<body class="OxThemeModern">
|
||||
<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>
|
||||
</html>
|
||||
|
|
|
@ -111,6 +111,7 @@ pandora.ui.findElement = function() {
|
|||
findKey = Ox.getObjectById(pandora.site.findKeys, key);
|
||||
value === '' && Ox.Log('', 'Warning: autocomplete function should never be called with empty value');
|
||||
if (findKey.autocomplete) {
|
||||
Ox.Log('AUTO', '_list/select', pandora.user.ui._list, pandora.$ui.findListSelect.value())
|
||||
pandora.api.autocomplete({
|
||||
key: key,
|
||||
query: {
|
||||
|
@ -120,10 +121,7 @@ pandora.ui.findElement = function() {
|
|||
operator: '&'
|
||||
},
|
||||
range: [0, 20],
|
||||
sort: [{
|
||||
key: 'votes',
|
||||
operator: '-'
|
||||
}],
|
||||
sort: [{key: 'votes', operator: '-'}],
|
||||
value: value
|
||||
}, function(result) {
|
||||
callback(result.data.items);
|
||||
|
@ -139,7 +137,11 @@ pandora.ui.findElement = function() {
|
|||
pandora.$ui.findInput.options(
|
||||
findState.key == 'advanced'
|
||||
? {placeholder: 'Edit Query...', value: ''}
|
||||
: {placeholder: '', value: findState.value}
|
||||
: {
|
||||
autocomplete: autocompleteFunction(),
|
||||
placeholder: '',
|
||||
value: findState.value
|
||||
}
|
||||
);
|
||||
};
|
||||
return that;
|
||||
|
|
|
@ -253,6 +253,10 @@ pandora.ui.mainMenu = function() {
|
|||
pandora.UI.set({showAnnotations: !ui.showAnnotations});
|
||||
} else if (data.id == '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') {
|
||||
(pandora.$ui.titlesDialog || (
|
||||
pandora.$ui.titlesDialog = pandora.ui.titlesDialog()
|
||||
|
@ -308,7 +312,16 @@ pandora.ui.mainMenu = function() {
|
|||
},
|
||||
key_control_f: function() {
|
||||
if (!pandora.hasDialogOrScreen()) {
|
||||
pandora.$ui.findInput.focusInput(true);
|
||||
if (pandora.user.ui._findState.key != 'advanced') {
|
||||
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() {
|
||||
|
|
Loading…
Reference in a new issue