This repository has been archived by the owner on Sep 6, 2021. It is now read-only.
Extract About dialog from main HTML file so that we can override it easily in Edge Code #2329
Merged
Merged
Changes from 2 commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -23,7 +23,7 @@ | |
|
||
|
||
/*jslint vars: true, plusplus: true, devel: true, nomen: true, indent: 4, maxerr: 50 */ | ||
/*global define, $, brackets, window */ | ||
/*global define, $, brackets, window, Mustache */ | ||
|
||
define(function (require, exports, module) { | ||
"use strict"; | ||
|
@@ -37,7 +37,8 @@ define(function (require, exports, module) { | |
UpdateNotification = require("utils/UpdateNotification"), | ||
FileUtils = require("file/FileUtils"), | ||
NativeApp = require("utils/NativeApp"), | ||
StringUtils = require("utils/StringUtils"); | ||
StringUtils = require("utils/StringUtils"), | ||
AboutDialogTemplate = require("text!htmlContent/about-dialog.html"); | ||
|
||
var buildInfo; | ||
|
||
|
@@ -55,11 +56,17 @@ 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 | ||
}, Strings); | ||
|
||
var $template = $(Mustache.render(AboutDialogTemplate, templateVars)); | ||
if (buildInfo) { | ||
$("#about-build-number").text(" (" + buildInfo + ")"); | ||
$("#about-build-number", $template).text(" (" + buildInfo + ")"); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I just realized we don't have to do this programmatically any more. Before this change, the template had to render early and couldn't wait for the buildInfo to resolve. Now that we build the template just-in-time, we can update the template to use a |
||
} | ||
Dialogs.showModalDialog(Dialogs.DIALOG_ID_ABOUT); | ||
|
||
Dialogs.showModalDialogUsingTemplate($template); | ||
} | ||
|
||
function _handleForum() { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
<div class="about-dialog modal"> | ||
<div class="modal-header"> | ||
<h1 class="dialog-title">{{ABOUT}}</h1> | ||
</div> | ||
<div class="modal-body"> | ||
<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"><!-- $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> | ||
</div> | ||
</div> | ||
<div class="modal-footer"> | ||
<a href="#" class="dialog-button btn primary" data-button-id="ok">{{CLOSE}}</a> | ||
</div> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
<div class="project-settings-dialog modal"> | ||
<div class="modal-header"> | ||
<h1 class="dialog-title"></h1> | ||
</div> | ||
<div class="modal-body"> | ||
<div class="settings-list"> | ||
<label>{{PROJECT_SETTING_BASE_URL}}: <input type="text" placeholder="{{PROJECT_SETTING_BASE_URL_HINT}}" class="base-url" /></label> | ||
</div> | ||
</div> | ||
<div class="modal-footer"> | ||
<a href="#" class="dialog-button btn left" data-button-id="cancel">{{CANCEL}}</a> | ||
<a href="#" class="dialog-button btn primary" data-button-id="ok">{{OK}}</a> | ||
</div> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
<div class="update-dialog modal"> | ||
<div class="modal-header"> | ||
<h1 class="dialog-title">{{UPDATE_AVAILABLE_TITLE}}</h1> | ||
</div> | ||
<div class="modal-body"> | ||
<img class="update-icon" src="styles/images/update_large_icon.svg"> | ||
<div class="update-text"> | ||
<p class="dialog-message">{{UPDATE_MESSAGE}}</p> | ||
<div class="update-info"> | ||
</div> | ||
</div> | ||
</div> | ||
<div class="modal-footer"> | ||
<a href="#" class="dialog-button btn left" data-button-id="cancel">{{CANCEL}}</a> | ||
<a href="#" class="dialog-button btn primary" data-button-id="download">{{GET_IT_NOW}}</a> | ||
</div> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note that VERSION no longer seems to be used in any of the dialogs directly (it's only used within other strings, and gets substituted into them in src/strings.js). So I took it out here.