Yii Framework Forum: Removing Bullet Points From Cjuisortable - Yii Framework Forum

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Removing Bullet Points From Cjuisortable Removing Bullet Points from CJUISortable Rate Topic: -----

#1 User is offline   PrimoDrago 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 5
  • Joined: 17-February 13

Posted 09 May 2013 - 12:34 PM

Hello stranger. I hope you can help me.

I have added a CJUISortable widget which is working perfectly fine and doing what I want. However, because my list isn't displaying texts but pictures, I want to remove the bullet points from the <ul> that comes with the widget by default.

Here's my code:

 
    $thumbs = array();
    foreach($pictures as $pic)
    {
        $fullPath = '../thumbs/'.$pic['filename'];
        $thumbs['id_'.$pic['picture_id']] = '<div style="margin:20px" id="'.$pic["picture_id"].'"><img src="'.$defaultImageFolder.$fullPath.'" width="75" height="50" alt=""></div>';
    }

    $this->widget('zii.widgets.jui.CJuiSortable', array(
        'id'=>'reorder_thumbs',
        'items'=>$thumbs,
        'tagName'=>'div',
        'options'=>array(
                    'cursor'=>'move',
                    'delay'=>100,
                    'update'=>"js:function(){
                            $.ajax({
                                    type: 'POST',
                                    url: $(this).attr('href'),
                                    data: $(this).sortable('serialize'),
                            });
                    }",
            ),                              
    ));


I thought of adding htmlOptions but I really don't know how to use them and have not found one single tutorial about them.

Many thanks for your help!
0

#2 User is offline   PrimoDrago 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 5
  • Joined: 17-February 13

Posted 09 May 2013 - 01:22 PM

Oh... my apologies! I completely forgot about CSS!

As simple as adding:

<style>
ul { list-style-type: none; margin: 0; padding: 0;}
li {list-style-type: none;}
</style>

;D

Well, perhaps the post can help someone else, after all.
1

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

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