replace colorbox with fancybox
authorSteve Sutton <steve@gaslightmedia.com>
Tue, 19 Aug 2014 14:11:51 +0000 (10:11 -0400)
committerSteve Sutton <steve@gaslightmedia.com>
Tue, 19 Aug 2014 14:12:28 +0000 (10:12 -0400)
Color box not working with newer version of jquery.

Toolkit/Videos/VideosDataGrid.php
Toolkit/Videos/WebPageDecorator.php
Toolkit/Videos/libjs/videos.js

index f2403e8..f9c5c93 100644 (file)
@@ -212,7 +212,7 @@ class Toolkit_Videos_VideosDataGrid
             $vidCode = $match[1];
         }
         $thumb = ($vidCode)
-            ? '<a href="http://www.youtube.com/embed/'.$vidCode.'?rel=0" class="colorbox"><img src="http://img.youtube.com/vi/'.$vidCode.'/default.jpg"></a>'
+            ? '<a href="http://www.youtube.com/embed/'.$vidCode.'?rel=0" class="various fancybox.iframe vidimg"><img src="http://img.youtube.com/vi/'.$vidCode.'/default.jpg"></a>'
             : '';
         return $thumb;
     }
@@ -289,9 +289,9 @@ class Toolkit_Videos_VideosDataGrid
                $GLOBALS['styleSheets'][]
             = MEDIA_BASE_URL . 'Toolkit/Videos/styles.css';
         $GLOBALS['styleSheets'][]
-            = MEDIA_APP_BASE_URL . 'gallery/colorbox/colorbox.css';
-        $GLOBALS['bottomScripts'][]
-            = MEDIA_APP_BASE_URL . 'libjs/plugins/colorbox/1.3.15/jquery.colorbox-min.js';
+            = MEDIA_BASE_URL . 'fancybox/jquery.fancybox.css';
+        $GLOBALS['topScripts'][]
+            = MEDIA_BASE_URL . 'fancybox/jquery.fancybox.js';
         $GLOBALS['bottomScripts'][]
             = MEDIA_BASE_URL . 'Toolkit/Videos/libjs/videos.js';
                return parent::toHTML();
index 689f220..3a9cd6c 100644 (file)
@@ -53,10 +53,8 @@ class Toolkit_Videos_WebPageDecorator implements Toolkit_Videos_IDecorator
         PDO $dbh,
         $gateway = null
     ) {
-        $GLOBALS['styleSheets'][]
-            = MEDIA_APP_BASE_URL . 'gallery/colorbox/colorbox.css';
         $GLOBALS['bottomScripts'][]
-            = MEDIA_APP_BASE_URL . 'libjs/plugins/colorbox/1.3.15/jquery.colorbox-min.js';
+            = MEDIA_BASE_URL . 'fancybox/jquery.fancybox.js';
         $GLOBALS['bottomScripts'][]
             = MEDIA_BASE_URL . 'Toolkit/Videos/libjs/videos.js';
         $dbh = Toolkit_Database::getInstance();
index aa764e6..600df7f 100644 (file)
@@ -1,12 +1,11 @@
 var GLMColorBox = {
     init: function() {
-               var width = $(window).width() * .85;
+        var width = $(window).width() * .85;
         var height = $(window).height() * .8;
-        //$('a.colorbox').colorbox({iframe: true, innerWidth:425, innerHeight:344});
-        $('select.posSelect').each(function () {
-            $(this).change(function(){
+        $('select.posSelect').each(function() {
+            $(this).change(function() {
                 var id = $(this).attr('rel');
-                var newpos = $(this).attr('value');
+                var newpos = $(this).prop('value');
                 window.location.href = '../video-move/' + id + '/' + newpos + '/';
             });
         });
@@ -16,15 +15,15 @@ var GLMColorBox = {
 $(document).ready(GLMColorBox.init);
 
 $(document).ready(function() {
-       $(".various").fancybox({
-               maxWidth        : 1200,
-               maxHeight       : 800,
-               fitToView       : false,
-               width           : '100%',
-               height          : '100%',
-               autoSize        : false,
-               closeClick      : false,
-               openEffect      : 'none',
-               closeEffect     : 'none'
-       });
+    $(".various").fancybox({
+        maxWidth: 1200,
+        maxHeight: 800,
+        fitToView: false,
+        width: '100%',
+        height: '100%',
+        autoSize: false,
+        closeClick: false,
+        openEffect: 'none',
+        closeEffect: 'none'
+    });
 });