Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
U
ulakbus-ui
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
ulakbus
ulakbus-ui
Commits
bbba9179
Commit
bbba9179
authored
Nov 11, 2015
by
Evren Kutar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
resolves #40
some css beautify
parent
a8603069
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
73 additions
and
78 deletions
+73
-78
app.css
app/app.css
+12
-32
directives.js
app/shared/directives.js
+48
-36
header-sub-menu.html
app/shared/templates/directives/header-sub-menu.html
+1
-6
form_service.js
app/zetalib/forms/form_service.js
+12
-4
No files found.
app/app.css
View file @
bbba9179
...
...
@@ -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
;
}
}
...
...
app/shared/directives.js
View file @
bbba9179
...
...
@@ -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
]];
...
...
app/shared/templates/directives/header-sub-menu.html
View file @
bbba9179
<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>-->
<!--<!–<button type="button" class="btn btn-warning">Düzenle</button>–>-->
<!--<!–<button type="button" class="btn btn-danger">İptal</button>–>-->
<!--</div>-->
</div>
\ No newline at end of file
app/zetalib/forms/form_service.js
View file @
bbba9179
...
...
@@ -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
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment