1
0
mirror of https://github.com/adobe/brackets.git synced 2024-11-20 18:02:54 +01:00

Pass Strings as a reference instead of copying it and re-add the 3 curly braces to errorMessage

This commit is contained in:
Tomás Malbrán 2013-06-14 22:37:42 -03:00
parent be5e767593
commit 79bbd1e0a9
2 changed files with 8 additions and 7 deletions

View File

@ -5,13 +5,13 @@
<div class="modal-body">
<div class="field-container">
<label>
{{PROJECT_SETTING_BASE_URL}}: <input type="text" placeholder="{{PROJECT_SETTING_BASE_URL_HINT}}" value="{{baseUrl}}" class="url" />
{{Strings.PROJECT_SETTING_BASE_URL}}: <input type="text" placeholder="{{Strings.PROJECT_SETTING_BASE_URL_HINT}}" value="{{baseUrl}}" class="url" />
</label>
{{#errorMessage}}<div class="alert" style="margin-bottom: 0">{{errorMessage}}</div>{{/errorMessage}}
{{#errorMessage}}<div class="alert" style="margin-bottom: 0">{{{errorMessage}}}</div>{{/errorMessage}}
</div>
</div>
<div class="modal-footer">
<button class="dialog-button btn" data-button-id="cancel">{{CANCEL}}</button>
<button class="dialog-button btn primary" data-button-id="ok">{{OK}}</button>
<button class="dialog-button btn" data-button-id="cancel">{{Strings.CANCEL}}</button>
<button class="dialog-button btn primary" data-button-id="ok">{{Strings.OK}}</button>
</div>
</div>

View File

@ -92,11 +92,12 @@ define(function (require, exports, module) {
}
title = StringUtils.format(Strings.PROJECT_SETTINGS_TITLE, projectName);
var templateVars = $.extend({
var templateVars = {
title : title,
baseUrl : baseUrl,
errorMessage : errorMessage
}, Strings);
errorMessage : errorMessage,
Strings : Strings
};
dialog = Dialogs.showModalDialogUsingTemplate(Mustache.render(SettingsDialogTemplate, templateVars));