Yiibooster Make it gorgeous. Do it Fast.
#261
Posted 20 February 2013 - 05:15 AM
I had a former project that I have to update.
That project embedded many bootstrap widgets from an old version (with the Boot... names).
So, I have decided to dig it out and to update it.
I nearly succeeded in but I'm stuck with TbTabs and GridViews :
I have a view with two Tabs which contains a GridView (the yii original one).
With the former bootstrap, filters worked like a charm. But with this version (Yiibooster 1.0.5-7), the filters on column work once but re-render the tabs (once).
So, after just applying a filter, I have four tabs which contains each a gridview and I can't apply a new filter (the loading gif is launched but the application hangs - no grid ajax update).
Have you ever faced this problem?
Many thanks for your answers
#262
Posted 20 February 2013 - 05:33 AM
Denis Roussel, on 20 February 2013 - 05:15 AM, said:
I had a former project that I have to update.
That project embedded many bootstrap widgets from an old version (with the Boot... names).
So, I have decided to dig it out and to update it.
I nearly succeeded in but I'm stuck with TbTabs and GridViews :
I have a view with two Tabs which contains a GridView (the yii original one).
With the former bootstrap, filters worked like a charm. But with this version (Yiibooster 1.0.5-7), the filters on column work once but re-render the tabs (once).
So, after just applying a filter, I have four tabs which contains each a gridview and I can't apply a new filter (the loading gif is launched but the application hangs - no grid ajax update).
Have you ever faced this problem?
Many thanks for your answers
I found my answer...
My Gridview was not really a simple gridview. I have added buttons that launch dialogs (with quickdlgs extension). The problem was these buttons re-rendering through Ajax (they are included in the GridView Component). They broke the whole re-rendering process.
So, I have disabled them and the gridview works now like a charm.
I like my Auto-answers...
#263
Posted 20 February 2013 - 06:50 AM
Add the following function to your model class ('Place')
function getColumn2Array($attribute=null)
{
if(self::model()->hasAttribute($attribute) == false) return '';
$criteria = new CDbCriteria();
$criteria->select = 'DISTINCT '.$attribute; //no need for repetitive data here
$criteria->order = $attribute.' ASC';
$results = self::findAll($criteria);
$data = array();
foreach($results as $result)
$data[] = $result[$attribute];
return $data;
}
Note: Yii does not yet have a build-in function like this for ActiveRecords.
Then, adjust the 'tags' line accordingly
'tags' => $model->getColumn2Array('name'),Thanks a lot.
It's Rock....
#264
Posted 21 February 2013 - 12:39 PM
great work!
I got 3 questions / feature requests which are inspired by magentos backend user interface and the list-mode they use.
1) Within TbExtendedGridView: For example when searching for product-ids. Would it be possible to search for numbers between 1 and 30?
2) Within TbExtendedGridView: Is is possible to have a generate a select box of the column values as a filter?
3) Bulk-Actions: I saw that you already have some bulk action features. Magento has a cool feature on this one too: First of all the bulk actions are on top of the list. Furthermore it features a liste of actions and (if needed) an action-value input-field for extra target-value user-input.
For example: There might be a Select-Box for 3 Bulk-Actions "Delete/Change Category/Change Attribute". And then when you select a bulk action you can set the target bulk-value before pressing the button. For example: I select 10 products out of the list, select "change category" and enter a "10" for the category ID. Then I press the action button. BOOOM. Very powerful.
I think that this framework is really close to getting those features in. What do you guys think?
Kind regards
Mikey
#265
Posted 24 February 2013 - 02:01 AM
jmariani, on 11 January 2013 - 10:39 AM, said:
Any incompatibilities detected between Yii 1.1.13 and YiiBooster 1.0.5?
Suddenly, the rows of a TbGrid show no data in columns (but the rows are displayed).
This is the HTML produced:
<tbody> <tr class="odd"> <td> </td><td> </td><td> </td></tr> </tbody>
Regards.
Hi. Any updates on this one? I'm the only one with this issue?
Regards.
#266
Posted 24 February 2013 - 12:51 PM
Any solution is highly appreciable.
Thanks...
#267
Posted 27 February 2013 - 12:47 AM
i have a question... i want to make client validation in my form (yiibooster) i use the select2 widget in this way..... and work very well...
View "Vista"
$form = $this->beginWidget('bootstrap.widgets.TbActiveForm', array(
'id' => 'proceso-form',
'type' => 'horizontal',
'enableAjaxValidation' => false,
'enableClientValidation' => true,
'htmlOptions' => array('class' => ''),
));
....
echo $form->select2Row($model, 'idcliente', array('hint'=>'Seleccione Uno','asDropDownList' => false,
'options' => array(
'width' => '100%',
'closeOnSelect' => false,
'placeholder' => 'Seleccione un cliente',
'allowClear' => false,
'ajax' => array(
'url' => Yii::app()->createUrl('proceso/cliente'),
'dataType' => 'json',
'data' => 'js:function(term,page) { return {q: term, page_limit: 10, page: page}; }',
'results' => 'js:function(data,page) { return {results: data}; }',
),
)));
....
$this->endWidget();
Controller "Controlador"
public function actionCliente() {
$cliente = Cliente::model()->findAll();
$data = array();
foreach ($cliente as $value) {
$data[] = array(
'id' => $value->id,
'text' => $value->nombre." ".$value->apellido,
);
}
echo CJSON::encode($data);
}
my questions is... how i can make the client validation work... only work the server validation and... the pagination... really work =? i send the page by javascript but in my action i think mised something....
thanks
#268
Posted 27 February 2013 - 06:58 PM
#269
Posted 28 February 2013 - 12:16 AM
<?php echo $form->dateRangeRow($model, 'dateRangeField',
array('hint'=>'Click inside! An even a date range field!.',
'prepend'=>'<i class="icon-calendar">>/i>',
'options' => array('callback'=>'js:function(start, end){console.log(start.toString("MMMM d, yyyy") + " - " + end.toString("MMMM d, yyyy"));}')
)); ?>
Thanks,
James
#270
Posted 05 March 2013 - 06:58 AM
bas_vdl, on 14 January 2013 - 02:48 PM, said:
For example tags that already belongs to the item.
View
<?php $this->widget('bootstrap.widgets.TbSelect2', array(
'asDropDownList' => false,
'model' => $model,
'attribute' => 'tagIds',
'options' => array(
'placeholder' => 'tags',
'width' => '40%',
'tokenSeparators' => array(',', ' '),
'multiple'=>true,
'maximumSelectionSize'=>4,
'ajax'=>array(
'url'=>Yii::app()->createUrl('/tag/suggesttag'),
'dataType'=>'json',
'data'=>'js:function(term,page){return{q: term, limit: 10};}',
'results'=>'js:function(data,page){ return {results: data.tags}; }',
)
)
)); ?>I've the same question, and no-one actually replied to this previous post
Ricordalo quando fai il debug
#271
Posted 05 March 2013 - 07:43 AM
If you don't get a response, it could be because the question sucks!
And/or lacks information.
Or, you need to keep the question warm for some time. By adding to it.
If you keep it warm by bumping it and complaining about not getting any response, you are doing it wrong.
#272
Posted 05 March 2013 - 08:10 AM
jacmoe, on 05 March 2013 - 07:43 AM, said:
If you don't get a response, it could be because the question sucks!
And/or lacks information.
Or, you need to keep the question warm for some time. By adding to it.
If you keep it warm by bumping it and complaining about not getting any response, you are doing it wrong.
You're right but the question is clear: How to use the initSelection to fill the box with values from the database ?
I need an example of how to pass "something" to initSelection to 'pre-select' one or more options .
Sorry again
EDIT: I add this snippet from Select2.js; probably what we're trying to do is simply not possible !
if (select) {
// these options are not allowed when attached to a select because they are picked up off the element itself
$.each(["id", "multiple", "ajax", "query", "createSearchChoice", "initSelection", "data", "tags"], function () {
if (this in opts) {
throw new Error("Option '" + this + "' is not allowed for Select2 when attached to a <select> element.");
}
});
}
Ricordalo quando fai il debug
#273
Posted 06 March 2013 - 09:12 AM
#274
Posted 06 March 2013 - 09:16 AM
I hierby vote +one for a dedictated Yiibooster forum or forum-secion to make this more user friendly!
This Forum-Thread is really to big! I am sure there are a lot of questions about this great extension which should have their own forum.
What do you guys think?
Kind regards
Mikey
#277
Posted 07 March 2013 - 03:00 AM
MikeyMiller, on 06 March 2013 - 09:16 AM, said:
I hierby vote +one for a dedictated Yiibooster forum or forum-secion to make this more user friendly!
This Forum-Thread is really to big! I am sure there are a lot of questions about this great extension which should have their own forum.
What do you guys think?
Kind regards
Mikey
+1 for this idea, but not only yiibooster but all bootstrap
#278
Posted 07 March 2013 - 03:02 AM
#279
Posted 07 March 2013 - 03:06 AM
Yii Framework Forum > Yii Framework Discussions > Extensions > Yiibooster
#280
Posted 07 March 2013 - 03:14 AM
First: people are shy. And will continue to post in the same topic, even if they get an entire subforum to post in.
Second: we already have enough trouble as it is to try and get people to post about Yii extensions in the Extensions forum. I don't think adding to that complexity would be a good idea.
Third: what about other extensions? Shouldn't they have their own subforum?
Fourth: it's not worth it.

Help

This topic is locked












