diff options
-rw-r--r-- | js/script.js | 18 | ||||
-rwxr-xr-x | js/testimonials_script.js | 4 | ||||
-rwxr-xr-x | templates/page-front.tpl.php | 24 |
3 files changed, 41 insertions, 5 deletions
diff --git a/js/script.js b/js/script.js new file mode 100644 index 0000000..fcb6a04 --- /dev/null +++ b/js/script.js @@ -0,0 +1,18 @@ +$("#txtSearchPage").keyup(function() { + var search = $(this).val(); + $(".time-entry").show(); + if (search) + $(".time-entry").not(":containsNoCase(" + search + ")").hide(); +}); + +$.expr[":"].containsNoCase = function (el, i, m) { + var search = m[3]; + if (!search) return false; + return new RegExp(search,"i").test($(el).text()); +}; + + +// jQuery Plug-in example +$("#txtSearchPagePlugin") + .searchFilter({targetSelector: ".time-entry"}) + diff --git a/js/testimonials_script.js b/js/testimonials_script.js index ee425c5..0ab8a57 100755 --- a/js/testimonials_script.js +++ b/js/testimonials_script.js @@ -5,7 +5,7 @@ $(document).ready(function(){ (function showNextTestimonial(){
- $('#testimonials_front li:visible').delay(8000).fadeOut('slow',function(){
+ $('#testimonials_front li:visible').delay(12000).fadeOut('slow',function(){
$(this).appendTo('#testimonials_front ul');
if($(this).next().length > 0)
{
@@ -22,4 +22,4 @@ $(document).ready(function(){ });
})();
-});
\ No newline at end of file +});
diff --git a/templates/page-front.tpl.php b/templates/page-front.tpl.php index e2488c7..01e1cd6 100755 --- a/templates/page-front.tpl.php +++ b/templates/page-front.tpl.php @@ -389,12 +389,28 @@ if($length>260) { $cut1= drupal_substr($string, 0, 260); - $cut=$cut1."..."; + $cut=$cut1." ... "; + echo "<li><i><p style='margin-top:-7px'>{$cut}</i><a href='' id='$row->id' style='margin-left:5px' data-target='#dialog{$row->id}' class='testimonial_read_more'>Read more</a></p> + <div id='dialog{$row->id}' class='dialog'> + <img src='sites/all/themes/scilab/images/x.png' style='margin-top:-25px ;margin-left:735px;' class='lightbox_close'> + <i><p style='margin-top:-1px'>{$row->body}</i><hr/><br/> + <p style='text-align:right;margin-top:-15px'>{$row->name},</p> + <p style='text-align:right;margin-top:-15px'>{$row->department}, + {$row->university},</p> + <p style='text-align:right;margin-top:-15px''>{$row->contribution},{$row->reference}.</p> + </div> + <br/> + + <p style='text-align:right;margin-top:-30px'>{$row->name},{$row->university}, + {$row->contribution},</p> + <p style='text-align:right;margin-top:-15px''>{$row->reference}.</p> + </li>"; + } + else { $cut= drupal_substr($string, 0, 260); - } - echo "<li><i><p style='margin-top:-7px'>{$cut}</i><a href='' id='$row->id' data-target='#dialog{$row->id}' class='testimonial_read_more'>Read more</a></p> + echo "<li><i><p style='margin-top:-7px'>{$cut}</i> <div id='dialog{$row->id}' class='dialog'> <img src='sites/all/themes/scilab/images/x.png' style='margin-top:-25px ;margin-left:735px;' class='lightbox_close'> <i><p style='margin-top:-1px'>{$row->body}</i><hr/><br/> @@ -411,6 +427,8 @@ </li>"; } + } + ?> </ul> </div> <!-- /#testimonials_front --> |