Permalink
Browse files

Fixed selected item display in publish section.

  • Loading branch information...
1 parent 297575b commit c4299f54d01abc97a062e2a77f2663c33982c1f6 @vlad-ghita committed Jun 7, 2011
Showing with 6 additions and 6 deletions.
  1. +2 −2 assets/selectbox_link_field_combo.publish.js
  2. +4 −4 fields/field.selectbox_link_combo.php
@@ -11,10 +11,10 @@
optgroup = select.find('optgroup'),
options = optgroup.find('option').remove(),
parent = $('#field-' + options.data('parent') + ' select');
-
+
// Parent changes context
parent.change(function(event) {
- var selected = parent.val(),
+ var selected = $.isArray(parent.val()) ? parent.val() : [parent.val()],
current = optgroup.find('option').remove();
// Remove current selection
@@ -395,12 +395,12 @@ public function displayPublishPanel(&$wrapper, $data=NULL, $flagWithError=NULL,
$entry_ids = array();
- if(!is_null($data['relation_field_id'])){
- if(!is_array($data['relation_field_id'])){
- $entry_ids = array($data['relation_field_id']);
+ if(!is_null($data['relation_id'])){
+ if(!is_array($data['relation_id'])){
+ $entry_ids = array($data['relation_id']);
}
else{
- $entry_ids = array_values($data['relation_field_id']);
+ $entry_ids = array_values($data['relation_id']);
}
}

0 comments on commit c4299f5

Please sign in to comment.