mirror of
https://github.com/kiddin9/op-packages.git
synced 2026-11-02 21:53:56 +08:00
🌴 Sync 2026-03-05 23:51:42
This commit is contained in:
1 parent
97c049ed0a
commit
0acff03804
14253 files changed
+3893239
No files matched your search
File diff suppressed because it is too large.
Load diff
Binary file not shown.
|
After Width: | Height: | Size: 535 B |
@@ -0,0 +1,3 @@
|
||||
// HTML5 Shiv v3 | @jon_neal @afarkas @rem | MIT/GPL2 Licensed
|
||||
// Uncompressed source: https://github.com/aFarkas/html5shiv
|
||||
(function(a,b){function f(a){var c,d,e,f;b.documentMode>7?(c=b.createElement("font"),c.setAttribute("data-html5shiv",a.nodeName.toLowerCase())):c=b.createElement("shiv:"+a.nodeName);while(a.firstChild)c.appendChild(a.childNodes[0]);for(d=a.attributes,e=d.length,f=0;f<e;++f)d[f].specified&&c.setAttribute(d[f].nodeName,d[f].nodeValue);c.style.cssText=a.style.cssText,a.parentNode.replaceChild(c,a),c.originalElement=a}function g(a){var b=a.originalElement;while(a.childNodes.length)b.appendChild(a.childNodes[0]);a.parentNode.replaceChild(b,a)}function h(a,b){b=b||"all";var c=-1,d=[],e=a.length,f,g;while(++c<e){f=a[c],g=f.media||b;if(f.disabled||!/print|all/.test(g))continue;d.push(h(f.imports,g),f.cssText)}return d.join("")}function i(c){var d=new RegExp("(^|[\\s,{}])("+a.html5.elements.join("|")+")","gi"),e=c.split("{"),f=e.length,g=-1;while(++g<f)e[g]=e[g].split("}"),b.documentMode>7?e[g][e[g].length-1]=e[g][e[g].length-1].replace(d,'$1font[data-html5shiv="$2"]'):e[g][e[g].length-1]=e[g][e[g].length-1].replace(d,"$1shiv\\:$2"),e[g]=e[g].join("}");return e.join("{")}var c=function(a){return a.innerHTML="<x-element></x-element>",a.childNodes.length===1}(b.createElement("a")),d=function(a,b,c){return b.appendChild(a),(c=(c?c(a):a.currentStyle).display)&&b.removeChild(a)&&c==="block"}(b.createElement("nav"),b.documentElement,a.getComputedStyle),e={elements:"abbr article aside audio bdi canvas data datalist details figcaption figure footer header hgroup mark meter nav output progress section summary time video".split(" "),shivDocument:function(a){a=a||b;if(a.documentShived)return;a.documentShived=!0;var f=a.createElement,g=a.createDocumentFragment,h=a.getElementsByTagName("head")[0],i=function(a){f(a)};c||(e.elements.join(" ").replace(/\w+/g,i),a.createElement=function(a){var b=f(a);return b.canHaveChildren&&e.shivDocument(b.document),b},a.createDocumentFragment=function(){return e.shivDocument(g())});if(!d&&h){var j=f("div");j.innerHTML=["x<style>","article,aside,details,figcaption,figure,footer,header,hgroup,nav,section{display:block}","audio{display:none}","canvas,video{display:inline-block;*display:inline;*zoom:1}","[hidden]{display:none}audio[controls]{display:inline-block;*display:inline;*zoom:1}","mark{background:#FF0;color:#000}","</style>"].join(""),h.insertBefore(j.lastChild,h.firstChild)}return a}};e.shivDocument(b),a.html5=e;if(c||!a.attachEvent)return;a.attachEvent("onbeforeprint",function(){if(a.html5.supportsXElement||!b.namespaces)return;b.namespaces.shiv||b.namespaces.add("shiv");var c=-1,d=new RegExp("^("+a.html5.elements.join("|")+")$","i"),e=b.getElementsByTagName("*"),g=e.length,j,k=i(h(function(a,b){var c=[],d=a.length;while(d)c.unshift(a[--d]);d=b.length;while(d)c.unshift(b[--d]);c.sort(function(a,b){return a.sourceIndex-b.sourceIndex}),d=c.length;while(d)c[--d]=c[d].styleSheet;return c}(b.getElementsByTagName("style"),b.getElementsByTagName("link"))));while(++c<g)j=e[c],d.test(j.nodeName)&&f(j);b.appendChild(b._shivedStyleSheet=b.createElement("style")).styleSheet.cssText=k}),a.attachEvent("onafterprint",function(){if(a.html5.supportsXElement||!b.namespaces)return;var c=-1,d=b.getElementsByTagName("*"),e=d.length,f;while(++c<e)f=d[c],f.originalElement&&g(f);b._shivedStyleSheet&&b._shivedStyleSheet.parentNode.removeChild(b._shivedStyleSheet)})})(this,document)
|
||||
@@ -0,0 +1,405 @@
|
||||
header h3 a, header .brand {
|
||||
display:none !important;
|
||||
}
|
||||
|
||||
@media screen and (max-device-width: 600px) {
|
||||
#maincontent.container {
|
||||
margin-top: 30px;
|
||||
}
|
||||
|
||||
.tabs, .cbi-tabmenu {
|
||||
background: linear-gradient(#fff 20%, #ddd 100%);
|
||||
background-size: 1px 34px;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
.tabs > li, .cbi-tabmenu > li {
|
||||
height: 30px;
|
||||
}
|
||||
|
||||
.tabs > li > a, .cbi-tabmenu > li > a {
|
||||
padding: 0 8px;
|
||||
line-height: 30px;
|
||||
}
|
||||
|
||||
.table {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.tr {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
flex-wrap: wrap;
|
||||
align-items: flex-end;
|
||||
border-top: 1px solid #ddd;
|
||||
padding: 5px 0;
|
||||
margin: 0 -3px;
|
||||
}
|
||||
|
||||
.table .th,
|
||||
.table .td,
|
||||
.table .tr::before {
|
||||
flex: 2 2 33%;
|
||||
align-self: flex-start;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
word-wrap: break-word;
|
||||
display: inline-block;
|
||||
border-top: none;
|
||||
padding: 3px;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.table .td.cbi-dropdown-open {
|
||||
overflow: visible;
|
||||
}
|
||||
|
||||
.col-1 { flex: 1 1 30px !important; -webkit-flex: 1 1 30px !important; }
|
||||
.col-2 { flex: 2 2 60px !important; -webkit-flex: 2 2 60px !important; }
|
||||
.col-3 { flex: 3 3 90px !important; -webkit-flex: 3 3 90px !important; }
|
||||
.col-4 { flex: 4 4 120px !important; -webkit-flex: 4 4 120px !important; }
|
||||
.col-5 { flex: 5 5 150px !important; -webkit-flex: 5 5 150px !important; }
|
||||
.col-6 { flex: 6 6 180px !important; -webkit-flex: 6 6 180px !important; }
|
||||
.col-7 { flex: 7 7 210px !important; -webkit-flex: 7 7 210px !important; }
|
||||
.col-8 { flex: 8 8 240px !important; -webkit-flex: 8 8 240px !important; }
|
||||
.col-9 { flex: 9 9 270px !important; -webkit-flex: 9 9 270px !important; }
|
||||
.col-10 { flex: 10 10 300px !important; -webkit-flex: 10 10 300px !important; }
|
||||
|
||||
.td select {
|
||||
word-wrap: normal;
|
||||
}
|
||||
|
||||
.td[data-type="button"],
|
||||
.td[data-type="fvalue"] {
|
||||
flex: 1 1 17%;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
.td.cbi-value-field {
|
||||
align-self: flex-start;
|
||||
}
|
||||
|
||||
.td.cbi-value-field .cbi-button {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.table.cbi-section-table {
|
||||
border: none;
|
||||
background: none;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.tr.table-titles,
|
||||
.cbi-section-table-titles,
|
||||
.cbi-section-table-descr {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.cbi-section-table-row {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
flex-wrap: wrap;
|
||||
margin: 0 0 .5em 0;
|
||||
}
|
||||
|
||||
.cbi-section-table + .cbi-section-create {
|
||||
padding-top: 0;
|
||||
}
|
||||
|
||||
.tr[data-title]::before {
|
||||
display: block;
|
||||
flex: 1 1 100%;
|
||||
background: #f5f5f5 !important;
|
||||
font-size: 16px;
|
||||
border-bottom: 1px solid #ddd;
|
||||
}
|
||||
|
||||
.td[data-title]::before,
|
||||
.td[data-description]::after {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.td[data-title] ~ .td.cbi-section-actions {
|
||||
align-self: flex-start;
|
||||
}
|
||||
|
||||
.td[data-title] ~ .td.cbi-section-actions::before {
|
||||
display: block;
|
||||
content: "\a0";
|
||||
}
|
||||
|
||||
.td.cbi-section-actions {
|
||||
overflow: initial;
|
||||
max-width: 100%;
|
||||
padding: 3px 2px;
|
||||
}
|
||||
|
||||
.hide-sm,
|
||||
.hide-xs {
|
||||
display: none !important;
|
||||
}
|
||||
|
||||
.td.cbi-value-field {
|
||||
flex-basis: 100%;
|
||||
}
|
||||
|
||||
.td.cbi-value-field[data-type="dvalue"] {
|
||||
flex-basis: 50%;
|
||||
}
|
||||
|
||||
.td.cbi-value-field[data-type="button"],
|
||||
.td.cbi-value-field[data-type="fvalue"] {
|
||||
flex-basis: 25%;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
.cbi-section-table .tr:hover .td,
|
||||
.cbi-section-table .tr:hover .th,
|
||||
.cbi-section-table .tr:hover::before {
|
||||
background-color: transparent;
|
||||
}
|
||||
|
||||
.cbi-value {
|
||||
padding-bottom: .5em;
|
||||
border-bottom: 1px solid #ddd;
|
||||
margin-bottom: .5em;
|
||||
}
|
||||
|
||||
.cbi-value label.cbi-value-title {
|
||||
float: none;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.cbi-value-field, .cbi-dropdown {
|
||||
width: 100%;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
input, textarea, select,
|
||||
.cbi-dropdown > ul > li input[type="text"] {
|
||||
font-size: 16px !important;
|
||||
line-height: 28px;
|
||||
height: auto;
|
||||
}
|
||||
|
||||
select, input[type="text"], input[type="password"] {
|
||||
width: 100%;
|
||||
height: 30px;
|
||||
}
|
||||
|
||||
input.cbi-input-password {
|
||||
width: calc(100% - 25px);
|
||||
}
|
||||
|
||||
[data-dynlist] {
|
||||
display: block;
|
||||
}
|
||||
|
||||
[data-dynlist] > .add-item > input {
|
||||
width: calc(100% - 21px);
|
||||
}
|
||||
|
||||
[data-dynlist] > .add-item > .cbi-button {
|
||||
margin-right: -1px;
|
||||
}
|
||||
|
||||
input[type="text"] + .cbi-button,
|
||||
input[type="password"] + .cbi-button,
|
||||
select + .cbi-button {
|
||||
font-size: 14px !important;
|
||||
line-height: 28px;
|
||||
height: 30px;
|
||||
box-sizing: border-box;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
.cbi-value-field input[type="checkbox"],
|
||||
.cbi-value-field input[type="radio"] {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.btn, .cbi-button {
|
||||
font-size: 14px !important;
|
||||
padding: 4px 8px;
|
||||
}
|
||||
|
||||
.actions,
|
||||
.cbi-page-actions {
|
||||
border-top: none;
|
||||
margin-top: -.5em;
|
||||
padding: 8px;
|
||||
}
|
||||
|
||||
[data-page="admin-status-overview"] .cbi-section:nth-of-type(1) .td:first-child,
|
||||
[data-page="admin-status-overview"] .cbi-section:nth-of-type(2) .td:first-child {
|
||||
flex-grow: 1;
|
||||
}
|
||||
|
||||
header .pull-right .label {
|
||||
white-space: normal;
|
||||
display: inline-block;
|
||||
text-align: center;
|
||||
line-height: 12px;
|
||||
margin: 1px 0;
|
||||
}
|
||||
|
||||
header > .fill {
|
||||
padding: 1px;
|
||||
}
|
||||
|
||||
header > .fill > .container {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
}
|
||||
|
||||
header .nav {
|
||||
flex: 3 3 80%;
|
||||
margin: 2px 5px 2px 0;
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
justify-content: flex-start;
|
||||
}
|
||||
|
||||
header .nav a {
|
||||
padding: 2px 6px;
|
||||
}
|
||||
|
||||
header .pull-right {
|
||||
flex: 1 1 20%;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
padding: 0;
|
||||
justify-content: space-around;
|
||||
}
|
||||
|
||||
.menu-dropdown, .dropdown-menu {
|
||||
top: 23px;
|
||||
}
|
||||
|
||||
body {
|
||||
padding-top: 30px;
|
||||
}
|
||||
|
||||
.cbi-optionals,
|
||||
.cbi-section-create {
|
||||
padding: 0 0 14px 0;
|
||||
}
|
||||
|
||||
#cbi-network-switch_vlan .th,
|
||||
#cbi-network-switch_vlan .td {
|
||||
flex-basis: 12%;
|
||||
}
|
||||
|
||||
#cbi-network-switch_vlan .td.cbi-section-actions {
|
||||
flex-basis: 100%;
|
||||
}
|
||||
|
||||
#cbi-network-switch_vlan .td.cbi-section-actions::before {
|
||||
display: none;
|
||||
}
|
||||
|
||||
#cbi-network-switch_vlan .td.cbi-section-actions > * {
|
||||
width: auto;
|
||||
display: block;
|
||||
}
|
||||
|
||||
#wifi_assoclist_table .td,
|
||||
[data-page="admin-status-processes"] .td {
|
||||
flex-basis: 50% !important;
|
||||
}
|
||||
|
||||
[data-page="admin-status-processes"] .td[data-type="button"] {
|
||||
flex-basis: 33% !important;
|
||||
}
|
||||
|
||||
[data-page="admin-status-processes"] .td[data-name="PID"],
|
||||
[data-page="admin-status-processes"] .td[data-name="USER"] {
|
||||
flex-basis: 25% !important;
|
||||
}
|
||||
|
||||
[data-page="admin-system-fstab"] .td[data-type="button"]::before,
|
||||
[data-page="admin-system-startup"] .td[data-type="button"]::before,
|
||||
[data-page="admin-status-processes"] .td[data-type="button"]::before {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
|
||||
@media screen and (max-device-width: 375px) {
|
||||
#maincontent.container {
|
||||
margin-top: 55px;
|
||||
}
|
||||
|
||||
.cbi-page-actions {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
justify-content: space-between;
|
||||
margin: 0 -1px;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.cbi-page-actions .cbi-button:not(.cbi-dropdown) {
|
||||
flex: 1 1 calc(50% - 2px);
|
||||
margin: 1px !important;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
.cbi-page-actions .cbi-button-negative,
|
||||
.cbi-page-actions .cbi-button-primary,
|
||||
.cbi-page-actions .cbi-button-apply {
|
||||
flex-basis: calc(100% - -2px);
|
||||
}
|
||||
|
||||
.cbi-section-actions .cbi-button {
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
body[data-page="admin-network-wireless"] .td.col-2 {
|
||||
max-width: 50px;
|
||||
}
|
||||
|
||||
body[data-page="admin-network-wireless"] .td.col-2 > .ifacebadge {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
body[data-page="admin-network-network"] .td.col-3 {
|
||||
min-width: 250px;
|
||||
}
|
||||
}
|
||||
|
||||
@media screen and (max-device-width: 200px) {
|
||||
#maincontent.container {
|
||||
margin-top: 230px;
|
||||
}
|
||||
}
|
||||
|
||||
@media screen and (max-width: 375px) {
|
||||
.td .ifacebox {
|
||||
width: 100%;
|
||||
margin: 0 !important;
|
||||
flex-direction: row;
|
||||
}
|
||||
|
||||
.td .ifacebox .ifacebox-head {
|
||||
min-width: 25%;
|
||||
justify-content: space-around;
|
||||
}
|
||||
|
||||
.td .ifacebox .ifacebox-head,
|
||||
.td .ifacebox .ifacebox-body {
|
||||
display: flex;
|
||||
border-bottom: none;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.td .ifacebox .ifacebox-head > *,
|
||||
.ifacebox .ifacebox-body > * {
|
||||
margin: .125em;
|
||||
}
|
||||
}
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 15 KiB |
@@ -0,0 +1,118 @@
|
||||
'use strict';
|
||||
'require baseclass';
|
||||
'require ui';
|
||||
|
||||
return baseclass.extend({
|
||||
__init__: function() {
|
||||
ui.menu.load().then(L.bind(this.render, this));
|
||||
},
|
||||
|
||||
render: function(tree) {
|
||||
var node = tree,
|
||||
url = '';
|
||||
|
||||
this.renderModeMenu(tree);
|
||||
|
||||
if (L.env.dispatchpath.length >= 3) {
|
||||
for (var i = 0; i < 3 && node; i++) {
|
||||
node = node.children[L.env.dispatchpath[i]];
|
||||
url = url + (url ? '/' : '') + L.env.dispatchpath[i];
|
||||
}
|
||||
|
||||
if (node)
|
||||
this.renderTabMenu(node, url);
|
||||
}
|
||||
|
||||
document.addEventListener('poll-start', this.handleBodyMargin);
|
||||
document.addEventListener('poll-stop', this.handleBodyMargin);
|
||||
document.addEventListener('uci-new-changes', this.handleBodyMargin);
|
||||
document.addEventListener('uci-clear-changes', this.handleBodyMargin);
|
||||
window.addEventListener('resize', this.handleBodyMargin);
|
||||
|
||||
this.handleBodyMargin();
|
||||
},
|
||||
|
||||
renderTabMenu: function(tree, url, level) {
|
||||
var container = document.querySelector('#tabmenu'),
|
||||
ul = E('ul', { 'class': 'tabs' }),
|
||||
children = ui.menu.getChildren(tree),
|
||||
activeNode = null;
|
||||
|
||||
for (var i = 0; i < children.length; i++) {
|
||||
var isActive = (L.env.dispatchpath[3 + (level || 0)] == children[i].name),
|
||||
activeClass = isActive ? ' active' : '',
|
||||
className = 'tabmenu-item-%s %s'.format(children[i].name, activeClass);
|
||||
|
||||
ul.appendChild(E('li', { 'class': className }, [
|
||||
E('a', { 'href': L.url(url, children[i].name) }, [ _(children[i].title) ] )]));
|
||||
|
||||
if (isActive)
|
||||
activeNode = children[i];
|
||||
}
|
||||
|
||||
if (ul.children.length == 0)
|
||||
return E([]);
|
||||
|
||||
container.appendChild(ul);
|
||||
container.style.display = '';
|
||||
|
||||
if (activeNode)
|
||||
this.renderTabMenu(activeNode, url + '/' + activeNode.name, (level || 0) + 1);
|
||||
|
||||
return ul;
|
||||
},
|
||||
|
||||
renderMainMenu: function(tree, url, level) {
|
||||
var ul = level ? E('ul', { 'class': 'dropdown-menu' }) : document.querySelector('#topmenu'),
|
||||
children = ui.menu.getChildren(tree);
|
||||
|
||||
if (children.length == 0 || level > 1)
|
||||
return E([]);
|
||||
|
||||
for (var i = 0; i < children.length; i++) {
|
||||
var submenu = this.renderMainMenu(children[i], url + '/' + children[i].name, (level || 0) + 1),
|
||||
subclass = (!level && submenu.firstElementChild) ? 'dropdown' : null,
|
||||
linkclass = (!level && submenu.firstElementChild) ? 'menu' : null,
|
||||
linkurl = submenu.firstElementChild ? '#' : L.url(url, children[i].name);
|
||||
|
||||
var li = E('li', { 'class': subclass }, [
|
||||
E('a', { 'class': linkclass, 'href': linkurl }, [ _(children[i].title) ]),
|
||||
submenu
|
||||
]);
|
||||
|
||||
ul.appendChild(li);
|
||||
}
|
||||
|
||||
ul.style.display = '';
|
||||
|
||||
return ul;
|
||||
},
|
||||
|
||||
renderModeMenu: function(tree) {
|
||||
var ul = document.querySelector('#modemenu'),
|
||||
children = ui.menu.getChildren(tree);
|
||||
|
||||
for (var i = 0; i < children.length; i++) {
|
||||
var isActive = (L.env.requestpath.length ? children[i].name == L.env.requestpath[0] : i == 0);
|
||||
|
||||
ul.appendChild(E('li', { 'class': isActive ? 'active' : null }, [
|
||||
E('a', { 'href': L.url(children[i].name) }, [ _(children[i].title) ]),
|
||||
' ',
|
||||
E('span', { 'class': 'divider' }, [ '|' ])
|
||||
]));
|
||||
|
||||
if (isActive)
|
||||
this.renderMainMenu(children[i], children[i].name);
|
||||
}
|
||||
|
||||
if (ul.children.length > 1)
|
||||
ul.style.display = '';
|
||||
},
|
||||
|
||||
handleBodyMargin: function(ev) {
|
||||
var body = document.querySelector('body'),
|
||||
head = document.querySelector('header');
|
||||
|
||||
body.style.marginTop = head.offsetHeight + 'px';
|
||||
}
|
||||
});
|
||||
BIN
Binary file not shown.
|
After Width: | Height: | Size: 50 KiB |
Reference in new issue
Block a user