parent
dd1cea9665
commit
5516926b74
5 changed files with 18 additions and 8 deletions
|
|
@ -1,5 +1,8 @@
|
|||
# 0.5.2.0
|
||||
|
||||
# Refactor
|
||||
* Update perfect-scrollbar [#6085](https://github.com/diaspora/diaspora/pull/6085)
|
||||
|
||||
# 0.5.1.0
|
||||
|
||||
## Configuration changes
|
||||
|
|
|
|||
2
Gemfile
2
Gemfile
|
|
@ -108,7 +108,7 @@ source "https://rails-assets.org" do
|
|||
gem "rails-assets-jquery-idletimer", "1.0.1"
|
||||
gem "rails-assets-jquery-placeholder", "2.1.1"
|
||||
gem "rails-assets-jquery-textchange", "0.2.3"
|
||||
gem "rails-assets-perfect-scrollbar", "0.5.9"
|
||||
gem "rails-assets-perfect-scrollbar", "0.6.2"
|
||||
gem "rails-assets-jakobmattsson--jquery-elastic", "1.6.11"
|
||||
end
|
||||
|
||||
|
|
|
|||
|
|
@ -551,8 +551,7 @@ GEM
|
|||
rails-assets-markdown-it-sanitizer (0.3.1)
|
||||
rails-assets-markdown-it-sub (1.0.0)
|
||||
rails-assets-markdown-it-sup (1.0.0)
|
||||
rails-assets-perfect-scrollbar (0.5.9)
|
||||
rails-assets-jquery (>= 1.10)
|
||||
rails-assets-perfect-scrollbar (0.6.2)
|
||||
rails-deprecated_sanitizer (1.0.3)
|
||||
activesupport (>= 4.2.0.alpha)
|
||||
rails-dom-testing (1.0.6)
|
||||
|
|
@ -836,7 +835,7 @@ DEPENDENCIES
|
|||
rails-assets-markdown-it-sanitizer (= 0.3.1)!
|
||||
rails-assets-markdown-it-sub (= 1.0.0)!
|
||||
rails-assets-markdown-it-sup (= 1.0.0)!
|
||||
rails-assets-perfect-scrollbar (= 0.5.9)!
|
||||
rails-assets-perfect-scrollbar (= 0.6.2)!
|
||||
rails-i18n (= 4.0.4)
|
||||
rails-timeago (= 2.11.0)
|
||||
rails_admin (= 0.6.7)
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@
|
|||
//= require_tree ./collections
|
||||
//= require_tree ./views
|
||||
|
||||
//= require perfect-scrollbar
|
||||
//= require perfect-scrollbar/perfect-scrollbar.jquery
|
||||
|
||||
var app = {
|
||||
collections: {},
|
||||
|
|
|
|||
|
|
@ -15,6 +15,7 @@ app.views.NotificationDropdown = app.views.Base.extend({
|
|||
this.dropdown = $('#notification_dropdown');
|
||||
this.dropdownNotifications = this.dropdown.find('.notifications');
|
||||
this.ajaxLoader = this.dropdown.find('.ajax_loader');
|
||||
this.perfectScrollbarInitialized = false;
|
||||
},
|
||||
|
||||
toggleDropdown: function(evt){
|
||||
|
|
@ -43,7 +44,10 @@ app.views.NotificationDropdown = app.views.Base.extend({
|
|||
if(!inDropdown && !inHovercard && this.dropdownShowing()){
|
||||
this.badge.removeClass('active');
|
||||
this.dropdown.css('display', 'none');
|
||||
this.dropdownNotifications.perfectScrollbar('destroy');
|
||||
if(this.perfectScrollbarInitialized) {
|
||||
this.dropdownNotifications.perfectScrollbar("destroy");
|
||||
this.perfectScrollbarInitialized = false;
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
|
|
@ -108,8 +112,12 @@ app.views.NotificationDropdown = app.views.Base.extend({
|
|||
|
||||
app.helpers.timeago(this.dropdownNotifications);
|
||||
|
||||
this.dropdownNotifications.perfectScrollbar('destroy').perfectScrollbar();
|
||||
this.dropdownNotifications.removeClass('loading');
|
||||
if(this.perfectScrollbarInitialized) {
|
||||
this.dropdownNotifications.perfectScrollbar("destroy");
|
||||
}
|
||||
this.dropdownNotifications.perfectScrollbar();
|
||||
this.perfectScrollbarInitialized = true;
|
||||
this.dropdownNotifications.removeClass("loading");
|
||||
this.dropdownNotifications.scroll(function(){
|
||||
self.dropdownScroll();
|
||||
});
|
||||
|
|
|
|||
Loading…
Reference in a new issue