浏览代码

[core] Rowselector jQuery plugin exclude element parameter

Added possibility to avoid firing of the row click with a
data-row-selector-exclude="true" param
Enrico Berti 13 年之前
父节点
当前提交
6c9657b
共有 1 个文件被更改,包括 3 次插入0 次删除
  1. 3 0
      desktop/core/static/js/Source/jHue/jquery.rowselector.js

+ 3 - 0
desktop/core/static/js/Source/jHue/jquery.rowselector.js

@@ -23,6 +23,9 @@
 	Plugin.prototype.init = function () {
 		var _this = this;		
         $(_this.element).closest("tr").click(function(e){
+            if ($(e.target).data("row-selector-exclude")){
+                return;
+            }
             if (!$(e.target).is("a")){
                 if ($.trim($(_this.element).attr("href")) != ""){
                     location.href = $(_this.element).attr("href");