mobile: Fix desktop mode
(plugins would not be reachable)
This commit is contained in:
parent
f1aaad3c22
commit
f2b3f3466e
@ -157,3 +157,9 @@ window.runOnSmartphonesAfterBoot = function() {
|
||||
window.MAX_DRAWN_LINKS = 200;
|
||||
window.MAX_DRAWN_FIELDS = 100;
|
||||
}
|
||||
|
||||
window.useAndroidPanes = function() {
|
||||
// isSmartphone is important to disable panes in desktop mode
|
||||
return (typeof android !== 'undefined' && android && android.addPane && window.isSmartphone());
|
||||
}
|
||||
|
||||
|
@ -948,7 +948,7 @@
|
||||
$('body').append(window.plugin.bookmarks.htmlBkmrksBox);
|
||||
$('#bookmarksBox').css("display", "none").addClass("mobile");
|
||||
|
||||
if(typeof android !== 'undefined' && android && android.addPane)
|
||||
if(window.useAndroidPanes())
|
||||
android.addPane("plugin-bookmarks", "Bookmarks", "ic_action_star");
|
||||
window.addHook('paneChanged', window.plugin.bookmarks.onPaneChanged);
|
||||
|
||||
|
@ -184,7 +184,7 @@ window.plugin.portalcounts.getPortals = function (){
|
||||
var total = self.enlP + self.resP + self.neuP;
|
||||
var title = total + ' ' + (total == 1 ? 'portal' : 'portals');
|
||||
|
||||
if(typeof android !== 'undefined' && android && android.addPane) {
|
||||
if(window.useAndroidPanes()) {
|
||||
$('<div id="portalcounts" class="mobile">'
|
||||
+ '<div class="ui-dialog-titlebar"><span class="ui-dialog-title ui-dialog-title-active">' + title + '</span></div>'
|
||||
+ counts
|
||||
@ -307,7 +307,7 @@ window.plugin.portalcounts.onPaneChanged = function(pane) {
|
||||
};
|
||||
|
||||
var setup = function() {
|
||||
if(typeof android !== 'undefined' && android && android.addPane) {
|
||||
if(window.useAndroidPanes()) {
|
||||
android.addPane("plugin-portalcounts", "Portal counts", "ic_action_data_usage");
|
||||
addHook("paneChanged", window.plugin.portalcounts.onPaneChanged);
|
||||
} else {
|
||||
|
@ -114,7 +114,7 @@ window.plugin.portalslist.displayPL = function() {
|
||||
html = '<table><tr><td>Nothing to show!</td></tr></table>';
|
||||
};
|
||||
|
||||
if(typeof android !== 'undefined' && android && android.addPane) {
|
||||
if(window.useAndroidPanes()) {
|
||||
$('<div id="portalslist" class="mobile">' + html + '</div>').appendTo(document.body);
|
||||
} else {
|
||||
dialog({
|
||||
@ -248,7 +248,7 @@ window.plugin.portalslist.onPaneChanged = function(pane) {
|
||||
};
|
||||
|
||||
var setup = function() {
|
||||
if(typeof android !== 'undefined' && android && android.addPane) {
|
||||
if(window.useAndroidPanes()) {
|
||||
android.addPane("plugin-portalslist", "Portals list", "ic_action_paste");
|
||||
addHook("paneChanged", window.plugin.portalslist.onPaneChanged);
|
||||
} else {
|
||||
|
Loading…
x
Reference in New Issue
Block a user