summaryrefslogtreecommitdiffstats
path: root/afb-client/app/Frontend/pages/SamplePost
diff options
context:
space:
mode:
authorFulup Ar Foll <fulup@iot.bzh>2016-05-28 12:28:19 +0200
committerFulup Ar Foll <fulup@iot.bzh>2016-05-28 12:28:19 +0200
commit95a5e12dca0e0e0eb93b3dad69e529d737840d38 (patch)
tree618f800406d41e6f23e5722671ed51ac0144bd8e /afb-client/app/Frontend/pages/SamplePost
parent6d06a2a9a02906ce4c848540d74c3c5798688664 (diff)
Clean up and documentation
Diffstat (limited to 'afb-client/app/Frontend/pages/SamplePost')
-rw-r--r--afb-client/app/Frontend/pages/SamplePost/SamplePost.html29
-rw-r--r--afb-client/app/Frontend/pages/SamplePost/SamplePost.js18
-rw-r--r--afb-client/app/Frontend/pages/SamplePost/SamplePost.scss41
3 files changed, 88 insertions, 0 deletions
diff --git a/afb-client/app/Frontend/pages/SamplePost/SamplePost.html b/afb-client/app/Frontend/pages/SamplePost/SamplePost.html
new file mode 100644
index 0000000..fa721c7
--- /dev/null
+++ b/afb-client/app/Frontend/pages/SamplePost/SamplePost.html
@@ -0,0 +1,29 @@
+<!-- Foundation Annotations generate tmp/route.js -->
+---
+name: PostSample
+url: /sample-post
+controller: SamplePostController as ctrl
+animationIn: slideInRight
+---
+
+<h1><img class="logo" src="images/logo/triskel_iot_bzhx250.png" alt="IoT.bzh Logo" style="height:150px;">
+ Post File Upload
+</h1>
+
+<div class="sample-box box-content">
+
+ <!-- Usage: upload-xxxxx
+ name = [xxxxxx] is use a field label for xform input field. Should match with server side
+ category = [avatar] should match to a valid directory of thumbnail within AppConfig.path
+ thumbnail= [tux-bzh.png] a valid image within AppConfig.paths.[category]
+ istoobig = [istoobig.png] used image from AppConfig.paths.[category] when file is oversized
+ maxsize = [xxx] maximum size in KB [default max depend on upload-type]
+ accept = [image] acceptable accept for upload
+ -->
+ <upload-image category="avatar" thumbnail="tux-visitor.png" maxsize="100"
+ posturl="/api/post/upload-image" callback="ctrl.FileUploaded" accept="image" title="Change your Avatar">
+ </upload-image>
+
+</div>
+
+<link-button href="home" icon="fi-home" label="home"></link-button>
diff --git a/afb-client/app/Frontend/pages/SamplePost/SamplePost.js b/afb-client/app/Frontend/pages/SamplePost/SamplePost.js
new file mode 100644
index 0000000..e0c06de
--- /dev/null
+++ b/afb-client/app/Frontend/pages/SamplePost/SamplePost.js
@@ -0,0 +1,18 @@
+(function() {
+'use strict';
+
+// list all rependencies within the page + controler if needed
+angular.module('SamplePostModule', ['SubmitButton','UploadFiles'])
+
+ .controller('SamplePostController', function ($http) {
+ var scope = this; // I hate JavaScript
+
+ console.log ("sample Init");
+
+ scope.FileUploaded = function (response) {
+ console.log ("FileUploaded response=%s", JSON.stringify(response));
+ };
+ });
+
+console.log ("PostSampleController Loaded");
+})(); \ No newline at end of file
diff --git a/afb-client/app/Frontend/pages/SamplePost/SamplePost.scss b/afb-client/app/Frontend/pages/SamplePost/SamplePost.scss
new file mode 100644
index 0000000..7654424
--- /dev/null
+++ b/afb-client/app/Frontend/pages/SamplePost/SamplePost.scss
@@ -0,0 +1,41 @@
+/*
+ * 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 <http://www.gnu.org/licenses/>.
+ */
+
+@import "app/ibz-mixins";
+
+
+.sample-box {
+ display: block;
+ height : 4.5rem;
+
+ .sample-button {
+ float: right;
+ width: 5rem;
+ };
+
+ .muted-on-on,.muted-off-off{
+ background: blueviolet;
+ };
+
+ .muted-error{
+ background: red;
+ };
+};
+
+
+