mobile: make portals-list appear appear in nav drawer
This commit is contained in:
parent
235140cbc4
commit
b0d1ec84de
@ -112,6 +112,9 @@ window.plugin.portalslist.displayPL = function() {
|
|||||||
html = '<table><tr><td>Nothing to show!</td></tr></table>';
|
html = '<table><tr><td>Nothing to show!</td></tr></table>';
|
||||||
};
|
};
|
||||||
|
|
||||||
|
if(typeof android !== 'undefined' && android && android.addPane) {
|
||||||
|
$('<div id="portalslist" class="mobile">' + html + '</div>').appendTo(document.body);
|
||||||
|
} else {
|
||||||
dialog({
|
dialog({
|
||||||
html: '<div id="portalslist">' + html + '</div>',
|
html: '<div id="portalslist">' + html + '</div>',
|
||||||
dialogClass: 'ui-dialog-portalslist',
|
dialogClass: 'ui-dialog-portalslist',
|
||||||
@ -119,6 +122,7 @@ window.plugin.portalslist.displayPL = function() {
|
|||||||
id: 'portal-list',
|
id: 'portal-list',
|
||||||
width: 700
|
width: 700
|
||||||
});
|
});
|
||||||
|
}
|
||||||
|
|
||||||
//run the name resolving process
|
//run the name resolving process
|
||||||
//resolvePlayerNames();
|
//resolvePlayerNames();
|
||||||
@ -224,9 +228,23 @@ window.plugin.portalslist.getPortalLink = function(portal,guid) {
|
|||||||
return div;
|
return div;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
window.plugin.portalslist.onPaneChanged = function(pane) {
|
||||||
|
if(pane == "plugin-portalslist")
|
||||||
|
window.plugin.portalslist.displayPL();
|
||||||
|
else
|
||||||
|
$("#portalslist").remove()
|
||||||
|
};
|
||||||
|
|
||||||
var setup = function() {
|
var setup = function() {
|
||||||
|
if(typeof android !== 'undefined' && android && android.addPane) {
|
||||||
|
android.addPane("plugin-portalslist", "Portals list", "ic_action_view_as_list");
|
||||||
|
addHook("paneChanged", window.plugin.portalslist.onPaneChanged);
|
||||||
|
} else {
|
||||||
$('#toolbox').append(' <a onclick="window.plugin.portalslist.displayPL()" title="Display a list of portals in the current view">Portals list</a>');
|
$('#toolbox').append(' <a onclick="window.plugin.portalslist.displayPL()" title="Display a list of portals in the current view">Portals list</a>');
|
||||||
|
}
|
||||||
|
|
||||||
$('head').append('<style>' +
|
$('head').append('<style>' +
|
||||||
|
'#portalslist.mobile {background: transparent; border: 0 none !important; height: 100% !important; width: 100% !important; left: 0 !important; top: 0 !important; position: absolute; overflow: auto; }' +
|
||||||
'#portalslist table {margin-top:5px; border-collapse: collapse; empty-cells: show; width:100%; clear: both;}' +
|
'#portalslist table {margin-top:5px; border-collapse: collapse; empty-cells: show; width:100%; clear: both;}' +
|
||||||
'#portalslist table td, #portalslist table th {border-bottom: 1px solid #0b314e; padding:3px; color:white; background-color:#1b415e}' +
|
'#portalslist table td, #portalslist table th {border-bottom: 1px solid #0b314e; padding:3px; color:white; background-color:#1b415e}' +
|
||||||
'#portalslist table tr.res td { background-color: #005684; }' +
|
'#portalslist table tr.res td { background-color: #005684; }' +
|
||||||
|
Loading…
x
Reference in New Issue
Block a user