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
4a792e56
Commit
4a792e56
authored
Nov 02, 2015
by
Evren Kutar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
reload same page on click to sidebar menu
new error links
parent
5878d490
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
27 additions
and
20 deletions
+27
-20
app_routes.js
app/app_routes.js
+15
-11
error_controller.js
app/components/error_pages/error_controller.js
+2
-2
directives.js
app/shared/directives.js
+5
-2
sidebar.html
app/shared/templates/directives/sidebar.html
+2
-2
interceptors.js
app/zetalib/interceptors.js
+3
-3
No files found.
app/app_routes.js
View file @
4a792e56
'use strict'
;
'use strict'
;
app
.
config
([
'$routeProvider'
,
function
(
$routeProvider
)
{
app
.
config
([
'$routeProvider'
,
function
(
$routeProvider
,
$route
)
{
$routeProvider
$routeProvider
.
when
(
'/login'
,
{
.
when
(
'/login'
,
{
templateUrl
:
'components/auth/login.html'
,
templateUrl
:
'components/auth/login.html'
,
...
@@ -10,25 +10,29 @@ app.config(['$routeProvider', function ($routeProvider) {
...
@@ -10,25 +10,29 @@ app.config(['$routeProvider', function ($routeProvider) {
templateUrl
:
'components/dashboard/dashboard.html'
,
templateUrl
:
'components/dashboard/dashboard.html'
,
controller
:
'DashCtrl'
controller
:
'DashCtrl'
})
})
.
when
(
'/crud/:model/
ad
d'
,
{
.
when
(
'/crud/:model/
:i
d'
,
{
templateUrl
:
'components/crud/templates/add.html'
,
templateUrl
:
'components/crud/templates/add.html'
,
controller
:
'CRUDAddEditCtrl'
controller
:
'CRUDAddEditCtrl'
,
})
reloadOnSearch
:
true
.
when
(
'/crud/:model/edit/:id'
,
{
templateUrl
:
'components/crud/templates/add.html'
,
controller
:
'CRUDAddEditCtrl'
})
})
//.when('/crud/:model/edit/:id', {
// templateUrl: 'components/crud/templates/add.html',
// controller: 'CRUDAddEditCtrl'
//})
.
when
(
'/crud/:model'
,
{
.
when
(
'/crud/:model'
,
{
templateUrl
:
'components/crud/templates/list.html'
,
templateUrl
:
'components/crud/templates/list.html'
,
controller
:
'CRUDListCtrl'
controller
:
'CRUDListCtrl'
,
reloadOnSearch
:
true
})
})
.
when
(
'/crud/:model/:param/:id'
,
{
.
when
(
'/crud/:model/:param/:id'
,
{
templateUrl
:
'components/crud/templates/show.html'
,
templateUrl
:
'components/crud/templates/show.html'
,
controller
:
'CRUDShowCtrl'
controller
:
'CRUDShowCtrl'
,
reloadOnSearch
:
true
})
})
.
when
(
'/:model/
:id/
'
,
{
.
when
(
'/:model/'
,
{
templateUrl
:
'components/wf/templates/add.html'
,
templateUrl
:
'components/wf/templates/add.html'
,
controller
:
'WFAddEditCtrl'
controller
:
'WFAddEditCtrl'
,
reloadOnSearch
:
true
})
})
.
otherwise
({
redirectTo
:
'/dashboard'
});
.
otherwise
({
redirectTo
:
'/dashboard'
});
}])
}])
...
...
app/components/error_pages/error_controller.js
View file @
4a792e56
...
@@ -9,11 +9,11 @@
...
@@ -9,11 +9,11 @@
app
.
config
([
'$routeProvider'
,
function
(
$routeProvider
)
{
app
.
config
([
'$routeProvider'
,
function
(
$routeProvider
)
{
$routeProvider
$routeProvider
.
when
(
'/500'
,
{
.
when
(
'/
error/
500'
,
{
templateUrl
:
'components/error_pages/500.html'
,
templateUrl
:
'components/error_pages/500.html'
,
controller
:
'500Ctrl'
controller
:
'500Ctrl'
})
})
.
when
(
'/404'
,
{
.
when
(
'/
error/
404'
,
{
templateUrl
:
'components/error_pages/404.html'
,
templateUrl
:
'components/error_pages/404.html'
,
controller
:
'404Ctrl'
controller
:
'404Ctrl'
});
});
...
...
app/shared/directives.js
View file @
4a792e56
...
@@ -149,7 +149,7 @@ app.directive('sidebar', ['$location', function () {
...
@@ -149,7 +149,7 @@ app.directive('sidebar', ['$location', function () {
restrict
:
'E'
,
restrict
:
'E'
,
replace
:
true
,
replace
:
true
,
scope
:
{},
scope
:
{},
controller
:
function
(
$scope
,
$rootScope
,
$cookies
,
$http
,
RESTURL
,
$location
,
$timeout
)
{
controller
:
function
(
$scope
,
$rootScope
,
$cookies
,
$
route
,
$
http
,
RESTURL
,
$location
,
$timeout
)
{
var
sidebarmenu
=
$
(
'#side-menu'
);
var
sidebarmenu
=
$
(
'#side-menu'
);
sidebarmenu
.
metisMenu
();
sidebarmenu
.
metisMenu
();
$http
.
get
(
RESTURL
.
url
+
'menu/'
)
$http
.
get
(
RESTURL
.
url
+
'menu/'
)
...
@@ -218,7 +218,10 @@ app.directive('sidebar', ['$location', function () {
...
@@ -218,7 +218,10 @@ 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
,
$event
)
{
//if ($event.target.href==location.href) {
// $route.reload();
//}
$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
// todo: remove button
// todo: remove button
...
...
app/shared/templates/directives/sidebar.html
View file @
4a792e56
...
@@ -24,8 +24,8 @@
...
@@ -24,8 +24,8 @@
</a>
</a>
<ul
class=
"nav nav-second-level"
ng-class=
"{hidden: $root.collapsed}"
>
<ul
class=
"nav nav-second-level"
ng-class=
"{hidden: $root.collapsed}"
>
<li
ng-repeat=
"v in item"
>
<li
ng-repeat=
"v in item"
>
<a
ng-href=
"#{{v.url}}
/{{v.param}}/
{{$root.selectedUser.key}}"
<a
ng-href=
"#{{v.url}}{{$root.selectedUser.key}}"
ng-click=
"breadcrumb([key, v.text])"
>
{{v.text}}
</a>
ng-click=
"breadcrumb([key, v.text]
, $event
)"
>
{{v.text}}
</a>
</li>
</li>
</ul>
</ul>
<!-- /.nav-second-level -->
<!-- /.nav-second-level -->
...
...
app/zetalib/interceptors.js
View file @
4a792e56
...
@@ -61,7 +61,7 @@ app.config(['$httpProvider', function ($httpProvider) {
...
@@ -61,7 +61,7 @@ app.config(['$httpProvider', function ($httpProvider) {
}
}
if
(
rejection
.
status
===
404
)
{
if
(
rejection
.
status
===
404
)
{
console
.
log
(
404
);
console
.
log
(
404
);
$location
.
path
(
"/404"
);
$location
.
path
(
"/
error/
404"
);
}
}
// server 500 error returns with -1 on status.
// server 500 error returns with -1 on status.
//if (rejection.status === -1 && rejection.config.data.model) {
//if (rejection.status === -1 && rejection.config.data.model) {
...
@@ -84,8 +84,8 @@ app.config(['$httpProvider', function ($httpProvider) {
...
@@ -84,8 +84,8 @@ app.config(['$httpProvider', function ($httpProvider) {
'</div>'
+
'</div>'
+
'</div>'
+
'</div>'
+
'</div>'
+
'</div>'
+
'</div>'
).
modal
()
'</div>'
).
modal
()
;
$location
.
path
(
"/500"
);
$location
.
path
(
"/
error/
500"
);
}
}
return
$q
.
reject
(
rejection
);
return
$q
.
reject
(
rejection
);
}
}
...
...
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