Merge pull request #481 from LuttyYang/master

luci-theme-material: fix some bug
This commit is contained in:
Hannu Nyman 2015-09-18 11:52:32 +03:00
commit 43b22213f0
3 changed files with 75 additions and 23 deletions

View file

@ -219,10 +219,12 @@ header > .container > .brand {
.main > .main-left > .nav > li a { .main > .main-left > .nav > li a {
color: #404040; color: #404040;
display: block;
} }
.main > .main-left > .nav > li:nth-last-child(1) { .main > .main-left > .nav > li:nth-last-child(1) {
margin-top: 2rem; margin-top: 2rem;
font-size: 1.2rem;
} }
.main > .main-left > .nav > li { .main > .main-left > .nav > li {
@ -570,12 +572,13 @@ td > table > tbody > tr > td {
} }
.cbi-value-title { .cbi-value-title {
word-wrap: break-word;
padding-top: 0.6rem; padding-top: 0.6rem;
min-width: 23rem; width: 23rem;
display: inline-block;
float: left; float: left;
text-align: right; text-align: right;
padding-right: 2rem; padding-right: 2rem;
display: table-cell;
} }
.cbi-value { .cbi-value {
@ -680,17 +683,18 @@ td > table > tbody > tr > td {
.cbi-input-textarea { .cbi-input-textarea {
box-sizing: border-box; box-sizing: border-box;
width: 100%; width: 100%;
min-height: 15rem; min-height: 16rem;
padding: 1rem; padding: 1rem;
font-size: 1.2rem; font-size: 0.9rem;
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
color: black;
} }
#syslog { #syslog {
width: 90%; width: 100%;
width: calc(100% - 2rem);
min-height: 15rem; min-height: 15rem;
padding: 1rem; padding: 1rem;
font-size: 1rem; font-size: smaller;
color: #5F5F5F; color: #5F5F5F;
margin-bottom: 20px; margin-bottom: 20px;
@ -859,7 +863,7 @@ input[name="nslookup"] {
width: 80%; width: 80%;
} }
#xhr_poll_status { header > .container > .pull-right > *{
position: relative; position: relative;
top: 0.45rem; top: 0.45rem;
cursor: pointer; cursor: pointer;
@ -869,7 +873,7 @@ input[name="nslookup"] {
background-color: #14CE14; background-color: #14CE14;
} }
#xhr_poll_status > .label { .label {
padding: 0.3rem 0.8rem; padding: 0.3rem 0.8rem;
font-size: 1rem; font-size: 1rem;
box-sizing: border-box; box-sizing: border-box;
@ -882,6 +886,11 @@ input[name="nslookup"] {
-moz-border-radius: 3px; -moz-border-radius: 3px;
border-radius: 3px; border-radius: 3px;
text-shadow: none; text-shadow: none;
text-decoration: none;
}
.notice{
background-color: #5BC0DE;
} }
.showSide { .showSide {
@ -908,8 +917,8 @@ input[name="nslookup"] {
} }
.node-main-login > .main fieldset { .node-main-login > .main fieldset {
margin-bottom: 2rem; padding: 0;
margin-bottom: 2rem; margin-bottom: 1rem;
display: inline; display: inline;
background: none; background: none;
border: none; border: none;
@ -917,7 +926,7 @@ input[name="nslookup"] {
} }
.node-main-login > .main .cbi-value-title { .node-main-login > .main .cbi-value-title {
min-width: 6rem; width: 7rem;
} }
.node-main-login > .main #maincontent { .node-main-login > .main #maincontent {
@ -1040,6 +1049,12 @@ input[name="nslookup"] {
padding: 0.5rem 1rem; padding: 0.5rem 1rem;
} }
.node-system-software > .main .cbi-value > pre{
background-color: #eee;
padding: 0.5rem;
overflow: auto;
}
.node-status-firewall fieldset, .node-status-firewall fieldset,
.node-system-software fieldset, .node-system-software fieldset,
.node-system-backup_flash_firmware fieldset { .node-system-backup_flash_firmware fieldset {
@ -1053,6 +1068,11 @@ input[name="nslookup"] {
box-shadow: 0 2px 2px 0 rgba(0, 0, 0, .16), 0 0 2px 0 rgba(0, 0, 0, .12); box-shadow: 0 2px 2px 0 rgba(0, 0, 0, .16), 0 0 2px 0 rgba(0, 0, 0, .12);
} }
/* language fix */
body.lang_pl.node-main-login .cbi-value-title{
width: 12rem;
}
@media screen and (max-width: 1600px) { @media screen and (max-width: 1600px) {
.main-left { .main-left {
width: calc(0% + 15rem); width: calc(0% + 15rem);
@ -1068,21 +1088,25 @@ input[name="nslookup"] {
line-height: 1.5; line-height: 1.5;
} }
#xhr_poll_status { header > .container > .pull-right > * {
top: 0.35rem; top: 0.35rem;
} }
#xhr_poll_status > .label { .label {
padding: 0.2rem 0.6rem; padding: 0.2rem 0.6rem;
} }
.cbi-value-title { .cbi-value-title {
min-width: 15rem; width: 15rem;
} }
fieldset { fieldset {
padding: 1rem; padding: 1rem;
} }
.cbi-input-textarea{
font-size: smaller;
}
} }
@media screen and (max-width: 1280px) { @media screen and (max-width: 1280px) {
@ -1122,7 +1146,8 @@ input[name="nslookup"] {
} }
.cbi-value-title { .cbi-value-title {
min-width: 6rem; width: 9rem;
padding-right: 1rem;
} }
@ -1151,6 +1176,10 @@ input[name="nslookup"] {
#diag-rc-output > pre { #diag-rc-output > pre {
font-size: 1.2rem; font-size: 1.2rem;
} }
.node-main-login > .main .cbi-value-title{
text-align: left;
}
} }
@media screen and (max-width: 480px) { @media screen and (max-width: 480px) {
@ -1180,10 +1209,12 @@ input[name="nslookup"] {
} }
.cbi-value-title { .cbi-value-title {
width: 100%;
min-width: 0rem !important; min-width: 0rem !important;
display: block; display: block;
margin-top: 1rem; margin-top: 1rem;
margin-bottom: 0.5rem; margin-bottom: 0.5rem;
text-align: left;
} }
.cbi-value-field, .cbi-value-description { .cbi-value-field, .cbi-value-description {
@ -1203,7 +1234,7 @@ input[name="nslookup"] {
padding: 0.2rem 0.7rem; padding: 0.2rem 0.7rem;
} }
.cbi-page-actions > div { .cbi-page-actions > div > input {
display: none; display: none;
} }
@ -1220,11 +1251,13 @@ input[name="nslookup"] {
} }
.node-main-login > .main .cbi-value-title { .node-main-login > .main .cbi-value-title {
width: 100% !important;
font-size: 1.2rem; font-size: 1.2rem;
} }
.node-main-login > .main fieldset { .node-main-login > .main fieldset {
margin: 0; margin: 0;
padding: 0.5rem;
} }
h2 { h2 {
@ -1251,4 +1284,21 @@ input[name="nslookup"] {
input { input {
font-size: 1.2rem; font-size: 1.2rem;
} }
.mobile-hide{
display: none;
}
.panel-title{
font-size: 1.4rem;
padding-bottom: 1rem;
}
.node-system-software > .main .cbi-value.cbi-value-last > div{
width: 100% !important;
}
.node-system-software > .main .cbi-value .cbi-value-field input{
width: 100%;
}
} }

View file

@ -260,14 +260,16 @@
*/ */
if (!getCurrentNodeByUrl()){ if (!getCurrentNodeByUrl()){
getCurrentNodeByHash(); getCurrentNodeByHash();
if (tree[0] == "Status" && tree[1] == "Overview"){ if (tree != undefined && tree[0] == "Status" && tree[1] == "Overview"){
//overview //overview
lastNode.addClass("active"); lastNode.addClass("active");
$($(".main > .main-left > .nav > .slide > .menu")[0]).click(); $($(".main > .main-left > .nav > .slide > .menu")[0]).click();
} }
} }
var mainNodeName = "node-"+ tree[0] + "-" + tree[1]; if (tree != undefined){
$("body").addClass(mainNodeName.replace(/[ \t\n\r\/]+/g,"_").toLowerCase()); var mainNodeName = "node-"+ tree[0] + "-" + tree[1];
$("body").addClass(mainNodeName.replace(/[ \t\n\r\/]+/g,"_").toLowerCase());
}
$(".cbi-button-up").val(""); $(".cbi-button-up").val("");
$(".cbi-button-down").val(""); $(".cbi-button-down").val("");

View file

@ -154,11 +154,11 @@
end end
%> %>
<% if ucichanges > 0 then %> <% if ucichanges > 0 then %>
<a class="label notice" href="<%=controller%>/<%=category%>/uci/changes"><%:Unsaved Changes%>: <%=ucichanges%></a> <a class="label notice" href="<%=controller%>/<%=category%>/uci/changes"><span class="mobile-hide"><%:Unsaved Changes%>: </span><%=ucichanges%></a>
<% end %> <% end %>
<span id="xhr_poll_status" style="display:none" onclick="XHR.running() ? XHR.halt() : XHR.run()"> <span id="xhr_poll_status" style="display:none" onclick="XHR.running() ? XHR.halt() : XHR.run()">
<span class="label success" id="xhr_poll_status_on"><%:Auto Refresh%> <%:on%></span> <span class="label success" id="xhr_poll_status_on"><span class="mobile-hide"><%:Auto Refresh%> </span><%:on%></span>
<span class="label" id="xhr_poll_status_off" style="display:none"><%:Auto Refresh%> <%:off%></span> <span class="label" id="xhr_poll_status_off" style="display:none"><span class="mobile-hide"><%:Auto Refresh%> </span><%:off%></span>
</span> </span>
<% end %> <% end %>
</div> </div>