Author: Jonathan.Wage
Date: 2010-01-30 22:23:23 +0100 (Sat, 30 Jan 2010)
New Revision: 27340
Modified:
plugins/sfSympalPlugin/trunk/lib/plugins/sfSympalEditorPlugin/modules/sympal_edit_slot/lib/Basesympal_edit_slotActions.class.php
plugins/sfSympalPlugin/trunk/lib/plugins/sfSympalEditorPlugin/modules/sympal_edit_slot/templates/_slot_editor.php
plugins/sfSympalPlugin/trunk/lib/plugins/sfSympalEditorPlugin/web/js/editor.js
Log:
[1.4][sfSympalPlugin][1.0] Fixing content slot saving to not assume one content
id for all slots
Modified:
plugins/sfSympalPlugin/trunk/lib/plugins/sfSympalEditorPlugin/modules/sympal_edit_slot/lib/Basesympal_edit_slotActions.class.php
===================================================================
---
plugins/sfSympalPlugin/trunk/lib/plugins/sfSympalEditorPlugin/modules/sympal_edit_slot/lib/Basesympal_edit_slotActions.class.php
2010-01-30 21:00:37 UTC (rev 27339)
+++
plugins/sfSympalPlugin/trunk/lib/plugins/sfSympalEditorPlugin/modules/sympal_edit_slot/lib/Basesympal_edit_slotActions.class.php
2010-01-30 21:23:23 UTC (rev 27340)
@@ -32,10 +32,11 @@
$this->failedContentSlots = array();
$this->errors = array();
- $content =
Doctrine_Core::getTable('sfSympalContent')->find($request->getParameter('content_id'));
- $slotIds = $request->getParameter('slots');
+ $slotIds = $request->getParameter('slot_ids');
+ $contentIds = $request->getParameter('content_ids');
foreach ($slotIds as $slotId)
{
+ $content =
Doctrine_Core::getTable('sfSympalContent')->find($contentIds[$slotId]);
$contentSlot =
Doctrine_Core::getTable('sfSympalContentSlot')->find($slotId);
$contentSlot->setContentRenderedFor($content);
$form = $contentSlot->getEditForm();
Modified:
plugins/sfSympalPlugin/trunk/lib/plugins/sfSympalEditorPlugin/modules/sympal_edit_slot/templates/_slot_editor.php
===================================================================
---
plugins/sfSympalPlugin/trunk/lib/plugins/sfSympalEditorPlugin/modules/sympal_edit_slot/templates/_slot_editor.php
2010-01-30 21:00:37 UTC (rev 27339)
+++
plugins/sfSympalPlugin/trunk/lib/plugins/sfSympalEditorPlugin/modules/sympal_edit_slot/templates/_slot_editor.php
2010-01-30 21:23:23 UTC (rev 27340)
@@ -4,6 +4,7 @@
<div class="sympal_content_slot_editor sympal_form">
<form>
+ <input type="hidden" name="content_ids[<?php echo $contentSlot->getId()
?>]" value="<?php echo $contentSlot->getContentRenderedFor()->getId() ?>" />
<?php if (!$contentSlot->is_column): ?>
<a class="sympal_change_slot_type" onClick="return false;">>> <?php echo
__('Change Slot Type') ?></a>
<div class="sympal_change_slot_type_dropdown">
Modified:
plugins/sfSympalPlugin/trunk/lib/plugins/sfSympalEditorPlugin/web/js/editor.js
===================================================================
---
plugins/sfSympalPlugin/trunk/lib/plugins/sfSympalEditorPlugin/web/js/editor.js
2010-01-30 21:00:37 UTC (rev 27339)
+++
plugins/sfSympalPlugin/trunk/lib/plugins/sfSympalEditorPlugin/web/js/editor.js
2010-01-30 21:23:23 UTC (rev 27340)
@@ -138,7 +138,7 @@
$('.sympal_content_slot form').each(function() {
var form = $(this);
var slotId = form.parents('span').find('.content_slot_id').attr('value');
- queryString = queryString + '&' + form.formSerialize() + '&slots[]=' +
slotId;
+ queryString = queryString + '&' + form.formSerialize() + '&slot_ids[]=' +
slotId;
});
var url = $('#sympal_save_slots_url').attr('value');
--
You received this message because you are subscribed to the Google Groups
"symfony SVN" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/symfony-svn?hl=en.