portals-list. fix so width 800px actually works (style.css forces dialogs to max-width 700px in most cases)

This commit is contained in:
Jon Atkins 2013-07-13 20:02:19 +01:00
parent 0438b71394
commit 154c995f60

View File

@ -2,7 +2,7 @@
// @id iitc-plugin-portals-list@teo96 // @id iitc-plugin-portals-list@teo96
// @name IITC plugin: show list of portals // @name IITC plugin: show list of portals
// @category Info // @category Info
// @version 0.0.14.@@DATETIMEVERSION@@ // @version 0.0.15.@@DATETIMEVERSION@@
// @namespace https://github.com/jonatkins/ingress-intel-total-conversion // @namespace https://github.com/jonatkins/ingress-intel-total-conversion
// @updateURL @@UPDATEURL@@ // @updateURL @@UPDATEURL@@
// @downloadURL @@DOWNLOADURL@@ // @downloadURL @@DOWNLOADURL@@
@ -158,7 +158,8 @@ window.plugin.portalslist.displayPL = function() {
html: '<div id="portalslist">' + html + '</div>', html: '<div id="portalslist">' + html + '</div>',
dialogClass: 'ui-dialog-portalslist', dialogClass: 'ui-dialog-portalslist',
title: 'Portal list: ' + window.plugin.portalslist.listPortals.length + ' ' + (window.plugin.portalslist.listPortals.length == 1 ? 'portal' : 'portals'), title: 'Portal list: ' + window.plugin.portalslist.listPortals.length + ' ' + (window.plugin.portalslist.listPortals.length == 1 ? 'portal' : 'portals'),
id: 'portal-list' id: 'portal-list',
width: 800
}); });
// Setup sorting // Setup sorting
@ -358,7 +359,8 @@ window.plugin.portalslist.getPortalLink = function(portal,guid) {
var setup = function() { var setup = function() {
$('#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>' +
'.ui-dialog-portalslist {max-width: 800px !important; width: auto !important;}' + //style.css sets dialog max-width to 700px - override that here
'#dialog-portal-list {max-width: 800px !important;}' +
'#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; }' +