Merge branch 'MDL-68541-39' of https://github.com/PoetOS/moodle
This commit is contained in:
+1
-1
@@ -22,7 +22,7 @@ Feature: Atto accessibility checker
|
||||
And I select the text in the "Description" Atto editor
|
||||
And I click on "Insert or edit image" "button"
|
||||
And I set the field "Describe this image for someone who cannot see it" to ""
|
||||
And I set the field "Description not necessary" to "1"
|
||||
And I set the field "This image is decorative only" to "1"
|
||||
And I press "Save image"
|
||||
And I press "Accessibility checker"
|
||||
And I should see "Congratulations, no accessibility problems found!"
|
||||
|
||||
@@ -36,7 +36,7 @@ $string['enteralt'] = 'Describe this image for someone who cannot see it';
|
||||
$string['enterurl'] = 'Enter URL';
|
||||
$string['height'] = 'Height';
|
||||
$string['imageproperties'] = 'Image properties';
|
||||
$string['presentation'] = 'Description not necessary';
|
||||
$string['presentation'] = 'This image is decorative only';
|
||||
$string['pluginname'] = 'Insert or edit image';
|
||||
$string['presentationoraltrequired'] = 'Images must have a description, except if the description is marked as not necessary.';
|
||||
$string['preview'] = 'Preview';
|
||||
|
||||
@@ -39,8 +39,9 @@ Feature: Add images to Atto
|
||||
And I take focus off "Height" "field"
|
||||
And the field "Width" matches value "123"
|
||||
And the field "Height" matches value "456"
|
||||
And I click on "Save image" "button"
|
||||
And I click on "Update profile" "button"
|
||||
And I change window size to "large"
|
||||
And I press "Save image"
|
||||
And I press "Update profile"
|
||||
And I click on "Edit profile" "link" in the "region-main" "region"
|
||||
And I select the text in the "Description" Atto editor
|
||||
And I click on "Insert or edit image" "button"
|
||||
|
||||
Vendored
+22
-2
@@ -124,8 +124,14 @@ var CSS = {
|
||||
'</div>' +
|
||||
'<div class="mb-1">' +
|
||||
'<label for="{{elementid}}_{{CSS.INPUTALT}}">{{get_string "enteralt" component}}</label>' +
|
||||
'<input class="form-control fullwidth {{CSS.INPUTALT}}" type="text" value="" ' +
|
||||
'id="{{elementid}}_{{CSS.INPUTALT}}" size="32"/>' +
|
||||
'<textarea class="form-control fullwidth {{CSS.INPUTALT}}" ' +
|
||||
'id="{{elementid}}_{{CSS.INPUTALT}}" maxlength="125"></textarea>' +
|
||||
|
||||
// Add the character count.
|
||||
'<div id="the-count" class="d-flex justify-content-end small">' +
|
||||
'<span id="currentcount">0</span>' +
|
||||
'<span id="maximumcount"> / 125</span>' +
|
||||
'</div>' +
|
||||
|
||||
// Add the presentation select box.
|
||||
'<div class="form-check">' +
|
||||
@@ -605,6 +611,9 @@ Y.namespace('M.atto_image').Button = Y.Base.create('button', Y.M.editor_atto.Edi
|
||||
}, this);
|
||||
}
|
||||
|
||||
// Character count.
|
||||
this._form.one('.' + CSS.INPUTALT).on('keyup', this._handleKeyup, this);
|
||||
|
||||
return content;
|
||||
},
|
||||
|
||||
@@ -1045,6 +1054,17 @@ Y.namespace('M.atto_image').Button = Y.Base.create('button', Y.M.editor_atto.Edi
|
||||
}
|
||||
this.getDialogue().centerDialogue();
|
||||
return state;
|
||||
},
|
||||
|
||||
/**
|
||||
* Handle the keyup to update the character count.
|
||||
*/
|
||||
_handleKeyup: function() {
|
||||
var form = this._form,
|
||||
alt = form.one('.' + CSS.INPUTALT).get('value'),
|
||||
characterCount = alt.length,
|
||||
current = form.one('#currentcount');
|
||||
current.setHTML(characterCount);
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
Vendored
+3
-3
File diff suppressed because one or more lines are too long
Vendored
+22
-2
@@ -124,8 +124,14 @@ var CSS = {
|
||||
'</div>' +
|
||||
'<div class="mb-1">' +
|
||||
'<label for="{{elementid}}_{{CSS.INPUTALT}}">{{get_string "enteralt" component}}</label>' +
|
||||
'<input class="form-control fullwidth {{CSS.INPUTALT}}" type="text" value="" ' +
|
||||
'id="{{elementid}}_{{CSS.INPUTALT}}" size="32"/>' +
|
||||
'<textarea class="form-control fullwidth {{CSS.INPUTALT}}" ' +
|
||||
'id="{{elementid}}_{{CSS.INPUTALT}}" maxlength="125"></textarea>' +
|
||||
|
||||
// Add the character count.
|
||||
'<div id="the-count" class="d-flex justify-content-end small">' +
|
||||
'<span id="currentcount">0</span>' +
|
||||
'<span id="maximumcount"> / 125</span>' +
|
||||
'</div>' +
|
||||
|
||||
// Add the presentation select box.
|
||||
'<div class="form-check">' +
|
||||
@@ -605,6 +611,9 @@ Y.namespace('M.atto_image').Button = Y.Base.create('button', Y.M.editor_atto.Edi
|
||||
}, this);
|
||||
}
|
||||
|
||||
// Character count.
|
||||
this._form.one('.' + CSS.INPUTALT).on('keyup', this._handleKeyup, this);
|
||||
|
||||
return content;
|
||||
},
|
||||
|
||||
@@ -1043,6 +1052,17 @@ Y.namespace('M.atto_image').Button = Y.Base.create('button', Y.M.editor_atto.Edi
|
||||
}
|
||||
this.getDialogue().centerDialogue();
|
||||
return state;
|
||||
},
|
||||
|
||||
/**
|
||||
* Handle the keyup to update the character count.
|
||||
*/
|
||||
_handleKeyup: function() {
|
||||
var form = this._form,
|
||||
alt = form.one('.' + CSS.INPUTALT).get('value'),
|
||||
characterCount = alt.length,
|
||||
current = form.one('#currentcount');
|
||||
current.setHTML(characterCount);
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
+22
-2
@@ -122,8 +122,14 @@ var CSS = {
|
||||
'</div>' +
|
||||
'<div class="mb-1">' +
|
||||
'<label for="{{elementid}}_{{CSS.INPUTALT}}">{{get_string "enteralt" component}}</label>' +
|
||||
'<input class="form-control fullwidth {{CSS.INPUTALT}}" type="text" value="" ' +
|
||||
'id="{{elementid}}_{{CSS.INPUTALT}}" size="32"/>' +
|
||||
'<textarea class="form-control fullwidth {{CSS.INPUTALT}}" ' +
|
||||
'id="{{elementid}}_{{CSS.INPUTALT}}" maxlength="125"></textarea>' +
|
||||
|
||||
// Add the character count.
|
||||
'<div id="the-count" class="d-flex justify-content-end small">' +
|
||||
'<span id="currentcount">0</span>' +
|
||||
'<span id="maximumcount"> / 125</span>' +
|
||||
'</div>' +
|
||||
|
||||
// Add the presentation select box.
|
||||
'<div class="form-check">' +
|
||||
@@ -603,6 +609,9 @@ Y.namespace('M.atto_image').Button = Y.Base.create('button', Y.M.editor_atto.Edi
|
||||
}, this);
|
||||
}
|
||||
|
||||
// Character count.
|
||||
this._form.one('.' + CSS.INPUTALT).on('keyup', this._handleKeyup, this);
|
||||
|
||||
return content;
|
||||
},
|
||||
|
||||
@@ -1043,5 +1052,16 @@ Y.namespace('M.atto_image').Button = Y.Base.create('button', Y.M.editor_atto.Edi
|
||||
}
|
||||
this.getDialogue().centerDialogue();
|
||||
return state;
|
||||
},
|
||||
|
||||
/**
|
||||
* Handle the keyup to update the character count.
|
||||
*/
|
||||
_handleKeyup: function() {
|
||||
var form = this._form,
|
||||
alt = form.one('.' + CSS.INPUTALT).get('value'),
|
||||
characterCount = alt.length,
|
||||
current = form.one('#currentcount');
|
||||
current.setHTML(characterCount);
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user