mirror of
https://github.com/moodle/moodle.git
synced 2025-08-05 08:56:36 +02:00
MDL-68107 editor_atto: responsive images for drag and drop
This commit is contained in:
parent
741d6dde19
commit
4144e278a6
4 changed files with 12 additions and 9 deletions
|
@ -34,7 +34,7 @@ YUI.add('moodle-atto_image-button', function (Y, NAME) {
|
||||||
*/
|
*/
|
||||||
|
|
||||||
var CSS = {
|
var CSS = {
|
||||||
RESPONSIVE: 'img-responsive',
|
RESPONSIVE: 'img-fluid',
|
||||||
INPUTALIGNMENT: 'atto_image_alignment',
|
INPUTALIGNMENT: 'atto_image_alignment',
|
||||||
INPUTALT: 'atto_image_altentry',
|
INPUTALT: 'atto_image_altentry',
|
||||||
INPUTHEIGHT: 'atto_image_heightentry',
|
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.
|
// Replace placeholder with actual image.
|
||||||
newhtml = template({
|
newhtml = template({
|
||||||
url: file.url,
|
url: file.url,
|
||||||
presentation: true
|
presentation: true,
|
||||||
|
classlist: CSS.RESPONSIVE
|
||||||
});
|
});
|
||||||
newimage = Y.Node.create(newhtml);
|
newimage = Y.Node.create(newhtml);
|
||||||
if (placeholder) {
|
if (placeholder) {
|
||||||
|
|
File diff suppressed because one or more lines are too long
|
@ -34,7 +34,7 @@ YUI.add('moodle-atto_image-button', function (Y, NAME) {
|
||||||
*/
|
*/
|
||||||
|
|
||||||
var CSS = {
|
var CSS = {
|
||||||
RESPONSIVE: 'img-responsive',
|
RESPONSIVE: 'img-fluid',
|
||||||
INPUTALIGNMENT: 'atto_image_alignment',
|
INPUTALIGNMENT: 'atto_image_alignment',
|
||||||
INPUTALT: 'atto_image_altentry',
|
INPUTALT: 'atto_image_altentry',
|
||||||
INPUTHEIGHT: 'atto_image_heightentry',
|
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.
|
// Replace placeholder with actual image.
|
||||||
newhtml = template({
|
newhtml = template({
|
||||||
url: file.url,
|
url: file.url,
|
||||||
presentation: true
|
presentation: true,
|
||||||
|
classlist: CSS.RESPONSIVE
|
||||||
});
|
});
|
||||||
newimage = Y.Node.create(newhtml);
|
newimage = Y.Node.create(newhtml);
|
||||||
if (placeholder) {
|
if (placeholder) {
|
||||||
|
|
|
@ -32,7 +32,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
var CSS = {
|
var CSS = {
|
||||||
RESPONSIVE: 'img-responsive',
|
RESPONSIVE: 'img-fluid',
|
||||||
INPUTALIGNMENT: 'atto_image_alignment',
|
INPUTALIGNMENT: 'atto_image_alignment',
|
||||||
INPUTALT: 'atto_image_altentry',
|
INPUTALT: 'atto_image_altentry',
|
||||||
INPUTHEIGHT: 'atto_image_heightentry',
|
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.
|
// Replace placeholder with actual image.
|
||||||
newhtml = template({
|
newhtml = template({
|
||||||
url: file.url,
|
url: file.url,
|
||||||
presentation: true
|
presentation: true,
|
||||||
|
classlist: CSS.RESPONSIVE
|
||||||
});
|
});
|
||||||
newimage = Y.Node.create(newhtml);
|
newimage = Y.Node.create(newhtml);
|
||||||
if (placeholder) {
|
if (placeholder) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue