This forum is in READ-ONLY mode.
You can look around, but if you want to ask a new question, please use the new forum.
Today's Messages (OFF)  | Unanswered Messages (ON)

Forum: Javascript plugins
 Topic: sfExtjs2Plugin sample site down?
sfExtjs2Plugin sample site down? [message #54828] Wed, 25 June 2008 18:25
blizzard-media  is currently offline blizzard-media
Messages: 62
Registered: May 2006
Member
Anybody have any idea what happened to the sample site: http://backoffice.kaffill.de/ext2/ext2?


We provide Symfony hosting:
http://www.blizzard-media.com/
 Topic: jquery don't work on content generated by module
jquery don't work on content generated by module [message #56074] Mon, 14 July 2008 08:38
mazur  is currently offline mazur
Messages: 57
Registered: March 2008
Member
hello,
i have problem with this plugin because when i use for example sth like this:
<?php echo jq_javascript_tag("$('a:even').css('color','red')")

it only strip link in layout, but not link witch are generated from action.
can smn help me pls

[Updated on: Mon, 14 July 2008 09:39]

 Topic: rewriting template to symfony (jquery, imagebox effect integration)
rewriting template to symfony (jquery, imagebox effect integration) [message #57225] Tue, 29 July 2008 10:04
chainas  is currently offline chainas
Messages: 109
Registered: March 2008
Location: Lithuania
Senior Member
Hello,

I am trying update my app with jquery effects, like imagebox effect on my image gallery. I have simple question. How to rewrite such html code to symfony code.

<a href="bw1.jpg" title="Moon eclipse" rel="imagebox-bw"><img src="th_bw1.jpg" /></a>

i tried:

<?php echo link_to(image_tag('th_bw1.jpg'),'bw1.jpg','rel=imagebox-bw') ?>

But it doesn't work....

Any ideas?

[Updated on: Tue, 29 July 2008 10:06]

 Topic: which dojo plugin?
icon5.gif  which dojo plugin? [message #57354] Wed, 30 July 2008 18:40
drzen  is currently offline drzen
Messages: 21
Registered: March 2008
Location: Pordenone - Italy
Junior Member

Vote your dojo plugin[ 2 vote(s) ]
1.sfUnobstrusiveDojo 1 / 50%
2.dgDojo 1 / 50%
3.sfDojo 0 / 0%

Hi,

what is the best dojo plugin to integrate into symfony?
I'm looking to sfUnobstrusiveDojo... what is your opinion?

Thanks in advance.
v.

[Updated on: Wed, 30 July 2008 18:44]

 Topic: Problem with integrated Ajax-Function
Problem with integrated Ajax-Function [message #58247] Fri, 08 August 2008 09:39
triggertoo  is currently offline triggertoo
Messages: 22
Registered: August 2008
Junior Member
hi, using the extjs2 plugin, i try to call the ajax-function "remote_function", but this ends in the following javascript-error. Thx for answers...

function alertID(node){
if(Tree_Category.getSelectionModel().isSelected(node)){
if (node.isLeaf()){
<?php echo remote_function(array(
'update' => 'box',
'url' => 'mymodule/myaction',
))
?>
} else {
alert('Die Node-ID ist ' + node.id + ' leaf: false');
}
}
};


error:
this.el is undefined
focus()()ext-all-debug.js (Linie 19630)
delay()()prototype.js (Linie 231)
[Break on this error] this.el.child(this.buttonSelector).focus();
 Topic: How Can Thumbnail image options be set?
How Can Thumbnail image options be set? [message #58341] Fri, 08 August 2008 23:38
saiena  is currently offline saiena
Messages: 13
Registered: October 2007
Junior Member
I want to display a thumnail image which, when clicked, opens a large image in the lightbox overlay.

I have code like this:

echo light_image(
$thumbnail_filespec,
$large_image_filespec,
$image_options);

I can find no way to pass options to the thumbnail. I tried the following, but no luck:

$thumnail_info = array(src'=>$thumbnail_filespec, 'width'=>$thumb_width, 'height'=>$thumb_height)
);
echo light_image(
$thumbnail_info,
$large_image_filespec,
$image_options);
 Topic: Problems with intalling JQuery(Tabs)
Problems with intalling JQuery(Tabs) [message #58521] Tue, 12 August 2008 15:44
neon_fd  is currently offline neon_fd
Messages: 115
Registered: June 2008
Senior Member
Hi,

I will use the JQueryTab and install it with pear. Later I download the latest Version of JQuery from http://jquery.com/

My Plugin-Folder looks like this
/lib/helper/jQueryHelper.php
/sfJQueryTabsPlugin/* (config/modules/web)

My Web-Folder looks like
/js/jg/jquery.js
/ui.tabs/*


I copied the sfJQueryTabs Folder from /plugin/modules/sfJQueryTabs in my module folder of the project.

I also copied the jquerytabs.yml file in the config-Folder of the frontend
default:
  start:
    text:     'Start'
    link:     'main/list'

  users:
    text:     'Users'
    link:     'main/list'

  calendars:
    text:     'Calendars'
    link:     'main/list'

  groups:
    text:     'Groups'
    link:     'main/list'

  zones:
    text:     'Zones'
    link:     'main/list'


When I open now http://project/frontend_dev.php/sfJQueryTabs I see only a blank website with the 5 Points of the yml file. But there a displayed like simply Listobjects
*Start 
*Users 
*Calendars 
*Groups 
*Zones 


What I'm making wrong? I will put some tabs at the top of a template. How to do it?

I hope I write all necessary information. If you need more, so say it Wink

Thanks for helpfing!

neon
 Topic: observe_field created from remote_function
observe_field created from remote_function [message #59238] Thu, 21 August 2008 21:16
coreground20  is currently offline coreground20
Messages: 1
Registered: August 2008
Junior Member

How can I monitor a form element that gets created via a remote_function call ?

 Topic: indicator problem + input_auto_complete_tag(
indicator problem + input_auto_complete_tag( [message #60220] Thu, 04 September 2008 22:42
skuro  is currently offline skuro
Messages: 9
Registered: March 2008
Junior Member
Is there any way to set style of input which I set autocomplete for.
I would like to have an effect of running loading gif at the input's background when ajax request is being run ('loading').

THX in advance
 Topic: sfExtJS2Plugin bug?
sfExtJS2Plugin bug? [message #61702] Wed, 24 September 2008 09:25
drzen  is currently offline drzen
Messages: 21
Registered: March 2008
Location: Pordenone - Italy
Junior Member
I get this strange result:
Strartin code:
<div id='tabPanel'></div>
<?php
$sfExtjs2Plugin = new sfExtjs2Plugin(array('theme'=>'blue'), array('css' => '/sfExtjsThemePlugin/css/symfony-extjs.css'));
$private = array();
$public = array();
$sfExtjs2Plugin->load();
$sfExtjs2Plugin->begin();
 
// **************************************
// Application
// **************************************

$myTab = array(
  array(
    'title' => 'Dettagli',
		'autoLoad'=> array (
			'url'=>url_for('casa/dettagli'),
			'params'=>'id='.$casa->getId(),
			'scripts'=>true)
  ),
  array(
    'title' => 'Composizione',
		'autoLoad'=> array (
			'url'=>url_for('contatti/casa'),
			'params'=>'id='.$casa->getId(),
			'scripts'=>true)
  ),
  array(
    'title' => 'Attivit&agrave;',
		'autoLoad'=> array (
			'url'=>url_for('attivitaCasa/list'),
			'params'=>'id='.$casa->getId(),
			'scripts'=>true)
  ),
  array(
    'title' => 'Contatti',
		'autoLoad'=> array (
			'url'=>url_for('contattoCasa/list'),
			'params'=>'id='.$casa->getId(),
			'scripts'=>true)
  ),  
  array(
    'title' => 'Servizi',
		'autoLoad'=> array (
			'url'=>url_for('servizioCasa/list'),
			'params'=>'id='.$casa->getId(),
			'scripts'=>true)
  ),  
);

$private['tabPanel']=$sfExtjs2Plugin->TabPanel(
  array(
    'id' => 'tabPanel',
    'title' => 'Dettagli casa',
    'region' => 'center',
    'deferredRender' => false,
    'resizeTabs' => true,
    'activeTab'  => ($tab?$tab:0),
    'border'     => true,
    'plain'      => true,
    'items'      => $myTab,
    'margins'    => '5 5 5 5',
    'autoScroll' => true
  )
);
$public['init'] = $sfExtjs2Plugin->asMethod("tabPanel.render('tabPanel');");
$sfExtjs2Plugin->beginApplication(
  array(
    'name'    => 'Case',
    'private' => $private,
    'public'  => $public
  )
);
$sfExtjs2Plugin->endApplication();
$sfExtjs2Plugin->initApplication('Case');
$sfExtjs2Plugin->end();
?>





in my test hosting I get correct result. In the production hosting I get this strange lines at the end (and no render):

------ more line before ------
{ title: 'Servizi',
autoLoad: { url: '/web/servizioCasa/list',
params: 'id=1',
scripts: true } }
],
margins: '5 5 5 5',
autoScroll: true
});
return {
 init: Object id #69 

}}();

Ext.onReady(App.init, App);

</script>



the problem seems:

$sfExtjs2Plugin->beginApplication(
  array(
    'name'    => 'Case',
    'private' => $private,
    'public'  => $public
  )
);

 Topic: sfExtjs2Plugin: how to get data from action to GridPanel?
sfExtjs2Plugin: how to get data from action to GridPanel? [message #61930] Fri, 26 September 2008 22:01
hi27  is currently offline hi27
Messages: 8
Registered: June 2008
Junior Member
hi,
i'm new to Extjs, and i have a question (i think a simple one):

how to format the data returned from action (to template) to be valid to use in sfExtjs2Plugin->GridPanel (or form)?

please, it's urgent!
i read about PHP-JSON extension which convert data to suitable format, but i couldnt get anything works.

in my module, the action passes a ($news) which is a result of sql request:
"SELECT * FROM news"
{id, title, author}

how to use ($news) in a grid?
i tried to use "json_encod()" and then loadData() into a Store or SimpleStor , but doesnt work.

thanks in advance

[Updated on: Fri, 26 September 2008 22:04]

 Topic: sfLightWindowPlugin vs. other Javascript helpers
icon5.gif  sfLightWindowPlugin vs. other Javascript helpers [message #62348] Fri, 03 October 2008 18:19
djoos  is currently offline djoos
Messages: 290
Registered: August 2007
Location: London
Faithful Member
Hi!

Recently I've got a very annoying issue with the sfLightWindowPlugin, when using it together with another Javascript helper on a page (in my case: the input_auto_complete_tag) - resulting in a "Ajax.Autocompleter is not a constructor" Javascript error.
As described in Aaron Johnson's blog, it is an easy thing to solve - but we have to think about a solution within the Symfony context over here Smile

Solution: first of all I made sure to replace the core javascript-libraries of Symfony (located in sf/prototype/js) with later versions, by making use of the sfPrototypePlugin.
Ok, this still doesn't solve the issue of the double addition of the .js-files. But, in order to solve that, I modified the LightWindowHelper so that before executing "$response-> addJavascript(sfConfig::get('sf_lightwindow_prototype_dir'). 'prototype.js');", a check is done whether prototype hasn't been included yet. The getJavascripts-method on the sfWebResponse-class proved to be very handy there.
Now it's very simple: if prototype was already included, don't bother to include it again.

Results: both the input_auto_complete_tag and the lw_button (or whathever sfLightWindowPlugin-helper) can be used, without having conflicting additions of prototype.js.

I guess this kind of "test before including something another time" would be handy - actually I guess it would be even more handy if it was a parameter in the addJavascript-method...
 Topic: Jquery Plugin history
Jquery Plugin history [message #63072] Tue, 14 October 2008 16:26
rupam_jaiswal  is currently offline rupam_jaiswal
Messages: 3
Registered: September 2008
Junior Member
Hi,
I am a newbie in using jquery.Please excuse me if similar query has been posted earlier.

I am building a maillist with extensive use of jquery.This list displays the list of emails as in Inbox (in slot of 15) and has Next and Prev links to traverse next or prev set of mails.
I want my mailist to be cached and so that if user is in slot 31-45,can get slots 16-30 on click of browser’s back button.
i searched and found the jquery plugin history but not getting exactly how to use it in my situation.

flow of my code how next and prev links work using ajax is as follows

1)on click of next link(href is set to [removed]void(0)Wink,call a function Next() that sets the startcount and call loadmaillist(); inside it.

2)in loadmaillist(),makes a url ,makes a json call,gets the jsondata and call displaymaillisthtml(datajson);

3)in displaymaillisthtml(),builds the html for maillist thru javascript .

I hope u r not getting confused Sad

now my question is,where should i use the $.(history) bla..bla.bla and how??as discussed in most of tutorials.

Regards
Rupam
 Topic: Using sfExtjs2Plugin plugin or extjs code with extjs library in project symfony
Using sfExtjs2Plugin plugin or extjs code with extjs library in project symfony [message #64772] Fri, 07 November 2008 17:47
chris_pnv  is currently offline chris_pnv
Messages: 6
Registered: October 2008
Junior Member
Hi,

I'm a new user of symfony and extjs.
I have searched lot of documentation on Internet, i have tried extjs examples in symfony, but i can't do that i want.
My question is :
Is to easy for a beginner to use plugin sfExtjs2Plugin or use extjs objects with symfony objects in a symfony project using extjs library ?

Thanks.

Christophe
 Topic: load file problem with modalbox plugin
load file problem with modalbox plugin [message #64980] Tue, 11 November 2008 17:26
whalexis  is currently offline whalexis
Messages: 207
Registered: July 2008
Faithful Member
Hi,

I'm trying to figure out to make this plugin working the way is should.
Actually, it's now working on my application but I have to make to modifications.

First I simply added the sfmodalboxplugin with this command
php symfony plugin:install sfModalBoxPlugin --release=1.0.0

Then I added the plugin name in my setting.yml file to enable it.
Finally I ran the clear cache command.

And I would be able to make it works. But no.

The error message is that the modalbox object doesn't exists. So I've added the modalbox javascript file in the view.yml file.
It happenned also with the effects and scriptaculous javascript files so I added them too to the view.yml file.
And now it works.

But it's not the good way to make it work. Do you have any ideas on how to make it work "out of the box"?

Alexis
 Topic: jq_submit_to_remote of jQueryReloadedPlugin does not work
jq_submit_to_remote of jQueryReloadedPlugin does not work [message #65069] Wed, 12 November 2008 18:52
Alberthzerep  is currently offline Alberthzerep
Messages: 10
Registered: October 2007
Junior Member
Dear,

Can someone use in a short example the jq_submit_to_remote of jQueryReloadedPlugin, because I have been trying int but it does not work

If I put the same but using the submit_to_remote of PrototypePlugin, it works perfecly.

I copy my code:

<?php echo use_helper('I18N', 'jQuery', 'Javascript') ?>

<div class="manage_member_groups" id="manage_<?php echo myTools::stripText($member->getFullName()) ;?>_groups" >
<form action="<?php echo url_for('@community_manage_member_groups?memberId='.$member->getId()) ?>" method="POST">
<?php echo $form ?>
<div class="form_button">
<?php echo jq_submit_to_remote('ajax_save', 'Save', array(
'url' => '@community_manage_member_groups?memberId='.$member->getId(),
'update' => 'manage_'.myTools::stripText($member->getFullName()).'_groups',
))
?>
</div>
</form>
</div>
 Topic: problem with getValue()
problem with getValue() [message #66389] Sun, 30 November 2008 18:52
lunina  is currently offline lunina
Messages: 2
Registered: November 2008
Junior Member
body in html file must be empty.

Ext.onReady(function(){
    
        var rpan = new Ext.Panel
           ({
                id          : 'content',
                title       : 'child panel',
                region      : 'center',
                collapsible : true,
                margins     : '3 3 3 0',
                cmargins    : '3 3 3 3',
                html        : 'first content' ,
       
           });
       

        var win = new Ext.Window({
            title           : 'Parent window',
            closable        : true,
            width           : 500,
            height          : 350,
            x               : 300,
            y               : 100,           
            layout          : 'border',
            containerScroll : false,
            items           : [rpan]
        });

        win.show();                                               
              
        var el = Ext.getCmp('content').body;
        console.log(el.getValue()); // value is  undefined  
        el.update('other content'); // but function 'update' works
});



el.getValue() returns ' undefined '
But function 'update' works correctly.
How can I get content of 'child panel' ?
 Topic: problem with TabPanel
problem with TabPanel [message #66390] Sun, 30 November 2008 18:59
lunina  is currently offline lunina
Messages: 2
Registered: November 2008
Junior Member
body in html file must be empty.
this code works correctly:
         
Ext.onReady(function(){
        
              var tabs = new Ext.TabPanel
              ({               
                activeTab: 0,
                items: [{
                        title: 'Tab 1',
                        html: ' if I remove this item from tabPanel while initialization, the content of other tabs becomes empty',
                        closable:true
                       }]  
               });
    

           var addition = new Ext.Panel
           ({
                id          : 'addition',
                title       : 'tab container',
                region      : 'east',
                collapsible : true,
                margins     : '3 3 3 0',
                cmargins    : '3 3 3 3',
                items       : tabs,
                split       : true,
                width       : 500         
            });


           var rpan = new Ext.Panel
           ({
                id          : 'content',
                title       : 'content',
                region      : 'center',
                collapsible : true,
                margins     : '3 3 3 0',
                cmargins    : '3 3 3 3',
                html        : 'empty' ,
                                              
                tbar:
                   [
                        {
                        iconCls:'add-feed',                         
                        text:'Add Tab',
                        handler: function() 
                                        {     
                                           tabs.add
                                           ({   
                                             title    : 'tab name',
                                             html     : 'some content',                                                    
                                             closable : true
                                           }).show();    
                                        },               
                        scope: this                
                        }
                   ]        
           });                                     

        var win = new Ext.Window({
            title    : 'Parent window',
            closable : true,
            width    : 700,
            height   : 350,
            x        : 300,
            y        : 100,           
            layout   : 'border',
            containerScroll: false,
            items    : [rpan,addition]
        });

        win.show();     
});


But, if I remove this item 'Tab 1' from tabs while initialization, the content of other tabs becomes empty. I mean this tabs works incorrectly:
var tabs = new Ext.TabPanel
              ({               
                activeTab: 0
               });

How can I add normal tabs without first tab in initialization of TabPanel?
 Topic: update_element_function with a JS function's return value
update_element_function with a JS function's return value [message #72676] Tue, 17 February 2009 11:45
Archaon  is currently offline Archaon
Messages: 3
Registered: February 2009
Junior Member
Hi,

I am trying to create a button which get values from two input (text type) and then insert the concatenated strings in a div.

I made the following code block :
<?php echo javascript_tag("
	function getNotifierNameAndTitle()
	{
		alert($('newNotifierName').value.concat(', ').concat($('newNotifierTitle').value)).concat('<br />');
		return $('newNotifierName').value.concat(', ').concat($('newNotifierTitle').value).concat('<br />');
	}
") ?>




	<div id='notifiers' style="height: 100px; width:600px; overflow:auto;">
		<?php foreach ($notifiers as $notifier): ?>
			<?php echo checkbox_tag('notifiers_selection[]', $notifier->getId()) ?>
			<?php echo $notifier->getName() . ", " . $notifier->getTitle() ?>
			<br />
		<?php endforeach; ?>
	</div>

	<label for="newNotifierName">Notifier's name:</label>
  	<?php echo input_tag('newNotifierName', 'Name') ?>
	<label for="newNotifierTitle">Notifier's title:</label>
 	<?php echo input_tag('newNotifierTitle', 'Title') ?>

 	<?php
 		echo button_to_function('Add',
			update_element_function('notifiers',
				array(
					'position' => 'after',
			  		'content'  =>  "<script>getNotifierNameAndTitle()</script>",
				)
			)
		);
	?>


In practice, the JS function is called, the alert is processed but the JS function's return value never appears in my div.

Thanks for the help !
 Topic: parameter handling for input_auto_complete_tag
icon9.gif  parameter handling for input_auto_complete_tag [message #74322] Sun, 08 March 2009 13:59
zmaster17de  is currently offline zmaster17de
Messages: 23
Registered: August 2007
Location: Jena
Junior Member
Hi,

I already googled but didn't find a sufficient answer.
So, how do I handle parameter for the input_auto_complete tag ?

First of all. I have an action player/autocomplete.
It looks for the parameter player and creates a criteria.
But now I experienced that I have team-form, where I do have several players. So I named them player1, player2, etc. Like this, the parameter name changes, which my action controller does not know.
So my first question: How is it possible to fix this parameter name?

Next I realized that I have sometimes send other parameters too. I found out that I can put them in the GET header by adding them in the action url. But I would prefer to have these parameters also in the POST header. So, how do I put them there?

Thanx!
Hannes
 Topic: cancel on blur on PlaceInEditor
icon5.gif  cancel on blur on PlaceInEditor [message #76013] Tue, 31 March 2009 21:16
zmaster17de  is currently offline zmaster17de
Messages: 23
Registered: August 2007
Location: Jena
Junior Member
Hi people,

does anybody knows how I can convince my PlaceInEditor (script.aculo.us) to disappear when I leave (onBlur or whatever) the textbox?
There is a option "submitOnBlur". Nice. But I don't want to submit it...
 Topic: Form validation and sfModalBoxPlugin
Form validation and sfModalBoxPlugin [message #77344] Fri, 24 April 2009 13:24
ripador  is currently offline ripador
Messages: 9
Registered: April 2009
Location: Catalunya
Junior Member
Hi,
I'm showing a modal box window with a form in it (forms 1.1), and the problem is that when I validate the form the modal box disapears and I'm redirected to a new page.

I'm using this code in the submit button to show the results in the modal box:
onclick="Modalbox.show('URL, {width: 666, method: 'post'}); return false;"


The problem appears to be in the isValid method, because if I don't use sfFomr validation and do it "by hand" there is no problem.

Any ideas of how can I make it work?
Thanks
 Topic: sfJqueryReloadedPlugin => No Local jquery.js, Instead Google Hosted Jquery file
sfJqueryReloadedPlugin => No Local jquery.js, Instead Google Hosted Jquery file [message #77921] Thu, 07 May 2009 15:53
matterco  is currently offline matterco
Messages: 18
Registered: March 2009
Location: Atlanta, GA
Junior Member

sfJqueryReloadedPlugin:

I want to use the google hosted JQuery file. ( http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min .js) to leverage the opportunity that the file is already downloaded and in a users cache.

With the plugin, can I remove the reference to the /sfJqueryReloadedPlugin/file.js reference?

 Topic: Problem with "visual_effect"
Problem with "visual_effect" [message #78480] Fri, 15 May 2009 20:15
neon_fd  is currently offline neon_fd
Messages: 115
Registered: June 2008
Senior Member
Hi,

I use to links to show and hide a div.

<?php echo link_to_function('Show more', visual_effect('blind_down', 'filter', array('duration' => 0.5)), array('class'   => 'reiterLink2')) ?>

<?php echo link_to_function('Hide', visual_effect('blind_up', 'filter', array('duration' => 0.5)), array('class'   => 'reiterLink2')) ?>


It is possible to use only one link? Such as an user click an the link and if the div is hide, the div will be shown and when the div is visible, than it will be hide.

I don't know how to solve the problem. hope that someone can help me.

greetings
neon
 Topic: critreia action with session
critreia action with session [message #80702] Thu, 25 June 2009 20:17
ojie43  is currently offline ojie43
Messages: 26
Registered: June 2009
Location: indonesia
Junior Member
please help me......

i get error in this action...and in template

public fuction executeShow()
{
$c = new Criteria();
$c->add(EmployePeer:EMAIL,$this->getUser->GetEmail());
$emp=EmployePeer::doSelectOne($c);

}

in MyUserClass

i strore my session

public function signIn($user)
{
$this->setAttribute('subscriber_id', $user->getId(), 'subscriber');
$this->setAuthenticated(true);

$this->addCredential('subscriber');
$this->setAttribute('username', $user->getUsername(), 'subscriber');
$this->setAttribute('email', $user->getEmail(), 'subscriber');
}

public function getEmail()
{
return $this->getAttribute('email', '', 'subscriber');
}


in tempalte showSucces.php

.....
<tr>
<th>Nrp:</th>
<td><?php echo $mahasiswa->getNrp() ?></td>
</tr>
......

i get erro with message "getNrp non-object"...

please help me....

hoyw use session data in action....

thanks

sorry for my engglish cz not good
 Topic: sfProtoculousPlugin alternative to sfFlashMessagePlugn
sfProtoculousPlugin alternative to sfFlashMessagePlugn [message #83686] Wed, 12 August 2009 23:47
mohamed.hamad  is currently offline mohamed.hamad
Messages: 32
Registered: March 2008
Member
I use flash messages alot in my application, but i would like a way to make them dynamic. So that they disappear after say 5seconds.
I've been playing around with the sfFlashMessagePlugin but it uses the jquery jQueryNotifyBar.
this plugin is not compatible with sfProtoculousPlugin
anyone know of an alternative, or a way to have the same effect using sfProtoculousPlugin?
thank
 Topic: update_element_function problem: position parameter does not work
update_element_function problem: position parameter does not work [message #83707] Thu, 13 August 2009 11:36
cutups  is currently offline cutups
Messages: 36
Registered: May 2007
Member
I'm working in symfony 1.2

I'm finding that the update_element_function does not use the position parameter properly. Has anybody else fun into this issue and found a solution.

I'm trying to insert some html at the top of the inside of a div.

So I run this query:

<?php
echo javascript_tag(
update_element_function('container', array (
'position' => 'top',
'content' => '<div id="new-div">content</div>',
'script' => 'true',
))
);
?>

The new content does not appear at the top of the inside of the container, but instead appears at the bottom.

Using firebug, i see that it ends up as:

//<![CDATA[
$('container').insert('<div id=\"new-div\">content</div>','top');

//]]>

Which, looking at the prototype docs, doesn't match the specification for insert...

 Topic: [jQuery] Ajax request problem with safari
[jQuery] Ajax request problem with safari [message #86533] Mon, 12 October 2009 17:28
lolitarh  is currently offline lolitarh
Messages: 1
Registered: October 2009
Junior Member
hello everybody,

i got a problem using some AJAX to save user's skills using checkboxs

it works fine on firefox but on safari the skills are not saved.

here is the template :

<div id="skillLink" style="visibility: hidden">
<?php echo url_for('@profil_save_skill') ?>
</div>


here is the action:

public function executeSaveSkill(sfWebRequest $request) // Ajax request to save the skill. No template is associate. 
	{
		$name = $request->getParameter('name');
		$id_user = $this->getUser()->getSubscriberId();

		$match = '';
		preg_match("#^skill\[(.*)\]$#Usmi", $name, $match);
		
		$skill = Doctrine::getTable('Skill')->verifExistSkill($id_user, $match[1]); // Check if the skill already exist. Match[1] is the real name (in the form : name = skills['*REAL NAME*'])
		if ($skill)
		{
			
			$skill->delete(); // If he already exist, we delete it.
			exit();
			//$this->setLayout(false);
		}

		$skill = new Skill(); // Else we create it.
		$skill->setName($match[1]);
		$skill->setUserId($id_user);
		$skill->save();
		//$this->setLayout(false);
		exit();
	}


by the way, i can't suppr the exit because with setLayout(false) my skills aren't saved also.

here is the javascript file:

$(document).ready(function()
{
	$("form ul li input").click(function() // ajax fonction to load in database the skill
	{
		$.ajax({
      url: $("#skillLink").html(),
      type: "POST",
      data: { name: $(this).attr('name') },
      });
   }

//		$.post($("#skillLink").html(), { name: $(this).attr('name') } );
	//});
	
	
	//skills' animations
	
	$("form > ul ul").hide(); //hide all the list of skills

	$("input:checked").parent().next().children().not("input").not('label').slideDown("slow"); // show skill who have been selected before

	$("input:checked").parents('ul').slideDown("slow");
	
	$("form ul li input").click(function() // on click show the child list (if there is one).
	{
		$(this).parent().next().children().not("input").not('label').slideDown("slow");
	})
})




im a beginner with AJAX so if you want me to do some test in order to resolve this it will be a pleasure for me (already got firebug for firefox and web inspector for safari)

thanks you
 Topic: sfMilonicPlugin
sfMilonicPlugin [message #86775] Thu, 15 October 2009 18:23
relez  is currently offline relez
Messages: 2
Registered: October 2009
Junior Member
Hi everyone:

I am trying to create a Menu for my app using sfMilonicPlugin, I follow all the step written in README file but theres an error when I run the application:

Fatal error: Call to undefined method sfConfigCache::getInstance() in C:\wamp\www\myproject\plugins\sfMilonicPlugin\lib\helper\Mil onicHelper.php on line 5

Any idea please?
 Topic: ysJQueryRevolutionsPlugin release
ysJQueryRevolutionsPlugin release [message #88892] Mon, 23 November 2009 16:17
oyepez003  is currently offline oyepez003
Messages: 1
Registered: November 2009
Location: Venezuela
Junior Member
The ysJQueryRevolutionsPlugin provides support for jquery in your app views; Importing the jquery library and simplifies HTML document traversing, event handling, animating, and Ajax interactions for rapid web development. Everything from PHP code (Symfony helpers). jQuery and Symfony write less, do more.

http://www.symfony-project.org/plugins/ysJQueryRevolutionsPl ugin/0_0_1?tab=plugin_readme

Omar Yepez


 Topic: Telerik ASP NET for PHP
Telerik ASP NET for PHP [message #92968] Fri, 05 February 2010 16:23
sebaherrera  is currently offline sebaherrera
Messages: 2
Registered: December 2009
Location: buenos aires
Junior Member

Dear all,

I read on Telerik webpage - best .net controls I saw - that it can be run without any server side code. Consequently they infer that it can be applied to any project no matter which language its used.

This is the company´s blog http://blogs.telerik.com/atanaskorchev/posts/09-11-09/using_ telerik_grid_for_asp_net_mvc_without_any_server-side_code.as px explaining that situation. the main explanation resides on the use of jquery.

I would like to know if anyone has experience using this controls on php, or... if based on the information provided do you think is simple that implementation.

Any support will be appreciated. I have one client requesting to used .net based on this suite instead of php.
best regards,
sebastian.

[Updated on: Fri, 05 February 2010 16:24]

 Topic: dynamic jQuery remote request
dynamic jQuery remote request [message #93284] Wed, 10 February 2010 19:13
Andromeda  is currently offline Andromeda
Messages: 64
Registered: July 2008
Location: Berlin, Germany
Member
I have an ajax request with jq_link_to_remote. Everything works fine. But at runtime I want to change the data or url of this request.
I thought with the 'loading' function I can collect the data from the page and then somehow put it in the XMLHttpRequest object, but how??
any idea?
 Topic: sfFormExtraPlugin's autocompleter does not work
sfFormExtraPlugin's autocompleter does not work [message #94299] Thu, 25 February 2010 17:33
Sejanus  is currently offline Sejanus
Messages: 3
Registered: February 2010
Junior Member
Hello,
I'm trying to customize default doctrine generated form with some fancy Ajax stuff and it doesn't work.

I have installed sfFormExtraPlugin and I also have jQuery and jQuery UI installed (or so I think...).

The auto-generated code causing error:


jQuery(document).ready(function() {
    jQuery("#field_id")
    .autocomplete('/frontend_dev.php/module/ajax', jQuery.extend({}, {
      dataType: 'json',
      parse:    function(data) {
        var parsed = [];
        for (key in data) {
          parsed[parsed.length] = { data: [ data[key], key ], value: data[key], result: data[key] };
        }
        return parsed;
      }
    }, { }))
    .result(function(event, data) { jQuery("#field_id").val(data[1]); });
  });


And the error message:

Error: jQuery("#autocomplete_table1_table2").autocomplete("http://myurl/frontend_dev.php/model/ajax", jQuery.extend({}, {dataType: "json", parse: function (data) {var parsed = [];for (key in data) {parsed[parsed.length] = {data: [data[key], key], value: data[key], result: data[key]};}return parsed;}}, {})).result is not a function Source File: http://myurl/frontend_dev.php/model/action Line: 104

thanks in advance for your help Wink I'm really stuck...
 Topic: mustMatch in JQuery Autocompleter
mustMatch in JQuery Autocompleter [message #96434] Tue, 30 March 2010 15:02
Goshka
Messages: 8
Registered: March 2010
Junior Member
Hi all,

I have a problem with JQuery autocompleter, used via sfFormExtraPlugin. Everything works fine and as expected, except for when mustMatch option is set to 'true'. Then if I start to type into the input form, some suggestions appear. If I click on one of them, or go down the drop down window and chose one, then everything works fine. But if I type in the word (a should be accepted word), the form is not accepted! Anybody has any ideas what can be wrong and how to correct it?
The curious thing is that such typed in input does not disappear, as it should and it does for input not matching the list of accepted words.

I'll be very grateful for any suggestions,
Cheers,
Goshka

My widget is here:
$this->widgetSchema['ingredient_id'] = new sfWidgetFormDoctrineChoice(array(
'model' => $this->getRelatedModelName('ingredient'),
'multiple' => false,
'renderer_class' => 'sfWidgetFormJQueryAutocompleter',
'renderer_options' => array(
'url' => '/ingredient/autocomplete',
'value_callback' =>array('ingredient','getIngredientName'),
'config' => ' {
scrollHeight: 250 ,
autoFill: true,
cacheLength: 1,
delay: 10,
max: 10,
minChars:0,
mustMatch: true,
selectFirst: false
}')
));

 Topic: Invalid argument in supplied for foreach().. : in sfWidgetFormJQueryAutocompleterMany.class
Invalid argument in supplied for foreach().. : in sfWidgetFormJQueryAutocompleterMany.class [message #97409] Thu, 15 April 2010 04:41
aszrool  is currently offline aszrool
Messages: 8
Registered: March 2010
Junior Member
I had followed the guide in http://forum.symfony-project.org/index.php/m/78548/ and code snippet in http://snippets.symfony-project.org/snippet/336 for autocomplete in sfFormExtraPlugin. Everything run smoothly but only in my form, I got this error messages.
Warning: Invalid argument supplied for foreach() in C:\www\sfprojects\invy\plugins\sfFormExtraPlugin\lib\widget\sfWidgetFormJQueryAutocompleterMany.class.php on line 106


This is my code..

form code
	 $autocompleteWidget = new sfWidgetFormChoice(array(
	   'multiple'         => true,
	   'choices'          => $this->getObject()->getItemId(),
	   'renderer_class'   => 'sfWidgetFormJQueryAutocompleterMany',
	   'renderer_options' => array(
	     'config' => '{
		    json_url: " '.sfContext::getInstance()->getController()->genUrl('item/autocomplete').'",
			json_cache: true,
			filter_hide: true,
			filter_selected: true,
			maxshownitems: 8
	     }')
	 ));
	 $this->widgetSchema['item_id'] = $autocompleteWidget;


class code
   static public function retrieveSuggestions($q, $l, $c)
   {
     $itemid = Doctrine_Query::create()
	   ->select('t.*, LOCATE(:token_raw, t.name) AS index')
	   ->from('InvyItemRegistry t')
	   ->where('t.name LIKE :token')
	   ->orderBy('index')
	   ->limit($l)
	   ->execute(array('token_raw' => $q, 'token' => '%'.$q.'%'));
	   
	   $jsonItems = array();
	   foreach ($itemid as $item)
	   {
	      $jsonItems[] = array('caption' => (string)$item->getName(), 'value' => $item->getPrimaryKey());
	   }
	   return $jsonItems;
   }


action code
 public function executeAutocomplete(sfWebRequest $request)
   {
      $this->getResponse()->setHttpHeader('Content-Type', 'application/json; charset=utf-8');
	  
	  $items = InvyItemRegistry::retrieveSuggestions($request->getParameter('q'), $request->getParameter('l'), $request->getParameter('c'));
	  
	  return $this->renderText(json_encode($items));
   }


What am I suppose to do?

[Updated on: Thu, 15 April 2010 04:44]

 Topic: JQgrid header searchable
JQgrid header searchable [message #100481] Sat, 05 June 2010 12:01
xidy  is currently offline xidy
Messages: 1
Registered: June 2010
Junior Member
Hi, I need to implement JQgrid width header searcheable (in toolbar)like this toolbarsearch http://www.trirand.com/blog/jqgrid/jqgrid37/jqgrid.html

But I don't know how to make the filters, how to comlete my actions. I use doctrine an Symfony 1.4

Thanks in advance

Here's my HTML code :

<div id="searchContact">
                                <table id="rechercheContact"></table>
                                <div id="ptoolbar" ></div>
                        </div>


Here's my JS code :

//contact
        jQuery("#rechercheContact").jqGrid({
            url:'contact_recherche?recherche='+chemin,
            datatype: "json",
            mtype:'GET',
            loadtext: "Chargement",
            height: 250,
            jsonReader : {root:"cellule"},
            emptyrecords: "Aucun enregistrement",
            colNames:['Nom','Prenom','Localite','Code Postal','Commentaire'],
            colModel:[
                {name:'Nom',index:'Nom', sortable: false },
                {name:'Prenom',index:'Prenom', sortable: false},
                {name:'Localite',index:'Localite', sortable: false},
                {name:'CodePostal',index:'CodePostal', sortable: false},
                {name:'Commentaire',index:'Commentaire', sortable: false},
            ],
            scrollOffset: 0,
            sortname: 'Nom',
            $sortorder: 'asc',
            caption: "Contact(s)",
            viewrecords: true
        });

        jQuery("#rechercheContact").jqGrid('navGrid','#ptoolbar',{del:false,add:false,edit:false,search:true});
        jQuery("#rechercheContact").jqGrid('filterToolbar',{stringResult: true,searchOnEnter : false});



and finally my action:

public function executeTrouverContact(sfWebRequest $request) {

    $this->contacts = Doctrine_Query::create()
    ->select()
    ->from('Contact c')
    ->where('nom LIKE \'%'.$request->getParameter('recherche').'%\'')
    ->orWhere('prenom LIKE \'%'.$request->getParameter('recherche').'%\'')
    ->orWhere('code_postal LIKE \'%'.$request->getParameter('recherche').'%\'')
    ->orWhere('localite LIKE \'%'.$request->getParameter('recherche').'%\'')
    ->orWhere('commentaire LIKE \'%'.$request->getParameter('recherche').'%\'')
    ->execute();

        $inscriptions = array();
        if ($request->isXmlHttpRequest()) {

                if (!is_null($this->contacts) && !empty($this->contacts)) {

                    $id = 1;

                        foreach ($this->contacts as $contact) {
                            $inscriptions['cellule'][] = array(
                                    'id'        => "$id",
                                    'cell'      => array($contact->getNom(),$contact->getPrenom(),
                                        $contact->getCodePostal(),$contact->getLocalite()
                                    ,$contact->getCommentaire())
                            );

                            $id++;
                        }

                    $this->getResponse()->setHttpHeader('Content-Type','application/json; charset=utf-8');
                    $inscriptions = $this->renderText(json_encode($inscriptions));
                }
            }
        return $inscriptions;
    }
 Topic: jquery autocomplete--not working...
jquery autocomplete--not working... [message #101655] Sat, 26 June 2010 16:46
anantha  is currently offline anantha
Messages: 8
Registered: June 2010
Junior Member
Hi i have a text box and it has search functionality..I want to invoke autocomplete for that search box..i tried using jquer autocomplete..but i am not sure what i should give in autocomple() in the bracket..i tried with and example by declaring var data and that calling autocomplete(data)...it worked...but my code is different..it searches from database...otherway i tried is by searching the generated list in the outup..but it did not search well...i tried to call the inner div class it did not call it...can any one please give me and idea how to proceed...i worked based on this example

$(document).ready(function(){
var data = "Core Selectors Attributes Traversing Manipulation CSS Events Effects Ajax Utilities".split(" ");
$("#organization_filters_org_name").autocomplete("data");
});

I like to know according to my search what i should put in autocomplete()...should it call any action..give me some idea plz...i am trying it for long...
 Topic: why use php to create javascript?
why use php to create javascript? [message #101937] Sat, 03 July 2010 03:06
cwheat503  is currently offline cwheat503
Messages: 16
Registered: June 2010
Junior Member
I am new to the frame work, not even finished with the jobeet tut. But I am wondering why there is a need for the javascript wrappers?

In my mind the reason for a framework is to separate out your code. View logic stays in the view (mostly html), you have your models (business logic/data) and your controllers.

So why mix javascript in php, why not just create the javascript in the view?

What are the advantages to using a helper like the jquery reloaded plugin? vrs just creating the JS in the view file?

I am not trying to flame so don't take it that way I am really trying to understand how/why all the pieces fit together.
 Topic: PEAR.php error when installing sfJqueryReloadedPlugin-1.4.1
PEAR.php error when installing sfJqueryReloadedPlugin-1.4.1 [message #102832] Wed, 21 July 2010 00:58
jseverson  is currently offline jseverson
Messages: 2
Registered: July 2010
Junior Member
I know this should be super simple, but just want to clarify, does the symfony plugin:install command line utility require PEAR (i think it does)? Or is it the actual plugin I'm installing that requires PEAR? If Symfony requires PEAR for the basic plugin installation process, why doesn't it just come bundled with PEAR? Do I just need to manually download it and stick it into the lib/vendor folder and make sure my include class path points there? Here are my two attempts to install this plugin, and both results in the same error:


Attempt #1 (installing via plugin name):

c:\work\exercise-sym>symfony plugin:install sfJqueryReloadedPlugin
>> plugin installing plugin "sfJqueryReloadedPlugin"
PHP Warning: require_once(PEAR.php): failed to open stream: No such file or directory in C:\work\exercise-sym\lib\vendor\symfony\lib\plugin\sfPearEnv ironment.class.php on line 15

Warning: require_once(PEAR.php): failed to open stream: No such file or directory in C:\work\exercise-sym\lib\vendor\symfony\lib\plugin\sfPearEnv ironment.class.php on line 15
PHP Fatal error: require_once(): Failed opening required 'PEAR.php' (include_path='.;C:\php5\pear') in C:\work\exercise-sym\lib\vendor\symfony\lib\plugin\sfPearEnv ironment.class.php on line 15

Fatal error: require_once(): Failed opening required 'PEAR.php' (include_path='.;C:\php5\pear') in C:\work\exercise-sym\lib\vendor\symfony\lib\plugin\sfPearEnv ironment.class.php on line 15

Attempt #2 (installing via tgz):

c:\work\exercise-sym>symfony plugin:install /work/sfJqueryReloadedPlugin-1.4.1.tgz
>> plugin installing plugin "/work/sfJqueryReloadedPlugin-1.4.1.tgz"
PHP Warning: require_once(PEAR.php): failed to open stream: No such file or directory in C:\work\exercise-sym\lib\vendor\symfony\lib\plugin\sfPearEnv ironment.class.php on line 15

Warning: require_once(PEAR.php): failed to open stream: No such file or directory in C:\work\exercise-sym\lib\vendor\symfony\lib\plugin\sfPearEnv ironment.class.php on line 15
PHP Fatal error: require_once(): Failed opening required 'PEAR.php' (include_path='.;C:\php5\pear') in C:\work\exercise-sym\lib\vendor\symfony\lib\plugin\sfPearEnv ironment.class.php on line 15

Fatal error: require_once(): Failed opening required 'PEAR.php' (include_path='.;C:\php5\pear') in C:\work\exercise-sym\lib\vendor\symfony\lib\plugin\sfPearEnv ironment.class.php on line 15


powered by FUDforum - copyright ©2001-2004 FUD Forum Bulletin Board Software