Yii Framework Forum: Yiibooster - Yii Framework Forum

Jump to content

  • (16 Pages)
  • +
  • « First
  • 11
  • 12
  • 13
  • 14
  • 15
  • Last »
  • You cannot start a new topic
  • This topic is locked

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

#241 User is offline   mikeklon 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 17
  • Joined: 30-July 11
  • Location:Florida USA

Posted 30 January 2013 - 06:03 AM

View Postmirunho, on 30 January 2013 - 02:22 AM, said:

Everything is quite well described in http://yii-booster.c...ng-started.html


@mirunho: Thanks for the hint! I'll start there.
0

#242 User is offline   johnsnails 

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

Posted 30 January 2013 - 06:07 AM

I wrote some fairly easy to follow instructions a page or so up in this thread
0

#243 User is offline   georgeee 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 4
  • Joined: 02-February 12

Posted 31 January 2013 - 04:24 AM

Great work!
George Agapov
Website: georgeee.ru
0

#244 User is offline   mecano 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 9
  • Joined: 18-June 11
  • Location:Colombia

Posted 01 February 2013 - 10:09 PM

Hi i want to know is somebody can make to put Number format to TbExtendedGridView whit the

TbTotalSumColumn Column...

i try to do but the only thing i can do was modify the file tbtotalSumColumn.php (line 38 ) to format the number was are number and do nothing when was other thing...

maybe you can helpe me to do this more efficient... this the code..


if(is_numeric($value))
{
			$this->total += $value;
                    	echo number_format($value,2);
 }
  	else
       		echo $value;




thanks..
0

#245 User is offline   germanliu 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 40
  • Joined: 26-September 12

Posted 04 February 2013 - 04:08 PM

Hi, I am trying to implement the date range input. When I use:

<?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"));}')         )); ?>


The calendar doesn't appear when I click the box.

I would also like to know if there is a way to configure a date range with two different 'boxes'. Like the one found here: http://jqueryui.com/...ker/#date-range

Thanks a lot
0

#246 User is offline   Riyas 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 19
  • Joined: 29-October 11
  • Location:India

Posted 05 February 2013 - 01:53 AM

How i can give a image instead of text in
TbRelationalCoumn

array(
            'class'=>'bootstrap.widgets.TbRelationalColumn',
            'name' => 'Expand',
	    'url' => $this->createUrl('/profile/daysStatus'),
	    
            'value'=> '"<img src=\"'.Yii::app()->baseUrl.'/images/arrow_down.png\">"',
            'afterAjaxUpdate' => 'js:function(tr,rowid,data){
                
            }'
		),


The value is showing as string, I need to display an image instead.any idea?
Please Help.
0

#247 User is offline   luk1999 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 35
  • Joined: 20-April 11
  • Location:Poland

Posted 05 February 2013 - 02:20 AM

I'm not sure if this work, but you may try add:
'type' => 'raw'

1

#248 User is offline   Riyas 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 19
  • Joined: 29-October 11
  • Location:India

Posted 05 February 2013 - 05:54 AM

View Postluk1999, on 05 February 2013 - 02:20 AM, said:

I'm not sure if this work, but you may try add:
'type' => 'raw'



Thanks luk999.
It is working,thank you for your kind help
0

#249 User is offline   staticblue 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 2
  • Joined: 07-January 13

Posted 07 February 2013 - 11:26 AM

Hi there,

Could someone please give me a bit of insight on how to use the TbImageColumn widget ? In particular, how to set the $imagePathExpression, $row, $data when calling the widget in my view :


...
'columns' => array_merge(array(array('class'=>'bootstrap.widgets.TbImageColumn')),$columns)));

...

where and how do I set my image path for each row, considering I have the paths stored in a database table ?

An example would be great .. thanks :)
0

#250 User is offline   germanliu 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 40
  • Joined: 26-September 12

Posted 11 February 2013 - 02:31 PM

Hi, I want to collaborate with this awesome extension by telling something that I found is not working as expected. The bad news is I don't know how to fix it ;(

The TbPager aligment property is not working. The problem is that the property updates the htmlOptions of CLinkPager. And what this does is to add the class to the html tag 'ul'... not to the div tag where it should be.

The problem might be in the ClistPager and not here in fact... i am too newby...

I appreciate any help!
Thanks!
German
0

#251 User is offline   germanliu 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 40
  • Joined: 26-September 12

Posted 11 February 2013 - 02:44 PM

I fixed it this way: I pass 'pagination pagination-right' to 'pagerCssClass' property of TbListView... I hope it helps to another one!
0

#252 User is offline   Kjell Einar Skutle 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 28
  • Joined: 30-November 11
  • Location:Norway

Posted 12 February 2013 - 06:07 AM

I am using the sortable rows feature of TbExtendedGridView, and I enconter a problem when I enable CSRF validation. How can I pass the CSRF token when I update the sorting? I have set 'sortableAjaxSave'=>true.
0

#253 User is offline   xicond 

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

Posted 12 February 2013 - 09:54 PM

How was the asterik (*) as required sign in form got the info that the field was required?

from rule set Model or from directly table infoscheme?

thanx
0

#254 User is offline   mirunho 

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

Posted 13 February 2013 - 02:07 AM

View Postxicond, on 12 February 2013 - 09:54 PM, said:

How was the asterik (*) as required sign in form got the info that the field was required?

from rule set Model or from directly table infoscheme?

thanx


From Active Record model rules.
0

#255 User is offline   Fahmy 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 2
  • Joined: 29-December 12

Posted 15 February 2013 - 05:20 AM

Hi,

Do you guys have any issue viewing TbDetailView on iPhone 3GS ? I found out something weird that i cannot click on breadcrumbs on mobile view only when i'm using TbDetailView. Unlike TbGridView, it has responsiveTable option and it works on iPhone.

Any suggestion? or input? or am i the only person who is facing this situation..? :blink:
0

#256 User is offline   Fahmy 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 2
  • Joined: 29-December 12

Posted 17 February 2013 - 12:22 AM

Hi guys,
I think i found what went wrong.In my design i've included these widgets:
In my main view
1. Navigation
2. breadcrumbs

In my organization_view where i called renderPartial:
1. TbModal
2. TbBox
and inside TbBox, i called another renderPartial with options set to true.

It seems that when i removed the TbModal in my view everything goes well.
I discover this when i tested with my IPhone and every time i try to click the breadcrumbs the button in the TbModal get high-lighted even though it was on hide. That is how i figured it out.
This explanation is just IMHO as a newbie..i just have to move on with my development not to use TbModal as for a while on my view and i don't want to assume that TbModal also has bug.
i don't think this is a bug at all for TbDetailView.
my bad ..sorry
0

#257 User is offline   bit0123 

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

Posted 19 February 2013 - 12:53 AM

How to use select2Row for multiselect Purpose:

For single select the syntax is like:
<?php echo $form->select2Row($model,'hotel_class_id', array('data'=>CHtml::listData(HotelClass::model()->findAll(),'id', 'name'), 'class'=>'span10')); ?>


But when i want to use select2Row for multiselect purpose then what will be the syntax?

I am in problem. Please help me.
Thanks in advance
0

#258 User is offline   bit0123 

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

Posted 19 February 2013 - 12:58 AM

How to use select2Row for multiselect Purpose:

when i use the bellow given syntax:
echo $form->select2Row($model, 'places', array(
                    'asDropDownList' => false,
                    'options' => array(
                    'tags' => CHtml::listData(Place::model()->findAll(),'id', 'name'),
                    'placeholder' => 'type places',
                    'width'=>'85%',
                    'tokenSeparators' => array(',', ' ')
                    )));

Then the auto suggested value is not shown and you can put any value.
Whats the problem with the code?

Thanks.
0

#259 User is offline   bit0123 

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

Posted 20 February 2013 - 01:36 AM

Is there anyone who can give the solution?

Any suggestion will be highly appreciated.
Thanks a lot for your time.
0

#260 User is offline   Don Felipe 

  • Standard Member
  • PipPip
  • Yii
  • Group: Members
  • Posts: 117
  • Joined: 02-January 11
  • Location:Saigon, Vietnam

Posted 20 February 2013 - 04:10 AM

View Postbit0123, on 19 February 2013 - 12:58 AM, said:

How to use select2Row for multiselect Purpose:

when i use the bellow given syntax:
echo $form->select2Row($model, 'places', array(
                    'asDropDownList' => false,
                    'options' => array(
                    'tags' => CHtml::listData(Place::model()->findAll(),'id', 'name'),
                    'placeholder' => 'type places',
                    'width'=>'85%',
                    'tokenSeparators' => array(',', ' ')
                    )));

Then the auto suggested value is not shown and you can put any value.
Whats the problem with the code?

Thanks.


The option 'tags' is expecting an array of strings and not an associative array as returned by listData().

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'),

0

Share this topic:


  • (16 Pages)
  • +
  • « First
  • 11
  • 12
  • 13
  • 14
  • 15
  • Last »
  • You cannot start a new topic
  • This topic is locked

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