From 90c2f1095e078c72f6fca7da31c2e93d72e6163a Mon Sep 17 00:00:00 2001 From: Wouter Slob Date: Mon, 30 Dec 2013 21:58:03 +0100 Subject: [PATCH 1/3] Make sure DatePicker is shown when inline and using a language. Remove not used use --- extensions/yii/jui/DatePicker.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/extensions/yii/jui/DatePicker.php b/extensions/yii/jui/DatePicker.php index bab2abe..6fc73bb 100644 --- a/extensions/yii/jui/DatePicker.php +++ b/extensions/yii/jui/DatePicker.php @@ -7,7 +7,6 @@ namespace yii\jui; -use Yii; use yii\helpers\Html; use yii\helpers\Json; @@ -83,7 +82,7 @@ class DatePicker extends InputWidget DatePickerRegionalAsset::register($view); $options = Json::encode($this->clientOptions); - $view->registerJs("$('#{$this->options['id']}').datepicker($.extend({}, $.datepicker.regional['{$this->language}'], $options));"); + $view->registerJs("$('#{$containerID}').datepicker($.extend({}, $.datepicker.regional['{$this->language}'], $options));"); $options = $this->clientOptions; $this->clientOptions = false; // the datepicker js widget is already registered From 6c01f238fc696bb5b5579a4a212733b1fae41699 Mon Sep 17 00:00:00 2001 From: Wouter Slob Date: Mon, 30 Dec 2013 21:58:22 +0100 Subject: [PATCH 2/3] Revert "Make sure DatePicker is shown when inline and using a language. Remove not used use" This reverts commit 90c2f1095e078c72f6fca7da31c2e93d72e6163a. --- extensions/yii/jui/DatePicker.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/extensions/yii/jui/DatePicker.php b/extensions/yii/jui/DatePicker.php index 6fc73bb..bab2abe 100644 --- a/extensions/yii/jui/DatePicker.php +++ b/extensions/yii/jui/DatePicker.php @@ -7,6 +7,7 @@ namespace yii\jui; +use Yii; use yii\helpers\Html; use yii\helpers\Json; @@ -82,7 +83,7 @@ class DatePicker extends InputWidget DatePickerRegionalAsset::register($view); $options = Json::encode($this->clientOptions); - $view->registerJs("$('#{$containerID}').datepicker($.extend({}, $.datepicker.regional['{$this->language}'], $options));"); + $view->registerJs("$('#{$this->options['id']}').datepicker($.extend({}, $.datepicker.regional['{$this->language}'], $options));"); $options = $this->clientOptions; $this->clientOptions = false; // the datepicker js widget is already registered From 1c368d93de7398e6b55a103c07f059f2f0ce5665 Mon Sep 17 00:00:00 2001 From: Wouter Slob Date: Mon, 30 Dec 2013 22:13:55 +0100 Subject: [PATCH 3/3] Remove not used uses --- extensions/yii/jui/AutoComplete.php | 1 - extensions/yii/jui/InputWidget.php | 1 - extensions/yii/jui/Menu.php | 1 - extensions/yii/jui/Spinner.php | 1 - extensions/yii/jui/Widget.php | 1 - 5 files changed, 5 deletions(-) diff --git a/extensions/yii/jui/AutoComplete.php b/extensions/yii/jui/AutoComplete.php index ac0c997..93f4332 100644 --- a/extensions/yii/jui/AutoComplete.php +++ b/extensions/yii/jui/AutoComplete.php @@ -7,7 +7,6 @@ namespace yii\jui; -use Yii; use yii\helpers\Html; /** diff --git a/extensions/yii/jui/InputWidget.php b/extensions/yii/jui/InputWidget.php index 0facfb9..77201ba 100644 --- a/extensions/yii/jui/InputWidget.php +++ b/extensions/yii/jui/InputWidget.php @@ -7,7 +7,6 @@ namespace yii\jui; -use Yii; use yii\base\Model; use yii\base\InvalidConfigException; use yii\helpers\Html; diff --git a/extensions/yii/jui/Menu.php b/extensions/yii/jui/Menu.php index 46c7ee0..bce2157 100644 --- a/extensions/yii/jui/Menu.php +++ b/extensions/yii/jui/Menu.php @@ -7,7 +7,6 @@ namespace yii\jui; -use Yii; use yii\helpers\Json; /** diff --git a/extensions/yii/jui/Spinner.php b/extensions/yii/jui/Spinner.php index d53bd3a..b88c70b 100644 --- a/extensions/yii/jui/Spinner.php +++ b/extensions/yii/jui/Spinner.php @@ -7,7 +7,6 @@ namespace yii\jui; -use Yii; use yii\helpers\Html; /** diff --git a/extensions/yii/jui/Widget.php b/extensions/yii/jui/Widget.php index 8881a77..62bbd16 100644 --- a/extensions/yii/jui/Widget.php +++ b/extensions/yii/jui/Widget.php @@ -7,7 +7,6 @@ namespace yii\jui; -use Yii; use yii\helpers\Json; /**