Commit 5cceb76e authored by laurent l's avatar laurent l

migrate to NS 6

parent f5244149
<?xml version="1.0" encoding="UTF-8"?>
<resources>
<string name="app_name">MyBibApp</string>
<string name="title_activity_kimera">MyBibApp</string>
<string name="accounts">Cuentas</string>
<string name="add_account">Añadir cuenta</string>
<string name="label">Nombre</string>
<string name="url">URL</string>
<string name="connector">Conector</string>
<string name="portal">Pagina web</string>
<string name="login">Codigo</string>
<string name="password">Contraseña</string>
<string name="save">Guardar</string>
<string name="home">Inicio</string>
<string name="refresh">Sincronizar</string>
<string name="account_parameters">Parametros</string>
<string name="delete">Borrar</string>
<string name="sure_to_delete">Seguro que quieres borrar esta cuenta ?</string>
<string name="confirm">Confirmar</string>
<string name="OK">OK</string>
<string name="cancel">Cancelar</string>
<string name="oauth_authorize">Connexion en processo</string>
<string name="open_website">Ir a la web de la biblioteca</string>
<string name="loans">Prestamos</string>
<string name="menu">Menu</string>
<string name="invalid">El formulario contiene errores, por favor intentalo de nuevo</string>
<string name="alert">Ojo</string>
<string name="account_label_error">El nombre no puede estar vacío</string>
<string name="account_url_error">La URL de la pagina web no puede estar vacía</string>
<string name="enter_login_password">Por favor, entra tus datos</string>
<string name="wrong_login_password">No se puede conectar. Comprueba tus datos</string>
<string name="scan_item">Escanear un documento</string>
<string name="barcode_scanner_cancel">Cancelar</string>
<string name="barcode_scanner_hint">Pon el codigo de barras en en cuadrado</string>
<string name="portal_system">Tipo de web</string>
<string name="advanced">Avanzado</string>
<string name="autodetect">Auto-detectar</string>
<string name="your_library">Tu biblioteca</string>
<string name="no_loans">No hay prestamo. Dezliza para refrescar.</string>
<string name="search_library">Busca tu biblioteca</string>
<string name="choose_account_label">Escoja un nombre para esta cuenta</string>
<string name="welcome">Bienvenido en MyBibApp</string>
<string name="welcome_help">Bienvenido en MyBibApp, la app que te pone a tu biblioteca en la mano !</string>
<string name="welcome_search_library">Para enpezar, comprueba si tu biblioteca ya esta declarada en MyBibApp:</string>
<string name="library_found">Encontrada !</string>
<string name="add_account_advanced">Añadir una cuenta (avanzado)</string>
<string name="add_account_label">Puedes modificar el nombre de esta cuenta:</string>
<string name="add_account_hint">Ya has declarado tu cuenta, haw click en su nombre para conectarte:</string>
<string name="author">Autor</string>
<string name="date_due">Devolver antes de</string>
<string name="invalid_request">Invalid request</string>
<string name="error">Error</string>
<string name="authentication">Identificación</string>
<string name="portal_detection_fail">No se reconoce la web de tu biblioteca. Modifica los parametros.</string>
<string name="show_card">Tarjeta virtual</string>
<string name="card_number">Numéro de tarjeta</string>
<string name="novelties">Nuevo</string>
<string name="card_expire_at">Vence en</string>
<string name="holds">Reservas</string>
<string name="no_holds">No hay reserva. Dezliza para refrescar.</string>
<string name="loans_and_holds">Prestamos / Reservas</string>
<string name="library">Biblioteca</string>
<string name="do_loan">Pedir prestado</string>
<string name="do_loan_barcode">Prestamo : %s</string>
<string name="enter_password">Para finalizar la solicitud, ingrese su contraseña</string>
<string name="loan_title_date_due">%s, para regresar a más tardar %s</string>
<string name="hold_not_available">no disponible</string>
<string name="hold_available">disponible</string>
<string name="loan_days_late">retraso: %s d</string>
<string name="loan_due_today">último día !</string>
<string name="loan_due_days">antes: %s d</string>
<string name="background_refresh">Sincronización de fondo</string>
<string name="background_refresh_hint">experimental, aumenta el consumo de datos de la aplicación</string>
<string name="settings">Paramètres</string>
<string name="about">A proposito</string>
<string name="dump_complete">Exportación completada</string>
<string name="portal_secure">Conexión segura, su información transmitida y recibida será encriptada.</string>
<string name="portal_not_secure">La conexión no segura, la información transmitida y recibida puede ser robada.</string>
<string name="portal_certified">Operación certificada. El correcto funcionamiento de MyBibApp con esta red de bibliotecas ha sido certificado. En caso de mal funcionamiento, por favor repórtelo a su biblioteca.</string>
<string name="portal_not_certified">Operación no certificada. En caso de una falla de funcionamiento, infórmelo a la comunidad.</string>
<string name="go_connect">Se connecter</string>
<string name="open_forum">Acceder al foro</string>
<string name="version">versión</string>
<string name="copyright">Todos los derechos reservados 2017-2018 AFI, BibLibre</string>
<string name="license">Licencia</string>
<string name="license_content">Puede copiar, redistribuir, analizar y modificar MyBibApp de acuerdo con la licencia AGPLv3.0.</string>
<string name="browse_agpl">Verr la licencia</string>
<string name="browse_source_code">Accede al código fuente</string>
<string name="personal_data_usage">Datos personales</string>
<string name="personal_data_usage_content">
La aplicación solo comunica sus datos personales al sitio web de su biblioteca.\n
\nPor favor consulte su biblioteca para conocer el uso de sus datos.\n
\nLos datos de identificación se pueden guardar en el teléfono de acuerdo con la tecnología de autenticación utilizada por el sitio web de la biblioteca.
</string>
<string name="used_software">Software utilizado</string>
<string name="used_software_content">La aplicación utiliza las siguientes bibliotecas de software:</string>
<string name="renew">Extender</string>
<string name="confirm_cancel_hold">Cancelar reserva ?</string>
<string name="loan_renewed">Préstamo extendido hasta %s</string>
</resources>
<?xml version="1.0" encoding="UTF-8"?>
<resources>
<string name="app_name">MyBibApp</string>
<string name="title_activity_kimera">MyBibApp</string>
<string name="accounts">Comptes</string>
<string name="add_account">Ajouter un compte</string>
<string name="label">Libellé</string>
<string name="url">URL</string>
<string name="connector">Connecteur</string>
<string name="portal">Portail</string>
<string name="login">Identifiant</string>
<string name="password">Mot de passe</string>
<string name="save">Sauvegarder</string>
<string name="home">Accueil</string>
<string name="refresh">Synchroniser</string>
<string name="account_parameters">Paramètres</string>
<string name="delete">Supprimer</string>
<string name="sure_to_delete">Voulez-vous vraiment supprimer ce compte ?</string>
<string name="confirm">Confirmation</string>
<string name="OK">OK</string>
<string name="cancel">Annuler</string>
<string name="oauth_authorize">Demande d\'accès en cours</string>
<string name="open_website">Accéder au site</string>
<string name="loans">Prêts</string>
<string name="menu">Menu</string>
<string name="invalid">Le formulaire contient des erreurs, veuillez les corriger et réessayer</string>
<string name="alert">Attention</string>
<string name="account_label_error">Le libellé ne peut pas être vide</string>
<string name="account_url_error">L\'URL du portail ne peut pas être vide et doit être une URL valide</string>
<string name="enter_login_password">Merci de saisir vos identifiants</string>
<string name="wrong_login_password">Echec de l\'authentification. Merci de vérifier vos identifiants</string>
<string name="scan_item">Scanner un document</string>
<string name="barcode_scanner_cancel">Annuler</string>
<string name="barcode_scanner_hint">Placez le code barre à l\'intérieur du rectangle pour le capturer</string>
<string name="portal_system">Type de portail</string>
<string name="advanced">Avancé</string>
<string name="autodetect">Auto-détecter</string>
<string name="your_library">Votre bibliothèque</string>
<string name="no_loans">Aucun prêt. Tirez pour rafraîchir.</string>
<string name="search_library">Rechercher votre bibliothèque</string>
<string name="choose_account_label">Saisissez un libellé pour ce compte</string>
<string name="welcome">Bienvenue dans MyBibApp</string>
<string name="welcome_help">Bienvenue dans MyBibApp, l\'application qui met votre bibliothèque à portée de main !</string>
<string name="welcome_search_library">Pour commencer, vérifiez si MyBibApp connaît votre bibliothèque via le champ de recherche ci-dessous:</string>
<string name="library_found">Trouvé !</string>
<string name="add_account_advanced">Ajouter un compte (avancé)</string>
<string name="add_account_label">Saisissez maintenant un libellé de votre choix pour nommer ce compte, nous vous en proposons un par défaut ci-dessous:</string>
<string name="add_account_hint">Vous avez déclaré un nouveau compte. Appuyez dessus pour l\'ouvrir:</string>
<string name="author">Auteur</string>
<string name="date_due">Retour le</string>
<string name="invalid_request">Requête invalide</string>
<string name="error">Erreur</string>
<string name="authentication">Identification</string>
<string name="portal_detection_fail">Echec de détection du type de portail. Si vous le connaissez, allez dans les paramètres et réglez le type de portail</string>
<string name="show_card">Afficher ma carte</string>
<string name="card_number">Numéro de carte</string>
<string name="novelties">Nouveautés</string>
<string name="card_expire_at">Expire le</string>
<string name="holds">Réservations</string>
<string name="no_holds">Aucune réservation. Tirez pour rafraîchir.</string>
<string name="loans_and_holds">Prêts / Réservations</string>
<string name="library">Bibliothèque</string>
<string name="do_loan">Emprunter</string>
<string name="do_loan_barcode">Emprunt : %s</string>
<string name="enter_password">Pour finaliser la demande, veuillez saisir votre mot de passe</string>
<string name="loan_title_date_due">%s, à retourner au plus tard le %s</string>
<string name="hold_not_available">pas encore disponible</string>
<string name="hold_available">disponible</string>
<string name="loan_days_late">retard: %s j</string>
<string name="loan_due_today">dernier jour !</string>
<string name="loan_due_days">avant: %s j</string>
<string name="background_refresh">Synchronisation en arrière-plan</string>
<string name="background_refresh_hint">expérimental, augmente la consommation de données de l\'application</string>
<string name="settings">Paramètres</string>
<string name="about">A propos</string>
<string name="dump_complete">Export terminé</string>
<string name="portal_secure">Connexion au site sécurisée, vos informations transmises et réceptionnées seront chiffrées.</string>
<string name="portal_not_secure">Connexion au site non-sécurisée. Attention, des informations transmises et réceptionnées peuvent être dérobées.</string>
<string name="portal_certified">Bibliothèque certifiée. Le bon fonctionnement de MyBibApp avec cette bibliothèque a été certifié. En cas de dysfonctionnement, merci de contacter votre bibliothèque.</string>
<string name="portal_not_certified">Bibliothèque non certifiée. En cas de dysfonctionnement, merci de le signaler sur le forum de la communauté.</string>
<string name="go_connect">Se connecter</string>
<string name="open_forum">Accéder au forum</string>
<string name="version">version</string>
<string name="copyright">Tous droits réservés 2017-2018 AFI, BibLibre</string>
<string name="license">Licence</string>
<string name="license_content">Vous pouvez copier, redistribuer, analyser et modifier MyBibApp en accord avec la licence AGPLv3.0.</string>
<string name="browse_agpl">Voir la licence</string>
<string name="browse_source_code">Accéder au code source</string>
<string name="personal_data_usage">Données personnelles</string>
<string name="personal_data_usage_content">
L\'application ne communique vos données personnelles qu\'au site web de votre bibliothèque.\n
\nVeuillez consulter votre bibliothèque pour connaître l\'usage de vos données.\n
\nLes données d\'identification sont susceptibles d\'être sauvegardées sur le téléphone selon la technologie d\'authentification utilisée par le site web de la bibliothèque.
</string>
<string name="used_software">Logiciels utilisés</string>
<string name="used_software_content">L\'application utilise les bibliothèques logicielles suivantes:</string>
<string name="renew">Prolonger</string>
<string name="confirm_cancel_hold">Voulez-vous annuler cette réservation ?</string>
<string name="loan_renewed">Prêt prolongé jusqu\'au %s</string>
</resources>
<?xml version="1.0" encoding="UTF-8"?>
<resources>
<string name="app_name">MyBibApp</string>
<string name="title_activity_kimera">MyBibApp</string>
<string name="accounts">Accounts</string>
<string name="add_account">Add account</string>
<string name="label">Label</string>
<string name="url">URL</string>
<string name="connector">Connector</string>
<string name="portal">Portal</string>
<string name="login">Login</string>
<string name="password">Password</string>
<string name="save">Save</string>
<string name="home">Home</string>
<string name="refresh">Refresh</string>
<string name="account_parameters">Parameters</string>
<string name="delete">Delete</string>
<string name="sure_to_delete">Really delete this account ?</string>
<string name="confirm">Confirm</string>
<string name="OK">OK</string>
<string name="cancel">Cancel</string>
<string name="oauth_authorize">Request authorization</string>
<string name="open_website">Open website</string>
<string name="loans">Loans</string>
<string name="menu">Menu</string>
<string name="invalid">Form contains errors, please fix them and retry</string>
<string name="alert">Alert</string>
<string name="account_label_error">Label cannot be empty</string>
<string name="account_url_error">Portal\'s URL cannot be empty and must be valid</string>
<string name="enter_login_password">Please enter your credentials</string>
<string name="wrong_login_password">Authentication failed. Please check your credentials</string>
<string name="scan_item">Scan item</string>
<string name="barcode_scanner_cancel">Cancel</string>
<string name="barcode_scanner_hint">Place the barcode inside the rectangle to scan it</string>
<string name="portal_system">Platform</string>
<string name="advanced">Advanced</string>
<string name="autodetect">Auto-detect</string>
<string name="your_library">Your library</string>
<string name="no_loans">No loans. Pull to refresh.</string>
<string name="search_library">Search your library</string>
<string name="choose_account_label">Enter a label for this account</string>
<string name="welcome">Welcome to MyBibApp</string>
<string name="welcome_help">Welcome to MyBibApp, the application that put your library in your hands !</string>
<string name="welcome_search_library">First, check MyBibApp knows your library by typing it\'s name in the following search field:</string>
<string name="library_found">Found !</string>
<string name="add_account_advanced">Add account (advanced)</string>
<string name="add_account_label">Now enter a label to name this account. We suggest one below:</string>
<string name="add_account_hint">You successfully declared a new account. Tap it to open:</string>
<string name="author">Author</string>
<string name="date_due">Date due</string>
<string name="invalid_request">Invalid request</string>
<string name="error">Error</string>
<string name="authentication">Authentication</string>
<string name="portal_detection_fail">Fail to detect portal platform. If you know it, go to settings and select platform type</string>
<string name="show_card">Display card</string>
<string name="card_number">Card number</string>
<string name="novelties">Novelties</string>
<string name="card_expire_at">Expire at</string>
<string name="holds">Holds</string>
<string name="no_holds">No holds. Pull to refresh.</string>
<string name="loans_and_holds">Loans / Holds</string>
<string name="library">Library</string>
<string name="do_loan">Loan item</string>
<string name="do_loan_barcode">Loan : %s</string>
<string name="enter_password">To finish the request, enter your password</string>
<string name="loan_title_date_due">%s, bring back for %s</string>
<string name="hold_not_available">not available</string>
<string name="hold_available">available</string>
<string name="loan_days_late">late: %s d</string>
<string name="loan_due_today">last day!</string>
<string name="loan_due_days">before: %s d</string>
<string name="background_refresh">Background synchronization</string>
<string name="background_refresh_hint">experimental, increases the application data consumption</string>
<string name="settings">Settings</string>
<string name="about">About</string>
<string name="dump_complete">Dump complete</string>
<string name="portal_secure">Connection secured, datas sent and received will be encrypted.</string>
<string name="portal_not_secure">Connection not secured, datas sent and received can be stolen.</string>
<string name="portal_certified">Operation certified. Operation of MyBibApp on this libraries network has been certified.</string>
<string name="portal_not_certified">Operation not certified. If you encounter a problem, thanks to contact the community).</string>
<string name="go_connect">Sign-in</string>
<string name="open_forum">Open forum</string>
<string name="version">version</string>
<string name="copyright">All rights reserved 2017-2018 AFI, BibLibre</string>
<string name="license">License</string>
<string name="license_content">You can copy, redistribute, study and modify MyBibApp according to AGPLv3.0.</string>
<string name="browse_agpl">Read the license</string>
<string name="browse_source_code">Browse source code</string>
<string name="personal_data_usage">Personal data</string>
<string name="personal_data_usage_content">
The application communicate personal data only from and to your library website.\n
\nContact your library to know usage of your personal data.\n
\nCredentials may be saved on your phone depending on authentication technology used by your library.
</string>
<string name="used_software">Software used</string>
<string name="used_software_content">The application used following software libraries:</string>
<string name="renew">Renew</string>
<string name="confirm_cancel_hold">Are you sure to cancel this hold ?</string>
<string name="loan_renewed">Loan extended until %s</string>
</resources>
/*
/*
In NativeScript, the app.css file is where you place CSS rules that
you would like to apply to your entire application. Check out
http://docs.nativescript.org/ui/styling for a full list of the CSS
......@@ -8,8 +8,8 @@ This file is managed by Sass, this is the only one you have to change to style
the app. The module nativescript-dev-sass take care of generating css file.
*/
/* Variables */
/* Variables */
$first-color: #3b4564;
$first-color-light1: #8f94a6;
$first-color-light2:#dadce2;
......
// Import the theme’s variables. If you’re using a color scheme
// other than “light”, switch the path to the alternative scheme,
// for example '~nativescript-theme-core/scss/dark'.
@import '~nativescript-theme-core/scss/light';
// Custom colors
$background-dark: #F8F8F8 !default;
$background-light: #FFFFFF !default;
$blue-dark: #022734 !default;
$blue-light: #02556E !default;
$blue-50: rgba($blue-dark, 0.5) !default;
$blue-20: rgba($blue-dark, 0.2) !default;
$blue-10: rgba($blue-dark, 0.1) !default;
$accent-dark: #3A53FF !default;
$accent-light: #4781FE !default;
$success-dark: #06CE6A !default;
$success-light: #00E676 !default;
$warning-dark: #f39c11 !default;
$warning-light: #F2C112 !default;
$error-dark: #D84039 !default;
$error-light: #ED473F !default;
$midnight-dark: #0F336D !default;
$midnight-light: #14418B !default;
$night-dark: #023141 !default;
$night-light: #01526C !default;
$page-icon-color: #D7D7D7 !default;
// Sizes
$page-content-placeholder-font-size: 20;
/**
* Theme variables overrides
**/
// Colors
$background: #fff;
$primary: lighten(#000, 13%);
$secondary: lighten(#000, 46%);
$disabled: lighten(#000, 62%);
$accent: $accent-dark;
$error: $error-light;
// SideDrawer
$item-color-android : #737373;
$item-active-background: #F8F8F8;
$item-active-color: $accent;
$item-active-icon-color: $item-active-color;
$item-color-ios: $blue-dark;
$item-color-android: $blue-dark;
$side-drawer-header-background: #fafafa;
$side-drawer-header-brand: #737373;
$side-drawer-background: #FFFFFF;
// ActionBar
$ab-background: $accent;
$ab-color: $white;
// Buttons
$btn-color-inverse: $white;
$btn-color: $accent;
$btn-color-secondary: darken($btn-color, 10%);
$btn-color-outline-highlighted: lighten($btn-color, 10%);
//Text colors
$headings-color: $blue-dark;
$secondary: $blue-dark;
$text-color: $blue-dark;
// Import app variables
@import 'app-variables';
// Import the theme’s main ruleset - both index and platform specific.
@import '~nativescript-theme-core/scss/index';
@import '~nativescript-theme-core/scss/platforms/index.android';
// Import common styles
@import 'app-common';
// Import app variables
@import 'app-variables';
// Import the theme’s main ruleset - both index and platform specific.
@import '~nativescript-theme-core/scss/index';
@import '~nativescript-theme-core/scss/platforms/index.ios';
// Import common styles
@import 'app-common';
import {Persistable, Serializable} from './persistable';
import {Iso8601Date} from '../models/';
import { Persistable } from './persistable';
import { Iso8601Date, Serializable } from '../models/';
export class Card extends Persistable {
protected _number: string = '';
......@@ -20,16 +20,16 @@ export class Card extends Persistable {
return this._expire_at;
}
get number(): string {
return this.getNumber();
}
get expiration_date(): string {
return this.getExpirationDate();
}
get formatted_expiration_date(): string {
return new Iso8601Date(this.getExpirationDate()).asLongDate();
......@@ -48,7 +48,7 @@ export class Card extends Persistable {
.set('expire_at', this._expire_at);
}
public materializeFrom(serializable: Serializable) {
this._number = serializable.get('number');
this._expire_at = serializable.get('expire_at');
......
import { Persistable } from './persistable'
export interface DataSource {
delete(model: Persistable): DataSource
save(model: Persistable): DataSource
findAll(modelClass: any): any
}
import { Couchbase } from 'nativescript-couchbase';
import { Persistable, Serializable, DataSource } from './persistable';
import { Persistable } from './persistable';
import { DataSource } from './data-source'
import { Serializable } from './serializable'
export class Database implements DataSource {
protected static _current: Database;
......@@ -39,7 +41,7 @@ export class Database implements DataSource {
}
public save(model: Persistable): Database {
public save(model: Persistable): this {
if (!model.validate())
return this;
......@@ -52,7 +54,7 @@ export class Database implements DataSource {
}
public delete(model: Persistable): Database {
public delete(model: Persistable): this {
let dependents = model.deleteChilds(this);
this._db.deleteDocument(model.getId());
model.setId(undefined);
......@@ -64,9 +66,9 @@ export class Database implements DataSource {
return this
._views
.findAll(modelClass,
(document) => {
return this._materialize(modelClass, document);
});
(document) => {
return this._materialize(modelClass, document);
});
}
......@@ -212,7 +214,7 @@ class DatabaseDocument implements Serializable {
}
public set(name: string, value: number | string | boolean): Serializable {
public set(name: string, value: number | string | boolean): this {
this._properties[name] = (null == value ? '' : value);
return this;
}
......
export { Persistable, Serializable, DataSource } from './persistable'
export { Persistable } from './persistable'
export { DataSource } from './data-source'
export { Serializable } from './serializable'
export { Database } from './database'
export { Account } from './account'
export { ItemOperation } from './item-operation'
......
import {Account, ItemOperation, Iso8601Date} from '../models/';
import {Persistable, Serializable} from './persistable';
import { Account, ItemOperation, Iso8601Date, Serializable } from '../models/';
import { Persistable } from './persistable';
export class Loan extends ItemOperation {
protected _date_due: string = '';
protected _loan_id: string = '';
public setDateDue(date_due:string): this {
public setDateDue(date_due: string): this {
this._date_due = date_due;
return this;
}
public getDateDue():string {
public getDateDue(): string {
return this._item.date_due
? this._item.date_due // @deprecated 0.0.26
: this._date_due;
......@@ -27,9 +28,9 @@ export class Loan extends ItemOperation {
public getLoanId(): string {
return this._loan_id;
}
public formattedDateDue():string {
public formattedDateDue(): string {
return new Iso8601Date(this.getDateDue()).asLongDate();
}
......@@ -38,7 +39,7 @@ export class Loan extends ItemOperation {
return (new Date(this.getDateDue())).valueOf() < Date.now().valueOf();
}
public serializeOn(serializable: Serializable) {
super.serializeOn(serializable);
serializable
......@@ -46,7 +47,7 @@ export class Loan extends ItemOperation {
.set('date_due', this._date_due);
}
public materializeFrom(serializable: Serializable) {
super.materializeFrom(serializable);
this._loan_id = serializable.get('loan_id');
......
import { Observable } from 'tns-core-modules/data/observable';
import { Observable } from 'tns-core-modules/data/observable'
import { DataSource } from './data-source'
import { Serializable } from './serializable'
export abstract class Persistable extends Observable {
protected _id: string;
protected _id: string
constructor(id?: string) {
super();
this._id = id;
super()
this._id = id
}
public getId() {
return this._id;
return this._id
}
public setId(id: string) {
this._id = id;
return this;
this._id = id
return this
}
public deleteChilds(datasource: DataSource): Persistable {
return this;
public deleteChilds(datasource: DataSource): this {
return this
}