From c06068fc906654055339bfba24a56562b1a4ec7d Mon Sep 17 00:00:00 2001 From: Deon George Date: Thu, 16 May 2013 21:50:44 +1000 Subject: [PATCH] Modalise Login --- classes/lnApp/Controller/TemplateDefault.php | 17 +++++------------ classes/lnApp/Meta.php | 2 +- media/theme/baseadmin/css/pages/login.css | 13 +++++++++++-- views/pages/login.php | 7 +++++-- 4 files changed, 22 insertions(+), 17 deletions(-) diff --git a/classes/lnApp/Controller/TemplateDefault.php b/classes/lnApp/Controller/TemplateDefault.php index 7c12de5..8799845 100644 --- a/classes/lnApp/Controller/TemplateDefault.php +++ b/classes/lnApp/Controller/TemplateDefault.php @@ -145,25 +145,18 @@ abstract class lnApp_Controller_TemplateDefault extends Kohana_Controller_Templa $this->meta->description = sprintf('%s::%s',$this->request->controller(),$this->request->action()); // In case we have some scripting/styling, we need to get that out too + // @todo Do we come here for ajax? } elseif ($this->request->is_ajax() AND $this->response->body()) { $this->response->bodyadd(Script::factory()->render_all()); $this->response->bodyadd(Style::factory()->render_all()); // For any ajax rendered actions, we'll need to capture the content and put it in the response - // @todo Do we come here for ajax? } elseif ($this->request->is_ajax() && isset($this->template->content) && ! $this->response->body()) { - // In case there any style sheets for this render. - $this->response->bodyadd(Style::factory()); + $output = Style::factory()->render_all(); + $output .= Script::factory()->render_all(); + $output .= $this->template->content; - // Since we are ajax, we should re-render the breadcrumb - Session::instance()->set('breadcrumb',(string)BreadCrumb::factory()); - $this->response->bodyadd(Script::add(array('type'=>'stdin','data'=>'$().ready($("#ajCONTROL").load("'.URL::site('welcome/breadcrumb').'",null,function(x,s,r) {}));'))); - - // In case there any javascript for this render. - $this->response->bodyadd(Script::factory()); - - // Get the response body - $this->response->bodyadd(sprintf('
%s
',$this->template->content)); + $this->response->body($output); } // Used by our javascript to know what the SITE URL is. diff --git a/classes/lnApp/Meta.php b/classes/lnApp/Meta.php index 5f90bd6..5dcdc1f 100644 --- a/classes/lnApp/Meta.php +++ b/classes/lnApp/Meta.php @@ -33,7 +33,7 @@ abstract class lnApp_Meta { public function secure() { static $secure = NULL; - if (! $secure) + if (! $secure AND Request::current()) $secure = Request::current()->secure() ? 'https://' : 'http://'; return $secure; diff --git a/media/theme/baseadmin/css/pages/login.css b/media/theme/baseadmin/css/pages/login.css index 64185d4..e0c7c6d 100644 --- a/media/theme/baseadmin/css/pages/login.css +++ b/media/theme/baseadmin/css/pages/login.css @@ -14,7 +14,7 @@ /** Base Body Styles **/ -body{ color:#838383; font: 13px/1.7em 'Open Sans';} +body{ color:#838383; /*font: 13px/1.7em 'Open Sans';*/} .account-container { @@ -49,7 +49,7 @@ body{ color:#838383; font: 13px/1.7em 'Open Sans';} } .login-fields input { - font-family: 'Open Sans'; +/* font-family: 'Open Sans'; */ font-size: 13px; color: #8e8d8d; padding: 11px 15px 10px 50px; @@ -252,3 +252,12 @@ span.login-checkbox > input[type='checkbox']:checked + label { } } + +.modal-body .account-container { + margin-top: 10px; +} + +.modal-body .account-container h1 { + font-weight: normal; +} + diff --git a/views/pages/login.php b/views/pages/login.php index a0b9e80..390c3d1 100644 --- a/views/pages/login.php +++ b/views/pages/login.php @@ -1,6 +1,6 @@
-
+

Sign In