MDL-68107 editor_atto: responsive images for drag and drop

This commit is contained in:
C4ne 2020-03-05 10:17:57 +00:00 committed by Bas Brands
parent 741d6dde19
commit 4144e278a6
4 changed files with 12 additions and 9 deletions

View file

@ -34,7 +34,7 @@ YUI.add('moodle-atto_image-button', function (Y, NAME) {
*/
var CSS = {
RESPONSIVE: 'img-responsive',
RESPONSIVE: 'img-fluid',
INPUTALIGNMENT: 'atto_image_alignment',
INPUTALT: 'atto_image_altentry',
INPUTHEIGHT: 'atto_image_heightentry',
@ -426,7 +426,8 @@ Y.namespace('M.atto_image').Button = Y.Base.create('button', Y.M.editor_atto.Edi
// Replace placeholder with actual image.
newhtml = template({
url: file.url,
presentation: true
presentation: true,
classlist: CSS.RESPONSIVE
});
newimage = Y.Node.create(newhtml);
if (placeholder) {

File diff suppressed because one or more lines are too long

View file

@ -34,7 +34,7 @@ YUI.add('moodle-atto_image-button', function (Y, NAME) {
*/
var CSS = {
RESPONSIVE: 'img-responsive',
RESPONSIVE: 'img-fluid',
INPUTALIGNMENT: 'atto_image_alignment',
INPUTALT: 'atto_image_altentry',
INPUTHEIGHT: 'atto_image_heightentry',
@ -426,7 +426,8 @@ Y.namespace('M.atto_image').Button = Y.Base.create('button', Y.M.editor_atto.Edi
// Replace placeholder with actual image.
newhtml = template({
url: file.url,
presentation: true
presentation: true,
classlist: CSS.RESPONSIVE
});
newimage = Y.Node.create(newhtml);
if (placeholder) {

View file

@ -32,7 +32,7 @@
*/
var CSS = {
RESPONSIVE: 'img-responsive',
RESPONSIVE: 'img-fluid',
INPUTALIGNMENT: 'atto_image_alignment',
INPUTALT: 'atto_image_altentry',
INPUTHEIGHT: 'atto_image_heightentry',
@ -424,7 +424,8 @@ Y.namespace('M.atto_image').Button = Y.Base.create('button', Y.M.editor_atto.Edi
// Replace placeholder with actual image.
newhtml = template({
url: file.url,
presentation: true
presentation: true,
classlist: CSS.RESPONSIVE
});
newimage = Y.Node.create(newhtml);
if (placeholder) {