From ec88f34d6ad59ae04ee5a2ea0dd84dacafd0a892 Mon Sep 17 00:00:00 2001 From: xdrm-brackets Date: Tue, 20 Feb 2018 22:57:52 +0100 Subject: [PATCH] no more API or PopUp in pages -> common --- webpack/page/home.js | 18 ++++++++---------- webpack/page/login.js | 16 +++++++--------- 2 files changed, 15 insertions(+), 19 deletions(-) diff --git a/webpack/page/home.js b/webpack/page/home.js index 1c5d8c0..2ce9cba 100644 --- a/webpack/page/home.js +++ b/webpack/page/home.js @@ -3,13 +3,10 @@ /* (1) NPM libs */ import Vue from 'vue' -/* (2) Internal libs */ -import {APIClient} from '../lib/api-client' - -/* (3) Vues */ +/* (2) Vues */ import wrapper_vue from '../vue/wrapper.vue' -/* (4) Data */ +/* (3) Data */ require('../data/common'); require('../data/home'); @@ -18,11 +15,12 @@ require('../data/home'); /* (2) Initialisation ---------------------------------------------------------*/ -/* (1) API */ -window.api = new APIClient(gstore.get.is_local ? 'http://ptut.com:8080/api/v/1.0/' : 'https://ptut.xdrm.io/api/v/1.0/'); - -/* (2) Render view */ +/* (1) Render view */ new Vue({ el: '#main-vue', render: h => h(wrapper_vue) -}); \ No newline at end of file +}); + + +// popup test +popup.ask({title: 'Un exemple de popup', content: "Un PopUp sauvage apparait !!
contenu HTML quelconque ...
une question, validation de suppression, etc.", action: 'Bouton d\'action', 'type': 'search' }, function(e){ console.log("Resultat Popup: "+!!e); }); \ No newline at end of file diff --git a/webpack/page/login.js b/webpack/page/login.js index 04be724..f498e88 100644 --- a/webpack/page/login.js +++ b/webpack/page/login.js @@ -3,21 +3,19 @@ /* (1) NPM libs */ import Vue from 'vue' -/* (2) Internal libs */ -import {APIClient} from '../lib/api-client' - -/* (3) Vues */ +/* (2) Vues */ import wrapper_vue from '../vue/wrapper.vue' +/* (3) Data */ +require('../data/common'); +require('../data/home'); + + /* (2) Initialisation ---------------------------------------------------------*/ -/* (1) API */ -window.api = new APIClient(gstore.data.is_local ? 'http://ptut.com:8080/api/v/1.0/' : 'https://ptut.xdrm.io/api/v/1.0/'); - - -/* (2) Render view */ +/* (1) Render view */ new Vue({ el: '#main-vue', render: h => h(wrapper_vue)