use icon for language selector instead of hotkey

This commit is contained in:
Friendika 2011-06-05 17:32:56 -07:00
parent 7b02e178a4
commit 4284c6f9ee
5 changed files with 33 additions and 16 deletions

View file

@ -4,7 +4,7 @@ set_time_limit(0);
ini_set('pcre.backtrack_limit', 250000); ini_set('pcre.backtrack_limit', 250000);
define ( 'FRIENDIKA_VERSION', '2.2.1001' ); define ( 'FRIENDIKA_VERSION', '2.2.1002' );
define ( 'DFRN_PROTOCOL_VERSION', '2.21' ); define ( 'DFRN_PROTOCOL_VERSION', '2.21' );
define ( 'DB_UPDATE_VERSION', 1060 ); define ( 'DB_UPDATE_VERSION', 1060 );
@ -2766,6 +2766,7 @@ function unamp($s) {
if(! function_exists('lang_selector')) { if(! function_exists('lang_selector')) {
function lang_selector() { function lang_selector() {
global $lang; global $lang;
$o .= '<div id="lang-select-icon" class="icon language" title="' . t('Select an alternate language') . '" onclick="openClose(\'language-selector\');" ></div>';
$o .= '<div id="language-selector" style="display: none;" >'; $o .= '<div id="language-selector" style="display: none;" >';
$o .= '<form action="" method="post" ><select name="system_language" onchange="this.form.submit();" >'; $o .= '<form action="" method="post" ><select name="system_language" onchange="this.form.submit();" >';
$langs = glob('view/*/strings.php'); $langs = glob('view/*/strings.php');

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.7 KiB

After

Width:  |  Height:  |  Size: 9.2 KiB

View file

@ -47,18 +47,18 @@
$('#pause').html(''); $('#pause').html('');
} }
} }
// F8 - show/hide language selector // // F8 - show/hide language selector
if(event.keyCode == '119') { // if(event.keyCode == '119') {
if(langSelect) { // if(langSelect) {
langSelect = false; // langSelect = false;
$('#language-selector').hide(); // $('#language-selector').hide();
} // }
else { // else {
langSelect = true; // langSelect = true;
$('#language-selector').show(); // $('#language-selector').show();
} // }
} // }
//
// this is shift-home on FF, but $ on IE, disabling until I figure out why the diff. // this is shift-home on FF, but $ on IE, disabling until I figure out why the diff.
// update: incompatible usage of onKeyDown vs onKeyPress // update: incompatible usage of onKeyDown vs onKeyPress
// if(event.keyCode == '36' && event.shiftKey == true) { // if(event.keyCode == '36' && event.shiftKey == true) {

View file

@ -2298,8 +2298,8 @@ a.mail-list-link {
#language-selector { #language-selector {
position: absolute; position: absolute;
top: 0; top: 0px;
left: 0; left: 16px;
} }
#group-members { #group-members {
@ -2403,6 +2403,13 @@ a.mail-list-link {
margin: 5px 0px 0px 0px; margin: 5px 0px 0px 0px;
} }
#lang-select-icon {
cursor: pointer;
position: absolute;
left: 0px;
top: 0px;
}
/** /**
* ICONS * ICONS
@ -2439,6 +2446,7 @@ a.mail-list-link {
.video { background-position: -48px -32px;} .video { background-position: -48px -32px;}
.youtube { background-position: -64px -32px;} .youtube { background-position: -64px -32px;}
.attach { background-position: -80px -32px; } .attach { background-position: -80px -32px; }
.language { background-position: -96px -32px; }
.attachtype { .attachtype {

View file

@ -2319,7 +2319,7 @@ a.mail-list-link {
#language-selector { #language-selector {
position: absolute; position: absolute;
top: 0; top: 0;
left: 0; left: 16px;
} }
@ -2419,6 +2419,13 @@ a.mail-list-link {
margin: 5px 0px 0px 0px; margin: 5px 0px 0px 0px;
} }
#lang-select-icon {
cursor: pointer;
position: absolute;
left: 0px;
top: 0px;
}
/** /**
* ICONS * ICONS
*/ */
@ -2454,6 +2461,7 @@ a.mail-list-link {
.video { background-position: -48px -32px;} .video { background-position: -48px -32px;}
.youtube { background-position: -64px -32px;} .youtube { background-position: -64px -32px;}
.attach { background-position: -80px -32px; } .attach { background-position: -80px -32px; }
.language { background-position: -96px -32px; }
.attachtype { .attachtype {
display: block; width: 20px; height: 23px; display: block; width: 20px; height: 23px;