summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.gitignore72
-rw-r--r--framework/Web/Javascripts/packages.php7
-rw-r--r--framework/Web/Javascripts/source/prado/activecontrols/ajax3.js45
-rw-r--r--framework/Web/Javascripts/source/prado/prado.js2
-rw-r--r--framework/Wsat/pages/TWsatLogin.php15
-rw-r--r--framework/Wsat/pages/TWsatScaffolding.php28
-rw-r--r--framework/Wsat/pages/layout/TWsatLayout.php62
-rw-r--r--framework/Wsat/pages/layout/TWsatLayout.tpl104
-rw-r--r--framework/Wsat/themes/.htaccess2
-rw-r--r--framework/Wsat/themes/PradoSoft/main.css18
-rwxr-xr-xtests/FunctionalTests/active-controls/protected/pages/ActivePanelTest.page12
11 files changed, 171 insertions, 196 deletions
diff --git a/.gitignore b/.gitignore
index f779bdd3..d1850cff 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,37 +1,37 @@
-/.idea
-atlassian-ide-plugin.xml
-/.project
-/assets
-/.settings
-/.cache
-/build
-/vendor
-/composer.lock
-/.cache
-buildscripts/chmbuilder/classes/Data/classes.data
-buildscripts/classtree/Configuration
-buildscripts/classtree/PRADO.mxi
-buildscripts/texbuilder/quickstart/*.aux
-buildscripts/texbuilder/quickstart/*.png
-buildscripts/texbuilder/quickstart/*.tex
-buildscripts/texbuilder/quickstart/quickstart.log
-buildscripts/texbuilder/quickstart/quickstart.out
-buildscripts/texbuilder/quickstart/quickstart.toc
-demos/quickstart/.cache
-demos/quickstart/.project
-demos/quickstart/.settings
-demos/quickstart/index_pl.php
-tests/FunctionalTests/results.dat
-tests/unit/Data/db/test.db
-
-# Composer stuff
-vendor/*
-bin/phpunit
-bin/phing
-bin/apigen.php
-bin/coveralls
-bin/dbunit.php
-
-#OSX
-.DS_Store
+/.idea
+atlassian-ide-plugin.xml
+/.project
+/assets
+/.settings
+/.cache
+/build
+/vendor
+/composer.lock
+/.cache
+buildscripts/chmbuilder/classes/Data/classes.data
+buildscripts/classtree/Configuration
+buildscripts/classtree/PRADO.mxi
+buildscripts/texbuilder/quickstart/*.aux
+buildscripts/texbuilder/quickstart/*.png
+buildscripts/texbuilder/quickstart/*.tex
+buildscripts/texbuilder/quickstart/quickstart.log
+buildscripts/texbuilder/quickstart/quickstart.out
+buildscripts/texbuilder/quickstart/quickstart.toc
+demos/quickstart/.cache
+demos/quickstart/.project
+demos/quickstart/.settings
+demos/quickstart/index_pl.php
+tests/FunctionalTests/results.dat
+tests/unit/Data/db/test.db
+
+# Composer stuff
+vendor/*
+bin/phpunit
+bin/phing
+bin/apigen.php
+bin/coveralls
+bin/dbunit.php
+
+#OSX
+.DS_Store
/nbproject/private/ \ No newline at end of file
diff --git a/framework/Web/Javascripts/packages.php b/framework/Web/Javascripts/packages.php
index bc3bae1e..b7b424f2 100644
--- a/framework/Web/Javascripts/packages.php
+++ b/framework/Web/Javascripts/packages.php
@@ -12,16 +12,13 @@ $packages = array(
'prototype' => array(
PROTOTYPE_DIR.'/prototype.js',
SCRIPTACULOUS_DIR.'/builder.js',
+ SCRIPTACULOUS_DIR.'/effects.js'
),
'prado' => array(
'prado/prado.js',
'prado/controls/controls.js'
),
- 'effects' => array(
- SCRIPTACULOUS_DIR.'/effects.js'
- ),
-
'logger' => array(
'prado/logger/logger.js',
),
@@ -106,7 +103,7 @@ $packages = array(
//package names and their dependencies
$dependencies = array(
- //'prototype' => array('prototype'),
+ 'prototype' => array('prototype'),
'jquery' => array('jquery'),
'prado' => array('jquery', 'prado'),
'validator' => array('jquery', 'prado', 'validator'),
diff --git a/framework/Web/Javascripts/source/prado/activecontrols/ajax3.js b/framework/Web/Javascripts/source/prado/activecontrols/ajax3.js
index e4f4a7fd..8839c1ae 100644
--- a/framework/Web/Javascripts/source/prado/activecontrols/ajax3.js
+++ b/framework/Web/Javascripts/source/prado/activecontrols/ajax3.js
@@ -75,7 +75,7 @@ Prado.CallbackRequest = jQuery.klass(Prado.PostBack,
options : {},
data : '',
- initialize: function(target, options)
+ initialize: function(id, options)
{
this.options = {
RequestTimeOut : 30000, // 30 second timeout.
@@ -811,30 +811,29 @@ jQuery(function()
// }
// });
-// /**
-// * Create a new callback request using default settings.
-// * @param string callback handler unique ID.
-// * @param mixed parameter to pass to callback handler on the server side.
-// * @param function client side onSuccess event handler.
-// * @param object additional request options.
-// * @return boolean always false.
-// */
-// Prado.Callback = function(UniqueID, parameter, onSuccess, options)
-// {
-// var callback =
-// {
-// 'CallbackParameter' : parameter || '',
-// 'onSuccess' : onSuccess || Prototype.emptyFunction
-// };
-
-// Object.extend(callback, options || {});
-
-// var request = new Prado.CallbackRequest(UniqueID, callback);
-// request.dispatch();
-// return false;
-// };
+/**
+ * Create a new callback request using default settings.
+ * @param string callback handler unique ID.
+ * @param mixed parameter to pass to callback handler on the server side.
+ * @param function client side onSuccess event handler.
+ * @param object additional request options.
+ * @return boolean always false.
+ */
+Prado.Callback = function(UniqueID, parameter, onSuccess, options)
+{
+ var callback =
+ {
+ 'EventTarget' : UniqueID || '',
+ 'CallbackParameter' : parameter || '',
+ 'onSuccess' : onSuccess || jQuery.noop()
+ };
+ jQuery.extend(callback, options || {});
+ var request = new Prado.CallbackRequest(UniqueID, callback);
+ request.dispatch();
+ return false;
+};
/**
* Asset manager classes for lazy loading of scripts and stylesheets
diff --git a/framework/Web/Javascripts/source/prado/prado.js b/framework/Web/Javascripts/source/prado/prado.js
index 25550bca..96f439b3 100644
--- a/framework/Web/Javascripts/source/prado/prado.js
+++ b/framework/Web/Javascripts/source/prado/prado.js
@@ -388,7 +388,7 @@ Prado.Element =
try
{
eval("(func = function(event){"+value+"})");
- el[attribute] = func;
+ el.get(0)[attribute] = func;
}
catch(e)
{
diff --git a/framework/Wsat/pages/TWsatLogin.php b/framework/Wsat/pages/TWsatLogin.php
index 0bbdc53f..69f8cc39 100644
--- a/framework/Wsat/pages/TWsatLogin.php
+++ b/framework/Wsat/pages/TWsatLogin.php
@@ -8,8 +8,11 @@
class TWsatLogin extends TPage {
public function login() {
- if ($this->IsValid) {
- $this->Session["wsat_password"] = $this->getService()->getPassword();
+ $config_pass = $this->getService()->getPassword();
+ $user_pass = $this->password->Text;
+
+ if ($user_pass === $config_pass) {
+ $this->Session["wsat_password"] = $config_pass;
$authManager = $this->Application->getModule('auth');
$url = $authManager->ReturnUrl;
@@ -17,15 +20,11 @@ class TWsatLogin extends TPage {
$url = $this->Service->constructUrl('TWsatHome');
}
$this->Response->redirect($url);
+ } else {
+ echo "user or pass wrong";
}
}
- public function validatePassword($sender, $param) {
- $config_pass = $this->getService()->getPassword();
- $user_pass = $this->password->Text;
- $param->IsValid = $user_pass === $config_pass;
- }
-
}
?> \ No newline at end of file
diff --git a/framework/Wsat/pages/TWsatScaffolding.php b/framework/Wsat/pages/TWsatScaffolding.php
index afa00273..ce5860d3 100644
--- a/framework/Wsat/pages/TWsatScaffolding.php
+++ b/framework/Wsat/pages/TWsatScaffolding.php
@@ -1,15 +1,15 @@
-<?php
-
-/**
- * Description of Inicio
- *
- * @author daniels
- */
-Prado::using("System.Wsat.TWsatARGenerator");
-
-class TWsatScaffolding extends TPage {
-
-
-}
-
+<?php
+
+/**
+ * Description of Inicio
+ *
+ * @author daniels
+ */
+Prado::using("System.Wsat.TWsatARGenerator");
+
+class TWsatScaffolding extends TPage {
+
+
+}
+
?> \ No newline at end of file
diff --git a/framework/Wsat/pages/layout/TWsatLayout.php b/framework/Wsat/pages/layout/TWsatLayout.php
index e799125b..ce337265 100644
--- a/framework/Wsat/pages/layout/TWsatLayout.php
+++ b/framework/Wsat/pages/layout/TWsatLayout.php
@@ -1,32 +1,32 @@
-<?php
-
-/**
- * Description of MainLayout
- *
- * @author daniels
- */
-class TWsatLayout extends TTemplateControl {
-
- public function onLoad($param) {
- parent::onLoad($param);
- $this->validateSecurity();
- }
-
- private function validateSecurity() {
- if ($this->Session["wsat_password"] !== $this->getService()->getPassword()) {
- if (!$this->getPage() instanceof TWsatLogin) {
- $url = $this->Service->constructUrl('TWsatLogin');
- $this->Response->redirect($url);
- }
- }
- }
-
- public function logout() {
- $this->Session["wsat_password"] = "";
- $url = $this->Service->constructUrl('TWsatLogin');
- $this->Response->redirect($url);
- }
-
-}
-
+<?php
+
+/**
+ * Description of MainLayout
+ *
+ * @author daniels
+ */
+class TWsatLayout extends TTemplateControl {
+
+ public function onLoad($param) {
+ parent::onLoad($param);
+ $this->validateSecurity();
+ }
+
+ private function validateSecurity() {
+ if ($this->Session["wsat_password"] !== $this->getService()->getPassword()) {
+ if (!$this->getPage() instanceof TWsatLogin) {
+ $url = $this->Service->constructUrl('TWsatLogin');
+ $this->Response->redirect($url);
+ }
+ }
+ }
+
+ public function logout() {
+ $this->Session["wsat_password"] = "";
+ $url = $this->Service->constructUrl('TWsatLogin');
+ $this->Response->redirect($url);
+ }
+
+}
+
?> \ No newline at end of file
diff --git a/framework/Wsat/pages/layout/TWsatLayout.tpl b/framework/Wsat/pages/layout/TWsatLayout.tpl
index 37cf4183..d91ff333 100644
--- a/framework/Wsat/pages/layout/TWsatLayout.tpl
+++ b/framework/Wsat/pages/layout/TWsatLayout.tpl
@@ -1,53 +1,53 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
- <com:THead Title="PRADO - WSAT">
- <com:TMetaTag HttpEquiv="Content-Type" Content="text/html; charset=utf-8" />
- <com:TMetaTag HttpEquiv="Content-Language" Content="en" />
- </com:THead>
-
- <body>
- <com:TForm>
-
- <div id="header">
- <a href="<%= $this->Service->DefaultPageUrl %>">
- <div class="logo"></div>
- <div style="float: left; margin-top: 17px">PRADO <br /> Web Site Administration Tool</div>
- </a>
- <div class="mantisbg"></div>
- <div style="clear: both"></div>
- </div>
-
- <div class="mainmenu">
- <div style="float: right"><com:TLinkButton Text="Logout" OnClick="logout" /></div>
- <div style="float: right"><com:THyperLink NavigateUrl="http://www.pradosoft.com/" Text="PradoSoft.com" Target="_blank" />&nbsp;|&nbsp;</div>
- <div style="float: right"><com:THyperLink NavigateUrl="<%= $this->Service->DefaultPageUrl %>" Text="Web App" Target="_blank" />&nbsp;|&nbsp;</div>
- <div style="float: right"><com:THyperLink NavigateUrl="http://www.pradosoft.com/forum/" Text="Help" Target="_blank" />&nbsp;|&nbsp;</div>
- <div style="clear: both"></div>
- </div>
-
- <div id="central_div">
- <div id="toc">
- <div class="topic">
- <div>Code Generation</div>
- <ul>
- <li><com:THyperLink NavigateUrl="<%= $this->Service->constructUrl('TWsatGenerateAR') %>" Text="AR Classes" /></li>
- <li><com:THyperLink NavigateUrl="<%= $this->Service->constructUrl('TWsatScaffolding') %>" Text="Scaffolding" /></li>
- </ul>
- </div>
- </div>
-
- <div id="content">
- <com:TContentPlaceHolder ID="Content" />
- </div>
-
- <div style="clear: both"></div>
- </div>
-
- <div id="footer">
- Copyright &copy; 2005-<%= date('Y') %> <a href="http://www.pradosoft.com">PradoSoft</a>.
- <br/><br/>
- <%= Prado::poweredByPrado() %>
- </div>
- </com:TForm>
- </body>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <com:THead Title="PRADO - WSAT">
+ <com:TMetaTag HttpEquiv="Content-Type" Content="text/html; charset=utf-8" />
+ <com:TMetaTag HttpEquiv="Content-Language" Content="en" />
+ </com:THead>
+
+ <body>
+ <com:TForm>
+
+ <div id="header">
+ <a href="<%= $this->Service->DefaultPageUrl %>">
+ <div class="logo"></div>
+ <div style="float: left; margin-top: 17px">PRADO <br /> Web Site Administration Tool</div>
+ </a>
+ <div class="mantisbg"></div>
+ <div style="clear: both"></div>
+ </div>
+
+ <div class="mainmenu">
+ <div style="float: right"><com:TLinkButton Text="Logout" OnClick="logout" /></div>
+ <div style="float: right"><com:THyperLink NavigateUrl="http://www.pradosoft.com/" Text="PradoSoft.com" Target="_blank" />&nbsp;|&nbsp;</div>
+ <div style="float: right"><com:THyperLink NavigateUrl="<%= $this->Service->DefaultPageUrl %>" Text="Web App" Target="_blank" />&nbsp;|&nbsp;</div>
+ <div style="float: right"><com:THyperLink NavigateUrl="http://www.pradosoft.com/forum/" Text="Help" Target="_blank" />&nbsp;|&nbsp;</div>
+ <div style="clear: both"></div>
+ </div>
+
+ <div id="central_div">
+ <div id="toc">
+ <div class="topic">
+ <div>Code Generation</div>
+ <ul>
+ <li><com:THyperLink NavigateUrl="<%= $this->Service->constructUrl('TWsatGenerateAR') %>" Text="AR Classes" /></li>
+ <li><com:THyperLink NavigateUrl="<%= $this->Service->constructUrl('TWsatScaffolding') %>" Text="Scaffolding" /></li>
+ </ul>
+ </div>
+ </div>
+
+ <div id="content">
+ <com:TContentPlaceHolder ID="Content" />
+ </div>
+
+ <div style="clear: both"></div>
+ </div>
+
+ <div id="footer">
+ Copyright &copy; 2005-<%= date('Y') %> <a href="http://www.pradosoft.com">PradoSoft</a>.
+ <br/><br/>
+ <%= Prado::poweredByPrado() %>
+ </div>
+ </com:TForm>
+ </body>
</html> \ No newline at end of file
diff --git a/framework/Wsat/themes/.htaccess b/framework/Wsat/themes/.htaccess
index 1caf5e97..f7661d04 100644
--- a/framework/Wsat/themes/.htaccess
+++ b/framework/Wsat/themes/.htaccess
@@ -1 +1 @@
-allow from all
+allow from all
diff --git a/framework/Wsat/themes/PradoSoft/main.css b/framework/Wsat/themes/PradoSoft/main.css
index c35a87d8..ed36c238 100644
--- a/framework/Wsat/themes/PradoSoft/main.css
+++ b/framework/Wsat/themes/PradoSoft/main.css
@@ -123,24 +123,6 @@ html, body{
font-size: 11px;
}
-.success_panel{
- background-color: #C5FBBD;
- border: 1px solid #76C376;
- padding: 10px;
- margin: 10px 0;
- border-radius: 5px;
- text-align: center;
-}
-
-.exception_panel{
- background-color: #ff6666;
- border: 1px solid red;
- padding: 10px;
- margin: 10px 0;
- border-radius: 5px;
- text-align: center;
-}
-
#footer {
clear:both;
color: gray;
diff --git a/tests/FunctionalTests/active-controls/protected/pages/ActivePanelTest.page b/tests/FunctionalTests/active-controls/protected/pages/ActivePanelTest.page
index 7ab4bab9..13133a32 100755
--- a/tests/FunctionalTests/active-controls/protected/pages/ActivePanelTest.page
+++ b/tests/FunctionalTests/active-controls/protected/pages/ActivePanelTest.page
@@ -10,13 +10,11 @@
Click Me!
</div>
<script type="text/javascript">
- Event.OnLoad(function()
- {
- Event.observe($("div1"), "click", function()
- {
- Prado.Callback("<%= $this->callback1->UniqueID %>")
- })
- })
+ jQuery( document ).ready(function() {
+ jQuery("#div1").click(function() {
+ Prado.Callback("<%= $this->callback1->UniqueID %>");
+ });
+ });
</script>
<com:TJavascriptLogger />
</com:TForm> \ No newline at end of file