add hasNoDialogOrScreen method
This commit is contained in:
parent
8325d0fc1a
commit
cfa32ef20f
3 changed files with 9 additions and 8 deletions
|
@ -87,7 +87,7 @@ pandora.ui.logsDialog = function() {
|
|||
id: 'text',
|
||||
title: 'Text',
|
||||
tooltip: function(data) {
|
||||
return '<code style="font-size: 11px">' + data.text.replace(/\n\n/g, '<br/>') + '</code>';
|
||||
return '<pre style="font-size: 10px">' + data.text.replace(/\n\n/g, '<br/>') + '</pre>';
|
||||
},
|
||||
visible: true,
|
||||
width: 640
|
||||
|
|
|
@ -139,7 +139,6 @@ pandora.ui.mainMenu = function() {
|
|||
pandora.site.capabilities.canSeeDebugMenu[pandora.user.level]
|
||||
? [
|
||||
{ id: 'debugMenu', title: 'Debug', items: [
|
||||
{ id: 'logs', title: 'View Logs...'},
|
||||
{ id: 'clearcache', title: 'Clear Cache'},
|
||||
{ id: 'reloadapplication', title: 'Reload Application'},
|
||||
{ id: 'resetui', title: 'Reset UI Settings'},
|
||||
|
@ -267,10 +266,6 @@ pandora.ui.mainMenu = function() {
|
|||
pandora.api.resetUI({}, function() {
|
||||
pandora.$ui.appPanel.reload();
|
||||
});
|
||||
} else if (data.id == 'logs') {
|
||||
(pandora.$ui.logsDialog || (
|
||||
pandora.$ui.logsDialog = pandora.ui.logsDialog())
|
||||
).open();
|
||||
} else if (data.id == 'debug') {
|
||||
if(localStorage.debug) {
|
||||
delete localStorage.debug;
|
||||
|
@ -282,7 +277,7 @@ pandora.ui.mainMenu = function() {
|
|||
}
|
||||
},
|
||||
key_control_f: function() {
|
||||
if ($('.OxDialog:visible').length == 0 && $('.OxScreen').length == 0) {
|
||||
if (pandora.hasNoDialogOrScreen()) {
|
||||
pandora.$ui.findInput.focusInput(true);
|
||||
}
|
||||
},
|
||||
|
@ -303,7 +298,7 @@ pandora.ui.mainMenu = function() {
|
|||
pandora.UI.set({showSidebar: !ui.showSidebar});
|
||||
},
|
||||
key_shift_slash: function() {
|
||||
if ($('.OxDialog').length == 0 && $('.OxScreen').length == 0) {
|
||||
if (pandora.hasNoDialogOrScreen()) {
|
||||
pandora.URL.push('/help');
|
||||
}
|
||||
},
|
||||
|
|
|
@ -672,6 +672,12 @@ pandora.getVideoPartsAndPoints = function(durations, points) {
|
|||
return ret;
|
||||
};
|
||||
|
||||
pandora.hasNoDialogOrScreen = function() {
|
||||
return $('.OxDialog:visible').length == 0
|
||||
&& $('.OxFullscreen').length == 0
|
||||
&& $('.OxScreen').length == 0;
|
||||
}
|
||||
|
||||
pandora.isClipView = function(view, item) {
|
||||
if (arguments.length == 0) {
|
||||
item = pandora.user.ui.item;
|
||||
|
|
Loading…
Reference in a new issue