Skip to content

Commit

Permalink
Merge branch 'staging' of https://github.com/joomla/joomla-cms into s…
Browse files Browse the repository at this point in the history
…taging
  • Loading branch information
shamsbd71 committed Jul 6, 2015
2 parents ac76274 + 72ac015 commit 7e428ec
Show file tree
Hide file tree
Showing 55 changed files with 721 additions and 540 deletions.
18 changes: 3 additions & 15 deletions .travis.yml
Expand Up @@ -16,11 +16,8 @@ services:
- redis-server

before_script:
# - composer update
# Install PHPCS to validate code standards
- composer require squizlabs/php_codesniffer 1.5.6
# Install Cache_Lite for testing
- composer require pear/cache_lite 1.7.16
# Make sure all dev dependencies are installed
- composer install
# Set up databases for testing
- mysql -e 'create database joomla_ut;'
- mysql joomla_ut < tests/unit/schema/mysql.sql
Expand All @@ -34,18 +31,9 @@ before_script:
- sh -c "if [ '$TRAVIS_PHP_VERSION' != '7.0' ]; then phpenv config-add build/travis/phpenv/redis.ini; fi"

script:
- phpunit --configuration travisci-phpunit.xml
- libraries/vendor/bin/phpunit --configuration travisci-phpunit.xml
- sh -c "if [ '$TRAVIS_PHP_VERSION' != '7.0' ]; then libraries/vendor/bin/phpcs --report=full --extensions=php -p --standard=build/phpcs/Joomla .; fi"

branches:
except:
- 2.5.x

notifications:
webhooks:
urls:
- https://webhooks.gitter.im/e/18687d008d633d02aa84
on_success: change # options: [always|never|change] default: always
on_failure: always # options: [always|never|change] default: always
on_start: false # default: false

25 changes: 18 additions & 7 deletions administrator/components/com_banners/views/banner/tmpl/edit.php
Expand Up @@ -22,13 +22,24 @@
}
};
jQuery(document).ready(function ($){
$("#jform_type").change(function(){
if($(this).val() == 1) {
$("#image").css("display", "none");
$("#custom").css("display", "block");
} else {
$("#image").css("display", "block");
$("#custom").css("display", "none");
$("#jform_type").on("change", function (a, params) {
var v = typeof(params) !== "object" ? $("#jform_type").val() : params.selected;
var img_url = $("#image, #url");
var custom = $("#custom");
switch (v) {
case "0":
// Image
img_url.show();
custom.hide();
break;
case "1":
// Custom
img_url.hide();
custom.show();
break;
}
}).trigger("change");
});
Expand Down
Expand Up @@ -48,7 +48,6 @@ public function display($tpl = null)

$this->addToolbar();
JHtml::_('jquery.framework');
JHtml::_('script', 'media/com_banners/banner.js');
parent::display($tpl);
}

Expand Down
Expand Up @@ -72,85 +72,91 @@
</div>
</fieldset>

<table class="table table-striped" id="categoryList">
<thead>
<tr>
<th>
<?php echo JHtml::_('grid.sort', 'JGLOBAL_TITLE', 'a.title', $listDirn, $listOrder); ?>
</th>
<th width="10%" class="nowrap hidden-phone">
<?php echo JHtml::_('grid.sort', 'JGRID_HEADING_ACCESS', 'a.access', $listDirn, $listOrder); ?>
</th>
<th width="5%" class="nowrap hidden-phone">
<?php
echo JHtml::_(
'grid.sort',
'JGRID_HEADING_LANGUAGE',
'language',
$this->state->get('list.direction'),
$this->state->get('list.ordering')
);
?>
</th>
<th width="1%" class="nowrap hidden-phone">
<?php echo JHtml::_('grid.sort', 'JGRID_HEADING_ID', 'a.id', $listDirn, $listOrder); ?>
</th>
</tr>
</thead>
<tfoot>
<tr>
<td colspan="15">
<?php echo $this->pagination->getListFooter(); ?>
</td>
</tr>
</tfoot>
<tbody>
<?php foreach ($this->items as $i => $item) : ?>
<?php if ($item->language && JLanguageMultilang::isEnabled())
{
$tag = strlen($item->language);
if ($tag == 5)
{
$lang = substr($item->language, 0, 2);
}
elseif ($tag == 6)
<?php if (empty($this->items)) : ?>
<div class="alert alert-no-items">
<?php echo JText::_('JGLOBAL_NO_MATCHING_RESULTS'); ?>
</div>
<?php else : ?>
<table class="table table-striped" id="categoryList">
<thead>
<tr>
<th>
<?php echo JHtml::_('grid.sort', 'JGLOBAL_TITLE', 'a.title', $listDirn, $listOrder); ?>
</th>
<th width="10%" class="nowrap hidden-phone">
<?php echo JHtml::_('grid.sort', 'JGRID_HEADING_ACCESS', 'a.access', $listDirn, $listOrder); ?>
</th>
<th width="5%" class="nowrap hidden-phone">
<?php
echo JHtml::_(
'grid.sort',
'JGRID_HEADING_LANGUAGE',
'language',
$this->state->get('list.direction'),
$this->state->get('list.ordering')
);
?>
</th>
<th width="1%" class="nowrap hidden-phone">
<?php echo JHtml::_('grid.sort', 'JGRID_HEADING_ID', 'a.id', $listDirn, $listOrder); ?>
</th>
</tr>
</thead>
<tfoot>
<tr>
<td colspan="15">
<?php echo $this->pagination->getListFooter(); ?>
</td>
</tr>
</tfoot>
<tbody>
<?php foreach ($this->items as $i => $item) : ?>
<?php if ($item->language && JLanguageMultilang::isEnabled())
{
$lang = substr($item->language, 0, 3);
$tag = strlen($item->language);
if ($tag == 5)
{
$lang = substr($item->language, 0, 2);
}
elseif ($tag == 6)
{
$lang = substr($item->language, 0, 3);
}
else
{
$lang = "";
}
}
else
elseif (!JLanguageMultilang::isEnabled())
{
$lang = "";
}
}
elseif (!JLanguageMultilang::isEnabled())
{
$lang = "";
}
?>
<tr class="row<?php echo $i % 2; ?>">
<td>
<?php echo str_repeat('<span class="gi">&mdash;</span>', $item->level - 1) ?>
<a href="javascript:void()" onclick="if (window.parent) window.parent.<?php echo $this->escape($function); ?>('<?php echo $item->id; ?>', '<?php echo $this->escape(addslashes($item->title)); ?>', null, '<?php echo $this->escape(ContentHelperRoute::getCategoryRoute($item->id, $item->language)); ?>', '<?php echo $this->escape($lang); ?>', null);">
<?php echo $this->escape($item->title); ?>
</a>
</td>
<td class="small hidden-phone">
<?php echo $this->escape($item->access_level); ?>
</td>
<td class="center nowrap">
<?php if ($item->language == '*'): ?>
<?php echo JText::alt('JALL', 'language'); ?>
<?php else: ?>
<?php echo $item->language_title ? $this->escape($item->language_title) : JText::_('JUNDEFINED'); ?>
<?php endif; ?>
</td>
<td class="center hidden-phone">
<?php echo (int) $item->id; ?>
</td>
</tr>
<?php endforeach; ?>
</tbody>
</table>
?>
<tr class="row<?php echo $i % 2; ?>">
<td>
<?php echo str_repeat('<span class="gi">&mdash;</span>', $item->level - 1) ?>
<a href="javascript:void()" onclick="if (window.parent) window.parent.<?php echo $this->escape($function); ?>('<?php echo $item->id; ?>', '<?php echo $this->escape(addslashes($item->title)); ?>', null, '<?php echo $this->escape(ContentHelperRoute::getCategoryRoute($item->id, $item->language)); ?>', '<?php echo $this->escape($lang); ?>', null);">
<?php echo $this->escape($item->title); ?>
</a>
</td>
<td class="small hidden-phone">
<?php echo $this->escape($item->access_level); ?>
</td>
<td class="center nowrap">
<?php if ($item->language == '*'): ?>
<?php echo JText::alt('JALL', 'language'); ?>
<?php else: ?>
<?php echo $item->language_title ? $this->escape($item->language_title) : JText::_('JUNDEFINED'); ?>
<?php endif; ?>
</td>
<td class="center hidden-phone">
<?php echo (int) $item->id; ?>
</td>
</tr>
<?php endforeach; ?>
</tbody>
</table>
<?php endif; ?>

<input type="hidden" name="extension" value="<?php echo $extension; ?>" />
<input type="hidden" name="task" value="" />
Expand Down

0 comments on commit 7e428ec

Please sign in to comment.