Skip to content
This repository has been archived by the owner on Feb 23, 2021. It is now read-only.

Commit

Permalink
Language dropdown fix
Browse files Browse the repository at this point in the history
  • Loading branch information
sunhater committed Aug 19, 2014
1 parent fa2c987 commit 8a9c360
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 10 deletions.
2 changes: 1 addition & 1 deletion cache/base.js

Large diffs are not rendered by default.

18 changes: 12 additions & 6 deletions js/006.jquery.transForm.js
Original file line number Diff line number Diff line change
Expand Up @@ -389,9 +389,12 @@
selected.css({
width: menu.outerWidth() - outerHSpace(selected)
});
el.css({
width: selected.outerWidth() + button.outerWidth()
});
var i = 0;
do {
el.css({
width: selected.outerWidth() + button.outerWidth() + i++
});
} while ((selected.offset().top != button.offset().top) && (i < 10000));
menu.css({
marginTop: el.outerHeight() - 1,
width: el.outerWidth() - outerHSpace(menu)
Expand Down Expand Up @@ -689,9 +692,12 @@
el.attr('label', $(t).attr('label'))
};

info.css({
width: el.innerWidth() - button.outerWidth() - outerHSpace(info)
});
var i = 0;
do {
info.css({
width: el.innerWidth() - button.outerWidth() - outerHSpace(info) - i++
});
} while ((info.offset().top != button.offset().top) && (i < 10000));

$(t).css({
width: el.outerWidth(),
Expand Down
3 changes: 3 additions & 0 deletions js/060.toolbar.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ _.initToolbar = function() {
$('#toolbar a[href="kcact:settings"]').addClass('selected');
$('#settings').show();
_.resize();
$('#lang').transForm();
}

$('#toolbar a[href="kcact:settings"]').click(function () {
Expand All @@ -32,6 +33,8 @@ _.initToolbar = function() {
$.$.kuki.set('displaySettings', "on");
jSettings.show();
_.fixFilesHeight();
if (!jSettings.find('.tf-select #lang').get(0))
$('#lang').transForm();
} else {
$(this).removeClass('selected');
$.$.kuki.set('displaySettings', "off");
Expand Down
3 changes: 0 additions & 3 deletions js/070.settings.js
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,4 @@ _.initLangs = function() {
$('#lang').change(function() {
window.location = _.getURL("browser", this.value) + "&theme=" + encodeURIComponent(_.theme);
});
setTimeout(function() {
$('#lang').transForm();
}, 0);
}

0 comments on commit 8a9c360

Please sign in to comment.