CSS cleanup for twitter/facebook.
authorMichael J. Rubinsky <mrubinsk@horde.org>
Sun, 18 Jul 2010 17:36:49 +0000 (13:36 -0400)
committerMichael J. Rubinsky <mrubinsk@horde.org>
Sun, 18 Jul 2010 17:36:49 +0000 (13:36 -0400)
Don't use facebook css in twitter block. Merge some general "social media" css into screen.css.

horde/lib/Block/twitter_timeline.php
horde/lib/Prefs/Ui.php
horde/templates/block/twitter_tweet.html.php
horde/templates/prefs/twitter.html
horde/themes/facebook.css
horde/themes/screen.css

index 01f1427..0a374c5 100644 (file)
@@ -159,16 +159,12 @@ EOT;
         /* Get the user's most recent tweet */
         $latestStatus = htmlspecialchars($this->_profile->status->text, ENT_COMPAT, $GLOBALS['registry']->getCharset());
 
-        // Bring in the Facebook CSS
-        $csslink = $GLOBALS['registry']->get('themesuri', 'horde') . '/facebook.css';
-
         /* Build the UI */
-        $html = '<link href="' . $csslink . '" rel="stylesheet" type="text/css" />';
-        $html .= '<div style="padding-left:8px;padding-right:8px;">'
+        $html = '<div style="padding-left:8px;padding-right:8px;">'
            . '<div class="fbgreybox"><input style="width:98%;margin-top:4px;margin-bottom:4px;" type="text" id="' . $instance . '_newStatus" name="' . $instance . '_newStatus" value="' . $defaultText . '" />'
            . '<a class="button" onclick="Horde.twitter.updateStatus($F(\'' . $instance . '_newStatus\'));" href="#">' . _("Update") . '</a><span id="' . $instance . '_inReplyTo"></span>'
            . Horde::img('loading.gif', '', array('id' => $instance . '_loading', 'style' => 'display:none;'));
-        $html .= '<div id="currentStatus" class="fbemptystatus" style="margin-left:10px;margin-top:10px;">' . sprintf(_("Latest: %s - %s"), $latestStatus, Horde_Date_Utils::relativeDateTime(strtotime($this->_profile->status->created_at), $GLOBALS['prefs']->getValue('date_format'), ($GLOBALS['prefs']->getValue('twentyFour') ? "%H:%M" : "%I:%M %P"))) . '</div></div>';
+        $html .= '<div id="currentStatus" class="" style="margin: 10px;"><strong>' . _("Latest") . '</strong> ' . $latestStatus . ' - <span class="fbstreaminfo">' . Horde_Date_Utils::relativeDateTime(strtotime($this->_profile->status->created_at), $GLOBALS['prefs']->getValue('date_format'), ($GLOBALS['prefs']->getValue('twentyFour') ? "%H:%M" : "%I:%M %P")) . '</span></div></div>';
         $html .= '<div style="height:' . (empty($this->_params['height']) ? 350 : $this->_params['height']) . 'px;overflow-y:auto;" id="twitter_body' . $instance . '">';
         $filter = Horde_Text_Filter::factory('Text2html', array('parselevel' => Horde_Text_Filter_Text2html::MICRO));
         $html .= '</div>';
index fa267ac..0e2585a 100644 (file)
@@ -595,7 +595,7 @@ class Horde_Prefs_Ui
             $_SESSION['twitter_request_secret'] = $results->secret;
 
             $t->set('appname', $registry->get('name'));
-            $t->set('link', Horde::link(Horde::externalUrl($twitter->auth->getUserAuthorizationUrl($results), false), '', 'fbbutton', '', 'openTwitterWindow(); return false;') . 'Twitter</a>');
+            $t->set('link', Horde::link(Horde::externalUrl($twitter->auth->getUserAuthorizationUrl($results), false), '', 'button', '', 'openTwitterWindow(); return false;') . 'Twitter</a>');
             $t->set('popupjs', Horde::popupJs(Horde::externalUrl($twitter->auth->getUserAuthorizationUrl($results), false), array('urlencode' => true)));
         } else {
             /* We know we have a good Twitter token here, so check for any actions... */
index 5e70b6e..7ac4e4d 100644 (file)
@@ -15,7 +15,7 @@
  */
 ?>
 <div class="fbstreamstory">
-  <div class="fbgreybox" style="float:left;text-align:center;height:73px;width:73px;margin-right:5px;">
+  <div class="solidbox" style="float:left;text-align:center;height:73px;width:73px;margin-right:5px;padding-top:5px;">
     <?php echo $this->profileLink ?><img width="48" height="48" src="<?php echo $this->profileImg?>" alt="<?php echo $this->authorName?>" title="<?php echo $this->authorFullname?>" /></a>
     <div style="overflow:hidden;"><?php echo $this->profileLink . $this->authorName ?></a></div>
   </div>
index a5fdc63..fc80496 100644 (file)
@@ -10,7 +10,7 @@
       <div><input type="submit" class="button" value="<gettext>Disable</gettext>" onclick="document.prefs.twitteractionID.value='revokeInfinite'; return true" /></div>
     </div>
 <else:haveSession>
-    <div class="horde-warning">
+    <div class="notice">
       <gettext>Could not find authorization for</gettext> <tag:appname /> <gettext>to interact with your Twitter account</gettext>
     </div>
     <script type="text/javascript">
index fe46ab6..f2d7888 100644 (file)
     background: #3B5998;
 }
 
-/* Stream css */
-.fbstreamstory {
-    margin-bottom: 7px;
-    padding-top: 7px;
-    position: relative;
-}
+/* Stream CSS */
 .fbstreampic {
     display: inline;
     height: 50px;
     width: 50px;
 }
-.fbstreambody {
-    padding: 0 0 0 70px;
-    min-height: 60px;
-}
-.fbstreaminfo {
-    color: #777777;
-    padding: 2px 0 0;
-    font-style: italic;
-}
-
 .fbattachment {
     margin-top: 6px;
     overflow: hidden;
     color: gray;
     padding-top: 3px;
 }
-
 .fbmedia {
     float: left;
     overflow: hidden;
 .fbmediaitemmultiple {
     padding-left: 5px;
 }
-
 .fbemptystatus {
     font-style: italic;
     color: gray;
-}
-
-.fbgetmore {
-    text-align: center;
-    font-style: italic;
 }
\ No newline at end of file
index 3150a12..55fd2a3 100644 (file)
@@ -1182,6 +1182,30 @@ div.GrowlerNoticeExit:hover {
     background: #ffa;
 }
 
+/* Social Media Related CSS */
+.fbstreamstory {
+    margin-bottom: 7px;
+    padding-top: 7px;
+    position: relative;
+}
+.fbstreambody {
+    padding: 0 0 0 70px;
+    min-height: 60px;
+}
+.fbstreaminfo {
+    color: #777777;
+    padding: 2px 0 0;
+    font-style: italic;
+}
+.fbgetmore {
+    text-align: center;
+    font-style: italic;
+}
+.fbcurrent {
+    font-style: italic;
+    color: gray;
+}
+
 /* Print CSS. */
 @media print {
     body, .header, .smallheader {