Skip to content

Commit

Permalink
Merge commit 'beafb99e562bf52f2496d106788160b776243bbd' into feature/…
Browse files Browse the repository at this point in the history
…toolbar-ui-2

Conflicts:
	extensions/debug/Module.php
  • Loading branch information
schmunk42 committed Feb 7, 2014
2 parents e4f0e80 + beafb99 commit 70cebf2
Show file tree
Hide file tree
Showing 18 changed files with 1,430 additions and 810 deletions.
2 changes: 1 addition & 1 deletion apps/advanced/frontend/widgets/Alert.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
* - \Yii::$app->getSession()->setFlash('info', 'This is the message');
*
* @author Kartik Visweswaran <[email protected]>
* @author Alexander Makarov <sam@rmcerative.ru>
* @author Alexander Makarov <sam@rmcreative.ru>
*/
class Alert extends \yii\bootstrap\Widget
{
Expand Down
3 changes: 3 additions & 0 deletions apps/basic/tests/acceptance.suite.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,13 @@ modules:
- PhpBrowser
# you can use WebDriver instead of PhpBrowser to test javascript and ajax.
# This will require you to install selenium. See http:https://codeception.com/docs/04-AcceptanceTests#Selenium
# "restart" option is used by the WebDriver to start each time per test-file new session and cookies,
# it is useful if you want to login in your app in each test.
# - WebDriver
config:
PhpBrowser:
url: 'http:https://localhost:8080'
# WebDriver:
# url: 'http:https://localhost'
# browser: firefox
# restart: true
2 changes: 1 addition & 1 deletion docs/guide/apps-advanced.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ the installed application. You only need to do these once for all.
```
php /path/to/yii-application/init
```
2. Create a new database and adjust the `components.db` configuration in `common/config/params-local.php` accordingly.
2. Create a new database and adjust the `components.db` configuration in `common/config/main-local.php` accordingly.
3. Apply migrations with console command `yii migrate`.
4. Set document roots of your Web server:

Expand Down
18 changes: 4 additions & 14 deletions extensions/debug/Module.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,13 +38,11 @@ class Module extends \yii\base\Module
*/
public $logTarget;
/**
* @var array|Panel[]
* @var array list of debug panels. The array keys are the panel IDs, and values are the corresponding
* panel class names or configuration arrays. This will be merged with [[corePanels()]].
* You may set a panel to be false to disable a core panel.
*/
public $panels = [];
/**
* @var string postion of the custom configured panels 'begin' or 'end'
*/
public $panelsPosition = 'end';
/**
* @var string the directory storing the debugger data files. This can be specified using a path alias.
*/
Expand Down Expand Up @@ -78,15 +76,7 @@ public function init()
Yii::$app->getView()->on(View::EVENT_END_BODY, [$this, 'renderToolbar']);
});

switch ($this->panelsPosition) {
case 'begin':
$this->panels = ArrayHelper::merge($this->panels, $this->corePanels());
break;
case 'end':
default:
$this->panels = ArrayHelper::merge($this->corePanels(), $this->panels);
break;
}
$this->panels = array_filter(ArrayHelper::merge($this->corePanels(), $this->panels));
foreach ($this->panels as $id => $config) {
$config['module'] = $this;
$config['id'] = $id;
Expand Down
1 change: 1 addition & 0 deletions extensions/elasticsearch/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ Yii Framework 2 elasticsearch extension Change Log
----------------------------

- Bug #1993: afterFind event in AR is now called after relations have been populated (cebe, creocoder)
- Bug #2324: Fixed QueryBuilder bug when building a query with "query" option (mintao)
- Enh #1313: made index and type available in `ActiveRecord::instantiate()` to allow creating records based on elasticsearch type when doing cross index/type search (cebe)
- Enh #1382: Added a debug toolbar panel for elasticsearch (cebe)
- Enh #1765: Added support for primary key path mapping, pk can now be part of the attributes when mapping is defined (cebe)
Expand Down
4 changes: 3 additions & 1 deletion extensions/elasticsearch/QueryBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,10 @@ public function build($query)
$parts['from'] = (int) $query->offset;
}

if (empty($parts['query'])) {
if (empty($query->query)) {
$parts['query'] = ["match_all" => (object)[]];
} else {
$parts['query'] = $query->query;
}

$whereFilter = $this->buildCondition($query->where);
Expand Down
1 change: 1 addition & 0 deletions extensions/gii/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ Yii Framework 2 gii extension Change Log
----------------------------

- Bug #1405: fixed disambiguation of relation names generated by gii (qiangxue)
- Bug #1904: Fixed autocomplete to work with underscore inputs "_" (tonydspaniard)
- Bug #2298: Fixed the bug that Gii controller generator did not allow digit in the controller ID (qiangxue)
- Bug: fixed controller in crud template to avoid returning query in findModel() (cebe)
- Enh #1624: generate rules for unique indexes (lucianobaraglia)
Expand Down
9 changes: 9 additions & 0 deletions extensions/gii/assets/gii.js
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,15 @@ yii.gii = (function ($) {
};

return {
autocomplete: function (counter, data) {
var datum = new Bloodhound({
datumTokenizer: function(d){return Bloodhound.tokenizers.whitespace(d.word);},
queryTokenizer: Bloodhound.tokenizers.whitespace,
local: data
});
datum.initialize();
jQuery('.typeahead-'+counter).typeahead(null,{displayKey: 'word', source: datum.ttAdapter()});
},
init: function () {
initHintBlocks();
initStickyInputs();
Expand Down
Loading

0 comments on commit 70cebf2

Please sign in to comment.