aboutsummaryrefslogtreecommitdiffstats
path: root/Source/SPBundleHTMLOutputController.m
diff options
context:
space:
mode:
Diffstat (limited to 'Source/SPBundleHTMLOutputController.m')
-rw-r--r--Source/SPBundleHTMLOutputController.m25
1 files changed, 17 insertions, 8 deletions
diff --git a/Source/SPBundleHTMLOutputController.m b/Source/SPBundleHTMLOutputController.m
index 1e002ab8..a632a51a 100644
--- a/Source/SPBundleHTMLOutputController.m
+++ b/Source/SPBundleHTMLOutputController.m
@@ -304,19 +304,28 @@
- (void)webView:(WebView *)sender runJavaScriptAlertPanelWithMessage:(NSString *)message initiatedByFrame:(WebFrame *)frame
{
- SPBeginAlertSheet(NSLocalizedString(@"JavaScript Alert", @"javascript alert"), NSLocalizedString(@"OK", @"OK button"), nil, nil, [self window], self, nil, nil,
- [message description]);
+ NSAlert *alert = [[NSAlert alloc] init];
+ [alert addButtonWithTitle:NSLocalizedString(@"OK", @"OK button")];
+ [alert setInformativeText:(message)?:@""];
+ [alert setMessageText:@"JavaScript"];
+ [alert runModal];
+ [alert release];
}
- (BOOL)webView:(WebView *)sender runJavaScriptConfirmPanelWithMessage:(NSString *)message initiatedByFrame:(WebFrame *)frame
{
- NSLog(@"confirm");
- return NO;
-}
+ NSAlert *alert = [[NSAlert alloc] init];
+ [alert addButtonWithTitle:NSLocalizedString(@"OK", @"OK button")];
+ [alert addButtonWithTitle:NSLocalizedString(@"Cancel", @"cancel button")];
+ [alert setInformativeText:(message)?:@""];
+ [alert setMessageText:@"JavaScript"];
-- (NSString *)webView:(WebView *)sender runJavaScriptTextInputPanelWithPrompt:(NSString *)prompt defaultText:(NSString *)defaultText initiatedByFrame:(WebFrame *)frame
-{
- return @"be patient";
+ NSUInteger returnCode = [alert runModal];
+
+ [alert release];
+
+ if(returnCode == NSAlertFirstButtonReturn) return YES;
+ return NO;
}
- (void)webView:(WebView *)sender windowScriptObjectAvailable: (WebScriptObject *)windowScriptObject