diff --git a/bower.json b/bower.json index 8dcba3317..e6d1240bc 100644 --- a/bower.json +++ b/bower.json @@ -15,6 +15,7 @@ "tests" ], "dependencies": { + "AngularHammer": "ryanmullins-angular-hammer#~2.1.10", "Chart.js": "~1.0.2", "Ionicons": "ionicons#~2.0.1", "amcharts": "~3.15.2", @@ -33,6 +34,7 @@ "bootstrap-tagsinput": "~0.5.0", "font-awesome": "fontawesome#~4.4.0", "fullcalendar": "~2.4.0", + "hammerjs": "hammer.js#~2.0.4", "highlight": "~8.8.0", "jquery": "~2.1.4", "jquery-ui": "~1.11.4", diff --git a/gulpfile.js b/gulpfile.js index 430685e3a..788d9551b 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -106,6 +106,8 @@ gulp.task('js', function () { 'bower_components/angular-smart-table/dist/smart-table.min.js', 'bower_components/slimScroll/jquery.slimscroll.min.js', 'bower_components/angular-slimscroll/angular-slimscroll.js', + 'bower_components/hammerjs/hammer.min.js', + 'bower_components/AngularHammer/angular.hammer.min.js', 'src/app/components/backTop/lib/jquery.backTop.min.js' ]; diff --git a/src/app/app.js b/src/app/app.js index d33f61631..aa458aef3 100644 --- a/src/app/app.js +++ b/src/app/app.js @@ -16,7 +16,8 @@ var blurAdminApp = angular.module('BlurAdmin', [ 'BlurAdmin.typographyPage', 'toastr', 'smart-table', - 'ui.slimscroll' + 'ui.slimscroll', + 'hmTouchEvents' ]).config(['$routeProvider', 'toastrConfig', function ($routeProvider, toastrConfig) { $routeProvider.otherwise({redirectTo: '/dashboard'}); diff --git a/src/app/components/sidebar/_sidebar.scss b/src/app/components/sidebar/_sidebar.scss index 785587d98..96548ed04 100644 --- a/src/app/components/sidebar/_sidebar.scss +++ b/src/app/components/sidebar/_sidebar.scss @@ -52,7 +52,7 @@ a.collapse-menu-link { top: 88px; left: 0; width: 100%; - padding-bottom: 10px; + padding-bottom: 52px; } .al-sidebar-list { @@ -145,6 +145,7 @@ a.al-sidebar-list-link { margin-right: 18px; width: 16px; display: inline-block; + cursor: pointer; } input { background: none; @@ -278,8 +279,8 @@ a.al-sidebar-list-link { @mixin sidebar-hidden() { .al-sidebar { width: 0; - .al-logo { - width: 180px; + a.al-logo { + display: none; } a.collapse-menu-link { i { @@ -290,6 +291,12 @@ a.al-sidebar-list-link { display: none; } } + .search { + width: 0; + } + a.al-logo-small-rez { + display: block; + } } .collapsed-sidebar { @@ -313,12 +320,15 @@ a.al-sidebar-list-link { .sidebar-full-width { width: $sidebar-width; - .al-logo { - padding-left: 17px; + a.al-logo { + display: block; span { padding-left: 0; } } + a.al-logo-small-rez { + display: none; + } .fa-angle-down, .fa-angle-up { opacity: 1; } diff --git a/src/app/components/sidebar/sidebar.js b/src/app/components/sidebar/sidebar.js index d16a7dee7..5f9238311 100644 --- a/src/app/components/sidebar/sidebar.js +++ b/src/app/components/sidebar/sidebar.js @@ -192,18 +192,20 @@ blurAdminApp.directive('sidebar', function () { } $scope.startSearch = function() { - if (window.innerWidth <= resWidthCollapseSidebar) { + if (window.innerWidth <= resWidthCollapseSidebar && window.innerWidth > resWidthHideSidebar) { $scope.showSidebar = true; - } - if (body.hasClass(collapsedClass)) { - console.log('collapsed'); - body.removeClass(collapsedClass); $timeout(function(){ focusSearchInput(); - }, 1000); + }, 900); } else { - console.log('else'); - focusSearchInput(); + if (body.hasClass(collapsedClass)) { + body.removeClass(collapsedClass); + $timeout(function(){ + focusSearchInput(); + }, 900); + } else { + focusSearchInput(); + } } }; diff --git a/src/app/components/widgets/widgets.js b/src/app/components/widgets/widgets.js index 1a4fdd517..1419d5c01 100644 --- a/src/app/components/widgets/widgets.js +++ b/src/app/components/widgets/widgets.js @@ -8,7 +8,7 @@ blurAdminApp.directive('widgets', function () { }, templateUrl: 'app/components/widgets/widgets.html', replace: true, - link: function (scope, element, attrs, ctrls) { + link: function () { } }; }); \ No newline at end of file diff --git a/src/app/pages/dashboard/widgets/chart/_chart.scss b/src/app/pages/dashboard/widgets/chart/_chart.scss index 92b5e621c..7ac7314a0 100644 --- a/src/app/pages/dashboard/widgets/chart/_chart.scss +++ b/src/app/pages/dashboard/widgets/chart/_chart.scss @@ -1,5 +1,25 @@ +.channels-block { + width: 100%; + position: relative; +} + +.channels-info { + width: 100%; + float: left; + overflow: hidden; + margin-top: -23px; + & > div { + padding: 0 0 0 540px; + } +} + + .traffic-chart { + width: 500px; + margin-left: -100%; + position: relative; min-height: 300px; + float: left; .canvas-holder { width: 300px; height: 300px; @@ -45,6 +65,17 @@ } } +.channel-change { + display: block; + margin-bottom: 8px; +} + +.channel-progress { + height: 16px; + border-radius: 0; + width: 100%; +} + @mixin doughnut-center() { .traffic-chart { ul.doughnut-legend { @@ -75,4 +106,15 @@ height: $size; } } +} + +@media (max-width: 1800px) { + .channels-info { + display: none; + } + .traffic-chart { + width: auto; + margin: 0; + float: none; + } } \ No newline at end of file diff --git a/src/app/pages/dashboard/widgets/chart/chart.html b/src/app/pages/dashboard/widgets/chart/chart.html index 75560de15..0d2467b12 100644 --- a/src/app/pages/dashboard/widgets/chart/chart.html +++ b/src/app/pages/dashboard/widgets/chart/chart.html @@ -1,10 +1,49 @@ -