Skip to content
This repository
Browse code

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

  • Loading branch information...
commit 46385c0257511e7ef5b50ad8466e8f0c675a3670 1 parent 5ffa518
Narciso Jaramillo authored December 11, 2012
11  src/help/HelpCommandHandlers.js
@@ -58,15 +58,10 @@ define(function (require, exports, module) {
58 58
     function _handleAboutDialog() {
59 59
         var templateVars = $.extend({
60 60
             ABOUT_ICON          : brackets.config.about_icon,
61  
-            APP_NAME_ABOUT_BOX  : brackets.config.app_name_about
  61
+            APP_NAME_ABOUT_BOX  : brackets.config.app_name_about,
  62
+            BUILD_INFO          : buildInfo
62 63
         }, Strings);
63  
-
64  
-        var $template = $(Mustache.render(AboutDialogTemplate, templateVars));
65  
-        if (buildInfo) {
66  
-            $("#about-build-number", $template).text(" (" + buildInfo + ")");
67  
-        }
68  
-
69  
-        Dialogs.showModalDialogUsingTemplate($template);
  64
+        Dialogs.showModalDialogUsingTemplate(Mustache.render(AboutDialogTemplate, templateVars));
70 65
     }
71 66
 
72 67
     function _handleForum() {
2  src/htmlContent/about-dialog.html
@@ -6,7 +6,7 @@ <h1 class="dialog-title">{{ABOUT}}</h1>
6 6
         <img class="about-icon" src="{{ABOUT_ICON}}">
7 7
         <div class="about-text">
8 8
             <h2>{{APP_NAME_ABOUT_BOX}}</h2>
9  
-            <p class="dialog-message">{{ABOUT_TEXT_LINE1}}<span id="about-build-number"><!-- populated programmatically --></span></p>
  9
+            <p class="dialog-message">{{ABOUT_TEXT_LINE1}} <span id="about-build-number">({{BUILD_INFO}})</span></p>
10 10
             <p class="dialog-message"><!-- $NON-NLS$ -->Copyright 2012 Adobe Systems Incorporated and its licensors. All rights reserved.</p>
11 11
             <p class="dialog-message">{{{ABOUT_TEXT_LINE3}}}</p>
12 12
             <p class="dialog-message">{{{ABOUT_TEXT_LINE4}}}</p>

0 notes on commit 46385c0

Please sign in to comment.
Something went wrong with that request. Please try again.