Fix for blocks
authorSteve Sutton <steve@gaslightmedia.com>
Tue, 5 Aug 2014 17:40:52 +0000 (13:40 -0400)
committerSteve Sutton <steve@gaslightmedia.com>
Tue, 5 Aug 2014 17:40:52 +0000 (13:40 -0400)
jquery plugin not working for the columnview.

Toolkit/Blocks/IndexController.php
classes/class_toolbox.inc

index 927db89..39e48b0 100644 (file)
@@ -45,6 +45,8 @@ class Toolkit_Blocks_IndexController
      */
     public function indexAction()
     {
+        $GLOBALS['topScripts'][] = MEDIA_APP_BASE_URL
+            . 'libjs/jquery/jquery-1.7.2.min.js';
         $GLOBALS['bottomScripts'][] = MEDIA_BASE_URL .
                 $this->registry->appConfig->application->setPath .
                 '/js/jquery.columnview.js';
@@ -71,6 +73,8 @@ class Toolkit_Blocks_IndexController
      */
     public function EditAction()
     {
+        $GLOBALS['topScripts'][] = MEDIA_APP_BASE_URL
+            . 'libjs/jquery/jquery-1.7.2.min.js';
         $GLOBALS['bottomScripts'][] = MEDIA_BASE_URL .
             $this->registry->appConfig->application->setPath .
             '/js/jquery.columnview.js';
index ba79b11..c4d8bbc 100755 (executable)
@@ -1527,8 +1527,14 @@ class GLM_TOOLBOX
                 MEDIA_APP_BASE_URL . 'libjs/jquery/jquery-1.4.2.min.js',
                 $GLOBALS['topScripts']
             );
+            $foundKey2 = array_search(
+                MEDIA_APP_BASE_URL . 'libjs/jquery/jquery-1.7.2.min.js',
+                $GLOBALS['topScripts']
+            );
 
-            if ($foundKey === false || $foundKey === null) {
+            if (   ($foundKey === false || $foundKey === null)
+                && ($foundKey2 === false || $foundKey2 === null)
+            ) {
                 $topScripts = $GLOBALS['topScripts'];
                 array_reverse($topScripts);
                 array_push($topScripts, JQUERY_CDN_JS);