Commit bbba9179 authored by Evren Kutar's avatar Evren Kutar

resolves #40

some css beautify
parent a8603069
......@@ -18,23 +18,6 @@ body {
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 {
border-radius: 100%;
width: 22px;
......@@ -345,7 +328,7 @@ select {
.manager-view-header {
/*width:100%;*/
width: calc(100% - 300px);
/*width: calc(100% - 300px);*/
padding:10px;
background-color:#fff;
border-bottom:1px solid #ccc;
......@@ -357,7 +340,6 @@ select {
}
.manager-view-content {
width: calc(100% - 300px);
padding:35px 40px;
overflow:auto;
-webkit-flex-grow: 1;
......@@ -1035,7 +1017,7 @@ table.dataTable thead .sorting:after {
}
.dashboard-main-search {
width: calc(100% - 300px);
}
.dashboard-main-search .dashboard-student-search h3,
......@@ -1064,7 +1046,6 @@ table.dataTable thead .sorting:after {
background-color: #FBF9F9;
cursor:pointer;
color:#5A5A5A;
margin-left:-4px;
}
.dashboard-student-search {
......@@ -1507,9 +1488,14 @@ table.dataTable thead .sorting:after {
border-right-width: 14px;
border-left-width: 0;
}
.sidebar {
width:100% !important;
}
.brand {
text-align:center;
.brand,
footer {
display:none;
}
.logo img {
......@@ -1525,18 +1511,12 @@ table.dataTable thead .sorting:after {
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 {
display:none;
}
.right-sidebar {
display: none;
}
}
......
......@@ -43,7 +43,7 @@ app.directive('headerNotification', function ($http, $rootScope, $cookies, $inte
};
$scope.getNotifications = function () {
// 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);
$rootScope.$broadcast("notifications", $scope.notifications);
});
......@@ -62,7 +62,7 @@ app.directive('headerNotification', function ($http, $rootScope, $cookies, $inte
// when clicked mark as read notification
// it can be list of notifications
$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) {
$scope.groupNotifications(data.notifications);
$rootScope.$broadcast("notifications", $scope.notifications);
......@@ -82,7 +82,7 @@ app.directive('headerNotification', function ($http, $rootScope, $cookies, $inte
* toggle collapses sidebar menu when clicked menu button
*/
app.directive('collapseMenu', function ($timeout) {
app.directive('collapseMenu', function ($timeout, $window) {
return {
templateUrl: 'shared/templates/directives/menuCollapse.html',
restrict: 'E',
......@@ -93,21 +93,25 @@ app.directive('collapseMenu', function ($timeout) {
$rootScope.sidebarPinned = false;
$scope.collapseToggle = function () {
if ($rootScope.collapsed === false) {
jQuery(".sidebar").css("width" , "62px");
jQuery(".manager-view").css("width" , "calc(100% - 62px)");
$rootScope.collapsed = true;
$rootScope.sidebarPinned = false;
} else {
jQuery("span.menu-text, span.arrow, .sidebar footer").fadeIn(400);
jQuery(".sidebar").css("width" , "250px");
jQuery(".manager-view").css("width" , "calc(100% - 250px)");
$rootScope.collapsed = false;
$rootScope.sidebarPinned = true;
if ($window.innerWidth > '768') {
if ($rootScope.collapsed === false) {
jQuery(".sidebar").css("width", "62px");
jQuery(".manager-view").css("width", "calc(100% - 62px)");
$rootScope.collapsed = true;
$rootScope.sidebarPinned = false;
} else {
jQuery("span.menu-text, span.arrow, .sidebar footer").fadeIn(400);
jQuery(".sidebar").css("width", "250px");
jQuery(".manager-view").css("width", "calc(100% - 250px)");
$rootScope.collapsed = false;
$rootScope.sidebarPinned = true;
}
}
};
$timeout(function(){
$timeout(function () {
$scope.collapseToggle();
});
}
......@@ -116,21 +120,19 @@ app.directive('collapseMenu', function ($timeout) {
/**
* headerSubmenu directive
* todo: will be deleted
*/
app.directive('headerSubMenu', function () {
app.directive('headerSubMenu', function ($location) {
return {
templateUrl: 'shared/templates/directives/header-sub-menu.html',
restrict: 'E',
controller: "CRUDAddEditCtrl",
//controller: "CRUDAddEditCtrl",
replace: true,
link: function ($scope) {
$scope.triggerSubmit = function () {
// todo: double make it but single not solve this!
angular.element($('#submitbutton')).triggerHandler('click');
angular.element($('#submitbutton')).triggerHandler('click');
};
$scope.$on('$routeChangeStart', function () {
console.log($location.path()); //
$scope.style = $location.path() === '/dashboard' ? 'width:calc(100% - 300px);' : 'width:%100 !important;';
});
}
};
});
......@@ -176,7 +178,7 @@ app.directive('sidebar', ['$location', function () {
restrict: 'E',
replace: true,
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) {
var newMenuItems = {};
angular.forEach(menuItems, function (value, key) {
......@@ -219,7 +221,9 @@ app.directive('sidebar', ['$location', function () {
// $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
......@@ -228,27 +232,35 @@ app.directive('sidebar', ['$location', function () {
var menu = {other: $scope.allMenuItems.other};
menu[data] = $scope.allMenuItems[data];
$scope.menuItems = $scope.prepareMenu(menu);
$timeout(function(){sidebarmenu.metisMenu()});
$timeout(function () {
sidebarmenu.metisMenu()
});
});
$scope.openSidebar = function () {
if ($rootScope.sidebarPinned === false) {
jQuery("span.menu-text, span.arrow, .sidebar footer, #side-menu").fadeIn(400);
jQuery(".sidebar").css("width" , "250px");
jQuery(".manager-view").css("width" , "calc(100% - 250px)");
$rootScope.collapsed = false;
if ($window.innerWidth > '768') {
if ($rootScope.sidebarPinned === false) {
jQuery("span.menu-text, span.arrow, .sidebar footer, #side-menu").fadeIn(400);
jQuery(".sidebar").css("width", "250px");
jQuery(".manager-view").css("width", "calc(100% - 250px)");
$rootScope.collapsed = false;
}
}
};
$scope.closeSidebar = function () {
if ($rootScope.sidebarPinned === false) {
jQuery(".sidebar").css("width" , "62px");
jQuery(".manager-view").css("width" , "calc(100% - 62px)");
$rootScope.collapsed = true;
if ($window.innerWidth > '768') {
if ($rootScope.sidebarPinned === false) {
jQuery(".sidebar").css("width", "62px");
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) {
if (newindex > -1) {
$scope.menuItems = [$scope.allMenuItems[newindex]];
......
<div class="manager-view-header">
<div class="manager-view-header" style="{{style}}">
<div class="clearfix">
<header-breadcrumb></header-breadcrumb>
<loaderdiv><div></div></loaderdiv>
<!--<div class="loader">Loading...</div>-->
<selected-user class="pull-right"></selected-user>
</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>
\ No newline at end of file
......@@ -89,14 +89,17 @@ form_generator.factory('Generator', function ($http, $q, $timeout, $location, $c
scope.form[scope.form.indexOf(k)] = {
type: v.type,
title: v.title,
style: "btn-primary",
onClick: function(){
delete scope.form_params.cmd;
delete scope.form_params.flow;
if (v.cmd) {
// todo: cmd property to form_params, test it!
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);
}
};
......@@ -337,11 +340,16 @@ form_generator.factory('Generator', function ($http, $q, $timeout, $location, $c
});
var data = {
"form": $scope.model,
"cmd": $scope.form_params.cmd,
//"subcmd": "do_list",
"model": $scope.form_params.model,
"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) {
//var get_diff = FormDiff.get_diff($scope.model, $scope.initialModel);
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