mirror of
https://github.com/hyperion-project/hyperion.ng.git
synced 2023-10-10 13:36:59 +02:00
Move language selector under setting drop-down saving space
This commit is contained in:
parent
6c7b1813a7
commit
b49ff0e5e2
@ -169,7 +169,6 @@ table label{margin:0}
|
||||
}
|
||||
|
||||
.btn-lang-select {
|
||||
color: #337ab7;
|
||||
background-color: transparent;
|
||||
border-style: none;
|
||||
}
|
||||
|
@ -172,10 +172,21 @@
|
||||
<i class="fa fa-wrench fa-fw"></i> <i class="fa fa-caret-down"></i>
|
||||
</a>
|
||||
<ul class="dropdown-menu dropdown-alerts">
|
||||
|
||||
<!-- /.language selector -->
|
||||
<li id="btn_setlang">
|
||||
<a>
|
||||
<div>
|
||||
<i class="fa fa-globe"></i>
|
||||
<select id="language-select" class="selectpicker" data-width="fit" data-style="btn-lang-select" > </select>
|
||||
</div>
|
||||
</a>
|
||||
</li>
|
||||
<li class="divider"></li>
|
||||
<li id="btn_setaccess">
|
||||
<a>
|
||||
<div>
|
||||
<i class="fa fa-key fa-fw"></i>
|
||||
<i class="fa fa-wrench fa-fw"></i>
|
||||
<span data-i18n="InfoDialog_access_title"></span>
|
||||
</div>
|
||||
</a>
|
||||
@ -191,10 +202,6 @@
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<!-- /.language selector -->
|
||||
<li>
|
||||
<select id="language-select" class="selectpicker" data-width="fit" data-style="btn-lang-select" > </select>
|
||||
</li>
|
||||
|
||||
<!-- /.lock-ui -->
|
||||
<li class="dropdown" id="btn_lock_ui" style="display:none">
|
||||
|
@ -57,17 +57,33 @@ $(document).ready(function () {
|
||||
}); // end cmd-serverinfo
|
||||
|
||||
// Update language
|
||||
$('.selectpicker').on('changed.bs.select',function (e, clickedIndex, isSelected, previousValue){
|
||||
|
||||
var newLang = availLang[clickedIndex];
|
||||
$("#language-select").on('changed.bs.select',function (e, clickedIndex, isSelected, previousValue){
|
||||
var newLang = availLang[clickedIndex-1];
|
||||
if (newLang !== storedLang)
|
||||
{
|
||||
setStorage("langcode", newLang);
|
||||
reload();
|
||||
reload();
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
$("#language-select").selectpicker(
|
||||
{
|
||||
container: 'body', title: availLangText[availLang.indexOf(getStorage("langcode"))]
|
||||
});
|
||||
|
||||
$(".bootstrap-select").click(function () {
|
||||
$(this).addClass("open");
|
||||
});
|
||||
|
||||
$(document).click(function(){
|
||||
$(".bootstrap-select").removeClass("open");
|
||||
});
|
||||
|
||||
$(".bootstrap-select").click(function(e){
|
||||
e.stopPropagation();
|
||||
});
|
||||
|
||||
$(window.hyperion).on("cmd-sessions-update", function (event) {
|
||||
window.serverInfo.sessions = event.response.data;
|
||||
updateSessions();
|
||||
|
Loading…
Reference in New Issue
Block a user