plone.app.event/thet-js-init: fix wrong reference

Johannes Raggam <jenkins-z4DKO/[email protected]>
Newsgroups gmane.comp.web.zope.plone.cvs
Message-ID <[email protected]>
Repository: plone.app.event
Branch: refs/heads/thet-js-init
Date: 2017-07-14T14:57:52+02:00
Author: Johannes Raggam (thet) <[email protected]>
Commit: https://github.com/plone/plone.app.event/commit/d767f9705accc77c7066c714244af97108c25dae

fix wrong reference

Files changed:
M plone/app/event/browser/resources/event.js

diff --git a/plone/app/event/browser/resources/event.js b/plone/app/event/browser/resources/event.js
index 0f5219fd..8abc6f52 100644
--- a/plone/app/event/browser/resources/event.js
+++ b/plone/app/event/browser/resources/event.js
@@ -73,7 +73,7 @@
       }
 
       // delta in days
-      start_end_delta = (end_datetime - start_datetime) / 1000 / 60;
+      this.start_end_delta = (end_datetime - start_datetime) / 1000 / 60;
     },
 
     updateEndDate: function (start_container, end_container) {
@@ -83,7 +83,7 @@
       }
 
       var new_end_date = new Date(start_date);
-      new_end_date.setMinutes(start_date.getMinutes() + start_end_delta);
+      new_end_date.setMinutes(start_date.getMinutes() + this.start_end_delta);
 
       $('.pattern-pickadate-date', end_container)
         .pickadate('picker')



------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.