Commit 613e6a0c by Qiang Xue

Merge branch 'master' of git://github.com/yiisoft/yii2

parents 5d0ec52a 84890625
...@@ -50,7 +50,6 @@ abstract class BaseRenderer extends Component ...@@ -50,7 +50,6 @@ abstract class BaseRenderer extends Component
* @param array $files list of markdown files to render * @param array $files list of markdown files to render
* @param Context $context the api documentation context to render. * @param Context $context the api documentation context to render.
* @param Controller $controller the apidoc controller instance. Can be used to control output. * @param Controller $controller the apidoc controller instance. Can be used to control output.
* @return
*/ */
public abstract function renderMarkdownFiles($controller); public abstract function renderMarkdownFiles($controller);
......
...@@ -33,7 +33,7 @@ ArrayHelper::multisort($constants, 'name'); ...@@ -33,7 +33,7 @@ ArrayHelper::multisort($constants, 'name');
<tr<?= $constant->definedBy != $type->name ? ' class="inherited"' : '' ?> id="<?= $constant->name ?>"> <tr<?= $constant->definedBy != $type->name ? ' class="inherited"' : '' ?> id="<?= $constant->name ?>">
<td><?= $constant->name ?><a name="<?= $constant->name ?>-detail"></a></td> <td><?= $constant->name ?><a name="<?= $constant->name ?>-detail"></a></td>
<td><?= $constant->value ?></td> <td><?= $constant->value ?></td>
<td><?= APiMarkdown::process($constant->shortDescription . "\n" . $constant->description, $constant->definedBy, true) ?></td> <td><?= ApiMarkdown::process($constant->shortDescription . "\n" . $constant->description, $constant->definedBy, true) ?></td>
<td><?= $this->context->typeLink($constant->definedBy) ?></td> <td><?= $this->context->typeLink($constant->definedBy) ?></td>
</tr> </tr>
<?php endforeach; ?> <?php endforeach; ?>
......
...@@ -92,7 +92,7 @@ class Tabs extends Widget ...@@ -92,7 +92,7 @@ class Tabs extends Widget
*/ */
public $encodeLabels = true; public $encodeLabels = true;
/** /**
* @var string, specifies the Bootstrap tab styling. * @var string specifies the Bootstrap tab styling.
*/ */
public $navType = 'nav-tabs'; public $navType = 'nav-tabs';
......
...@@ -6,6 +6,7 @@ Yii Framework 2 jui extension Change Log ...@@ -6,6 +6,7 @@ Yii Framework 2 jui extension Change Log
- Bug #1550: fixed the issue that JUI input widgets did not property input IDs. (qiangxue) - Bug #1550: fixed the issue that JUI input widgets did not property input IDs. (qiangxue)
- Bug #2514: Jui sortable clientEvents were not working because of wrong naming assumptions. (cebe) - Bug #2514: Jui sortable clientEvents were not working because of wrong naming assumptions. (cebe)
- Enh #2573: Jui datepicker now uses the current appliaction language by default. (andy5)
2.0.0 alpha, December 1, 2013 2.0.0 alpha, December 1, 2013
----------------------------- -----------------------------
......
...@@ -7,11 +7,12 @@ ...@@ -7,11 +7,12 @@
namespace yii\jui; namespace yii\jui;
use Yii;
use yii\helpers\Html; use yii\helpers\Html;
use yii\helpers\Json; use yii\helpers\Json;
/** /**
* DatePicker renders an datepicker jQuery UI widget. * DatePicker renders a datepicker jQuery UI widget.
* *
* For example: * For example:
* *
...@@ -46,9 +47,9 @@ class DatePicker extends InputWidget ...@@ -46,9 +47,9 @@ class DatePicker extends InputWidget
{ {
/** /**
* @var string the locale ID (eg 'fr', 'de') for the language to be used by the date picker. * @var string the locale ID (eg 'fr', 'de') for the language to be used by the date picker.
* If this property set to false, I18N will not be involved. That is, the date picker will show in English. * If this property is empty, then the current application language will be used.
*/ */
public $language = false; public $language;
/** /**
* @var boolean If true, shows the widget as an inline calendar and the input as a hidden field. * @var boolean If true, shows the widget as an inline calendar and the input as a hidden field.
*/ */
...@@ -77,12 +78,13 @@ class DatePicker extends InputWidget ...@@ -77,12 +78,13 @@ class DatePicker extends InputWidget
{ {
echo $this->renderWidget() . "\n"; echo $this->renderWidget() . "\n";
$containerID = $this->inline ? $this->containerOptions['id'] : $this->options['id']; $containerID = $this->inline ? $this->containerOptions['id'] : $this->options['id'];
if ($this->language !== false) { $language = $this->language ? $this->language : Yii::$app->language;
if ($language != 'en') {
$view = $this->getView(); $view = $this->getView();
DatePickerRegionalAsset::register($view); DatePickerRegionalAsset::register($view);
$options = Json::encode($this->clientOptions); $options = Json::encode($this->clientOptions);
$view->registerJs("$('#{$containerID}').datepicker($.extend({}, $.datepicker.regional['{$this->language}'], $options));"); $view->registerJs("$('#{$containerID}').datepicker($.extend({}, $.datepicker.regional['{$language}'], $options));");
$options = $this->clientOptions; $options = $this->clientOptions;
$this->clientOptions = false; // the datepicker js widget is already registered $this->clientOptions = false; // the datepicker js widget is already registered
......
...@@ -7,6 +7,7 @@ ...@@ -7,6 +7,7 @@
namespace yii\redis; namespace yii\redis;
use yii\base\InvalidParamException;
use yii\base\NotSupportedException; use yii\base\NotSupportedException;
use yii\db\Exception; use yii\db\Exception;
use yii\db\Expression; use yii\db\Expression;
......
...@@ -77,7 +77,7 @@ class QueryBuilder extends Object ...@@ -77,7 +77,7 @@ class QueryBuilder extends Object
$clauses = [ $clauses = [
$this->buildSelect($query->select, $params, $query->distinct, $query->selectOption), $this->buildSelect($query->select, $params, $query->distinct, $query->selectOption),
$this->buildFrom($from, $Params), $this->buildFrom($from, $params),
$this->buildWhere($query->from, $query->where, $params), $this->buildWhere($query->from, $query->where, $params),
$this->buildGroupBy($query->groupBy), $this->buildGroupBy($query->groupBy),
$this->buildWithin($query->within), $this->buildWithin($query->within),
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment