mirror of
https://github.com/coolsnowwolf/luci
synced 2025-01-08 11:27:28 +08:00
luci-theme-design: Bump version to v5.6.3-20230404 (#212)
This commit is contained in:
parent
1cae4d198a
commit
f5a2667137
@ -8,8 +8,7 @@ include $(TOPDIR)/rules.mk
|
||||
LUCI_TITLE:=Design Theme
|
||||
LUCI_DEPENDS:=
|
||||
|
||||
PKG_VERSION:=5.5.6
|
||||
PKG_RELEASE:=20230321
|
||||
PKG_VERSION:=5.6.3-20230404
|
||||
|
||||
include ../../luci.mk
|
||||
|
||||
|
File diff suppressed because one or more lines are too long
@ -1,12 +1,20 @@
|
||||
(function($){$(".main > .loading").fadeOut();function trimText(text){return text.replace(/[ \t\n\r]+/g," ");}
|
||||
var lastNode=undefined;var mainNodeName=undefined;var nodeUrl="";(function(node){if(node[0]=="admin"){luciLocation=[node[1],node[2]];}else{luciLocation=node;}
|
||||
for(var i in luciLocation){nodeUrl+=luciLocation[i];if(i!=luciLocation.length-1){nodeUrl+="/";}}})(luciLocation);function getCurrentNodeByUrl(){var ret=false;if(!$('body').hasClass('logged-in')){luciLocation=["Main","Login"];return true;}
|
||||
$(".main > .main-left > .nav > .slide > .active").next(".slide-menu").stop(true).slideUp("fast");$(".main > .main-left > .nav > .slide > .menu").removeClass("active");$(".main > .main-left > .nav > .slide > .menu").each(function(){var ulNode=$(this);ulNode.next().find("a").each(function(){var that=$(this);var href=that.attr("href");if(new RegExp(nodeUrl+"$").test(href)){ulNode.click();ulNode.next(".slide-menu").stop(true,true);lastNode=that.parent();lastNode.addClass("active");ret=true;return true;}});});return ret;}
|
||||
for(var i in luciLocation){nodeUrl+=luciLocation[i];if(i!=luciLocation.length-1){nodeUrl+="/";}}})(luciLocation);function getCurrentNodeByUrl(){if(!$('body').hasClass('logged-in')){luciLocation=["Main","Login"];return true;}
|
||||
const urlReg=new RegExp(nodeUrl+"$")
|
||||
var ret=false;$(".main > .main-left > .nav > .slide > .active").next(".slide-menu").stop(true).slideUp("fast");$(".main > .main-left > .nav > .slide > .menu").removeClass("active");$(".main > .main-left > .nav > .slide > .menu").each(function(){var ulNode=$(this);ulNode.next().find("a").each(function(){var that=$(this);var href=that.attr("href");if(urlReg.test(href)){ulNode.click();ulNode.next(".slide-menu").stop(true,true);lastNode=that.parent();lastNode.addClass("active");ret=true;return true;}});});return ret;}
|
||||
$(".main > .main-left > .nav > .slide > .menu").click(function(){var ul=$(this).next(".slide-menu");var menu=$(this);if(!menu.hasClass("exit")){$(".main > .main-left > .nav > .slide > .active").next(".slide-menu").stop(true).slideUp("fast");$(".main > .main-left > .nav > .slide > .menu").removeClass("active");if(!ul.is(":visible")){menu.addClass("active");ul.addClass("active");ul.stop(true).slideDown("fast");}else{ul.stop(true).slideUp("fast",function(){menu.removeClass("active");ul.removeClass("active");});}
|
||||
return false;}});if($("#cbi-dhcp-lan-ignore").length>0){observer.observe(document.getElementById("cbi-dhcp-lan-ignore"),{subtree:true,attributes:true});}
|
||||
$(".main > .main-left > .nav > .slide > .slide-menu > li > a").click(function(){if(lastNode!=undefined)
|
||||
lastNode.removeClass("active");$(this).parent().addClass("active");$(".main > .loading").fadeIn("fast");return true;});$(".main > .main-left > .nav > .slide > .slide-menu > li").click(function(){if(lastNode!=undefined)
|
||||
lastNode.removeClass("active");$(this).addClass("active");$(".main > .loading").fadeIn("fast");window.location=$($(this).find("a")[0]).attr("href");return false;});if(getCurrentNodeByUrl()){mainNodeName="node-"+luciLocation[0]+"-"+luciLocation[1];mainNodeName=mainNodeName.replace(/[ \t\n\r\/]+/g,"_").toLowerCase();$("body").addClass(mainNodeName);}
|
||||
$(".cbi-button-up").val("");$(".cbi-button-down").val("");$("#maincontent > .container").find("a").each(function(){var that=$(this);var onclick=that.attr("onclick");if(onclick==undefined||onclick==""){that.click(function(){var href=that.attr("href");if(href.indexOf("#")==-1){$(".main > .loading").fadeIn("fast");return true;}});}});var showSide=false;$(".showSide").click(function(){if(showSide){$(".darkMask").stop(true).fadeOut("fast");$(".main-left").stop(true).animate({width:"0"},"fast");$(".main-right").css("overflow-y","auto");showSide=false;}else{$(".darkMask").stop(true).fadeIn("fast");$(".main-left").stop(true).animate({width:"17rem"},"fast");$(".main-right").css("overflow-y","hidden");$(".showSide").css("display","none");$("header").css("box-shadow","17rem 2px 4px rgb(0 0 0 / 8%)")
|
||||
showSide=true;}});$(".darkMask").click(function(){if(showSide){showSide=false;$(".darkMask").stop(true).fadeOut("fast");$(".main-left").stop(true).animate({width:"0"},"fast");$(".main-right").css("overflow-y","auto");$(".showSide").css("display","");$("header").css("box-shadow","0 2px 4px rgb(0 0 0 / 8%)")}});$(window).resize(function(){if($(window).width()>992){$(".showSide").css("display","");$(".main-left").css("width","");$(".darkMask").stop(true);$(".darkMask").css("display","none");showSide=false;$("header").css("box-shadow","17rem 2px 4px rgb(0 0 0 / 8%)")}else{$("header").css("box-shadow","0 2px 4px rgb(0 0 0 / 8%)")}
|
||||
if(showSide){$("header").css("box-shadow","17rem 2px 4px rgb(0 0 0 / 8%)")}});$("legend").each(function(){var that=$(this);that.after("<span class='panel-title'>"+that.text()+"</span>");});$(".main-right").focus();$(".main-right").blur();$("input").attr("size","0");if(mainNodeName!=undefined){switch(mainNodeName){case "node-status-system_log":case "node-status-kernel_log":$("#syslog").focus(function(){$("#syslog").blur();$(".main-right").focus();$(".main-right").blur();});break;case "node-status-firewall":var button=$(".node-status-firewall > .main fieldset li > a");button.addClass("cbi-button cbi-button-reset a-to-btn");break;case "node-system-reboot":var button=$(".node-system-reboot > .main > .main-right p > a");button.addClass("cbi-button cbi-input-reset a-to-btn");break;}}})(jQuery);
|
||||
$(".cbi-button-up").val("");$(".cbi-button-down").val("");$("#maincontent > .container").find("a").each(function(){var that=$(this);var onclick=that.attr("onclick");if(onclick==undefined||onclick==""){that.click(function(){var href=that.attr("href");if(href.indexOf("#")==-1){$(".main > .loading").fadeIn("fast");return true;}});}});var showSide=false;$(".showSide").click(function(){if(showSide){$(".darkMask").stop(true).fadeOut("fast");$(".main-left").stop(true).animate({width:"0"},"fast");$(".main-right").css("overflow-y","auto");$("header>.container>.brand").css("padding","0 4.5rem")
|
||||
showSide=false;}else{$(".darkMask").stop(true).fadeIn("fast");$(".main-left").stop(true).animate({width:"18rem"},"fast");$(".main-right").css("overflow-y","hidden");$(".showSide").css("display","none");$("header").css("box-shadow","18rem 2px 4px rgb(0 0 0 / 8%)")
|
||||
$("header>.container>.brand").css("padding",'0rem')
|
||||
showSide=true;}});$(".darkMask").click(function(){if(showSide){$(".darkMask").stop(true).fadeOut("fast");$(".main-left").stop(true).animate({width:"0"},"fast");$(".main-right").css("overflow-y","auto");$(".showSide").css("display","");$("header").css("box-shadow","0 2px 4px rgb(0 0 0 / 8%)")
|
||||
$("header>.container>.brand").css("padding","0 4.5rem")
|
||||
showSide=false;}});$(window).resize(function(){if($(window).width()>992){showSide=false;$(".showSide").css("display","");$(".main-left").css("width","");$(".darkMask").stop(true);$(".darkMask").css("display","none");$("header").css("box-shadow","18rem 2px 4px rgb(0 0 0 / 8%)")
|
||||
$("header>.container>.brand").css("padding",'0rem')}else{$("header").css("box-shadow","0 2px 4px rgb(0 0 0 / 8%)")
|
||||
$("header>.container>.brand").css("padding","0 4.5rem")}
|
||||
if(showSide){$("header").css("box-shadow","18rem 2px 4px rgb(0 0 0 / 8%)")
|
||||
$("header>.container>.brand").css("padding",'0rem')}});$("legend").each(function(){var that=$(this);that.after("<span class='panel-title'>"+that.text()+"</span>");});$(".main-right").focus();$(".main-right").blur();$("input").attr("size","0");if(mainNodeName!=undefined){switch(mainNodeName){case "node-status-system_log":case "node-status-kernel_log":$("#syslog").focus(function(){$("#syslog").blur();$(".main-right").focus();$(".main-right").blur();});break;case "node-status-firewall":var button=$(".node-status-firewall > .main fieldset li > a");button.addClass("cbi-button cbi-button-reset a-to-btn");break;case "node-system-reboot":var button=$(".node-system-reboot > .main > .main-right p > a");button.addClass("cbi-button cbi-input-reset a-to-btn");break;}}})(jQuery);
|
||||
|
@ -7,6 +7,9 @@
|
||||
luci-theme-neobird
|
||||
Copyright 2021 2smile <thinktip@gmail.com>
|
||||
|
||||
luci-theme-design
|
||||
Copyright 2023 gngpp <gngppz@gmail.com>
|
||||
|
||||
Have a bug? Please create an issue here on GitHub!
|
||||
https://github.com/LuttyYang/luci-theme-material/issues
|
||||
|
||||
@ -38,7 +41,7 @@
|
||||
<% if #categories > 1 then %>
|
||||
<ul class="breadcrumb pull-right" id="modemenu">
|
||||
<% for i, r in ipairs(categories) do %>
|
||||
<li<% if request[1] == r then %> class="active"<%end%>><a href="<%=controller%>/<%=r%>/"><%=striptags(translate(tree.nodes[r].title))%></a> <span class="divider">|</span></li>
|
||||
<li<% if category == r then %> class="active"<%end%>><a href="<%=controller%>/<%=r%>/"><%=striptags(translate(tree.nodes[r].title))%></a> <span class="divider">|</span></li>
|
||||
<% end %>
|
||||
</ul>
|
||||
<% end %>
|
||||
|
@ -224,6 +224,11 @@
|
||||
<span class="showSide"></span>
|
||||
<a class="brand" href="#"><%=boardinfo.hostname or "OpenWrt"%></a>
|
||||
<div class="pull-right">
|
||||
<script>
|
||||
if ($(window).width() > 992) {
|
||||
$("header>.container>.brand").css("padding", "0 0px")
|
||||
}
|
||||
</script>
|
||||
<%
|
||||
-- calculate the number of unsaved changes
|
||||
if tree.nodes[category] and tree.nodes[category].ucidata then
|
||||
@ -237,11 +242,21 @@
|
||||
end
|
||||
%>
|
||||
<% if ucichanges > 0 then %>
|
||||
<a id="notice_status" class="label notice" href="<%=url(category, 'uci/changes')%>?redir=<%=http.urlencode(http.formvalue('redir') or table.concat(disp.context.request, "/"))%>"><%=translate('Unsaved Changes')%>: <%=ucichanges%></a>
|
||||
<style>
|
||||
.notice:after {
|
||||
content: "<%=ucichanges%>";
|
||||
font-size: 0.8rem;
|
||||
font-family: Tahoma;
|
||||
position: absolute;
|
||||
top: -5px;
|
||||
font-weight: normal !important;
|
||||
}
|
||||
</style>
|
||||
<a id="notice_status" class="label notice" href="<%=url(category, 'uci/changes')%>?redir=<%=http.urlencode(http.formvalue('redir') or table.concat(disp.context.request, "/"))%>"></a>
|
||||
<% end %>
|
||||
<span id="xhr_poll_status" style="display:none" onclick="XHR.running() ? XHR.halt() : XHR.run()">
|
||||
<span class="label success" id="xhr_poll_status_on"><span id="refresh_on" class="mobile-hide"></span></span>
|
||||
<span class="label" id="xhr_poll_status_off" style="display:none"><span id="refresh_off" class="mobile-hide"></span></span>
|
||||
<span class="label success" id="xhr_poll_status_on"><span id="refresh_on" class="mobile-hide"></span></span>
|
||||
<span class="label" id="xhr_poll_status_off" style="display:none"><span id="refresh_off" class="mobile-hide"></span></span>
|
||||
</span>
|
||||
<% end %>
|
||||
</div>
|
||||
@ -310,4 +325,3 @@
|
||||
</div>
|
||||
<%- end -%>
|
||||
<% if category then subtree("/" .. category .. "/", cattree) end %>
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user