simplelist can be datatabled with need_datatables=True
[unfold.git] / static / js / plugin.js
index cb04cfc..4d8346d 100644 (file)
@@ -7,20 +7,21 @@
  * }; 
  */
 
-$(document).ready(
-    function() {
-       $('.plugin-hide').each(function(p) {
-           plugin='#'+$(this).attr('id').replace('hide-','plugin-');
-           show='#'+$(this).attr('id').replace('hide-','show-');
-           type=$(this).attr('plugin-type');
-           $(this).click(function () { jQuery(plugin).hide(); jQuery(show).show(); $(this).hide();})
+$(document).ready(function() {
+    $('.plugin-hide').each(function() {
+       window.console.log ('@load: id='+$(this).attr('id'));
+       $(this).click(function () { 
+           var plugin='#'+$(this).attr('id').replace('hide-','plugin-'); 
+           var show='#'+$(this).attr('id').replace('hide-','show-'); 
+           window.console.log ("Hiding:"+$(this).attr('id')+' plugin='+plugin+' show='+show);
+           jQuery(plugin).hide(); jQuery(show).show(); $(this).hide();});
        })
-       $('.plugin-show').each(function(p) {
-           plugin='#'+$(this).attr('id').replace('show-','plugin-');
-           hide='#'+$(this).attr('id').replace('show-','hide-');
-           type=$(this).attr('plugin-type');
-           $(this).click(function () { jQuery(plugin).show(); jQuery(hide).show(); $(this).hide();})
+    $('.plugin-show').each(function() {
+       window.console.log ('@load: id='+$(this).attr('id'));
+       $(this).click(function () { 
+           var plugin='#'+$(this).attr('id').replace('show-','plugin-'); 
+           var hide='#'+$(this).attr('id').replace('show-','hide-'); 
+           window.console.log ("Showing:"+$(this).attr('id')+' plugin='+plugin+' hide='+hide);
+           jQuery(plugin).show(); jQuery(hide).show(); $(this).hide();});
        })
-           })
-
-
+    })