Yii Playground: collaborative demo app. Working code snippets provided by users; join us!
#42
Posted 23 July 2010 - 08:40 PM
samdark, on 23 July 2010 - 03:41 AM, said:
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!
#43
Posted 23 July 2010 - 08:44 PM
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!
#44
Posted 24 July 2010 - 04:33 AM
Gero, on 23 July 2010 - 12:08 AM, said:
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
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
samdark, on 23 July 2010 - 03:41 AM, said:
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
PrplHaz4, on 23 July 2010 - 04:56 PM, said:
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.
>> My Linkedin Profile
#45
Posted 13 August 2010 - 08:57 PM
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!
#46
Posted 17 October 2010 - 06:50 AM
new example available:
http://www.yiiplaygr...tion/basicPager
If you have some experience with Yii, please join this project!
bye,
Giovanni.
>> My Linkedin Profile
#47
Posted 19 October 2010 - 09:28 AM
For the next step, I am intend to make it animated. Hope this can be helpful
Yii Playground : Collaborative demo apps. You can join to improve it too!
My Team's Blog: In Indonesian.
#48
Posted 20 October 2010 - 06:10 AM
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.
>> My Linkedin Profile
#49
Posted 21 October 2010 - 08:22 PM
Yesterday, I just put the animated one... It's not something very complex actually. It just a progress bar with animated gif
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
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>';
Yii Playground : Collaborative demo apps. You can join to improve it too!
My Team's Blog: In Indonesian.
#50
Posted 22 October 2010 - 04:29 AM
haven't tested, just a thought
regards
Junior
df9.com.br
Linux Registered User #364954
GNU/Linux: together we're ready!
#51
Posted 22 October 2010 - 08:53 AM
scoob.junior, on 22 October 2010 - 04:29 AM, said:
haven't tested, just a thought
regards
Hi Scoob,
thanks for the suggestion..
but unfortunately the problem is still persists
Yii Playground : Collaborative demo apps. You can join to improve it too!
My Team's Blog: In Indonesian.
#52
Posted 23 October 2010 - 10:02 AM
I've noticed that you also added a droppable example
I'v also added a CGridView + CArrayDataProvider example, but having the problem reported here about sorting.
bye,
Giovanni.
>> My Linkedin Profile
#53
Posted 23 October 2010 - 10:53 AM
Virtual DarKness, on 23 October 2010 - 10:02 AM, said:
I've noticed that you also added a droppable example
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)?
Yii Playground : Collaborative demo apps. You can join to improve it too!
My Team's Blog: In Indonesian.
#54
Posted 23 October 2010 - 01:00 PM
it's not a problem at all, you're welcome too
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!
bye,
Giovanni.
p.s.
hehe you already did it
>> My Linkedin Profile
#55
Posted 23 October 2010 - 09:18 PM
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
So that's why I've committed it~
Yii Playground : Collaborative demo apps. You can join to improve it too!
My Team's Blog: In Indonesian.
#56
Posted 24 October 2010 - 06:09 AM
Haven't tried CHtmlPurifier too yet, so looking forward to your example!
bye,
Giovanni.
>> My Linkedin Profile
#57
Posted 25 October 2010 - 11:22 AM
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.
Yii Playground : Collaborative demo apps. You can join to improve it too!
My Team's Blog: In Indonesian.
#58
Posted 25 October 2010 - 12:06 PM
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;
}
}
#59
Posted 25 October 2010 - 12:08 PM
Consider fixing it, as it should reflect good Yii coding practices.
#60
Posted 25 October 2010 - 11:13 PM
thanks for the info Samdark..
It's better to change the way to code then...
Yii Playground : Collaborative demo apps. You can join to improve it too!
My Team's Blog: In Indonesian.

Help
















