Skip to content

Commit

Permalink
Picklist fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
cheesegrits committed Dec 11, 2015
1 parent aa09660 commit 4555653
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
$d = $displayData;
FabrikHelperHTML::stylesheet(COM_FABRIK_LIVESITE . 'plugins/fabrik_element/picklist/picklist.css');
?>
<div class="<?php echo $d->name; ?>" id="<?php echo $d->id; ?>">
<div class="<?php echo $d->name; ?>_container" id="<?php echo $d->id; ?>_container">
<div class="row">
<div class="span6 <?php echo $d->errorCSS; ?>">

Expand All @@ -22,7 +22,7 @@
endforeach;
?>

<li class="emptyplicklist" style="display:none"><?php echo FabrikHelperHTML::icon('icon-move'); ?>
<li class="emptypicklist" style="display:none"><?php echo FabrikHelperHTML::icon('icon-move'); ?>
<?php echo FText::_('PLG_ELEMENT_PICKLIST_DRAG_OPTIONS_HERE'); ?>
</li>
</ul>
Expand All @@ -41,12 +41,12 @@
endforeach;
?>

<li class="emptyplicklist" style="display:none"><?php echo FabrikHelperHTML::icon('icon-move'); ?>
<li class="emptypicklist" style="display:none"><?php echo FabrikHelperHTML::icon('icon-move'); ?>
<?php echo FText::_('PLG_ELEMENT_PICKLIST_DRAG_OPTIONS_HERE'); ?>
</li>
</ul>
</div>
</div>
<input type="hidden" name="<?php echo $d->name; ?>" value="<?php echo $d->value; ?>" id=<?php echo $d->id; ?>" />
<input type="hidden" name="<?php echo $d->name; ?>" value="<?php echo htmlspecialchars($d->value, ENT_QUOTES); ?>" id="<?php echo $d->id; ?>" />
<?php echo $d->addOptionsUi; ?>
</div>
2 changes: 1 addition & 1 deletion plugins/fabrik_element/picklist/picklist-min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions plugins/fabrik_element/picklist/picklist.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ var FbPicklist = new Class({
}.bind(this));
}
});
var notices = [from.getElement('li.emptyplicklist'), to.getElement('li.emptyplicklist')];
var notices = [from.getElement('li.emptypicklist'), to.getElement('li.emptypicklist')];
this.sortable.removeItems(notices);
this.showNotices();
}
Expand Down Expand Up @@ -89,7 +89,7 @@ var FbPicklist = new Class({
for (i = 0; i < lists.length; i++) {
to = lists[i];
limit = (to === element || typeOf(element) === 'null') ? 1 : 2;
var notice = to.getElement('li.emptyplicklist');
var notice = to.getElement('li.emptypicklist');
var lis = to.getElements('li');
lis.length > limit ? notice.hide() : notice.show();
}
Expand All @@ -98,7 +98,7 @@ var FbPicklist = new Class({
setData: function () {
var c = this.getContainer(),
to = c.getElement('.toList'),
lis = to.getElements('li'),
lis = to.getElements('li[class!=emptypicklist]'),
v = lis.map(
function (item, index) {
return item.id
Expand Down

1 comment on commit 4555653

@cheesegrits
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixes #1595

Please sign in to comment.