[SPIP] ~maj 3.0.10 --> 3.0.14
[lhc/web/www.git] / www / plugins-dist / forum / prive / javascript / actiongroup.js
index 0be8b26..4944a64 100644 (file)
@@ -3,6 +3,19 @@ var actiongroup={
        countchecked:0,
        countCurrent:0
 }
+/**
+ * Position fixe lors du scroll
+ */
+actiongroup.followScroll = function(){
+       var container = $("#actiongroup").parents('.box.raccourcis');
+       var limite = container.offset().top;
+       $(window).scroll(function() {
+               if($(this).scrollTop() > limite)
+                       container.css({'position': 'fixed', 'top': 0, 'width': container.width()+'px'});
+               if($(this).scrollTop() < limite)
+                       container.css({'position': 'static', 'width': 'auto'}); 
+       });
+}
 /**
  * Vider completement la selection
  */
@@ -192,4 +205,5 @@ actiongroup.activate = function(sel){
                        }
                });
        actiongroup.updateHtmlFromChecklist();
+       actiongroup.followScroll();
 }