Widget small UI fix.
[wolnelektury.git] / wolnelektury / static / js / catalogue.js
index b495ee5..4b09de8 100644 (file)
@@ -446,5 +446,39 @@ function serverTime() {
             $('#download-shelf-menu').slideUp('fast');
             return false;
         });
+
+        $('marquee').marquee().mouseover(function () {
+            $(this).trigger('stop');
+        }).mouseout(function () {
+            $(this).trigger('start');
+             $(this).data('drag', false);
+        }).mousemove(function (event) {
+            if ($(this).data('drag') == true) {
+                this.scrollLeft = $(this).data('scrollX') + ($(this).data('x') - event.clientX);
+            }
+        }).mousedown(function (event) {
+            $(this).data('drag', true).data('x', event.clientX).data('scrollX', this.scrollLeft);
+        }).mouseup(function () {
+            $(this).data('drag', false);
+        });
+
+        $('.widget-code').focus(
+            function(){
+                $(this).animate({rows: '11'}, 100, function(){
+                    this.select();
+                    $(this).click(function(){
+                        this.select();
+                    });
+                })
+                
+            } 
+        ).blur(
+            function(){
+                $(this).animate({rows: '1'}, 300, function(){
+                    $(this).unbind('click');
+                })
+            } 
+        );
+
     });
 })(jQuery)