Propagate the readOnly option to the viewClickList AJAX action
This commit is contained in:
parent
c4007dd570
commit
7f22ba62dc
|
|
@ -599,10 +599,11 @@ class RelationController extends ControllerBehavior
|
|||
$config->recordUrl = $this->getConfig('view[recordUrl]', null);
|
||||
|
||||
$defaultOnClick = sprintf(
|
||||
"$.oc.relationBehavior.clickViewListRecord(':%s', '%s', '%s')",
|
||||
"$.oc.relationBehavior.clickViewListRecord(':%s', '%s', '%s', %s)",
|
||||
$this->relationModel->getKeyName(),
|
||||
$this->field,
|
||||
$this->relationGetSessionKey()
|
||||
$this->relationGetSessionKey(),
|
||||
$this->readOnly ? 1 : 0
|
||||
);
|
||||
|
||||
if ($config->recordUrl) {
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@
|
|||
$(el).closest('.control-list').listWidget('toggleChecked', [el])
|
||||
}
|
||||
|
||||
this.clickViewListRecord = function(recordId, relationField, sessionKey) {
|
||||
this.clickViewListRecord = function(recordId, relationField, sessionKey, readOnly) {
|
||||
var newPopup = $('<a />')
|
||||
|
||||
newPopup.popup({
|
||||
|
|
@ -18,7 +18,8 @@
|
|||
extraData: {
|
||||
'manage_id': recordId,
|
||||
'_relation_field': relationField,
|
||||
'_session_key': sessionKey
|
||||
'_session_key': sessionKey,
|
||||
'_relation_read_only': readOnly ? 1 : 0
|
||||
}
|
||||
})
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue