luci-theme-material: fix some bug
authorLutty Yang <lutty@wcan.in>
Fri, 18 Sep 2015 03:32:44 +0000 (11:32 +0800)
committerLutty Yang <lutty@wcan.in>
Fri, 18 Sep 2015 03:32:44 +0000 (11:32 +0800)
fixed "logout" text theme error and "unsaved changes" page dislocation.

Signed-off-by: Lutty Yang <lutty@wcan.in>
gitconfig [new file with mode: 0644]
themes/luci-theme-material/htdocs/luci-static/material/css/style.css
themes/luci-theme-material/htdocs/luci-static/material/js/script.js
themes/luci-theme-material/luasrc/view/themes/material/header.htm

diff --git a/gitconfig b/gitconfig
new file mode 100644 (file)
index 0000000..1475b18
--- /dev/null
+++ b/gitconfig
@@ -0,0 +1,5 @@
+[user]
+    name = Lutty Yang
+    email = lutty@wcan.in
+[commit]
+    template = /home/dlll/Documents/git-commitmessage
index 4962323..6cd78d2 100755 (executable)
@@ -219,10 +219,12 @@ header > .container > .brand {
 
 .main > .main-left > .nav > li a {
     color: #404040;
 
 .main > .main-left > .nav > li a {
     color: #404040;
+    display: block;
 }
 
 .main > .main-left > .nav > li:nth-last-child(1) {
     margin-top: 2rem;
 }
 
 .main > .main-left > .nav > li:nth-last-child(1) {
     margin-top: 2rem;
+    font-size: 1.2rem;
 }
 
 .main > .main-left > .nav > li {
 }
 
 .main > .main-left > .nav > li {
@@ -859,7 +861,7 @@ input[name="nslookup"] {
     width: 80%;
 }
 
     width: 80%;
 }
 
-#xhr_poll_status {
+header > .container > .pull-right > *{
     position: relative;
     top: 0.45rem;
     cursor: pointer;
     position: relative;
     top: 0.45rem;
     cursor: pointer;
@@ -869,7 +871,7 @@ input[name="nslookup"] {
     background-color: #14CE14;
 }
 
     background-color: #14CE14;
 }
 
-#xhr_poll_status > .label {
+.label {
     padding: 0.3rem 0.8rem;
     font-size: 1rem;
     box-sizing: border-box;
     padding: 0.3rem 0.8rem;
     font-size: 1rem;
     box-sizing: border-box;
@@ -882,6 +884,11 @@ input[name="nslookup"] {
     -moz-border-radius: 3px;
     border-radius: 3px;
     text-shadow: none;
     -moz-border-radius: 3px;
     border-radius: 3px;
     text-shadow: none;
+    text-decoration: none;
+}
+
+.notice{
+    background-color: #5BC0DE;
 }
 
 .showSide {
 }
 
 .showSide {
@@ -1068,11 +1075,11 @@ 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;
     }
 
@@ -1203,7 +1210,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;
     }
 
@@ -1251,4 +1258,8 @@ input[name="nslookup"] {
     input {
         font-size: 1.2rem;
     }
     input {
         font-size: 1.2rem;
     }
+    
+    .mobile-hide{
+        display: none;
+    }
 }
 }
index b6e0db4..c7d60b9 100755 (executable)
      */
     if (!getCurrentNodeByUrl()){
         getCurrentNodeByHash();
      */
     if (!getCurrentNodeByUrl()){
         getCurrentNodeByHash();
-        if (tree[0] == "Status" && tree[1] == "Overview"){
+        if (tree != undefined && tree[0] == "Status" && tree[1] == "Overview"){
             //overview
             lastNode.addClass("active");
             $($(".main > .main-left > .nav > .slide > .menu")[0]).click();
         }
     }
             //overview
             lastNode.addClass("active");
             $($(".main > .main-left > .nav > .slide > .menu")[0]).click();
         }
     }
-    var mainNodeName = "node-"+ tree[0] + "-" + tree[1];
-    $("body").addClass(mainNodeName.replace(/[ \t\n\r\/]+/g,"_").toLowerCase());
+    if (tree != undefined){
+        var mainNodeName = "node-"+ tree[0] + "-" + tree[1];
+        $("body").addClass(mainNodeName.replace(/[ \t\n\r\/]+/g,"_").toLowerCase());
+    }
     $(".cbi-button-up").val("");
     $(".cbi-button-down").val("");
 
     $(".cbi-button-up").val("");
     $(".cbi-button-down").val("");
 
index 3a4f897..494cfe3 100755 (executable)
                        end
                        %>
                        <% if ucichanges > 0 then %>
                        end
                        %>
                        <% 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 %>
                        <span id="xhr_poll_status" style="display:none" onclick="XHR.running() ? XHR.halt() : XHR.run()">
                        <% 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"><%:Auto Refresh%> <%:on%></span>
-                               <span class="label" id="xhr_poll_status_off" style="display:none"><%:Auto Refresh%> <%:off%></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"><span class="mobile-hide"><%:Auto Refresh%> </span><%:off%></span>
                        </span>
                <% end %>
                </div>
                        </span>
                <% end %>
                </div>