Skip to content
Open
Show file tree
Hide file tree
Changes from 16 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions modules/backend/behaviors/RelationController.php
Original file line number Diff line number Diff line change
Expand Up @@ -262,6 +262,7 @@ public function prepareVars()
$this->vars['relationManageId'] = $this->manageId;
$this->vars['relationLabel'] = $this->config->label ?: $this->field;
$this->vars['relationManageTitle'] = $this->manageTitle;
$this->vars['relationAllowDismiss'] = (bool) $this->getConfig('manage[allowDismiss]', false);
$this->vars['relationField'] = $this->field;
$this->vars['relationType'] = $this->relationType;
$this->vars['relationSearchWidget'] = $this->searchWidget;
Expand Down Expand Up @@ -758,10 +759,13 @@ protected function makeViewWidget()
$config->noRecordsMessage = $this->getConfig('view[noRecordsMessage]');

$defaultOnClick = sprintf(
"$.wn.relationBehavior.clickViewListRecord(':%s', '%s', '%s')",
"$.wn.relationBehavior.clickViewListRecord(':%s', '%s', '%s', %s, %s, %s)",
$this->relationModel->getKeyName(),
$this->relationGetId(),
$this->relationGetSessionKey()
$this->relationGetSessionKey(),
json_encode($this->getConfig('manage[size]', 'huge')),
json_encode($this->getConfig('manage[popupClass]')),
json_encode((bool) $this->getConfig('manage[allowDismiss]', false))
);

if ($config->recordUrl) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,16 @@
$(el).closest('.control-list').listWidget('toggleChecked', [el])
}

this.clickViewListRecord = function(recordId, relationId, sessionKey) {
this.clickViewListRecord = function(recordId, relationId, sessionKey, size, popupClass, allowDismiss) {
var newPopup = $('<a />'),
$container = $('#'+relationId),
requestData = paramToObj('data-request-data', $container.data('request-data'))

newPopup.popup({
handler: 'onRelationClickViewList',
size: 'huge',
size: size || 'huge',
cssClass: popupClass,
allowDismiss: allowDismiss,
extraData: $.extend({}, requestData, {
'manage_id': recordId,
'_session_key': sessionKey
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
'data-popup-load-indicator' => true,
'sessionKey' => $newSessionKey,
'data-request-success' => "$.wn.relationBehavior.changed('" . e($relationField) . "', 'updated')",
'data-change-monitor' => $relationAllowDismiss ? 'true' : null,
]) ?>

<!-- Passable fields -->
Expand Down Expand Up @@ -35,7 +36,8 @@
<?= Form::ajax('onRelationManageCreate', [
'data-popup-load-indicator' => true,
'data-request-success' => "$.wn.relationBehavior.changed('" . e($relationField) . "', 'created')",
'sessionKey' => $newSessionKey
'sessionKey' => $newSessionKey,
'data-change-monitor' => $relationAllowDismiss ? 'true' : null,
]) ?>

<!-- Passable fields -->
Expand Down
2 changes: 1 addition & 1 deletion modules/system/assets/js/lang/lang.ar.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ if ($.oc === undefined) $.oc = $.wn
if ($.wn.langMessages === undefined) $.wn.langMessages = {}
$.wn.langMessages['ar'] = $.extend(
$.wn.langMessages['ar'] || {},
{"markdowneditor":{"formatting":"\u0627\u0644\u062a\u0646\u0633\u064a\u0642","quote":"Quote","code":"Code","header1":"Header 1","header2":"Header 2","header3":"Header 3","header4":"Header 4","header5":"Header 5","header6":"Header 6","bold":"Bold","italic":"Italic","unorderedlist":"Unordered List","orderedlist":"Ordered List","video":"Video","image":"Image","link":"Link","horizontalrule":"Insert Horizontal Rule","fullscreen":"Full screen","preview":"Preview"},"mediamanager":{"insert_link":"Insert Media Link","insert_image":"Insert Media Image","insert_video":"Insert Media Video","insert_audio":"Insert Media Audio","invalid_file_empty_insert":"Please select file to insert a links to.","invalid_file_single_insert":"Please select a single file.","invalid_image_empty_insert":"Please select image(s) to insert.","invalid_video_empty_insert":"Please select a video file to insert.","invalid_audio_empty_insert":"Please select an audio file to insert."},"alert":{"confirm_button_text":"OK","cancel_button_text":"Cancel","widget_remove_confirm":"Remove this widget?"},"datepicker":{"previousMonth":"Previous Month","nextMonth":"Next Month","months":["January","February","March","April","May","June","July","August","September","October","November","December"],"weekdays":["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],"weekdaysShort":["Sun","Mon","Tue","Wed","Thu","Fri","Sat"]},"colorpicker":{"last_color":"Use previously selected color","aria_palette":"Color selection area","aria_hue":"Hue selection slider","aria_opacity":"Opacity selection slider"},"filter":{"group":{"all":"all"},"scopes":{"apply_button_text":"Apply","clear_button_text":"Clear"},"dates":{"all":"all","filter_button_text":"Filter","reset_button_text":"Reset","date_placeholder":"Date","after_placeholder":"After","before_placeholder":"Before"},"numbers":{"all":"all","filter_button_text":"Filter","reset_button_text":"Reset","min_placeholder":"Min","max_placeholder":"Max"}},"eventlog":{"show_stacktrace":"Show the stacktrace","hide_stacktrace":"Hide the stacktrace","tabs":{"formatted":"Formatted","raw":"Raw"},"editor":{"title":"Source code editor","description":"Your operating system should be configured to listen to one of these URL schemes.","openWith":"Open with","remember_choice":"Remember selected option for this session","open":"Open","cancel":"Cancel"}}}
{"markdowneditor":{"formatting":"\u0627\u0644\u062a\u0646\u0633\u064a\u0642","quote":"Quote","code":"Code","header1":"Header 1","header2":"Header 2","header3":"Header 3","header4":"Header 4","header5":"Header 5","header6":"Header 6","bold":"Bold","italic":"Italic","unorderedlist":"Unordered List","orderedlist":"Ordered List","video":"Video","image":"Image","link":"Link","horizontalrule":"Insert Horizontal Rule","fullscreen":"Full screen","preview":"Preview"},"mediamanager":{"insert_link":"Insert Media Link","insert_image":"Insert Media Image","insert_video":"Insert Media Video","insert_audio":"Insert Media Audio","invalid_file_empty_insert":"Please select file to insert a links to.","invalid_file_single_insert":"Please select a single file.","invalid_image_empty_insert":"Please select image(s) to insert.","invalid_video_empty_insert":"Please select a video file to insert.","invalid_audio_empty_insert":"Please select an audio file to insert."},"alert":{"confirm_button_text":"OK","cancel_button_text":"Cancel","widget_remove_confirm":"Remove this widget?"},"popup":{"unsaved_changes":"The popup contains unsaved changes."},"datepicker":{"previousMonth":"Previous Month","nextMonth":"Next Month","months":["January","February","March","April","May","June","July","August","September","October","November","December"],"weekdays":["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],"weekdaysShort":["Sun","Mon","Tue","Wed","Thu","Fri","Sat"]},"colorpicker":{"last_color":"Use previously selected color","aria_palette":"Color selection area","aria_hue":"Hue selection slider","aria_opacity":"Opacity selection slider"},"filter":{"group":{"all":"all"},"scopes":{"apply_button_text":"Apply","clear_button_text":"Clear"},"dates":{"all":"all","filter_button_text":"Filter","reset_button_text":"Reset","date_placeholder":"Date","after_placeholder":"After","before_placeholder":"Before"},"numbers":{"all":"all","filter_button_text":"Filter","reset_button_text":"Reset","min_placeholder":"Min","max_placeholder":"Max"}},"eventlog":{"show_stacktrace":"Show the stacktrace","hide_stacktrace":"Hide the stacktrace","tabs":{"formatted":"Formatted","raw":"Raw"},"editor":{"title":"Source code editor","description":"Your operating system should be configured to listen to one of these URL schemes.","openWith":"Open with","remember_choice":"Remember selected option for this session","open":"Open","cancel":"Cancel"}}}
);

//! moment.js locale configuration v2.22.2
Expand Down
Loading
Loading