From 85ca63b0896be3d12a098b44b5ec0c65a5b76a6c Mon Sep 17 00:00:00 2001 From: Daniel Date: Mon, 18 Nov 2013 14:44:44 -0800 Subject: WSAT Login... --- framework/Wsat/TWsatService.php | 25 +++++- framework/Wsat/pages/TWsatLogin.page | 53 +++++++++-- framework/Wsat/pages/config.xml | 6 +- framework/Wsat/pages/layout/TWsatLayout.php | 2 +- framework/Wsat/pages/layout/TWsatLayout.tpl | 2 +- framework/Wsat/themes/PradoSoft/main.css | 133 ++++++++++++++++++++++++++++ framework/Wsat/themes/PradoSoft/style.css | 123 ------------------------- 7 files changed, 202 insertions(+), 142 deletions(-) create mode 100644 framework/Wsat/themes/PradoSoft/main.css delete mode 100644 framework/Wsat/themes/PradoSoft/style.css (limited to 'framework') diff --git a/framework/Wsat/TWsatService.php b/framework/Wsat/TWsatService.php index 009ad302..de2bbdf6 100644 --- a/framework/Wsat/TWsatService.php +++ b/framework/Wsat/TWsatService.php @@ -6,6 +6,15 @@ * @version 1.0 * @author Daniel Sampedro darthdaniel85@gmail.com * @since Prado 3.3 + * + * To use TWsatService, configure it in the application specification like following: + * + * + * + * + * + * ...and then you need to go to http://localhost/yoursite/index.php?wsat=TWsatLogin + * and generate code and configure your site. */ class TWsatService extends TPageService { @@ -13,15 +22,15 @@ class TWsatService extends TPageService { //----------------------------------------------------------------------------- public function init($config) { - if ($this->getApplication()->getMode() === TApplicationMode::Performance - || $this->getApplication()->getMode() === TApplicationMode::Normal) { + if ($this->getApplication()->getMode() === TApplicationMode::Performance || $this->getApplication()->getMode() === TApplicationMode::Normal) { throw new TInvalidOperationException("You should not use Prado WSAT in any of the production modes."); } if (empty($this->_pass)) { throw new TConfigurationException("You need to specify the Password attribute."); } $this->setDefaultPage("TWsatHome"); - parent::init($config); + $this->_startThemeManager(); + parent::init($config); } public function getBasePath() { @@ -29,6 +38,16 @@ class TWsatService extends TPageService { return realpath($basePath); } + private function _startThemeManager() { + $themeManager = new TThemeManager; + $themeManager->BasePath = "System.Wsat.themes"; + $url = Prado::getApplication()->getAssetManager()->publishFilePath(Prado::getPathOfNamespace('System.Wsat')); + $themeManager->BaseUrl = $url . DIRECTORY_SEPARATOR . "themes"; + + $themeManager->init(null); + $this->setThemeManager($themeManager); + } + public function getPassword() { return $this->_pass; } diff --git a/framework/Wsat/pages/TWsatLogin.page b/framework/Wsat/pages/TWsatLogin.page index dada4248..b256d719 100644 --- a/framework/Wsat/pages/TWsatLogin.page +++ b/framework/Wsat/pages/TWsatLogin.page @@ -1,9 +1,44 @@ - -
- - -
- -
- -
+<%@ MasterClass="" %> + + + + + + + + + + + + + + + + + + + + + diff --git a/framework/Wsat/pages/config.xml b/framework/Wsat/pages/config.xml index 832b6cc3..3ed8ea41 100644 --- a/framework/Wsat/pages/config.xml +++ b/framework/Wsat/pages/config.xml @@ -1,9 +1,5 @@ - - - - - + \ No newline at end of file diff --git a/framework/Wsat/pages/layout/TWsatLayout.php b/framework/Wsat/pages/layout/TWsatLayout.php index 30e52f44..e799125b 100644 --- a/framework/Wsat/pages/layout/TWsatLayout.php +++ b/framework/Wsat/pages/layout/TWsatLayout.php @@ -9,7 +9,7 @@ class TWsatLayout extends TTemplateControl { public function onLoad($param) { parent::onLoad($param); - $this->validateSecurity(); + $this->validateSecurity(); } private function validateSecurity() { diff --git a/framework/Wsat/pages/layout/TWsatLayout.tpl b/framework/Wsat/pages/layout/TWsatLayout.tpl index 47068a3f..37cf4183 100644 --- a/framework/Wsat/pages/layout/TWsatLayout.tpl +++ b/framework/Wsat/pages/layout/TWsatLayout.tpl @@ -23,7 +23,7 @@
 | 
 | 
- +
diff --git a/framework/Wsat/themes/PradoSoft/main.css b/framework/Wsat/themes/PradoSoft/main.css new file mode 100644 index 00000000..6c609e95 --- /dev/null +++ b/framework/Wsat/themes/PradoSoft/main.css @@ -0,0 +1,133 @@ +html, body{ + margin: 0px; + padding: 0px; + font-family: 'Lucida Grande', Verdana, Geneva, Lucida, Helvetica, Arial, sans-serif; + font-weight: normal; +} + +#header { + font-size:25px; + font-weight:bold; + color: #666; +} + +.logo{ + width: 204px; + height:100px; + background-image: url('imgs/pradologo.gif'); + background-repeat: no-repeat; + float: left; +} + +.mantisbg{ + width: 221px; + height: 100px; + background-image: url('imgs/mantisbg.jpg'); + background-repeat: no-repeat; + float: right; +} + +.mainmenu { + padding:10px; + padding-right:10px; + background:#EDEDED; + border-bottom: 1px solid #A6A6A6; + border-top: 1px solid #DCDCDC; + color:white; + text-align:right; + font-size: 10pt; +} + +.mainmenu a { + color:#737373; + text-decoration:none; +} + +.mainmenu a:hover { + color: #FF0000; +} + +#toc { + background-color: #F3F3F3; + width:220px; + padding:0px 10px 0px 10px; + float: left; +} + +#content { + padding: 1em 1em 1em 1em; + line-height: 135%; + float: left; +} + +.topic { + font-size: 9pt; + padding: 0px 0px 0px 0px; +} + +.topic div { + background-image: url('imgs/arrowdown.gif'); + background-repeat: no-repeat; + background-position: left center; + margin: 0px; + font-size: 8pt; + font-weight:bold; + color:#2A480A; + padding: 5px; + padding-left: 15px; + border-top: 1px solid #fff; + border-bottom: 1px solid #E2E2E2; +} + +.topic ul +{ + margin: 0px; + padding: 0px; +} + +.topic ul li +{ + list-style: none; + margin: 0px; + padding: 5px; + padding-left: 15px; + border-bottom: 1px dotted #D8D8D8; +} + +.topic a { + color:#4F811A; + font-size: 8pt; + text-decoration: none; +} + +.topic a:hover { + color:#2A480A; +} + +/* form styles */ +.form_row{ + margin: 10px; +} + +.in_text{ + width: 250px; +} + +.login_form{ + text-align: center; + margin: 30px auto; + border: 1px solid red; + border-radius: 5px; + padding: 10px; + width: 250px; + font-size: 11px; +} + +#footer { + clear:both; + color: gray; + font-size:8pt; + text-align:center; + margin-top:25px; + padding:10px; +} \ No newline at end of file diff --git a/framework/Wsat/themes/PradoSoft/style.css b/framework/Wsat/themes/PradoSoft/style.css deleted file mode 100644 index 5424388b..00000000 --- a/framework/Wsat/themes/PradoSoft/style.css +++ /dev/null @@ -1,123 +0,0 @@ -html, body{ - margin: 0px; - padding: 0px; - font-family: 'Lucida Grande', Verdana, Geneva, Lucida, Helvetica, Arial, sans-serif; - font-weight: normal; -} - -#header { - font-size:25px; - font-weight:bold; - color: #666; -} - -.logo{ - width: 204px; - height:100px; - background-image: url('imgs/pradologo.gif'); - background-repeat: no-repeat; - float: left; -} - -.mantisbg{ - width: 221px; - height: 100px; - background-image: url('imgs/mantisbg.jpg'); - background-repeat: no-repeat; - float: right; -} - -.mainmenu { - padding:10px; - padding-right:10px; - background:#EDEDED; - border-bottom: 1px solid #A6A6A6; - border-top: 1px solid #DCDCDC; - color:white; - text-align:right; - font-size: 10pt; -} - -.mainmenu a { - color:#737373; - text-decoration:none; -} - -.mainmenu a:hover { - color: #FF0000; -} - -#toc { - background-color: #F3F3F3; - width:220px; - padding:0px 10px 0px 10px; - float: left; -} - -#content { - padding: 1em 1em 1em 1em; - line-height: 135%; - float: left; -} - -.topic { - font-size: 9pt; - padding: 0px 0px 0px 0px; -} - -.topic div { - background-image: url('imgs/arrowdown.gif'); - background-repeat: no-repeat; - background-position: left center; - margin: 0px; - font-size: 8pt; - font-weight:bold; - color:#2A480A; - padding: 5px; - padding-left: 15px; - border-top: 1px solid #fff; - border-bottom: 1px solid #E2E2E2; -} - -.topic ul -{ - margin: 0px; - padding: 0px; -} - -.topic ul li -{ - list-style: none; - margin: 0px; - padding: 5px; - padding-left: 15px; - border-bottom: 1px dotted #D8D8D8; -} - -.topic a { - color:#4F811A; - font-size: 8pt; - text-decoration: none; -} - -.topic a:hover { - color:#2A480A; -} - -/* form styles */ -.form_row{ - margin: 10px; -} - -.in_text{ - width: 250px; -} - -#footer { - clear:both; - color: gray; - font-size:8pt; - text-align:center; - margin-top:25px; - padding:10px; -} \ No newline at end of file -- cgit v1.2.3