Commit bbba9179 authored by Evren Kutar's avatar Evren Kutar

resolves #40

some css beautify
parent a8603069
...@@ -18,23 +18,6 @@ body { ...@@ -18,23 +18,6 @@ body {
background-color:#999; background-color:#999;
} }
.panel {
border:none;
-webkit-box-shadow: 0 0px 4px rgba(0,0,0,.15);
box-shadow: 0 0px 4px rgba(0,0,0,.15);
}
.panel-footer {
border-top: 1px solid #F3F3F3;
background-color:#fff;
}
.panel-info>.panel-heading {
background-color: #6CBECC;
border:none;
color:#fff;
}
.badge { .badge {
border-radius: 100%; border-radius: 100%;
width: 22px; width: 22px;
...@@ -345,7 +328,7 @@ select { ...@@ -345,7 +328,7 @@ select {
.manager-view-header { .manager-view-header {
/*width:100%;*/ /*width:100%;*/
width: calc(100% - 300px); /*width: calc(100% - 300px);*/
padding:10px; padding:10px;
background-color:#fff; background-color:#fff;
border-bottom:1px solid #ccc; border-bottom:1px solid #ccc;
...@@ -357,7 +340,6 @@ select { ...@@ -357,7 +340,6 @@ select {
} }
.manager-view-content { .manager-view-content {
width: calc(100% - 300px);
padding:35px 40px; padding:35px 40px;
overflow:auto; overflow:auto;
-webkit-flex-grow: 1; -webkit-flex-grow: 1;
...@@ -1035,7 +1017,7 @@ table.dataTable thead .sorting:after { ...@@ -1035,7 +1017,7 @@ table.dataTable thead .sorting:after {
} }
.dashboard-main-search { .dashboard-main-search {
width: calc(100% - 300px);
} }
.dashboard-main-search .dashboard-student-search h3, .dashboard-main-search .dashboard-student-search h3,
...@@ -1064,7 +1046,6 @@ table.dataTable thead .sorting:after { ...@@ -1064,7 +1046,6 @@ table.dataTable thead .sorting:after {
background-color: #FBF9F9; background-color: #FBF9F9;
cursor:pointer; cursor:pointer;
color:#5A5A5A; color:#5A5A5A;
margin-left:-4px;
} }
.dashboard-student-search { .dashboard-student-search {
...@@ -1507,9 +1488,14 @@ table.dataTable thead .sorting:after { ...@@ -1507,9 +1488,14 @@ table.dataTable thead .sorting:after {
border-right-width: 14px; border-right-width: 14px;
border-left-width: 0; border-left-width: 0;
} }
.sidebar {
width:100% !important;
}
.brand { .brand,
text-align:center; footer {
display:none;
} }
.logo img { .logo img {
...@@ -1525,18 +1511,12 @@ table.dataTable thead .sorting:after { ...@@ -1525,18 +1511,12 @@ table.dataTable thead .sorting:after {
overflow:auto; overflow:auto;
} }
.sidebar footer {
text-align: center;
font-family: 'robotomedium';
background-color: #F1F1F1;
padding: 15px;
color: #A7A7A7;
border-bottom: 1px solid #ccc;
}
.sidebar-collapse-button { .sidebar-collapse-button {
display:none; display:none;
} }
.right-sidebar {
display: none;
}
} }
......
...@@ -43,7 +43,7 @@ app.directive('headerNotification', function ($http, $rootScope, $cookies, $inte ...@@ -43,7 +43,7 @@ app.directive('headerNotification', function ($http, $rootScope, $cookies, $inte
}; };
$scope.getNotifications = function () { $scope.getNotifications = function () {
// ignore loading bar here // ignore loading bar here
$http.get(RESTURL.url+"notify", {ignoreLoadingBar: true}).success(function (data) { $http.get(RESTURL.url + "notify", {ignoreLoadingBar: true}).success(function (data) {
$scope.groupNotifications(data.notifications); $scope.groupNotifications(data.notifications);
$rootScope.$broadcast("notifications", $scope.notifications); $rootScope.$broadcast("notifications", $scope.notifications);
}); });
...@@ -62,7 +62,7 @@ app.directive('headerNotification', function ($http, $rootScope, $cookies, $inte ...@@ -62,7 +62,7 @@ app.directive('headerNotification', function ($http, $rootScope, $cookies, $inte
// when clicked mark as read notification // when clicked mark as read notification
// it can be list of notifications // it can be list of notifications
$scope.markAsRead = function (items) { $scope.markAsRead = function (items) {
$http.post(RESTURL.url+"notify", {ignoreLoadingBar: true, read: [items]}) $http.post(RESTURL.url + "notify", {ignoreLoadingBar: true, read: [items]})
.success(function (data) { .success(function (data) {
$scope.groupNotifications(data.notifications); $scope.groupNotifications(data.notifications);
$rootScope.$broadcast("notifications", $scope.notifications); $rootScope.$broadcast("notifications", $scope.notifications);
...@@ -82,7 +82,7 @@ app.directive('headerNotification', function ($http, $rootScope, $cookies, $inte ...@@ -82,7 +82,7 @@ app.directive('headerNotification', function ($http, $rootScope, $cookies, $inte
* toggle collapses sidebar menu when clicked menu button * toggle collapses sidebar menu when clicked menu button
*/ */
app.directive('collapseMenu', function ($timeout) { app.directive('collapseMenu', function ($timeout, $window) {
return { return {
templateUrl: 'shared/templates/directives/menuCollapse.html', templateUrl: 'shared/templates/directives/menuCollapse.html',
restrict: 'E', restrict: 'E',
...@@ -93,21 +93,25 @@ app.directive('collapseMenu', function ($timeout) { ...@@ -93,21 +93,25 @@ app.directive('collapseMenu', function ($timeout) {
$rootScope.sidebarPinned = false; $rootScope.sidebarPinned = false;
$scope.collapseToggle = function () { $scope.collapseToggle = function () {
if ($rootScope.collapsed === false) { if ($window.innerWidth > '768') {
jQuery(".sidebar").css("width" , "62px"); if ($rootScope.collapsed === false) {
jQuery(".manager-view").css("width" , "calc(100% - 62px)"); jQuery(".sidebar").css("width", "62px");
$rootScope.collapsed = true; jQuery(".manager-view").css("width", "calc(100% - 62px)");
$rootScope.sidebarPinned = false; $rootScope.collapsed = true;
} else { $rootScope.sidebarPinned = false;
jQuery("span.menu-text, span.arrow, .sidebar footer").fadeIn(400); } else {
jQuery(".sidebar").css("width" , "250px");
jQuery(".manager-view").css("width" , "calc(100% - 250px)"); jQuery("span.menu-text, span.arrow, .sidebar footer").fadeIn(400);
$rootScope.collapsed = false; jQuery(".sidebar").css("width", "250px");
$rootScope.sidebarPinned = true; jQuery(".manager-view").css("width", "calc(100% - 250px)");
$rootScope.collapsed = false;
$rootScope.sidebarPinned = true;
}
} }
}; };
$timeout(function(){ $timeout(function () {
$scope.collapseToggle(); $scope.collapseToggle();
}); });
} }
...@@ -116,21 +120,19 @@ app.directive('collapseMenu', function ($timeout) { ...@@ -116,21 +120,19 @@ app.directive('collapseMenu', function ($timeout) {
/** /**
* headerSubmenu directive * headerSubmenu directive
* todo: will be deleted
*/ */
app.directive('headerSubMenu', function () { app.directive('headerSubMenu', function ($location) {
return { return {
templateUrl: 'shared/templates/directives/header-sub-menu.html', templateUrl: 'shared/templates/directives/header-sub-menu.html',
restrict: 'E', restrict: 'E',
controller: "CRUDAddEditCtrl", //controller: "CRUDAddEditCtrl",
replace: true, replace: true,
link: function ($scope) { link: function ($scope) {
$scope.triggerSubmit = function () { $scope.$on('$routeChangeStart', function () {
// todo: double make it but single not solve this! console.log($location.path()); //
angular.element($('#submitbutton')).triggerHandler('click'); $scope.style = $location.path() === '/dashboard' ? 'width:calc(100% - 300px);' : 'width:%100 !important;';
angular.element($('#submitbutton')).triggerHandler('click'); });
};
} }
}; };
}); });
...@@ -176,7 +178,7 @@ app.directive('sidebar', ['$location', function () { ...@@ -176,7 +178,7 @@ app.directive('sidebar', ['$location', function () {
restrict: 'E', restrict: 'E',
replace: true, replace: true,
scope: {}, scope: {},
controller: function ($scope, $rootScope, $cookies, $route, $http, RESTURL, $location, $timeout) { controller: function ($scope, $rootScope, $cookies, $route, $http, RESTURL, $location, $window, $timeout) {
$scope.prepareMenu = function (menuItems) { $scope.prepareMenu = function (menuItems) {
var newMenuItems = {}; var newMenuItems = {};
angular.forEach(menuItems, function (value, key) { angular.forEach(menuItems, function (value, key) {
...@@ -219,7 +221,9 @@ app.directive('sidebar', ['$location', function () { ...@@ -219,7 +221,9 @@ app.directive('sidebar', ['$location', function () {
// $scope.menuItems[$cookies.get("selectedUserType")] = $scope.allMenuItems[$cookies.get("selectedUserType")]; // $scope.menuItems[$cookies.get("selectedUserType")] = $scope.allMenuItems[$cookies.get("selectedUserType")];
//} //}
$timeout(function(){sidebarmenu.metisMenu()}); $timeout(function () {
sidebarmenu.metisMenu()
});
}); });
// changing menu items by listening for broadcast // changing menu items by listening for broadcast
...@@ -228,27 +232,35 @@ app.directive('sidebar', ['$location', function () { ...@@ -228,27 +232,35 @@ app.directive('sidebar', ['$location', function () {
var menu = {other: $scope.allMenuItems.other}; var menu = {other: $scope.allMenuItems.other};
menu[data] = $scope.allMenuItems[data]; menu[data] = $scope.allMenuItems[data];
$scope.menuItems = $scope.prepareMenu(menu); $scope.menuItems = $scope.prepareMenu(menu);
$timeout(function(){sidebarmenu.metisMenu()}); $timeout(function () {
sidebarmenu.metisMenu()
});
}); });
$scope.openSidebar = function () { $scope.openSidebar = function () {
if ($rootScope.sidebarPinned === false) { if ($window.innerWidth > '768') {
jQuery("span.menu-text, span.arrow, .sidebar footer, #side-menu").fadeIn(400); if ($rootScope.sidebarPinned === false) {
jQuery(".sidebar").css("width" , "250px"); jQuery("span.menu-text, span.arrow, .sidebar footer, #side-menu").fadeIn(400);
jQuery(".manager-view").css("width" , "calc(100% - 250px)"); jQuery(".sidebar").css("width", "250px");
$rootScope.collapsed = false; jQuery(".manager-view").css("width", "calc(100% - 250px)");
$rootScope.collapsed = false;
}
} }
}; };
$scope.closeSidebar = function () { $scope.closeSidebar = function () {
if ($rootScope.sidebarPinned === false) { if ($window.innerWidth > '768') {
jQuery(".sidebar").css("width" , "62px"); if ($rootScope.sidebarPinned === false) {
jQuery(".manager-view").css("width" , "calc(100% - 62px)"); jQuery(".sidebar").css("width", "62px");
$rootScope.collapsed = true; jQuery(".manager-view").css("width", "calc(100% - 62px)");
$rootScope.collapsed = true;
}
} }
}; };
$rootScope.$watch(function ($rootScope) {return $rootScope.section; }, $rootScope.$watch(function ($rootScope) {
return $rootScope.section;
},
function (newindex, oldindex) { function (newindex, oldindex) {
if (newindex > -1) { if (newindex > -1) {
$scope.menuItems = [$scope.allMenuItems[newindex]]; $scope.menuItems = [$scope.allMenuItems[newindex]];
......
<div class="manager-view-header"> <div class="manager-view-header" style="{{style}}">
<div class="clearfix"> <div class="clearfix">
<header-breadcrumb></header-breadcrumb> <header-breadcrumb></header-breadcrumb>
<loaderdiv><div></div></loaderdiv> <loaderdiv><div></div></loaderdiv>
<!--<div class="loader">Loading...</div>--> <!--<div class="loader">Loading...</div>-->
<selected-user class="pull-right"></selected-user> <selected-user class="pull-right"></selected-user>
</div> </div>
<!--<div id="header-buttons" ng-class="{hidden: $root.showSaveButton != true}">-->
<!--<button type="button" class="btn btn-primary" ng-click="triggerSubmit()">Kaydet</button>-->
<!--&lt;!&ndash;<button type="button" class="btn btn-warning">Düzenle</button>&ndash;&gt;-->
<!--&lt;!&ndash;<button type="button" class="btn btn-danger">İptal</button>&ndash;&gt;-->
<!--</div>-->
</div> </div>
\ No newline at end of file
...@@ -89,14 +89,17 @@ form_generator.factory('Generator', function ($http, $q, $timeout, $location, $c ...@@ -89,14 +89,17 @@ form_generator.factory('Generator', function ($http, $q, $timeout, $location, $c
scope.form[scope.form.indexOf(k)] = { scope.form[scope.form.indexOf(k)] = {
type: v.type, type: v.type,
title: v.title, title: v.title,
style: "btn-primary",
onClick: function(){ onClick: function(){
delete scope.form_params.cmd; delete scope.form_params.cmd;
delete scope.form_params.flow;
if (v.cmd) { if (v.cmd) {
// todo: cmd property to form_params, test it!
scope.form_params["cmd"] = v.cmd; scope.form_params["cmd"] = v.cmd;
} else {
scope.model[k]=1;
} }
if (v.flow) {
scope.form_params["flow"] = v.flow;
}
scope.model[k]=1;
generator.submit(scope); generator.submit(scope);
} }
}; };
...@@ -337,11 +340,16 @@ form_generator.factory('Generator', function ($http, $q, $timeout, $location, $c ...@@ -337,11 +340,16 @@ form_generator.factory('Generator', function ($http, $q, $timeout, $location, $c
}); });
var data = { var data = {
"form": $scope.model, "form": $scope.model,
"cmd": $scope.form_params.cmd,
//"subcmd": "do_list", //"subcmd": "do_list",
"model": $scope.form_params.model, "model": $scope.form_params.model,
"token": $scope.token "token": $scope.token
}; };
if ($scope.form_params.cmd) {
data["cmd"] = $scope.form_params.cmd;
}
if ($scope.form_params.cmd) {
data["flow"] = $scope.form_params.flow;
}
if ($scope.object_id) { if ($scope.object_id) {
//var get_diff = FormDiff.get_diff($scope.model, $scope.initialModel); //var get_diff = FormDiff.get_diff($scope.model, $scope.initialModel);
data.object_id = $scope.object_id; data.object_id = $scope.object_id;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment