Commit 58f67f61 authored by webchick's avatar webchick

Issue #2782885 by tedbow, rakesh.gectcr, xjm, webchick, tkoleary, drpal: No...

Issue #2782885 by tedbow, rakesh.gectcr, xjm, webchick, tkoleary, drpal: No indication what page element is being configured with Outside In
parent 7393e427
......@@ -64,7 +64,8 @@
outline: 1px dashed rgba(0,0,0,0.5);
box-shadow: 0 0 0 1px rgba(255,255,255,0.7);
}
#main-canvas.js-outside-in-edit-mode .outside-in-editable:hover {
#main-canvas.js-outside-in-edit-mode .outside-in-editable:hover,
#main-canvas.js-outside-in-edit-mode .outside-in-editable.outside-in-active-editable {
background-color: rgba(0,0,0,0.2);
}
......
......@@ -143,9 +143,28 @@
// @todo Move logic for data-dialog-renderer attribute into ajax.js
// https://www.drupal.org/node/2784443
instance.options.url = instance.options.url.replace(search, replace);
instance.options.data.dialogOptions = {outsideInActiveEditableId: $(instance.element).parents('.outside-in-editable').attr('id')};
instance.progress = {type: 'fullscreen'};
});
}
};
// Manage Active editable class on opening and closing of the dialog.
$(window).on({
'dialog:beforecreate': function (event, dialog, $element, settings) {
if ($element.is('#drupal-offcanvas')) {
$('body .outside-in-active-editable').removeClass('outside-in-active-editable');
var $activeElement = $('#' + settings.outsideInActiveEditableId);
if ($activeElement) {
$activeElement.addClass('outside-in-active-editable');
}
}
},
'dialog:beforeclose': function (event, dialog, $element) {
if ($element.is('#drupal-offcanvas')) {
$('body .outside-in-active-editable').removeClass('outside-in-active-editable');
}
}
});
})(jQuery, Drupal);
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment