diff --git a/docs/changelog/7.x.x.txt b/docs/changelog/7.x.x.txt index c18731196..d577e9d96 100644 --- a/docs/changelog/7.x.x.txt +++ b/docs/changelog/7.x.x.txt @@ -6,6 +6,7 @@ - fix: Can't add assets when not using preload.perl. - fix: graphing doesn't work with GraphicsMagick - fix: Calendar generated iCal for last 30 days instead of next 30 days + - fix: hover help doesn't appear for matrix fields 7.4.8 - fix: Syndicated Content doesn't display all items with multiple feeds in interleaved mode diff --git a/docs/upgrades/templates-7.4.9/MatrixDefaultCompare.tmpl b/docs/upgrades/templates-7.4.9/MatrixDefaultCompare.tmpl new file mode 100644 index 000000000..5c9fb0266 --- /dev/null +++ b/docs/upgrades/templates-7.4.9/MatrixDefaultCompare.tmpl @@ -0,0 +1,80 @@ +#matrixtmpl000000000002 +

Comparison

+ + + + + + + +
    + + +You tried to compare too many listings. Please choose or less at a time. + + + +You must choose at least two products to compare. Less than two isn't much of a comparison. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + class="odd" + + class="even" + + > + + + + + + +
Product
Last Updated
+ + +
+
+
+ + +
+ +
+~~~ + + diff --git a/docs/upgrades/templates-7.4.9/MatrixDefaultDetailedListing.tmpl b/docs/upgrades/templates-7.4.9/MatrixDefaultDetailedListing.tmpl new file mode 100644 index 000000000..48f5272ef --- /dev/null +++ b/docs/upgrades/templates-7.4.9/MatrixDefaultDetailedListing.tmpl @@ -0,0 +1,103 @@ +#matrixtmpl000000000003 +

+ + + + + + + + + +
+ + + + + + + + + +
Web Site
Version Number
Manufacturer
Last Updated
Clicks
Views
Compares
ScreenshotScreenshot
+
  + + Description
+

+
+ + Contact Maintainer
+ +
Message sent.
+
+ +
  + +
+ +

+ + + + + + +
+ Features + + + + class="odd" class="even"> + + + + + + + + +
  
+ +

+

+ Benefits + + + + class="odd" class="even"> + + + + + + + + +
  
+
+ +

+ + + + +


Edit this listing.
+ + + + Approve this listing.
+
+ Delete this listing.
+ +
+ +~~~ + + diff --git a/docs/upgrades/templates-7.4.9/MatrixDefaultSearch.tmpl b/docs/upgrades/templates-7.4.9/MatrixDefaultSearch.tmpl new file mode 100644 index 000000000..3d6d9de06 --- /dev/null +++ b/docs/upgrades/templates-7.4.9/MatrixDefaultSearch.tmpl @@ -0,0 +1,102 @@ +#matrixtmpl000000000005 +

Search The Matrix

+ + +

Your search returned no results. Try specifying a few less criteria.

+
+ + +

+ Your search returned too many results. Either select up to products from the list below, or specify more critera. +

+
+ + + + + +
+ + + + + + + + + +
+ Features + + + + class="odd" class="even"> + + + + + + + +
 
+
+ Benefits + + + + class="odd" class="even"> + + + + + + + +
 
+
+ + + + + + +
+~~~ + + diff --git a/lib/WebGUI/Asset/Wobject/Matrix.pm b/lib/WebGUI/Asset/Wobject/Matrix.pm index 47d0af96c..877951279 100644 --- a/lib/WebGUI/Asset/Wobject/Matrix.pm +++ b/lib/WebGUI/Asset/Wobject/Matrix.pm @@ -326,10 +326,6 @@ sub www_compare { if ($first) { $desc = $row[1]; shift(@row); - $desc =~ s/\n//g; - $desc =~ s/\r//g; - $desc =~ s/'/\\\'/g; - $desc =~ s/"/\"/g; $first = 0; } my $class = lc($value); @@ -972,10 +968,6 @@ sub www_search { my $sth = $self->session->db->read("select name, fieldType, label, description from Matrix_field where category = ".$self->session->db->quote($category)." order by label"); my @loop; while (my $data = $sth->hashRef) { - $data->{description} =~ s/\n//g; - $data->{description} =~ s/\r//g; - $data->{description} =~ s/'/\\\'/g; - $data->{description} =~ s/"/\"/g; if ($data->{fieldType} ne "goodBad") { $data->{form} = WebGUI::Form::text($self->session,{ name=>$data->{name}, @@ -1217,11 +1209,7 @@ sub www_viewDetail { my $sth = $self->session->db->read("select a.value, b.name, b.label, b.description, category from Matrix_listingData a left join Matrix_field b on a.fieldId=b.fieldId and b.assetId=? where listingId=? order by b.label",[$self->getId, $listingId]); while (my $data = $sth->hashRef) { - $data->{description} =~ s/\n//g; - $data->{description} =~ s/\r//g; - $data->{description} =~ s/'/\\\'/g; - $data->{description} =~ s/"/\"/g; - $data->{class} = lc($data->{value}); + $data->{class} = lc($data->{value}); $data->{class} =~ s/\s/_/g; $data->{class} =~ s/\W//g; my $cat = $self->session->url->urlize($data->{category})."_loop"; diff --git a/lib/WebGUI/Asset/Wobject/ProjectManager.pm b/lib/WebGUI/Asset/Wobject/ProjectManager.pm index c2bac21e6..bc85d7f93 100644 --- a/lib/WebGUI/Asset/Wobject/ProjectManager.pm +++ b/lib/WebGUI/Asset/Wobject/ProjectManager.pm @@ -1055,14 +1055,14 @@ sub www_editProject { my $hpdLabel = $i18n->get('hours per day label'); my $hpdHoverHelp = $i18n->get('hours per day hoverhelp'); - $hpdHoverHelp =~ s/'/\\'/g; my $hpdValue = $form->get("hoursPerDay") || $project->{hoursPerDay} || "8.0"; my $hpdStyle = ($dunitValue eq "days"?"display:none":""); my $html = qq| - - + +
$hpdHoverHelp
+ diff --git a/lib/WebGUI/Form/Control.pm b/lib/WebGUI/Form/Control.pm index 3cd0d0125..6b93d9d33 100644 --- a/lib/WebGUI/Form/Control.pm +++ b/lib/WebGUI/Form/Control.pm @@ -257,9 +257,9 @@ sub displayFormWithWrapper { my $self = shift; if ($self->passUiLevelCheck) { my ($fieldClass, $rowClass, $labelClass, $hoverHelp, $subtext) = $self->prepareWrapper; - my $hoverCode = $self->getHoverCode($hoverHelp, $self->get('id') . '_wrapper'); + $hoverHelp &&= '
' . $hoverHelp . '
'; return ' - '.$self->get("label") . $hoverCode . ' + '.$self->get("label") . $hoverHelp . ' '.$self->displayForm().$subtext." \n"; } else { @@ -542,8 +542,9 @@ sub prepareWrapper { $labelClass = qq| class="$labelClass" | if($self->get("labelClass")); my $fieldClass = $self->get("fieldClass"); $fieldClass = qq| class="$fieldClass" | if($self->get("fieldClass")); - my $hoverHelp = $self->get("hoverHelp"); - my $subtext = $self->get("subtext"); + my $hoverHelp = $self->get("hoverHelp") || ''; + $hoverHelp =~ s/^\s+//; + my $subtext = $self->get("subtext"); $subtext = qq| $subtext| if ($subtext); return ($fieldClass, $rowClass, $labelClass, $hoverHelp, $subtext); } @@ -625,9 +626,9 @@ sub toHtmlWithWrapper { if ($self->passUiLevelCheck) { my $rawField = $self->toHtml(); # has to be called before prepareWrapper for some controls, namely captcha. my ($fieldClass, $rowClass, $labelClass, $hoverHelp, $subtext) = $self->prepareWrapper; - my $hoverCode = $self->getHoverCode($hoverHelp, $self->get('id') . '_description'); + $hoverHelp &&= '
' . $hoverHelp . '
'; return ' - ' . $hoverCode . ' + ' . $hoverHelp . ' '.$rawField . $subtext . " \n"; } else { @@ -637,42 +638,6 @@ sub toHtmlWithWrapper { #------------------------------------------------------------------- -=head2 getHoverCode ( hoverHelp, attachId ) - -Generated the code to add hover help to html elements. - -=head3 hoverHelp - -The text in include in the hover help. - -=head3 attachId - -The id of the HTML element to attach the hover help to. - -=cut - -sub getHoverCode { - my $self = shift; - my $style = $self->session->style; - my $url = $self->session->url; - my $hoverHelp = shift; - my $attachId = shift; - $hoverHelp =~ s/^\s+//; - return '' - unless $hoverHelp; - my $hover = '
' . $hoverHelp . '
'; - $style->setLink($url->extras('/yui/build/container/assets/container.css'),{ type=>'text/css', rel=>"stylesheet" }); - $style->setLink($url->extras('/hoverhelp.css'),{ type=>'text/css', rel=>"stylesheet" }); - $style->setScript($url->extras('/yui/build/yahoo/yahoo-min.js'),{ type=>'text/javascript' }); - $style->setScript($url->extras('/yui/build/dom/dom-min.js'),{ type=>'text/javascript' }); - $style->setScript($url->extras('/yui/build/event/event-min.js'),{ type=>'text/javascript' }); - $style->setScript($url->extras('/yui/build/container/container-min.js'),{ type=>'text/javascript' }); - $style->setScript($url->extras('/hoverhelp.js'),{ type=>'text/javascript' }); - return $hover; -} - -#------------------------------------------------------------------- - =head2 passUiLevelCheck ( ) Renders the form field to HTML as a table row complete with labels, subtext, hoverhelp, etc. diff --git a/lib/WebGUI/HTMLForm.pm b/lib/WebGUI/HTMLForm.pm index fac6dda4e..9cb4dfbb1 100644 --- a/lib/WebGUI/HTMLForm.pm +++ b/lib/WebGUI/HTMLForm.pm @@ -215,6 +215,15 @@ Returns the HTML for this form object. sub print { my $self = shift; + my $style = $self->session->style; + my $url = $self->session->url; + $style->setLink($url->extras('/yui/build/container/assets/container.css'),{ type=>'text/css', rel=>"stylesheet" }); + $style->setLink($url->extras('/hoverhelp.css'),{ type=>'text/css', rel=>"stylesheet" }); + $style->setScript($url->extras('/yui/build/yahoo/yahoo-min.js'),{ type=>'text/javascript' }); + $style->setScript($url->extras('/yui/build/dom/dom-min.js'),{ type=>'text/javascript' }); + $style->setScript($url->extras('/yui/build/event/event-min.js'),{ type=>'text/javascript' }); + $style->setScript($url->extras('/yui/build/container/container-min.js'),{ type=>'text/javascript' }); + $style->setScript($url->extras('/hoverhelp.js'),{ type=>'text/javascript' }); return $self->{_header}.$self->{_data}.$self->{_footer}; } diff --git a/lib/WebGUI/TabForm.pm b/lib/WebGUI/TabForm.pm index 8ab9e2d09..42193c6c1 100644 --- a/lib/WebGUI/TabForm.pm +++ b/lib/WebGUI/TabForm.pm @@ -226,8 +226,17 @@ Returns an HTML string with all the necessary components to draw the tab form. sub print { my $self = shift; - $self->session->style->setScript($self->session->url->extras('tabs/tabs.js'),{type=>"text/javascript"}); - $self->session->style->setLink($self->{_css},{rel=>"stylesheet", rev=>"stylesheet",type=>"text/css"}); + my $style = $self->session->style; + my $url = $self->session->url; + $style->setScript($url->extras('tabs/tabs.js'),{type=>"text/javascript"}); + $style->setLink($self->{_css},{rel=>"stylesheet", rev=>"stylesheet",type=>"text/css"}); + $style->setLink($url->extras('/yui/build/container/assets/container.css'),{ type=>'text/css', rel=>"stylesheet" }); + $style->setLink($url->extras('/hoverhelp.css'),{ type=>'text/css', rel=>"stylesheet" }); + $style->setScript($url->extras('/yui/build/yahoo/yahoo-min.js'),{ type=>'text/javascript' }); + $style->setScript($url->extras('/yui/build/dom/dom-min.js'),{ type=>'text/javascript' }); + $style->setScript($url->extras('/yui/build/event/event-min.js'),{ type=>'text/javascript' }); + $style->setScript($url->extras('/yui/build/container/container-min.js'),{ type=>'text/javascript' }); + $style->setScript($url->extras('/hoverhelp.js'),{ type=>'text/javascript' }); my $output = $self->{_form}; $output .= $self->{_hidden}; my $i = 1; diff --git a/www/extras/hoverhelp.css b/www/extras/hoverhelp.css index 9dfa8d7fe..e03cc17cd 100644 --- a/www/extras/hoverhelp.css +++ b/www/extras/hoverhelp.css @@ -9,6 +9,7 @@ font-weight: normal; padding: 3px; z-index: 1000; + width: 300px; } .wg-hoverhelp.yui-tt { diff --git a/www/extras/hoverhelp.js b/www/extras/hoverhelp.js index f1d5ea64e..64de7d138 100644 --- a/www/extras/hoverhelp.js +++ b/www/extras/hoverhelp.js @@ -4,7 +4,6 @@ YAHOO.util.Event.onDOMReady(function () { for (i = 0; i < tips.length; i++) { var myTip = new YAHOO.widget.Tooltip(tips[i], { autodismissdelay: 1000000, - width: '300px', context: tips[i].parentNode }); }