Skip to content

Commit

Permalink
Update to release v1.0.1
Browse files Browse the repository at this point in the history
  • Loading branch information
kartik-v committed Jan 12, 2016
1 parent b6538d1 commit fa230ca
Show file tree
Hide file tree
Showing 10 changed files with 53 additions and 42 deletions.
12 changes: 10 additions & 2 deletions CHANGE.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
version 1.0.0
=============
Change Log: `yii2-widget-timepicker`
====================================

## Version 1.0.1

**Date:** 12-Jan-2016

- enh #7: Enhancements for PJAX based reinitialization. Complements enhancements in kartik-v/yii2-krajee-base#52 and kartik-v/yii2-krajee-base#53.

## Version 1.0.0

**Date:** 08-Nov-2014

Expand Down
2 changes: 1 addition & 1 deletion LICENSE.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Copyright (c) 2014, Kartik Visweswaran
Copyright (c) 2014 - 2016, Kartik Visweswaran
Krajee.com
All rights reserved.

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ to the ```require``` section of your `composer.json` file.

## Latest Release

> NOTE: The latest version of the module is v1.0.0 released on 08-Nov-2014. Refer the [CHANGE LOG](https://github.com/kartik-v/yii2-widget-timepicker/blob/master/CHANGE.md) for details.
> NOTE: The latest version of the module is v1.0.1 released on 12-Jan-2016. Refer the [CHANGE LOG](https://github.com/kartik-v/yii2-widget-timepicker/blob/master/CHANGE.md) for details.
## Demo

Expand Down
36 changes: 18 additions & 18 deletions TimePicker.php
Original file line number Diff line number Diff line change
@@ -1,29 +1,29 @@
<?php

/**
* @copyright Copyright &copy; Kartik Visweswaran, Krajee.com, 2014
* @copyright Copyright &copy; Kartik Visweswaran, Krajee.com, 2014 - 2016
* @package yii2-widgets
* @subpackage yii2-widget-timepicker
* @version 1.0.0
* @version 1.0.1
*/

namespace kartik\time;

use yii\helpers\ArrayHelper;
use yii\helpers\Html;
use kartik\base\InputWidget;

/**
* The TimePicker widget allows you to easily select a time for a text input using
* your mouse or keyboards arrow keys. Thus widget is a wrapper enhancement over the
* TimePicker JQuery plugin by rendom forked from the plugin by jdewit. Additional
* enhancements have been done to this input widget for compatibility with Bootstrap 3.
* The TimePicker widget allows you to easily select a time for a text input using your mouse or keyboards arrow keys.
* Thus widget is a wrapper enhancement over the TimePicker JQuery plugin by rendom forked from the plugin by jdewit.
* Additional enhancements have been done to this input widget for compatibility with Bootstrap 3.
*
* @author Kartik Visweswaran <[email protected]>
* @since 1.0
* @see https://github.com/rendom/bootstrap-3-timepicker
* @see https://github.com/jdewit/bootstrap-timepicker
*/
class TimePicker extends \kartik\base\InputWidget
class TimePicker extends InputWidget
{
/**
* @var string the size of the input - 'lg', 'md', 'sm', 'xs'
Expand All @@ -36,12 +36,10 @@ class TimePicker extends \kartik\base\InputWidget
public $addon = '<i class="glyphicon glyphicon-time"></i>';

/**
* @var array HTML attributes for the addon container
* the following special options are identified
* @var array HTML attributes for the addon container the following special options are identified
* - asButton: boolean if the addon is to be displayed as a button.
* - buttonOptions: array HTML attributes if the addon is to be
* displayed like a button. If [[asButton]] is true, this will
* default to ['class' => 'btn btn-default']
* - buttonOptions: array HTML attributes if the addon is to be displayed like a button. If [[asButton]] is true,
* this will default to ['class' => 'btn btn-default']
*/
public $addonOptions = [];

Expand All @@ -51,13 +49,15 @@ class TimePicker extends \kartik\base\InputWidget
public $containerOptions = [];

/**
* Initializes the widget
*
* @throw InvalidConfigException
* @inheritdoc
*/
public $pluginName = 'timepicker';

/**
* @inheritdoc
*/
public function init()
public function run()
{
parent::init();
$this->registerAssets();
echo Html::tag('div', $this->renderInput(), $this->containerOptions);
}
Expand Down Expand Up @@ -111,6 +111,6 @@ public function registerAssets()
{
$view = $this->getView();
TimePickerAsset::register($view);
$this->registerPlugin('timepicker');
$this->registerPlugin($this->pluginName);
}
}
11 changes: 8 additions & 3 deletions TimePickerAsset.php
Original file line number Diff line number Diff line change
@@ -1,22 +1,27 @@
<?php

/**
* @copyright Copyright &copy; Kartik Visweswaran, Krajee.com, 2014
* @copyright Copyright &copy; Kartik Visweswaran, Krajee.com, 2014 - 2016
* @package yii2-widgets
* @subpackage yii2-widget-timepicker
* @version 1.0.0
* @version 1.0.1
*/

namespace kartik\time;

use kartik\base\AssetBundle;

/**
* Asset bundle for DateTimePicker Widget
*
* @author Kartik Visweswaran <[email protected]>
* @since 1.0
*/
class TimePickerAsset extends \kartik\base\AssetBundle
class TimePickerAsset extends AssetBundle
{
/**
* @inheritdoc
*/
public function init()
{
$this->setSourcePath(__DIR__ . '/assets');
Expand Down
2 changes: 1 addition & 1 deletion assets/css/bootstrap-timepicker.css
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*!
* Timepicker Component for Twitter Bootstrap
*
* Improvements by: Kartik Visweswaran, Krajee.com, 2014
* Improvements by: Kartik Visweswaran, Krajee.com, 2014 - 2016
*
* Copyright 2013 Joris de Wit
*
Expand Down
14 changes: 1 addition & 13 deletions assets/css/bootstrap-timepicker.min.css

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

2 changes: 1 addition & 1 deletion assets/js/bootstrap-timepicker.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*!
* Timepicker Component for Twitter Bootstrap
*
* Improvements by: Kartik Visweswaran, Krajee.com, 2014
* Improvements by: Kartik Visweswaran, Krajee.com, 2014 - 2016
*
* Copyright 2013 Joris de Wit
*
Expand Down
2 changes: 1 addition & 1 deletion assets/js/bootstrap-timepicker.min.js

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

12 changes: 11 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,17 @@
{
"name": "kartik-v/yii2-widget-timepicker",
"description": "Enhanced Yii2 wrapper for the bootstrap timepicker plugin (sub repo split from yii2-widgets)",
"keywords": ["yii2", "extension", "widget", "form", "time", "picker", "bootstrap", "jquery", "plugin"],
"keywords": [
"yii2",
"extension",
"widget",
"form",
"time",
"picker",
"bootstrap",
"jquery",
"plugin"
],
"homepage": "https://github.com/kartik-v/yii2-widget-timepicker",
"type": "yii2-extension",
"license": "BSD 3-Clause",
Expand Down

0 comments on commit fa230ca

Please sign in to comment.