Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Update search popup help window (now a jQuery Dialog, and opens a new…

… window when javascript is disabled) (report #67)
  • Loading branch information...
commit 426e9a419bf73a0800035fc9d6b9da36e3a06fcb 1 parent 23b4a20
@haraldpdl haraldpdl authored
Showing with 31 additions and 13 deletions.
  1. +16 −1 catalog/advanced_search.php
  2. +15 −12 catalog/popup_search_help.php
View
17 catalog/advanced_search.php
@@ -130,10 +130,25 @@ function popupWindow(url) {
<br />
<div>
- <span><?php echo '<a href="javascript:popupWindow(\'' . tep_href_link(FILENAME_POPUP_SEARCH_HELP) . '\')">' . TEXT_SEARCH_HELP_LINK . '</a>'; ?></span>
+ <span><?php echo '<a href="' . tep_href_link(FILENAME_POPUP_SEARCH_HELP) . '" target="_blank" onclick="$(\'#helpSearch\').dialog(\'open\'); return false;">' . TEXT_SEARCH_HELP_LINK . '</a>'; ?></span>
<span style="float: right;"><?php echo tep_draw_button(IMAGE_BUTTON_SEARCH, 'search', null, 'primary'); ?></span>
</div>
+ <div id="helpSearch" title="<?php echo HEADING_SEARCH_HELP; ?>">
+ <p><?php echo TEXT_SEARCH_HELP; ?></p>
+ </div>
+
+<script type="text/javascript">
+$('#helpSearch').dialog({
+ autoOpen: false,
+ buttons: {
+ Ok: function() {
+ $(this).dialog('close');
+ }
+ }
+});
+</script>
+
<br />
<table border="0" width="100%" cellspacing="0" cellpadding="2">
View
27 catalog/popup_search_help.php
@@ -25,19 +25,22 @@
<link rel="stylesheet" type="text/css" href="stylesheet.css">
</head>
<body>
-<?php
- $info_box_contents = array();
- $info_box_contents[] = array('text' => HEADING_SEARCH_HELP);
-
- new infoBoxHeading($info_box_contents, true, true);
-
- $info_box_contents = array();
- $info_box_contents[] = array('text' => TEXT_SEARCH_HELP);
-
- new infoBox($info_box_contents);
-?>
-<p class="smallText" align="right"><?php echo '<a href="javascript:window.close()">' . TEXT_CLOSE_WINDOW . '</a>'; ?></p>
+<div id="bodyWrapper">
+ <div id="bodyContent">
+ <h1><?php echo HEADING_SEARCH_HELP; ?></h1>
+
+ <div class="contentContainer">
+ <div class="contentText">
+ <?php echo TEXT_SEARCH_HELP; ?>
+ </div>
+
+ <div style="float: right;">
+ <?php echo '<a href="#" onclick="window.close(); return false;">' . TEXT_CLOSE_WINDOW . '</a>'; ?>
+ </div>
+ </div>
+ </div>
+</div>
</body>
</html>
Please sign in to comment.
Something went wrong with that request. Please try again.