Merge branch 'master' into ui-improvements

Conflicts:
	assets/scripts/app/controllers/repo.coffee
	assets/scripts/app/templates/builds/show.hbs
	assets/scripts/app/templates/jobs/show.hbs
This commit is contained in:
Piotr Sarnacki 2013-08-06 13:16:56 +02:00
commit 8c3e92faea
8 changed files with 17 additions and 4 deletions

View File

@ -7,6 +7,7 @@ Travis.BuildsController = Em.ArrayController.extend
repoBinding: 'controllers.repo.repo' repoBinding: 'controllers.repo.repo'
tabBinding: 'controllers.repo.tab' tabBinding: 'controllers.repo.tab'
isLoadedBinding: 'content.isLoaded' isLoadedBinding: 'content.isLoaded'
isLoadingBinding: 'content.isLoading'
showMore: -> showMore: ->
id = @get('repo.id') id = @get('repo.id')

View File

@ -15,6 +15,7 @@ require 'travis/chunk_buffer'
fetch: -> fetch: ->
console.log 'log model: fetching log' if Log.DEBUG console.log 'log model: fetching log' if Log.DEBUG
@setParts()
handlers = handlers =
json: (json) => @loadParts(json['log']['parts']) json: (json) => @loadParts(json['log']['parts'])
text: (text) => @loadText(text) text: (text) => @loadText(text)

View File

@ -45,7 +45,7 @@
{{#if view.isPullRequestsList}} {{#if view.isPullRequestsList}}
<td> <td>
<a {{bindAttr href="view.urlGithubPullRequest"}}> <a {{bindAttr href="view.urlGithubPullRequest"}}>
#{{commit.pullRequestNumber}} #{{pullRequestNumber}}
</a> </a>
</td> </td>
{{/if}} {{/if}}
@ -62,6 +62,9 @@
{{#if displayShowMoreButton}} {{#if displayShowMoreButton}}
<p> <p>
{{view view.ShowMoreButton}} {{view view.ShowMoreButton}}
{{#if isLoading}}
<span class="loading"></span>
{{/if}}
</p> </p>
{{/if}} {{/if}}
{{else}} {{else}}

View File

@ -27,3 +27,7 @@
<label>{{t repositories.asciidoc}}:</label> <label>{{t repositories.asciidoc}}:</label>
<input type="text" class="asciidoc" {{bindAttr value="view.asciidocStatusImage"}}></input> <input type="text" class="asciidoc" {{bindAttr value="view.asciidocStatusImage"}}></input>
</p> </p>
<p>
<label>{{t repositories.rst}}:</label>
<input type="text" class="rst" {{bindAttr value="view.rstStatusImage"}}></input>
</p>

View File

@ -11,7 +11,7 @@ Travis.reopen
tagName: 'button' tagName: 'button'
classNameBindings: ['isLoading'] classNameBindings: ['isLoading']
attributeBindings: ['disabled'] attributeBindings: ['disabled']
isLoadingBinding: 'controller.builds.isLoading' isLoadingBinding: 'controller.isLoading'
template: Em.Handlebars.compile('{{view.label}}') template: Em.Handlebars.compile('{{view.label}}')
disabledBinding: 'isLoading' disabledBinding: 'isLoading'

View File

@ -51,3 +51,7 @@ Travis.StatusImagesView = Em.View.extend
asciidocStatusImage: (-> asciidocStatusImage: (->
"image:#{@get('statusImageUrl')}[\"Build Status\", link=\"#{@get('urlRepo')}\"]" "image:#{@get('statusImageUrl')}[\"Build Status\", link=\"#{@get('urlRepo')}\"]"
).property('statusImageUrl') ).property('statusImageUrl')
rstStatusImage: (->
".. image:: #{@get('statusImageUrl')} :target: #{@get('urlRepo')}"
).property('statusImageUrl')

View File

@ -44,7 +44,7 @@
#status-images #status-images
display: none display: none
width: 600px width: 600px
height: 230px height: 250px
margin: -95px 0 0 -300px margin: -95px 0 0 -300px
p p

View File

@ -9,7 +9,7 @@ class RedirectSubdomain < Struct.new(:app, :from)
def call(env) def call(env)
request = Rack::Request.new(env) request = Rack::Request.new(env)
if request.host == from if request.host == from
[301, { 'Location' => "https://travis-ci.org/#{request.fullpath}", 'Content-Type' => 'text/html' }, []] [301, { 'Location' => "https://travis-ci.org#{request.fullpath}", 'Content-Type' => 'text/html' }, []]
else else
app.call(env) app.call(env)
end end