Move to external files
authorSteve Sutton <steve@gaslightmedia.com>
Wed, 13 Aug 2014 20:23:01 +0000 (16:23 -0400)
committerSteve Sutton <steve@gaslightmedia.com>
Wed, 13 Aug 2014 20:23:01 +0000 (16:23 -0400)
keep separation between js html and css

Toolkit/Page.php
js/pageSetup.js [new file with mode: 0644]
templates/template.html

index bf05339..bc0c368 100755 (executable)
@@ -147,6 +147,8 @@ class Toolkit_Page
         $GLOBALS['styleSheets'] = array();
         // Resources needed for every page.
         $GLOBALS['topScripts'][] = JQUERY_CDN_JS;
+        $GLOBALS['bottomScripts'][] = MEDIA_BASE_URL . 'js/foundation.min.js';
+        $GLOBALS['bottomScripts'][] = MEDIA_BASE_URL . 'js/pageSetup.js';
     }
 
     /**
diff --git a/js/pageSetup.js b/js/pageSetup.js
new file mode 100644 (file)
index 0000000..c1f4f79
--- /dev/null
@@ -0,0 +1,8 @@
+$(document).foundation();
+$(document).ready(function() {
+    $('.off-canvas-list').find('a.toggle').click(function() {
+        $(this).toggleClass('open');
+        $(this).siblings('ul').toggleClass('open');
+    });
+    $("#main .row .small-12 p").attr("class", "small-12 columns");
+});
\ No newline at end of file
index cecb6c3..0119238 100644 (file)
         <a class="exit-off-canvas"></a>
       </div>
     </div>
-
     {bottomScripts:h}
-    <script src="{mediaBaseURL:h}js/foundation.min.js"></script>
-    <script>
-      $(document).foundation();
-    </script>
-    <script>
-      $(document).ready(function(){
-        $('.off-canvas-list').find('a.toggle').click(function(){
-            $(this).toggleClass('open');
-            $(this).siblings('ul').toggleClass('open');
-          });
-          $( "#main .row .small-12 p" ).attr("class","small-12 columns");
-      });
-    </script>
   </body>
 </html>