Commit 344cf524 authored by Erkan Öğümsöğütlü's avatar Erkan Öğümsöğütlü

Merge remote-tracking branch 'refs/remotes/origin/master' into Collapse-Menu-Improvement

parents 86e9fe44 fece6430
......@@ -39,6 +39,11 @@ body {
a {
color:#a61229;
-webkit-transition: all .1s;
-moz-transition: all .1s;
-ms-transition: all .1s;
-o-transition: all .1s;
transition: all .1s;
}
a:hover {
......@@ -466,6 +471,145 @@ select {
padding-left: 52px;
}
.sidebar-person-info {
overflow-x: visible;
overflow-y: auto;
position: absolute;
width: 100%;
max-height: calc(85% - 139px);
background: #fff;
display:none;
}
.sidebar-person-info .identity {
color:#555;
padding:15px;
padding-bottom: 0px;
}
.sidebar-person-info .identity-header {
border-bottom: 1px solid #ECECEC;
}
.sidebar-person-info .identity-info {
margin-top:10px;
color: #6D6D6D;
border-bottom: 1px solid #ECECEC;
}
.sidebar-person-info .identity-info div {
margin-bottom:4px;
}
.sidebar-person-info .identity-info div div {
float:left;
width:80%;
}
.sidebar-person-info .identity-info span {
float:left;
width:27px;
margin-top: 3px;
}
.sidebar-person-info .identity img {
width:50px;
height:50px;
border-radius:100%;
margin:10px auto;
float:left;
margin-right:10px;
}
.sidebar-person-info .identity p.identity-name {
font-family:'robotomedium';
font-size:16px;
margin-bottom: 0;
margin-top:13px;
}
.sidebar-person-info .identity p.identity-surname {
font-family:'robotomedium';
font-size:16px;
margin-bottom: 0;
text-transform:uppercase;
}
.sidebar-person-info .identity p.identity-email {
float:left;
}
.sidebar-person-info .identity ul {
margin:0;
padding:0;
}
.sidebar-person-info .identity ul li {
list-style:none;
border:none;
}
.sidebar-person-info .person-actions {
}
.sidebar-person-info .person-actions ul {
margin:0;
padding:0;
}
.sidebar-person-info .person-actions ul li {
list-style:none;
border:none;
}
.sidebar-person-info .person-actions ul li a {
text-decoration:none;
color:#555;
display:block;
padding:10px 15px;
font-family: 'robotobold';
}
.sidebar-person-info .person-actions ul li a:hover {
background-color:#f5f5f5;
}
.sidebar-person-info .person-actions ul li a span {
margin-right:13px;
}
.sidebar-person-info .close-sidebar-person-info {
width: 45%;
margin-left: auto;
margin-right: auto;
margin-top: 11px;
border-radius: 5px;
padding: 8px 10px;
text-align: center;
cursor: pointer;
-webkit-transition: all .2s;
-moz-transition: all .2s;
-ms-transition: all .2s;
-o-transition: all .2s;
transition: all .2s;
background-color: #B93939;
color: #fff;
display:block;
}
.sidebar-person-info .close-sidebar-person-info:hover {
background-color:#9A1026;
}
.sidebar-person-info .close-sidebar-person-info span {
font-size: 12px;
color: #555;
margin-right: 6px;
position: relative;
top: -1px;
}
.btn-outline {
color: inherit;
background-color: transparent;
......@@ -848,6 +992,235 @@ table.dataTable thead .sorting:after {
color:#fff;
}
.dashboard-main-search {
width: calc(100% - 300px);
}
.dashboard-main-search .dashboard-student-search h3,
.dashboard-main-search .dashboard-personnel-search h3 {
font-family: 'robotoblack';
color: #5A5A5A;
letter-spacing: 1px;
}
.dashboard-main-search input {
width: 70%;
border-radius: 3px;
border: 1px solid #e0e0e0;
padding: 7px;
outline: none;
border-right: none;
border-bottom-right-radius: 0;
border-top-right-radius: 0;
}
.dashboard-main-search .fa {
padding: 10px 15px;
border: 1px solid #e0e0e0;
border-bottom-right-radius: 3px;
border-top-right-radius: 3px;
background-color: #FBF9F9;
cursor:pointer;
color:#5A5A5A;
}
.dashboard-student-search {
float: left;
width: 50%;
border-right: 1px solid #e8e8e8;
}
.dashboard-personnel-search {
float: left;
width: 50%;
}
.dashboard-search-results {
width: 80%;
margin-left: auto;
margin-right: auto;
margin-top: 25px;
}
.dashboard-search-results ul {
max-height: 600px;
overflow-y: auto;
padding:0;
webkit-box-shadow: 0 0 4px rgba(0,0,0,0.15);
-moz-box-shadow: 0 0 4px rgba(0,0,0,0.15);
box-shadow: 0 0 4px rgba(0,0,0,0.15);
background-color: #fff;
border-radius: 3px;
}
.dashboard-search-results ul li {
list-style:none;
border-bottom: 1px solid #F3F3F3;
}
.dashboard-search-results ul li:last-child {
border:none;
}
.dashboard-search-results ul li a {
color:#666;
padding: 10px 25px;
display:block;
text-decoration:none;
}
.dashboard-search-results ul li a:hover {
background-color:#f5f5f5;
}
.dashboard-search-results ul li:first-child a:hover {
border-top-left-radius:3px;
border-top-right-radius:3px;
}
.dashboard-search-results ul li:last-child a:hover {
border-bottom-left-radius:3px;
border-bottom-right-radius:3px;
}
.right-sidebar {
width: 300px;
background-color: #FFFFFF;
border-left: 1px solid #ccc;
height: calc(100% - 140px);
position: absolute;
top: 98px;
right: 0px;
overflow-y: auto;
}
.right-sidebar-box {
border-bottom: 1px solid #D0D0D0;
}
.right-sidebar-title {
border-bottom: 1px solid #D0D0D0;
padding: 10px;
background-color: #F3F3F3;
}
.right-sidebar-title h3 {
float: left;
margin: 0;
font-size: 16px;
color: #666;
font-weight: bold;
font-family: 'robotobold';
text-transform: uppercase;
line-height:normal;
}
.right-sidebar-title span a {
float: right;
color: #A61229;
text-decoration:none;
}
.right-sidebar-message-block {
border-bottom: 1px solid #F3F3F3;
}
.right-sidebar-message-block:last-child {
border-bottom:none;
}
.right-sidebar-message-block a {
padding: 10px 15px;
display: block;
color: #555;
}
.right-sidebar-message-block a:hover{
background-color:#f5f5f5;
}
.right-sidebar-message-block a img {
width: 30px;
height: 30px;
border-radius: 100%;
float: left;
}
.right-sidebar-message-content {
float: left;
margin-left: 15px;
position:relative;
width: calc(100% - 50px);
}
.right-sidebar-message-content div:nth-child(1) {
width: 180px;
white-space: nowrap;
text-overflow: ellipsis;
overflow: hidden;
font-family: 'robotomedium';
font-size: 15px;
margin-top: -5px;
}
.right-sidebar-message-content div:nth-child(2) {
width: 180px;
white-space: nowrap;
text-overflow: ellipsis;
overflow: hidden;
margin-top: -5px;
}
.right-sidebar-message-content div:nth-child(3) {
color: #8C8C8C;
position: absolute;
right: 0;
top: 5px;
}
.right-sidebar-task-block a {
padding: 10px 25px;
display: block;
color: #555;
text-decoration:none;
}
.right-sidebar-task-block a:hover {
background-color:#f5f5f5;
}
.right-sidebar-task-block .task-type {
padding: 5px 10px;
font-size: 15px;
font-family: 'robotomedium';
color: #666;
}
.right-sidebar-task-block .progress {
margin-top: 5px;
margin-bottom: 0;
}
.right-sidebar-task-block .progress .progress-bar {
background-color: #A61229;
}
.right-sidebar-announcement-block a,
.right-sidebar-last-action-block a {
width: 100%;
display: block;
padding: 7px 15px;
color:#555;
text-decoration:none;
border-bottom: 1px solid #f3f3f3;
}
.right-sidebar-announcement-block a:hover,
.right-sidebar-last-action-block a:hover {
background-color:#f5f5f5;
}
/* END OF DASHBOARD */
......@@ -868,7 +1241,6 @@ table.dataTable thead .sorting:after {
-webkit-box-shadow: 0 0 3px rgba(0,0,0,0.1);
-moz-box-shadow: 0 0 3px rgba(0,0,0,0.1);
box-shadow: 0 0 3px rgba(0,0,0,0.1);
background-color:#fff;
position:relative;
}
......@@ -1117,6 +1489,10 @@ table.dataTable thead .sorting:after {
color: #A7A7A7;
border-bottom: 1px solid #ccc;
}
.sidebar-collapse-button {
display:none;
}
}
......
......@@ -28,13 +28,13 @@
</label>
</td>
<th scope="row" style="text-align:center">{{$index}}</th>
<td ng-repeat="k in object" ng-if="nobjects[0]=='-1' && $index>0">
<td ng-repeat="k in object track by $index" ng-if="nobjects[0]=='-1' && $index>0">
<a ng-href="#/crud/{{model}}/{{object[0]}}">{{object[1]}}</a>
</td>
<td ng-repeat="(key,value) in object" ng-if="nobjects[0]!='-1' && $index>0">
<a ng-href="#/crud/{{model}}/{{object[0]}}" ng-if="$index==1">{{value}}</a>
<span ng-if="$index!=1">{{value}}</span>
<td ng-repeat="(key,value) in object track by $index" ng-if="nobjects[0]!='-1' && $index>0">
<a ng-href="#/crud/{{model}}/{{object[0]}}" ng-if="$index==1">{{object[key]}}</a>
<span ng-if="$index!=1">{{object[key]}}</span>
</td>
<td>
<a ng-href="#/crud/{{model}}/edit/{{object[0]}}">Edit</a><br>
......
This diff is collapsed.
......@@ -7,12 +7,99 @@
'use strict';
// TODO: clean console log items
angular.module('ulakbus.dashboard', ['ngRoute'])
.controller('DashCtrl', function ($scope, $rootScope) {
.controller('DashCtrl', function ($scope, $rootScope, $timeout, $http, RESTURL) {
$scope.section = function (section_index) {
$rootScope.section = section_index;
};
});
\ No newline at end of file
$scope.what = "";
$scope.listitems = [];
$scope.search = function (where) {
$timeout(function () {
if ($scope.what.length > 3) {
// if input length greater than 3 search for the value
$http.post(RESTURL.url + where, {"query": $scope.what})
.success(function (data) {
$scope.listitems = data;
});
}
});
};
// when select a user from list
//$http.post(RESTURL.url + 'crud/').success(function (data) {
// $scope.allMenuItems = angular.copy(data.app_models);
// $scope.menuItems = []; // angular.copy($scope.allMenuItems);
// // at start define breadcrumblinks for breadcrumb
// angular.forEach(data.app_models, function (value, key) {
// angular.forEach(value[1], function (v, k) {
// if (v[1] === $location.path().split('/')[2]) {
// $rootScope.breadcrumblinks = [value[0], v[0]];
// $scope.menuItems = [$scope.allMenuItems[key]];
// } else {
// $rootScope.breadcrumblinks = ['Panel'];
// }
// });
// });
//});
//$rootScope.$watch(function ($rootScope) {
// return $rootScope.section;
// },
// function (newindex, oldindex) {
// if (newindex > -1) {
// $scope.menuItems = [$scope.allMenuItems[newindex]];
// $scope.collapseVar = 1;
// $timeout(function () {
// $('#side-menu').metisMenu();
// });
// }
// });
//
//$scope.selectedMenu = $location.path();
//$scope.collapseVar = 0;
//$scope.multiCollapseVar = 0;
//
//$scope.check = function (x) {
//
// if (x === $scope.collapseVar) {
// $scope.collapseVar = 0;
// } else {
// $scope.collapseVar = x;
// }
//
//};
//
//// breadcrumb function changes breadcrumb items and itemlist must be list
//$scope.breadcrumb = function (itemlist) {
// $rootScope.breadcrumblinks = itemlist;
// // showSaveButton is used for to show or not to show save button on top of the page
// $rootScope.showSaveButton = false;
//};
//
//$scope.multiCheck = function (y) {
//
// if (y === $scope.multiCollapseVar) {
// $scope.multiCollapseVar = 0;
// } else {
// $scope.multiCollapseVar = y;
// }
//};
})
//.directive('sidebar', ['$location', function () {
// return {
// templateUrl: 'shared/templates/directives/sidebar.html',
// restrict: 'E',
// replace: true,
// scope: {},
// controller: function ($scope, $rootScope, $http, RESTURL, $location, $timeout) {
//
//
// }
// };
//}]);
......@@ -22,6 +22,49 @@
</ul>
</div>
<!-- /.sidebar-collapse -->
<!-- sidebar-person-info -->
<div class="sidebar-person-info">
<button class="btn btn-primary close-sidebar-person-info">Profili Kapat</button>
<div class="identity">
<div class="identity-header clearfix">
<img src="../../../img/sample-profile-pic.jpg">
<div class="pull-left">
<p class="identity-name">Erkan</p>
<p class="identity-surname">Öğümsöğütlü</p>
</div>
</div>
<!-- end of identity-header -->
<div class="identity-info">
<div class="clearfix">
<span class="fa fa-phone"></span> <div>539 241 65 08</div>
</div>
<div class="clearfix">
<span class="fa fa-envelope"></span>
<div>erkanogum@gmail.com</div>
</div>
<div class="clearfix">
<span class="fa fa-home"></span>
<div>İşçi Blokları Mah. 1524. sokak B Blok 6. Kat A Kanat 27 numara</div>
</div>
</div>
</div>
<!-- end of identity -->
<div class="person-actions">
<ul>
<li><a href="#"><span class="fa fa-trash"></span> Action 1</a></li>
<li><a href="#"><span class="fa fa-trash"></span> Action 2</a></li>
<li><a href="#"><span class="fa fa-trash"></span> Action 3</a></li>
<li><a href="#"><span class="fa fa-trash"></span> Action 4</a></li>
<li><a href="#"><span class="fa fa-trash"></span> Action 5</a></li>
</ul>
</div>
<!-- end of person-actions -->
</div>
<!-- end of sidebar-person-info -->
<footer>
<span>v <app-version></app-version> &copy; ZetaOps</span>
</footer>
......
......@@ -35,13 +35,13 @@ app.config(['$httpProvider', function ($httpProvider) {
}
// if (response.data.client_cmd) {
//$location.path(response.data.screen);
//$location.path(response.data.screen);
// }
return response;
},
'responseError': function (rejection) {
// if unauthorized then redirect to login page
if (rejection.status === 400) {
$location.reload();
}
......@@ -65,8 +65,29 @@ app.config(['$httpProvider', function ($httpProvider) {
$location.path("/404");
}
// server 500 error returns with -1 on status.
if (rejection.status === -1 && rejection.config.data.model) {
$location.path("/500");
//if (rejection.status === -1 && rejection.config.data.model) {
if (rejection.status === 500) {
// todo: redirect to 500
//$location.path("/500");
$('<div class="modal">' +
'<div class="modal-dialog" style="width:1024px;" role="document">' +
'<div class="modal-content">' +
'<div class="modal-header">' +
'<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span' +
' aria-hidden="true">&times;</span></button>' +
'<h4 class="modal-title" id="exampleModalLabel">500 Server Error</h4>' +
'</div>' +
'<div class="modal-body">' +
'<p><pre>' +
rejection.data.error +
'</pre></p>' +
'</div>' +
'<div class="modal-footer">' +
'<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>' +
'</div>' +
'</div>' +
'</div>' +
'</div>').modal()
}
return $q.reject(rejection);
}
......
......@@ -6,13 +6,13 @@
"license": "GPL",
"private": false,
"dependencies": {
"angular": "1.3.20",
"angular": "1.4.7",
"json3": "~3.3.2",
"es5-shim": "~4.1.10",
"angular-mocks": "1.3.20",
"angular-route": "1.3.20",
"angular-resource": "1.3.20",
"angular-cookies": "1.3.20",
"angular-mocks": "1.4.x",
"angular-route": "1.4.x",
"angular-resource": "1.4.x",
"angular-cookies": "1.4.x",
"angular-bootstrap": "0.13.1",
"font-awesome": "4.3.0",
"angular-schema-form": "0.8.3",
......@@ -24,6 +24,6 @@
"angular-gettext": "2.1.0"
},
"resolutions": {
"angular": "1.3.20"
"angular": "1.4.7"
}
}
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