Remove layout views, just change template on application
This commit is contained in:
parent
939212302a
commit
a63ac52458
|
@ -2,19 +2,7 @@ require 'helpers'
|
|||
require 'travis/ticker'
|
||||
|
||||
Travis.reopen
|
||||
Controller: Em.Controller.extend
|
||||
connectOutlet: ->
|
||||
view = @_super.apply(this, arguments)
|
||||
|
||||
if view
|
||||
_connectedOutletViews = Travis.app.get('_connectedOutletViews')
|
||||
unless _connectedOutletViews
|
||||
_connectedOutletViews = []
|
||||
|
||||
_connectedOutletViews.pushObject(view)
|
||||
Travis.app.set('_connectedOutletViews', _connectedOutletViews)
|
||||
|
||||
view
|
||||
Controller: Em.Controller.extend()
|
||||
|
||||
TopController: Em.Controller.extend
|
||||
userBinding: 'Travis.app.currentUser'
|
||||
|
|
|
@ -78,10 +78,10 @@ Travis.Router = Ember.Router.extend
|
|||
auth: Ember.Route.extend
|
||||
route: '/auth'
|
||||
connectOutlets: (router) ->
|
||||
router.get('applicationController').connectOutlet('authLayout')
|
||||
router.get('applicationView').connectLayout 'simple'
|
||||
$('body').attr('id', 'auth')
|
||||
router.get('authLayoutController').connectOutlet('top', 'top')
|
||||
router.get('authLayoutController').connectOutlet('main', 'signin')
|
||||
router.get('applicationController').connectOutlet('top', 'top')
|
||||
router.get('applicationController').connectOutlet('main', 'signin')
|
||||
|
||||
afterSignIn: (router, path) ->
|
||||
router.route(path || '/')
|
||||
|
@ -89,26 +89,26 @@ Travis.Router = Ember.Router.extend
|
|||
stats: Ember.Route.extend
|
||||
route: '/stats'
|
||||
connectOutlets: (router) ->
|
||||
router.get('applicationController').connectOutlet 'statsLayout'
|
||||
router.get('applicationView').connectLayout 'simple'
|
||||
$('body').attr('id', 'stats')
|
||||
router.get('statsLayoutController').connectOutlet 'top', 'top'
|
||||
router.get('statsLayoutController').connectOutlet 'main', 'stats'
|
||||
router.get('applicationController').connectOutlet 'top', 'top'
|
||||
router.get('applicationController').connectOutlet 'main', 'stats'
|
||||
|
||||
profile: Ember.Route.extend
|
||||
initialState: 'index'
|
||||
route: '/profile'
|
||||
|
||||
connectOutlets: (router) ->
|
||||
router.get('applicationController').connectOutlet 'profileLayout'
|
||||
router.get('applicationView').connectLayout 'profile'
|
||||
$('body').attr('id', 'profile')
|
||||
router.get('accountsController').set('content', Travis.Account.find())
|
||||
router.get('profileLayoutController').connectOutlet 'top', 'top'
|
||||
router.get('profileLayoutController').connectOutlet 'left', 'accounts'
|
||||
router.get('applicationController').connectOutlet 'top', 'top'
|
||||
router.get('applicationController').connectOutlet 'left', 'accounts'
|
||||
|
||||
index: Ember.Route.extend
|
||||
route: '/'
|
||||
connectOutlets: (router) ->
|
||||
router.get('profileLayoutController').connectOutlet 'main', 'profile'
|
||||
router.get('applicationController').connectOutlet 'main', 'profile'
|
||||
router.get('profileController').activate 'hooks'
|
||||
|
||||
account: Ember.Route.extend
|
||||
|
@ -163,13 +163,13 @@ Travis.Router = Ember.Router.extend
|
|||
home: Ember.Route.extend
|
||||
route: '/'
|
||||
connectOutlets: (router) ->
|
||||
router.get('applicationController').connectOutlet 'homeLayout'
|
||||
router.get('applicationView').connectLayout 'home'
|
||||
$('body').attr('id', 'home')
|
||||
router.get('homeLayoutController').connectOutlet 'left', 'repos'
|
||||
router.get('homeLayoutController').connectOutlet 'right', 'sidebar'
|
||||
router.get('homeLayoutController').connectOutlet 'top', 'top'
|
||||
router.get('homeLayoutController').connectOutlet 'main', 'repo'
|
||||
router.get('homeLayoutController').connectOutlet 'flash', 'flash'
|
||||
router.get('applicationController').connectOutlet 'left', 'repos'
|
||||
router.get('applicationController').connectOutlet 'right', 'sidebar'
|
||||
router.get('applicationController').connectOutlet 'top', 'top'
|
||||
router.get('applicationController').connectOutlet 'main', 'repo'
|
||||
router.get('applicationController').connectOutlet 'flash', 'flash'
|
||||
router.get('repoController').set('repos', router.get('reposController'))
|
||||
|
||||
show: Ember.Route.extend
|
||||
|
|
|
@ -42,7 +42,7 @@ $.extend Travis.Tailing.prototype,
|
|||
positionButton: ->
|
||||
tail = $('#tail')
|
||||
return if tail.length is 0
|
||||
offset = $(window).scrollTop() - $('#log').offset().top + $('#top').height()
|
||||
offset = $(window).scrollTop() - $('#log').offset().top
|
||||
max = $('#log').height() - $('#tail').height() + 5
|
||||
offset = max if offset > max
|
||||
if offset > 0
|
||||
|
|
|
@ -1 +0,0 @@
|
|||
{{outlet}}
|
|
@ -2,17 +2,15 @@
|
|||
{{outlet top}}
|
||||
</div>
|
||||
|
||||
<div id="page">
|
||||
<div id="left">
|
||||
{{outlet left}}
|
||||
</div>
|
||||
|
||||
<div id="main">
|
||||
{{outlet flash}}
|
||||
{{outlet main}}
|
||||
</div>
|
||||
|
||||
<div id="right">
|
||||
{{outlet right}}
|
||||
</div>
|
||||
<div id="left">
|
||||
{{outlet left}}
|
||||
</div>
|
||||
|
||||
<div id="main">
|
||||
{{outlet flash}}
|
||||
{{outlet main}}
|
||||
</div>
|
||||
|
||||
<div id="right">
|
||||
{{outlet right}}
|
||||
</div>
|
||||
|
|
|
@ -2,41 +2,39 @@
|
|||
{{outlet top}}
|
||||
</div>
|
||||
|
||||
<div id="page">
|
||||
<div id="left">
|
||||
{{outlet left}}
|
||||
<div id="left">
|
||||
{{outlet left}}
|
||||
</div>
|
||||
|
||||
<div id="main">
|
||||
{{outlet flash}}
|
||||
{{outlet main}}
|
||||
</div>
|
||||
|
||||
<div id="right">
|
||||
<div id="github-wrapper">
|
||||
<a id="github" href="https://github.com/travis-ci" title="Fork me on GitHub">
|
||||
{{t layouts.application.fork_me}}
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div id="main">
|
||||
{{outlet flash}}
|
||||
{{outlet main}}
|
||||
<div id="slider" {{action toggle target="Travis.app.slider"}}>
|
||||
<div class='icon'></div>
|
||||
</div>
|
||||
|
||||
<div id="right">
|
||||
<div id="github-wrapper">
|
||||
<a id="github" href="https://github.com/travis-ci" title="Fork me on GitHub">
|
||||
{{t layouts.application.fork_me}}
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div id="slider" {{action toggle target="Travis.app.slider"}}>
|
||||
<div class='icon'></div>
|
||||
</div>
|
||||
|
||||
<div class="box">
|
||||
<h4>Getting started?</h4>
|
||||
<p>
|
||||
Please read our <a href="http://about.travis-ci.org/docs/user/getting-started">guide</a>.
|
||||
It will only take a few minutes :)
|
||||
</p>
|
||||
<p>
|
||||
You can find detailled docs on our <a href="http://about.travis-ci.org/">about</a> site.
|
||||
</p>
|
||||
<p>
|
||||
If you need help please don’t hesitate to join
|
||||
<a href="irc://irc.freenode.net#travis">#travis</a> on irc.freenode.net
|
||||
or our <a href="http://groups.google.com/group/travis-ci">mailinglist</a>.
|
||||
</p>
|
||||
</div>
|
||||
<div class="box">
|
||||
<h4>Getting started?</h4>
|
||||
<p>
|
||||
Please read our <a href="http://about.travis-ci.org/docs/user/getting-started">guide</a>.
|
||||
It will only take a few minutes :)
|
||||
</p>
|
||||
<p>
|
||||
You can find detailled docs on our <a href="http://about.travis-ci.org/">about</a> site.
|
||||
</p>
|
||||
<p>
|
||||
If you need help please don’t hesitate to join
|
||||
<a href="irc://irc.freenode.net#travis">#travis</a> on irc.freenode.net
|
||||
or our <a href="http://groups.google.com/group/travis-ci">mailinglist</a>.
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -2,10 +2,7 @@
|
|||
{{outlet top}}
|
||||
</div>
|
||||
|
||||
<div id="page">
|
||||
<div id="main">
|
||||
{{outlet flash}}
|
||||
{{outlet main}}
|
||||
</div>
|
||||
<div id="main">
|
||||
{{outlet flash}}
|
||||
{{outlet main}}
|
||||
</div>
|
||||
|
||||
|
|
|
@ -10,13 +10,6 @@ require 'ext/ember/namespace'
|
|||
popupCloseAll: ->
|
||||
$('.popup').removeClass('display')
|
||||
|
||||
|
||||
@Travis.reopen
|
||||
HomeLayoutView: Travis.View.extend(templateName: 'layouts/home')
|
||||
AuthLayoutView: Travis.View.extend(templateName: 'layouts/simple')
|
||||
ProfileLayoutView: Travis.View.extend(templateName: 'layouts/profile')
|
||||
StatsLayoutView: Travis.View.extend(templateName: 'layouts/simple')
|
||||
|
||||
require 'views/accounts'
|
||||
require 'views/application'
|
||||
require 'views/build'
|
||||
|
|
|
@ -1,8 +1,14 @@
|
|||
@Travis.reopen
|
||||
ApplicationView: Travis.View.extend
|
||||
templateName: 'application'
|
||||
templateName: 'layouts/home'
|
||||
classNames: ['application']
|
||||
|
||||
connectLayout: (name) ->
|
||||
name = "layouts/#{name}"
|
||||
if @get('templateName') != name
|
||||
@set('templateName', name)
|
||||
@rerender()
|
||||
|
||||
# popup: (event) ->
|
||||
# console.log event
|
||||
|
||||
|
|
|
@ -59,7 +59,7 @@
|
|||
$('#main').scrollTop 0
|
||||
|
||||
# weird, html works in chrome, body in firefox
|
||||
$('html,body').scrollTop $(hash).offset().top - $('#top').height()
|
||||
$('html,body').scrollTop $(hash).offset().top
|
||||
|
||||
@set 'controller.lineNumberHash', null
|
||||
|
||||
|
|
|
@ -1,18 +1,16 @@
|
|||
@import "_mixins/all"
|
||||
|
||||
#auth
|
||||
#page
|
||||
display: block
|
||||
min-height: 500px
|
||||
|
||||
#main
|
||||
top: 200px
|
||||
margin: 0 auto 0 auto
|
||||
margin: 0 auto
|
||||
padding: 25px 50px
|
||||
height: 100px
|
||||
|
||||
width: 300px
|
||||
min-width: auto
|
||||
border: 10px solid #bbb
|
||||
max-height: 400px
|
||||
@include border-radius(8px)
|
||||
|
||||
h1
|
||||
|
@ -24,5 +22,3 @@
|
|||
|
||||
a:hover
|
||||
text-decoration: underline
|
||||
|
||||
|
||||
|
|
|
@ -3,37 +3,24 @@
|
|||
$left-width: 250px
|
||||
|
||||
html, body
|
||||
min-height: 100%
|
||||
height: 100%
|
||||
|
||||
.application
|
||||
width: 100%
|
||||
overflow: hidden
|
||||
|
||||
// ouch. ember injects additional divs that somehow don't inherit the actual dimensions
|
||||
.application, .application > div
|
||||
width: 100%
|
||||
min-height: 100%
|
||||
|
||||
.application > div
|
||||
overflow-x: auto
|
||||
@include display-box
|
||||
@include box-orient(horizontal)
|
||||
@include box-align(stretch)
|
||||
margin-top: 40px
|
||||
|
||||
#top
|
||||
position: fixed
|
||||
position: absolute
|
||||
top: 0
|
||||
left: 0
|
||||
width: 100%
|
||||
height: 40px
|
||||
z-index: 1000
|
||||
|
||||
#page
|
||||
position: relative
|
||||
@include display-box
|
||||
@include box-orient(horizontal)
|
||||
@include box-align(stretch)
|
||||
width: 100%
|
||||
min-height: 100%
|
||||
margin-top: 40px
|
||||
|
||||
#left, #right
|
||||
@include box-flex(0)
|
||||
position: relative
|
||||
|
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -2329,34 +2329,31 @@ span.loading {
|
|||
}
|
||||
|
||||
/* line 4, /Users/drogus/code/travis/travis-web/assets/styles/auth.sass */
|
||||
#auth #page {
|
||||
display: block;
|
||||
min-height: 500px;
|
||||
}
|
||||
/* line 8, /Users/drogus/code/travis/travis-web/assets/styles/auth.sass */
|
||||
#auth #main {
|
||||
top: 200px;
|
||||
margin: 0 auto 0 auto;
|
||||
margin: 0 auto;
|
||||
padding: 25px 50px;
|
||||
height: 100px;
|
||||
width: 300px;
|
||||
min-width: auto;
|
||||
border: 10px solid #bbbbbb;
|
||||
max-height: 400px;
|
||||
-webkit-border-radius: 8px;
|
||||
-moz-border-radius: 8px;
|
||||
-ms-border-radius: 8px;
|
||||
-o-border-radius: 8px;
|
||||
border-radius: 8px;
|
||||
}
|
||||
/* line 18, /Users/drogus/code/travis/travis-web/assets/styles/auth.sass */
|
||||
/* line 16, /Users/drogus/code/travis/travis-web/assets/styles/auth.sass */
|
||||
#auth #main h1 {
|
||||
margin-bottom: 1em;
|
||||
color: #333333;
|
||||
}
|
||||
/* line 22, /Users/drogus/code/travis/travis-web/assets/styles/auth.sass */
|
||||
/* line 20, /Users/drogus/code/travis/travis-web/assets/styles/auth.sass */
|
||||
#auth #main p {
|
||||
color: #333333;
|
||||
}
|
||||
/* line 25, /Users/drogus/code/travis/travis-web/assets/styles/auth.sass */
|
||||
/* line 23, /Users/drogus/code/travis/travis-web/assets/styles/auth.sass */
|
||||
#auth #main a:hover {
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
@ -2544,39 +2541,13 @@ span.loading {
|
|||
|
||||
/* line 5, /Users/drogus/code/travis/travis-web/assets/styles/layout.sass */
|
||||
html, body {
|
||||
min-height: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
/* line 8, /Users/drogus/code/travis/travis-web/assets/styles/layout.sass */
|
||||
.application {
|
||||
width: 100%;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
/* line 13, /Users/drogus/code/travis/travis-web/assets/styles/layout.sass */
|
||||
.application, .application > div {
|
||||
width: 100%;
|
||||
min-height: 100%;
|
||||
}
|
||||
|
||||
/* line 17, /Users/drogus/code/travis/travis-web/assets/styles/layout.sass */
|
||||
.application > div {
|
||||
overflow-x: auto;
|
||||
}
|
||||
|
||||
/* line 20, /Users/drogus/code/travis/travis-web/assets/styles/layout.sass */
|
||||
#top {
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 40px;
|
||||
z-index: 1000;
|
||||
}
|
||||
|
||||
/* line 28, /Users/drogus/code/travis/travis-web/assets/styles/layout.sass */
|
||||
#page {
|
||||
position: relative;
|
||||
display: -webkit-box;
|
||||
display: -moz-box;
|
||||
display: -ms-box;
|
||||
|
@ -2589,12 +2560,20 @@ html, body {
|
|||
-moz-box-align: stretch;
|
||||
-ms-box-align: stretch;
|
||||
box-align: stretch;
|
||||
width: 100%;
|
||||
min-height: 100%;
|
||||
margin-top: 40px;
|
||||
}
|
||||
|
||||
/* line 37, /Users/drogus/code/travis/travis-web/assets/styles/layout.sass */
|
||||
/* line 16, /Users/drogus/code/travis/travis-web/assets/styles/layout.sass */
|
||||
#top {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 40px;
|
||||
z-index: 1000;
|
||||
}
|
||||
|
||||
/* line 24, /Users/drogus/code/travis/travis-web/assets/styles/layout.sass */
|
||||
#left, #right {
|
||||
-webkit-box-flex: 0;
|
||||
-moz-box-flex: 0;
|
||||
|
@ -2604,7 +2583,7 @@ html, body {
|
|||
min-height: 100%;
|
||||
}
|
||||
|
||||
/* line 42, /Users/drogus/code/travis/travis-web/assets/styles/layout.sass */
|
||||
/* line 29, /Users/drogus/code/travis/travis-web/assets/styles/layout.sass */
|
||||
#left {
|
||||
min-width: 250px;
|
||||
max-width: 380px;
|
||||
|
@ -2618,12 +2597,12 @@ html, body {
|
|||
}
|
||||
|
||||
@media screen and (max-width: 980px) {
|
||||
/* line 52, /Users/drogus/code/travis/travis-web/assets/styles/layout.sass */
|
||||
/* line 39, /Users/drogus/code/travis/travis-web/assets/styles/layout.sass */
|
||||
#left {
|
||||
max-width: 300px;
|
||||
}
|
||||
}
|
||||
/* line 55, /Users/drogus/code/travis/travis-web/assets/styles/layout.sass */
|
||||
/* line 42, /Users/drogus/code/travis/travis-web/assets/styles/layout.sass */
|
||||
#main {
|
||||
-webkit-box-flex: 4;
|
||||
-moz-box-flex: 4;
|
||||
|
@ -2635,7 +2614,7 @@ html, body {
|
|||
padding: 20px 40px 80px 30px;
|
||||
}
|
||||
|
||||
/* line 62, /Users/drogus/code/travis/travis-web/assets/styles/layout.sass */
|
||||
/* line 49, /Users/drogus/code/travis/travis-web/assets/styles/layout.sass */
|
||||
#right {
|
||||
width: 205px;
|
||||
padding: 11px 20px 80px 20px;
|
||||
|
@ -2644,7 +2623,7 @@ html, body {
|
|||
}
|
||||
|
||||
@media screen and (max-width: 1400px) {
|
||||
/* line 69, /Users/drogus/code/travis/travis-web/assets/styles/layout.sass */
|
||||
/* line 56, /Users/drogus/code/travis/travis-web/assets/styles/layout.sass */
|
||||
#left .duration_label {
|
||||
display: inline-block;
|
||||
width: 11px;
|
||||
|
@ -2656,7 +2635,7 @@ html, body {
|
|||
}
|
||||
}
|
||||
@media screen and (max-width: 1310px) {
|
||||
/* line 79, /Users/drogus/code/travis/travis-web/assets/styles/layout.sass */
|
||||
/* line 66, /Users/drogus/code/travis/travis-web/assets/styles/layout.sass */
|
||||
#left .finished_at_label {
|
||||
display: none;
|
||||
}
|
||||
|
|
|
@ -1 +1 @@
|
|||
ec528022
|
||||
1d279e2d
|
Loading…
Reference in New Issue
Block a user