Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Switch around ids with classes just to be future-safe. Add a new wrap…

…per container.
  • Loading branch information...
commit ba2c2ae39b49c34664f7d5d10f84a19a194b373c 1 parent b12c4b9
@mjangda mjangda authored
Showing with 9 additions and 5 deletions.
  1. +4 −4 js/liveblog.js
  2. +5 −1 liveblog.php
View
8 js/liveblog.js
@@ -5,7 +5,7 @@ var liveblog = {};
liveblog.init = function() {
liveblog.set_timestamp( liveblog_settings.last_timestamp );
- liveblog.$container = $( '#liveblog-entries' );
+ liveblog.$entry_container = $( '.liveblog-entries' );
// Damn you wp_localize_script
liveblog_settings.refresh_interval = parseInt( liveblog_settings.refresh_interval );
@@ -134,7 +134,7 @@ var liveblog = {};
liveblog.$update_nag
.html( nag_text )
- .prependTo( liveblog.$container )
+ .prependTo( liveblog.$entry_container )
.one( 'click', function() {
liveblog.unhide_entries();
$( this ).hide();
@@ -160,12 +160,12 @@ var liveblog = {};
} );
} else {
$entry = $( entry.content );
- $entry.addClass( 'liveblog-hidden' ).prependTo( liveblog.$container );
+ $entry.addClass( 'liveblog-hidden' ).prependTo( liveblog.$entry_container );
}
}
liveblog.get_all_entries = function() {
- return liveblog.$container.find( '.liveblog-entry' );
+ return liveblog.$entry_container.find( '.liveblog-entry' );
}
liveblog.get_hidden_entries = function() {
return liveblog.get_all_entries().filter( '.liveblog-hidden' );
View
6 liveblog.php
@@ -262,13 +262,17 @@ function add_liveblog_to_content( $content ) {
$entries = array_reverse( $entries );
$liveblog_output = '';
+ $liveblog_output = '<div id="liveblog-'. $post_id .'" class="liveblog-container">';
+ $liveblog_output = '<div class="liveblog-actions">';
$liveblog_output .= self::get_entry_editor_output();
- $liveblog_output .= '<div id="liveblog-entries" class="liveblog-container">';
+ $liveblog_output = '</div>';
+ $liveblog_output .= '<div class="liveblog-entries">';
foreach ( (array) $entries as $entry ) {
$liveblog_output .= self::entry_output( $entry, false );
}
$liveblog_output .= '</div>';
+ $liveblog_output .= '</div>';
return $content . $liveblog_output;
}
Please sign in to comment.
Something went wrong with that request. Please try again.