From a808486bae230c982a05980a0a28c00a43c05d3a Mon Sep 17 00:00:00 2001 From: Romain Forlot Date: Thu, 18 May 2017 17:49:35 +0200 Subject: Git repo can be used as submodules Clean templates files as they are useless for usage in submodules into a project. Change-Id: I24c71b64ab2b3a958494f3f190c014227a1da576 Signed-off-by: Romain Forlot --- .../app/Frontend/pages/SampleHome/SampleHome.html | 34 ------- .../app/Frontend/pages/SampleHome/SampleHome.js | 104 --------------------- .../app/Frontend/pages/SampleHome/SampleHome.scss | 71 -------------- 3 files changed, 209 deletions(-) delete mode 100644 templates/html5/app/Frontend/pages/SampleHome/SampleHome.html delete mode 100644 templates/html5/app/Frontend/pages/SampleHome/SampleHome.js delete mode 100644 templates/html5/app/Frontend/pages/SampleHome/SampleHome.scss (limited to 'templates/html5/app/Frontend/pages') diff --git a/templates/html5/app/Frontend/pages/SampleHome/SampleHome.html b/templates/html5/app/Frontend/pages/SampleHome/SampleHome.html deleted file mode 100644 index 9c13ea9..0000000 --- a/templates/html5/app/Frontend/pages/SampleHome/SampleHome.html +++ /dev/null @@ -1,34 +0,0 @@ - ---- -name: SampleHome -url: /sample-home -controller: SampleHomeController as ctrl -animationIn: slideInRight ---- - -

- - App Framework - HTML5 Client -

- - - - -
- - - - - - -
-
-
- req= {{ctrl.request}} - res= {{ctrl.response}} - status= {{ctrl.errcode}} -
-
- - - diff --git a/templates/html5/app/Frontend/pages/SampleHome/SampleHome.js b/templates/html5/app/Frontend/pages/SampleHome/SampleHome.js deleted file mode 100644 index 1e404b8..0000000 --- a/templates/html5/app/Frontend/pages/SampleHome/SampleHome.js +++ /dev/null @@ -1,104 +0,0 @@ -(function() { -'use strict'; - -// WARNING: make sure than app/frontend/services/AppConfig.js match your server - -// list all rependencies within the page + controler if needed -angular.module('SampleHomeModule', ['SubmitButton', 'TokenRefresh','ModalNotification']) - - .controller('SampleHomeController', function (AppCall, Notification) { - var scope = this; // I hate JavaScript - scope.uuid ="none"; - scope.token ="none"; - scope.session="none"; - scope.status ="err-no"; - - console.log ("Home Controller"); - - scope.OnResponse= function(jresp, errcode) { - - // Update UI response global display zone - scope.status = jresp.request.status; - scope.errcode = errcode; - scope.request = jresp.request; - scope.response = jresp.response; - - var action=jresp.request.reqid.toUpperCase(); - - switch (action) { - case 'CONNECT': - if (jresp.request.status !== "success") { - Notification.error ({message: action + ": Logout before reconnecting", delay: 5000}); - scope.class [jresp.request.reqid]="fail"; - return; - } - scope.class={}; // reset CSS buttons classes - break; - - case 'LOGOUT': - if (jresp.request.status !== "success") { - Notification.error ({message: action + ": Do connect first", delay: 5000}); - scope.class [jresp.request.reqid]="fail"; - return; - } - scope.class={}; // reset CSS buttons classes - break; - - case 'REFRESH': - case 'CHECK': - if (jresp.request.status !== "success") { - Notification.error ({message: action + ": Need to be Connected to check/refresh session", delay: 5000}); - scope.class [jresp.request.reqid]="fail"; - return; - } - - break; - - default: - Notification.error ({message: "Invalid RequestID:" + jresp.request.reqid , delay: 5000}); - return; - } - - // update button classes within home.html - scope.class [jresp.request.reqid]="success"; - console.log ("OK: "+ JSON.stringify(jresp)); - }; - - scope.ProcessError= function(response, errcode, config) { - Notification.error ({message: "Invalid API:" + response.request.reqid , delay: 5000}); - scope.status = "err-fx"; - scope.errcode = errcode; - scope.request = response.request; - scope.response = ""; - console.log ("FX: "+ JSON.stringify(response)); - }; - - scope.ConnectClient = function() { - console.log ("ConnectClient"); - AppCall.get ("auth", "connect", {/*query*/}, scope.OnResponse, scope.InvalidApiCall); - }; - - scope.CheckSession = function() { - console.log ("CheckSession"); - AppCall.get ("auth", "check", {/*query*/}, scope.OnResponse, scope.InvalidApiCall); - - }; - - scope.RefreshSession = function() { - console.log ("RefreshSession"); - AppCall.get ("auth", "refresh", {/*query*/}, scope.OnResponse, scope.InvalidApiCall); - }; - - scope.LogoutClient = function() { - console.log ("LogoutClient"); - AppCall.get ("auth", "logout", {/*query*/}, scope.OnResponse, scope.InvalidApiCall); - }; - - scope.Initialised = function () { - scope.class = {connect: "success"}; - }; - - }); - -console.log ("SampleControler Loaded"); -})(); diff --git a/templates/html5/app/Frontend/pages/SampleHome/SampleHome.scss b/templates/html5/app/Frontend/pages/SampleHome/SampleHome.scss deleted file mode 100644 index 8bf04a1..0000000 --- a/templates/html5/app/Frontend/pages/SampleHome/SampleHome.scss +++ /dev/null @@ -1,71 +0,0 @@ -/* - * Copyright (C) 2015 "IoT.bzh" - * Author "Fulup Ar Foll" - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -@import "app/ibz-mixins"; - -$COLOR_SUCCESS: green; -$COLOR_FAIL: red; - -token-refresh { - display: block; - float: right; - margin: .5rem 1rem 0 0; -} - -.button-box { - height : 4.5rem; - - .session-button { - float: left; - width: 5rem; - }; - - .response > span{ - display: block; - margin: .3rem .5rem .3rem .5rem; - } - - .fail { - color:$COLOR_FAIL; - border: 1px solid darken($COLOR_FAIL,10%); - } - .success { - color:$COLOR_SUCCESS; - border: 1px solid darken($COLOR_SUCCESS,10%); - } - -}; - -.message-box { - height : auto; - width: 100%; - font-size: .75rem; - - .response { - .err-no { color:grey; } - .res.err-ok { color: blue; } - .req.err-ok { color:blueviolet; } - .status.err-ok { color:green; } - .status.err-fx { color:red; } - } - - -}; - - - -- cgit 1.2.3-korg