Skip to content

Commit

Permalink
Merge pull request #1559 from voltan/develop
Browse files Browse the repository at this point in the history
Update libs
  • Loading branch information
voltan authored Sep 6, 2017
2 parents b56355c + ddd6c24 commit 5e04f67
Show file tree
Hide file tree
Showing 43 changed files with 107 additions and 93 deletions.
8 changes: 8 additions & 0 deletions usr/module/widget/config/config.php
Original file line number Diff line number Diff line change
Expand Up @@ -85,4 +85,12 @@
'filter' => 'int',
'value' => 0,
),

'circle_image' => array(
'title' => _t('Circle image'),
'description' => _t('Make images circle'),
'edit' => 'checkbox',
'filter' => 'int',
'value' => 0,
),
);
2 changes: 1 addition & 1 deletion usr/module/widget/config/module.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
// Description, for admin, optional
'description' => _a('Management of custom blocks/widgets.'),
// Version number, required
'version' => '2.1.2',
'version' => '2.1.3',
// Distribution license, required
'license' => 'BSD 3-Clause',
// Logo image, for admin, optional
Expand Down
7 changes: 7 additions & 0 deletions usr/module/widget/src/Api/Block.php
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,12 @@ public function getConfig($type = null)
'filter' => 'int',
'value' => $config['target_new'],
);
$circleImage = array(
'title' => _a('Circle image'),
'edit' => 'checkbox',
'filter' => 'int',
'value' => $config['circle_image'],
);
$configs = array(
'list' => array(
'max_rows' => $maxRows,
Expand All @@ -136,6 +142,7 @@ public function getConfig($type = null)
'height' => $imgHeight($config['image_height_media']),
'max_rows' => $maxRows,
'target_new' => $targetNew,
'circle_image' => $circleImage,
),
'spotlight' => array(
'width' => $imgWidth($config['image_width_spotlight']),
Expand Down
14 changes: 8 additions & 6 deletions usr/module/widget/template/block/carousel/bootstrap.phtml
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,13 @@
$options = (array) $block['options'];
$items = $block['items'] ?: array();
$count = count($items);
$target = empty($options['target_new']) ? '_self' : '_blank';
$imgStyle = '';
$locale = Pi::service('i18n')->getLocale();
$target = $options['target_new'] ? '_self' : '_blank';
$ellipsis = empty($options['max_rows'])
? 'pi-ellipsis'
: 'pi-ellipsis pi-ellipsis-' . intval($options['max_rows']);
$imgStyle = '';

if (!empty($options['width'])) {
$imgStyle .= 'width: ' . $options['width'] . 'px;';
}
Expand Down Expand Up @@ -138,11 +140,11 @@ EOT;
</div>
<?php if ($count > 1) { ?>
<!-- Carousel nav -->
<a class="left carousel-control" href="#<?php echo $carouselId; ?>" data-slide="prev">
<span class="icon-prev fa fa-chevron-left"></span>
<a class="<?php echo in_array($locale, array('fa', 'ar')) ? 'right' : 'left'; ?> carousel-control" href="#<?php echo $carouselId; ?>" data-slide="prev">
<i class="icon-prev fa fa-chevron-left"></i>
</a>
<a class="right carousel-control" href="#<?php echo $carouselId; ?>" data-slide="next">
<span class="icon-next fa fa-chevron-right"></span>
<a class="<?php echo in_array($locale, array('fa', 'ar')) ? 'left' : 'right'; ?> carousel-control" href="#<?php echo $carouselId; ?>" data-slide="next">
<i class="icon-next fa fa-chevron-right"></i>
</a>
<?php } ?>
</div>
Expand Down
12 changes: 6 additions & 6 deletions usr/module/widget/template/block/carousel/owl-carousel.phtml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,11 @@
$options = (array) $block['options'];
$items = $block['items'];
$class = isset($block['class']) ? $block['class'] : '';
$target = empty($options['target_new']) ? '_self' : '_blank';
$target = $options['target_new'] ? '_self' : '_blank';
$number = empty($options['max_rows']) ? 3 : $options['max_rows'];
$carouselId = uniqid('carousel-');
$locale = Pi::service('i18n')->getLocale();


// Set style
$imgStyle = '';
Expand All @@ -19,16 +21,14 @@ if (!empty($imgStyle)) {
}

// Get local
$locale = Pi::service('i18n')->getLocale();
$rtl = (in_array($locale, array('fa', 'ar'))) ? 'true' : 'false';
//$loop = (in_array($locale, array('fa', 'ar'))) ? 'false' : 'true';
$loop = 'true';

// Set arrow
$iconOwlLeft = '<i class="fa fa-angle-left"></i>';
$iconOwlRight = '<i class="fa fa-angle-right"></i>';
$iconOwlLeft = in_array($locale, array('fa', 'ar')) ? '<i class="fa fa-angle-right"></i>' : '<i class="fa fa-angle-left"></i>';
$iconOwlRight = in_array($locale, array('fa', 'ar')) ? '<i class="fa fa-angle-left"></i>' : '<i class="fa fa-angle-right"></i>';

// Set srcipt 2
// Set script
$script = <<<'EOT'
$(document).ready(function($) {
$('#%s').owlCarousel({
Expand Down
2 changes: 1 addition & 1 deletion usr/module/widget/template/block/carousel/parallax.phtml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ $this->HeadLink(array(

// Options: interval, pause, height
$options = (array) $block['options'];
$target = empty($options['target_new']) ? '_self' : '_blank';
$target = $options['target_new'] ? '_self' : '_blank';
$ellipsis = empty($options['max_rows'])
? 'pi-ellipsis'
: 'pi-ellipsis pi-ellipsis-' . intval($options['max_rows']);
Expand Down
2 changes: 1 addition & 1 deletion usr/module/widget/template/block/list/social-network.phtml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php
$options = (array) $block['options'];
$items = (array) $block['items'];
$target = empty($options['target_new']) ? '_self' : '_blank';
$target = $options['target_new'] ? '_self' : '_blank';
?>
<div class="widget-list widget-list-social-network">
<ul class="list-inline">
Expand Down
17 changes: 7 additions & 10 deletions usr/module/widget/template/block/list/title-only.phtml
Original file line number Diff line number Diff line change
@@ -1,39 +1,36 @@
<?php
$options = (array) $block['options'];
$items = (array) $block['items'];
$target = empty($options['target_new']) ? '_self' : '_blank';
$target = $options['target_new'] ? '_self' : '_blank';
switch ($options['max_rows']) {
case '0':
$rows = 'col-md-12 col-xs-12';
break;

case '1':
$rows = 'col-md-12 col-xs-12';
break;

case '2':
$rows = 'col-md-6 col-xs-6';
$rows = 'col-md-6 col-xs-12';
break;

case '3':
$rows = 'col-md-4 col-xs-4';
$rows = 'col-md-4 col-xs-12';
break;

case '4':
$rows = 'col-md-3 col-xs-4';
$rows = 'col-md-3 col-xs-12';
break;

case '6':
$rows = 'col-md-2 col-xs-3';
$rows = 'col-md-2 col-xs-12';
break;

case '12':
$rows = 'col-md-1 col-xs-2';
$rows = 'col-md-1 col-xs-12';
break;
}
?>
<div class="widget-list widget-list-title">
<ul class="clearfix">
<div class="row clearfix">
<?php foreach($items as $item) { ?>
<li class="<?php echo $rows; ?>">
<?php if (!empty($item['link'])) { ?>
Expand Down
5 changes: 1 addition & 4 deletions usr/module/widget/template/block/list/title-summary.phtml
Original file line number Diff line number Diff line change
@@ -1,12 +1,9 @@
<?php
$options = (array) $block['options'];
$items = (array) $block['items'];
$target = empty($options['target_new']) ? '_self' : '_blank';
$target = $options['target_new'] ? '_self' : '_blank';
switch ($options['max_rows']) {
case '0':
$rows = 'col-md-12 col-xs-12';
break;

case '1':
$rows = 'col-md-12 col-xs-12';
break;
Expand Down
7 changes: 4 additions & 3 deletions usr/module/widget/template/block/media/image-left.phtml
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
<?php
$options = (array) $block['options'];
$items = (array) $block['items'];
$target = empty($options['target_new']) ? '_self' : '_blank';
$target = $options['target_new'] ? '_self' : '_blank';
$circle = $options['circle_image'] ? 'img-circle' : '';
$ellipsis = empty($options['max_rows'])
? 'pi-ellipsis'
: 'pi-ellipsis pi-ellipsis-' . intval($options['max_rows']);
Expand All @@ -17,11 +18,11 @@ if (!empty($imgStyle)) {
}
$imgRight = empty($options['image_right']) ? false : true;
?>
<div class="widget-media-list">
<div class="widget-list widget-list-media">
<?php foreach($items as $item) { ?>
<div class="media">
<a class="<?php echo $imgRight ? 'pull-right' : 'pull-left'; ?>" href="<?php echo $item['link']; ?>" target="<?php echo $target; ?>">
<img class="media-object" src="<?php echo $item['image']; ?>" alt="<?php echo _escape($item['caption']); ?>" <?php echo $imgStyle; ?>>
<img class="media-object img-responsive <?php echo $circle ?>" src="<?php echo $item['image']; ?>" alt="<?php echo _escape($item['caption']); ?>" <?php echo $imgStyle; ?>>
</a>
<div class="media-body">
<h4 class="media-heading">
Expand Down
13 changes: 6 additions & 7 deletions usr/module/widget/template/block/media/image-list.phtml
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
<?php
$options = (array) $block['options'];
$items = (array) $block['items'];
$target = empty($options['target_new']) ? '_self' : '_blank';
$target = $options['target_new'] ? '_self' : '_blank';
$circle = $options['circle_image'] ? 'img-circle' : '';

switch ($options['max_rows']) {
case '0':
$rows = 'col-md-12 col-xs-12';
break;

case '1':
$rows = 'col-md-12 col-xs-12';
break;
Expand Down Expand Up @@ -40,10 +39,10 @@ switch ($options['max_rows']) {
<div class="widget-list-media-single-image">
<?php if (!empty($item['link'])) { ?>
<a href="<?php echo $item['link']; ?>" title="<?php echo _escape($item['caption']); ?>" target="<?php echo $target; ?>">
<img class="img-responsive" src="<?php echo $item['image']; ?>" alt="<?php echo _escape($item['caption']); ?>">
<img class="img-responsive <?php echo $circle ?>" src="<?php echo $item['image']; ?>" alt="<?php echo _escape($item['caption']); ?>">
</a>
<?php } else { ?>
<img class="img-responsive" src="<?php echo $item['image']; ?>" alt="<?php echo _escape($item['caption']); ?>">
<img class="img-responsive <?php echo $circle ?>" src="<?php echo $item['image']; ?>" alt="<?php echo _escape($item['caption']); ?>">
<?php } ?>
</div>
<?php if (!empty($item['summary'])) { ?>
Expand All @@ -58,7 +57,7 @@ switch ($options['max_rows']) {
<?php } ?>
</h4>
<?php } ?>
<div class="widget-list-media-single-summery clearfix text-left">
<div class="widget-list-media-single-summery clearfix">
<?php echo $item['summary']; ?>
</div>
<?php } ?>
Expand Down
2 changes: 1 addition & 1 deletion usr/module/widget/template/block/spotlight/spot-top.phtml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php
$options = (array) $block['options'];
$items = (array) $block['items'];
$target = empty($options['target_new']) ? '_self' : '_blank';
$target = $options['target_new'] ? '_self' : '_blank';
$ellipsis = empty($options['max_rows'])
? 'pi-ellipsis'
: 'pi-ellipsis pi-ellipsis-' . intval($options['max_rows']);
Expand Down
7 changes: 7 additions & 0 deletions www/static/vendor/jquery/changelog.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@

jQuery/jQueryUI changelog

September 6th, 2017
================
1. Upgrade jQuery to 3.2.1
2. Upgrade jQueryUI to 1.11.4
3. Upgrade Owl carousel to 2.2.1
4. Upgrade Modernizr to 3.5.0

June 22th, 2016
================
1. Upgrade jQuery to 1.12.4 (last version of 1.x branch, 3x is out !)
Expand Down
Loading

0 comments on commit 5e04f67

Please sign in to comment.