Merge branch 'ember-cli' of github.com:travis-ci/travis-web into ember-cli

This commit is contained in:
Lisa Passing 2015-02-06 13:35:08 +01:00
commit caebbde09c
12 changed files with 41 additions and 25 deletions

View File

@ -1,5 +1,5 @@
`import Ember from 'ember'`
`import ApplicationAdapter from 'adapters/application'`
`import ApplicationAdapter from 'travis/adapters/application'`
Adapter = ApplicationAdapter.extend
namespace: 'settings'

View File

@ -1,5 +1,5 @@
`import Ember from 'ember'`
`import ApplicationAdapter from 'adapters/application'`
`import ApplicationAdapter from 'travis/adapters/application'`
Adapter = ApplicationAdapter.extend
namespace: 'settings'

View File

@ -3,6 +3,19 @@
`import loadInitializers from 'ember/load-initializers'`
`import config from './config/environment'`
`import label from 'travis/helpers/label'`
`import travisField from 'travis/helpers/travis-field'`
`import travisErrors from 'travis/helpers/travis-errors'`
`import tipsy from 'travis/helpers/tipsy'`
#`import input from 'travis/helpers/input'`
`import filterInput from 'travis/helpers/filter-input'`
Ember.Handlebars.registerHelper('label', label)
Ember.Handlebars.registerHelper('travis-field', travisField)
Ember.Handlebars.registerHelper('travis-errors', travisErrors)
Ember.Handlebars.registerHelper('tipsy', tipsy)
#Ember.Handlebars.registerHelper('input', input)
Ember.Handlebars.registerHelper('filter-input', filterInput)
Ember.MODEL_FACTORY_INJECTIONS = true
App = Ember.Application.extend(Ember.Evented,

View File

@ -1,6 +1,6 @@
`import Ember from 'ember'`
Controller = Ember.ArrayController.extend
vars: Ember.computed.filterBy('model', 'isNew', false)
vars: Ember.computed.alias('model')
`export default Controller`

View File

@ -39,6 +39,7 @@ Controller = Ember.Controller.extend Validations,
self.transitionToRoute('env_vars')
, =>
@set('isSaving', false)
else
@set('isSaving', false)
Travis.EnvVarsNewController = Controller
`export default Controller`

View File

@ -4,11 +4,7 @@ ErrorsView = Ember.View.extend
tagName: 'span'
templateName: 'helpers/travis-errors'
classNames: ['error']
classNameBindings: ['codes']
attributeBindings: ['style']
style: (->
'display: none' unless @get('show')
).property('show')
classNameBindings: ['codes', 'show']
codes: (->
@get('errors').mapBy('code')
).property('@errors')

View File

@ -7,7 +7,6 @@ html, body
padding: 0
height: 100%
color: $color-text
overflow-x: hidden
a
color: $color-link

View File

@ -199,6 +199,10 @@
span.error
margin-left: 0
display: none
&.show
display: inline-block
label.name, label.value
display: none

View File

@ -2,17 +2,19 @@
<ul class="env-vars">
{{#each vars itemController="envVar"}}
<li class="env-var">
{{#if isEditing}}
{{partial 'env_vars/form'}}
{{else}}
<a href="#" class="edit-var" {{action "edit"}}>Edit</a>
<a href="#" {{action "delete"}} {{bind-attr class=":delete-var isDeleting:deleting"}}>
Delete
</a>
<span class="name">{{name}}</span>
<span {{bind-attr class=":value :value-display public::secure"}}>{{value}}</span>
{{/if}}
</li>
{{#unless isNew}}
<li class="env-var">
{{#if isEditing}}
{{partial 'env_vars/form'}}
{{else}}
<a href="#" class="edit-var" {{action "edit"}}>Edit</a>
<a href="#" {{action "delete"}} {{bind-attr class=":delete-var isDeleting:deleting"}}>
Delete
</a>
<span class="name">{{name}}</span>
<span {{bind-attr class=":value :value-display public::secure"}}>{{value}}</span>
{{/if}}
</li>
{{/unless}}
{{/each}}
</ul>

View File

@ -12,7 +12,7 @@
{{else}}
<span class="value value-display secure">{{value}}</span>
{{/if}}
<div style="clear: both"></div>
<div class="clear"></div>
<div class="field">
{{travis-switch active=public class="value"}}
{{#label for="secure" class="public"}}Display value in build logs{{/label}}

View File

@ -1 +1 @@
{{#each view.errors}}{{message}}{{/each}}
{{#each erorr in view.errors}}{{error.message}}{{/each}}

View File

@ -1,6 +1,7 @@
`import Ember from 'ember'`
`import BasicView from 'travis/views/basic'`
View = Ember.View.extend
View = BasicView.extend
templateName: 'repos/show/tools'
repoBinding: 'controller.repo'