olivier.massot hace 7 años
padre
commit
d559635e72
Se han modificado 4 ficheros con 106 adiciones y 96 borrados
  1. 3 0
      MobiParc/assets/css/custom.css
  2. 67 67
      MobiParc/assets/js/main.js
  3. 36 29
      MobiParc/index.html
  4. BIN
      logo.png

+ 3 - 0
MobiParc/assets/css/custom.css

@@ -21,3 +21,6 @@
     display: none;
 }
 
+.disabled{
+    pointer-events: none;
+}

+ 67 - 67
MobiParc/assets/js/main.js

@@ -95,7 +95,7 @@ var load = function () {
         $("#main").on("submit", "form", function (event) {
             console.log("handle submit");
 
-            var form = $("#main").find(".data-form")[0];
+            var form = $("#main").find("form")[0];
 
             // Stop the form from submitting since we’re handling that with AJAX.
             event.preventDefault();
@@ -158,7 +158,7 @@ $(window).on('hashchange', function () {
 });
 
 
-//######### MAIN  ###############
+// ############  MAIN  ###############
 
 // ### Interactions
 
@@ -396,68 +396,68 @@ var formToJSON = function formToJSON(elements) {
 };
 
 
-/*
-	Intensify by TEMPLATED
-	templated.co @templatedco
-	Released for free under the Creative Commons Attribution 3.0 license (templated.co/license)
-*/
-
-(function ($) {
-
-    skel.breakpoints({
-        xlarge: '(max-width: 1680px)',
-        large: '(max-width: 1280px)',
-        medium: '(max-width: 980px)',
-        small: '(max-width: 736px)',
-        xsmall: '(max-width: 480px)'
-    });
-
-    $(function () {
-
-        var $window = $(window),
-			$body = $('body'),
-			$header = $('#header');
-
-        // Disable animations/transitions until the page has loaded.
-        $body.addClass('is-loading');
-
-        $window.on('load', function () {
-            window.setTimeout(function () {
-                $body.removeClass('is-loading');
-            }, 100);
-        });
-
-        // Fix: Placeholder polyfill.
-        $('form').placeholder();
-
-        // Prioritize "important" elements on medium.
-        skel.on('+medium -medium', function () {
-            $.prioritize(
-                '.important\\28 medium\\29',
-                skel.breakpoint('medium').active
-            );
-        });
-
-        // Scrolly.
-        $('.scrolly').scrolly({
-            offset: function () {
-                return $header.height();
-            }
-        });
-
-        // Menu.
-        $('#menu')
-            .append('<a href="#menu" class="close"></a>')
-            .appendTo($body)
-            .panel({
-                delay: 500,
-                hideOnClick: true,
-                hideOnSwipe: true,
-                resetScroll: true,
-                resetForms: true,
-                side: 'right'
-            });
-
-    });
-
-})(jQuery);
+///*
+//	Intensify by TEMPLATED
+//	templated.co @templatedco
+//	Released for free under the Creative Commons Attribution 3.0 license (templated.co/license)
+//*/
+
+//(function ($) {
+
+//    skel.breakpoints({
+//        xlarge: '(max-width: 1680px)',
+//        large: '(max-width: 1280px)',
+//        medium: '(max-width: 980px)',
+//        small: '(max-width: 736px)',
+//        xsmall: '(max-width: 480px)'
+//    });
+
+//    $(function () {
+
+//        var $window = $(window),
+//			$body = $('body'),
+//			$header = $('#header');
+
+//        // Disable animations/transitions until the page has loaded.
+//        $body.addClass('is-loading');
+
+//        $window.on('load', function () {
+//            window.setTimeout(function () {
+//                $body.removeClass('is-loading');
+//            }, 100);
+//        });
+
+//        // Fix: Placeholder polyfill.
+//        $('form').placeholder();
+
+//        // Prioritize "important" elements on medium.
+//        skel.on('+medium -medium', function () {
+//            $.prioritize(
+//                '.important\\28 medium\\29',
+//                skel.breakpoint('medium').active
+//            );
+//        });
+
+//        // Scrolly.
+//        $('.scrolly').scrolly({
+//            offset: function () {
+//                return $header.height();
+//            }
+//        });
+
+//        // Menu.
+//        $('#menu')
+//            .append('<a href="#menu" class="close"></a>')
+//            .appendTo($body)
+//            .panel({
+//                delay: 500,
+//                hideOnClick: true,
+//                hideOnSwipe: true,
+//                resetScroll: true,
+//                resetForms: true,
+//                side: 'right'
+//            });
+
+//    });
+
+//})(jQuery);

+ 36 - 29
MobiParc/index.html

@@ -56,12 +56,46 @@
 
     <!-- Templates et boites de dialogues -->
 
-    <script id="index" type="x-tmpl-mustache">
+    <script id="index" type="x-tmpl-mustache" model="activites">
 
         <header class="align-center">
-            <h1>Suivi mobile d'activités</h1>
+            <h1>Mes données</h1>
         </header>
       
+        {{#if data}}
+        <div class="table-wrapper">
+            <table class="selectable">
+                <thead>
+                    <tr>
+                        <th>Date</th>
+                        <th>Loc.</th>
+                        <th>Real.</th>
+                        <th>...</th>
+                    </tr>
+                </thead>
+                <tbody>
+                    {{#data}}
+                    <tr data-id="{{tstamp}}" data-type="activite">
+                        <td>{{dateint}}</td>
+                        <td>{{localisation}}</td>
+                        <td>{{realisation}}</td>
+                        <td>Voir+</td>
+                    </tr>
+                    {{/data}}
+                </tbody>
+            </table>
+        </div>
+
+        <ul class="actions">
+            <li>
+                <a href="#activites" class="button">Ajouter</a>
+            </li>
+            <li>
+                <button class="del btn btn-delete" disabled>Supprimer</button>
+            </li>
+        </ul>
+        {{/if}}
+
     </script>
 
     <script id="activites" type="x-tmpl-mustache" model="activites">
@@ -168,33 +202,6 @@
                 </div>
 
             </form>
-        
-
-            {{#if data}}
-            <button class="del btn btn-delete" disabled>Supprimer</button>
-
-            <h2>Mes données</h2>
-            <table class="selectable">
-                <thead>
-                    <tr>
-                        <td>Date</td>
-                        <td>Loc.</td>
-                        <td>Real.</td>
-                        <td>...</td>
-                    </tr>
-                </thead>
-                <tbody>
-                    {{#data}}
-                    <tr data-id="{{tstamp}}" data-type="activite">
-                        <td>{{dateint}}</td>
-                        <td>{{localisation}}</td>
-                        <td>{{realisation}}</td>
-                        <td>Voir+</td>
-                    </tr>
-                    {{/data}}
-                </tbody>
-            </table>
-            {{/if}}
 
         </div>
     </script>

BIN
logo.png