diff options
-rw-r--r-- | .gitattributes | 3 | ||||
-rw-r--r-- | buildscripts/jsbuilder/build.php | 23 | ||||
-rw-r--r-- | framework/Web/Javascripts/extended/event.js | 7 | ||||
-rw-r--r-- | framework/Web/Javascripts/js/prado.js | 3 | ||||
-rw-r--r-- | tests/FunctionalTests/tickets/protected/pages/Ticket28.page | 5 | ||||
-rw-r--r-- | tests/FunctionalTests/tickets/protected/pages/Ticket28.php | 12 | ||||
-rw-r--r-- | tests/FunctionalTests/tickets/tests/Ticket28TestCase.php | 15 |
7 files changed, 48 insertions, 20 deletions
diff --git a/.gitattributes b/.gitattributes index 6d0c51dd..0495890b 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1052,6 +1052,8 @@ tests/FunctionalTests/tickets/protected/pages/Ticket191.php -text tests/FunctionalTests/tickets/protected/pages/Ticket21.page -text tests/FunctionalTests/tickets/protected/pages/Ticket21.php -text tests/FunctionalTests/tickets/protected/pages/Ticket27.page -text +tests/FunctionalTests/tickets/protected/pages/Ticket28.page -text +tests/FunctionalTests/tickets/protected/pages/Ticket28.php -text tests/FunctionalTests/tickets/protected/pages/Ticket54.page -text tests/FunctionalTests/tickets/protected/pages/Ticket54Master.php -text tests/FunctionalTests/tickets/protected/pages/Ticket54Master.tpl -text @@ -1066,6 +1068,7 @@ tests/FunctionalTests/tickets/tests/Ticket121TestCase.php -text tests/FunctionalTests/tickets/tests/Ticket191TestCase.php -text tests/FunctionalTests/tickets/tests/Ticket21TestCase.php -text tests/FunctionalTests/tickets/tests/Ticket27TestCase.php -text +tests/FunctionalTests/tickets/tests/Ticket28TestCase.php -text tests/FunctionalTests/tickets/tests/Ticket54TestCase.php -text tests/FunctionalTests/tickets/tests/Ticket72TestCase.php -text tests/FunctionalTests/tickets/tests/Ticket93TestCase.php -text diff --git a/buildscripts/jsbuilder/build.php b/buildscripts/jsbuilder/build.php index 68bbe427..654dc62b 100644 --- a/buildscripts/jsbuilder/build.php +++ b/buildscripts/jsbuilder/build.php @@ -22,11 +22,11 @@ /**
* The root directory for storing all source js files
*/
-define('SOURCE_DIR',realpath(dirname(__FILE__).'/../../framework/Web/JavaScripts'));
+define('SOURCE_DIR',realpath(dirname(__FILE__).'/../../framework/Web/Javascripts'));
/**
* The directory for storing compressed js files
*/
-define('TARGET_DIR',realpath(dirname(__FILE__).'/../../framework/Web/JavaScripts/js'));
+define('TARGET_DIR',realpath(dirname(__FILE__).'/../../framework/Web/Javascripts/js'));
/**
* Location of the perl JS doc generator.
*/
@@ -147,20 +147,20 @@ $builds = 0; /**
* loop through all target files and build them one by one
*/
-foreach($libraries as $libFile => $sourceFiles)
+foreach($libraries as $jsFile => $sourceFiles)
{
- if(!empty($requestedLibs) && !in_array($libFile,$requestedLibs))
+ if(!empty($requestedLibs) && !in_array($jsFile,$requestedLibs))
continue;
- $libFile=TARGET_DIR.'/'.$libFile;
- echo "\nBuilding $libFile...\n";
+ $libFile=TARGET_DIR.'/'.$jsFile;
+ echo "\nBuilding $jsFile...\n";
$contents='';
- foreach($sourceFiles as $sourceFile)
+ foreach($sourceFiles as $sourceJsFile)
{
- $sourceFile=SOURCE_DIR.'/'.$sourceFile;
+ $sourceFile=SOURCE_DIR.'/'.$sourceJsFile;
if(!is_file($sourceFile))
echo "Source file not found: $sourceFile\n";
- echo "...adding $sourceFile\n";
+ echo "...adding $sourceJsFile\n";
$contents.=file_get_contents($sourceFile)."\n\n";
}
$tempFile=$libFile.'.tmp';
@@ -169,10 +169,11 @@ foreach($libraries as $libFile => $sourceFiles) $jsMin -> minify();
unset($jsMin);
@unlink($tempFile);
- echo "Saving file {$libFile}\n";
+ echo "Saving file {$jsFile}\n";
$builds++;
}
-if(isset($argv[1]) && preg_match('/doc*/', $argv[1]))
+
+if(isset($argv[1]) && preg_match('/(doc)+/', $argv[1]))
{
$files = "";
foreach($libraries as $lib)
diff --git a/framework/Web/Javascripts/extended/event.js b/framework/Web/Javascripts/extended/event.js index 29a8d5aa..4fd041d8 100644 --- a/framework/Web/Javascripts/extended/event.js +++ b/framework/Web/Javascripts/extended/event.js @@ -64,6 +64,7 @@ Object.extend(Event, * <tt>element</tt>. Only HTMLEvent and MouseEvent can be
* dispatched, keyboard events or UIEvent can not be dispatch
* via javascript consistently.
+ * For the "submit" event the submit() method is called.
* @param {Object} element id string or a DOM element.
* @param {String} event type to dispatch.
*/
@@ -86,12 +87,6 @@ Object.extend(Event, document.defaultView, 1, 0, 0, 0, 0, false,
false, false, false, 0, null);
}
- else
- {
- if(typeof(Logger) != "undefined")
- Logger.error("undefined event", type);
- return;
- }
element.dispatchEvent(event);
}
else if(document.createEventObject)
diff --git a/framework/Web/Javascripts/js/prado.js b/framework/Web/Javascripts/js/prado.js index 2cf85291..7e2fd068 100644 --- a/framework/Web/Javascripts/js/prado.js +++ b/framework/Web/Javascripts/js/prado.js @@ -129,9 +129,6 @@ return element.submit();if(document.createEvent) {var event=document.createEvent('HTMLEvents');event.initEvent(type,true,true);} else if(Event.isMouseEvent(type)) {var event=document.createEvent('MouseEvents');event.initMouseEvent(type,true,true,document.defaultView,1,0,0,0,0,false,false,false,false,0,null);} -else -{if(typeof(Logger)!="undefined") -Logger.error("undefined event",type);return;} element.dispatchEvent(event);} else if(document.createEventObject) {var evObj=document.createEventObject();element.fireEvent('on'+type,evObj);} diff --git a/tests/FunctionalTests/tickets/protected/pages/Ticket28.page b/tests/FunctionalTests/tickets/protected/pages/Ticket28.page new file mode 100644 index 00000000..1d0002bb --- /dev/null +++ b/tests/FunctionalTests/tickets/protected/pages/Ticket28.page @@ -0,0 +1,5 @@ +<com:TContent ID="Content"> + <h2>Safari LinkButton Test</h2> + <com:TLinkButton ID="linkButton1" Text="Click Me" OnClick="linkButton1_Clicked" /> + <com:TLabel ID="label1" Text="Label 1" /> +</com:TContent>
\ No newline at end of file diff --git a/tests/FunctionalTests/tickets/protected/pages/Ticket28.php b/tests/FunctionalTests/tickets/protected/pages/Ticket28.php new file mode 100644 index 00000000..7980119e --- /dev/null +++ b/tests/FunctionalTests/tickets/protected/pages/Ticket28.php @@ -0,0 +1,12 @@ +<?php + +class Ticket28 extends TPage +{ + function linkButton1_Clicked() + { + $this->label1->setText("Link Button 1 Clicked!"); + } +} + + +?>
\ No newline at end of file diff --git a/tests/FunctionalTests/tickets/tests/Ticket28TestCase.php b/tests/FunctionalTests/tickets/tests/Ticket28TestCase.php new file mode 100644 index 00000000..960dd2d8 --- /dev/null +++ b/tests/FunctionalTests/tickets/tests/Ticket28TestCase.php @@ -0,0 +1,15 @@ +<?php + +class Ticket28TestCase extends SeleniumTestCase +{ + + function test() + { + $this->open('tickets/index.php?page=Ticket28'); + $this->assertTextPresent('Label 1'); + $this->clickAndWait('link=Click Me'); + $this->assertTextPresent('Link Button 1 Clicked!'); + } +} + +?>
\ No newline at end of file |