Permalink
Browse files

Use a template var for build info instead of injecting it directly

  • Loading branch information...
njx committed Dec 12, 2012
1 parent 5ffa518 commit 46385c0257511e7ef5b50ad8466e8f0c675a3670
Showing with 4 additions and 9 deletions.
  1. +3 −8 src/help/HelpCommandHandlers.js
  2. +1 −1 src/htmlContent/about-dialog.html
@@ -58,15 +58,10 @@ define(function (require, exports, module) {
function _handleAboutDialog() {
var templateVars = $.extend({
ABOUT_ICON : brackets.config.about_icon,
- APP_NAME_ABOUT_BOX : brackets.config.app_name_about
+ APP_NAME_ABOUT_BOX : brackets.config.app_name_about,
+ BUILD_INFO : buildInfo
}, Strings);
-
- var $template = $(Mustache.render(AboutDialogTemplate, templateVars));
- if (buildInfo) {
- $("#about-build-number", $template).text(" (" + buildInfo + ")");
- }
-
- Dialogs.showModalDialogUsingTemplate($template);
+ Dialogs.showModalDialogUsingTemplate(Mustache.render(AboutDialogTemplate, templateVars));
}
function _handleForum() {
@@ -6,7 +6,7 @@ <h1 class="dialog-title">{{ABOUT}}</h1>
<img class="about-icon" src="{{ABOUT_ICON}}">
<div class="about-text">
<h2>{{APP_NAME_ABOUT_BOX}}</h2>
- <p class="dialog-message">{{ABOUT_TEXT_LINE1}}<span id="about-build-number"><!-- populated programmatically --></span></p>
+ <p class="dialog-message">{{ABOUT_TEXT_LINE1}} <span id="about-build-number">({{BUILD_INFO}})</span></p>
<p class="dialog-message"><!-- $NON-NLS$ -->Copyright 2012 Adobe Systems Incorporated and its licensors. All rights reserved.</p>
<p class="dialog-message">{{{ABOUT_TEXT_LINE3}}}</p>
<p class="dialog-message">{{{ABOUT_TEXT_LINE4}}}</p>

0 comments on commit 46385c0

Please sign in to comment.