+
+ ng-if="$ctrl.model.isPaging"
+ enable="::true">
\ No newline at end of file
diff --git a/front/core/components/pagination/style.scss b/front/core/components/pagination/style.scss
index 0cacb53e3..2610bc502 100644
--- a/front/core/components/pagination/style.scss
+++ b/front/core/components/pagination/style.scss
@@ -3,7 +3,8 @@ vn-pagination {
display: block;
text-align: center;
- & > div > vn-icon-button {
+ & > div > vn-icon-button {
font-size: 2em;
+ padding: 0;
}
}
\ No newline at end of file
diff --git a/front/core/components/paging/paging.html b/front/core/components/paging/paging.html
deleted file mode 100644
index 6e71f321d..000000000
--- a/front/core/components/paging/paging.html
+++ /dev/null
@@ -1,11 +0,0 @@
-
-
\ No newline at end of file
diff --git a/front/core/components/paging/paging.js b/front/core/components/paging/paging.js
deleted file mode 100644
index 850b9c722..000000000
--- a/front/core/components/paging/paging.js
+++ /dev/null
@@ -1,58 +0,0 @@
-import ngModule from '../../module';
-import './style.scss';
-
-export default class Paging {
- get numPages() {
- return Math.ceil(this.numItems / this.numPerPage);
- }
-
- constructor($http, $scope) {
- this.$http = $http;
- this.$scope = $scope;
- this.where = this.filter;
- this.numPerPage = null;
- this.numItems = 0;
- $scope.$watch('$ctrl.index.model.length', () => this.onModelUpdated());
- }
-
- $onChanges(changes) {
- if (!this.index) return;
- this.numPerPage = this.index.filter.size;
- this.currentPage = this.index.filter.page;
- if (changes.total)
- this.numItems = changes.total.currentValue;
- }
-
- onModelUpdated() {
- let index = this.index;
- let filter = index.filter;
-
- if (filter.page >= this.numPages && index.model.length >= this.numPerPage)
- this.numItems = filter.page * filter.size + 1;
- }
-
- onPageChange(page) {
- this.index.filter.page = page;
- if (typeof this.pageChange === 'undefined') {
- this.index.accept();
- } else {
- this.pageChange();
- }
- }
- $doCheck() {
- if (this.index && this.index.filter && this.index.filter.page && this.index.filter.page != this.currentPage) {
- this.currentPage = this.index.filter.page;
- }
- }
-}
-Paging.$inject = ['$http', '$scope'];
-
-ngModule.component('vnPaging', {
- template: require('./paging.html'),
- bindings: {
- index: '<',
- pageChange: '&?',
- total: '<'
- },
- controller: Paging
-});
diff --git a/front/core/components/paging/paging.spec.js b/front/core/components/paging/paging.spec.js
deleted file mode 100644
index 9f6023ff6..000000000
--- a/front/core/components/paging/paging.spec.js
+++ /dev/null
@@ -1,65 +0,0 @@
-import './paging.js';
-
-describe('Component vnPaging', () => {
- let $scope;
- let controller;
-
- beforeEach(angular.mock.module('vnCore', $translateProvider => {
- $translateProvider.translations('en', {});
- }));
-
- beforeEach(angular.mock.inject(($componentController, $rootScope) => {
- $scope = $rootScope.$new();
- controller = $componentController('vnPaging', {$scope});
- }));
-
- describe('$onChanges()', () => {
- it(`should define numberPage and currentPage based on index.filter properties`, () => {
- controller.index = {filter: {size: 'something', page: 'something else'}};
- controller.$onChanges({index: 'simpleChange', currentValue: 'current value', previousValue: 'previous value'});
-
- expect(controller.numPerPage).toBe(controller.index.filter.size);
- expect(controller.currentPage).toEqual(controller.index.filter.page);
- });
-
- it(`should define numItems based on changes.total.currentValue`, () => {
- controller.index = {filter: {size: 'something', page: 'something else'}};
- controller.$onChanges({total: {currentValue: 'current value'}});
-
- expect(controller.numItems).toEqual('current value');
- });
- });
-
- describe('onModelUpdated()', () => {
- it(`should define controllers numItems as the result of page times size plus one`, () => {
- controller.numPerPage = 2;
- controller.index = {
- filter: {size: 10, page: 10},
- model: ['one mother..', 'another model..', 'last model..']
- };
- controller.onModelUpdated();
-
- expect(controller.numItems).toBe(101);
- });
- });
-
- describe('onPageChange()', () => {
- it(`should call accept() since pageChange property is undefined`, () => {
- controller.index = {accept: () => {}, filter: {page: 0}};
- spyOn(controller.index, 'accept');
- controller.onPageChange(100);
-
- expect(controller.index.accept).toHaveBeenCalledWith();
- });
-
- it(`should call pageChange() since pageChange property isn't undefined`, () => {
- controller.index = {accept: () => {}, filter: {page: 0}};
- controller.pageChange = true;
- spyOn(controller, 'pageChange');
- controller.onPageChange(100);
-
- expect(controller.pageChange).toHaveBeenCalledWith();
- });
- });
-});
-
diff --git a/front/core/components/paging/style.scss b/front/core/components/paging/style.scss
deleted file mode 100644
index e88202e49..000000000
--- a/front/core/components/paging/style.scss
+++ /dev/null
@@ -1,40 +0,0 @@
-@import "variables";
-
-vn-paging {
- display: block;
- text-align: center;
-
- ul {
- box-shadow: 0 0 .4em $color-shadow;
- background-color: #fff;
- display: inline-block;
- margin: 20px 0;
- border-radius: .1em;
- padding: 0;
- }
- li {
- display: inline;
-
- &:first-child > a,
- &:first-child > span {
- margin-left: 0;
- }
- &.active > a {
- background: $color-active;
- color: #fff;
- }
- & > a,
- & > span {
- position: relative;
- float: left;
- padding: 6px 12px;
- margin-left: -1px;
- line-height: 1.42857143;
- color: inherit;
- text-decoration: none;
- }
- &:not(.active) > a:hover {
- background-color: #ddd;
- }
- }
-}
diff --git a/front/core/components/popover/popover.js b/front/core/components/popover/popover.js
index 8babe867d..be6546246 100644
--- a/front/core/components/popover/popover.js
+++ b/front/core/components/popover/popover.js
@@ -180,11 +180,8 @@ export default class Popover extends Component {
onDocKeyDown(event) {
if (event.defaultPrevented) return;
-
- if (event.keyCode == 27) { // Esc
- event.preventDefault();
+ if (event.code == 'Escape')
this.hide();
- }
}
onMouseDown(event) {
diff --git a/front/core/locale/es.yml b/front/core/locale/es.yml
index 01a17aa48..1fcd12b98 100644
--- a/front/core/locale/es.yml
+++ b/front/core/locale/es.yml
@@ -24,6 +24,9 @@ Value should be %s characters long: El valor debe ser de %s carácteres de longi
Value should have a length between %s and %s: El valor debe tener una longitud de entre %s y %s
Value should have at least %s characters: El valor debe tener al menos %s carácteres
Value should have at most %s characters: El valor debe tener un máximo de %s carácteres
+Enter a new search: Introduce una nueva búsqueda
+No results: Sin resultados
+Ups! It seems there was an error: ¡Vaya! Parece que ha habido un error
General search: Busqueda general
January: Enero
February: Febrero
diff --git a/front/core/vendor.js b/front/core/vendor.js
index 44d041ebe..ac4364feb 100644
--- a/front/core/vendor.js
+++ b/front/core/vendor.js
@@ -7,10 +7,6 @@ import 'angular-translate-loader-partial';
import '@uirouter/angularjs';
import 'mg-crud';
import 'oclazyload';
-/*
-import 'angular-material';
-import 'angular-material/modules/scss/angular-material.scss';
-*/
import 'angular-moment';
export const ngDeps = [
@@ -18,7 +14,6 @@ export const ngDeps = [
'ui.router',
'mgCrud',
'oc.lazyLoad',
- // 'ngMaterial',
'angularMoment'
];
diff --git a/front/salix/locale/es.yml b/front/salix/locale/es.yml
index 2056210e4..898728363 100644
--- a/front/salix/locale/es.yml
+++ b/front/salix/locale/es.yml
@@ -14,8 +14,6 @@ Push on applications menu: Para abrir un módulo pulsa en el menú de aplicacion
Return to module index: Volver a la página principal del módulo
What is new: Novedades de la versión
Settings: Ajustes
-Enter a new search: Introduce una nueva búsqueda
-No results: Sin resultados
# Actions
diff --git a/modules/client/front/credit/index/locale/es.yml b/modules/client/front/credit/index/locale/es.yml
index b4b5940cf..a15a1085f 100644
--- a/modules/client/front/credit/index/locale/es.yml
+++ b/modules/client/front/credit/index/locale/es.yml
@@ -1,3 +1,2 @@
Since : Desde
-Employee : Empleado
-No results: Sin resultados
\ No newline at end of file
+Employee : Empleado
\ No newline at end of file
diff --git a/modules/client/front/recovery/index/locale/es.yml b/modules/client/front/recovery/index/locale/es.yml
index 5b21429f4..0cb5b3ed6 100644
--- a/modules/client/front/recovery/index/locale/es.yml
+++ b/modules/client/front/recovery/index/locale/es.yml
@@ -1,5 +1,4 @@
Since: Desde
Employee: Empleado
-No results: Sin resultados
To: Hasta
Finish that recovery period: Terminar el recobro
\ No newline at end of file
diff --git a/modules/item/front/locale/es.yml b/modules/item/front/locale/es.yml
index c922656c4..c071d2c69 100644
--- a/modules/item/front/locale/es.yml
+++ b/modules/item/front/locale/es.yml
@@ -33,8 +33,6 @@ Remove niche: Quitar nicho
Add barcode: Añadir código de barras
Remove barcode: Quitar código de barras
Buyer: Comprador
-No results: Sin resultados
-Enter a new search: Introduce una nueva búsqueda
Tag: Etiqueta
Worker: Trabajador
Available: Disponible
diff --git a/modules/order/front/catalog/index.js b/modules/order/front/catalog/index.js
index a5d7ee968..758c56f0e 100644
--- a/modules/order/front/catalog/index.js
+++ b/modules/order/front/catalog/index.js
@@ -131,7 +131,7 @@ class Controller {
}
get isRefreshing() {
- return this.$scope.model && this.$scope.model.isRefreshing;
+ return this.$scope.model && this.$scope.model.status == 'loading';
}
}
diff --git a/modules/order/front/locale/es.yml b/modules/order/front/locale/es.yml
index 943606a47..0ada37bfd 100644
--- a/modules/order/front/locale/es.yml
+++ b/modules/order/front/locale/es.yml
@@ -3,8 +3,6 @@ Catalog: Catálogo
from: desde
results: resultados
More than: Más de
-No results: Sin resultados
-Enter a new search: Introduce una nueva búsqueda
Plant: Planta
Flower: Flor
Handmade: Confección