Unverified Commit 9a661177 authored by Benjamin Neff's avatar Benjamin Neff
Browse files

Replace rails-assets-perfect-scrollbar with rails-assets-utatti-perfect-scrollbar

closes #7772
parent 9fb63c8b
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -10,16 +10,17 @@
    "autosize": false,
    "Backbone": false,
    "Bloodhound": false,
    "blueimp": false,
    "gon": false,
    "Handlebars": false,
    "HandlebarsTemplates": false,
    "ImagePaths": false,
    "jsxc": false,
    "L": false,
    "Routes": false,
    "OSM": false,
    "PerfectScrollbar": false,
    "qq": false,
    "blueimp": false,
    "Routes": false,

    "loginAs": true,
    "logout": true,
+1 −1
Original line number Diff line number Diff line
@@ -120,7 +120,7 @@ source "https://rails-assets.org" do
  gem "rails-assets-jquery.are-you-sure",                 "1.9.0"
  gem "rails-assets-jquery-placeholder",                  "2.3.1"
  gem "rails-assets-jquery-textchange",                   "0.2.3"
  gem "rails-assets-perfect-scrollbar",                   "0.6.16"
  gem "rails-assets-utatti-perfect-scrollbar",            "1.3.0"
end

gem "markdown-it-html5-embed", "1.0.0"
+2 −2
Original line number Diff line number Diff line
@@ -553,8 +553,8 @@ GEM
    rails-assets-markdown-it-sanitizer (0.4.3)
    rails-assets-markdown-it-sub (1.0.0)
    rails-assets-markdown-it-sup (1.0.0)
    rails-assets-perfect-scrollbar (0.6.16)
    rails-assets-underscore (1.8.3)
    rails-assets-utatti-perfect-scrollbar (1.3.0)
    rails-controller-testing (1.0.2)
      actionpack (~> 5.x, >= 5.0.1)
      actionview (~> 5.x, >= 5.0.1)
@@ -867,7 +867,7 @@ DEPENDENCIES
  rails-assets-markdown-it-sanitizer (= 0.4.3)!
  rails-assets-markdown-it-sub (= 1.0.0)!
  rails-assets-markdown-it-sup (= 1.0.0)!
  rails-assets-perfect-scrollbar (= 0.6.16)!
  rails-assets-utatti-perfect-scrollbar (= 1.3.0)!
  rails-controller-testing (= 1.0.2)
  rails-i18n (= 5.1.1)
  rails-timeago (= 2.16.0)
+1 −1
Original line number Diff line number Diff line
@@ -14,7 +14,7 @@
//= require_tree ./collections
//= require_tree ./views

//= require perfect-scrollbar/perfect-scrollbar.jquery
//= require utatti-perfect-scrollbar/dist/perfect-scrollbar

var app = {
  collections: {},
+7 −8
Original line number Diff line number Diff line
@@ -12,7 +12,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;
    this.perfectScrollbar = null;
    this.dropdownNotifications.scroll(this.dropdownScroll.bind(this));
    this.bindCollectionEvents();
  },
@@ -106,18 +106,17 @@ app.views.NotificationDropdown = app.views.Base.extend({
  },

  updateScrollbar: function() {
    if(this.perfectScrollbarInitialized) {
      this.dropdownNotifications.perfectScrollbar("update");
    if (this.perfectScrollbar) {
      this.perfectScrollbar.update();
    } else {
      this.dropdownNotifications.perfectScrollbar();
      this.perfectScrollbarInitialized = true;
      this.perfectScrollbar = new PerfectScrollbar(this.dropdownNotifications[0]);
    }
  },

  destroyScrollbar: function() {
    if(this.perfectScrollbarInitialized) {
      this.dropdownNotifications.perfectScrollbar("destroy");
      this.perfectScrollbarInitialized = false;
    if (this.perfectScrollbar) {
      this.perfectScrollbar.destroy();
      this.perfectScrollbar = null;
    }
  }
});
Loading