From 49aac466d7b9978226463c21898f6197a42a00d4 Mon Sep 17 00:00:00 2001 From: Steve Sutton Date: Tue, 5 Aug 2014 13:40:52 -0400 Subject: [PATCH] Fix for blocks jquery plugin not working for the columnview. --- Toolkit/Blocks/IndexController.php | 4 ++++ classes/class_toolbox.inc | 8 +++++++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/Toolkit/Blocks/IndexController.php b/Toolkit/Blocks/IndexController.php index 927db89..39e48b0 100644 --- a/Toolkit/Blocks/IndexController.php +++ b/Toolkit/Blocks/IndexController.php @@ -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'; diff --git a/classes/class_toolbox.inc b/classes/class_toolbox.inc index ba79b11..c4d8bbc 100755 --- a/classes/class_toolbox.inc +++ b/classes/class_toolbox.inc @@ -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); -- 2.17.1