diff options
| author | fisharebest <fisharebest@gmail.com> | 2011-12-11 22:12:11 +0000 |
|---|---|---|
| committer | fisharebest <fisharebest@gmail.com> | 2011-12-11 22:12:11 +0000 |
| commit | fd6873ce3e9f2b2570872702de515149fefe41a5 (patch) | |
| tree | d5d46085782a5a7a0935f64294ddbb4dd6632c2d /modules_v3 | |
| parent | 9821540afa47d373599b77d42e0125b730cb9e6a (diff) | |
| download | webtrees-fd6873ce3e9f2b2570872702de515149fefe41a5.tar.gz webtrees-fd6873ce3e9f2b2570872702de515149fefe41a5.tar.bz2 webtrees-fd6873ce3e9f2b2570872702de515149fefe41a5.zip | |
#902683 - webtrees 1.2.4 W3C errors Bug
Diffstat (limited to 'modules_v3')
| -rw-r--r-- | modules_v3/descendancy/module.php | 33 | ||||
| -rw-r--r-- | modules_v3/families/module.php | 31 | ||||
| -rw-r--r-- | modules_v3/individuals/module.php | 29 |
3 files changed, 42 insertions, 51 deletions
diff --git a/modules_v3/descendancy/module.php b/modules_v3/descendancy/module.php index 9f463d6eb4..58ba53a080 100644 --- a/modules_v3/descendancy/module.php +++ b/modules_v3/descendancy/module.php @@ -84,17 +84,16 @@ class descendancy_WT_Module extends WT_Module implements WT_Module_Sidebar { public function getSidebarContent() { global $WT_IMAGES, $controller; - $out = '<script type="text/javascript"><![CDATA[ - var dloadedNames = new Array(); + $controller->addInlineJavaScript(' + var dloadedNames = new Array(); - function dsearchQ() { - var query = jQuery("#sb_desc_name").attr("value"); - if (query.length>1) { - jQuery("#sb_desc_content").load("module.php?mod='.$this->getName().'&mod_action=ajax&sb_action=descendancy&search="+query); + function dsearchQ() { + var query = jQuery("#sb_desc_name").attr("value"); + if (query.length>1) { + jQuery("#sb_desc_content").load("module.php?mod='.$this->getName().'&mod_action=ajax&sb_action=descendancy&search="+query); + } } - } - jQuery(document).ready(function(){ jQuery("#sb_desc_name").focus(function(){this.select();}); jQuery("#sb_desc_name").blur(function(){if (this.value=="") this.value="'.WT_I18N::translate('Search').'";}); var dtimerid = null; @@ -123,15 +122,15 @@ class descendancy_WT_Module extends WT_Module implements WT_Module_Sidebar { } return false; }); - }); - ]]></script> - <form method="post" action="module.php?mod='.$this->getName().'&mod_action=ajax" onsubmit="return false;"> - <input type="text" name="sb_desc_name" id="sb_desc_name" value="'.WT_I18N::translate('Search').'" />'; - $out .= '</form>'; - $out .= '<div id="sb_desc_content">'; - $out .= '<ul>'.$this->getPersonLi($controller->record, 1).'</ul>'; - $out .= '</div>'; - return $out; + '); + + return + '<form method="post" action="module.php?mod='.$this->getName().'&mod_action=ajax" onsubmit="return false;">'. + '<input type="text" name="sb_desc_name" id="sb_desc_name" placeholder="'.WT_I18N::translate('Search').'">'. + '</form>'. + '<div id="sb_desc_content">'. + '<ul>'.$this->getPersonLi($controller->record, 1).'</ul>'. + '</div>'; } public function getPersonLi(WT_Person $person, $generations=0) { diff --git a/modules_v3/families/module.php b/modules_v3/families/module.php index 6c82b8d3b4..88ee4b7765 100644 --- a/modules_v3/families/module.php +++ b/modules_v3/families/module.php @@ -85,25 +85,21 @@ class families_WT_Module extends WT_Module implements WT_Module_Sidebar { // Implement WT_Module_Sidebar public function getSidebarContent() { - global $WT_IMAGES, $UNKNOWN_NN; + global $WT_IMAGES, $UNKNOWN_NN, $controller; // Fetch a list of the initial letters of all surnames in the database $initials=WT_Query_Name::surnameAlpha(true, false, WT_GED_ID); - $out = '<script type="text/javascript"> - <!-- - var famloadedNames = new Array(); + $controller->addInlineJavaScript(' + var famloadedNames = new Array(); - function fsearchQ() { - var query = jQuery("#sb_fam_name").attr("value"); - if (query.length>1) { - jQuery("#sb_fam_content").load("module.php?mod='.$this->getName().'&mod_action=ajax&sb_action=families&search="+query); + function fsearchQ() { + var query = jQuery("#sb_fam_name").attr("value"); + if (query.length>1) { + jQuery("#sb_fam_content").load("module.php?mod='.$this->getName().'&mod_action=ajax&sb_action=families&search="+query); + } } - } - jQuery(document).ready(function() { - jQuery("#sb_fam_name").focus(function() {this.select();}); - jQuery("#sb_fam_name").blur(function() {if (this.value=="") this.value="'.WT_I18N::translate('Search').'";}); var famtimerid = null; jQuery("#sb_fam_name").keyup(function(e) { if (famtimerid) window.clearTimeout(famtimerid); @@ -141,12 +137,11 @@ class families_WT_Module extends WT_Module implements WT_Module_Sidebar { } return false; }); - }); - //--> - </script> - <form method="post" action="module.php?mod='.$this->getName().'&mod_action=ajax" onsubmit="return false;"> - <input type="text" name="sb_fam_name" id="sb_fam_name" value="'.WT_I18N::translate('Search').'" /> - <p>'; + '); + $out= + '<form method="post" action="module.php?mod='.$this->getName().'&mod_action=ajax" onsubmit="return false;">'. + '<input type="text" name="sb_fam_name" id="sb_fam_name" placeholder="'.WT_I18N::translate('Search').'" />'. + '<p>'; foreach ($initials as $letter=>$count) { switch ($letter) { case '@': diff --git a/modules_v3/individuals/module.php b/modules_v3/individuals/module.php index fa281691bd..43ace2abd1 100644 --- a/modules_v3/individuals/module.php +++ b/modules_v3/individuals/module.php @@ -85,25 +85,21 @@ class individuals_WT_Module extends WT_Module implements WT_Module_Sidebar { // Implement WT_Module_Sidebar public function getSidebarContent() { - global $WT_IMAGES, $UNKNOWN_NN; + global $WT_IMAGES, $UNKNOWN_NN, $controller; // Fetch a list of the initial letters of all surnames in the database $initials=WT_Query_Name::surnameAlpha(true, false, WT_GED_ID); - $out = '<script type="text/javascript"> - <!-- - var loadedNames = new Array(); + $controller->addInlineJavaScript(' + var loadedNames = new Array(); - function isearchQ() { - var query = jQuery("#sb_indi_name").attr("value"); - if (query.length>1) { - jQuery("#sb_indi_content").load("module.php?mod='.$this->getName().'&mod_action=ajax&sb_action=individuals&search="+query); + function isearchQ() { + var query = jQuery("#sb_indi_name").attr("value"); + if (query.length>1) { + jQuery("#sb_indi_content").load("module.php?mod='.$this->getName().'&mod_action=ajax&sb_action=individuals&search="+query); + } } - } - jQuery(document).ready(function() { - jQuery("#sb_indi_name").focus(function() {this.select();}); - jQuery("#sb_indi_name").blur(function() {if (this.value=="") this.value="'.WT_I18N::translate('Search').'";}); var timerid = null; jQuery("#sb_indi_name").keyup(function(e) { if (timerid) window.clearTimeout(timerid); @@ -141,11 +137,12 @@ class individuals_WT_Module extends WT_Module implements WT_Module_Sidebar { } return false; }); - }); - //--> - </script> + '); + + + $out=' <form method="post" action="module.php?mod='.$this->getName().'&mod_action=ajax" onsubmit="return false;"> - <input type="text" name="sb_indi_name" id="sb_indi_name" value="'.WT_I18N::translate('Search').'" /> + <input type="text" name="sb_indi_name" id="sb_indi_name" placeholder="'.WT_I18N::translate('Search').'" /> <p>'; foreach ($initials as $letter=>$count) { switch ($letter) { |
