Yii Framework Forum: Yii Playground: collaborative demo app. - Yii Framework Forum

Jump to content

  • (7 Pages)
  • +
  • 1
  • 2
  • 3
  • 4
  • 5
  • Last »
  • You cannot start a new topic
  • You cannot reply to this topic

Yii Playground: collaborative demo app. Working code snippets provided by users; join us! Rate Topic: ***** 10 Votes

#41 User is offline   Junior - df9 

  • Advanced Member
  • PipPipPip
  • Yii
  • Group: Members
  • Posts: 416
  • Joined: 24-May 09
  • Location:Brazil

Posted 23 July 2010 - 08:40 PM

View Postsamdark, on 23 July 2010 - 03:41 AM, said:

Virtual DarKness
RightMenu is a bit funny. Try moving mouse around it and it will keep sliding right and left for some time.



This also happens in FF 3.6.7 / Linux..I thought it would be my SO/browser combination, but as samdark has reported too..maybe some javascript code in the menu.

;)
______________________________________
Junior
df9.com.br
Linux Registered User #364954
GNU/Linux: together we're ready!
0

#42 User is offline   Junior - df9 

  • Advanced Member
  • PipPipPip
  • Yii
  • Group: Members
  • Posts: 416
  • Joined: 24-May 09
  • Location:Brazil

Posted 23 July 2010 - 08:44 PM

I've just added the CGridView CSS Styling sample (googlecode SVN)

looking forward to hear your thoughts / suggestions

example is under Yiiplayground / Interface / Tables and Pagination

regards!!!!

:)
______________________________________
Junior
df9.com.br
Linux Registered User #364954
GNU/Linux: together we're ready!
0

#43 User is offline   Giovanni D. 

  • Standard Member
  • PipPip
  • Yii
  • Group: Members
  • Posts: 238
  • Joined: 23-December 08
  • Location:London (UK)

Posted 24 July 2010 - 04:33 AM

View PostGero, on 23 July 2010 - 12:08 AM, said:

Hi! RightMenu is fantastic! Can i use it in my projects?


Yes, of course you can. But keep in mind that this is not the point of the yii playground project and the right menu is only a way to keep the information organized in a ordered way.. so as I wrote:

Quote

imho, this makes the user interface "feature complete".. so now we can focus on contents


so feel free to join and provide some examples if you like; it doesn't takes a big amount of time. For me it took time to make the i18n example cause I had to create a component to handle some aspects that I didn't knew how to handle in other ways or it took some time for the right menu too (by the way.. note that this was also a css3 experiment so it won't look as good on internet explorer) but now that we have this things up, creating a small / simple example is a matter a few minutes once you get confident with the playground app. Then of course the app itself can be improved but right now is time to push on contents imho, and I've not a big amount of free time to put on this too so I can't make it "alone" and I hope that more people will join and actively provide small updates to this project. But of course also feedbacks and ideas are welcome. And by the way, thanks to guys who already helped and also scoob junior is going to provide a new example soon :)


View Postsamdark, on 23 July 2010 - 03:41 AM, said:

Virtual DarKness
RightMenu is a bit funny. Try moving mouse around it and it will keep sliding right and left for some time.


yep, I was aware of this but right now is not my priority ;) anyway is quick to fix as is just a matter of setting a flag variable to check if the animation is running before starting the next animation / show-hide action. Anyway thanks for reporting this :)

View PostPrplHaz4, on 23 July 2010 - 04:56 PM, said:

I'm not seeing this behavior in chrome 5.0.375...maybe a "standards" issue?


You can see it if you enable the auto hide of the menu and then move in and out the mouse over it ;)

bye,
Giovanni.
- Yii Playground: collaborative demo app with small examples to play with.. join us ;) [Fork on github]

- DeploYii: Yii powered task runner and deployment solution

- Social: LinkedIn · Twitter
0

#44 User is offline   Junior - df9 

  • Advanced Member
  • PipPipPip
  • Yii
  • Group: Members
  • Posts: 416
  • Joined: 24-May 09
  • Location:Brazil

Posted 13 August 2010 - 08:57 PM

Hey, guys!

Giovanni and I have noticed the following behavior:

After upgrading Yiiplayground to Yii 1.1.3 and setting up the new widgetfactory property (default global prefs), our DatePicker example stopped showing the custom theme and always show the theme defined in the global prefs

In the config file;
// Common Jui Widget preferences:
$jui_prefs =array(
	'themeUrl'=>'css/jui/',
	'theme'=>'base',
);
...
...
...
'components'=>array(
		'widgetFactory' => array(
			'widgets' => array(
				'CJuiDialog' => $jui_prefs,
				'CJuiTabs' => $jui_prefs,
				'CJuiDatePicker' => $jui_prefs,
				'CJuiAutoComplete' => $jui_prefs,
			),
		),
...
...
...




in modules/UiModule/view/jui/zii_datepicker.php

$this->widget('zii.widgets.jui.CJuiDatePicker',
	array(
                ...
		/* optional: change visual
		 * themeUrl: "where the themes for this widget are located?"
		 * theme: theme name. Note that there must be a folder under themeUrl with the theme name
		 * cssFile: specifies the css file name under the theme folder. You may specify a
		 *          single filename or an array of filenames
		 * try http://jqueryui.com/themeroller/
		*/
		'themeUrl' => Yii::app()->baseUrl.'/css/jui' ,
		'theme'=>'pool',	//try 'bee' also to see the changes
		'cssFile'=>array('jquery-ui.css' /*,anotherfile.css, etc.css*/),
              ....




The reason for this is the rendered HTML code, which inserts both the global and custom css files in the view:
<link href="/css/jui/pool/jquery-ui.css" type="text/css" rel="stylesheet">
<link href="css/jui//base/jquery-ui.css" type="text/css" rel="stylesheet">



Shouldn't Yii respect our custom "pool" theme and overwrite the global in this case? I mean, shouldn't the custom theme be used instead of the "base" global theme in this case?

Or even, shouldn't Yii render the base theme first and after the custom widget css theme?

Thanks for you help!

Regards!

:)
______________________________________
Junior
df9.com.br
Linux Registered User #364954
GNU/Linux: together we're ready!
0

#45 User is offline   Giovanni D. 

  • Standard Member
  • PipPip
  • Yii
  • Group: Members
  • Posts: 238
  • Joined: 23-December 08
  • Location:London (UK)

Posted 17 October 2010 - 06:50 AM

Hello,
new example available:
http://www.yiiplaygr...tion/basicPager

If you have some experience with Yii, please join this project! ;)

bye,
Giovanni.
- Yii Playground: collaborative demo app with small examples to play with.. join us ;) [Fork on github]

- DeploYii: Yii powered task runner and deployment solution

- Social: LinkedIn · Twitter
1

#46 User is offline   junxiong 

  • Advanced Member
  • PipPipPip
  • Yii
  • Group: Members
  • Posts: 541
  • Joined: 21-June 10

Posted 19 October 2010 - 09:28 AM

Hello all, I've just created and committed to repository a new demo about JuiProgressBar.. But it's still a very basic one though...
For the next step, I am intend to make it animated. Hope this can be helpful
“The most likely way for the world to be destroyed, most experts argue, is by accident. That’s where we come in; we’re computer professionals. We cause accidents.” - Nathaniel Borenstein

Yii Playground : Collaborative demo apps. You can join to improve it too!
My Team's Blog: In Indonesian.
2

#47 User is offline   Giovanni D. 

  • Standard Member
  • PipPip
  • Yii
  • Group: Members
  • Posts: 238
  • Joined: 23-December 08
  • Location:London (UK)

Posted 20 October 2010 - 06:10 AM

Hi junxiong!
Thanks for commiting the Progress Bar demo and joining the project :)

I'm curious to see the animated version as is something I didn't try to use yet.

I've also put online a screencast for help other users contribute to this project:
http://www.youtube.c...h?v=HOUlD3Glzzk

bye,
Giovanni.
- Yii Playground: collaborative demo app with small examples to play with.. join us ;) [Fork on github]

- DeploYii: Yii powered task runner and deployment solution

- Social: LinkedIn · Twitter
1

#48 User is offline   junxiong 

  • Advanced Member
  • PipPipPip
  • Yii
  • Group: Members
  • Posts: 541
  • Joined: 21-June 10

Posted 21 October 2010 - 08:22 PM

You are welcome and thanks for the video... :)
Yesterday, I just put the animated one... It's not something very complex actually. It just a progress bar with animated gif :P But I personally think this one is cool although we just apply a simple css to the widget...

Oh yes. by the way I've committed a CJuiDraggable too...
but it's still buggy for some reason...
1. Opera not working perfectly => It seems Jquery-UI draggable doesn't work perfectly on Opera itself. So that is not Yii's fault nor my fault :P
2. In second example, the box is supposed to be only draggable inside the gray box. But if I insist to drag it to the bottom of the page, it somehow can get out from the box <_<

can anybody explain why the second one become like that? My code is like this :
echo '<div id="xxx" style="width:200px;height:80px;border:1px solid #eee">';
$this->beginWidget('zii.widgets.jui.CJuiDraggable',
        array(
                'options'=>array('containment'=>'#xxx'), //set who is the containment
                 'htmlOptions'=> array(
                         'style'=>'float:left;width:50px;height:50px;border:1px solid #000',
                 )
        )
);
echo 'Drag me';
$this->endWidget();

echo '</div>';

“The most likely way for the world to be destroyed, most experts argue, is by accident. That’s where we come in; we’re computer professionals. We cause accidents.” - Nathaniel Borenstein

Yii Playground : Collaborative demo apps. You can join to improve it too!
My Team's Blog: In Indonesian.
0

#49 User is offline   Junior - df9 

  • Advanced Member
  • PipPipPip
  • Yii
  • Group: Members
  • Posts: 416
  • Joined: 24-May 09
  • Location:Brazil

Posted 22 October 2010 - 04:29 AM

have you tried removing "float:left" from style?

haven't tested, just a thought

regards
______________________________________
Junior
df9.com.br
Linux Registered User #364954
GNU/Linux: together we're ready!
0

#50 User is offline   junxiong 

  • Advanced Member
  • PipPipPip
  • Yii
  • Group: Members
  • Posts: 541
  • Joined: 21-June 10

Posted 22 October 2010 - 08:53 AM

View Postscoob.junior, on 22 October 2010 - 04:29 AM, said:

have you tried removing "float:left" from style?

haven't tested, just a thought

regards


Hi Scoob,
thanks for the suggestion..
but unfortunately the problem is still persists
“The most likely way for the world to be destroyed, most experts argue, is by accident. That’s where we come in; we’re computer professionals. We cause accidents.” - Nathaniel Borenstein

Yii Playground : Collaborative demo apps. You can join to improve it too!
My Team's Blog: In Indonesian.
0

#51 User is offline   Giovanni D. 

  • Standard Member
  • PipPip
  • Yii
  • Group: Members
  • Posts: 238
  • Joined: 23-December 08
  • Location:London (UK)

Posted 23 October 2010 - 10:02 AM

Thanks,
I've noticed that you also added a droppable example :) I was going to ask you about it :)

I'v also added a CGridView + CArrayDataProvider example, but having the problem reported here about sorting.

bye,
Giovanni.
- Yii Playground: collaborative demo app with small examples to play with.. join us ;) [Fork on github]

- DeploYii: Yii powered task runner and deployment solution

- Social: LinkedIn · Twitter
0

#52 User is offline   junxiong 

  • Advanced Member
  • PipPipPip
  • Yii
  • Group: Members
  • Posts: 541
  • Joined: 21-June 10

Posted 23 October 2010 - 10:53 AM

View PostVirtual DarKness, on 23 October 2010 - 10:02 AM, said:

Thanks,
I've noticed that you also added a droppable example :) I was going to ask you about it :)

I'v also added a CGridView + CArrayDataProvider example, but having the problem reported here about sorting.

bye,
Giovanni.


You are welcome Giovanni..
About your problem, I've never used CArrayDataProvider yet but I can help to research for you...

Oh yeah, now I am intend to put a new demo for security topics. It's going about CHtmlPurifier, which is useful to prevent XSS (as has been explained in guide). Surely it's not a problem right if I start a new topic in the project (since the Security category still empty)?
“The most likely way for the world to be destroyed, most experts argue, is by accident. That’s where we come in; we’re computer professionals. We cause accidents.” - Nathaniel Borenstein

Yii Playground : Collaborative demo apps. You can join to improve it too!
My Team's Blog: In Indonesian.
1

#53 User is offline   Giovanni D. 

  • Standard Member
  • PipPip
  • Yii
  • Group: Members
  • Posts: 238
  • Joined: 23-December 08
  • Location:London (UK)

Posted 23 October 2010 - 01:00 PM

Hi,
it's not a problem at all, you're welcome too :) And CHtmlPurifier is an interesting topic!

You should create a new module for it (for example "security").

Thanks a lot for your help.. the project is getting new life and I'm sure it will get even better as other new users will actively contribute! :) I really think this can be a big plus to help yii framework gain popularity and grow and also to attract new users as I don't remember other frameworks having a similar resource available ;D

bye,
Giovanni.

p.s.
hehe you already did it ;) B)
- Yii Playground: collaborative demo app with small examples to play with.. join us ;) [Fork on github]

- DeploYii: Yii powered task runner and deployment solution

- Social: LinkedIn · Twitter
0

#54 User is offline   junxiong 

  • Advanced Member
  • PipPipPip
  • Yii
  • Group: Members
  • Posts: 541
  • Joined: 21-June 10

Posted 23 October 2010 - 09:18 PM

Yeah... :P

Because I want to try it(personally haven't try the CHtmlPurifier). So after post the last one. I've begun to make the demo.
After the demo is done, I thought why not commit it first. If there is something wrong we can still delete it :D
So that's why I've committed it~
“The most likely way for the world to be destroyed, most experts argue, is by accident. That’s where we come in; we’re computer professionals. We cause accidents.” - Nathaniel Borenstein

Yii Playground : Collaborative demo apps. You can join to improve it too!
My Team's Blog: In Indonesian.
0

#55 User is offline   Giovanni D. 

  • Standard Member
  • PipPip
  • Yii
  • Group: Members
  • Posts: 238
  • Joined: 23-December 08
  • Location:London (UK)

Posted 24 October 2010 - 06:09 AM

hehe, yes don't worry ;) I didn't meant to say that you did something wrong.

Haven't tried CHtmlPurifier too yet, so looking forward to your example! :)

bye,
Giovanni.
- Yii Playground: collaborative demo app with small examples to play with.. join us ;) [Fork on github]

- DeploYii: Yii powered task runner and deployment solution

- Social: LinkedIn · Twitter
0

#56 User is offline   junxiong 

  • Advanced Member
  • PipPipPip
  • Yii
  • Group: Members
  • Posts: 541
  • Joined: 21-June 10

Posted 25 October 2010 - 11:22 AM

seems like must do some little hack in CArrayDataProvider in order it's sort function works. Maybe we must wait for next version (1.1.5) to hope it work normally. There is someone post their modified CArrayDataProvider at here : http://code.google.c.../detail?id=1653

By the way, I've just added CJuiSortable. As usual this is only the most basic sortable function. Hope somebody can add more advance demos.
“The most likely way for the world to be destroyed, most experts argue, is by accident. That’s where we come in; we’re computer professionals. We cause accidents.” - Nathaniel Borenstein

Yii Playground : Collaborative demo apps. You can join to improve it too!
My Team's Blog: In Indonesian.
0

#57 User is offline   samdark 

  • Having fun
  • Yii
  • Group: Yii Dev Team
  • Posts: 3,738
  • Joined: 17-January 09
  • Location:Russia

Posted 25 October 2010 - 12:06 PM

Regarding CHtmlPurifier. It shouldn't be used like this because running it is a very CPU/Memory intensive process.

Instead of purifying output on the fly it's better to to it on saving a model:

class Post extends CActiveRecord()
{
  protected function beforeValidate() {
    $parser=new CHtmlPurifier();
    // 'content_display' is an additional field used only when displaying content.
    // While editing we still using 'content' field.
    $this->content_display=$parser->purify($this->content);
    return true;
  }
}

Yii 1.1 Application Development Cookbook

Enjoying Yii? Star us at github: 1.1 and 2.0.
2

#58 User is offline   jacmoe 

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

Posted 25 October 2010 - 12:08 PM

It doesn't help that the sample blog demo shipped with Yii uses it in the view. :)
Consider fixing it, as it should reflect good Yii coding practices.
"Less noise - more signal"
0

#59 User is offline   junxiong 

  • Advanced Member
  • PipPipPip
  • Yii
  • Group: Members
  • Posts: 541
  • Joined: 21-June 10

Posted 25 October 2010 - 11:13 PM

I see,
thanks for the info Samdark..

It's better to change the way to code then...
“The most likely way for the world to be destroyed, most experts argue, is by accident. That’s where we come in; we’re computer professionals. We cause accidents.” - Nathaniel Borenstein

Yii Playground : Collaborative demo apps. You can join to improve it too!
My Team's Blog: In Indonesian.
0

#60 User is offline   junxiong 

  • Advanced Member
  • PipPipPip
  • Yii
  • Group: Members
  • Posts: 541
  • Joined: 21-June 10

Posted 26 October 2010 - 07:10 AM

I've update the CHtmlPurifier. Now we use the CHtmlPurifier class to validate the html.
But, I wonder then when should we use a CHtmlPurifier's widget ??
“The most likely way for the world to be destroyed, most experts argue, is by accident. That’s where we come in; we’re computer professionals. We cause accidents.” - Nathaniel Borenstein

Yii Playground : Collaborative demo apps. You can join to improve it too!
My Team's Blog: In Indonesian.
0

Share this topic:


  • (7 Pages)
  • +
  • 1
  • 2
  • 3
  • 4
  • 5
  • Last »
  • You cannot start a new topic
  • You cannot reply to this topic

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