[PATCH conductor 2/2] application.js: Removed unused code

jzigmund at redhat.com jzigmund at redhat.com
Fri May 4 16:47:47 UTC 2012


From: Jozef Zigmund <jzigmund at redhat.com>

---
 src/public/javascripts/application.js |   60 ---------------------------------
 1 files changed, 0 insertions(+), 60 deletions(-)

diff --git a/src/public/javascripts/application.js b/src/public/javascripts/application.js
index 52bb712..2a9c7ac 100644
--- a/src/public/javascripts/application.js
+++ b/src/public/javascripts/application.js
@@ -299,66 +299,6 @@ $.extend(Conductor, {
         }
     });
   };
-  $.fn.buttonSensitivity = function () {
-    var $checkboxes = $(this),
-      $edit = $('.actionsidebar .edit'),
-      $delete = $('.actionsidebar .delete'),
-      $rename = $('.actionsidebar .rename'),
-      $copy = $('.actionsidebar .copy'),
-      $build = $('.actionsidebar .build');
-    return $checkboxes.change(function () {
-      var $checked = $checkboxes.filter(':checked');
-      if ($checked.length === 0) {
-        //disable the build, edit and delete action if there is none selected
-        $build.addClass("disabled");
-        $edit.addClass("disabled");
-        $delete.addClass("disabled");
-        $("input", $build).attr("disabled","disabled");
-        $("input", $edit).attr("disabled","disabled");
-        $("input", $delete).attr("disabled","disabled");
-      } else if ($checked.length > 1) {
-        //disable the build and edit if there is more than one
-        $edit.addClass("disabled");
-        $build.addClass("disabled");
-        $delete.removeClass("disabled");
-        $("input", $build).attr("disabled","disabled");
-        $("input", $edit).attr("disabled","disabled");
-        $("input", $delete).removeAttr("disabled");
-      } else {
-        $("input", $build).removeAttr("disabled");
-        $("input", $edit).removeAttr("disabled");
-        $("input", $delete).removeAttr("disabled");
-        $build.removeClass("disabled");
-        $edit.removeClass("disabled");
-        $delete.removeClass("disabled");
-      }
-    });
-  };
-  $.fn.positionAncestor = function(selector) {
-    var left = 0;
-    var top = 0;
-    this.each(function(index, element) {
-        // check if current element has an ancestor matching a selector
-        // and that ancestor is positioned
-        var $ancestor = $(this).closest(selector);
-        if ($ancestor.length && $ancestor.css("position") !== "static") {
-            var $child = $(this);
-            var childMarginEdgeLeft = $child.offset().left - parseInt($child.css("marginLeft"), 10);
-            var childMarginEdgeTop = $child.offset().top - parseInt($child.css("marginTop"), 10);
-            var ancestorPaddingEdgeLeft = $ancestor.offset().left + parseInt($ancestor.css("borderLeftWidth"), 10);
-            var ancestorPaddingEdgeTop = $ancestor.offset().top + parseInt($ancestor.css("borderTopWidth"), 10);
-            left = childMarginEdgeLeft - ancestorPaddingEdgeLeft;
-            top = childMarginEdgeTop - ancestorPaddingEdgeTop;
-            // we have found the ancestor and computed the position
-            // stop iterating
-            return false;
-        }
-    });
-    return {
-        left:    left,
-        top:    top
-    }
-  };
 })(jQuery);
 
 /* Conductor JS */
-- 
1.7.7.6




More information about the aeolus-devel mailing list