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
5b6df6ca
Commit
5b6df6ca
authored
Sep 29, 2015
by
Evren Kutar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
v0.0.3 change sidebar links according to section
parent
89b7aa09
Changes
7
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
48 additions
and
31 deletions
+48
-31
dashboard.html
app/components/dashboard/dashboard.html
+6
-3
dashboard_controller.js
app/components/dashboard/dashboard_controller.js
+3
-2
loading_spinner.gif
app/img/loading_spinner.gif
+0
-0
directives.js
app/shared/directives.js
+30
-20
app.js
dist/app.js
+2
-2
components.js
dist/bower_components/components.js
+1
-1
templates.js
dist/templates.js
+6
-3
No files found.
app/components/dashboard/dashboard.html
View file @
5b6df6ca
...
@@ -4,13 +4,16 @@
...
@@ -4,13 +4,16 @@
<div
class=
"row"
>
<div
class=
"row"
>
<div
class=
"major-buttons"
>
<div
class=
"major-buttons"
>
<div
class=
"col-md-4"
>
<div
class=
"col-md-4"
>
<a
href=
""
><button
type=
"button"
class=
"btn btn-personnel brand-bg"
><i
class=
"fa fa-user"
></i>
PERSONEL İŞLERİ
</button></a>
<a
href=
""
><button
type=
"button"
class=
"btn btn-personnel brand-bg"
ng-click=
"section(2)"
><i
class=
"fa fa-user"
></i>
PERSONEL İŞLERİ
</button></a>
</div>
</div>
<div
class=
"col-md-4"
>
<div
class=
"col-md-4"
>
<a
href=
""
><button
type=
"button"
class=
"btn btn-student brand-bg"
><i
class=
"fa fa-graduation-cap"
></i>
ÖĞRENCİ İŞLERİ
</button></a>
<a
href=
""
><button
type=
"button"
class=
"btn btn-student brand-bg"
ng-click=
"section(0)"
><i
class=
"fa fa-graduation-cap"
></i>
ÖĞRENCİ İŞLERİ
</button></a>
</div>
</div>
<div
class=
"col-md-4"
>
<div
class=
"col-md-4"
>
<a
href=
""
><button
type=
"button"
class=
"btn btn-system brand-bg"
><i
class=
"fa fa-gears"
></i>
SİSTEM
</button></a>
<a
href=
""
><button
type=
"button"
class=
"btn btn-system brand-bg"
ng-click=
"section(3)"
><i
class=
"fa fa-gears"
></i>
SİSTEM
</button></a>
</div>
</div>
</div>
</div>
</div>
</div>
...
...
app/components/dashboard/dashboard_controller.js
View file @
5b6df6ca
...
@@ -12,6 +12,7 @@
...
@@ -12,6 +12,7 @@
angular
.
module
(
'ulakbus.dashboard'
,
[
'ngRoute'
])
angular
.
module
(
'ulakbus.dashboard'
,
[
'ngRoute'
])
.
controller
(
'DashCtrl'
,
function
(
$scope
,
$rootScope
,
$location
)
{
.
controller
(
'DashCtrl'
,
function
(
$scope
,
$rootScope
,
$location
)
{
//if($rootScope.loggedInUser){$location.path("/login");}
$scope
.
section
=
function
(
section_index
){
$scope
.
testData
=
"<h1>This is main Dashboard</h1>"
;
$rootScope
.
section
=
section_index
;
}
});
});
\ No newline at end of file
app/img/loading_spinner.gif
0 → 100644
View file @
5b6df6ca
43.6 KB
app/shared/directives.js
View file @
5b6df6ca
...
@@ -39,8 +39,8 @@ app.directive('headerSubMenu', function () {
...
@@ -39,8 +39,8 @@ app.directive('headerSubMenu', function () {
restrict
:
'E'
,
restrict
:
'E'
,
controller
:
"CRUDAddEditCtrl"
,
controller
:
"CRUDAddEditCtrl"
,
replace
:
true
,
replace
:
true
,
link
:
function
(
$scope
)
{
link
:
function
(
$scope
)
{
$scope
.
triggerSubmit
=
function
()
{
$scope
.
triggerSubmit
=
function
()
{
// todo: double make it but single not solve this!
// todo: double make it but single not solve this!
angular
.
element
(
$
(
'#submitbutton'
)).
triggerHandler
(
'click'
);
angular
.
element
(
$
(
'#submitbutton'
)).
triggerHandler
(
'click'
);
angular
.
element
(
$
(
'#submitbutton'
)).
triggerHandler
(
'click'
);
angular
.
element
(
$
(
'#submitbutton'
)).
triggerHandler
(
'click'
);
...
@@ -64,28 +64,38 @@ app.directive('sidebar', ['$location', function () {
...
@@ -64,28 +64,38 @@ app.directive('sidebar', ['$location', function () {
replace
:
true
,
replace
:
true
,
scope
:
{},
scope
:
{},
controller
:
function
(
$scope
,
$rootScope
,
$http
,
RESTURL
,
$location
,
$timeout
)
{
controller
:
function
(
$scope
,
$rootScope
,
$http
,
RESTURL
,
$location
,
$timeout
)
{
$rootScope
.
$watch
(
$http
.
post
(
RESTURL
.
url
+
'crud/'
).
success
(
function
(
data
)
{
$rootScope
.
loggedInUser
,
function
(){
$scope
.
allMenuItems
=
data
.
app_models
;
$http
.
post
(
RESTURL
.
url
+
'crud/'
).
success
(
function
(
data
)
{
$scope
.
menuItems
=
[];
// angular.copy($scope.allMenuItems);
$scope
.
menuItems
=
data
.
app_models
;
// at start define breadcrumblinks for breadcrumb
// at start define breadcrumblinks for breadcrumb
angular
.
forEach
(
data
.
app_models
,
function
(
value
,
key
)
{
angular
.
forEach
(
data
.
app_models
,
function
(
value
,
key
)
{
angular
.
forEach
(
value
[
1
],
function
(
v
,
k
)
{
angular
.
forEach
(
value
[
1
],
function
(
v
,
k
)
{
if
(
v
[
1
]
==
$location
.
path
().
split
(
'/'
)[
1
])
{
if
(
v
[
1
]
==
$location
.
path
().
split
(
'/'
)[
1
]){
$rootScope
.
breadcrumblinks
=
[
value
[
0
],
v
[
0
]];
$rootScope
.
breadcrumblinks
=
[
value
[
0
],
v
[
0
]];
$scope
.
menuItems
=
[
$scope
.
allMenuItems
[
key
]];
}
else
{
}
else
{
$rootScope
.
breadcrumblinks
=
[
'Panel'
];
$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
();
});
}
}
}
);
);
// todo: change to $watch to init
// todo: change to $watch to init
$timeout
(
function
()
{
//$timeout(function ()
{
$
(
'#side-menu'
).
metisMenu
();
//
$('#side-menu').metisMenu();
},
2000
);
//
}, 2000);
$scope
.
selectedMenu
=
$location
.
path
();
$scope
.
selectedMenu
=
$location
.
path
();
$scope
.
collapseVar
=
0
;
$scope
.
collapseVar
=
0
;
...
@@ -101,7 +111,7 @@ app.directive('sidebar', ['$location', function () {
...
@@ -101,7 +111,7 @@ app.directive('sidebar', ['$location', function () {
};
};
// breadcrumb function changes breadcrumb items and itemlist must be list
// breadcrumb function changes breadcrumb items and itemlist must be list
$scope
.
breadcrumb
=
function
(
itemlist
)
{
$scope
.
breadcrumb
=
function
(
itemlist
)
{
$rootScope
.
breadcrumblinks
=
itemlist
;
$rootScope
.
breadcrumblinks
=
itemlist
;
// showSaveButton is used for to show or not to show save button on top of the page
// showSaveButton is used for to show or not to show save button on top of the page
$rootScope
.
showSaveButton
=
false
;
$rootScope
.
showSaveButton
=
false
;
...
...
dist/app.js
View file @
5b6df6ca
This diff is collapsed.
Click to expand it.
dist/bower_components/components.js
View file @
5b6df6ca
This diff is collapsed.
Click to expand it.
dist/templates.js
View file @
5b6df6ca
...
@@ -200,13 +200,16 @@ angular.module("components/dashboard/dashboard.html", []).run(["$templateCache",
...
@@ -200,13 +200,16 @@ angular.module("components/dashboard/dashboard.html", []).run(["$templateCache",
" <div class=
\"
row
\"
>
\n
"
+
" <div class=
\"
row
\"
>
\n
"
+
" <div class=
\"
major-buttons
\"
>
\n
"
+
" <div class=
\"
major-buttons
\"
>
\n
"
+
" <div class=
\"
col-md-4
\"
>
\n
"
+
" <div class=
\"
col-md-4
\"
>
\n
"
+
" <a href=
\"\"
><button type=
\"
button
\"
class=
\"
btn btn-personnel brand-bg
\"
><i class=
\"
fa fa-user
\"
></i> PERSONEL İŞLERİ</button></a>
\n
"
+
" <a href=
\"\"
><button type=
\"
button
\"
class=
\"
btn btn-personnel brand-bg
\"
ng-click=
\"
section(2)
\"
><i class=
\"
fa fa-user
\"
></i>
\n
"
+
" PERSONEL İŞLERİ</button></a>
\n
"
+
" </div>
\n
"
+
" </div>
\n
"
+
" <div class=
\"
col-md-4
\"
>
\n
"
+
" <div class=
\"
col-md-4
\"
>
\n
"
+
" <a href=
\"\"
><button type=
\"
button
\"
class=
\"
btn btn-student brand-bg
\"
><i class=
\"
fa fa-graduation-cap
\"
></i> ÖĞRENCİ İŞLERİ</button></a>
\n
"
+
" <a href=
\"\"
><button type=
\"
button
\"
class=
\"
btn btn-student brand-bg
\"
ng-click=
\"
section(0)
\"
><i
\n
"
+
" class=
\"
fa fa-graduation-cap
\"
></i> ÖĞRENCİ İŞLERİ</button></a>
\n
"
+
" </div>
\n
"
+
" </div>
\n
"
+
" <div class=
\"
col-md-4
\"
>
\n
"
+
" <div class=
\"
col-md-4
\"
>
\n
"
+
" <a href=
\"\"
><button type=
\"
button
\"
class=
\"
btn btn-system brand-bg
\"
><i class=
\"
fa fa-gears
\"
></i> SİSTEM</button></a>
\n
"
+
" <a href=
\"\"
><button type=
\"
button
\"
class=
\"
btn btn-system brand-bg
\"
ng-click=
\"
section(3)
\"
><i class=
\"
fa fa-gears
\"
></i>
\n
"
+
" SİSTEM</button></a>
\n
"
+
" </div>
\n
"
+
" </div>
\n
"
+
" </div>
\n
"
+
" </div>
\n
"
+
" </div>
\n
"
+
" </div>
\n
"
+
...
...
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