change tools button to have a menu, add requeue menu item, make status image stuff a popup
This commit is contained in:
parent
25dffc0a7a
commit
02a1f166d5
|
@ -43,7 +43,7 @@ GIT
|
||||||
|
|
||||||
GIT
|
GIT
|
||||||
remote: git://github.com/travis-ci/travis-api.git
|
remote: git://github.com/travis-ci/travis-api.git
|
||||||
revision: 8abc3309372e8a9c4e3506cbf45362c49e91b24d
|
revision: 2b290b9571db627cd796b4d11d5c6153b8d649c1
|
||||||
specs:
|
specs:
|
||||||
travis-api (0.0.1)
|
travis-api (0.0.1)
|
||||||
backports (~> 2.5)
|
backports (~> 2.5)
|
||||||
|
@ -61,7 +61,7 @@ GIT
|
||||||
|
|
||||||
GIT
|
GIT
|
||||||
remote: git://github.com/travis-ci/travis-core.git
|
remote: git://github.com/travis-ci/travis-core.git
|
||||||
revision: 94dbbf2fea57b56383e26152ae3a4cece02d2df0
|
revision: 05ea6a6696b3be32839afcaa126afaf3f2522536
|
||||||
branch: sf-travis-api
|
branch: sf-travis-api
|
||||||
specs:
|
specs:
|
||||||
travis-core (0.0.1)
|
travis-core (0.0.1)
|
||||||
|
|
BIN
assets/images/ui/close.png
Normal file
BIN
assets/images/ui/close.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.1 KiB |
|
@ -1,6 +1,6 @@
|
||||||
require 'travis/model'
|
require 'travis/model'
|
||||||
|
|
||||||
@Travis.Build = Travis.Model.extend Travis.DurationCalculations,
|
@Travis.Build = Travis.Model.extend Travis.DurationCalculations, Travis.Ajax,
|
||||||
eventType: DS.attr('string')
|
eventType: DS.attr('string')
|
||||||
repoId: DS.attr('number')
|
repoId: DS.attr('number')
|
||||||
commitId: DS.attr('number')
|
commitId: DS.attr('number')
|
||||||
|
@ -26,6 +26,10 @@ require 'travis/model'
|
||||||
@get('data.job_ids.length') > 1
|
@get('data.job_ids.length') > 1
|
||||||
).property('data.job_ids.length')
|
).property('data.job_ids.length')
|
||||||
|
|
||||||
|
isFinished: (->
|
||||||
|
@get('state') == 'finished'
|
||||||
|
).property('state')
|
||||||
|
|
||||||
requiredJobs: (->
|
requiredJobs: (->
|
||||||
@get('jobs').filter (data) -> !data.get('allowFailure')
|
@get('jobs').filter (data) -> !data.get('allowFailure')
|
||||||
).property('jobs.@each.allowFailure')
|
).property('jobs.@each.allowFailure')
|
||||||
|
@ -41,6 +45,10 @@ require 'travis/model'
|
||||||
$.map(headers.concat(keys), (key) -> return $.camelize(key))
|
$.map(headers.concat(keys), (key) -> return $.camelize(key))
|
||||||
).property('config')
|
).property('config')
|
||||||
|
|
||||||
|
requeue: (->
|
||||||
|
@post '/requests', build_id: @get('id')
|
||||||
|
)
|
||||||
|
|
||||||
@Travis.Build.reopenClass
|
@Travis.Build.reopenClass
|
||||||
byRepoId: (id, parameters) ->
|
byRepoId: (id, parameters) ->
|
||||||
@find($.extend(parameters || {}, repository_id: id))
|
@find($.extend(parameters || {}, repository_id: id))
|
||||||
|
|
|
@ -27,7 +27,7 @@ require 'travis/model'
|
||||||
permissions: (->
|
permissions: (->
|
||||||
unless @permissions
|
unless @permissions
|
||||||
@permissions = Ember.ArrayProxy.create()
|
@permissions = Ember.ArrayProxy.create()
|
||||||
@ajax '/users/permissions', 'get', success: (data) => @permissions.set('content', data).permissions
|
@ajax '/users/permissions', 'get', success: (data) => @permissions.set('content', data.permissions)
|
||||||
@permissions
|
@permissions
|
||||||
).property()
|
).property()
|
||||||
|
|
||||||
|
|
|
@ -43,6 +43,7 @@
|
||||||
|
|
||||||
{{#unless view.required}}
|
{{#unless view.required}}
|
||||||
<div id="help-allowed_failures" class="popup">
|
<div id="help-allowed_failures" class="popup">
|
||||||
|
<a href="#" class="close" {{action popupClose target="view"}}></a>
|
||||||
<h4>{{t "jobs.allowed_failures"}}</h4>
|
<h4>{{t "jobs.allowed_failures"}}</h4>
|
||||||
<p>
|
<p>
|
||||||
Allowed Failures are items in your build matrix that are allowed to
|
Allowed Failures are items in your build matrix that are allowed to
|
||||||
|
|
|
@ -1,29 +1,41 @@
|
||||||
<div id="tools">
|
<div id="tools">
|
||||||
<a href="#" {{action toggle target="view"}}></a>
|
<a href="#" {{action menu target="view"}}></a>
|
||||||
<div class="pane">
|
<ul class="menu">
|
||||||
<p>
|
<li>
|
||||||
<label>{{t repositories.branch}}:</label>
|
<a href="#" name="status-images" {{action statusImages target="view"}}>Status Images</a>
|
||||||
{{#if view.branches.isLoaded}}
|
</li>
|
||||||
{{view Ember.Select contentBinding="view.branches" selectionBinding="view.branch" optionLabelPath="content.commit.branch" optionValuePath="content.commit.branch"}}
|
{{#if view.canPush}}
|
||||||
{{else}}
|
<li>
|
||||||
<span class="loading"></span>
|
<a href="#" {{action requeue target="view"}}>Rebuild</a>
|
||||||
{{/if}}
|
</li>
|
||||||
</p>
|
{{/if}}
|
||||||
<p>
|
</ul>
|
||||||
<label>{{t repositories.image_url}}:</label>
|
</div>
|
||||||
<input type="text" class="url" {{bindAttr value="view.urlStatusImage"}}></input>
|
|
||||||
</p>
|
<div id="status-images" class="popup">
|
||||||
<p>
|
<a href="#" class="close" {{action popupClose target="view"}}></a>
|
||||||
<label>{{t repositories.markdown}}:</label>
|
<p>
|
||||||
<input type="text" class="markdown" {{bindAttr value="view.markdownStatusImage"}}></input>
|
<label>{{t repositories.branch}}:</label>
|
||||||
</p>
|
{{#if view.branches.isLoaded}}
|
||||||
<p>
|
{{view Ember.Select contentBinding="view.branches" selectionBinding="view.branch" optionLabelPath="content.commit.branch" optionValuePath="content.commit.branch"}}
|
||||||
<label>{{t repositories.textile}}:</label>
|
{{else}}
|
||||||
<input type="text" class="textile" {{bindAttr value="view.textileStatusImage"}}></input>
|
<span class="loading"></span>
|
||||||
</p>
|
{{/if}}
|
||||||
<p>
|
</p>
|
||||||
<label>{{t repositories.rdoc}}:</label>
|
<p>
|
||||||
<input type="text" class="rdoc" {{bindAttr value="view.rdocStatusImage"}}></input>
|
<label>{{t repositories.image_url}}:</label>
|
||||||
</p>
|
<input type="text" class="url" {{bindAttr value="view.urlStatusImage"}}></input>
|
||||||
</div>
|
</p>
|
||||||
|
<p>
|
||||||
|
<label>{{t repositories.markdown}}:</label>
|
||||||
|
<input type="text" class="markdown" {{bindAttr value="view.markdownStatusImage"}}></input>
|
||||||
|
</p>
|
||||||
|
<p>
|
||||||
|
<label>{{t repositories.textile}}:</label>
|
||||||
|
<input type="text" class="textile" {{bindAttr value="view.textileStatusImage"}}></input>
|
||||||
|
</p>
|
||||||
|
<p>
|
||||||
|
<label>{{t repositories.rdoc}}:</label>
|
||||||
|
<input type="text" class="rdoc" {{bindAttr value="view.rdocStatusImage"}}></input>
|
||||||
|
</p>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -3,7 +3,13 @@ require 'ext/ember/namespace'
|
||||||
@Travis.reopen
|
@Travis.reopen
|
||||||
View: Em.View.extend
|
View: Em.View.extend
|
||||||
popup: (event) ->
|
popup: (event) ->
|
||||||
|
@popupCloseAll()
|
||||||
$("##{event.target.name}").toggleClass('display')
|
$("##{event.target.name}").toggleClass('display')
|
||||||
|
popupClose: (event) ->
|
||||||
|
$(event.target).closest('.popup').removeClass('display')
|
||||||
|
popupCloseAll: ->
|
||||||
|
$('.popup').removeClass('display')
|
||||||
|
|
||||||
|
|
||||||
@Travis.reopen
|
@Travis.reopen
|
||||||
HomeView: Travis.View.extend(templateName: 'layouts/home')
|
HomeView: Travis.View.extend(templateName: 'layouts/home')
|
||||||
|
|
|
@ -65,9 +65,33 @@
|
||||||
jobBinding: 'controller.job'
|
jobBinding: 'controller.job'
|
||||||
tabBinding: 'controller.tab'
|
tabBinding: 'controller.tab'
|
||||||
|
|
||||||
toggle: ->
|
closeMenu: ->
|
||||||
element = $('#tools .pane').toggleClass('display-inline')
|
$('.menu').removeClass('display')
|
||||||
@set('active', element.hasClass('display-inline'))
|
|
||||||
|
menu: ->
|
||||||
|
@popupCloseAll()
|
||||||
|
element = $('#tools .menu').toggleClass('display')
|
||||||
|
|
||||||
|
requeue: ->
|
||||||
|
@closeMenu()
|
||||||
|
@get('build').requeue()
|
||||||
|
|
||||||
|
statusImages: (event) ->
|
||||||
|
@set('active', true)
|
||||||
|
@closeMenu()
|
||||||
|
@popup(event)
|
||||||
|
|
||||||
|
canPush: (->
|
||||||
|
@get('isBuildTab') && @get('build.isFinished') && @get('hasPushPermissions')
|
||||||
|
).property('build.isFinished', 'hasPushPermissions', 'isBuildTab')
|
||||||
|
|
||||||
|
isBuildTab: (->
|
||||||
|
['current', 'build', 'job'].indexOf(@get('tab')) > -1
|
||||||
|
).property('tab')
|
||||||
|
|
||||||
|
hasPushPermissions: (->
|
||||||
|
Travis.app.get('currentUser.permissions').indexOf(@get('repo.id')) > -1
|
||||||
|
).property('Travis.app.currentUser.permissions.length', 'repo.id')
|
||||||
|
|
||||||
branches: (->
|
branches: (->
|
||||||
@get('repo.branches') if @get('active')
|
@get('repo.branches') if @get('active')
|
||||||
|
|
|
@ -68,6 +68,8 @@ $color-bg-list-odd: $white
|
||||||
$color-bg-list-even: $gray-light-3
|
$color-bg-list-even: $gray-light-3
|
||||||
$color-bg-hooks-odd: $slate-blue-4
|
$color-bg-hooks-odd: $slate-blue-4
|
||||||
$color-bg-hooks-even: $white
|
$color-bg-hooks-even: $white
|
||||||
|
$color-bg-menu: $gray-light-4
|
||||||
|
$color-bg-menu-hover: $gray-light-3
|
||||||
$color-bg-tools-pane: $slate-blue-3
|
$color-bg-tools-pane: $slate-blue-3
|
||||||
$color-bg-right: $slate-blue-3
|
$color-bg-right: $slate-blue-3
|
||||||
$color-bg-sidebar-box: $white
|
$color-bg-sidebar-box: $white
|
||||||
|
|
|
@ -17,6 +17,15 @@
|
||||||
padding: 20px
|
padding: 20px
|
||||||
@include popup
|
@include popup
|
||||||
|
|
||||||
|
.close
|
||||||
|
position: absolute
|
||||||
|
display: block
|
||||||
|
right: 10px
|
||||||
|
top: 10px
|
||||||
|
width: 16px
|
||||||
|
height: 16px
|
||||||
|
background: inline-image('ui/close.png') no-repeat 0 0
|
||||||
|
|
||||||
h4
|
h4
|
||||||
margin-top: 0
|
margin-top: 0
|
||||||
font-size: 18px
|
font-size: 18px
|
||||||
|
@ -32,3 +41,22 @@
|
||||||
padding: 10px 20px
|
padding: 10px 20px
|
||||||
@include border-radius(4px)
|
@include border-radius(4px)
|
||||||
|
|
||||||
|
#status-images
|
||||||
|
display: none
|
||||||
|
position: absolute
|
||||||
|
width: 600px
|
||||||
|
height: 190px
|
||||||
|
margin: -145px 0 0 -300px
|
||||||
|
|
||||||
|
p
|
||||||
|
margin: 10px 0
|
||||||
|
label
|
||||||
|
width: 80px
|
||||||
|
display: inline-block
|
||||||
|
input
|
||||||
|
border: 1px solid $color-border-light
|
||||||
|
width: 505px
|
||||||
|
padding: 4px
|
||||||
|
@include border-radius(3px)
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -4,6 +4,7 @@
|
||||||
position: relative
|
position: relative
|
||||||
width: 100%
|
width: 100%
|
||||||
overflow-x: hidden
|
overflow-x: hidden
|
||||||
|
padding-right: 10px
|
||||||
|
|
||||||
.description, .language
|
.description, .language
|
||||||
font-weight: normal
|
font-weight: normal
|
||||||
|
@ -16,7 +17,7 @@
|
||||||
.github-stats
|
.github-stats
|
||||||
position: absolute
|
position: absolute
|
||||||
top: 15px
|
top: 15px
|
||||||
right: 0
|
right: 10px
|
||||||
> *
|
> *
|
||||||
float: left
|
float: left
|
||||||
a
|
a
|
||||||
|
|
|
@ -3,7 +3,8 @@
|
||||||
#tools
|
#tools
|
||||||
position: relative
|
position: relative
|
||||||
float: right
|
float: right
|
||||||
a
|
top: 2px
|
||||||
|
& > a
|
||||||
display: block
|
display: block
|
||||||
width: 39px
|
width: 39px
|
||||||
height: 21px
|
height: 21px
|
||||||
|
@ -11,28 +12,20 @@
|
||||||
background: inline-image('ui/tools-button.png') no-repeat
|
background: inline-image('ui/tools-button.png') no-repeat
|
||||||
cursor: pointer
|
cursor: pointer
|
||||||
|
|
||||||
.pane
|
.menu
|
||||||
display: none
|
display: none
|
||||||
position: absolute
|
position: absolute
|
||||||
z-index: 400
|
|
||||||
top: -1px
|
|
||||||
right: 0
|
right: 0
|
||||||
width: 600px
|
top: -3px
|
||||||
padding: 10px 20px
|
width: 130px
|
||||||
|
background-color: $color-bg-menu
|
||||||
border: 1px solid $color-border-light
|
border: 1px solid $color-border-light
|
||||||
background-color: $color-bg-tools-pane
|
|
||||||
@include border-bottom-radius(4px)
|
@include border-bottom-radius(4px)
|
||||||
@include single-box-shadow(rgba(black, 0.1), 1px, 3px, 5px)
|
@include single-box-shadow(rgba(black, 0.1), 3px, 3px, 8px)
|
||||||
|
a
|
||||||
p
|
display: block
|
||||||
margin: 10px 0
|
padding: 5px 25px 5px 25px
|
||||||
label
|
&:hover
|
||||||
width: 80px
|
background-color: $color-bg-menu-hover
|
||||||
display: inline-block
|
&:last-child
|
||||||
input
|
@include border-bottom-radius(4px)
|
||||||
border: 1px solid $color-border-light
|
|
||||||
width: 505px
|
|
||||||
padding: 4px
|
|
||||||
@include border-radius(3px)
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -2,6 +2,7 @@ require 'rake-pipeline'
|
||||||
require 'execjs'
|
require 'execjs'
|
||||||
require 'uglifier'
|
require 'uglifier'
|
||||||
require 'pathname'
|
require 'pathname'
|
||||||
|
require 'json'
|
||||||
|
|
||||||
module Travis
|
module Travis
|
||||||
class Assets
|
class Assets
|
||||||
|
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large
Load Diff
|
@ -1 +1 @@
|
||||||
b63092e5
|
1dcac772
|
Loading…
Reference in New Issue
Block a user