Yii Framework Forum: Yiibooster - Yii Framework Forum

Jump to content

  • (16 Pages)
  • +
  • « First
  • 8
  • 9
  • 10
  • 11
  • 12
  • Last »
  • You cannot start a new topic
  • This topic is locked

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

#181 User is offline   johnsnails 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 64
  • Joined: 05-September 11
  • Location:Sydney Australia

Posted 19 December 2012 - 05:35 AM

View Postjohnsnails, on 16 December 2012 - 08:21 PM, said:

Thanks for your reply Antonio,

As per your suggestion I took a look at TbEditableColumn and have made some more progress.

I do have a question about it though.

On the components.html#editable page it has this example

$this->widget('bootstrap.widgets.TbGridView', array(
	'type' => 'striped bordered',
	'dataProvider' => new CActiveDataProvider('Region',array(
		'criteria'=>array('condition'=>'id < 5'))
	),
	'template' => "{items}",
	'columns' => array(
		'country_code',
		array(
			'class' => 'bootstrap.widgets.TbEditableColumn',
			'name' => 'name',
			'sortable'=>false,
			'editable' => array(
				'url' => $this->createUrl('site/editable'),
				'placement' => 'right',
				'inputclass' => 'span3'
			)
		)),
));


So am I supposed to create a method called editable inside my controller?

So change this line

'url' => $this->createUrl('site/editable'),


to

'url' => $this->createUrl('image/editable'),


or can I use my actionUpdate method inside my image controller like this?

'url' => $this->createUrl('image/update'),


ATM I have it set up to statically update image with id equal to 1 like this:

'url' => $this->createUrl('image/update', array('id'=>'1')),


This updates the frontend but is not retained when the page is refreshed.

Is there anything else I need to do?

Regards,


UPDATE:

I got this working with the help of http://stackoverflow.../291573/schmunk

And have outlined how http://stackoverflow...n-in-yiibooster

Thanks for an amazing Extension :)
0

#182 User is offline   kalempir 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 46
  • Joined: 20-July 11

Posted 19 December 2012 - 07:41 AM

I have 2 columns, first one is date, and second is integer.
How to set date column from db to x axis on Grid/Chart?
I try many ways, but can't figure out.

Any help be appreciated.
0

#183 User is offline   xicond 

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

Posted 19 December 2012 - 09:24 PM

Hello,

I had a case while I need to custom yii booster css path assets, How is it goin ?

any halp, thanks
0

#184 User is offline   kalempir 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 46
  • Joined: 20-July 11

Posted 20 December 2012 - 03:07 AM

I have additional problem after updating yiibooster to version 1.0.5. I had a header button on tbbox, which after clicking opened CJuiDialogBox. After updating it is now working. I understand that the api of widgets is changing, but it is not good to guess what was changed and how to use new api. Please, I am newbye on programming, refer to documentation of widgets and their changes.
I changed headerActions to headerButtons and make appropriate changes on other properties, but my dialog box is not working now?

I have already solved ajax dialog box issue. Thanks for this extension. It is awesome! But there is lack of documentation.
0

#185 User is offline   Alaa Abdelhaq 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 12
  • Joined: 30-April 11

Posted 23 December 2012 - 05:24 AM

Hello guys

Im trying to change toggleButtonRow enabled and disabled labels by passing values into htmlOptions array like this:
<?php echo $form->toggleButtonRow($model, 'static' , array('enabledLabel'=>'Yes' , 'disabledLabel'=>'Yes')); ?>

But its not working, I keep getting the default values in the TbToggleButton.php file.
The only way to do it is to change it directly from the file!
Am I missing something here or doing something wrong?

Thanks
0

#186 User is offline   yugene 

  • Advanced Member
  • PipPipPip
  • Yii
  • Group: Members
  • Posts: 513
  • Joined: 08-August 09

Posted 24 December 2012 - 05:36 AM

Hi Alaa Abdelhaq,

It is said in docs to toggleButtonRow:

Quote

@param array $htmlOptions additional HTML attributes (options key sets the options for the toggle component)

So, just wrap your ToggleButton options into array, e.g.

<?php echo $form->toggleButtonRow($model, 'static' , array('options'=>array('enabledLabel'=>'Yes' , 'disabledLabel'=>'Yes'))); ?>

0

#187 User is offline   Solid 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 64
  • Joined: 29-December 12
  • Location:Kristiansand, Norway

Posted 29 December 2012 - 04:52 PM

Hi. Im loving the yii-booster, thanks for sharing!

Im having some problems with markdown.converter.js.
I have included the
Yii::app()->bootstrap->registerAssetJs('markdown.converter.js', CClientScript::POS_HEAD);

and my view looks something like this:
<script type="text/javascript">var text = "<?php echo CHtml::encode($data->text); ?>";
var converter = new Markdown.Converter();
var html = converter.makeHtml(text);
alert(html);
</script>


and futher down the view:
'content' => '<script type="text/javascript">document.write(html);</script>'


But it returns a empty string.

What have i done wrong?
0

#188 User is offline   jacmoe 

  • Elite Member
  • Yii
  • Group: Moderators
  • Posts: 2,601
  • Joined: 10-October 10
  • Location:Denmark

Posted 29 December 2012 - 05:26 PM

It is running before the page has loaded. Try 'CClientScript::POS_READY' instead.
"Less noise - more signal"
0

#189 User is offline   jacmoe 

  • Elite Member
  • Yii
  • Group: Moderators
  • Posts: 2,601
  • Joined: 10-October 10
  • Location:Denmark

Posted 30 December 2012 - 07:03 PM

I am trying to make the Redactor widget work when enableCsrfValidation is set to true.

I am using the 'hiddenFields' option, but it's not working.

Here's my (not working) code:



<?php
    $csrf_token = Yii::app()->request->csrfToken;
?>

<?php /** @var BootActiveForm $form */
    $form = $this->beginWidget('bootstrap.widgets.TbActiveForm', array(
        'id'=>'horizontalForm',
        'type'=>'horizontal',
    )); ?>
<snipped>

                <?php echo $form->redactorRow($model, 'intro', array('class'=>'span4', 'rows'=>5, 'options' => array(
                    'fixed' => true,
                    'imageUpload'=>Yii::app()->createUrl('site/imageUpload'),
                    'imageGetJson'=>Yii::app()->createUrl('site/imageList'),
                    'hiddenFields' => array(
                        'YII_CSRF_TOKEN' => $csrf_token,
                    ),
                ))); ?>


Did anyone get image uploads working with CSRF validation? :)
"Less noise - more signal"
0

#190 User is offline   KillCloud 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 16
  • Joined: 02-November 12
  • Location:São Paulo, Brazil

Posted 02 January 2013 - 01:47 PM

Hi! I have implemented the yii booster fileupload. I have a question, in data[] array i have the options (url and thumbnail_url), but my images are stored in my database. How i can change this options to get the images (real and thumb) from my database? Have a alternative method?
0

#191 User is offline   Antonio Ramirez 

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

Posted 02 January 2013 - 01:56 PM

View PostKillCloud, on 02 January 2013 - 01:47 PM, said:

Hi! I have implemented the yii booster fileupload. I have a question, in data[] array i have the options (url and thumbnail_url), but my images are stored in my database. How i can change this options to get the images (real and thumb) from my database? Have a alternative method?



You will have to create your own CAction to handle that...

----
I would like to apologize for the delay of the new launch (version 1.0.6. will include about 8 more widgets and the slow loading is going to be fixed) but I got trapped into an enormous amount of work. So I beg you patience.

Cheers and happy new year to all of you!
¿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
1

#192 User is offline   jacmoe 

  • Elite Member
  • Yii
  • Group: Moderators
  • Posts: 2,601
  • Joined: 10-October 10
  • Location:Denmark

Posted 02 January 2013 - 02:04 PM

Happy New Year Antonio :)

YiiBooster is a truly excellent library!
It even made me go to the dark side and start using Bootstrap.
"Less noise - more signal"
0

#193 User is offline   Joe-Z Li 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 1
  • Joined: 02-January 13

Posted 02 January 2013 - 02:13 PM

Thanks for providing this great extension!

I installed booster ver 1.0.5 to Yii ver 1.1.12, and tried to use the TbExtendedGridView (for Fixed Header with Filter feature) for a table with about 20 columns.

It sort of works but here are the issues I am running into:

1. Because of the number of columns, the div of TbExtendedGridView grow beyond the main div (span-23, I believe, sorry, i am not a FE guy);

2. The default buttons became super tiny.

Thanks a lot and Please advice
0

#194 User is offline   rorlandi 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 2
  • Joined: 28-August 12

Posted 03 January 2013 - 02:06 PM

It seems to be a problem in Tbbox widget, ver 1.0.5. Property "headerCtrl" is used at line 118 (if ($this->title !== false || $this->headerCtrl !== false)) but it is not declared. Thanks
0

#195 User is offline   Alex.Sh 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 9
  • Joined: 23-July 12
  • Location:Riga, Latvia

Posted 03 January 2013 - 05:28 PM

Hi

How to disable booster for some page?
0

#196 User is offline   grmpz 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 12
  • Joined: 21-August 12

Posted 04 January 2013 - 04:23 PM

Hi Antonio and everyone else!

First off - Yiibooster is a wonderful extension, thank you so much for sharing this out. I have a yii site that I've built out rather quickly onto an existing database using quickdlgs iframe modal boxes for updates/view forms etc. These modals are triggered from the typical yii framework admin page gridview buttons (actually from EJuiDlgsColumn). This has worked well for quickly getting the site launched but then I stumbled on to Yiibooster and of course I really want to retro fit to leverage all of the great widgets.

Is there a way that you or anyone here that is leveraging yiibooster know of to add a button that triggers a modal form from a yii gridview row or yiibooster TbGridView row? This has been the one thing that's been keeping me from retrofitting the extension. Currenty I'm doing
      
            'class'=>'EJuiDlgsColumn',
            'template'=>'{update}{view}',
	    'updateButtonImageUrl'=>Yii::app()->baseUrl .'/images/boltcharge.png',
            'updateDialog'=>array(
               'controllerRoute' => 'reboot', 
               'actionParams' => array('id'=>'$data->id'),
               'dialogTitle' => 'Remote Reboot',
               'dialogWidth' => 650, //override the value from the dialog config
               'dialogHeight' => 450,
               'closeButtonText' => 'Close',
               'closeOnAction' => true, 
               'refreshGridId' => 'server-grid'
            ),


in the view and then in the controller actionUpdate something like:

			$model=$this->loadModel($id);
			// Uncomment the following line if AJAX validation is needed
			// $this->performAjaxValidation($model);
			if(isset($_POST['Server']))
			{
				$model->attributes=$_POST['Server'];
				if($model->save()) {
					EQuickDlgs::checkDialogJsScript();
					$this->redirect(array('admin','id'=>$model->id));
				}
			}
			EQuickDlgs::render('update',array('model'=>$model));


This pops a modal window up that submits updated model back and triggers an ajax refresh of the admin grid. This has even worked well for creating one off forms that don't inherit functionality from the framework. After I retrofitted I've noticed that a normal admin grid with view/update/delete buttons on the right only pops open the modal for update (js errors out on any viewdialog functions). My next thought was use the yiibooster modal window and renderPartial on the view forms as needed but I can't seem to get the button to work from within either gridview row.

Does anyone have any suggestions for triggering the modal from a gridview row (either base yii or yiibooster)? As time permits I will refactor completely into booster but this seems like the only issue holding back a retrofit for my next QA push.

Cheers to all and Happy New Years!
0

#197 User is offline   eng.moh.abdellatif 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 3
  • Joined: 25-December 12

Posted 04 January 2013 - 09:23 PM

i am a new user in YII,
what is the difference between YiiBoilerplate and YiiBooster..
what is the job for each one?
0

#198 User is offline   jacmoe 

  • Elite Member
  • Yii
  • Group: Moderators
  • Posts: 2,601
  • Joined: 10-October 10
  • Location:Denmark

Posted 05 January 2013 - 04:58 AM

YiiBoilerplate uses YiiBooster.

Check it out:
http://yii-booster.c....biz/index.html
"Less noise - more signal"
0

#199 User is offline   banago 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 20
  • Joined: 10-March 11
  • Location:Piz da Dufour

Posted 05 January 2013 - 06:25 AM

THX for this great framework and yiibooster!

Regarding bootstrap.widgets.TbTotalSumColumn:

How can I format only the footer of the sum column?
I had the experience that with the formatter activated like shown below, the sum is not working.

'columns' => array(
        ...
        array('name' => 'entity.ent_name', 'header' => 'Entity', 'footer' => 'Total Amount EUR / GBP'),
        array(
            'name' => 'dc_amount',
            'header' => 'Amount EUR',
            'class' => 'bootstrap.widgets.TbTotalSumColumn',
            'value'=> "Yii::app()->numberFormatter->formatCurrency('dc_amount',
                        Yii::app()->params->currencyEUR)",
        ),
        array(
            'name' => 'dc_amount2',
            'header' => 'Amount GBP',
            'class' => 'bootstrap.widgets.TbTotalSumColumn',
            'value'=> "Yii::app()->numberFormatter->formatCurrency('dc_amount2',
                        Yii::app()->params->currencyGBP)",
        ),
      ...

    ),

0

#200 User is offline   mirunho 

  • Standard Member
  • PipPip
  • Yii
  • Group: Members
  • Posts: 170
  • Joined: 19-December 12
  • Location:Gdansk, Poland

Posted 05 January 2013 - 12:26 PM

Hi guys, thanks for YiiBooster its really great.
Just one question, How to set my main.css file to be first to read ?
bootstrap.css override my main.css and pages where i use yiibooster looks different than others, couse of override for example h1 etc ...

Thanks for any help
0

Share this topic:


  • (16 Pages)
  • +
  • « First
  • 8
  • 9
  • 10
  • 11
  • 12
  • 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