Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
mytime
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
Narendar Vakiti
mytime
Commits
5365ae60
Commit
5365ae60
authored
Aug 22, 2018
by
vsunke-nisum-com
Committed by
rbonthala-nisum-com
Aug 22, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
FEATURE/MANAGEGROUP (#163)
parent
5d02439c
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
62 additions
and
3 deletions
+62
-3
LeftMenuController.js
src/main/webapp/WEB-INF/controllers/LeftMenuController.js
+27
-1
default-styles.css
src/main/webapp/WEB-INF/css/default-styles.css
+4
-0
leftmenu.html
src/main/webapp/WEB-INF/templates/leftmenu.html
+31
-2
No files found.
src/main/webapp/WEB-INF/controllers/LeftMenuController.js
View file @
5365ae60
...
...
@@ -4,7 +4,8 @@ myApp.controller("leftmenuController",function($scope, myFactory, $compile){
$scope
.
empEmailId
=
myFactory
.
getEmpEmailId
();
$scope
.
role
=
myFactory
.
getEmpRole
();
$scope
.
menuItems
=
myFactory
.
getMenuItems
();
$scope
.
manageGroup
=
[];
$scope
.
nonManageGroup
=
[];
$scope
.
setTemplateUrl
=
function
(
path
){
var
element
=
document
.
getElementById
(
'main'
);
path
=
"'"
+
path
+
"'"
;
...
...
@@ -16,4 +17,29 @@ myApp.controller("leftmenuController",function($scope, myFactory, $compile){
$
(
'#main'
).
html
(
newTemplate
);
$compile
(
$
(
'#main'
))(
$scope
)
}
$scope
.
manageGroup
=
[];
$scope
.
nonManageGroup
=
[];
for
(
var
i
=
0
;
i
<
$scope
.
menuItems
.
length
;
i
++
){
if
(
$scope
.
menuItems
[
i
].
menu
.
indexOf
(
'Manage'
)
!==
-
1
)
{
$scope
.
manageGroup
.
push
(
$scope
.
menuItems
[
i
]);
}
else
{
$scope
.
nonManageGroup
.
push
(
$scope
.
menuItems
[
i
]);
}
}
console
.
log
(
'MANAGE'
,
$scope
.
manageGroup
);
console
.
log
(
'NONMANAGE'
,
$scope
.
nonManageGroup
);
$scope
.
custom
=
true
;
$scope
.
toggleManage
=
function
(){
$scope
.
custom
=
$scope
.
custom
===
false
?
true
:
false
;
}
$scope
.
togglenonManage
=
function
(){
if
(
!
$scope
.
custom
){
$scope
.
custom
=
true
;
}
}
});
\ No newline at end of file
src/main/webapp/WEB-INF/css/default-styles.css
View file @
5365ae60
...
...
@@ -229,3 +229,7 @@ md-select {
.activeMenu
{
background-color
:
#312A25
;
}
.manageGroup
{
padding-left
:
15px
;
list-style
:
none
;
}
\ No newline at end of file
src/main/webapp/WEB-INF/templates/leftmenu.html
View file @
5365ae60
<!-- Sidebar -->
<div
id=
"sidebar-wrapper"
>
<ul
class=
"sidebar-nav col-lg-12 col-md-12 col-sm-12 col-xs-12"
>
<li
ng-repeat=
"menuItem in menuItems"
><a
href=
"#"
class=
"navbarMenu"
<!-- <span ng-click="toggleManage()" style="color: gainsboro; cursor: pointer;"><i class="fa fa-users" style="font-size: 1.5em; margin-right: 15px;" aria-hidden="true"></i>Manage Group <i class="fa fa-caret-down" style="margin-left: 15px;"></i></span>
<li ng-repeat="manageItem in manageGroup">
<a href="#" ng-hide="custom" class="navbarMenu" ng-click="setTemplateUrl(manageItem.path)"><i
class="{{manageItem.icon}}" style="font-size: 1.5em;"
aria-hidden="false"> </i> <span style="margin-left: 15px;">{{manageItem.menu}}</span></a></i>
</li> -->
<li>
<a
href=
"#"
ng-click=
"toggleManage()"
ng-show=
"manageGroup.length > 0"
>
<i
class=
"fa fa-users"
style=
"font-size: 1.5em; margin-right: 15px;"
aria-hidden=
"true"
></i>
Manage Group
<i
class=
"fa fa-caret-down"
style=
"margin-left: 15px;"
></i></a>
<ul
ng-hide=
"custom"
class=
"manageGroup"
>
<li
ng-repeat=
"manageItem in manageGroup"
>
<a
href=
"#"
class=
"navbarMenu"
ng-click=
"setTemplateUrl(manageItem.path)"
><i
class=
"{{manageItem.icon}}"
style=
"font-size: 1.5em;"
aria-hidden=
"false"
>
</i>
<span
style=
"margin-left: 15px;"
>
{{manageItem.menu}}
</span></a></i>
</li>
</ul>
</li>
<li
ng-repeat=
"nonManageItem in nonManageGroup"
ng-click=
"togglenonManage()"
class=
"nonManageGroup"
>
<a
href=
"#"
class=
"navbarMenu"
ng-click=
"setTemplateUrl(nonManageItem.path)"
>
<i
class=
"{{nonManageItem.icon}}"
style=
"font-size: 1.5em;"
aria-hidden=
"false"
></i>
<span
style=
"margin-left: 15px;"
>
{{nonManageItem.menu}}
</span>
</a>
</li>
<!-- <li ng-repeat="menuItem in menuItems"><a href="#" class="navbarMenu"
ng-click="setTemplateUrl(menuItem.path)"><i
class="{{menuItem.icon}}" style="font-size: 1.5em;"
aria-hidden=
"false"
>
</i>
<span
style=
"margin-left: 15px;"
>
{{menuItem.menu}}
</span></a></li>
aria-hidden="false"> </i> <span style="margin-left: 15px;">{{menuItem.menu}}</span></a></li> -->
</ul>
</div>
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