diff --git a/code/chat.js b/code/chat.js index cf10a99d..7f0a2c64 100644 --- a/code/chat.js +++ b/code/chat.js @@ -522,10 +522,11 @@ window.chat.chooseAnchor = function(t) { chat.needMoreMessages(); } -window.chat.choose = function(name) { - $('#chat, #chatinput, #updatestatus').show(); +window.chat.show = function(name) { + if (!window.isSmartphone) $('#updatestatus').show(); + $('#chat, #chatinput').show(); $('#map').css('visibility', 'hidden'); - + var t = $(''+name+''); window.chat.chooseAnchor(t); } diff --git a/code/debugging.js b/code/debugging.js index 8c40a155..49091d72 100644 --- a/code/debugging.js +++ b/code/debugging.js @@ -48,16 +48,23 @@ window.debug.console = function() { $('#debugconsole').text(); } -window.debug.console.create = function() { - if($('#debugconsole').length) return; - $('#chatcontrols').append('debug'); - $('#chatcontrols a:last').click(function() { +window.debug.console.show = function() { + $('#scrollwrapper, #updatestatus').hide(); + // not displaying the map causes bugs in Leaflet + $('#map').css('visibility', 'hidden'); + $('#chat, #chatinput').show(); + window.debug.console.create(); $('#chatinput mark').css('cssText', 'color: #bbb !important').text('debug:'); $('#chat > div').hide(); $('#debugconsole').show(); $('#chatcontrols .active').removeClass('active'); $(this).addClass('active'); - }); +} + +window.debug.console.create = function() { + if($('#debugconsole').length) return; + $('#chatcontrols').append('debug'); + $('#chatcontrols a:last').click(window.debug.console.show); $('#chat').append('
'); } diff --git a/code/smartphone.js b/code/smartphone.js index 5a1700ed..c6693c1c 100644 --- a/code/smartphone.js +++ b/code/smartphone.js @@ -34,14 +34,6 @@ window.runOnSmartphonesBeforeBoot = function() { + ''); } - // this also matches the expand button, but it is hidden via CSS - $('#chatcontrols a').click(function() { - $('#scrollwrapper, #updatestatus').hide(); - // not displaying the map causes bugs in Leaflet - $('#map').css('visibility', 'hidden'); - $('#chat, #chatinput').show(); - }); - window.smartphone.mapButton = $('map').click(function() { $('#chat, #chatinput, #scrollwrapper').hide(); $('#map').css('visibility', 'visible'); diff --git a/code/window_management.js b/code/window_management.js new file mode 100644 index 00000000..2927aa4f --- /dev/null +++ b/code/window_management.js @@ -0,0 +1,30 @@ +// created to start cleaning up "window" interaction +// +window.show = function(id) { + switch(id) { + case 'full': + window.chat.show('full'); + break; + case 'compact': + window.chat.show('compact'); + break; + case 'public': + window.chat.show('public'); + break; + case 'faction': + window.chat.show('faction'); + break; + case 'debug': + window.debug.console.show(); + break; + case 'map': + window.smartphone.mapButton.click(); + break; + case 'info': + window.smartphone.sideButton.click(); + break; + default: + window.smartphone.mapButton.Click(); + break; + } +} diff --git a/mobile/res/drawable-hdpi/alerts_and_states_warning.png b/mobile/res/drawable-hdpi/alerts_and_states_warning.png new file mode 100644 index 00000000..1fefdd8b Binary files /dev/null and b/mobile/res/drawable-hdpi/alerts_and_states_warning.png differ diff --git a/mobile/res/drawable-mdpi/alerts_and_states_warning.png b/mobile/res/drawable-mdpi/alerts_and_states_warning.png new file mode 100644 index 00000000..a39f97d4 Binary files /dev/null and b/mobile/res/drawable-mdpi/alerts_and_states_warning.png differ diff --git a/mobile/res/drawable-xhdpi/action_settings.png b/mobile/res/drawable-xhdpi/action_settings.png new file mode 100644 index 00000000..09b01483 Binary files /dev/null and b/mobile/res/drawable-xhdpi/action_settings.png differ diff --git a/mobile/res/drawable-xhdpi/alerts_and_states_warning.png b/mobile/res/drawable-xhdpi/alerts_and_states_warning.png new file mode 100644 index 00000000..4f11628f Binary files /dev/null and b/mobile/res/drawable-xhdpi/alerts_and_states_warning.png differ diff --git a/mobile/res/menu/main.xml b/mobile/res/menu/main.xml index 20de94d0..06d7bdb8 100644 --- a/mobile/res/menu/main.xml +++ b/mobile/res/menu/main.xml @@ -90,10 +90,11 @@ android:title="@string/cache_clear">