Rename Travis.Route to Travis.BasicRoute and Travis.View to Travis.BasicView

This commit is contained in:
Piotr Sarnacki 2015-02-02 11:46:35 +01:00
parent 17df511c6a
commit f47b893cb8
63 changed files with 104 additions and 103 deletions

View File

@ -1,6 +1,6 @@
require 'routes/route'
require 'routes/basic'
TravisRoute = Travis.Route
TravisRoute = Travis.BasicRoute
Route = TravisRoute.extend
renderTemplate: ->

View File

@ -1,6 +1,6 @@
require 'routes/route'
require 'routes/basic'
TravisRoute = Travis.Route
TravisRoute = Travis.BasicRoute
Route = TravisRoute.extend
setupController: (controller, account) ->

View File

@ -1,6 +1,6 @@
require 'routes/route'
require 'routes/basic'
TravisRoute = Travis.Route
TravisRoute = Travis.BasicRoute
Route = TravisRoute.extend
model: ->

View File

@ -1,6 +1,6 @@
require 'routes/route'
require 'routes/basic'
TravisRoute = Travis.Route
TravisRoute = Travis.BasicRoute
Route = TravisRoute.extend
redirect: ->

View File

@ -1,6 +1,6 @@
require 'routes/route'
require 'routes/basic'
TravisRoute = Travis.Route
TravisRoute = Travis.BasicRoute
Route = TravisRoute.extend
setupController: ->

View File

@ -1,6 +1,6 @@
require 'routes/route'
require 'routes/basic'
TravisRoute = Travis.Route
TravisRoute = Travis.BasicRoute
Route = TravisRoute.extend
needsAuth: false

View File

@ -1,6 +1,6 @@
require 'routes/route'
require 'routes/basic'
TravisRoute = Travis.Route
TravisRoute = Travis.BasicRoute
Route = TravisRoute.extend
needsAuth: false

View File

@ -18,4 +18,4 @@ Route = Ember.Route.extend
config.pro
).property()
Travis.Route = Route
Travis.BasicRoute = Route

View File

@ -1,4 +1,4 @@
require 'routes/route'
require 'routes/basic'
AbstractBuildsRoute = Travis.AbstractBuildsRoute

View File

@ -1,7 +1,7 @@
require 'routes/route'
require 'routes/basic'
require 'models/build'
TravisRoute = Travis.Route
TravisRoute = Travis.BasicRoute
Route = TravisRoute.extend
serialize: (model, params) ->

View File

@ -1,4 +1,4 @@
require 'routes/route'
require 'routes/basic'
AbstractBuildsRoute = Travis.AbstractBuildsRoute

View File

@ -1,10 +1,10 @@
require 'routes/route'
require 'routes/basic'
require 'models/request'
require 'utils/ajax'
Request = Travis.Request
Ajax = Travis.ajax
TravisRoute = Travis.Route
TravisRoute = Travis.BasicRoute
Route = TravisRoute.extend
needsAuth: true

View File

@ -1,6 +1,6 @@
require 'routes/route'
require 'routes/basic'
TravisRoute = Travis.Route
TravisRoute = Travis.BasicRoute
Route = TravisRoute.extend
needsAuth: true

View File

@ -1,6 +1,6 @@
require 'routes/route'
require 'routes/basic'
TravisRoute = Travis.Route
TravisRoute = Travis.BasicRoute
Route = TravisRoute.extend
queryParams:

View File

@ -1,6 +1,6 @@
require 'routes/route'
require 'routes/basic'
TravisRoute = Travis.Route
TravisRoute = Travis.BasicRoute
Route = TravisRoute.extend
model: (params) ->

View File

@ -1,4 +1,4 @@
require 'routes/route'
require 'routes/basic'
require 'routes/simple-layout'
require 'models/repo'

View File

@ -1,6 +1,6 @@
require 'routes/route'
require 'routes/basic'
TravisRoute = Travis.Route
TravisRoute = Travis.BasicRoute
Route = TravisRoute.extend()

View File

@ -1,4 +1,4 @@
require 'routes/route'
require 'routes/basic'
require 'routes/simple-layout'
SimpleLayoutRoute = Travis.SimpleLayoutRoute

View File

@ -1,7 +1,7 @@
require 'routes/route'
require 'routes/basic'
require 'models/job'
TravisRoute = Travis.Route
TravisRoute = Travis.BasicRoute
Route = TravisRoute.extend
serialize: (model, params) ->

View File

@ -1,6 +1,6 @@
require 'routes/route'
require 'routes/basic'
TravisRoute = Travis.Route
TravisRoute = Travis.BasicRoute
Route = TravisRoute.extend
renderTemplate: ->

View File

@ -1,6 +1,6 @@
require 'routes/route'
require 'routes/basic'
TravisRoute = Travis.Route
TravisRoute = Travis.BasicRoute
config = ENV.config
Route = TravisRoute.extend

View File

@ -1,6 +1,6 @@
require 'routes/route'
require 'routes/basic'
TravisRoute = Travis.Route
TravisRoute = Travis.BasicRoute
Route = TravisRoute.extend
redirect: ->

View File

@ -1,6 +1,6 @@
require 'routes/route'
require 'routes/basic'
TravisRoute = Travis.Route
TravisRoute = Travis.BasicRoute
Route = TravisRoute.extend
redirect: ->

View File

@ -1,4 +1,4 @@
require 'routes/route'
require 'routes/basic'
require 'routes/main-tab'
MainTabRoute = Travis.MainTabRoute

View File

@ -1,4 +1,4 @@
require 'routes/route'
require 'routes/basic'
require 'routes/main-tab'
MainTabRoute = Travis.MainTabRoute

View File

@ -1,4 +1,4 @@
require 'routes/route'
require 'routes/basic'
require 'routes/main-tab'
MainTabRoute = Travis.MainTabRoute

View File

@ -1,6 +1,6 @@
require 'routes/route'
require 'routes/basic'
TravisRoute = Travis.Route
TravisRoute = Travis.BasicRoute
Route = TravisRoute.extend
renderTemplate: ->

View File

@ -1,6 +1,6 @@
require 'routes/route'
require 'routes/basic'
TravisRoute = Travis.Route
TravisRoute = Travis.BasicRoute
Route = TravisRoute.extend
needsAuth: true

View File

@ -1,4 +1,4 @@
require 'routes/route'
require 'routes/basic'
AbstractBuildsRoute = Travis.AbstractBuildsRoute

View File

@ -1,8 +1,8 @@
require 'routes/route'
require 'routes/basic'
require 'models/repo'
Repo = Travis.Repo
TravisRoute = Travis.Route
TravisRoute = Travis.BasicRoute
Route = TravisRoute.extend
renderTemplate: ->

View File

@ -1,6 +1,6 @@
require 'routes/route'
require 'routes/basic'
TravisRoute = Travis.Route
TravisRoute = Travis.BasicRoute
Route = TravisRoute.extend
setupController: (controller, model) ->

View File

@ -1,7 +1,7 @@
require 'routes/route'
require 'routes/basic'
require 'models/request'
TravisRoute = Travis.Route
TravisRoute = Travis.BasicRoute
Route = TravisRoute.extend
setupController: ->

View File

@ -1,6 +1,6 @@
require 'routes/route'
require 'routes/basic'
TravisRoute = Travis.Route
TravisRoute = Travis.BasicRoute
Route = TravisRoute.extend
needsAuth: true

View File

@ -1,6 +1,6 @@
require 'routes/route'
require 'routes/basic'
TravisRoute = Travis.Route
TravisRoute = Travis.BasicRoute
Route = TravisRoute.extend
needsAuth: true

View File

@ -1,6 +1,6 @@
require 'routes/route'
require 'routes/basic'
TravisRoute = Travis.Route
TravisRoute = Travis.BasicRoute
Route = TravisRoute.extend
model: ->

View File

@ -1,6 +1,6 @@
require 'routes/route'
require 'routes/basic'
TravisRoute = Travis.Route
TravisRoute = Travis.BasicRoute
Route = TravisRoute.extend
setupController: ->

View File

@ -1,10 +1,10 @@
require 'routes/route'
require 'routes/basic'
require 'models/ssh-key'
require 'utils/ajax'
SshKey = Travis.SshKey
Ajax = Travis.ajax
TravisRoute = Travis.Route
TravisRoute = Travis.BasicRoute
Route = TravisRoute.extend
model: (params) ->

View File

@ -1,5 +1,5 @@
@Travis.reopen
ProfileAccountsView: Travis.View.extend
ProfileAccountsView: Travis.BasicView.extend
tabBinding: 'controller.tab'
templateName: 'profile/accounts'
classAccounts: (->
@ -14,7 +14,7 @@
emptyView: Ember.View.extend
template: Ember.Handlebars.compile('<div class="loading"><span>Loading</span></div>')
itemViewClass: Travis.View.extend
itemViewClass: Travis.BasicView.extend
accountBinding: 'content'
typeBinding: 'content.type'
selectedBinding: 'account.selected'

View File

@ -1,4 +1,4 @@
Travis.reopen
AnnotationsView: Travis.View.extend
AnnotationsView: Travis.BasicView.extend
templateName: 'annotations/list'

View File

@ -1,2 +1,2 @@
Travis.reopen
AnnotationsView: Travis.View.extend
AnnotationsView: Travis.BasicView.extend

View File

@ -1,5 +1,5 @@
Travis.reopen
ApplicationView: Travis.View.extend
ApplicationView: Travis.BasicView.extend
classNames: ['application']
click: (event) ->
# TODO: this solves the case of closing menus and popups,

View File

@ -1,6 +1,6 @@
require 'views/view'
require 'views/basic'
TravisView = Travis.View
TravisView = Travis.BasicView
View = TravisView.extend()

View File

@ -10,10 +10,10 @@ View = Ember.View.extend
popupClose: ->
$('.popup').removeClass('display')
popupCloseAll: ->
if view = Travis.View.currentPopupView
if view = Ember.View.currentPopupView
view.destroy()
Travis.View.currentPopupView = null
Ember.View.currentPopupView = null
$('.popup').removeClass('display')
Travis.View = View
Travis.BasicView = View

View File

@ -1,6 +1,6 @@
colorForState = Travis.Helpers.colorForState
View = Travis.View.extend
View = Travis.BasicView.extend
classNameBindings: ['color', 'loading']
buildBinding: 'controller.build'
loadingBinding: 'controller.loading'

View File

@ -1,6 +1,6 @@
require 'views/view'
require 'views/basic'
TravisView = Travis.View
TravisView = Travis.BasicView
View = TravisView.extend
layoutName: 'layouts/dashboard'

View File

@ -1,4 +1,4 @@
View = Travis.View.extend
View = Travis.BasicView.extend
layoutName: 'layouts/simple'
Travis.FirstSyncView = View

View File

@ -1,10 +1,10 @@
@Travis.reopen
FlashView: Travis.View.extend
FlashView: Travis.BasicView.extend
classNames: ['flash']
tagName: 'ul'
templateName: 'layouts/flash'
FlashItemView: Travis.View.extend
FlashItemView: Travis.BasicView.extend
tagName: 'li'
classNameBindings: ['type']

View File

@ -1,4 +1,4 @@
View = Travis.View.extend
View = Travis.BasicView.extend
layoutName: 'layouts/simple'
Travis.InsufficientOauthPermissionsView = View

View File

@ -1,4 +1,4 @@
View = Travis.View.extend
View = Travis.BasicView.extend
tagName: 'tr'
classNameBindings: ['color']
repoBinding: 'context.repo'

View File

@ -1,5 +1,5 @@
@Travis.reopen
ReposView: Travis.View.extend
ReposView: Travis.BasicView.extend
templateName: 'repos/list'
tabBinding: 'controller.tab'

View File

@ -8,7 +8,7 @@ Log.LIMIT = 10000
config = ENV.config
Travis.reopen
LogView: Travis.View.extend
LogView: Travis.BasicView.extend
templateName: 'jobs/log'
logBinding: 'job.log'

View File

@ -1,4 +1,4 @@
View = Travis.View.extend
View = Travis.BasicView.extend
layoutName: 'layouts/home'
classNames: ['main']

View File

@ -1,5 +1,5 @@
Travis.reopen
ProfileView: Travis.View.extend
ProfileView: Travis.BasicView.extend
templateName: 'profile/show'
layoutName: 'layouts/profile'
classNames: ['profile-view']
@ -11,7 +11,7 @@ Travis.reopen
@get('account.name') || @get('account.login')
).property('account.name', 'account.login')
ProfileTabsView: Travis.View.extend
ProfileTabsView: Travis.BasicView.extend
templateName: 'profile/tabs'
tabBinding: 'controller.tab'
@ -30,7 +30,7 @@ Travis.reopen
@get('controller.account.login') == @get('controller.user.login')
).property('controller.account.login', 'controller.user.login')
HooksView: Travis.View.extend
HooksView: Travis.BasicView.extend
templateName: 'profile/tabs/hooks'
userBinding: 'controller.user'
@ -38,7 +38,7 @@ Travis.reopen
Travis.Urls.githubAdmin(@get('hook.slug'))
).property('hook.slug')
AccountsInfoView: Travis.View.extend
AccountsInfoView: Travis.BasicView.extend
templateName: 'profile/tabs/user'
userBinding: 'controller.user'

View File

@ -1,6 +1,6 @@
config = ENV.config
View = Travis.View.extend
View = Travis.BasicView.extend
templateName: 'repos/show/actions'
repoBinding: 'controller.repo'

View File

@ -1,4 +1,4 @@
View = Travis.View.extend
View = Travis.BasicView.extend
templateName: 'repos/show/tabs'
tabBinding: 'controller.tab'

View File

@ -1,4 +1,4 @@
View = Travis.View.extend
View = Travis.BasicView.extend
templateName: 'repos/show/tools'
repoBinding: 'controller.repo'

View File

@ -2,7 +2,7 @@ statusImage = Travis.Urls.statusImage
StatusImagesView = Travis.StatusImagesView
config = ENV.config
View = Travis.View.extend
View = Travis.BasicView.extend
reposBinding: 'controllers.repos'
repoBinding: 'controller.repo'
buildBinding: 'controller.build'
@ -23,11 +23,11 @@ View = Travis.View.extend
statusImages: () ->
@popupCloseAll()
view = StatusImagesView.create(toolsView: this)
Travis.View.currentPopupView = view
Travis.BasicView.currentPopupView = view
view.appendTo($('body'))
return false
ReposEmptyView: Travis.View.extend
ReposEmptyView: Travis.BasicView.extend
template: (->
if config.pro
'pro/repos/show/empty'

View File

@ -1,4 +1,4 @@
View = Travis.View.extend
View = Travis.BasicView.extend
templateName: 'repos/list/tabs'
tabBinding: 'controller.tab'
currentUserBinding: 'controller.currentUser.id'

View File

@ -7,7 +7,7 @@ View = Em.CollectionView.extend
emptyView: Ember.View.extend
template: Ember.Handlebars.compile('<div class="loading"><span>Loading</span></div>')
itemViewClass: Travis.View.extend
itemViewClass: Travis.BasicView.extend
repoBinding: 'content'
classNames: ['repo']
classNameBindings: ['color', 'selected']

View File

@ -1,3 +1,3 @@
@Travis.reopen
SigninView: Travis.View.extend
SigninView: Travis.BasicView.extend
templateName: 'auth/signin'

View File

@ -1,5 +1,5 @@
@Travis.reopen
StatsView: Travis.View.extend
StatsView: Travis.BasicView.extend
templateName: 'stats/show'
didInsertElement: ->
# @renderChart(config) for name, config of @CHARTS

View File

@ -1,5 +1,5 @@
@Travis.reopen
TopView: Travis.View.extend
TopView: Travis.BasicView.extend
tabBinding: 'controller.tab'
# hrm. how to parametrize bind-attr?

View File

@ -27,6 +27,7 @@ require 'utils/status-image-formats'
require 'utils/pusher'
require 'utils/slider'
require 'utils/tailing'
require 'utils/to-top'
require 'mixins/github-url-properties'
require 'utils/keys-map'
@ -75,7 +76,7 @@ require 'routes/repo/index'
require 'routes/repo'
require 'routes/request'
require 'routes/requests'
require 'routes/route'
require 'routes/basic'
require 'routes/settings/index'
require 'routes/settings'
require 'routes/simple-layout'
@ -180,7 +181,7 @@ require 'models/user'
require 'models/env-var'
require 'models/ssh-key'
require 'views/view'
require 'views/basic'
require 'views/accounts'
require 'views/annotation'
require 'views/application'