From 68665b6f2b9cb96f958a7f628e01e38b3daedd23 Mon Sep 17 00:00:00 2001 From: vangheem Date: Sat, 30 May 2015 11:45:02 -0500 Subject: [PATCH] Only use edit overlay if available for editing comments. We will need a plone 5 alternative --- CHANGES.rst | 3 ++- .../app/discussion/browser/javascripts/comments.js | 14 ++++++++------ 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/CHANGES.rst b/CHANGES.rst index 41afb28..03e8de3 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -4,7 +4,8 @@ Changelog 2.4.3 (unreleased) ------------------ -- Nothing changed yet. +- Only use edit overlay if available for editing comments + [vangheem] 2.4.2 (2015-05-04) diff --git a/plone/app/discussion/browser/javascripts/comments.js b/plone/app/discussion/browser/javascripts/comments.js index 0b56d51..32eb30a 100644 --- a/plone/app/discussion/browser/javascripts/comments.js +++ b/plone/app/discussion/browser/javascripts/comments.js @@ -189,12 +189,14 @@ require([ // jshint ignore:line /********************************************************************** * Edit a comment **********************************************************************/ - $('form[name="edit"]').prepOverlay({ - cssclass: 'overlay-edit-comment', - width: '60%', - subtype: 'ajax', - filter: '#content>*' - }); + if($.fn.prepOverlay){ + $('form[name="edit"]').prepOverlay({ + cssclass: 'overlay-edit-comment', + width: '60%', + subtype: 'ajax', + filter: '#content>*' + }); + } /********************************************************************** * Delete a comment and its answers.