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
fde1e977
Commit
fde1e977
authored
Nov 05, 2015
by
Evren Kutar
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'issue30'
parents
7a5456dc
03618be5
Changes
10
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
94 additions
and
24 deletions
+94
-24
Gruntfile.js
Gruntfile.js
+1
-0
app.js
app/app.js
+1
-6
list.html
app/components/crud/templates/list.html
+3
-3
devSettings.html
app/components/devSettings/devSettings.html
+28
-0
devSettings_controller.js
app/components/devSettings/devSettings_controller.js
+48
-0
index.html
app/index.html
+1
-0
main.html
app/main.html
+1
-0
main.js
app/main.js
+1
-6
directives.js
app/shared/directives.js
+5
-3
header-notification.html
app/shared/templates/directives/header-notification.html
+5
-6
No files found.
Gruntfile.js
View file @
fde1e977
...
...
@@ -103,6 +103,7 @@ module.exports = function (grunt) {
"app/components/dashboard/dashboard_controller.js"
,
"app/components/crud/crud_controller.js"
,
"app/components/debug/debug_controller.js"
,
"app/components/devSettings/devSettings_controller.js"
,
"app/components/error_pages/error_controller.js"
,
"app/components/wf/wf_controller.js"
,
"app/components/version/version.js"
,
...
...
app/app.js
View file @
fde1e977
...
...
@@ -21,6 +21,7 @@ var app = angular.module(
'ulakbus.error_pages'
,
'ulakbus.crud'
,
'ulakbus.debug'
,
'ulakbus.devSettings'
,
'ulakbus.wf'
,
'ulakbus.version'
,
//'schemaForm',
...
...
@@ -42,12 +43,6 @@ var app = angular.module(
}
});
}
if
(
location
.
href
.
indexOf
(
"backendurl"
)
>
-
1
){
var
urlfromqstr
=
location
.
href
.
split
(
'?'
)[
1
].
split
(
'='
)[
1
];
backendurl
=
decodeURIComponent
(
urlfromqstr
.
replace
(
/
\+
/g
,
" "
));
document
.
cookie
=
"backendurl="
+
backendurl
;
window
.
location
.
href
=
window
.
location
.
href
.
split
(
'?'
)[
0
];
}
return
{
url
:
backendurl
};
})()).
...
...
app/components/crud/templates/list.html
View file @
fde1e977
...
...
@@ -5,10 +5,10 @@
</a>
</h1>
<div
class=
"row"
ng-if=
"!nobjects[1]"
>
<div
class=
"col-md-12"
>
<p
class=
"no-content"
>
Listelenecek içerik yok.
</p>
</div>
<div
class=
"col-md-12"
>
<p
class=
"no-content"
>
Listelenecek içerik yok.
</p>
</div>
</div>
<div
class=
"tablescroll"
ng-if=
"nobjects[1]"
>
<table
class=
"table table-bordered"
style=
"background-color:#fff;"
>
<thead>
...
...
app/components/devSettings/devSettings.html
0 → 100644
View file @
fde1e977
<div
class=
"table-responsive"
>
<table
class=
"table"
>
<tbody>
<tr>
<td
class=
"col-md-2"
>
Backend Url:
</td>
<td
class=
"col-md-8"
>
<input
class=
"form-control"
type=
"text"
placeholder=
"Backend Url Tanımla"
value=
"{{backendurl}}"
ng-model=
"backendurl"
>
<button
class=
"btn btn-primary"
ng-click=
"setbackendurl()"
>
Kaydet
</button>
</td>
</tr>
<tr>
<td>
Notifications:
</td>
<td>
<button
class=
"btn"
ng-class=
"{'btn-success':notificate=='on', 'btn-danger':notificate=='off'}"
ng-click=
"setnotification()"
>
{{notificate}}
</button>
</td>
</tr>
<tr>
<td>
Query Debug:
</td>
<td>
<a
href=
"#/debug/list"
>
Goster
</a>
</td>
</tr>
</tbody>
</table>
</div>
\ No newline at end of file
app/components/devSettings/devSettings_controller.js
0 → 100644
View file @
fde1e977
/**
* Copyright (C) 2015 ZetaOps Inc.
*
* This file is licensed under the GNU General Public License v3
* (GPLv3). See LICENSE.txt for details.
*/
'use strict'
;
app
.
config
([
'$routeProvider'
,
function
(
$routeProvider
)
{
$routeProvider
.
when
(
'/dev/settings'
,
{
templateUrl
:
'components/devSettings/devSettings.html'
,
controller
:
'DevSettingsCtrl'
});
}]);
angular
.
module
(
'ulakbus.devSettings'
,
[
'ngRoute'
])
.
controller
(
'DevSettingsCtrl'
,
function
(
$scope
,
$cookies
,
$rootScope
,
RESTURL
)
{
$scope
.
backendurl
=
$cookies
.
get
(
"backendurl"
);
$scope
.
notificate
=
$cookies
.
get
(
"notificate"
)
||
"on"
;
//$scope.querydebug = $cookies.get("querydebug") || "on";
$scope
.
changeSettings
=
function
(
what
,
set
)
{
document
.
cookie
=
what
+
"="
+
set
;
$scope
[
what
]
=
set
;
$rootScope
.
$broadcast
(
what
,
set
);
};
$scope
.
switchOnOff
=
function
(
pinn
)
{
return
pinn
==
"on"
?
"off"
:
"on"
};
$scope
.
setbackendurl
=
function
()
{
$scope
.
changeSettings
(
"backendurl"
,
$scope
.
backendurl
);
RESTURL
.
url
=
$scope
.
backendurl
;
};
$scope
.
setnotification
=
function
()
{
$scope
.
changeSettings
(
"notificate"
,
$scope
.
switchOnOff
(
$scope
.
notificate
));
};
//$scope.setquerydebug = function () {
// $scope.changeSettings("querydebug", $scope.switchOnOff($scope.querydebug));
//};
});
\ No newline at end of file
app/index.html
View file @
fde1e977
...
...
@@ -102,6 +102,7 @@
<script
src=
"components/dashboard/dashboard_controller.js"
></script>
<script
src=
"components/crud/crud_controller.js"
></script>
<script
src=
"components/debug/debug_controller.js"
></script>
<script
src=
"components/devSettings/devSettings_controller.js"
></script>
<script
src=
"components/wf/wf_controller.js"
></script>
<script
src=
"components/uitemplates/uitemplates.js"
></script>
<script
src=
"components/error_pages/error_controller.js"
></script>
...
...
app/main.html
View file @
fde1e977
...
...
@@ -110,6 +110,7 @@
<script
src=
"components/dashboard/dashboard_controller.js"
></script>
<script
src=
"components/crud/crud_controller.js"
></script>
<script
src=
"components/debug/debug_controller.js"
></script>
<script
src=
"components/devSettings/devSettings_controller.js"
></script>
<script
src=
"components/wf/wf_controller.js"
></script>
<script
src=
"components/uitemplates/uitemplates.js"
></script>
<script
src=
"components/error_pages/error_controller.js"
></script>
...
...
app/main.js
View file @
fde1e977
...
...
@@ -21,6 +21,7 @@ var app = angular.module(
'ulakbus.error_pages'
,
'ulakbus.crud'
,
'ulakbus.debug'
,
'ulakbus.devSettings'
,
'ulakbus.wf'
,
'ulakbus.version'
,
//'schemaForm',
...
...
@@ -47,12 +48,6 @@ var app = angular.module(
}
});
}
if
(
location
.
href
.
indexOf
(
"backendurl"
)
>
-
1
){
var
urlfromqstr
=
location
.
href
.
split
(
'?'
)[
1
].
split
(
'='
)[
1
];
backendurl
=
decodeURIComponent
(
urlfromqstr
.
replace
(
/
\+
/g
,
" "
));
document
.
cookie
=
"backendurl="
+
backendurl
;
window
.
location
.
href
=
window
.
location
.
href
.
split
(
'?'
)[
0
];
}
return
{
url
:
backendurl
};
})()).
...
...
app/shared/directives.js
View file @
fde1e977
...
...
@@ -26,7 +26,7 @@ app.directive('logout', function ($http, $location, RESTURL) {
* headerNotification directive for header
*/
app
.
directive
(
'headerNotification'
,
function
(
$http
,
$rootScope
,
$interval
,
RESTURL
)
{
app
.
directive
(
'headerNotification'
,
function
(
$http
,
$rootScope
,
$
cookies
,
$
interval
,
RESTURL
)
{
return
{
templateUrl
:
'shared/templates/directives/header-notification.html'
,
restrict
:
'E'
,
...
...
@@ -53,8 +53,10 @@ app.directive('headerNotification', function ($http, $rootScope, $interval, REST
// check notifications every 5 seconds
$interval
(
function
()
{
console
.
log
(
'get notification call - interval'
);
$scope
.
getNotifications
();
if
(
$cookies
.
get
(
"notificate"
)
==
"on"
)
{
console
.
log
(
'get notification call - interval'
);
$scope
.
getNotifications
();
}
},
5000
);
// when clicked mark as read notification
...
...
app/shared/templates/directives/header-notification.html
View file @
fde1e977
...
...
@@ -84,13 +84,12 @@
<i
class=
"fa fa-user fa-fw"
></i>
<i
class=
"fa fa-caret-down"
></i>
</a>
<ul
class=
"dropdown-menu dropdown-user"
>
<li><a
href=
"javascript:void(0)"
><i
class=
"fa fa-user fa-fw"
></i>
Profil
</a>
</li>
<li><a
href=
"javascript:void(0)"
><i
class=
"fa fa-gear fa-fw"
></i>
Ayarlar
</a>
</li>
<li><a
href=
"javascript:void(0)"
><i
class=
"fa fa-user fa-fw"
></i>
Profil
</a></li>
<li
class=
"divider"
></li>
<li><a
ui-sref=
"login"
href=
"javascript:void(0);"
logout
><i
class=
"fa fa-sign-out fa-fw"
></i>
Çıkış
</a>
</li>
<li><a
href=
"javascript:void(0)"
><i
class=
"fa fa-gear fa-fw"
></i>
Ayarlar
</a></li>
<li><a
href=
"#/dev/settings"
><i
class=
"fa fa-gear fa-fw"
></i>
Ayarlar (Dev)
</a></li>
<li
class=
"divider"
></li>
<li><a
ui-sref=
"login"
href=
"javascript:void(0);"
logout
><i
class=
"fa fa-sign-out fa-fw"
></i>
Çıkış
</a></li>
</ul>
<!-- /.dropdown-user -->
</li>
...
...
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