Skip to content

Commit

Permalink
Upgrade to release v1.4.0
Browse files Browse the repository at this point in the history
  • Loading branch information
kartik-v committed Nov 25, 2014
1 parent 7f50b2d commit c479b99
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 9 deletions.
8 changes: 8 additions & 0 deletions CHANGE.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
Version 1.4.0
=============
**Date:** 25-Nov-2014

- (enh #17): Updated Russian translations
- (bug #18): Plugin data attributes not set because of input rendering sequence.
- (enh #19): Enhance widget to use updated plugin registration from Krajee base

Version 1.3.0
=============
**Date:** 21-Nov-2014
Expand Down
15 changes: 9 additions & 6 deletions DateRangePicker.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
/**
* @copyright Copyright © Kartik Visweswaran, Krajee.com, 2014
* @package yii2-date-range
* @version 1.3.0
* @version 1.4.0
*/

namespace kartik\daterange;
Expand All @@ -25,7 +25,10 @@
*/
class DateRangePicker extends \kartik\base\InputWidget
{
const PLUGIN_NAME = 'daterangepicker';
/**
* @inherit doc
*/
protected $_pluginName = 'daterangepicker';

/**
* @var string the javascript callback to be passed to the plugin constructor.
Expand Down Expand Up @@ -138,8 +141,9 @@ public function init()
$this->containerTemplate = str_replace('{value}', $value, $this->containerTemplate);

$this->initRange();
echo $this->renderInput();
$this->containerOptions['id'] = $this->options['id'] . '-container';
$this->registerAssets();
echo $this->renderInput();
}

/**
Expand Down Expand Up @@ -237,7 +241,6 @@ protected function renderInput()
Html::addCssClass($this->options, 'form-control');
return $this->getInput('textInput');
}
$this->containerOptions['id'] = $this->options['id'] . '-container';
$tag = ArrayHelper::remove($this->containerOptions, 'tag', 'div');
$content = str_replace('{input}', $this->getInput('hiddenInput'), $this->containerTemplate);
return Html::tag($tag, $content, $this->containerOptions);
Expand Down Expand Up @@ -279,11 +282,11 @@ function(start, end) {
}
JS;
} else {
$this->registerPlugin(self::PLUGIN_NAME, $id);
$this->registerPlugin($this->_pluginName, $id);
return;
}
}
$this->registerPlugin(self::PLUGIN_NAME, $id, null, $this->callback);
$this->registerPlugin($this->_pluginName, $id, null, $this->callback);
}

/**
Expand Down
2 changes: 1 addition & 1 deletion DateRangePickerAsset.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
/**
* @copyright Copyright © Kartik Visweswaran, Krajee.com, 2014
* @package yii2-date-range
* @version 1.3.0
* @version 1.4.0
*/

namespace kartik\daterange;
Expand Down
2 changes: 1 addition & 1 deletion LanguageAsset.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
/**
* @copyright Copyright © Kartik Visweswaran, Krajee.com, 2014
* @package yii2-date-range
* @version 1.3.0
* @version 1.4.0
*/

namespace kartik\daterange;
Expand Down
2 changes: 1 addition & 1 deletion MomentAsset.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
/**
* @copyright Copyright © Kartik Visweswaran, Krajee.com, 2014
* @package yii2-date-range
* @version 1.3.0
* @version 1.4.0
*/

namespace kartik\daterange;
Expand Down

0 comments on commit c479b99

Please sign in to comment.