Merge pull request #2445 from yglb/rosy-bugsfix
luci-theme-rosy: Some bug fixes about rosy's scrollbars, table color matching, fillet and modal boxes
This commit is contained in:
commit
c1fdd8ae03
5 changed files with 342 additions and 51 deletions
File diff suppressed because it is too large
Load diff
File diff suppressed because one or more lines are too long
|
@ -81,6 +81,17 @@
|
|||
/**
|
||||
* menu click
|
||||
*/
|
||||
if ($('.nav').length > 0 && $(window).width() > 992) {
|
||||
var oScroll = new MyScrollBar({
|
||||
selId: 'navBox',
|
||||
time: 100,
|
||||
bgColor: 'transprent',
|
||||
barColor: '#839dd67a',
|
||||
enterColor: '#839dd6cc',
|
||||
enterShow: false
|
||||
});
|
||||
}
|
||||
|
||||
$(".main > .main-left .nav > .slide > .menu").click(function () {
|
||||
var ul = $(this).next(".slide-menu");
|
||||
var menu = $(this);
|
||||
|
@ -94,6 +105,14 @@
|
|||
ul.removeClass("active");
|
||||
});
|
||||
}
|
||||
if ($('.nav').length > 0 && $(window).width() > 992) {
|
||||
oScroll.setSize(200);
|
||||
}
|
||||
setInterval(function(){
|
||||
if($('.nav').height() < $('.navbar-container').height()){
|
||||
$('.nav').css('transform', 'translate(0px, 0px)');
|
||||
}
|
||||
}, 300);
|
||||
return false;
|
||||
});
|
||||
|
||||
|
@ -259,10 +278,10 @@
|
|||
}else {
|
||||
$('.node-main-login form .cbi-value-last input[type="text"]').prop('type', 'password');
|
||||
$('.node-main-login form .cbi-value-field .iconeye').removeClass('cleye').addClass('opeye');
|
||||
num = true
|
||||
num = true;
|
||||
}
|
||||
|
||||
})
|
||||
});
|
||||
|
||||
$('body.logged-in').css('min-height', $(window).height());
|
||||
|
||||
|
@ -271,21 +290,26 @@
|
|||
$('.logged-in .main-right').outerWidth( $(window).width() - $('.logged-in .main-left').width() - 50 );
|
||||
}
|
||||
|
||||
$('.cbi-section .table').each(function(){
|
||||
var thisTr = $(this).children('.tr').get(0);
|
||||
var td = $(thisTr).children('.td').get(0);
|
||||
var th = $(thisTr).children('.th').get(0)
|
||||
var a = window.getComputedStyle(thisTr, ':before').getPropertyValue('content');
|
||||
console.log(td, th);
|
||||
$('.cbi-section .table').each(function () {
|
||||
var firTr = $(this).children('.tr').get(0);
|
||||
var firTd = $(firTr).children('.td').get(0);
|
||||
var th = $(firTr).children('.th').get(0);
|
||||
|
||||
if( th && a != 'none' ){
|
||||
var laTr = $(this).children('.tr').get($(this).children('.tr').length - 1);
|
||||
var laTd = $(laTr).children('.td').get(0);
|
||||
var a = window.getComputedStyle(firTr, ':before').getPropertyValue('content');
|
||||
|
||||
if (th && a != 'none') {
|
||||
$(th).css('border-top-left-radius', '0');
|
||||
}else if( td && a != 'none' ){
|
||||
$(td).css('border-top-left-radius', '0');
|
||||
} else if (firTd && a != 'none') {
|
||||
$(firTd).css('border-top-left-radius', '0');
|
||||
}
|
||||
if (laTd && a != 'none') {
|
||||
$(laTd).css('border-bottom-left-radius', '0');
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
$('.lang_enNetwork #cbi-samba-sambashare .table').wrap('<div class="table-container"></div>');
|
||||
$('#iptables').prev().css('margin-top', '10px');
|
||||
|
||||
})(jQuery);
|
||||
|
|
|
@ -43,8 +43,8 @@
|
|||
<script>
|
||||
var luciLocation = <%= luci.http.write_json(luci.dispatcher.context.path) %>;
|
||||
</script>
|
||||
<script src="<%=media%>/js/jquery.min.js?v=git-18.247.71242-9541751"></script>
|
||||
<script src="<%=media%>/js/script.js?v=git-18.247.71242-9541751"></script>
|
||||
<script src="<%=media%>/js/jquery.min.js"></script>
|
||||
<script src="<%=media%>/js/script.js"></script>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
|
|
|
@ -123,7 +123,7 @@
|
|||
local function render_topmenu()
|
||||
local childs = disp.node_childs(cattree)
|
||||
if #childs > 0 then
|
||||
write('<ul class="nav">')
|
||||
write('<ul class="nav scroll">')
|
||||
|
||||
for i, r in ipairs(childs) do
|
||||
local nnode = cattree.nodes[r]
|
||||
|
@ -231,6 +231,7 @@
|
|||
<% end -%>
|
||||
<script src="<%=resource%>/cbi.js"></script>
|
||||
<script src="<%=resource%>/xhr.js"></script>
|
||||
<script src="<%=media%>/js/ScrollY.js"></script>
|
||||
</head>
|
||||
|
||||
<body class="lang_<%=luci.i18n.context.lang%> <%- if node then %><%= striptags( node.title ) %><%- end %> <% if luci.dispatcher.context.authsession then %>logged-in<% end %>">
|
||||
|
@ -264,7 +265,7 @@
|
|||
<div class="nav-container">
|
||||
<a class="brand" href="#">
|
||||
<%=boardinfo.hostname or "?"%></a>
|
||||
<div class="navbar-container">
|
||||
<div class="navbar-container" id="navBox">
|
||||
<% render_topmenu() %>
|
||||
</div>
|
||||
</div>
|
||||
|
|
Loading…
Reference in a new issue