Fix mail ACL rights selector

This commit is contained in:
Hadi Nategh 2014-02-14 09:24:52 +00:00
parent 7d09589f73
commit e670459122

View File

@ -2579,10 +2579,10 @@ app.classes.mail = AppJS.extend(
acl_common_rights_selector: function(event,widget)
{
var rowId = widget.id.replace(/[^0-9.]+/g, '');
var rights = (widget.value == "custom")?[]:(widget.value == "akxeilprwts")? widget.value.replace(/[k,x,t,e]/g,"cd").split(""):widget.value.split("");
var rights = (widget.get_value() == "custom")?[]:(widget.get_value() == "akxeilprwts")? widget.get_value().replace(/[k,x,t,e]/g,"cd").split(""):widget.get_value().split("");
for (var i=0;i<this.aclRights.length;i++)
{
rightsWidget = this.et2.getWidgetById(rowId+'[acl_' + this.aclRights[i]+ ']');
var rightsWidget = this.et2.getWidgetById(rowId+'[acl_' + this.aclRights[i]+ ']');
rightsWidget.set_value((jQuery.inArray(this.aclRights[i],rights) != -1 )?true:false);
}
},
@ -2603,7 +2603,7 @@ app.classes.mail = AppJS.extend(
for (var i=0;i<this.aclRights.length;i++)
{
rightsWidget = this.et2.getWidgetById(rowId+'[acl_' + this.aclRights[i]+ ']');
var rightsWidget = this.et2.getWidgetById(rowId+'[acl_' + this.aclRights[i]+ ']');
if (rightsWidget.get_value() == "true")
rights += this.aclRights[i];