change attr to prop
This commit is contained in:
@@ -70,7 +70,7 @@
|
||||
<header>Enabled</header>
|
||||
<ul class="enabled connected">
|
||||
{{#each layout}}
|
||||
<li draggable="true" {{#each ../dataAttributes}}data-{{this}}="{{attr ../this this}}" {{/each}}>
|
||||
<li draggable="true" {{#each ../dataAttributes}}data-{{this}}="{{prop ../this this}}" {{/each}}>
|
||||
<div class="left">
|
||||
<label>{{label}}</label>
|
||||
</div>
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
{{#each selected}}
|
||||
<div class="list-group-item" data-value="{{this}}">
|
||||
{{#if ../translatedOptions}}
|
||||
{{attr ../../translatedOptions this}}
|
||||
{{prop ../../translatedOptions this}}
|
||||
{{else}}
|
||||
{{this}}
|
||||
{{/if}}
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<ul class="list-group">
|
||||
{{#each optionList}}
|
||||
<li class="list-group-item clearfix">
|
||||
{{#if ../translatedOptions}}{{attr ../../translatedOptions this}}{{else}}{{this}}{{/if}}
|
||||
{{#if ../translatedOptions}}{{prop ../../translatedOptions this}}{{else}}{{this}}{{/if}}
|
||||
<button class="btn btn-default pull-right" data-value="{{this}}" data-action="add">{{translate 'Add'}}</button>
|
||||
</li>
|
||||
{{/each}}
|
||||
|
||||
@@ -3,6 +3,6 @@
|
||||
{{else}}
|
||||
<span class="text-danger">{{translate 'userHasNoEmailAddress' category='messages' scope='Admin'}}</span>
|
||||
{{#if isAdmin}}
|
||||
<a href="#User/edit/{{attr model 'id'}}">{{translate 'Edit'}}</a>
|
||||
<a href="#User/edit/{{prop model 'id'}}">{{translate 'Edit'}}</a>
|
||||
{{/if}}
|
||||
{{/if}}
|
||||
|
||||
@@ -6,10 +6,10 @@
|
||||
<th width="20%"></th>
|
||||
{{#each models}}
|
||||
<th width="5%">
|
||||
<input type="radio" name="check-all" value="{{attr this 'id'}}" data-id="{{id}}" class="pull-right">
|
||||
<input type="radio" name="check-all" value="{{prop this 'id'}}" data-id="{{id}}" class="pull-right">
|
||||
</th>
|
||||
<th>
|
||||
<a href="#{{../scope}}/view/{{attr this 'id'}}">{{get this 'name'}}</a>
|
||||
<a href="#{{../scope}}/view/{{prop this 'id'}}">{{get this 'name'}}</a>
|
||||
</th>
|
||||
{{/each}}
|
||||
</tr>
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
{{#if ../editMode}}
|
||||
<select name="{{name}}" class="form-control" data-type="access">{{options ../../accessList access scope='Role' field='accessList'}}</select>
|
||||
{{else}}
|
||||
<span style="color: {{attr ../../colors access}};">{{translateOption access scope='Role' field='accessList'}}</span>
|
||||
<span style="color: {{prop ../../colors access}};">{{translateOption access scope='Role' field='accessList'}}</span>
|
||||
{{/if}}
|
||||
</td>
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
</select>
|
||||
{{else}}
|
||||
{{#ifNotEqual ../../access 'not-set'}}
|
||||
<span style="color: {{attr ../../../../colors level}};">{{translateOption ../level field='levelList' scope='Role'}}</span>
|
||||
<span style="color: {{prop ../../../../colors level}};">{{translateOption ../level field='levelList' scope='Role'}}</span>
|
||||
{{/ifNotEqual}}
|
||||
{{/if}}
|
||||
</td>
|
||||
|
||||
@@ -46,7 +46,7 @@
|
||||
return new Handlebars.SafeString("<img src=\"img/" + img + "\"></img>");
|
||||
});
|
||||
|
||||
Handlebars.registerHelper('attr', function (object, name) {
|
||||
Handlebars.registerHelper('prop', function (object, name) {
|
||||
if (name in object) {
|
||||
return object[name];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user