From 4762d0132ce7c7c79df6e6c2052a2f62ef94a660 Mon Sep 17 00:00:00 2001 From: goldpbear Date: Thu, 17 Aug 2017 09:14:19 -0700 Subject: [PATCH] (hotfix) tweak rich text editor panel scroll thresholds This is a hacky fix for a demo...a better system needs to be developed for managing the fixed position rich text editor panel! --- src/base/static/js/views/place-detail-view.js | 2 +- src/base/static/js/views/place-form-view.js | 2 +- src/base/templates/base.html | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/base/static/js/views/place-detail-view.js b/src/base/static/js/views/place-detail-view.js index 294994bc3b..126ff5f9b8 100644 --- a/src/base/static/js/views/place-detail-view.js +++ b/src/base/static/js/views/place-detail-view.js @@ -7,7 +7,7 @@ var RichTextEditorView = require("mapseed-rich-text-editor-view"); var SubmissionCollection = require("../models/submission-collection.js"); -const TOOLBAR_FIXED_TOP_THRESHOLD = 235; +const TOOLBAR_FIXED_TOP_THRESHOLD = 1660; module.exports = Backbone.View.extend({ events: { diff --git a/src/base/static/js/views/place-form-view.js b/src/base/static/js/views/place-form-view.js index 8324d53689..807d1b77c5 100644 --- a/src/base/static/js/views/place-form-view.js +++ b/src/base/static/js/views/place-form-view.js @@ -127,7 +127,7 @@ module.exports = Backbone.View.extend({ // the top of the content container. if (this.$qlToolbar.length > 0) { $("#content article").on("scroll", function() { - if (this.scrollTop < 520) { + if (this.scrollTop < 1060) { self.$qlToolbar.removeClass("fixed-top no-edit-toolbar"); } else if (self.$qlToolbar.offset().top < 75) { self.$qlToolbar.addClass("fixed-top no-edit-toolbar"); diff --git a/src/base/templates/base.html b/src/base/templates/base.html index f2756276e7..06ee636fe9 100644 --- a/src/base/templates/base.html +++ b/src/base/templates/base.html @@ -46,7 +46,7 @@ {% else %} - + {% endif %} @@ -281,7 +281,7 @@

} - +