Skip to content
This repository has been archived by the owner on Sep 6, 2021. It is now read-only.

[OPEN] Move the Project Preferences Dialog variables to the template #3286

Merged
merged 4 commits into from
Jun 17, 2013
Merged

[OPEN] Move the Project Preferences Dialog variables to the template #3286

merged 4 commits into from
Jun 17, 2013

Conversation

TomMalbran
Copy link
Contributor

This removes the jQuery dialog populate part of the Project Preferences Dialog, and moves it all to the template, passing the required variables.

@ghost ghost assigned redmunds Apr 30, 2013
@njx
Copy link
Contributor

njx commented May 10, 2013

Open for committers to review.

<label>
{{PROJECT_SETTING_BASE_URL}}: <input type="text" placeholder="{{PROJECT_SETTING_BASE_URL_HINT}}" value="{{baseUrl}}" class="url" />
</label>
{{#errorMessage}}<div class="alert-message" style="margin-bottom: 0">{{{errorMessage}}}</div>{{/errorMessage}}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why does {{{errorMessage}}} have triple (not double) curly braces?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If I remember right, I think that previously the error message string was using &mdash; for the dash which required the 3 curly braces to display it correctly, but now it doesn't use it, so replaced them with 2.

@redmunds
Copy link
Contributor

I'm ready to look at this one, but there's a merge conflict.

@ghost ghost assigned redmunds Jun 13, 2013
@TomMalbran
Copy link
Contributor Author

@redmunds Thanks for the review. I fixed the merge issues, updated the template and fixed the 3 curly braces issue.

<label>
{{PROJECT_SETTING_BASE_URL}}: <input type="text" placeholder="{{PROJECT_SETTING_BASE_URL_HINT}}" value="{{baseUrl}}" class="url" />
</label>
{{#errorMessage}}<div class="alert" style="margin-bottom: 0">{{errorMessage}}</div>{{/errorMessage}}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Interesting technique for hiding elements in a Template!

@redmunds
Copy link
Contributor

Done with review.

<label>
{{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}}
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I had to re-add the third curly brace since the error string used is BASEURL_ERROR_INVALID_PROTOCOL which uses $mdash;. So I need to tell Mustache to parse this string as HTML and not just as plain text to display the dash correctly. If the string is modified, we can remove the third curly brace.

@TomMalbran
Copy link
Contributor Author

@redmunds I applied njx suggestion to use the strings as part of the template variables to fix the issue you mentioned, but had to add the removes third curly brace to the error message.

@redmunds
Copy link
Contributor

I applied njx suggestion to use the strings as part of the template variables to fix the issue you mentioned

I agree that is a better solution. I notice that there are other cases with template-based dialogs that use the same code that copies all member of the Strings Object that also need to be updated. Do you want to put up a separate pull request for that, or should I create a new Issue?

@TomMalbran
Copy link
Contributor Author

Sure, I can open a new pull request to fix those other templates.

@redmunds
Copy link
Contributor

@TomMalbran I opened #4252 to track the other templates.

@redmunds
Copy link
Contributor

Thanks @TomMalbran. Merging.

redmunds added a commit that referenced this pull request Jun 17, 2013
[OPEN] Move the Project Preferences Dialog variables to the template
@redmunds redmunds merged commit 5af37f8 into adobe:master Jun 17, 2013
@TomMalbran TomMalbran deleted the tom/project-template-vars branch June 18, 2013 00:10
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants