Fixes after merging ps-env-vars

This commit is contained in:
Piotr Sarnacki 2014-08-21 16:39:15 +02:00
parent 9741ede075
commit 50e9986dda
8 changed files with 15 additions and 52 deletions

View File

@ -61,7 +61,7 @@ require 'controllers/job'
require 'controllers/profile'
require 'controllers/repos'
require 'controllers/repo'
require 'controllers/repo_settings'
require 'controllers/settings'
require 'controllers/stats'
require 'controllers/current_user'
require 'controllers/request'

View File

@ -1,17 +1,4 @@
Travis.RepoSettingsController = Em.ObjectController.extend
tabs:
index: "General Settings"
env_vars: "Environment Variables"
ssh_key: "SSH Key"
init: ->
@_super.apply this, arguments
tabs = []
@set('_tabs', tabs)
for own id, name of @get('tabs')
tabs.pushObject Travis.Tab.create(id: id, name: name)
Travis.SettingsIndexController = Em.ObjectController.extend
settings: Ember.computed.alias('model.settings')
settingsChanged: (->

View File

@ -103,9 +103,14 @@ Travis.ErrorsView = Ember.View.extend
template: Ember.Handlebars.compile("{{#each view.errors}}{{message}}{{/each}}")
classNames: ['error']
classNameBindings: ['codes']
attributeBindings: ['style']
style: (->
'display: none' unless @get('show')
).property('show')
codes: (->
@get('errors').mapBy('code')
).property('@errors')
show: Ember.computed.notEmpty('errors.[]')
Ember.Handlebars.helper('travis-errors', (name, options) ->
errors = @get('errors').for(name)

View File

@ -1,33 +0,0 @@
<div id="repo">
<h3>Settings: {{#link-to "repo" this}}{{slug}}{{/link-to}}</h3>
{{#travis-tabs}}
{{#travis-tab "general" "General Settings"}}
{{#settings-form}}
<p class="settings-row">
Build only if .travis.yml is present
{{travis-switch action="save" active=settings.builds_only_with_travis_yml}}
</p>
<p class="settings-row">
Build pushes
{{travis-switch action="save" active=settings.build_pushes}}
</p>
<p class="settings-row">
Build pull requests
{{travis-switch action="save" active=settings.build_pull_requests}}
</p>
<p class="settings-row">
<p class="short-settings-element" {{bind-attr class="settings.maximum_number_of_builds_valid"}}>
{{input value=settings.maximum_number_of_builds size="4" pattern='/^[0-9]+$/'}}
</p>
<label>
Concurrent jobs
</label>
</p>
{{/settings-form}}
{{/travis-tab}}
{{/travis-tabs}}
</div>

View File

@ -12,7 +12,7 @@ p.settings-row
display: inline-block
float: left
width: 5em
height: 1.55em
height: 1.45em
margin: 20px 0 50px 0
padding: 0.42em 1.5em
background-color: #F5F5F5

View File

@ -195,6 +195,10 @@
margin-top: 20px
margin-bottom: 30px
border-bottom: 1px solid #f1f1f1
span.error
margin-left: 0
label.name, label.value
display: none
@ -204,7 +208,7 @@
.field.name, .field.value
float: left
padding-bottom: 0
height: 33px
min-height: 33px
line-height: 33px
span.equals

View File

@ -89,7 +89,7 @@
#tab_build,
#tab_job,
#tab_request,
#tab_requests
#tab_requests,
#tab_caches,
#tab_settings
display: none

View File

@ -32,6 +32,6 @@ run Travis::Web::App.build(
ga_code: ENV['GA_CODE'],
root: File.expand_path('../public', __FILE__),
server_start: Time.now,
caches_enabled: ENV['CACHES_ENABLED']
caches_enabled: ENV['CACHES_ENABLED'],
ssh_key_enabled: ENV['SSH_KEY_ENABLED']
)