Resources/public/js/wikiTag.js
changeset 53 22377c9e2eae
parent 52 e804ae133f27
child 61 1bc0ec8ed05b
--- a/Resources/public/js/wikiTag.js	Fri Dec 02 11:31:51 2011 +0100
+++ b/Resources/public/js/wikiTag.js	Wed Dec 07 15:06:35 2011 +0100
@@ -133,9 +133,9 @@
             $($(row).children()[1]).html("<img src='"+static_url+"/images/indicator.gif'/>");
             rows = table.tBodies[0].rows;
             nb_rows = rows.length;
-            for(var i=1; i<nb_rows; i++){
+            for(var i=0; i<nb_rows; i++){
                 if(rows[i].id==old_order){
-                    new_order = i; // No need to +1 because rows[0] are headers
+                    new_order = i+1;
                     $.ajax({
                         url: tag_up_down_url,
                         type: 'POST',
@@ -157,6 +157,10 @@
         },
         dragHandle: "wikitag_updown_td"
     });
+    // Hide/show column management. We disable the possibility to hide menu (column 14).
+    $('#wikitag_table').columnManager({listTargetID:'wikitag_ul_target', onClass: 'wikitag_advon', offClass: 'wikitag_advoff', hideInList: [14], saveState: true, colsHidden: columsToHide});
+    //create the clickmenu from the target
+    $('#wikitag_ulSelectColumn').clickMenu({onClick: function(){}});
 }
 
 function wikitag_init_datasheet_events()