mirror of
https://github.com/roacn/openwrt-packages.git
synced 2025-01-08 11:57:31 +08:00
🎁 Sync 2022-08-09 10:28
This commit is contained in:
parent
b56e658c63
commit
e14540991f
@ -9,8 +9,8 @@ THEME_NAME:=opentopd
|
||||
THEME_TITLE:=opentopd Theme
|
||||
|
||||
PKG_NAME:=luci-theme-$(THEME_NAME)
|
||||
PKG_VERSION:=1.4.9
|
||||
PKG_RELEASE:=20220220
|
||||
PKG_VERSION:=1.5.0
|
||||
PKG_RELEASE:=20220809
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
|
||||
|
Binary file not shown.
Before Width: | Height: | Size: 294 KiB After Width: | Height: | Size: 237 KiB |
@ -34,16 +34,16 @@
|
||||
var mainNodeName = undefined;
|
||||
|
||||
var nodeUrl = "";
|
||||
(function(node){
|
||||
if (node[0] == "admin"){
|
||||
(function (node) {
|
||||
if (node[0] == "admin") {
|
||||
luciLocation = [node[1], node[2]];
|
||||
}else{
|
||||
} else {
|
||||
luciLocation = node;
|
||||
}
|
||||
|
||||
for(var i in luciLocation){
|
||||
for (var i in luciLocation) {
|
||||
nodeUrl += luciLocation[i];
|
||||
if (i != luciLocation.length - 1){
|
||||
if (i != luciLocation.length - 1) {
|
||||
nodeUrl += "/";
|
||||
}
|
||||
}
|
||||
@ -59,24 +59,7 @@
|
||||
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 (href.indexOf(nodeUrl) != -1) {
|
||||
ulNode.click();
|
||||
ulNode.next(".slide-menu").stop(true, true);
|
||||
lastNode = that.parent();
|
||||
lastNode.addClass("active");
|
||||
ret = true;
|
||||
return true;
|
||||
}
|
||||
});
|
||||
});
|
||||
return ret;
|
||||
}
|
||||
|
||||
@ -102,6 +85,7 @@
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
/**
|
||||
@ -143,6 +127,7 @@
|
||||
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("");
|
||||
@ -250,4 +235,5 @@
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
})(jQuery);
|
||||
|
@ -31,8 +31,7 @@
|
||||
local node = disp.context.dispatched
|
||||
|
||||
local categories = disp.node_childs(tree)
|
||||
|
||||
|
||||
local currentNode = luci.dispatcher.context.path
|
||||
local c = tree
|
||||
local i, r
|
||||
|
||||
@ -107,16 +106,22 @@
|
||||
end
|
||||
end
|
||||
|
||||
local function render_submenu(prefix, node)
|
||||
local function render_submenu(prefix,parent, node)
|
||||
local childs = disp.node_childs(node)
|
||||
if #childs > 0 then
|
||||
write('<ul class="slide-menu">')
|
||||
|
||||
local active = (currentNode[2] == parent) and "active" or ""
|
||||
local display = (currentNode[2] == parent) and 'style="display: block;"' or ""
|
||||
|
||||
write('<ul class="slide-menu %s" %s>' %{
|
||||
active,
|
||||
display
|
||||
})
|
||||
for i, r in ipairs(childs) do
|
||||
local nnode = node.nodes[r]
|
||||
local title = pcdata(striptags(translate(nnode.title)))
|
||||
|
||||
write('<li><a data-title="%s" href="%s">%s</a></li>' %{
|
||||
local subactive = (currentNode[3] == r) and 'class="active"' or ""
|
||||
write('<li %s><a data-title="%s" href="%s">%s</a></li>' %{
|
||||
subactive,
|
||||
title,
|
||||
nodeurl(prefix, r, nnode.query),
|
||||
title
|
||||
@ -137,14 +142,16 @@
|
||||
local grandchildren = disp.node_childs(nnode)
|
||||
|
||||
if #grandchildren > 0 then
|
||||
local active = (currentNode[2] == r) and "active" or ""
|
||||
local title = pcdata(striptags(translate(nnode.title)))
|
||||
local en_title = pcdata(striptags(string.gsub(nnode.title," ","_")))
|
||||
write('<li class="slide"><a class="menu" data-title="%s" href="#">%s</a>' %{
|
||||
write('<li class="slide"><a class="menu %s" data-title="%s" href="#">%s</a>' %{
|
||||
active,
|
||||
en_title,
|
||||
title
|
||||
})
|
||||
|
||||
render_submenu(category .. "/" .. r, nnode)
|
||||
render_submenu(category .. "/" .. r,r, nnode)
|
||||
write('</li>')
|
||||
else
|
||||
local title = pcdata(striptags(translate(nnode.title)))
|
||||
|
Loading…
Reference in New Issue
Block a user