Use consistent 'Get More' style in social media blocks.
authorMichael J. Rubinsky <mrubinsk@horde.org>
Sat, 14 Aug 2010 19:37:52 +0000 (15:37 -0400)
committerMichael J. Rubinsky <mrubinsk@horde.org>
Sat, 14 Aug 2010 19:37:52 +0000 (15:37 -0400)
horde/js/facebookclient.js
horde/lib/Block/fb_stream.php

index 5193869..6481f60 100644 (file)
@@ -25,7 +25,7 @@ var Horde_Facebook = Class.create({
      * opts.button
      * opts.instance
      *
-     * 
+     *
      */
     initialize: function(opts)
     {
@@ -34,10 +34,10 @@ var Horde_Facebook = Class.create({
         }, opts);
 
         this.getNewEntries();
-        $(this.opts.getmore).observe('click', function() { this.getOlderEntries(); return false; }.bind(this));
-        $(this.opts.button).observe('click', function() { this.updateStatus(); return false; }.bind(this));
+        $(this.opts.getmore).observe('click', function(e) { this.getOlderEntries(); e.stop(); }.bind(this));
+        $(this.opts.button).observe('click', function(e) { this.updateStatus(); e.stop(); }.bind(this));
     },
-    
+
     /**
      * Update FB status.
      *
@@ -114,7 +114,7 @@ var Horde_Facebook = Class.create({
 
     getNewEntries: function()
     {
-        var params = { 
+        var params = {
             'actionID': 'getStream',
             'notifications': this.opts.notifications,
             'oldest': this.oldest,
@@ -141,5 +141,5 @@ var Horde_Facebook = Class.create({
             this.oldest = response.responseJSON.o;
         }
     }
-    
+
 });
index a8de743..4b7bf50 100644 (file)
@@ -189,7 +189,8 @@ EOT;
 
        // Build the stream feed.
         $html .= '<div id="' . $instance . '_fbcontent" style="height:' . (empty($this->_params['height']) ? 300 : $this->_params['height']) . 'px;overflow-y:auto;"></div>';
- $html .= '<div class="control fbgetmore"><a href="#" id="' . $instance . '_getmore">' . _("Get More") . '</a></div>';
+        $html .= '<div class="fbgetmore"><input type="button" id="' . $instance . '_getmore" class="button"  value="' . _("Get More") . '"></div>';
+
         $html .= '</div>'; // fbbody end
 
         return $html;