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
be981d93
Commit
be981d93
authored
Nov 09, 2015
by
Evren Kutar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
version 0.4.1
parent
ac9ef425
Changes
6
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
72 additions
and
37 deletions
+72
-37
Gruntfile.js
Gruntfile.js
+29
-13
VERSION
VERSION
+1
-1
version.js
app/components/version/version.js
+1
-1
directives.js
app/shared/directives.js
+18
-7
sidebar.html
app/shared/templates/directives/sidebar.html
+22
-14
app.js
dist/app.js
+1
-1
No files found.
Gruntfile.js
View file @
be981d93
...
...
@@ -83,7 +83,20 @@ module.exports = function (grunt) {
//{expand: true, cwd: 'app/shared/scripts/', src: 'theme.js', dest: 'dist/bower_components/', flatten: true, filter: 'isFile'},
{
expand
:
true
,
cwd
:
'app/shared/scripts/'
,
src
:
'jquery-ui.min.js'
,
dest
:
'dist/bower_components/'
,
flatten
:
true
,
filter
:
'isFile'
}
]
},
local_prod
:
{
files
:
[
{
expand
:
true
,
cwd
:
'app/bower_components/font-awesome/fonts/'
,
src
:
'*'
,
dest
:
'dist/fonts/'
,
flatten
:
true
,
filter
:
'isFile'
},
{
expand
:
true
,
cwd
:
'app/img/'
,
src
:
'brand-logo.png'
,
dest
:
'dist/img/'
,
flatten
:
true
,
filter
:
'isFile'
},
{
expand
:
true
,
cwd
:
'app/img/'
,
src
:
'loading_spinner.gif'
,
dest
:
'dist/img/'
,
flatten
:
true
,
filter
:
'isFile'
},
{
expand
:
true
,
cwd
:
'app/styles/roboto/'
,
src
:
'**/*'
,
dest
:
'dist/css/roboto/'
,
flatten
:
false
},
{
expand
:
true
,
cwd
:
'app/styles/'
,
src
:
'jquery-ui.min.css'
,
dest
:
'dist/css/'
,
flatten
:
true
},
{
expand
:
true
,
cwd
:
'app/styles/images/'
,
src
:
'*'
,
dest
:
'dist/css/images/'
,
flatten
:
true
},
{
expand
:
true
,
cwd
:
'app/bower_components/bootstrap/dist/fonts/'
,
src
:
'*'
,
dest
:
'dist/fonts/'
,
flatten
:
true
,
filter
:
'isFile'
},
{
expand
:
true
,
cwd
:
'app/bower_components/jquery/dist/'
,
src
:
'jquery.min.js'
,
dest
:
'dist/bower_components/'
,
flatten
:
true
,
filter
:
'isFile'
},
{
expand
:
true
,
cwd
:
'app/bower_components/angular/'
,
src
:
'angular.js'
,
dest
:
'dist/bower_components/'
,
flatten
:
true
,
filter
:
'isFile'
},
{
expand
:
true
,
cwd
:
'app/shared/scripts/'
,
src
:
'jquery-ui.min.js'
,
dest
:
'dist/bower_components/'
,
flatten
:
true
,
filter
:
'isFile'
}
]
}
},
concat
:
{
...
...
@@ -203,6 +216,13 @@ module.exports = function (grunt) {
atBegin
:
false
}
},
local_prod
:
{
files
:
[
'app/**/*.js'
,
'app/components/**/*.html'
,
'app/main.html'
,
'Gruntfile.js'
,
'!app/tmp/*.js'
,
'!app/app.js'
],
tasks
:
[
'env:prod'
,
'preprocess:prod'
,
'nggettext_compile'
,
'concat:js'
,
'concat:css'
,
'concat:components'
,
'copy:local_prod'
,
'html2js:prod'
,
'uglify:dist'
],
options
:
{
atBegin
:
false
}
},
min
:
{
files
:
[
'app/**/*.js'
,
'index.html'
,
'app/components/**/*.html'
],
tasks
:
[
'karma:unit'
,
'html2js:dist'
,
'concat:dist'
,
'uglify:dist'
],
...
...
@@ -250,6 +270,12 @@ module.exports = function (grunt) {
port
:
8080
,
base
:
'app'
}
},
prod_server
:
{
options
:
{
port
:
8080
,
base
:
'dist'
}
}
},
preprocess
:
{
...
...
@@ -307,18 +333,8 @@ module.exports = function (grunt) {
grunt
.
registerTask
(
'dev'
,
[
'env:dev'
,
'preprocess:dev'
,
'html2js:dev'
,
'connect:server'
,
'watch:dev'
]);
grunt
.
registerTask
(
'test'
,
[
'bower'
,
'karma:continuous'
]);
grunt
.
registerTask
(
'i18n'
,
[
'nggettext_extract'
,
'nggettext_compile'
]);
grunt
.
registerTask
(
'default'
,
[
'bower'
,
'env:prod'
,
'preprocess:prod'
,
'nggettext_compile'
,
'concat:js'
,
'concat:css'
,
'concat:components'
,
'copy:prod'
,
'html2js:prod'
,
'uglify:dist'
]);
grunt
.
registerTask
(
'local_prod'
,
[
'bower'
,
'env:prod'
,
'preprocess:prod'
,
'nggettext_compile'
,
'concat:js'
,
'concat:css'
,
'concat:components'
,
'copy:local_prod'
,
'html2js:prod'
,
'uglify:dist'
,
'connect:prod_server'
,
'watch:local_prod'
]);
grunt
.
registerTask
(
'default'
,
[
'bower'
,
'env:prod'
,
'preprocess:prod'
,
'nggettext_compile'
,
'concat:js'
,
'concat:css'
,
'concat:components'
,
'copy:prod'
,
'html2js:prod'
,
'uglify:dist'
]);
grunt
.
registerTask
(
'branch'
,
''
,
function
()
{
// get branch name
var
branch
=
require
(
'git-branch'
);
...
...
VERSION
View file @
be981d93
0.4.0
\ No newline at end of file
0.4.1
\ No newline at end of file
app/components/version/version.js
View file @
be981d93
...
...
@@ -5,4 +5,4 @@ angular.module('ulakbus.version', [
'ulakbus.version.version-directive'
])
.
value
(
'version'
,
'0.4.
0
'
);
.
value
(
'version'
,
'0.4.
1
'
);
app/shared/directives.js
View file @
be981d93
...
...
@@ -177,31 +177,41 @@ app.directive('sidebar', ['$location', function () {
replace
:
true
,
scope
:
{},
controller
:
function
(
$scope
,
$rootScope
,
$cookies
,
$route
,
$http
,
RESTURL
,
$location
,
$timeout
)
{
$scope
.
prepareMenu
=
function
(
menuItems
)
{
var
newMenuItems
=
{};
angular
.
forEach
(
menuItems
,
function
(
value
,
key
)
{
angular
.
forEach
(
value
,
function
(
v
,
k
)
{
newMenuItems
[
k
]
=
v
;
});
});
return
newMenuItems
;
};
var
sidebarmenu
=
$
(
'#side-menu'
);
sidebarmenu
.
metisMenu
();
$http
.
get
(
RESTURL
.
url
+
'menu/'
)
.
success
(
function
(
data
)
{
$scope
.
allMenuItems
=
angular
.
copy
(
data
);
function
reGroupMenuItems
(
items
)
{
// regroup menu items based on their category
function
reGroupMenuItems
(
items
,
baseCategory
)
{
var
newItems
=
{};
angular
.
forEach
(
items
,
function
(
value
,
key
)
{
newItems
[
value
.
kategori
]
=
newItems
[
value
.
kategori
]
||
[];
value
[
'baseCategory'
]
=
baseCategory
;
newItems
[
value
.
kategori
].
push
(
value
);
});
return
newItems
;
}
angular
.
forEach
(
$scope
.
allMenuItems
,
function
(
value
,
key
)
{
$scope
.
allMenuItems
[
key
]
=
reGroupMenuItems
(
value
);
$scope
.
allMenuItems
[
key
]
=
reGroupMenuItems
(
value
,
key
);
});
console
.
log
(
$scope
.
allMenuItems
);
// broadcast for authorized menu items, consume in dashboard
$rootScope
.
$broadcast
(
"authz"
,
data
);
$scope
.
menuItems
=
{
"other"
:
$scope
.
allMenuItems
.
other
}
;
$scope
.
menuItems
=
$scope
.
prepareMenu
({
other
:
$scope
.
allMenuItems
.
other
})
;
// if selecteduser on cookie then add related part to the menu
...
...
@@ -215,8 +225,9 @@ app.directive('sidebar', ['$location', function () {
// changing menu items by listening for broadcast
$scope
.
$on
(
"menuitems"
,
function
(
event
,
data
)
{
$scope
.
menuItems
[
data
]
=
$scope
.
allMenuItems
[
data
];
$scope
.
menuItems
[
"other"
]
=
$scope
.
allMenuItems
[
'other'
];
var
menu
=
{
other
:
$scope
.
allMenuItems
.
other
};
menu
[
data
]
=
$scope
.
allMenuItems
[
data
];
$scope
.
menuItems
=
$scope
.
prepareMenu
(
menu
);
$timeout
(
function
(){
sidebarmenu
.
metisMenu
()});
});
...
...
app/shared/templates/directives/sidebar.html
View file @
be981d93
...
...
@@ -11,31 +11,39 @@
<span
class=
"menu-text"
ng-class=
"{hidden: $root.collapsed}"
>
Panel
</span>
</a>
</li>
<li
ng-repeat=
"(key, item) in menuItems"
ng-class=
"{active: collapseVar == $index+1}"
>
{{dropDown}}
<a
href=
""
ng-click=
"check($index+1)"
>
<i
class=
"fa fa-fw fa-cogs"
ng-class=
"{
'other': 'fa fa-fw fa-wrench',
'ogrenci': 'fa fa-fw fa-university',
'personel': 'fa fa-fw
fa-users'}[ke
y]"
></i>
'personel': 'fa fa-fw
key-users'}[item[0].baseCategor
y]"
></i>
<span
class=
"menu-text"
ng-class=
"{hidden: $root.collapsed}"
>
{{ key }}
</span>
<span
class=
"fa arrow"
ng-class=
"{hidden: $root.collapsed}"
></span>
</a>
<ul
class=
"nav nav-second-level"
ng-class=
"{hidden: $root.collapsed}"
>
<li
ng-repeat=
"(key2, item2) in item"
>
<a
href=
"#"
>
{{key2}}
<span
class=
"fa arrow"
></span></a>
<ul
class=
"nav nav-third-level collapse in"
aria-expanded=
"true"
>
<li
ng-repeat=
"(k,v) in item2"
>
<a
ng-if=
"key == 'other'"
ng-href=
"#{{v.url}}"
ng-click=
"breadcrumb([key, v.text], $event)"
>
{{v.text}}
</a>
<a
ng-if=
"key == 'ogrenci' || key == 'personel'"
ng-href=
"#{{v.url}}/list?{{v.param}}={{$root.selectedUser.key}}"
ng-click=
"breadcrumb([key, v.text], $event)"
>
{{v.text}}
</a>
</li>
</ul>
<!-- /.nav-third-level -->
<li
ng-repeat=
"(k, v) in item"
>
<a
ng-if=
"v['baseCategory'] == 'other'"
ng-href=
"#{{v.url}}"
ng-click=
"breadcrumb([key, v.text], $event)"
>
{{v.text}}
</a>
<a
ng-if=
"v['baseCategory'] == 'ogrenci' || v['baseCategory'] == 'personel'"
ng-href=
"#{{v.url}}/list?{{v.param}}={{$root.selectedUser.key}}"
ng-click=
"breadcrumb([key, v.text], $event)"
>
{{v.text}}
</a>
</li>
<!--<li ng-repeat="(key2, item2) in item">-->
<!--<a href="#">{{key2}} <span class="fa arrow"></span></a>-->
<!--<ul class="nav nav-third-level collapse in" aria-expanded="true">-->
<!--<li ng-repeat="(k,v) in item2">-->
<!--<a ng-if="key == 'other'" ng-href="#{{v.url}}"-->
<!--ng-click="breadcrumb([key, v.text], $event)">{{v.text}}</a>-->
<!--<a ng-if="key == 'ogrenci' || key == 'personel'"-->
<!--ng-href="#{{v.url}}/list?{{v.param}}={{$root.selectedUser.key}}"-->
<!--ng-click="breadcrumb([key, v.text], $event)">{{v.text}}</a>-->
<!--</li>-->
<!--</ul>-->
<!--<!– /.nav-third-level –>-->
<!--</li>-->
</ul>
<!-- /.nav-second-level -->
</li>
...
...
dist/app.js
View file @
be981d93
This diff is collapsed.
Click to expand it.
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