r252760 - in Products.rendezvous/trunk: . Products/rendezvous/browser Products/rendezvous/browser/templates docs
"Thomas Desvenain" <svn-changes-z4DKO/[email protected]> Thu, 3 Apr 2014 21:53:46 +0000 (UTC)
| Newsgroups | gmane.comp.web.zope.plone.collective.cvs |
|---|---|
| Message-ID | <[email protected]> |
Author: thomasdesvenain
Date: Thu Apr 3 21:53:45 2014
New Revision: 252760
Modified:
Products.rendezvous/trunk/ (props changed)
Products.rendezvous/trunk/Products/rendezvous/browser/RDV_RendezVousEdit.py
Products.rendezvous/trunk/Products/rendezvous/browser/rendezvous.js
Products.rendezvous/trunk/Products/rendezvous/browser/templates/RDV_RendezVousEdit.pt
Products.rendezvous/trunk/docs/HISTORY.txt
Log:
On edit view, ajax behavior on date selection and on columns adding.
Modified: Products.rendezvous/trunk/Products/rendezvous/browser/RDV_RendezVousEdit.py
==============================================================================
--- Products.rendezvous/trunk/Products/rendezvous/browser/RDV_RendezVousEdit.py (original)
+++ Products.rendezvous/trunk/Products/rendezvous/browser/RDV_RendezVousEdit.py Thu Apr 3 21:53:45 2014
@@ -93,7 +93,7 @@
nb = self.request.SESSION['rendezvous']['nb_columns'][uid]
except KeyError:
nb = self.NB_COLUMNS
- for date, propositions in propositionsbydates.items():
+ for propositions in propositionsbydates.values():
nb = max(len(propositions), nb)
return nb
Modified: Products.rendezvous/trunk/Products/rendezvous/browser/rendezvous.js
==============================================================================
--- Products.rendezvous/trunk/Products/rendezvous/browser/rendezvous.js (original)
+++ Products.rendezvous/trunk/Products/rendezvous/browser/rendezvous.js Thu Apr 3 21:53:45 2014
@@ -10,9 +10,25 @@
rendezvous.initchoicesselection = function(){
jq('#rendezvous-dates-select a.calendar-date').click(function(){
/* first submit the form in case it has been modified */
+ var datelink = jq(this);
var formData = jq('form#rendezvous-edit').serialize();
var formAction = jq('form#rendezvous-edit').attr('action');
- jq.post(formAction, formData, function(){});
+ jq.post(formAction, formData, function(){
+ jq.get(datelink.attr('href') + '&ajax_load=1', function(html){
+ jq('#rendezvous-edit').html(jq(html).find('#rendezvous-edit').html());
+ rendezvous.initchoicesselection();
+ });
+ });
+ return false;
+ });
+ jq('#rendezvous-hours-select input[name="extend"]').click(function(){
+ var formData = jq('form#rendezvous-edit').serialize();
+ var formAction = jq('form#rendezvous-edit').attr('action') + '?extend=1';
+ jq.post(formAction, formData, function(html){
+ jq('#rendezvous-edit').html(jq(html).find('#rendezvous-edit').html());
+ rendezvous.initchoicesselection();
+ });
+ return false;
});
};
Modified: Products.rendezvous/trunk/Products/rendezvous/browser/templates/RDV_RendezVousEdit.pt
==============================================================================
--- Products.rendezvous/trunk/Products/rendezvous/browser/templates/RDV_RendezVousEdit.pt (original)
+++ Products.rendezvous/trunk/Products/rendezvous/browser/templates/RDV_RendezVousEdit.pt Thu Apr 3 21:53:45 2014
@@ -5,7 +5,8 @@
<body>
<div metal:fill-slot="main">
- <form id="rendezvous-edit" method="post" action="." tal:attributes="action string:${context/absolute_url}/@@save_changes">
+ <form id="rendezvous-edit" class="allowMultiSubmit"
+ method="post" action="." tal:attributes="action string:${context/absolute_url}/@@save_changes">
<p class="rendezvous-help" i18n:translate="help_rendezvous">
You can create a poll to organize a meeting or an event.
Fill the rendez-vous subject and select your dates,
Modified: Products.rendezvous/trunk/docs/HISTORY.txt
==============================================================================
--- Products.rendezvous/trunk/docs/HISTORY.txt (original)
+++ Products.rendezvous/trunk/docs/HISTORY.txt Thu Apr 3 21:53:45 2014
@@ -4,7 +4,8 @@
1.4.2 (unreleased)
------------------
-- Nothing changed yet.
+- On edit view, ajax behavior on date selection and on columns adding.
+ [thomasdesvenain]
1.4.1 (2013-10-09)
------------------------------------------------------------------------------