Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge branch 'master' of github.com:clevertech/YiiBooster

  • Loading branch information...
commit 2bd36bf05d1ee653b028f4b3f8957d53b397cca1 2 parents 6c7724e + 254f586
@hijarian hijarian authored
View
28 src/assets/js/jquery.json.yiigridview.js
@@ -258,7 +258,7 @@
settings = gridSettings[id];
$grid.addClass(settings.loadingClass);
- options = $.extend({
+ var localOptions = $.extend({
type: 'GET',
url: $grid.yiiJsonGridView('getUrl'),
dataType: 'json',
@@ -339,31 +339,31 @@
}
}
}, options || {});
- if (options.data !== undefined && options.type === 'GET') {
- options.url = $.param.querystring(options.url, options.data);
- options.data = {};
+ if (localOptions.data !== undefined && localOptions.type === 'GET') {
+ localOptions.url = $.param.querystring(localOptions.url, localOptions.data);
+ localOptions.data = {};
}
if (settings.ajaxUpdate !== false) {
- options.url = $.param.querystring(options.url, settings.ajaxVar + '=' + id);
+ localOptions.url = $.param.querystring(localOptions.url, settings.ajaxVar + '=' + id);
if (settings.beforeAjaxUpdate !== undefined) {
- settings.beforeAjaxUpdate(id, options);
+ settings.beforeAjaxUpdate(id, localOptions);
}
- $.ajax(options);
+ $.ajax(localOptions);
} else { // non-ajax mode
if (options.type === 'GET') {
- window.location.href = options.url;
+ window.location.href = localOptions.url;
} else { // POST mode
- $form = $('<form action="' + options.url + '" method="post"></form>').appendTo('body');
- if (options.data === undefined) {
- options.data = {};
+ $form = $('<form action="' + localOptions.url + '" method="post"></form>').appendTo('body');
+ if (localOptions.data === undefined) {
+ localOptions.data = {};
}
- if (options.data.returnUrl === undefined) {
- options.data.returnUrl = window.location.href;
+ if (localOptions.data.returnUrl === undefined) {
+ localOptions.data.returnUrl = window.location.href;
}
- $.each(options.data, function (name, value) {
+ $.each(localOptions.data, function (name, value) {
$form.append($('<input type="hidden" name="t" value="" />').attr('name', name).val(value));
});
$form.submit();
View
16 src/widgets/TbBaseMenu.php
@@ -110,15 +110,15 @@ protected function renderMenu($items)
}
if (isset($item['items']) && !empty($item['items'])) {
- $this->controller->widget(
- 'bootstrap.widgets.TbDropdown',
- array(
- 'encodeLabel' => $this->encodeLabel,
- 'htmlOptions' => isset($item['submenuOptions']) ? $item['submenuOptions']
- : $this->submenuHtmlOptions,
- 'items' => $item['items'],
- )
+ $dropdownOptions = array(
+ 'encodeLabel' => $this->encodeLabel,
+ 'htmlOptions' => isset($item['submenuOptions']) ? $item['submenuOptions']
+ : $this->submenuHtmlOptions,
+ 'items' => $item['items'],
);
+ $dropdownOptions['id'] = isset($dropdownOptions['htmlOptions']['id']) ?
+ $dropdownOptions['htmlOptions']['id'] : null;
+ $this->controller->widget('bootstrap.widgets.TbDropdown', $dropdownOptions);
}
echo '</li>';
View
5 src/widgets/TbExtendedGridView.php
@@ -249,10 +249,7 @@ public function renderContent()
public function renderKeys()
{
$data = $this->dataProvider->getData();
- if (empty($data)) {
- return false;
- }
-
+
if (!$this->sortableRows || !$this->getAttribute($data[0], (string)$this->sortableAttribute)) {
parent::renderKeys();
}
View
5 src/widgets/TbFormInputElement.php
@@ -52,7 +52,10 @@ class TbFormInputElement extends CFormInputElement
'uneditable' => 'uneditableRow',
'radiolistinline' => 'radioButtonListInlineRow',
'checkboxlistinline' => 'checkBoxListInlineRow',
- 'select2' => 'select2Row'
+ 'select2' => 'select2Row',
+ 'wysihtml5' => 'html5EditorRow',
+ 'toggle' => 'toggleButtonRow'
+
);
/**
Please sign in to comment.
Something went wrong with that request. Please try again.