Permalink
Browse files

Highlight new posts

  • Loading branch information...
1 parent c65e58f commit db742c83ad095a3ad197a0556da75ebc23875a47 @nb nb committed Aug 12, 2012
Showing with 7 additions and 5 deletions.
  1. +5 −1 css/liveblog.css
  2. +1 −3 js/liveblog.js
  3. +1 −1 liveblog.php
View
@@ -125,6 +125,10 @@ span#liveblog-submit-spinner {
border-top: 1px solid #eee;
}
+.liveblog-entry.highlight {
+ background-color: lightYellow;
+}
+
.liveblog-entry-text {
font-size: 18px;
line-height: 22px;
@@ -157,4 +161,4 @@ span#liveblog-submit-spinner {
.liveblog-entry-actions {
list-style-type: none;
-}
+}
View
@@ -64,8 +64,6 @@ var liveblog = {};
liveblog.get_recent_entries_success = function( response ) {
- // TODO: highlight updated posts
-
liveblog.hide_spinner();
if ( response && response.latest_timestamp )
@@ -218,7 +216,7 @@ var liveblog = {};
return liveblog.get_all_entries().not( '.liveblog-hidden' );
}
liveblog.unhide_entries = function() {
- liveblog.get_hidden_entries().removeClass( 'liveblog-hidden' );
+ liveblog.get_hidden_entries().addClass('highlight').removeClass( 'liveblog-hidden' ).animate({backgroundColor: 'white'}, {duration: 5000});
}
liveblog.ajax_request = function( url, data, success_callback, error_callback, method ) {
View
@@ -419,7 +419,7 @@ public static function enqueue_scripts() {
return;
wp_enqueue_style( self::key, plugins_url( 'css/liveblog.css', __FILE__ ) );
- wp_enqueue_script( self::key, plugins_url( 'js/liveblog.js', __FILE__ ), array( 'jquery' ), self::version, true );
+ wp_enqueue_script( self::key, plugins_url( 'js/liveblog.js', __FILE__ ), array( 'jquery', 'jquery-color' ), self::version, true );
if ( self::current_user_can_edit_liveblog() ) {
wp_enqueue_script( 'liveblog-publisher', plugins_url( 'js/liveblog-publisher.js', __FILE__ ), array( self::key ), self::version, true );

0 comments on commit db742c8

Please sign in to comment.