From 3739e5675378c493ee60f139eb26e246f42cbc8a Mon Sep 17 00:00:00 2001 From: jcreek Date: Sat, 7 Nov 2015 18:11:27 +0000 Subject: [PATCH] A visually pleasing teacher page with currently not working modals, despite apparently correct code that was directly copied from the materialize.css examples. --- .DS_Store | Bin 6148 -> 6148 bytes build/components.html | 134 ++++++++++++++++++++-- build/components.js | 19 ++++ build/index.html | 148 ++++++++++++++++++++++--- build/index.js | 19 ++++ client/components/teacher/teacher.html | 134 ++++++++++++++++++++-- client/components/teacher/teacher.js | 19 ++++ client/index.html | 14 +-- 8 files changed, 443 insertions(+), 44 deletions(-) diff --git a/.DS_Store b/.DS_Store index e670f7aa1dce26b5c15fc236c14a3664b4fcf1cd..1db17092ba26735c9c1cae609ca81f8379adf3d0 100644 GIT binary patch literal 6148 zcmeHKy^9k;6n~TKYJ1eLQ8wzCOmKGc+k7_qPkMD7ZexSL&*h0RXL?j~pm1S?Cy z?@q9@ve4fDKoAS@53sZs8{d4~v6JM^;y~n>2Q$C7^WK~H_BWfE3;>Wu;+6pl0AONc zXdJ_Cg)lp7OOlZzXAudTBj}aeT{;*pdFlbpfM(!-WPts44cLMn_z)|<-}CfM+BTrg zrkliFfG^#jzxb={#SN&tuWi^*?Fm~vZVenrFkb+!k`XRGLVL=Z&iVE6Vr)9=vQ^0o zPgrmcx|q`k4?>8YNi=i<>frbfXBhZVTq=DdnXIvvTQ~D48~KwPciVkBX~%Y)L=Ag% zn?L!k=SaO}$NgRX7Nx4DM(YjQZ%55DgsWf;ziPuoz2XUE*9IT2P1xMHHb#UNMLW$8k&g)g{gaif|x2GtMJ36L~`+ zJUfnC+#N_=pzbvTngNx8tavQ2^Z)w(_kT4=KWPRu14oJhVl>;$2ELL!TbEvrowXLW td)SyTzqvpjf}K2$xx$X(O>A7yW-$e^E^#gpM^N-10ZxPNGz0&Xfj`oG^QQm+ delta 134 zcmZoMXfc=|#>CJzF;Q%yo}vg70|Nsi1A_nqLrO|7 z44Di$NOC~sYz)ajp-hHUhCGH6xTej59AYdR3rv|evvcrs04)Ftd}p4_FQUr{G@s!B Q5Hn1+;gQ}PBeH}U0Bmj_k^lez diff --git a/build/components.html b/build/components.html index dd68fe4..a4be84e 100644 --- a/build/components.html +++ b/build/components.html @@ -10,15 +10,129 @@ - \ No newline at end of file diff --git a/build/components.js b/build/components.js index f978894..193bc1f 100644 --- a/build/components.js +++ b/build/components.js @@ -5,3 +5,22 @@ Ractive.components.parent = Ractive.extend({ Ractive.components.teacher = Ractive.extend({ template:'#teacher' }); + +// $(document).ready(function(){ +// // the "href" attribute of .modal-trigger must specify the modal ID that wants to be triggered +// $('.modal-trigger').leanModal({ +// dismissible: false, // Modal can be dismissed by clicking outside of the modal +// opacity: .5, // Opacity of modal background +// in_duration: 300, // Transition in duration +// out_duration: 200, // Transition out duration +// ready: function() { alert('Ready'); }, // Callback for Modal open +// complete: function() { alert('Closed'); } // Callback for Modal close +// } +// ); +// }); + + $(document).ready(function(){ + // the "href" attribute of .modal-trigger must specify the modal ID that wants to be triggered + $('.modal-trigger').leanModal(); + }); + diff --git a/build/index.html b/build/index.html index 7d44a6c..e432fde 100644 --- a/build/index.html +++ b/build/index.html @@ -3,16 +3,9 @@ RCard - - - - - - - @@ -28,20 +21,141 @@ -
+ + + + + + + diff --git a/build/index.js b/build/index.js index 8cbd2d5..b07b058 100644 --- a/build/index.js +++ b/build/index.js @@ -8,6 +8,25 @@ Ractive.components.teacher = Ractive.extend({ template:'#teacher' }); +// $(document).ready(function(){ +// // the "href" attribute of .modal-trigger must specify the modal ID that wants to be triggered +// $('.modal-trigger').leanModal({ +// dismissible: false, // Modal can be dismissed by clicking outside of the modal +// opacity: .5, // Opacity of modal background +// in_duration: 300, // Transition in duration +// out_duration: 200, // Transition out duration +// ready: function() { alert('Ready'); }, // Callback for Modal open +// complete: function() { alert('Closed'); } // Callback for Modal close +// } +// ); +// }); + + $(document).ready(function(){ + // the "href" attribute of .modal-trigger must specify the modal ID that wants to be triggered + $('.modal-trigger').leanModal(); + }); + + $.getJSON('/data/'+location.pathname.split('/').slice(3).join('/'), function(res){ diff --git a/client/components/teacher/teacher.html b/client/components/teacher/teacher.html index 2c594fa..9ba99cf 100644 --- a/client/components/teacher/teacher.html +++ b/client/components/teacher/teacher.html @@ -1,11 +1,125 @@ -
-
-
-
- {{studentName}} - {{age}} -

I am a very simple card. I am good at containing small bits of information. - I am convenient because I require little markup to use effectively.

-
-
+ + + + +
+ + + + Modal + + + + + +
+
+ +
    + {{#each fields:i}} + {{>field}} + {{/each}} + Fields are in here +
+
+ +
+ + +
+
+ {{studentName}} - {{age}} +

I am a very simple card. I am good at containing small bits of information. + I am convenient because I require little markup to use effectively.

+ Class 8Y/IT1
+ ICT Module Box
+
+ Behaviour
+ etc.
+

This is where the actual table data goes

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameItem NameItem Price
AlvinEclair$0.87
AlanJellybean$3.76
JonathanLollipop$7.00
ShannonKitKat$9.99
+ +
+
+ + +
+ +
+ + + + + + + + + diff --git a/client/components/teacher/teacher.js b/client/components/teacher/teacher.js index 23744ba..e08850f 100644 --- a/client/components/teacher/teacher.js +++ b/client/components/teacher/teacher.js @@ -1,3 +1,22 @@ Ractive.components.teacher = Ractive.extend({ template:'#teacher' }); + +// $(document).ready(function(){ +// // the "href" attribute of .modal-trigger must specify the modal ID that wants to be triggered +// $('.modal-trigger').leanModal({ +// dismissible: false, // Modal can be dismissed by clicking outside of the modal +// opacity: .5, // Opacity of modal background +// in_duration: 300, // Transition in duration +// out_duration: 200, // Transition out duration +// ready: function() { alert('Ready'); }, // Callback for Modal open +// complete: function() { alert('Closed'); } // Callback for Modal close +// } +// ); +// }); + + $(document).ready(function(){ + // the "href" attribute of .modal-trigger must specify the modal ID that wants to be triggered + $('.modal-trigger').leanModal(); + }); + diff --git a/client/index.html b/client/index.html index cd353ff..5fe0e08 100644 --- a/client/index.html +++ b/client/index.html @@ -3,16 +3,9 @@ RCard - - - - - - - @@ -20,5 +13,12 @@
+ + + + + + +