mirror of
https://github.com/samuelclay/NewsBlur.git
synced 2025-09-18 21:50:56 +00:00
Updating training counts when choosing feeds.
This commit is contained in:
parent
fc233a7f70
commit
6c4272a06b
4 changed files with 8 additions and 13 deletions
|
@ -739,17 +739,9 @@ var classifier_prototype = {
|
|||
},
|
||||
|
||||
end: function() {
|
||||
_.defer(function() {
|
||||
$('.NB-module-account-trainer').animate({
|
||||
'opacity': 0
|
||||
}, {
|
||||
'duration': 1000,
|
||||
'complete': function() {
|
||||
$('.NB-module-account-trainer').slideUp(350);
|
||||
}
|
||||
});
|
||||
}, 1000);
|
||||
$.modal.close();
|
||||
this.model.preference('has_trained_intelligence', true);
|
||||
NEWSBLUR.reader.check_hide_getting_started();
|
||||
$.modal.close();
|
||||
},
|
||||
|
||||
// ==========
|
||||
|
|
|
@ -382,7 +382,7 @@ NEWSBLUR.ReaderFeedchooser.prototype = {
|
|||
var self = this;
|
||||
var approve_list = this.approve_list;
|
||||
var $submit = $('.NB-modal-submit-save', this.$modal);
|
||||
$submit.addClass('NB-disabled').val('Saving...');
|
||||
$submit.addClass('NB-disabled').removeClass('NB-modal-submit-green').val('Saving...');
|
||||
this.update_homepage_count();
|
||||
|
||||
this.model.save_feed_chooser(approve_list, function() {
|
||||
|
@ -405,10 +405,12 @@ NEWSBLUR.ReaderFeedchooser.prototype = {
|
|||
|
||||
update_homepage_count: function() {
|
||||
var $count = $('.NB-module-account-feedcount');
|
||||
var $site_count = $('.NB-module-account-trainer-site-count');
|
||||
var $button = $('.NB-module-account-upgrade');
|
||||
var approve_list = this.approve_list;
|
||||
|
||||
$count.text(approve_list.length);
|
||||
$site_count.text(Inflector.pluralize('site', approve_list.length, true));
|
||||
$button.removeClass('NB-modal-submit-green').addClass('NB-modal-submit-close');
|
||||
$('.NB-module-account-trainer').removeClass('NB-hidden').hide().slideDown(500);
|
||||
},
|
||||
|
|
|
@ -288,6 +288,7 @@ _.extend(NEWSBLUR.ReaderIntro.prototype, {
|
|||
if (page_number == page_count) {
|
||||
$('.NB-tutorial-next-page-text', this.$modal).text('All Done ');
|
||||
} else if (page_number > page_count) {
|
||||
this.model.preference('has_setup_feeds', true);
|
||||
NEWSBLUR.reader.check_hide_getting_started();
|
||||
this.close(function() {
|
||||
NEWSBLUR.reader.open_dialog_after_feeds_loaded();
|
||||
|
|
|
@ -384,7 +384,7 @@
|
|||
</div>
|
||||
<h3 class="NB-module-content-header">
|
||||
<span class="NB-module-content-subtitle">
|
||||
<span class="NB-module-account-trainer-count">{{ train_count }}</span> of {{ active_count }} site{{ active_count|pluralize }}
|
||||
<span class="NB-module-account-trainer-count">{{ train_count }}</span> of <span class="NB-module-account-trainer-site-count">{{ active_count }} site{{ active_count|pluralize }}</span>
|
||||
</span>
|
||||
Intelligence Trainer
|
||||
</h3>
|
||||
|
|
Loading…
Add table
Reference in a new issue