MDL-21420 finally moving old global mstr to new M.str.

This commit is contained in:
Petr Skoda
2010-02-07 09:43:07 +00:00
parent 87ad1edcd6
commit 2b728cb5e1
13 changed files with 89 additions and 84 deletions
+10 -5
View File
@@ -17,6 +17,11 @@ M.yui.add_module = function(modules) {
*/
M.util = {};
/**
* Language strings - initialised from page footer.
*/
M.str = {};
/**
* Returns url for images.
* @param {String} imagename
@@ -271,7 +276,7 @@ M.util.show_confirm_dialog = function(e, args) {
}
);
simpledialog.setHeader(mstr.admin.confirmation);
simpledialog.setHeader(M.str.admin.confirmation);
simpledialog.setBody(args.message);
simpledialog.cfg.setProperty('icon', YAHOO.widget.SimpleDialog.ICON_WARN);
@@ -320,8 +325,8 @@ M.util.show_confirm_dialog = function(e, args) {
}
};
var buttons = [ { text: mstr.moodle.cancel, handler: handle_cancel, isDefault: true },
{ text: mstr.moodle.yes, handler: handle_yes } ];
var buttons = [ { text: M.str.moodle.cancel, handler: handle_cancel, isDefault: true },
{ text: M.str.moodle.yes, handler: handle_yes } ];
simpledialog.cfg.queueProperty('buttons', buttons);
@@ -779,8 +784,8 @@ function showAdvancedInit(addBefore, nameAttr, buttonLabel, hideText, showText)
showHideButton.value = buttonLabel;
showHideButton.name = nameAttr;
showHideButton.moodle = {
hideLabel: mstr.form.hideadvanced,
showLabel: mstr.form.showadvanced
hideLabel: M.str.form.hideadvanced,
showLabel: M.str.form.showadvanced
};
YAHOO.util.Event.addListener(showHideButton, 'click', showAdvancedOnClick);
el = document.getElementById(addBefore);