Merge branch 'MDL-44826-master' of git://github.com/damyon/moodle
This commit is contained in:
Vendored
+9
-1
@@ -64,7 +64,8 @@ var CSS = {
|
||||
name: 'text-bottom',
|
||||
str: 'alignment_bottom',
|
||||
value: 'vertical-align',
|
||||
margin: '0 .5em'
|
||||
margin: '0 .5em',
|
||||
isDefault: true
|
||||
},
|
||||
|
||||
// Floats.
|
||||
@@ -426,6 +427,13 @@ Y.namespace('M.atto_image').Button = Y.Base.create('button', Y.M.editor_atto.Edi
|
||||
|
||||
if (properties === false) {
|
||||
img.setStyle('display', 'none');
|
||||
// Set the default alignment.
|
||||
for (i in ALIGNMENTS) {
|
||||
if (ALIGNMENTS[i].isDefault === true) {
|
||||
css = ALIGNMENTS[i].value + ':' + ALIGNMENTS[i].name + ';';
|
||||
form.one('.' + CSS.INPUTALIGNMENT).set('value', css);
|
||||
}
|
||||
}
|
||||
// Remove the custom style option if this is a new image.
|
||||
form.one('.' + CSS.INPUTALIGNMENT).getDOMNode().options.remove(ALIGNMENTS.length - 1);
|
||||
return;
|
||||
|
||||
Vendored
+2
-2
File diff suppressed because one or more lines are too long
Vendored
+9
-1
@@ -64,7 +64,8 @@ var CSS = {
|
||||
name: 'text-bottom',
|
||||
str: 'alignment_bottom',
|
||||
value: 'vertical-align',
|
||||
margin: '0 .5em'
|
||||
margin: '0 .5em',
|
||||
isDefault: true
|
||||
},
|
||||
|
||||
// Floats.
|
||||
@@ -426,6 +427,13 @@ Y.namespace('M.atto_image').Button = Y.Base.create('button', Y.M.editor_atto.Edi
|
||||
|
||||
if (properties === false) {
|
||||
img.setStyle('display', 'none');
|
||||
// Set the default alignment.
|
||||
for (i in ALIGNMENTS) {
|
||||
if (ALIGNMENTS[i].isDefault === true) {
|
||||
css = ALIGNMENTS[i].value + ':' + ALIGNMENTS[i].name + ';';
|
||||
form.one('.' + CSS.INPUTALIGNMENT).set('value', css);
|
||||
}
|
||||
}
|
||||
// Remove the custom style option if this is a new image.
|
||||
form.one('.' + CSS.INPUTALIGNMENT).getDOMNode().options.remove(ALIGNMENTS.length - 1);
|
||||
return;
|
||||
|
||||
+11
-2
@@ -62,7 +62,8 @@ var CSS = {
|
||||
name: 'text-bottom',
|
||||
str: 'alignment_bottom',
|
||||
value: 'vertical-align',
|
||||
margin: '0 .5em'
|
||||
margin: '0 .5em',
|
||||
isDefault: true
|
||||
},
|
||||
|
||||
// Floats.
|
||||
@@ -420,10 +421,18 @@ Y.namespace('M.atto_image').Button = Y.Base.create('button', Y.M.editor_atto.Edi
|
||||
*/
|
||||
_applyImageProperties: function(form) {
|
||||
var properties = this._getSelectedImageProperties(),
|
||||
img = form.one('.' + CSS.IMAGEPREVIEW);
|
||||
img = form.one('.' + CSS.IMAGEPREVIEW),
|
||||
i;
|
||||
|
||||
if (properties === false) {
|
||||
img.setStyle('display', 'none');
|
||||
// Set the default alignment.
|
||||
for (i in ALIGNMENTS) {
|
||||
if (ALIGNMENTS[i].isDefault === true) {
|
||||
css = ALIGNMENTS[i].value + ':' + ALIGNMENTS[i].name + ';';
|
||||
form.one('.' + CSS.INPUTALIGNMENT).set('value', css);
|
||||
}
|
||||
}
|
||||
// Remove the custom style option if this is a new image.
|
||||
form.one('.' + CSS.INPUTALIGNMENT).getDOMNode().options.remove(ALIGNMENTS.length - 1);
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user