Commit 0e4aa8eb authored by Evren Kutar's avatar Evren Kutar

FIX pagination links

rfix #5120
parent 89e95582
......@@ -74,6 +74,7 @@ angular.module(
return {url: backendurl};
})())
.constant('toastr', window.toastr)
.constant('WS', window.WebSocket)
.config(function ($logProvider) {
$logProvider.debugEnabled(true);
})
......
......@@ -55,16 +55,16 @@
<nav ng-if="pagination && pagination.total_pages > 1" class="text-center">
<ul class="pagination">
<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">&laquo;</span>
</a>
</li>
<li ng-repeat="page in getNumber(pagination.total_pages) track by $index"
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 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">&raquo;</span>
</a>
</li>
......
......@@ -5,7 +5,7 @@ describe('ulakbus.version module', function() {
describe('version service', function() {
it('should return current version', inject(function(version) {
expect(version).toEqual('0.6.10');
expect(version).toEqual('0.8.0');
}));
});
});
\ No newline at end of file
......@@ -79,6 +79,7 @@ angular.module(
return {url: backendurl};
})())
.constant('toastr', window.toastr)
.constant('WS', window.WebSocket)
.config(function ($logProvider) {
// @if NODE_ENV='PRODUCTION'
$logProvider.debugEnabled(false);
......
......@@ -4,7 +4,7 @@
<label class="control-label {{form.labelHtmlClass}}" ng-show="showTitle()">
{{form.title}}
</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="col-md-12">
......
......@@ -380,8 +380,8 @@ angular.module('ulakbus.formService', ['ui.bootstrap'])
var _node_filter_interface = function (scope, v, k) {
var formitem = scope.form[scope.form.indexOf(k)];
var modelScope = {
"url": v.wf || scope.wf, "wf": v.wf || scope.wf,
"form_params": {
wf: v.wf || scope.wf,
model: v.model_name || v.schema[0].model_name,
cmd: v.list_cmd || 'select_list',
query: ''
......@@ -391,7 +391,7 @@ angular.module('ulakbus.formService', ['ui.bootstrap'])
scope.generateTitleMap = function (modelScope) {
generator.get_list(modelScope).then(function (res) {
formitem.titleMap = [];
angular.forEach(res.data.objects, function (item) {
angular.forEach(res.objects, function (item) {
if (item !== "-1") {
formitem.titleMap.push({
"value": item.key,
......@@ -422,10 +422,10 @@ angular.module('ulakbus.formService', ['ui.bootstrap'])
title: v.title,
// formName will be used in modal return to save item on form
formName: k,
wf: v.wf,
wf: v.wf || scope.wf,
add_cmd: v.add_cmd,
name: v.model_name,
model_name: v.model_name,
name: v.model_name || v.schema[0].model_name,
model_name: v.model_name || v.schema[0].model_name,
filterValue: '',
selected_item: {},
filteredItems: [],
......@@ -1170,9 +1170,6 @@ angular.module('ulakbus.formService', ['ui.bootstrap'])
* @returns {Object} returns value for modal
*/
.controller('ModalController', function ($scope, $uibModalInstance, Generator, items) {
$scope.$watch('form', function () {
console.log($scope.form);
});
angular.forEach(items, function (value, key) {
$scope[key] = items[key];
});
......
......@@ -25,7 +25,7 @@ angular.module('ulakbus')
/**
* 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 () {
generate_ws();
});
......@@ -33,7 +33,7 @@ angular.module('ulakbus')
var websocket;
var generate_ws = function () {
$log.info('Openning web socket...');
websocket = new WebSocket(WSUri.url);
websocket = new WS(WSUri.url);
websocket.onopen = function (evt) {
wsOps.onOpen(evt)
};
......
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -20,6 +20,8 @@ module.exports = function (config) {
'app/bower_components/angular-gettext/dist/angular-gettext.min.js',
'app/bower_components/angular-route/angular-route.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/tv4/tv4.js',
'app/bower_components/objectpath/lib/ObjectPath.js',
......@@ -38,7 +40,7 @@ module.exports = function (config) {
frameworks: ['jasmine'],
//browsers: ['PhantomJS', 'Chrome', 'Firefox', 'Safari'],
browsers: ['PhantomJS'],
browsers: ['Chrome'],
customLaunchers: {
'PhantomJS_custom': {
......@@ -61,12 +63,12 @@ module.exports = function (config) {
plugins: [
'karma-phantomjs-launcher',
//'karma-chrome-launcher',
'karma-chrome-launcher',
//'karma-firefox-launcher',
//'karma-safari-launcher',
'karma-jasmine',
'karma-junit-reporter',
'karma-coverage'
//'karma-junit-reporter',
//'karma-coverage'
],
junitReporter: {
......@@ -74,33 +76,33 @@ module.exports = function (config) {
suite: 'unit'
},
reporters: ['progress', 'coverage'],
//reporters: ['progress', 'coverage'],
preprocessors: {
'app/app.js': ['coverage'],
'app/app_routes.js': ['coverage'],
'app/components/auth/*.js': ['coverage'],
'app/components/crud/*.js': ['coverage'],
'app/components/dashboard/*.js': ['coverage'],
'app/components/version/*.js': ['coverage'],
'app/zetalib/**/!(action_service).js': ['coverage']
},
//preprocessors: {
// 'app/app.js': ['coverage'],
// 'app/app_routes.js': ['coverage'],
// 'app/components/auth/*.js': ['coverage'],
// 'app/components/crud/*.js': ['coverage'],
// 'app/components/dashboard/*.js': ['coverage'],
// 'app/components/version/*.js': ['coverage'],
// 'app/zetalib/**/!(action_service).js': ['coverage']
//},
coverageReporter: {
check: {
global: {
statements: 60,
branches: 10,
functions: 60,
lines: 60,
excludes: [
'app/components/uitemplates/*.js'
]
}
},
type : 'html',
dir : 'coverage/'
}
//coverageReporter: {
// check: {
// global: {
// statements: 60,
// branches: 10,
// functions: 60,
// lines: 60,
// excludes: [
// 'app/components/uitemplates/*.js'
// ]
// }
// },
// type : 'html',
// dir : 'coverage/'
//}
});
};
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment