aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorFriendika <info@friendika.com>2011-03-31 04:57:31 -0700
committerFriendika <info@friendika.com>2011-03-31 04:57:31 -0700
commit08032e04536e67dbf488654a0142350690154c57 (patch)
treebd0fc507e4e25f2f780ea2bc1eaea1a618fb920b /include
parent75ad3219e67b803bebf028b69d59f26c44571b3d (diff)
downloadvolse-hubzilla-08032e04536e67dbf488654a0142350690154c57.tar.gz
volse-hubzilla-08032e04536e67dbf488654a0142350690154c57.tar.bz2
volse-hubzilla-08032e04536e67dbf488654a0142350690154c57.zip
change language dynamically - bound to F8 key
Diffstat (limited to 'include')
-rw-r--r--include/main.js13
-rw-r--r--include/nav.php1
2 files changed, 14 insertions, 0 deletions
diff --git a/include/main.js b/include/main.js
index 750cce74c..18e884b31 100644
--- a/include/main.js
+++ b/include/main.js
@@ -26,6 +26,7 @@
var pr = 0;
var liking = 0;
var in_progress = false;
+ var langSelect = false;
$(document).ready(function() {
$.ajaxSetup({cache: false});
@@ -45,6 +46,18 @@
$('#pause').html('');
}
}
+ // F8 - show/hide language selector
+ if(event.keyCode == '119') {
+ if(langSelect) {
+ langSelect = false;
+ $('#language-selector').hide();
+ }
+ else {
+ langSelect = true;
+ $('#language-selector').show();
+ }
+ }
+
// this is shift-home on FF, but $ on IE, disabling until I figure out why the diff.
// update: incompatible usage of onKeyDown vs onKeyPress
// if(event.keyCode == '36' && event.shiftKey == true) {
diff --git a/include/nav.php b/include/nav.php
index db3b909af..b8b65f84d 100644
--- a/include/nav.php
+++ b/include/nav.php
@@ -16,6 +16,7 @@ function nav(&$a) {
*/
$a->page['nav'] .= '<div id="panel" style="display: none;"></div>' ;
+ $a->page['nav'] .= lang_selector();
/**
*