Split of App.Wizard into App.WizardModal and App.WizardFullScreen.

This commit is contained in:
Martin Edenhofer 2016-03-07 03:37:54 +01:00
parent 988b5848c6
commit ba2d92a15d
4 changed files with 23 additions and 33 deletions

View file

@ -677,7 +677,9 @@ class App.Sidebar extends App.Controller
# show sidebar if not shown # show sidebar if not shown
@showSidebar() @showSidebar()
class App.Wizard extends App.Controller class App.WizardModal extends App.Controller
className: 'modal fade'
constructor: -> constructor: ->
super super
@ -723,3 +725,11 @@ class App.Wizard extends App.Controller
for field, type of fields for field, type of fields
if type if type
@$(".#{screen}").find("[name=\"options::#{field}\"]").closest('.form-group').addClass('has-error') @$(".#{screen}").find("[name=\"options::#{field}\"]").closest('.form-group').addClass('has-error')
class App.WizardFullScreen extends App.WizardModal
className: 'getstarted fit'
constructor: ->
super
$('.content').addClass('hide')
$('#content').removeClass('hide')

View file

@ -436,12 +436,10 @@ class App.ChannelEmailEdit extends App.ControllerModal
@formEnable(e) @formEnable(e)
) )
class App.ChannelEmailAccountWizard extends App.Wizard class App.ChannelEmailAccountWizard extends App.WizardModal
elements: elements:
'.modal-body': 'body' '.modal-body': 'body'
className: 'modal fade'
events: events:
'submit .js-intro': 'probeBasedOnIntro' 'submit .js-intro': 'probeBasedOnIntro'
'submit .js-inbound': 'probeInbound' 'submit .js-inbound': 'probeInbound'
@ -775,12 +773,10 @@ class App.ChannelEmailAccountWizard extends App.Wizard
e.preventDefault() e.preventDefault()
@el.modal('hide') @el.modal('hide')
class App.ChannelEmailNotificationWizard extends App.Wizard class App.ChannelEmailNotificationWizard extends App.WizardModal
elements: elements:
'.modal-body': 'body' '.modal-body': 'body'
className: 'modal fade'
events: events:
'change .js-outbound [name=adapter]': 'toggleOutboundAdapter' 'change .js-outbound [name=adapter]': 'toggleOutboundAdapter'
'submit .js-outbound': 'probleOutbound' 'submit .js-outbound': 'probleOutbound'

View file

@ -1,6 +1,4 @@
class Index extends App.Wizard class Index extends App.WizardFullScreen
className: 'getstarted fit'
constructor: -> constructor: ->
super super
@ -62,8 +60,6 @@ App.Config.set( 'getting_started', Index, 'Routes' )
class AutoWizard extends App.ControllerContent class AutoWizard extends App.ControllerContent
className: 'getstarted fit'
constructor: -> constructor: ->
super super
@ -130,8 +126,7 @@ App.Config.set( 'getting_started/auto_wizard', AutoWizard, 'Routes' )
App.Config.set( 'getting_started/auto_wizard/:token', AutoWizard, 'Routes' ) App.Config.set( 'getting_started/auto_wizard/:token', AutoWizard, 'Routes' )
class Admin extends App.Wizard class Admin extends App.WizardFullScreen
className: 'getstarted fit'
events: events:
'submit form': 'submit' 'submit form': 'submit'
@ -247,8 +242,7 @@ class Admin extends App.Wizard
App.Config.set( 'getting_started/admin', Admin, 'Routes' ) App.Config.set( 'getting_started/admin', Admin, 'Routes' )
class Base extends App.Wizard class Base extends App.WizardFullScreen
className: 'getstarted fit'
elements: elements:
'.logo-preview': 'logoPreview' '.logo-preview': 'logoPreview'
@ -384,8 +378,7 @@ class Base extends App.Wizard
App.Config.set( 'getting_started/base', Base, 'Routes' ) App.Config.set( 'getting_started/base', Base, 'Routes' )
class EmailNotification extends App.Wizard class EmailNotification extends App.WizardFullScreen
className: 'getstarted fit'
events: events:
'change .js-outbound [name=adapter]': 'toggleOutboundAdapter' 'change .js-outbound [name=adapter]': 'toggleOutboundAdapter'
'submit .js-outbound': 'submit' 'submit .js-outbound': 'submit'
@ -505,9 +498,7 @@ class EmailNotification extends App.Wizard
App.Config.set( 'getting_started/email_notification', EmailNotification, 'Routes' ) App.Config.set( 'getting_started/email_notification', EmailNotification, 'Routes' )
class Channel extends App.Wizard class Channel extends App.WizardFullScreen
className: 'getstarted fit'
constructor: -> constructor: ->
super super
@ -558,9 +549,7 @@ class Channel extends App.Wizard
App.Config.set( 'getting_started/channel', Channel, 'Routes' ) App.Config.set( 'getting_started/channel', Channel, 'Routes' )
class ChannelEmailPreConfigured extends App.Wizard class ChannelEmailPreConfigured extends App.WizardFullScreen
className: 'getstarted fit'
constructor: -> constructor: ->
super super
@ -603,8 +592,7 @@ class ChannelEmailPreConfigured extends App.Wizard
App.Config.set( 'getting_started/channel/email_pre_configured', ChannelEmailPreConfigured, 'Routes' ) App.Config.set( 'getting_started/channel/email_pre_configured', ChannelEmailPreConfigured, 'Routes' )
class ChannelEmail extends App.Wizard class ChannelEmail extends App.WizardFullScreen
className: 'getstarted fit'
events: events:
'submit .js-intro': 'probeBasedOnIntro' 'submit .js-intro': 'probeBasedOnIntro'
'submit .js-inbound': 'probeInbound' 'submit .js-inbound': 'probeInbound'
@ -895,8 +883,7 @@ class ChannelEmail extends App.Wizard
App.Config.set( 'getting_started/channel/email', ChannelEmail, 'Routes' ) App.Config.set( 'getting_started/channel/email', ChannelEmail, 'Routes' )
class Agent extends App.Wizard class Agent extends App.WizardFullScreen
className: 'getstarted fit'
events: events:
'submit form': 'submit' 'submit form': 'submit'
@ -995,9 +982,7 @@ class Agent extends App.Wizard
App.Config.set( 'getting_started/agents', Agent, 'Routes' ) App.Config.set( 'getting_started/agents', Agent, 'Routes' )
class Channel extends App.Wizard class Channel extends App.WizardFullScreen
className: 'getstarted fit'
constructor: -> constructor: ->
super super

View file

@ -1,5 +1,4 @@
class App.InviteUser extends App.Wizard class App.InviteUser extends App.WizardModal
className: 'modal fade'
events: events:
'click .js-close': 'hide' 'click .js-close': 'hide'
'submit .js-user': 'submit' 'submit .js-user': 'submit'