MDL-49782 general: removed uses of window.status

This commit is contained in:
Brian Barnes 2015-04-08 11:49:06 +12:00
parent 1d3fd63f97
commit 8b3a10438f
4 changed files with 3 additions and 12 deletions

View file

@ -170,8 +170,7 @@ echo '<p><label for="groups"><span id="groupslabel">'.get_string('groups').':</s
$onchange = 'M.core_group.membersCombo.refreshMembers();'; $onchange = 'M.core_group.membersCombo.refreshMembers();';
echo '<select name="groups[]" multiple="multiple" id="groups" size="15" class="select" onchange="'.$onchange.'"'."\n"; echo '<select name="groups[]" multiple="multiple" id="groups" size="15" class="select" onchange="'.$onchange.'">'."\n";
echo ' onclick="window.status=this.selectedIndex==-1 ? \'\' : this.options[this.selectedIndex].title;" onmouseout="window.status=\'\';">'."\n";
$groups = groups_get_all_groups($courseid); $groups = groups_get_all_groups($courseid);
$selectedname = '&nbsp;'; $selectedname = '&nbsp;';

View file

@ -62,11 +62,9 @@ class MoodleQuickForm_submitlink extends MoodleQuickForm_submit {
*/ */
function toHtml() { function toHtml() {
$text = $this->_attributes['value']; $text = $this->_attributes['value'];
$onmouseover = "window.status=\'" . $text . "\';";
$onmouseout = "window.status=\'\';";
return "<noscript><div>" . parent::toHtml() . '</div></noscript><script type="text/javascript">' . $this->_js . "\n" return "<noscript><div>" . parent::toHtml() . '</div></noscript><script type="text/javascript">' . $this->_js . "\n"
. 'document.write(\'<a href="#" onclick="' . $this->_onclick . '" onmouseover="' . $onmouseover . '" onmouseout="' . $onmouseout . '">' . 'document.write(\'<a href="#" onclick="' . $this->_onclick . '">'
. $text . "</a>');\n</script>"; . $text . "</a>');\n</script>";
} }
} }

View file

@ -61,7 +61,7 @@ YUI.add('moodle-form-checkboxcontroller', function(Y) {
var controllerbutton = Y.one(controllerbutton); var controllerbutton = Y.one(controllerbutton);
var linkname = controllerbutton.get('value'); var linkname = controllerbutton.get('value');
// Link node which will replace controller button // Link node which will replace controller button
var link = Y.Node.create('<a href="#" onmouseover="window.status=\''+linkname+'\';" onmouseout="window.status=\'\';">'+linkname+'</a>'); var link = Y.Node.create('<a href="#">'+linkname+'</a>');
// Attach onclick event to link // Attach onclick event to link
link.on('click', this.onClick, this); link.on('click', this.onClick, this);

View file

@ -226,7 +226,6 @@ M.mod_quiz.secure_window = {
Y.delegate('cut', M.mod_quiz.secure_window.prevent, document, '*'); Y.delegate('cut', M.mod_quiz.secure_window.prevent, document, '*');
Y.delegate('copy', M.mod_quiz.secure_window.prevent, document, '*'); Y.delegate('copy', M.mod_quiz.secure_window.prevent, document, '*');
Y.delegate('paste', M.mod_quiz.secure_window.prevent, document, '*'); Y.delegate('paste', M.mod_quiz.secure_window.prevent, document, '*');
M.mod_quiz.secure_window.clear_status;
Y.on('beforeprint', function() { Y.on('beforeprint', function() {
Y.one(document.body).setStyle('display', 'none'); Y.one(document.body).setStyle('display', 'none');
}, window); }, window);
@ -241,11 +240,6 @@ M.mod_quiz.secure_window = {
Y.on('key', M.mod_quiz.secure_window.prevent, '*', 'down:67,86,88+meta'); Y.on('key', M.mod_quiz.secure_window.prevent, '*', 'down:67,86,88+meta');
}, },
clear_status: function() {
window.status = '';
setTimeout(M.mod_quiz.secure_window.clear_status, 10);
},
is_content_editable: function(n) { is_content_editable: function(n) {
if (n.test('[contenteditable=true]')) { if (n.test('[contenteditable=true]')) {
return true; return true;