Skip to content

Commit

Permalink
Merge branch 'extending-entries' of github.com:bigbitecreative/livebl…
Browse files Browse the repository at this point in the history
…og into extending-entries
  • Loading branch information
jasonagnew committed Jul 10, 2015
2 parents e3ac0c7 + 8791cc6 commit 5bf69a1
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 7 deletions.
2 changes: 1 addition & 1 deletion classes/class-wpcom-liveblog-entry-extend.php
Expand Up @@ -68,7 +68,7 @@ public static function load() {
*/
public static function get_enabled_features()
{
return self::$features;
return array_values( self::$features );
}

/**
Expand Down
3 changes: 1 addition & 2 deletions css/liveblog.css
Expand Up @@ -532,8 +532,7 @@ a.liveblog-form-entry::-webkit-input-placeholder {
.liveblog-key-events .liveblog-entry-actions,
.liveblog-key-events .liveblog-meta,
.liveblog-key-events span,
.liveblog-key-events img
{
.liveblog-key-events img {
display:none;
}

Expand Down
20 changes: 19 additions & 1 deletion js/liveblog.js
Expand Up @@ -400,8 +400,26 @@ window.liveblog = window.liveblog || {};
};

liveblog.set_up_notification_settings = function() {
var feature_list = liveblog_settings.features.join(' '),
feature_test = /(commands|hashtags)/.test(feature_list);
feature_hashtags = /(hashtags)/.test(feature_list);
feature_commands = /(commands)/.test(feature_list);

// Cache DOM elements
// Make sure settings are enabled for either commands or hashtags
if ( ! feature_test ) {
return;
}

if ( ! feature_hashtags ) {
$('.liveblog-notification-tags-label').hide();
}

if ( ! feature_commands ) {
$('.liveblog-notification-key-label').hide();
$('.liveblog-notification-alerts-label').hide();
}

// Cache commonly used DOM elements
liveblog.$notification_tags = $('.liveblog-notification-tags'),
liveblog.$checkbox_enable = $('.liveblog-notification-enable'),
liveblog.$checkbox_key = $('.liveblog-notification-key'),
Expand Down
6 changes: 3 additions & 3 deletions templates/liveblog-loop.php
Expand Up @@ -14,13 +14,13 @@
</label>

<form class="liveblog-notification-options">
<label>
<label class="liveblog-notification-key-label">
<input type="checkbox" class="liveblog-notification-key"> <?php printf( __( 'Subscribe to key events' ) ); ?>
</label>
<label>
<label class="liveblog-notification-alerts-label">
<input type="checkbox" class="liveblog-notification-alerts"> <?php printf( __( 'Subscribe to author alerts ') ); ?>
</label>
<label> <?php printf( __( 'Tags to subscribe to (space separated):' ) ); ?>
<label class="liveblog-notification-tags-label"> <?php printf( __( 'Tags to subscribe to (space separated):' ) ); ?>
<div class="liveblog-notification-tags-wrap">
<input type="text" class="liveblog-notification-tags">
<div class="liveblog-notification-saved"></div>
Expand Down

0 comments on commit 5bf69a1

Please sign in to comment.