Skip to content

Commit

Permalink
apply fixes from @dgt41
Browse files Browse the repository at this point in the history
  • Loading branch information
brianteeman committed Aug 5, 2015
1 parent cb663ef commit 285f800
Show file tree
Hide file tree
Showing 3 changed files with 47 additions and 2 deletions.
Expand Up @@ -16,6 +16,21 @@
);
$published = $this->state->get('filter.published');
$extension = $this->escape($this->state->get('filter.extension'));

JFactory::getDocument()->addScriptDeclaration(
'
jQuery(document).ready(function($){
$("#batch-copy-move").css("display", "none");
$("#batch-category-id").on("change", function(){
if ($("#batch-category-id").val() != 0 || $("#batch-category-id").val() != "") {
$("#batch-copy-move").css("display", "block");
} else {
$("#batch-copy-move").css("display", "none");
}
});
});
'
);
?>

<div class="row-fluid">
Expand Down Expand Up @@ -44,7 +59,7 @@
</select>
</div>
</div>
<div class="control-group radio">
<div id="batch-copy-move" class="control-group radio">
<?php echo JText::_('JLIB_HTML_BATCH_MOVE_QUESTION'); ?>
<?php echo JHtml::_('select.radiolist', $options, 'batch[move_copy]', '', 'value', 'text', 'm'); ?>
</div>
Expand Down
Expand Up @@ -13,6 +13,21 @@
JHtml::_('select.option', 'm', JText::_('JLIB_HTML_BATCH_MOVE'))
);
$published = $this->state->get('filter.published');

JFactory::getDocument()->addScriptDeclaration(
'
jQuery(document).ready(function($){
$("#batch-copy-move").css("display", "none");
$("#batch-menu-id").on("change", function(){
if ($("#batch-menu-id").val() != 0 || $("#batch-menu-id").val() != "") {
$("#batch-copy-move").css("display", "block");
} else {
$("#batch-copy-move").css("display", "none");
}
});
});
'
);
?>

<div class="row-fluid">
Expand Down
17 changes: 16 additions & 1 deletion libraries/cms/html/batch.php
Expand Up @@ -61,6 +61,21 @@ public static function item($extension)
JHtml::_('select.option', 'm', JText::_('JLIB_HTML_BATCH_MOVE'))
);

JFactory::getDocument()->addScriptDeclaration(
'
jQuery(document).ready(function($){
$("#batch-copy-move").css("display", "none");
$("#batch-category-id").on("change", function(){
if ($("#batch-category-id").val() != 0 || $("#batch-category-id").val() != "") {
$("#batch-copy-move").css("display", "block");
} else {
$("#batch-copy-move").css("display", "none");
}
});
});
'
);

// Create the batch selector to change select the category by which to move or copy.
return
'<label id="batch-choose-action-lbl" for="batch-choose-action">' . JText::_('JLIB_HTML_BATCH_MENU_LABEL') . '</label>'
Expand All @@ -70,7 +85,7 @@ public static function item($extension)
. JHtml::_('select.options', JHtml::_('category.options', $extension))
. '</select>'
. '</div>'
. '<div id="batch-move-copy" class="control-group radio">'
. '<div id="batch-copy-move" class="control-group radio">'
. JText::_('JLIB_HTML_BATCH_MOVE_QUESTION')
. JHtml::_('select.radiolist', $options, 'batch[move_copy]', '', 'value', 'text', 'm')
. '</div>';
Expand Down

0 comments on commit 285f800

Please sign in to comment.