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
0e4aa8eb
Commit
0e4aa8eb
authored
Mar 10, 2016
by
Evren Kutar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
FIX pagination links
rfix #5120
parent
89e95582
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
47 additions
and
46 deletions
+47
-46
app.js
app/app.js
+1
-0
list.html
app/components/crud/templates/list.html
+3
-3
version_test.js
app/components/version/version_test.js
+1
-1
main.js
app/main.js
+1
-0
multiselect.html
app/shared/templates/multiselect.html
+1
-1
form_service.js
app/zetalib/form_service.js
+5
-8
socket.js
app/zetalib/socket.js
+2
-2
app.js
dist/app.js
+2
-2
karma.conf.js
karma.conf.js
+31
-29
No files found.
app/app.js
View file @
0e4aa8eb
...
@@ -74,6 +74,7 @@ angular.module(
...
@@ -74,6 +74,7 @@ angular.module(
return
{
url
:
backendurl
};
return
{
url
:
backendurl
};
})())
})())
.
constant
(
'toastr'
,
window
.
toastr
)
.
constant
(
'toastr'
,
window
.
toastr
)
.
constant
(
'WS'
,
window
.
WebSocket
)
.
config
(
function
(
$logProvider
)
{
.
config
(
function
(
$logProvider
)
{
$logProvider
.
debugEnabled
(
true
);
$logProvider
.
debugEnabled
(
true
);
})
})
...
...
app/components/crud/templates/list.html
View file @
0e4aa8eb
...
@@ -55,16 +55,16 @@
...
@@ -55,16 +55,16 @@
<nav
ng-if=
"pagination && pagination.total_pages > 1"
class=
"text-center"
>
<nav
ng-if=
"pagination && pagination.total_pages > 1"
class=
"text-center"
>
<ul
class=
"pagination"
>
<ul
class=
"pagination"
>
<li
ng-class=
"{disabled:pagination.page===1}"
>
<li
ng-class=
"{disabled:pagination.page===1}"
>
<a
aria-label=
"Önceki"
ng-click=
"paginate({page:pagination.page-1})"
>
<a
role=
"button"
aria-label=
"Önceki"
ng-click=
"paginate({page:pagination.page-1})"
>
<span
aria-hidden=
"true"
>
«
</span>
<span
aria-hidden=
"true"
>
«
</span>
</a>
</a>
</li>
</li>
<li
ng-repeat=
"page in getNumber(pagination.total_pages) track by $index"
<li
ng-repeat=
"page in getNumber(pagination.total_pages) track by $index"
ng-class=
"{active:$index+1===pagination.page}"
>
ng-class=
"{active:$index+1===pagination.page}"
>
<a
ng-click=
"paginate({page:$index+1})"
>
{{$index+1}}
</a>
<a
role=
"button"
ng-click=
"paginate({page:$index+1})"
>
{{$index+1}}
</a>
</li>
</li>
<li
ng-class=
"{disabled:pagination.page===pagination.total_pages}"
>
<li
ng-class=
"{disabled:pagination.page===pagination.total_pages}"
>
<a
aria-label=
"Sonraki"
ng-click=
"paginate({page:pagination.page+1})"
>
<a
role=
"button"
aria-label=
"Sonraki"
ng-click=
"paginate({page:pagination.page+1})"
>
<span
aria-hidden=
"true"
>
»
</span>
<span
aria-hidden=
"true"
>
»
</span>
</a>
</a>
</li>
</li>
...
...
app/components/version/version_test.js
View file @
0e4aa8eb
...
@@ -5,7 +5,7 @@ describe('ulakbus.version module', function() {
...
@@ -5,7 +5,7 @@ describe('ulakbus.version module', function() {
describe
(
'version service'
,
function
()
{
describe
(
'version service'
,
function
()
{
it
(
'should return current version'
,
inject
(
function
(
version
)
{
it
(
'should return current version'
,
inject
(
function
(
version
)
{
expect
(
version
).
toEqual
(
'0.
6.1
0'
);
expect
(
version
).
toEqual
(
'0.
8.
0'
);
}));
}));
});
});
});
});
\ No newline at end of file
app/main.js
View file @
0e4aa8eb
...
@@ -79,6 +79,7 @@ angular.module(
...
@@ -79,6 +79,7 @@ angular.module(
return
{
url
:
backendurl
};
return
{
url
:
backendurl
};
})())
})())
.
constant
(
'toastr'
,
window
.
toastr
)
.
constant
(
'toastr'
,
window
.
toastr
)
.
constant
(
'WS'
,
window
.
WebSocket
)
.
config
(
function
(
$logProvider
)
{
.
config
(
function
(
$logProvider
)
{
// @if NODE_ENV='PRODUCTION'
// @if NODE_ENV='PRODUCTION'
$logProvider
.
debugEnabled
(
false
);
$logProvider
.
debugEnabled
(
false
);
...
...
app/shared/templates/multiselect.html
View file @
0e4aa8eb
...
@@ -4,7 +4,7 @@
...
@@ -4,7 +4,7 @@
<label
class=
"control-label {{form.labelHtmlClass}}"
ng-show=
"showTitle()"
>
<label
class=
"control-label {{form.labelHtmlClass}}"
ng-show=
"showTitle()"
>
{{form.title}}
{{form.title}}
</label>
</label>
<
a
role=
"button"
><i
class=
"fa fa-plus-circle fa-fw"
add-modal-for-linked-model=
"{{form.formName}}"
></i></a
>
<
!--<a role="button"><i class="fa fa-plus-circle fa-fw" add-modal-for-linked-model="{{form.formName}}"></i></a>--
>
<div
class=
"row"
>
<div
class=
"row"
>
<div
class=
"col-md-12"
>
<div
class=
"col-md-12"
>
...
...
app/zetalib/form_service.js
View file @
0e4aa8eb
...
@@ -380,8 +380,8 @@ angular.module('ulakbus.formService', ['ui.bootstrap'])
...
@@ -380,8 +380,8 @@ angular.module('ulakbus.formService', ['ui.bootstrap'])
var
_node_filter_interface
=
function
(
scope
,
v
,
k
)
{
var
_node_filter_interface
=
function
(
scope
,
v
,
k
)
{
var
formitem
=
scope
.
form
[
scope
.
form
.
indexOf
(
k
)];
var
formitem
=
scope
.
form
[
scope
.
form
.
indexOf
(
k
)];
var
modelScope
=
{
var
modelScope
=
{
"url"
:
v
.
wf
||
scope
.
wf
,
"wf"
:
v
.
wf
||
scope
.
wf
,
"form_params"
:
{
"form_params"
:
{
wf
:
v
.
wf
||
scope
.
wf
,
model
:
v
.
model_name
||
v
.
schema
[
0
].
model_name
,
model
:
v
.
model_name
||
v
.
schema
[
0
].
model_name
,
cmd
:
v
.
list_cmd
||
'select_list'
,
cmd
:
v
.
list_cmd
||
'select_list'
,
query
:
''
query
:
''
...
@@ -391,7 +391,7 @@ angular.module('ulakbus.formService', ['ui.bootstrap'])
...
@@ -391,7 +391,7 @@ angular.module('ulakbus.formService', ['ui.bootstrap'])
scope
.
generateTitleMap
=
function
(
modelScope
)
{
scope
.
generateTitleMap
=
function
(
modelScope
)
{
generator
.
get_list
(
modelScope
).
then
(
function
(
res
)
{
generator
.
get_list
(
modelScope
).
then
(
function
(
res
)
{
formitem
.
titleMap
=
[];
formitem
.
titleMap
=
[];
angular
.
forEach
(
res
.
data
.
objects
,
function
(
item
)
{
angular
.
forEach
(
res
.
objects
,
function
(
item
)
{
if
(
item
!==
"-1"
)
{
if
(
item
!==
"-1"
)
{
formitem
.
titleMap
.
push
({
formitem
.
titleMap
.
push
({
"value"
:
item
.
key
,
"value"
:
item
.
key
,
...
@@ -422,10 +422,10 @@ angular.module('ulakbus.formService', ['ui.bootstrap'])
...
@@ -422,10 +422,10 @@ angular.module('ulakbus.formService', ['ui.bootstrap'])
title
:
v
.
title
,
title
:
v
.
title
,
// formName will be used in modal return to save item on form
// formName will be used in modal return to save item on form
formName
:
k
,
formName
:
k
,
wf
:
v
.
wf
,
wf
:
v
.
wf
||
scope
.
wf
,
add_cmd
:
v
.
add_cmd
,
add_cmd
:
v
.
add_cmd
,
name
:
v
.
model_name
,
name
:
v
.
model_name
||
v
.
schema
[
0
].
model_name
,
model_name
:
v
.
model_name
,
model_name
:
v
.
model_name
||
v
.
schema
[
0
].
model_name
,
filterValue
:
''
,
filterValue
:
''
,
selected_item
:
{},
selected_item
:
{},
filteredItems
:
[],
filteredItems
:
[],
...
@@ -1170,9 +1170,6 @@ angular.module('ulakbus.formService', ['ui.bootstrap'])
...
@@ -1170,9 +1170,6 @@ angular.module('ulakbus.formService', ['ui.bootstrap'])
* @returns {Object} returns value for modal
* @returns {Object} returns value for modal
*/
*/
.
controller
(
'ModalController'
,
function
(
$scope
,
$uibModalInstance
,
Generator
,
items
)
{
.
controller
(
'ModalController'
,
function
(
$scope
,
$uibModalInstance
,
Generator
,
items
)
{
$scope
.
$watch
(
'form'
,
function
()
{
console
.
log
(
$scope
.
form
);
});
angular
.
forEach
(
items
,
function
(
value
,
key
)
{
angular
.
forEach
(
items
,
function
(
value
,
key
)
{
$scope
[
key
]
=
items
[
key
];
$scope
[
key
]
=
items
[
key
];
});
});
...
...
app/zetalib/socket.js
View file @
0e4aa8eb
...
@@ -25,7 +25,7 @@ angular.module('ulakbus')
...
@@ -25,7 +25,7 @@ angular.module('ulakbus')
/**
/**
* WSOps operates all websocket interactions
* WSOps operates all websocket interactions
*/
*/
.
factory
(
'WSOps'
,
function
(
WSUri
,
$q
,
$log
,
$rootScope
,
$timeout
,
ErrorService
)
{
.
factory
(
'WSOps'
,
function
(
WSUri
,
$q
,
$log
,
$rootScope
,
$timeout
,
ErrorService
,
WS
)
{
$rootScope
.
$on
(
'ws_turn_on'
,
function
()
{
$rootScope
.
$on
(
'ws_turn_on'
,
function
()
{
generate_ws
();
generate_ws
();
});
});
...
@@ -33,7 +33,7 @@ angular.module('ulakbus')
...
@@ -33,7 +33,7 @@ angular.module('ulakbus')
var
websocket
;
var
websocket
;
var
generate_ws
=
function
()
{
var
generate_ws
=
function
()
{
$log
.
info
(
'Openning web socket...'
);
$log
.
info
(
'Openning web socket...'
);
websocket
=
new
W
ebSocket
(
WSUri
.
url
);
websocket
=
new
W
S
(
WSUri
.
url
);
websocket
.
onopen
=
function
(
evt
)
{
websocket
.
onopen
=
function
(
evt
)
{
wsOps
.
onOpen
(
evt
)
wsOps
.
onOpen
(
evt
)
};
};
...
...
dist/app.js
View file @
0e4aa8eb
This source diff could not be displayed because it is too large. You can
view the blob
instead.
karma.conf.js
View file @
0e4aa8eb
...
@@ -20,6 +20,8 @@ module.exports = function (config) {
...
@@ -20,6 +20,8 @@ module.exports = function (config) {
'app/bower_components/angular-gettext/dist/angular-gettext.min.js'
,
'app/bower_components/angular-gettext/dist/angular-gettext.min.js'
,
'app/bower_components/angular-route/angular-route.js'
,
'app/bower_components/angular-route/angular-route.js'
,
'app/bower_components/angular-resource/angular-resource.js'
,
'app/bower_components/angular-resource/angular-resource.js'
,
"app/bower_components/showdown/dist/showdown.min.js"
,
"app/bower_components/angular-markdown-filter/markdown.js"
,
'app/bower_components/angular-sanitize/angular-sanitize.min.js'
,
'app/bower_components/angular-sanitize/angular-sanitize.min.js'
,
'app/bower_components/tv4/tv4.js'
,
'app/bower_components/tv4/tv4.js'
,
'app/bower_components/objectpath/lib/ObjectPath.js'
,
'app/bower_components/objectpath/lib/ObjectPath.js'
,
...
@@ -38,7 +40,7 @@ module.exports = function (config) {
...
@@ -38,7 +40,7 @@ module.exports = function (config) {
frameworks
:
[
'jasmine'
],
frameworks
:
[
'jasmine'
],
//browsers: ['PhantomJS', 'Chrome', 'Firefox', 'Safari'],
//browsers: ['PhantomJS', 'Chrome', 'Firefox', 'Safari'],
browsers
:
[
'
PhantomJS
'
],
browsers
:
[
'
Chrome
'
],
customLaunchers
:
{
customLaunchers
:
{
'PhantomJS_custom'
:
{
'PhantomJS_custom'
:
{
...
@@ -61,12 +63,12 @@ module.exports = function (config) {
...
@@ -61,12 +63,12 @@ module.exports = function (config) {
plugins
:
[
plugins
:
[
'karma-phantomjs-launcher'
,
'karma-phantomjs-launcher'
,
//
'karma-chrome-launcher',
'karma-chrome-launcher'
,
//'karma-firefox-launcher',
//'karma-firefox-launcher',
//'karma-safari-launcher',
//'karma-safari-launcher',
'karma-jasmine'
,
'karma-jasmine'
,
'karma-junit-reporter'
,
//
'karma-junit-reporter',
'karma-coverage'
//
'karma-coverage'
],
],
junitReporter
:
{
junitReporter
:
{
...
@@ -74,33 +76,33 @@ module.exports = function (config) {
...
@@ -74,33 +76,33 @@ module.exports = function (config) {
suite
:
'unit'
suite
:
'unit'
},
},
reporters
:
[
'progress'
,
'coverage'
],
//
reporters: ['progress', 'coverage'],
preprocessors
:
{
//
preprocessors: {
'app/app.js'
:
[
'coverage'
],
//
'app/app.js': ['coverage'],
'app/app_routes.js'
:
[
'coverage'
],
//
'app/app_routes.js': ['coverage'],
'app/components/auth/*.js'
:
[
'coverage'
],
//
'app/components/auth/*.js': ['coverage'],
'app/components/crud/*.js'
:
[
'coverage'
],
//
'app/components/crud/*.js': ['coverage'],
'app/components/dashboard/*.js'
:
[
'coverage'
],
//
'app/components/dashboard/*.js': ['coverage'],
'app/components/version/*.js'
:
[
'coverage'
],
//
'app/components/version/*.js': ['coverage'],
'app/zetalib/**/!(action_service).js'
:
[
'coverage'
]
//
'app/zetalib/**/!(action_service).js': ['coverage']
},
//
},
coverageReporter
:
{
//
coverageReporter: {
check
:
{
//
check: {
global
:
{
//
global: {
statements
:
60
,
//
statements: 60,
branches
:
10
,
//
branches: 10,
functions
:
60
,
//
functions: 60,
lines
:
60
,
//
lines: 60,
excludes
:
[
//
excludes: [
'app/components/uitemplates/*.js'
//
'app/components/uitemplates/*.js'
]
//
]
}
//
}
},
//
},
type
:
'html'
,
//
type : 'html',
dir
:
'coverage/'
//
dir : 'coverage/'
}
//
}
});
});
};
};
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