Replace Ember.Text* insertions with helpers.

This commit is contained in:
Robin Ward 2013-05-20 12:56:36 -04:00
parent 1097d51b33
commit c7aebbf4d6
9 changed files with 18 additions and 18 deletions

View File

@ -24,7 +24,7 @@
</div>
{{#with content.selectedItem}}
{{view Ember.TextField class="style-name" valueBinding="name"}}
{{textField class="style-name" value=name}}
{{#if view.headerActive}}
{{view Discourse.AceEditorView contentBinding="header" mode="html"}}
{{/if}}

View File

@ -7,7 +7,7 @@
{{/if}}
{{#if plainText}}
{{view Ember.TextArea valueBinding="content.content" class="plain"}}
{{textarea value=content.content class="plain"}}
{{/if}}
{{#if html}}

View File

@ -3,7 +3,7 @@
<h3>{{unbound setting}}</h3>
</div>
<div class="span11">
{{view Ember.TextField valueBinding="value" classNames="input-xxlarge"}}
{{textField value=value classNames="input-xxlarge"}}
<div class='desc'>{{unbound description}}</div>
</div>
{{#if dirty}}

View File

@ -1,4 +1,4 @@
<div class="modal-body flag-modal">
<div class="modal-body flag-modal">
{{#if view.post.flagsAvailable}}
<form>
{{#each view.boundFlags}}
@ -8,7 +8,7 @@
{{#if is_custom_flag}}
{{#unless selected}}
<div class='description'>{{{description}}}</div>
{{/unless}}
{{/unless}}
{{else}}
{{#if description}}
<div class='description'>{{{description}}}</div>
@ -16,8 +16,8 @@
{{/if}}
</label>
{{#if is_custom_flag}}
{{#if selected}}
{{view Ember.TextArea name="message" class="flag-message" placeholderBinding="customPlaceholder" valueBinding="message"}}
{{#if selected}}
{{textarea name="message" class="flag-message" placeholder=customPlaceholder value=message}}
<div {{bindAttr class="customMessageLengthClasses"}}>{{customMessageLength}}</div>
{{/if}}
{{/if}}

View File

@ -37,7 +37,7 @@
<label for='login-account-password'>{{i18n login.password}}&nbsp;</label>
</td>
<td>
{{view Ember.TextField valueBinding="view.loginPassword" type="password" id="login-account-password"}} &nbsp;
{{textField value=view.loginPassword type="password" id="login-account-password"}} &nbsp;
<a id="forgot-password-link" {{action forgotPassword target="view"}}>{{i18n forgot_password.action}}</a>
</td>
</tr>

View File

@ -1,4 +1,4 @@
{{view Ember.TextField valueBinding="view.term" placeholderBinding="view.searchPlaceholder"}}
{{textField value=view.term placeholderBinding="view.searchPlaceholder"}}
{{#with view}}
{{#unless loading}}
{{#unless noResults}}
@ -15,12 +15,12 @@
{{/if}}
</li>
{{view Discourse.SearchResultsTypeView typeBinding="type" contentBinding="results"}}
</ul>
</ul>
{{/each}}
{{else}}
<div class='no-results'>
{{i18n search.no_results}}
</div>
</div>
{{/unless}}
{{else}}
<div class='searching'><i class='icon-spinner icon-spin'></i></div>

View File

@ -24,7 +24,7 @@
<div class="control-group">
<label class="control-label">{{i18n user.email.title}}</label>
<div class="controls">
{{view Ember.TextField valueBinding="controller.newEmail" elementId="change_email" classNames="input-xxlarge"}}
{{textField value=newEmail elementId="change_email" classNames="input-xxlarge"}}
</div>
<div class='instructions'>
{{#if controller.taken}}
@ -32,7 +32,7 @@
{{else}}
{{i18n user.email.instructions}}
{{/if}}
</div>
</div>

View File

@ -14,7 +14,7 @@
<div class="control-group">
<label class="control-label">{{i18n user.name.title}}</label>
<div class="controls">
{{view Ember.TextField valueBinding="content.name" classNames="input-xxlarge"}}
{{textField value=name classNames="input-xxlarge"}}
</div>
<div class='instructions'>
{{i18n user.name.instructions}}
@ -59,7 +59,7 @@
<div class="control-group">
<label class="control-label">{{i18n user.website}}</label>
<div class="controls">
{{view Ember.TextField valueBinding="content.website" classNames="input-xxlarge"}}
{{textField value=website classNames="input-xxlarge"}}
</div>
</div>

View File

@ -17,10 +17,10 @@
<div class="control-group">
<label class="control-label">{{i18n user.username.title}}</label>
<div class="controls">
{{view Ember.TextField valueBinding="controller.newUsername" elementId="change_username" classNames="input-xxlarge" maxlength="15"}}
{{textField value=newUsername id="change_username" classNames="input-xxlarge" maxlength="15"}}
</div>
<div class='instructions'>
{{#if controller.taken}}
{{#if taken}}
{{i18n user.change_username.taken}}
{{/if}}
<span>{{ errorMessage }}</span>
@ -29,7 +29,7 @@
<div class="control-group">
<div class="controls">
<button {{action changeUsername target="controller"}} {{bindAttr disabled="controller.saveDisabled"}} class="btn btn-primary">{{controller.saveButtonText}}</button>
<button {{action changeUsername}} {{bindAttr disabled="saveDisabled"}} class="btn btn-primary">{{saveButtonText}}</button>
{{#if saved}}{{i18n saved}}{{/if}}
</div>
</div>