Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Highlight new posts

  • Loading branch information...
commit db742c83ad095a3ad197a0556da75ebc23875a47 1 parent c65e58f
Nikolay Bachiyski nb authored
Showing with 7 additions and 5 deletions.
  1. +5 −1 css/liveblog.css
  2. +1 −3 js/liveblog.js
  3. +1 −1  liveblog.php
6 css/liveblog.css
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;
-}
+}
4 js/liveblog.js
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 ) {
2  liveblog.php
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 );
Please sign in to comment.
Something went wrong with that request. Please try again.