IITC Dialog Overhaul, part 2
Core changes * window_management.js => panes.js (clarity, distinction from dialogs) * Make portal preview use dialogs instead of the large preview "window" * Use `open' callback instead of `create' callback for all dialogs * Replace collapse/close buttons with themed buttons inspired by the AP Gain plugin * Dialogs can now gain and lose focus, with changing title bar * Tweak the Poslinks window to use dialogs * Add collapseCallback, expandCallback, collapseExpandCallback, focusCallback, and blurCallback * Fix http <img> in About dialog that caused Chrome to complain Plugin changes * guess-player-level 0.4.1: Use dialogs with titles, typo fix * portal-counts 0.0.8: Use dialogs with titles, typo fix * portals-list 0.0.12: Don't hijack every single dialog onscreen, add titles, typo fix * scoreboard 0.1.8: Use dialogs with titles
This commit is contained in:
@ -19,7 +19,7 @@ window.aboutIITC = function(){
|
||||
+ ' </ul>'
|
||||
+ ' </div>'
|
||||
+ ' <div>'
|
||||
+ ' MapQuest OSM tiles Courtesy of <a href="http://www.mapquest.com/" target="_blank">MapQuest</a> <img src="http://developer.mapquest.com/content/osm/mq_logo.png">'
|
||||
+ ' MapQuest OSM tiles Courtesy of <a href="http://www.mapquest.com/" target="_blank">MapQuest</a> <img src="https://developer.mapquest.com/content/osm/mq_logo.png">'
|
||||
+ ' </div>'
|
||||
+ ' <hr>'
|
||||
+ ' <div>Version: ' + v + '</div>'
|
||||
@ -139,19 +139,23 @@ window.rangeLinkClick = function() {
|
||||
}
|
||||
|
||||
window.showPortalPosLinks = function(lat, lng, name) {
|
||||
var portal_name = '';
|
||||
var encoded_name = '';
|
||||
if(name !== undefined) {
|
||||
portal_name = encodeURIComponent(' (' + name + ')');
|
||||
encoded_name = encodeURIComponent(' (' + name + ')');
|
||||
}
|
||||
if (typeof android !== 'undefined' && android && android.intentPosLink) {
|
||||
android.intentPosLink(lat, lng, portal_name);
|
||||
} else {
|
||||
var qrcode = '<div id="qrcode"></div>';
|
||||
var script = '<script>$(\'#qrcode\').qrcode({text:\'GEO:'+lat+','+lng+'\'});</script>';
|
||||
var gmaps = '<a href="https://maps.google.com/?q='+lat+','+lng+portal_name+'">Google maps</a>';
|
||||
var gmaps = '<a href="https://maps.google.com/?q='+lat+','+lng+encoded_name+'">Google Maps</a>';
|
||||
var osm = '<a href="http://www.openstreetmap.org/?mlat='+lat+'&mlon='+lng+'&zoom=16">OpenStreetMap</a>';
|
||||
var latLng = '<span>'+lat+','+lng +'</span>';
|
||||
alert('<div style="text-align: center;">' + qrcode + script + gmaps + ' ' + osm + '<br />' + latLng + '</div>');
|
||||
var latLng = '<span><' + lat + ',' + lng +'></span>';
|
||||
dialog({
|
||||
html: '<div style="text-align: center;">' + qrcode + script + gmaps + '; ' + osm + '<br />' + latLng + '</div>',
|
||||
title: name,
|
||||
id: 'poslinks'
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user