Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
gurayyarar committed Mar 11, 2017
1 parent d085143 commit 6e9cd58
Show file tree
Hide file tree
Showing 12 changed files with 114 additions and 68 deletions.
37 changes: 32 additions & 5 deletions css/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -2337,7 +2337,14 @@
.navbar .dropdown-menu {
margin-left: -50px; }
.navbar .js-right-sidebar {
margin-top: 15px; } }
margin-top: 15px; }
.dt-buttons {
float: none !important;
text-align: center;
margin-bottom: 15px; }
.panel-switch-btn {
top: 12px;
right: 0 !important; } }

@media (min-width: 768px) and (max-width: 991px) {
.navbar > .container .navbar-brand,
Expand Down Expand Up @@ -2968,6 +2975,8 @@ section.content {
.card .header h2 small a {
font-weight: bold;
color: #777; }
.card .header .col-xs-12 h2 {
margin-top: 5px; }
.card .body {
font-size: 14px;
color: #555;
Expand Down Expand Up @@ -7842,7 +7851,6 @@ fieldset[disabled] .form-control {

.panel-switch-btn {
position: relative;
top: -20px;
right: 20px;
z-index: 9; }
.panel-switch-btn label {
Expand Down Expand Up @@ -7935,9 +7943,7 @@ fieldset[disabled] .form-control {
.dataTables_wrapper input[type="search"]:focus, .dataTables_wrapper input[type="search"]:active {
border-bottom: 2px solid #1f91f3; }
.dataTables_wrapper .dt-buttons {
position: absolute;
top: 0;
left: 0; }
float: left; }
.dataTables_wrapper .dt-buttons a.dt-button {
background-color: #607D8B;
color: #fff;
Expand All @@ -7955,6 +7961,27 @@ fieldset[disabled] .form-control {
.dataTables_wrapper .dt-buttons a.dt-button:active {
opacity: 0.8; }

.dt-button-info {
position: fixed;
top: 50%;
left: 50%;
min-width: 400px;
text-align: center;
background-color: #fff;
border: 2px solid #999;
-webkit-border-radius: 3px;
-moz-border-radius: 3px;
-ms-border-radius: 3px;
border-radius: 3px;
margin-top: -100px;
margin-left: -200px;
z-index: 21; }
.dt-button-info h2 {
color: #777; }
.dt-button-info div {
color: #777;
margin-bottom: 20px; }

/* Light Gallery ================================ */
.lg-outer .lg-thumb-item,
.lg-outer .lg-toogle-thumb {
Expand Down
2 changes: 1 addition & 1 deletion css/style.min.css

Large diffs are not rendered by default.

14 changes: 9 additions & 5 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -851,11 +851,15 @@ <h2>DASHBOARD</h2>
<div class="col-xs-12 col-sm-12 col-md-12 col-lg-12">
<div class="card">
<div class="header">
<h2>CPU USAGE (%)</h2>
<div class="pull-right">
<div class="switch panel-switch-btn">
<span class="m-r-10 font-12">REAL TIME</span>
<label>OFF<input type="checkbox" id="realtime" checked><span class="lever switch-col-cyan"></span>ON</label>
<div class="row clearfix">
<div class="col-xs-12 col-sm-6">
<h2>CPU USAGE (%)</h2>
</div>
<div class="col-xs-12 col-sm-6 align-right">
<div class="switch panel-switch-btn">
<span class="m-r-10 font-12">REAL TIME</span>
<label>OFF<input type="checkbox" id="realtime" checked><span class="lever switch-col-cyan"></span>ON</label>
</div>
</div>
</div>
<ul class="header-dropdown m-r--5">
Expand Down
14 changes: 9 additions & 5 deletions js/admin.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,8 @@ $.AdminBSB.options = {
scrollWidth: '4px',
scrollAlwaysVisible: false,
scrollBorderRadius: '0',
scrollRailBorderRadius: '0'
scrollRailBorderRadius: '0',
scrollActiveItemWhenPageLoad: true
},
dropdownMenu: {
effectIn: 'fadeIn',
Expand Down Expand Up @@ -105,15 +106,12 @@ $.AdminBSB.leftSideBar = {
Waves.attach('.menu .list a', ['waves-block']);
Waves.init();
},
setMenuHeight: function () {
setMenuHeight: function (isFirstTime) {
if (typeof $.fn.slimScroll != 'undefined') {
var configs = $.AdminBSB.options.leftSideBar;
var height = ($(window).height() - ($('.legal').outerHeight() + $('.user-info').outerHeight() + $('.navbar').innerHeight()));
var $el = $('.list');

$el.slimScroll({ destroy: true }).height("auto");
$el.parent().find('.slimScrollBar, .slimScrollRail').remove();

$el.slimscroll({
height: height + "px",
color: configs.scrollColor,
Expand All @@ -122,6 +120,12 @@ $.AdminBSB.leftSideBar = {
borderRadius: configs.scrollBorderRadius,
railBorderRadius: configs.scrollRailBorderRadius
});

//Scroll active menu item when page load, if option set = true
if ($.AdminBSB.options.leftSideBar.scrollActiveItemWhenPageLoad) {
var activeItemOffsetTop = $('.menu .list li.active')[0].offsetTop
if (activeItemOffsetTop > 150) $el.slimscroll({ scrollTo: activeItemOffsetTop + 'px' });
}
}
},
checkStatuForResize: function (firstTime) {
Expand Down
5 changes: 4 additions & 1 deletion js/pages/tables/jquery-datatable.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
$(function () {
$('.js-basic-example').DataTable();
$('.js-basic-example').DataTable({
responsive: true
});

//Exportable table
$('.js-exportable').DataTable({
dom: 'Bfrtip',
responsive: true,
buttons: [
'copy', 'csv', 'excel', 'pdf', 'print'
]
Expand Down
36 changes: 18 additions & 18 deletions plugins/jquery-slimscroll/jquery.slimscroll.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@
* Dual licensed under the MIT (http://www.opensource.org/licenses/mit-license.php)
* and GPL (http://www.opensource.org/licenses/gpl-license.php) licenses.
*
* Version: 1.3.6
* Version: 1.3.0
*
*/
(function ($) {

$.fn.extend({
jQuery.fn.extend({
slimScroll: function (options) {

var defaults = {
Expand Down Expand Up @@ -73,10 +73,10 @@
touchScrollStep: 200,

// sets border radius
borderRadius: '0',
borderRadius: '7px',

// sets border radius of the rail
railBorderRadius: '0'
railBorderRadius: '7px'
};

var o = $.extend(defaults, options);
Expand All @@ -99,8 +99,8 @@
var offset = me.scrollTop();

// find bar and rail
bar = me.closest('.' + o.barClass);
rail = me.closest('.' + o.railClass);
bar = me.parent().find('.' + o.barClass);
rail = me.parent().find('.' + o.railClass);

getBarHeight();

Expand Down Expand Up @@ -137,11 +137,6 @@

return;
}
else if ($.isPlainObject(options)) {
if ('destroy' in options) {
return;
}
}

// optionally set height to the parent's height
o.height = (o.height == 'auto') ? me.parent().height() : o.height;
Expand Down Expand Up @@ -297,7 +292,7 @@
}

// attach scroll events
attachWheel(this);
attachWheel();

function _onWheel(e) {
// use mouse wheel only when mouse is over
Expand All @@ -310,8 +305,11 @@
if (e.detail) { delta = e.detail / 3; }

var target = e.target || e.srcTarget || e.srcElement;
/* console.log($(target).closest('.' + o.wrapperClass).attr("class"));
console.log(me.parent().attr("class"));*/
if ($(target).closest('.' + o.wrapperClass).is(me.parent())) {
// scroll content

scrollContent(delta, true);
}

Expand All @@ -321,6 +319,7 @@
}

function scrollContent(y, isWheel, isJump) {

releaseScroll = false;
var delta = y;
var maxTop = me.outerHeight() - bar.outerHeight();
Expand Down Expand Up @@ -366,10 +365,11 @@
hideBar();
}

function attachWheel(target) {
function attachWheel() {
if (window.addEventListener) {
target.addEventListener('DOMMouseScroll', _onWheel, false);
target.addEventListener('mousewheel', _onWheel, false);
this.addEventListener('DOMMouseScroll', _onWheel, false);
this.addEventListener('mousewheel', _onWheel, false);
//this.addEventListener('MozMousePixelScroll', _onWheel, false );
}
else {
document.attachEvent("onmousewheel", _onWheel)
Expand Down Expand Up @@ -436,8 +436,8 @@
}
});

$.fn.extend({
slimscroll: $.fn.slimScroll
jQuery.fn.extend({
slimscroll: jQuery.fn.slimScroll
});

})(jQuery);
})(jQuery);
16 changes: 0 additions & 16 deletions plugins/jquery-slimscroll/jquery.slimscroll.min.js

This file was deleted.

13 changes: 0 additions & 13 deletions plugins/jquery-slimscroll/package.js

This file was deleted.

6 changes: 6 additions & 0 deletions scss/_card.scss
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,12 @@
}
}
}

.col-xs-12 {
h2 {
margin-top: 5px;
}
}
}

.body {
Expand Down
1 change: 0 additions & 1 deletion scss/_charts.scss
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@

.panel-switch-btn {
position: relative;
top: -20px;
right: 20px;
z-index: 9;

Expand Down
27 changes: 24 additions & 3 deletions scss/_jquerydatatable.scss
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,7 @@
}

.dt-buttons {
position: absolute;
top: 0;
left: 0;
float: left;

a.dt-button {
background-color: #607D8B;
Expand All @@ -49,3 +47,26 @@
}
}
}

.dt-button-info {
position: fixed;
top: 50%;
left: 50%;
min-width: 400px;
text-align: center;
background-color: #fff;
border: 2px solid #999;
@include border-radius(3px);
margin-top: -100px;
margin-left: -200px;
z-index: 21;

h2 {
color: #777;
}

div {
color: #777;
margin-bottom: 20px;
}
}
11 changes: 11 additions & 0 deletions scss/_media.scss
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,17 @@
margin-top: 15px;
}
}

.dt-buttons {
float: none !important;
text-align: center;
margin-bottom: 15px;
}

.panel-switch-btn {
top: 12px;
right: 0 !important;
}
}

@media (min-width: 768px) and (max-width: 991px) {
Expand Down

0 comments on commit 6e9cd58

Please sign in to comment.