add flash messages and styles
This commit is contained in:
parent
93cd91f67c
commit
521fc3112d
|
@ -27,6 +27,7 @@ Travis.reopen
|
||||||
|
|
||||||
require 'controllers/accounts'
|
require 'controllers/accounts'
|
||||||
require 'controllers/builds'
|
require 'controllers/builds'
|
||||||
|
require 'controllers/flash'
|
||||||
require 'controllers/home'
|
require 'controllers/home'
|
||||||
require 'controllers/profile'
|
require 'controllers/profile'
|
||||||
require 'controllers/repos'
|
require 'controllers/repos'
|
||||||
|
|
7
assets/scripts/app/controllers/flash.coffee
Normal file
7
assets/scripts/app/controllers/flash.coffee
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
Travis.FlashController = Ember.ArrayController.extend
|
||||||
|
init: ->
|
||||||
|
@_super.apply this, arguments
|
||||||
|
@set('content', Ember.A())
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -6,7 +6,7 @@ Travis.Router = Ember.Router.extend
|
||||||
showRoot: Ember.Route.transitionTo('root.home.show')
|
showRoot: Ember.Route.transitionTo('root.home.show')
|
||||||
showStats: Ember.Route.transitionTo('root.stats')
|
showStats: Ember.Route.transitionTo('root.stats')
|
||||||
|
|
||||||
showRepo: Ember.Route.transitionTo('root.home.repo.show')
|
showRepo: Ember.Route.transitionTo('root.home.repo.show')
|
||||||
showBuilds: Ember.Route.transitionTo('root.home.repo.builds.index')
|
showBuilds: Ember.Route.transitionTo('root.home.repo.builds.index')
|
||||||
showBuild: Ember.Route.transitionTo('root.home.repo.builds.show')
|
showBuild: Ember.Route.transitionTo('root.home.repo.builds.show')
|
||||||
showPullRequests: Ember.Route.transitionTo('root.home.repo.pullRequests')
|
showPullRequests: Ember.Route.transitionTo('root.home.repo.pullRequests')
|
||||||
|
@ -117,6 +117,7 @@ Travis.Router = Ember.Router.extend
|
||||||
router.get('homeController').connectOutlet 'right', 'sidebar'
|
router.get('homeController').connectOutlet 'right', 'sidebar'
|
||||||
router.get('homeController').connectOutlet 'top', 'top'
|
router.get('homeController').connectOutlet 'top', 'top'
|
||||||
router.get('homeController').connectOutlet 'main', 'repo'
|
router.get('homeController').connectOutlet 'main', 'repo'
|
||||||
|
router.get('homeController').connectOutlet 'flash', 'flash'
|
||||||
|
|
||||||
show: Ember.Route.extend
|
show: Ember.Route.extend
|
||||||
route: '/'
|
route: '/'
|
||||||
|
|
2
assets/scripts/app/templates/layouts/flash.hbs
Normal file
2
assets/scripts/app/templates/layouts/flash.hbs
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
<p>{{view.message}}</p>
|
||||||
|
<a class="close" {{action close target="view"}}></a>
|
|
@ -8,6 +8,7 @@
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="main">
|
<div id="main">
|
||||||
|
{{outlet flash}}
|
||||||
{{outlet main}}
|
{{outlet main}}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
|
@ -8,6 +8,7 @@
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="main">
|
<div id="main">
|
||||||
|
{{outlet flash}}
|
||||||
{{outlet main}}
|
{{outlet main}}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
|
@ -4,6 +4,7 @@
|
||||||
|
|
||||||
<div id="page">
|
<div id="page">
|
||||||
<div id="main">
|
<div id="main">
|
||||||
|
{{outlet flash}}
|
||||||
{{outlet main}}
|
{{outlet main}}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -20,6 +20,7 @@ require 'ext/ember/namespace'
|
||||||
|
|
||||||
require 'views/accounts'
|
require 'views/accounts'
|
||||||
require 'views/build'
|
require 'views/build'
|
||||||
|
require 'views/flash'
|
||||||
require 'views/job'
|
require 'views/job'
|
||||||
require 'views/repo'
|
require 'views/repo'
|
||||||
require 'views/profile'
|
require 'views/profile'
|
||||||
|
|
11
assets/scripts/app/views/flash.coffee
Normal file
11
assets/scripts/app/views/flash.coffee
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
@Travis.reopen
|
||||||
|
FlashView: Travis.View.extend
|
||||||
|
elementId: 'flash'
|
||||||
|
templateName: 'layouts/flash'
|
||||||
|
|
||||||
|
flashBinding: 'controller.firstObject'
|
||||||
|
classNameBindings: ['flash.type']
|
||||||
|
messageBinding: 'flash.message'
|
||||||
|
|
||||||
|
close: (event) ->
|
||||||
|
@get('controller').shiftObject()
|
|
@ -1,9 +1,37 @@
|
||||||
@import "_mixins/all"
|
@import "_mixins/all"
|
||||||
|
|
||||||
#flash-messages
|
#flash
|
||||||
position: absolute
|
display: none
|
||||||
left: 400px
|
margin: -20px -40px 20px -30px
|
||||||
top: 10px
|
padding: 15px 40px 15px 30px
|
||||||
font-size: 25px
|
color: gray
|
||||||
color: #FFFFFF
|
font-weight: bold
|
||||||
|
border-bottom: 1px solid $color-border-light
|
||||||
|
@include box-shadow(transparent 0 0 0 0, $color-border-normal 0 1px 6px 0, transparent 0 0 0 0, transparent 0 0 0 0)
|
||||||
|
|
||||||
|
&.success, &.notice, &.error
|
||||||
|
display: block
|
||||||
|
|
||||||
|
&.success
|
||||||
|
background-color: #ebfcc2
|
||||||
|
|
||||||
|
&.notice
|
||||||
|
background-color: lightGoldenrodYellow
|
||||||
|
|
||||||
|
&.error
|
||||||
|
background-color: #f5d7d3
|
||||||
|
|
||||||
|
p
|
||||||
|
margin: 0
|
||||||
|
|
||||||
|
.close
|
||||||
|
display: block
|
||||||
|
position: absolute
|
||||||
|
top: 17px
|
||||||
|
right: 40px
|
||||||
|
width: 16px
|
||||||
|
height: 16px
|
||||||
|
background: inline-image('ui/close.png') no-repeat 0 0
|
||||||
|
opacity: 0.5
|
||||||
|
cursor: pointer
|
||||||
|
|
||||||
|
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -955,12 +955,48 @@ li {
|
||||||
}
|
}
|
||||||
|
|
||||||
/* line 3, /Users/sven/Development/projects/travis/travis-web/assets/styles/app/flash.sass */
|
/* line 3, /Users/sven/Development/projects/travis/travis-web/assets/styles/app/flash.sass */
|
||||||
#flash-messages {
|
#flash {
|
||||||
|
display: none;
|
||||||
|
margin: -20px -40px 20px -30px;
|
||||||
|
padding: 15px 40px 15px 30px;
|
||||||
|
color: gray;
|
||||||
|
font-weight: bold;
|
||||||
|
border-bottom: 1px solid #dddddd;
|
||||||
|
-webkit-box-shadow: transparent 0 0 0 0, #cccccc 0 1px 6px 0, transparent 0 0 0 0, transparent 0 0 0 0;
|
||||||
|
-moz-box-shadow: transparent 0 0 0 0, #cccccc 0 1px 6px 0, transparent 0 0 0 0, transparent 0 0 0 0;
|
||||||
|
box-shadow: transparent 0 0 0 0, #cccccc 0 1px 6px 0, transparent 0 0 0 0, transparent 0 0 0 0;
|
||||||
|
}
|
||||||
|
/* line 12, /Users/sven/Development/projects/travis/travis-web/assets/styles/app/flash.sass */
|
||||||
|
#flash.success, #flash.notice, #flash.error {
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
|
/* line 15, /Users/sven/Development/projects/travis/travis-web/assets/styles/app/flash.sass */
|
||||||
|
#flash.success {
|
||||||
|
background-color: #ebfcc2;
|
||||||
|
}
|
||||||
|
/* line 18, /Users/sven/Development/projects/travis/travis-web/assets/styles/app/flash.sass */
|
||||||
|
#flash.notice {
|
||||||
|
background-color: lightgoldenrodyellow;
|
||||||
|
}
|
||||||
|
/* line 21, /Users/sven/Development/projects/travis/travis-web/assets/styles/app/flash.sass */
|
||||||
|
#flash.error {
|
||||||
|
background-color: #f5d7d3;
|
||||||
|
}
|
||||||
|
/* line 24, /Users/sven/Development/projects/travis/travis-web/assets/styles/app/flash.sass */
|
||||||
|
#flash p {
|
||||||
|
margin: 0;
|
||||||
|
}
|
||||||
|
/* line 27, /Users/sven/Development/projects/travis/travis-web/assets/styles/app/flash.sass */
|
||||||
|
#flash .close {
|
||||||
|
display: block;
|
||||||
position: absolute;
|
position: absolute;
|
||||||
left: 400px;
|
top: 17px;
|
||||||
top: 10px;
|
right: 40px;
|
||||||
font-size: 25px;
|
width: 16px;
|
||||||
color: white;
|
height: 16px;
|
||||||
|
background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TgwQjA4OTcxMUUyOTA2M0EyRDRFMENEQjlERiIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PgjNJDMAAABaUExURX9/f4GBgaCgoM7OzsnJycXFxby8vOPj44eHh5+fn9DQ0OLi4tzc3IKCgv39/d/f3+Dg4Ofn597e3ra2toWFheXl5bW1tZqamvj4+JmZmbu7u8bGxre3t////656HTcAAAAedFJOU///////////////////////////////////////AOwYHF4AAAB5SURBVHjaZE9HDgNBCDNM2d57Ev//m5nZnLJYQgILsA1mDCHGMNwtUjUqSBBtfkRdArrvCpR1JooV15aXtwtrQfQVjrN1pGvPA1WPUWSaO3iPbp5ERgQoHW44ahojFtInGfHkgteT+DxP3vapkTXGrHUb7j/+V4ABAB63DW3bAMwKAAAAAElFTkSuQmCC') no-repeat 0 0;
|
||||||
|
opacity: 0.5;
|
||||||
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
/* line 3, /Users/sven/Development/projects/travis/travis-web/assets/styles/_mixins/ansi.sass */
|
/* line 3, /Users/sven/Development/projects/travis/travis-web/assets/styles/_mixins/ansi.sass */
|
||||||
.ansi .bold {
|
.ansi .bold {
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
06ff9e3d
|
dd0dc238
|
Loading…
Reference in New Issue
Block a user