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 {
|
.btn-lang-select {
|
||||||
color: #337ab7;
|
|
||||||
background-color: transparent;
|
background-color: transparent;
|
||||||
border-style: none;
|
border-style: none;
|
||||||
}
|
}
|
||||||
|
@ -172,10 +172,21 @@
|
|||||||
<i class="fa fa-wrench fa-fw"></i> <i class="fa fa-caret-down"></i>
|
<i class="fa fa-wrench fa-fw"></i> <i class="fa fa-caret-down"></i>
|
||||||
</a>
|
</a>
|
||||||
<ul class="dropdown-menu dropdown-alerts">
|
<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">
|
<li id="btn_setaccess">
|
||||||
<a>
|
<a>
|
||||||
<div>
|
<div>
|
||||||
<i class="fa fa-key fa-fw"></i>
|
<i class="fa fa-wrench fa-fw"></i>
|
||||||
<span data-i18n="InfoDialog_access_title"></span>
|
<span data-i18n="InfoDialog_access_title"></span>
|
||||||
</div>
|
</div>
|
||||||
</a>
|
</a>
|
||||||
@ -191,10 +202,6 @@
|
|||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</li>
|
</li>
|
||||||
<!-- /.language selector -->
|
|
||||||
<li>
|
|
||||||
<select id="language-select" class="selectpicker" data-width="fit" data-style="btn-lang-select" > </select>
|
|
||||||
</li>
|
|
||||||
|
|
||||||
<!-- /.lock-ui -->
|
<!-- /.lock-ui -->
|
||||||
<li class="dropdown" id="btn_lock_ui" style="display:none">
|
<li class="dropdown" id="btn_lock_ui" style="display:none">
|
||||||
|
@ -57,9 +57,8 @@ $(document).ready(function () {
|
|||||||
}); // end cmd-serverinfo
|
}); // end cmd-serverinfo
|
||||||
|
|
||||||
// Update language
|
// Update language
|
||||||
$('.selectpicker').on('changed.bs.select',function (e, clickedIndex, isSelected, previousValue){
|
$("#language-select").on('changed.bs.select',function (e, clickedIndex, isSelected, previousValue){
|
||||||
|
var newLang = availLang[clickedIndex-1];
|
||||||
var newLang = availLang[clickedIndex];
|
|
||||||
if (newLang !== storedLang)
|
if (newLang !== storedLang)
|
||||||
{
|
{
|
||||||
setStorage("langcode", newLang);
|
setStorage("langcode", newLang);
|
||||||
@ -68,6 +67,23 @@ $(document).ready(function () {
|
|||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
|
$("#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.hyperion).on("cmd-sessions-update", function (event) {
|
||||||
window.serverInfo.sessions = event.response.data;
|
window.serverInfo.sessions = event.response.data;
|
||||||
updateSessions();
|
updateSessions();
|
||||||
|
Loading…
Reference in New Issue
Block a user