Account status is now part of the "notifications" area
[arvados.git] / apps / workbench / app / assets / javascripts / application.js
index 57338106516a2b723d0cf10831884342fd9928ba..f474fc3e613db87b75468e8f628a641dedb61472 100644 (file)
 //= require jquery
 //= require jquery_ujs
 //= require twitter/bootstrap
+//= require bootstrap-editable
+//= require bootstrap-editable-rails
 //= require_tree .
+
+jQuery(function($){
+    $.ajaxSetup({
+        headers: {
+            'X-CSRF-Token': $('meta[name="csrf-token"]').attr('content')
+        }
+    });
+    $('.editable').editable();
+    $('[data-toggle=tooltip]').tooltip();
+
+    $('.expand-collapse-row').on('click', function(event) {
+        var targets = $('#' + $(this).attr('data-id'));
+        if (targets.css('display') == 'none') {
+            $(this).addClass('icon-minus-sign');
+            $(this).removeClass('icon-plus-sign');
+        } else {
+            $(this).addClass('icon-plus-sign');
+            $(this).removeClass('icon-minus-sign');
+        }
+        targets.fadeToggle(200);
+    });
+})(jQuery);