Yiibooster

How about jquery easy ui

Will do thanks

Wow! Great library… is a shame that it looks like windows type of widget (too similar to Sencha dont you think?), if their look (not just with their theme editor) could be translated to Bootstrap look alike, would be worth looking at it

Thanks! So, is the better practice (since it’s an extension) to overwrite the *.css files in the extension’s assets folder, or should we publish the new CSS (and have it override Yiibooster’s styles when the browser renders it)?

That was fixed as of version 1.0.1

I have pushed the separated *.less for 1.0.2-wip branch. No variable replacement yet, would be nice a bit of help there…

I would override with the new ones when browser renders it, so you always have the original source code.

My good friend, your error is very clear… Your model BARANGDETAILMASUK *DOES NOT have attribute JENIS, so, make sure your model has that attribute on the table? if you have a relation on another table, check this post, it may help you out to understand the basics to render relational data on CGridView: http://stackoverflow.com/questions/9555410/displaying-cgridview-in-yii

I think that has to do with an issue that I have fixed on TbRelationalColumn but not on this one… could you do the following and tell the results?

Go to TbJEditableColumn line 131, and instead of having:




echo CHtml::openTag('span', array('class' => $this->cssClass, 'data-rowid' => $data->id));



Change to




echo CHtml::openTag('span', array('class' => $this->cssClass, 'data-rowid' => $data->primaryKey));



The data is extracted from the data-rowid and I think the return of jQuery(this).data(‘rowid’) is what is causing the problem, so please, could you also change the following line 195:




var id = jQuery(this).data('rowid');



to




[code]

var id = jQuery(this).attr('data-rowid');



I believe you just found a bug

I have made a major update to see if i solve your issue. The two commits are:

https://github.com/clevertech/YiiBooster/commit/1da3a0cdb984357f23c880cb2207be6db39f9014

and

https://github.com/clevertech/YiiBooster/commit/250162e6e0b70709346241d9119237491c9e5eae

Lets see if it solves your issue

thanks antonio…

hi antonio… thanks for your response…

i follow this step but still not solves my problem…

i try to get value with id "11002" it work fine… but when i try to get value with id begin "0" ex : "01223" it just get "1223".

i have update my yii booster but still not work…

thanks…

Can I see your controller?

this is my controller :

action admin show the gridview




	public function actionAdmin()

	{

		$model=new KbkiSeksi('search');

		$model->unsetAttributes();  // clear any default values

		if(isset($_GET['KbkiSeksi']))

			$model->attributes=$_GET['KbkiSeksi'];


		$this->render('admin',array(

			'model'=>$model,

		));

	}



actionEditable, do AJAX from jeditable





	public function actionEditable()

	{

		$r = Yii::app()->getRequest();

		if($r->getParam('editable'))

		{

			$idnya=$r->getParam('id');

			$model=KbkiSeksi::model()->findByPk($idnya);

			if($model!==NULL)

			{

				$model->deskripsi=$r->getParam('value');

				if($model->save())

				{

					echo  "<script type='text/javascript'>alert('Some message');</script>";

					echo $model->deskripsi;

				}

				else

				{

					echo "<script type='text/javascript'>javascript: alert('Some message');</script>";

				}

			}

			else

			{

				echo "<script type='text/javascript'>javascript: alert('Some message');</script>";

			}			

			Yii::app()->end();

		}

	}



Salut Antonio,

I am begginer with yii framework.

I just add your extension but it doesn’t work !

I don’t have the same strucure as the YiiBoilerplate in my project.

Instead of the nice blue button i have a ugly grey button.

here my code :




<?php

$this->widget('ext.bootstrap.widgets.TbButton',array(

	'label' => 'Primary',

	'type' => 'primary',

	'size' => 'large'

));

$this->widget('ext.bootstrap.widgets.TbButton',array(

	'label' => 'Secondary',

	'size' => 'large'

));

?>

and the main.php :




	// preloading 'log' component

	'preload'=>array('log','bootstrap',),


    

    

     'components'=>array(

        'bootstrap'=>array(

            'class'=>'ext.bootstrap.components.Bootstrap', // assuming you extracted bootstrap under extensions

            'coreCss'=>true,

                'responsiveCss'=>true,

                'yiiCss'=>true,

                'enableJS'=>true,

        ),

     ),

    

	// autoloading model and component classes

	'import'=>array(

		'application.models.*',

		'application.components.*',

        'application.extensions.*',

        'application.extensions.core.*',

        'application.extensions.utils.*',

        'application.extensions.emessage-command.*',

        'application.extensions.bootstrap.widgets.*',

	),


	'modules'=>array(

		// uncomment the following to enable the Gii tool

		'gii'=>array(

			'class'=>'system.gii.GiiModule',

			'password'=>'mdp',

			// If removed, Gii defaults to localhost only. Edit carefully to taste.

			'ipFilters'=>array('127.0.0.1','::1'),

            'generatorPaths'=>array( 'bootstrap.gii'),

		),

	),



Any ideas ?

Thanks

Nath

I do not see anything wrong with it, could you check with FIREBUG what is the actual value submitted?

Hey Nath,

Once you register and preload ‘bootstrap’, the component creates a new ‘alias’, so there is no need to use ‘ext.bootstrap.widgets…’ but ‘bootstrap.widgets…’, also, the following properties




'yiiCss'=>true,

'enableJS'=>true,



are already set to those values by default. same with ’ ‘application.extensions.bootstrap.widgets.*’,’ you don’t need to include that… Please, follow the instructions on http://yii-booster.clevertech.biz/getting-started.html and then display the button as specified in http://yii-booster.clevertech.biz/components.html#buttons

Hope it helps

Toni

@ Antonio

thank you for your answer.

I fixed the problem.

It was that I didn’t put




 'bootstrap'=>array(

            'class'=>'ext.bootstrap.components.Bootstrap', // assuming you extracted bootstrap under extensions

            'coreCss'=>true,

                'responsiveCss'=>true,

                'yiiCss'=>true,

                'enableJS'=>true,

        ),



at the correct place.

Like this, it works :




	'components'=>array(


		'user'=>array(

			// enable cookie-based authentication

			'allowAutoLogin'=>true,

            

		),

		

		'db'=>array(

			'connectionString' => 'mysql:host=localhost;dbname=qyii',

			'emulatePrepare' => true,

			'username' => 'root',

			'password' => '',

			'charset' => 'utf8',

		),

		'errorHandler'=>array(

			// use 'site/error' action to display errors

			'errorAction'=>'site/error',

		),

		'log'=>array(

			'class'=>'CLogRouter',

			'routes'=>array(

                array(

                    'class'=>'qyiiFileLogRoute',

                    'levels'=>'error, warning',

                    'logFile'=>'logs.txt',

                )

				// uncomment the following to show log messages on web pages

				/*

				array(

					'class'=>'CWebLogRoute',

				),

				*/

			),

		),

        

         'bootstrap'=>array(

            'class'=>'application.extensions.bootstrap.components.Bootstrap', // assuming you extracted bootstrap under extensions

            'coreCss'=>true,

                'responsiveCss'=>true,

               

        ),

        

        'widgetFactory'=>array(

            'widgets'=>array(

                'CGridView'=>array(

                    'itemsCssClass'=>'tabResults',

//                    'columns'=>'QGridColumn',

                ),

            ),

         ),


 

	),



the error was that I did that :




 'components'=>array(

        'bootstrap'=>array(

            'class'=>'ext.bootstrap.components.Bootstrap', // assuming you extracted bootstrap under extensions

            'coreCss'=>true,

                'responsiveCss'=>true,

                'yiiCss'=>true,

                'enableJS'=>true,

        ),

     ),





// application components

	'components'=>array(

		'user'=>array(

			// enable cookie-based authentication

			'allowAutoLogin'=>true,

            

		),

          ),



Glad you found it… and it works…

By the way, new version is out: http://yii-booster.clevertech.biz

hai antonio, the value that i ask before is check by firebug…

It seems that is due to the nature of the jquery.jeditable.js plugin itself (check line 326-329 of jquery.jeditable.js I think that $.extend is causing the conversion I am not sure).

We can try to modify its behavior by prepending the id with a string (ie: ID012829) and then remove it on the server or you could make use of the TbEditableColumn which is another (and personally cooler) way of having an edit in place. TbEditableColumn uses forms, so I believe it could help you more than TbJEditableColumn ( I have to track down this behavior where strings are converted to numbers )

Cheers