Remove Travis global usage from templates

This commit is contained in:
Piotr Sarnacki 2015-02-04 18:34:25 +01:00
parent 8f7c58ce4c
commit 67cae2c8f5
9 changed files with 11 additions and 9 deletions

View File

@ -5,10 +5,12 @@
initialize = (container, application) ->
application.slider = new Slider(application.storage)
application.tailing = new Tailing($(window), '#tail', '#log')
application.toTop = new ToTop($(window), '.to-top', '#log-container')
application.register 'slider:main', application.slider, { instantiate: false }
application.inject('view', 'slider', 'slider:main')
Initializer =
name: 'services'
initialize: initialize

View File

@ -11,7 +11,7 @@
<tbody>
{{#each event in view.events}}
{{#view Travis.EventsItemView contextBinding="event"}}
{{#view "events-item" contextBinding="event"}}
<td class="created_at">
{{format-time createdAt}}
</td>

View File

@ -1,5 +1,5 @@
{{#each flash in controller}}
{{#view Travis.FlashItemView flashBinding="flash"}}
{{#view "flash-item" flashBinding="flash"}}
<p>{{{flash.message}}}</p>
<a class="close" {{action "close" target=view}}></a>
{{/view}}

View File

@ -12,7 +12,7 @@
</div>
<div id="right">
<div id="slider" {{action "toggle" target=Travis.slider}}>
<div id="slider" {{action "toggle" target=slider}}>
<div class='icon'></div>&nbsp;
</div>

View File

@ -8,7 +8,7 @@
</ul>
<div class="tab">
{{#collection Travis.AccountsListView contentBinding="controller"}}
{{#collection "accounts-list" contentBinding="controller"}}
{{#link-to "account" view.account class="name"}}{{view.name}}{{/link-to}}
<p class="summary">
<span class="repos_label">Repositories:</span>

View File

@ -18,7 +18,7 @@
{{/if}}
{{/if}}
{{view Travis.ProfileTabsView}}
{{view 'profile-tabs'}}
<div class="tab">
{{outlet}}

View File

@ -1,6 +1,6 @@
<div id="repo" {{bind-attr class="view.className"}}>
{{#if view.isEmpty}}
{{view Travis.ReposEmptyView}}
{{view 'repos-empty'}}
{{else}}
{{#if repo.isLoaded}}
<div id="repo-header">

View File

@ -1,4 +1,4 @@
<div id="slider" {{action toggle target="Travis.slider"}}>
<div id="slider" {{action toggle target=slider}}>
<div class='icon'></div>&nbsp;
</div>

View File

@ -10,5 +10,5 @@
<p>
<label>{{view Ember.Select contentBinding="view.formats" selectionBinding="view.statusImageFormat"}}</label>
{{view Travis.StatusImageInput valueBinding="view.statusString" class="url" rows=3}}
{{view 'status-image' valueBinding="view.statusString" class="url" rows=3}}
</p>