got rid of redundant code

This commit is contained in:
Philipp Schaefer 2013-10-02 23:40:51 +02:00
parent 7fd3cb7fd6
commit 72620ed668
5 changed files with 3 additions and 11 deletions

View File

@ -540,7 +540,6 @@ window.chat.show = function(name) {
? $('#updatestatus').hide()
: $('#updatestatus').show();
$('#chat, #chatinput').show();
$('#map').css('visibility', 'hidden');
var t = $('<a>'+name+'</a>');
window.chat.chooseAnchor(t);

View File

@ -23,10 +23,6 @@ window.debug.console = function() {
}
window.debug.console.show = function() {
if (window.isSmartphone()) {
$('#scrollwrapper, #updatestatus').hide();
$('#map').css('visibility', 'hidden');
}
$('#chat, #chatinput').show();
window.debug.console.create();
$('#chatinput mark').css('cssText', 'color: #bbb !important').text('debug:');

View File

@ -29,6 +29,6 @@ window.search = function(search) {
northEast = new L.LatLng(b[1], b[3]),
bounds = new L.LatLngBounds(southWest, northEast);
window.map.fitBounds(bounds);
if(window.isSmartphone()) window.smartphone.mapButton.click();
if(window.isSmartphone()) window.show('map');
});
}

View File

@ -35,7 +35,6 @@ window.runOnSmartphonesBeforeBoot = function() {
}
window.smartphone.mapButton = $('<a>map</a>').click(function() {
$('#chat, #chatinput, #scrollwrapper').hide();
$('#map').css('visibility', 'visible');
$('#updatestatus').show();
$('#chatcontrols a .active').removeClass('active');
@ -43,8 +42,6 @@ window.runOnSmartphonesBeforeBoot = function() {
});
window.smartphone.sideButton = $('<a>info</a>').click(function() {
$('#chat, #chatinput, #updatestatus').hide();
$('#map').css('visibility', 'hidden');
$('#scrollwrapper').show();
$('.active').removeClass('active');
$("#chatcontrols a:contains('info')").addClass('active');
@ -112,7 +109,7 @@ window.runOnSmartphonesAfterBoot = function() {
if(!isSmartphone()) return;
console.warn('running smartphone post boot stuff');
smartphone.mapButton.click();
window.show('map');
// add a div/hook for updating mobile info
$('#updatestatus').prepend('<div id="mobileinfo" onclick="show(\'info\')"></div>');

View File

@ -328,7 +328,7 @@ window.rangeLinkClick = function() {
if(window.portalRangeIndicator)
window.map.fitBounds(window.portalRangeIndicator.getBounds());
if(window.isSmartphone())
window.smartphone.mapButton.click();
window.show('map');
}
window.showPortalPosLinks = function(lat, lng, name) {