do not wrap progress widget in an a tag and install click handler, if there is no href

This commit is contained in:
Ralf Becker 2016-02-25 13:12:25 +00:00
parent 20a27ad0fe
commit 3a00764669

View File

@ -120,17 +120,26 @@ var et2_progress = et2_valueWidget.extend([et2_IDetachedDOM],
}
this.options.href = _value;
jQuery(this.node).wrapAll('<a href="'+_value+'"></a>"');
var href = this.options.href;
var popup = this.options.extra_link_popup;
var target = this.options.extra_link_target;
jQuery(this.node).parent().click(function(e)
if (_value)
{
egw.open_link(href,target,popup);
e.preventDefault();
return false;
});
jQuery(this.node).addClass('et2_clickable')
.wrapAll('<a href="'+_value+'"></a>"');
var href = this.options.href;
var popup = this.options.extra_link_popup;
var target = this.options.extra_link_target;
jQuery(this.node).parent().click(function(e)
{
egw.open_link(href,target,popup);
e.preventDefault();
return false;
});
}
else if (jQuery(this.node).parent('a').length)
{
jQuery(this.node).removeClass('et2_clickable')
.unwrap();
}
return true;
},