Yii Framework Forum: Yiibooster - Yii Framework Forum

Jump to content

  • (16 Pages)
  • +
  • 1
  • 2
  • 3
  • Last »
  • You cannot start a new topic
  • This topic is locked

Yiibooster Make it gorgeous. Do it Fast. Rate Topic: ***** 6 Votes

#1 User is offline   Antonio Ramirez 

  • Elite Member
  • Yii
  • Group: Yii Dev Team
  • Posts: 1,450
  • Joined: 04-October 10

Posted 05 October 2012 - 08:59 AM

*
POPULAR

Recently launched YiiBooster, YiiBooster is a collection of widgets that will ease the task of developing Yii applications, as well as, giving your application a little boost. Basically, YiiBooster tackles the most common challenges that Yii developers face while trying to enhance their applications.

Please, use this forum topic for questions about its use. For issues and bugs, please use Github: https://github.com/c...iBooster/issues
¿How long would it take for you to understand that you own nothing in this world?

www.ramirezcobos.com
www.2amigos.us
www.github.com/tonydspaniard
www.github.com/2amigos


Posted Image
8

#2 User is offline   bit0123 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 75
  • Joined: 01-February 12
  • Location:Bangladesh

Posted 05 October 2012 - 09:36 AM

Problem with TbPercentOfTypeGooglePieOperation in TbExtendedGridView

First of all thanks for this great extension.
I am trying to implementing TbPercentOfTypeGooglePieOperation in TbExtendedGridView and my environment is:
A table named 'User' with a field 'join_date' and having CRUD generated.

'extendedSummary' => array(
        'title' => 'join_date Statistics',
        'columns' => array(
	        'join_date' => array(
		        'label'=>'join_date Statistics',
		        'types' => array(
			        User::model()->findAll(array(
						'select'=>'join_date',
						'distinct'=>true,
					),'join_date','join_date'),
		        ),
		        'class'=>'TbPercentOfTypeGooglePieOperation',
	        )
        )
    ),


CException: The "label" of a type must be defined.
How to define the type for my case?
Please help...
0

#3 User is offline   Antonio Ramirez 

  • Elite Member
  • Yii
  • Group: Yii Dev Team
  • Posts: 1,450
  • Joined: 04-October 10

Posted 05 October 2012 - 10:20 AM

View Postbit0123, on 05 October 2012 - 09:36 AM, said:

Problem with TbPercentOfTypeGooglePieOperation in TbExtendedGridView

First of all thanks for this great extension.
I am trying to implementing TbPercentOfTypeGooglePieOperation in TbExtendedGridView and my environment is:
A table named 'User' with a field 'join_date' and having CRUD generated.

'extendedSummary' => array(
        'title' => 'join_date Statistics',
        'columns' => array(
	        'join_date' => array(
		        'label'=>'join_date Statistics',
		        'types' => array(
			        User::model()->findAll(array(
						'select'=>'join_date',
						'distinct'=>true,
					),'join_date','join_date'),
		        ),
		        'class'=>'TbPercentOfTypeGooglePieOperation',
	        )
        )
    ),


CException: The "label" of a type must be defined.
How to define the type for my case?
Please help...



As you can see on the following example:
'types' => array(
			        'CSS'=>array('label'=>'Css'),
			        'JavaScript'=>array('label'=>'Js'),
			        'HTML'=>array('label'=>'html')
		        ),


The types are an array where the 'KEYS' are actually the values to check for and they are required to have a label property set in an array. You are just returning an array of CActiveRecords and that doesnt work like this. I recommend you to create afunction that returns the types array as stated above.

In order to get the correct configuration array, I highly recommend you to check the code of the widget TbPercentOfTypeGooglePieOperation that is written within the TbExtendedGridView widget.
¿How long would it take for you to understand that you own nothing in this world?

www.ramirezcobos.com
www.2amigos.us
www.github.com/tonydspaniard
www.github.com/2amigos


Posted Image
0

#4 User is offline   xicond 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 34
  • Joined: 06-October 12

Posted 06 October 2012 - 08:53 AM

Pardon me to suggest a new widget from combination with jqgrid.
I am really interest on some ext that really complete with js tool and css
Thank
0

#5 User is offline   Antonio Ramirez 

  • Elite Member
  • Yii
  • Group: Yii Dev Team
  • Posts: 1,450
  • Joined: 04-October 10

Posted 06 October 2012 - 04:51 PM

View Postxicond, on 06 October 2012 - 08:53 AM, said:

Pardon me to suggest a new widget from combination with jqgrid.
I am really interest on some ext that really complete with js tool and css
Thank


JQGrid is an excellent tool, but we would like to keep the Bootstrap lookalike and nowadays JQGrid has issues with this theme. If you find a way to include the widget with the possibility to have Bootstrap theme and does not have issues and/or conflicts. They will be added to it.
¿How long would it take for you to understand that you own nothing in this world?

www.ramirezcobos.com
www.2amigos.us
www.github.com/tonydspaniard
www.github.com/2amigos


Posted Image
0

#6 User is offline   NkM 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 4
  • Joined: 12-January 12

Posted 10 October 2012 - 01:23 AM

I have a question in regards to themeing/customization and using LESS. If I wanted to customize my theme (pretty much adjusting everything found in the "Customize Variables" section in the Twitter Bootstrap download page), what's the best way to do it? Would it be to just customize it from Twitter Bootstrap? What about the other CSS that's not TB related (e.g. jquery-ui related ones, bootstrap-yii.less?)?

What's the safest way to make sure my customizations are applied throughout the entire library? Is it with LESS? And if so, do we just grab the *.less source files from Twitter Bootstrap and go from there?

I guess I'm looking for some kind of guide :)

Anyway, awesome work (and much thanks to Chris for kicking off the original extension)! I love the ease of use and functionality of Twitter Bootstrap and these extensions... but I'm horrible at applying a theme that will make my site a bit different from the other TB-based sites out there
0

#7 User is offline   Antonio Ramirez 

  • Elite Member
  • Yii
  • Group: Yii Dev Team
  • Posts: 1,450
  • Joined: 04-October 10

Posted 10 October 2012 - 10:16 AM

View PostNkM, on 10 October 2012 - 01:23 AM, said:

I have a question in regards to themeing/customization and using LESS. If I wanted to customize my theme (pretty much adjusting everything found in the "Customize Variables" section in the Twitter Bootstrap download page), what's the best way to do it? Would it be to just customize it from Twitter Bootstrap? What about the other CSS that's not TB related (e.g. jquery-ui related ones, bootstrap-yii.less?)?

What's the safest way to make sure my customizations are applied throughout the entire library? Is it with LESS? And if so, do we just grab the *.less source files from Twitter Bootstrap and go from there?

I guess I'm looking for some kind of guide :)

Anyway, awesome work (and much thanks to Chris for kicking off the original extension)! I love the ease of use and functionality of Twitter Bootstrap and these extensions... but I'm horrible at applying a theme that will make my site a bit different from the other TB-based sites out there


The library references to *.css files (check assets folder of the extension), I know that .less is a cool way to do many things, but I tend to use tools like: http://stylebootstrap.info/ which easiest my work on customizing... Also, Booster has many references to many libraries that do not use .less... I guess we need some volunteers to make such huge transformation.

Cheers
¿How long would it take for you to understand that you own nothing in this world?

www.ramirezcobos.com
www.2amigos.us
www.github.com/tonydspaniard
www.github.com/2amigos


Posted Image
0

#8 User is offline   54byte 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 40
  • Joined: 06-November 10

Posted 11 October 2012 - 09:14 PM

hai antonio, thanks for your nice extension..

i use "tbjeditablecolumn" in my tbextendedgridview, its work fine.. but when i post "id" that start with "0", it cant read "0".

Ex : my id = "01122", when i check the post id with firebug, post id = "1122".

how can i fix this problem?

thanks...
0

#9 User is offline   Peter @ Liverpool 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 11
  • Joined: 17-March 12

  Posted 13 October 2012 - 06:10 AM

Hi,

Area: YiiBooster
Widget: TblActiveForm
Issue: TblDatePicker

I cannot seem to display dates in UK format (dd/mm/yyyy) - the model attribute is loading the date in UK format, I am using this code:

echo $form->datepickerRow($model, 'date_inception',
        array('hint'=>'Policy start date' 
        , 'prepend'=>'<i class="icon-calendar"></i>' 
        , 'format' => 'dd/mm/yyyy' 
        , 'weekStart'=> 1
        )) ; 


The page is rendering this js all the time though...

jQuery('#UwLocalPolicy_date_inception').datepicker({'language':'en_us','format':'mm/dd/yyyy','weekStart':0});


Any ideas appreciated. Ideally I want to use this YiiBooster component rather than the CJuiDatePicker.

Thanks,

Peter, Liverpool

Attached File(s)


0

#10 User is offline   waitforit 

  • Advanced Member
  • PipPipPip
  • Yii
  • Group: Members
  • Posts: 416
  • Joined: 09-February 11

Posted 13 October 2012 - 10:53 AM

The php extension seems to hardcode the date format even though it appears to take a format option.
0

#11 User is offline   Antonio Ramirez 

  • Elite Member
  • Yii
  • Group: Yii Dev Team
  • Posts: 1,450
  • Joined: 04-October 10

Posted 14 October 2012 - 02:40 AM

View PostPeter @ Liverpool, on 13 October 2012 - 06:10 AM, said:

Hi,

Area: YiiBooster
Widget: TblActiveForm
Issue: TblDatePicker

I cannot seem to display dates in UK format (dd/mm/yyyy) - the model attribute is loading the date in UK format, I am using this code:

echo $form->datepickerRow($model, 'date_inception',
        array('hint'=>'Policy start date' 
        , 'prepend'=>'<i class="icon-calendar"></i>' 
        , 'format' => 'dd/mm/yyyy' 
        , 'weekStart'=> 1
        )) ; 


The page is rendering this js all the time though...

jQuery('#UwLocalPolicy_date_inception').datepicker({'language':'en_us','format':'mm/dd/yyyy','weekStart':0});


Any ideas appreciated. Ideally I want to use this YiiBooster component rather than the CJuiDatePicker.

Thanks,

Peter, Liverpool


In order to use DatePicker plugin and some other widgets that require configuration options, please within the htmlOptions the 'options' key with the array of configuration options of that widget:

echo $form->datepickerRow($model, 'date_inception',
        array('hint'=>'Policy start date' 
        , 'prepend'=>'<i class="icon-calendar"></i>' 
        , 'options'=>array('format' => 'dd/mm/yyyy' , 'weekStart'=> 1)
        )) ;


When you have issues with other plugins, please check TbInputVertical and TbInputHorizontal to review the way different options are taken from htmlOptions to construct the widget. This was included in order to maintain bc widgets construction with Bootstrap library.
¿How long would it take for you to understand that you own nothing in this world?

www.ramirezcobos.com
www.2amigos.us
www.github.com/tonydspaniard
www.github.com/2amigos


Posted Image
0

#12 User is offline   Antonio Ramirez 

  • Elite Member
  • Yii
  • Group: Yii Dev Team
  • Posts: 1,450
  • Joined: 04-October 10

Posted 14 October 2012 - 02:41 AM

View Post54byte, on 11 October 2012 - 09:14 PM, said:

hai antonio, thanks for your nice extension..

i use "tbjeditablecolumn" in my tbextendedgridview, its work fine.. but when i post "id" that start with "0", it cant read "0".

Ex : my id = "01122", when i check the post id with firebug, post id = "1122".

how can i fix this problem?

thanks...

Could you provide code example? Thanks!
¿How long would it take for you to understand that you own nothing in this world?

www.ramirezcobos.com
www.2amigos.us
www.github.com/tonydspaniard
www.github.com/2amigos


Posted Image
0

#13 User is offline   Peter @ Liverpool 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 11
  • Joined: 17-March 12

Posted 14 October 2012 - 05:52 AM

Hola Antonio,

You deserve your 'elite' status :) thanks that worked perfectly. Lastly, is there a way to get the picker to close once a date is clicked? I have to click away at the moment.

Gracias!

Peter
0

#14 User is offline   masterthink 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 3
  • Joined: 02-April 12
  • Location:Indonesia-Jawa Tengah - Semarang

Posted 14 October 2012 - 08:25 AM

i have problem with Relation data when i use TbEditableCOlumn, can u help me please, thanx for the answer
this is my code

-------------------------------------
    $this->widget('bootstrap.widgets.TbGridView', array(
        'type'=>'striped bordered condensed',
	    'id'=>'isistok-grid',
	    'dataProvider'=>$model->searchStok(10),
        'filter'=>$model,
        'enableSorting'=>false,
        'enablePagination' => true,
        'pager' => array(
            'cssFile' => false,
            'header' => false,
            'firstPageLabel' => 'First',
            'prevPageLabel' => 'Previous',
            'nextPageLabel' => 'Next',
            'lastPageLabel' => 'Last',
        ),        
	    'columns'=>array(
            array(
                'header'=>'No.',
                    'value'=>'$this->grid->dataProvider->pagination->currentPage*
                    $this->grid->dataProvider->pagination->pageSize + $row+1',
                'htmlOptions'=>array('style'=>'text-align:center'),
            ),            
            array(
                'name'=>'tgl',
                'header'=>'Tanggal',
                'value'=>'date("d-m-Y H:i:s",strtotime($data->tgl))',
                'htmlOptions'=>array('style'=>'text-align:center'),
            ),  
            
            array(
                'class' => 'bootstrap.widgets.TbEditableColumn',
                'name' => 'idBarang0.idJenisBarang0.nama', --> Error in this
                'sortable'=>false,
                'editable' => array(
                    'url' => $this->createUrl('site/editable'),
                    'placement' => 'right',
                    'inputclass' => 'span3'
                )
            ),

my relation table in the picture, what i want is data from jenisbarang->nama, in cgridview it work fine, but with TbEditableColumn, it cant detect relation


this is debug result
----------------------
Querying SQL: SELECT `idBarang0`.`idBarang` AS `t1_c0`,
`idBarang0`.`idJenisBarang` AS `t1_c1`, `idBarang0`.`idUserLogin` AS
`t1_c2`, `idBarang0`.`nama` AS `t1_c3`, `idBarang0`.`lokasi` AS `t1_c4`,
`idBarang0`.`kode` AS `t1_c5`, `idBarang0`.`modal` AS `t1_c6`,
`idBarang0`.`laba` AS `t1_c7`, `idBarang0`.`jumlah` AS `t1_c8`,
`idBarang0`.`terjual` AS `t1_c9` FROM `barang` `idBarang0`  WHERE
(`idBarang0`.`idBarang`=:ypl0). Bound with :ypl0=NULL
in
D:\htdocs\plath\protected\extensions\bootstrap\widgets\TbEditableColumn.php
(45)
in D:\htdocs\plath\protected\views\transaksi\isiStok\admin.php (279)
in D:\htdocs\plath\protected\controllers\TransaksiController.php (89)
in D:\htdocs\plath\protected\modules\rights\components\RController.php (36)
in D:\htdocs\plath\index.php (18)
 

-----------------
i dont know what about other editable, are they like this too (cant detect AR) ?

Attached File(s)

  • Attached File  ar.png (20.08K)
    Number of downloads: 56

0

#15 User is offline   Antonio Ramirez 

  • Elite Member
  • Yii
  • Group: Yii Dev Team
  • Posts: 1,450
  • Joined: 04-October 10

Posted 14 October 2012 - 02:15 PM

View PostPeter @ Liverpool, on 14 October 2012 - 05:52 AM, said:

Hola Antonio,

You deserve your 'elite' status :) thanks that worked perfectly. Lastly, is there a way to get the picker to close once a date is clicked? I have to click away at the moment.

Gracias!

Peter



Thats the way the plugin works... for that to happen, you will have to modify the actual jquery plugin code.
¿How long would it take for you to understand that you own nothing in this world?

www.ramirezcobos.com
www.2amigos.us
www.github.com/tonydspaniard
www.github.com/2amigos


Posted Image
0

#16 User is offline   Antonio Ramirez 

  • Elite Member
  • Yii
  • Group: Yii Dev Team
  • Posts: 1,450
  • Joined: 04-October 10

Posted 14 October 2012 - 02:18 PM

View Postmasterthink, on 14 October 2012 - 08:25 AM, said:

i have problem with Relation data when i use TbEditableCOlumn, can u help me please, thanx for the answer
this is my code

-------------------------------------
    $this->widget('bootstrap.widgets.TbGridView', array(
        'type'=>'striped bordered condensed',
	    'id'=>'isistok-grid',
	    'dataProvider'=>$model->searchStok(10),
        'filter'=>$model,
        'enableSorting'=>false,
        'enablePagination' => true,
        'pager' => array(
            'cssFile' => false,
            'header' => false,
            'firstPageLabel' => 'First',
            'prevPageLabel' => 'Previous',
            'nextPageLabel' => 'Next',
            'lastPageLabel' => 'Last',
        ),        
	    'columns'=>array(
            array(
                'header'=>'No.',
                    'value'=>'$this->grid->dataProvider->pagination->currentPage*
                    $this->grid->dataProvider->pagination->pageSize + $row+1',
                'htmlOptions'=>array('style'=>'text-align:center'),
            ),            
            array(
                'name'=>'tgl',
                'header'=>'Tanggal',
                'value'=>'date("d-m-Y H:i:s",strtotime($data->tgl))',
                'htmlOptions'=>array('style'=>'text-align:center'),
            ),  
            
            array(
                'class' => 'bootstrap.widgets.TbEditableColumn',
                'name' => 'idBarang0.idJenisBarang0.nama', --> Error in this
                'sortable'=>false,
                'editable' => array(
                    'url' => $this->createUrl('site/editable'),
                    'placement' => 'right',
                    'inputclass' => 'span3'
                )
            ),

my relation table in the picture, what i want is data from jenisbarang->nama, in cgridview it work fine, but with TbEditableColumn, it cant detect relation


this is debug result
----------------------
Querying SQL: SELECT `idBarang0`.`idBarang` AS `t1_c0`,
`idBarang0`.`idJenisBarang` AS `t1_c1`, `idBarang0`.`idUserLogin` AS
`t1_c2`, `idBarang0`.`nama` AS `t1_c3`, `idBarang0`.`lokasi` AS `t1_c4`,
`idBarang0`.`kode` AS `t1_c5`, `idBarang0`.`modal` AS `t1_c6`,
`idBarang0`.`laba` AS `t1_c7`, `idBarang0`.`jumlah` AS `t1_c8`,
`idBarang0`.`terjual` AS `t1_c9` FROM `barang` `idBarang0`  WHERE
(`idBarang0`.`idBarang`=:ypl0). Bound with :ypl0=NULL
in
D:\htdocs\plath\protected\extensions\bootstrap\widgets\TbEditableColumn.php
(45)
in D:\htdocs\plath\protected\views\transaksi\isiStok\admin.php (279)
in D:\htdocs\plath\protected\controllers\TransaksiController.php (89)
in D:\htdocs\plath\protected\modules\rights\components\RController.php (36)
in D:\htdocs\plath\index.php (18)
 

-----------------
i dont know what about other editable, are they like this too (cant detect AR) ?


TbEditableColumn is extended from TbDataColumn > CDataColumn, so, could you please check whether the relation works with simple column before? I guess there is an issue with your SQL.

Cheers
¿How long would it take for you to understand that you own nothing in this world?

www.ramirezcobos.com
www.2amigos.us
www.github.com/tonydspaniard
www.github.com/2amigos


Posted Image
0

#17 User is offline   Antonio Ramirez 

  • Elite Member
  • Yii
  • Group: Yii Dev Team
  • Posts: 1,450
  • Joined: 04-October 10

Posted 14 October 2012 - 02:19 PM

Your relation is bound to an ID= NULL

// ON YOUR DEBUG!!!!

SELECT `idBarang0`.`idBarang` AS `t1_c0`,
`idBarang0`.`idJenisBarang` AS `t1_c1`, `idBarang0`.`idUserLogin` AS
`t1_c2`, `idBarang0`.`nama` AS `t1_c3`, `idBarang0`.`lokasi` AS `t1_c4`,
`idBarang0`.`kode` AS `t1_c5`, `idBarang0`.`modal` AS `t1_c6`,
`idBarang0`.`laba` AS `t1_c7`, `idBarang0`.`jumlah` AS `t1_c8`,
`idBarang0`.`terjual` AS `t1_c9` FROM `barang` `idBarang0`  WHERE
(`idBarang0`.`idBarang`=:ypl0). Bound with :ypl0=NULL <----- SEE? 


¿How long would it take for you to understand that you own nothing in this world?

www.ramirezcobos.com
www.2amigos.us
www.github.com/tonydspaniard
www.github.com/2amigos


Posted Image
0

#18 User is offline   masterthink 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 3
  • Joined: 02-April 12
  • Location:Indonesia-Jawa Tengah - Semarang

Posted 14 October 2012 - 07:59 PM

View PostAntonio Ramirez, on 14 October 2012 - 02:19 PM, said:

Your relation is bound to an ID= NULL

// ON YOUR DEBUG!!!!

SELECT `idBarang0`.`idBarang` AS `t1_c0`,
`idBarang0`.`idJenisBarang` AS `t1_c1`, `idBarang0`.`idUserLogin` AS
`t1_c2`, `idBarang0`.`nama` AS `t1_c3`, `idBarang0`.`lokasi` AS `t1_c4`,
`idBarang0`.`kode` AS `t1_c5`, `idBarang0`.`modal` AS `t1_c6`,
`idBarang0`.`laba` AS `t1_c7`, `idBarang0`.`jumlah` AS `t1_c8`,
`idBarang0`.`terjual` AS `t1_c9` FROM `barang` `idBarang0`  WHERE
(`idBarang0`.`idBarang`=:ypl0). Bound with :ypl0=NULL <----- SEE? 




this is my code in search function i use
----------------------------------
public function searchStok($baris)
{
// Warning: Please modify the following code to remove attributes that
// should not be searched.

$criteria=new CDbCriteria;

$criteria->compare('idBarangDetailMasuk',$this->idBarangDetailMasuk);
$criteria->compare('idBarang',$this->idBarang);
$criteria->compare('idUserLogin',$this->idUserLogin);
$criteria->compare('DATE_FORMAT(t.tgl,"%d-%m-%Y %H:%i:%s")',$this->tgl,true);
$criteria->compare('t.jumlah',$this->jumlah,true);
$criteria->compare('nama',$this->nama,true);
$criteria->compare('jns.nama',$this->jenis,true);

$criteria->select = array(
't.jumlah as jumlah',
'DATE_FORMAT(t.tgl,"%d-%m-%Y %H:%i:%s") as tgl',
'brg.nama as nama',
'jns.nama as jenis',
'(brg.modal+brg.laba) as harga',
'ifnull(sum(brg.jumlah-brg.terjual),0) as stok',
);
$criteria->with = array(
'idBarang0'=>array(
'select'=>array(),
'alias'=>'brg',
'with'=>array(
'idJenisBarang0'=>array(
'select'=>array(),
'alias'=>'jns',
),
),
'together'=>true,
),
);
$criteria->alias='t';
$criteria->together=true;
$criteria->group='t.idBarangDetailMasuk';
$criteria->having='stok>0';
$criteria->order='t.tgl desc';



return new CActiveDataProvider($this, array(
'criteria'=>$criteria,
'pagination'=>array(
'pageSize'=>$baris,
),
));
}
-------------------------------------------
in cgridview i can call this
array(
'name'=>'jenis',
'header'=>'Jenis',
'value'=>'$data->jenis',
'htmlOptions'=>array('style'=>'text-align:center'),
),
but when i change to this
array(
'class' => 'bootstrap.widgets.TbEditableColumn',
'name' => 'jenis',
'sortable'=>false,
'editable' => array(
'url' => $this->createUrl('site/editable'),
'placement' => 'right',
'inputclass' => 'span3'
)
),
it say error (Model "Barangdetailmasuk" does not have attribute "jenis" ),
what must i do if data contain relation with other table ?
0

#19 User is offline   54byte 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 40
  • Joined: 06-November 10

Posted 14 October 2012 - 08:37 PM

View PostAntonio Ramirez, on 14 October 2012 - 02:41 AM, said:

Could you provide code example? Thanks!


this is my code :

$this->widget('bootstrap.widgets.TbExtendedGridView',array(
	'id'=>'kbki-subklas-grid',
	'dataProvider'=>$model->search(),
	'filter'=>$model,
	'type'=>'striped bordered',
	'columns'=>array(
		'id',
		array(
            'name'=>'deskripsi',
	          'class'=>'bootstrap.widgets.TbJEditableColumn',
            'saveURL'=>$this->createUrl('myUrl),
			'jEditableOptions' => array(
	            'type' => 'text',
				'submitdata' => array('attribute'=>'deskripsi'),
	            'cssclass' => 'form',
	            'width' => '200px',
			),
        ),
		array(
			'class'=>'bootstrap.widgets.TbButtonColumn',
		),
	),
));

0

#20 User is offline   54byte 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 40
  • Joined: 06-November 10

Posted 16 October 2012 - 09:04 PM

i use bootstrap generator and every "_search.php" form will give button like this :


	<div class="form-actions">
		<?php $this->widget('bootstrap.widgets.TbButton', array(
			'type'=>'primary',
			'label'=>'Search',
		)); ?>
	</div>


because that button not a submit button when i click button, it dont do search. I think its better to change generate code to :

	<div class="form-actions">
		<?php $this->widget('bootstrap.widgets.TbButton', array(
			'buttonType'=>'submit',
			'type'=>'primary',
			'label'=>'Search',
		)); ?>
	</div>


add 'buttonType'=>'submit',

thanks..
0

Share this topic:


  • (16 Pages)
  • +
  • 1
  • 2
  • 3
  • Last »
  • You cannot start a new topic
  • This topic is locked

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users