From 7ed9a243ed6105307b086ce0b11c789181fdb6f4 Mon Sep 17 00:00:00 2001 From: Martin Edenhofer Date: Sat, 19 Jul 2014 01:06:56 +0200 Subject: [PATCH] Move nav, content and content_permanent to same level. --- .../app/controllers/_application_controller.js.coffee | 7 ++++--- app/assets/javascripts/app/controllers/login.js.coffee | 2 -- .../javascripts/app/controllers/navigation.js.coffee | 2 +- .../app/lib/app_post/interface_handle.js.coffee | 4 ++-- .../app/lib/app_post/task_manager.js.coffee | 10 +++------- app/assets/javascripts/app/views/login.jst.eco | 8 ++++---- app/assets/stylesheets/zzz.css.erb | 1 + app/views/init/index.html.erb | 4 +--- 8 files changed, 16 insertions(+), 22 deletions(-) diff --git a/app/assets/javascripts/app/controllers/_application_controller.js.coffee b/app/assets/javascripts/app/controllers/_application_controller.js.coffee index 63a6e1c23..d2f16260f 100644 --- a/app/assets/javascripts/app/controllers/_application_controller.js.coffee +++ b/app/assets/javascripts/app/controllers/_application_controller.js.coffee @@ -452,13 +452,14 @@ class App.Controller extends Spine.Controller class App.ControllerPermanent extends App.Controller constructor: -> super - $('#content_permanent').show() - @el.find('#content').empty() + $('.content').hide() + class App.ControllerContent extends App.Controller constructor: -> super - $('#content_permanent').hide() + $('.content').hide() + $('#content').show() class App.ControllerModal extends App.Controller className: 'modal fade', diff --git a/app/assets/javascripts/app/controllers/login.js.coffee b/app/assets/javascripts/app/controllers/login.js.coffee index e9e7e198b..29dba271a 100644 --- a/app/assets/javascripts/app/controllers/login.js.coffee +++ b/app/assets/javascripts/app/controllers/login.js.coffee @@ -1,6 +1,4 @@ class Index extends App.ControllerContent - className: 'login fit' - events: 'submit #login': 'login' diff --git a/app/assets/javascripts/app/controllers/navigation.js.coffee b/app/assets/javascripts/app/controllers/navigation.js.coffee index 1303416e1..d67467a86 100644 --- a/app/assets/javascripts/app/controllers/navigation.js.coffee +++ b/app/assets/javascripts/app/controllers/navigation.js.coffee @@ -1,5 +1,5 @@ class App.Navigation extends App.Controller - className: 'navigation flex vertical' + className: 'navigation vertical' constructor: -> super diff --git a/app/assets/javascripts/app/lib/app_post/interface_handle.js.coffee b/app/assets/javascripts/app/lib/app_post/interface_handle.js.coffee index a9804ad2d..a11b81903 100644 --- a/app/assets/javascripts/app/lib/app_post/interface_handle.js.coffee +++ b/app/assets/javascripts/app/lib/app_post/interface_handle.js.coffee @@ -22,7 +22,7 @@ class App.Run extends App.Controller App.Auth.loginCheck() # start navbars - @setupWidget( 'Navigations', 'nav', @el.find('#nav') ) + @setupWidget( 'Navigations', 'nav', @el ) # start widgets @setupWidget( 'Widgets', 'widget', @el ) @@ -47,7 +47,7 @@ class App.Run extends App.Controller App.Event.trigger( event + ':ready') class App.Content extends App.Controller - className: 'content flex horizontal stretch' + className: 'content flex' constructor: -> super diff --git a/app/assets/javascripts/app/lib/app_post/task_manager.js.coffee b/app/assets/javascripts/app/lib/app_post/task_manager.js.coffee index b8092aee0..87de8bb71 100644 --- a/app/assets/javascripts/app/lib/app_post/task_manager.js.coffee +++ b/app/assets/javascripts/app/lib/app_post/task_manager.js.coffee @@ -145,22 +145,18 @@ class _taskManagerSingleton extends App.Controller ui.allTasks[taskPosition] = task ) - # create div for permanent content - if !$("#content_permanent")[0] - $('#app').append('
') - # empty static content if task is shown if active @activeTask = key $('#content').empty() # hide all tasks - $('.content_permanent').hide() - $('.content_permanent').removeClass('active') + $('.content').hide() + $('.content').removeClass('active') # create div for task if not exists if !$("#content_permanent_#{key}")[0] - $('#content_permanent').append('
') + $('#app').append('
') # set task to shown and active if @activeTask is key diff --git a/app/assets/javascripts/app/views/login.jst.eco b/app/assets/javascripts/app/views/login.jst.eco index 0f7de87ef..3f3923c5e 100644 --- a/app/assets/javascripts/app/views/login.jst.eco +++ b/app/assets/javascripts/app/views/login.jst.eco @@ -1,5 +1,5 @@ -
-

Login with zeughaus.znuny.com:

+