cleanups to the toolbox

- remove   - use style sheets to prevent wrapping within links
- make more consistant with the cleanups made to the .linkdetails links
for #135
This commit is contained in:
Jon Atkins 2013-04-13 21:45:30 +01:00
parent 99d52dad8a
commit f2dfeb29bb
6 changed files with 12 additions and 10 deletions

View File

@ -89,8 +89,9 @@ document.getElementsByTagName('body')[0].innerHTML = ''
+ ' <div id="portaldetails"></div>' + ' <div id="portaldetails"></div>'
+ ' <input id="redeem" placeholder="Redeem code…" type="text"/>' + ' <input id="redeem" placeholder="Redeem code…" type="text"/>'
+ ' <div id="toolbox">' + ' <div id="toolbox">'
+ ' <a onmouseover="setPermaLink(this)" onclick="setPermaLink(this);return androidCopy(this.href)" >Permalink</a>' + ' <a onmouseover="setPermaLink(this)" onclick="setPermaLink(this);return androidCopy(this.href)" title="URL link to this map view">Permalink</a>'
+ ' <a onclick="window.aboutIITC()" style="cursor: help">About&nbsp;IITC</a></div>' + ' <a onclick="window.aboutIITC()" style="cursor: help">About IITC</a>'
+ ' </div>'
+ ' </div>' + ' </div>'
+ '</div>' + '</div>'
+ '<div id="updatestatus"></div>' + '<div id="updatestatus"></div>'

View File

@ -23,7 +23,7 @@ if(typeof window.plugin !== 'function') window.plugin = function() {};
window.plugin.guessPlayerLevels = function() {}; window.plugin.guessPlayerLevels = function() {};
window.plugin.guessPlayerLevels.setupCallback = function() { window.plugin.guessPlayerLevels.setupCallback = function() {
$('#toolbox').append(' <a onclick="window.plugin.guessPlayerLevels.guess()">Guess&nbsp;player&nbsp;levels</a>'); $('#toolbox').append(' <a onclick="window.plugin.guessPlayerLevels.guess()" title="Show player level guesses based on resonator placement in displayed portals">Guess player levels</a>');
addHook('portalAdded', window.plugin.guessPlayerLevels.extractPortalData); addHook('portalAdded', window.plugin.guessPlayerLevels.extractPortalData);
} }

View File

@ -99,7 +99,7 @@ window.plugin.portalcounts.getPortals = function(){
} }
var setup = function() { var setup = function() {
$('#toolbox').append(' <a onclick="window.plugin.portalcounts.getPortals()">Portal&sbsp;counts</a>'); $('#toolbox').append(' <a onclick="window.plugin.portalcounts.getPortals()" title="Display a summary of portals in the current view">Portal counts</a>');
$('head').append('<style>' + $('head').append('<style>' +
'#portalcounts table {margin-top:5px; border-collapse: collapse; empty-cells: show; width:100%; clear: both;}' + '#portalcounts table {margin-top:5px; border-collapse: collapse; empty-cells: show; width:100%; clear: both;}' +
'#portalcounts table td, #portalcounts table th {border-bottom: 1px solid #0b314e; padding:3px; color:white; background-color:#1b415e}' + '#portalcounts table td, #portalcounts table th {border-bottom: 1px solid #0b314e; padding:3px; color:white; background-color:#1b415e}' +

View File

@ -403,7 +403,7 @@ window.plugin.portalslist.getPortalLink = function(portal,guid) {
} }
var setup = function() { var setup = function() {
$('#toolbox').append(' <a onclick="window.plugin.portalslist.displayPL(0)">Portals&nbsp;list</a>'); $('#toolbox').append(' <a onclick="window.plugin.portalslist.displayPL(0)" title="Display a list of portals in the current view">Portals list</a>');
$('head').append('<style>' + $('head').append('<style>' +
'.ui-dialog-portalslist {position: absolute !important; top: 10px !important; left: 30px !important;max-width:800px !important; width:733px !important;}' + '.ui-dialog-portalslist {position: absolute !important; top: 10px !important; left: 30px !important;max-width:800px !important; width:733px !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;}' +

View File

@ -389,7 +389,7 @@ window.plugin.scoreboard.fieldArea = function(field) {
} }
var setup = function() { var setup = function() {
$('#toolbox').append(' <a onclick="window.plugin.scoreboard.display()">Scoreboard</a>'); $('#toolbox').append(' <a onclick="window.plugin.scoreboard.display()" title="Display a scoreboard per team for the current view">Scoreboard</a>');
$('head').append('<style>' + $('head').append('<style>' +
'.ui-dialog-scoreboard {max-width:600px !important; width:600px !important;}' + '.ui-dialog-scoreboard {max-width:600px !important; width:600px !important;}' +
'#scoreboard table {margin-top:10px; border-collapse: collapse; empty-cells: show; width:100%; clear: both;}' + '#scoreboard table {margin-top:10px; border-collapse: collapse; empty-cells: show; width:100%; clear: both;}' +

View File

@ -621,13 +621,14 @@ h3 {
#toolbox { #toolbox {
padding: 2px; font-size: 12px;
font-size:90%; text-align: left; /* centre didn't look as nice here as it did above in .linkdetails */
} }
#toolbox > a { #toolbox > a {
padding: 2px; margin-left: 5px;
padding-right:6px; margin-right: 5px;
white-space: nowrap;
} }
/* a common portal display takes this much space (prevents moving /* a common portal display takes this much space (prevents moving