Author: michkinn
Date: 2010-04-14 18:09:57 +0200 (Wed, 14 Apr 2010)
New Revision: 29149
Modified:
plugins/sfDoctrineFBAutocompletePlugin/trunk/LICENSE
plugins/sfDoctrineFBAutocompletePlugin/trunk/README
plugins/sfDoctrineFBAutocompletePlugin/trunk/lib/widget/sfWidgetFormDoctrineFBAutocompleter.class.php
plugins/sfDoctrineFBAutocompletePlugin/trunk/modules/sfDoctrineFBAutocompleteJson/lib/BasesfDoctrineFBAutocompleteJsonActions.class.php
plugins/sfDoctrineFBAutocompletePlugin/trunk/modules/sfDoctrineFBAutocompleteJson/templates/listSuccess.json.php
plugins/sfDoctrineFBAutocompletePlugin/trunk/package.xml.tmpl
Log:
Modified: plugins/sfDoctrineFBAutocompletePlugin/trunk/LICENSE
===================================================================
--- plugins/sfDoctrineFBAutocompletePlugin/trunk/LICENSE 2010-04-14
15:53:20 UTC (rev 29148)
+++ plugins/sfDoctrineFBAutocompletePlugin/trunk/LICENSE 2010-04-14
16:09:57 UTC (rev 29149)
@@ -0,0 +1,16 @@
+Copyright (c) 2009-2010 Gregory Schurgast
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and
+associateddocumentation files (the "Software"), to deal in the Software
without restriction,
+including without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense,
+and/or sell copies of the Software, and to permit persons to whom the Software
is furnished to do so,
+subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
copies or substantial
+portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT
+LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE
AND NONINFRINGEMENT.
+IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTIONOF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION
+WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
\ No newline at end of file
Modified: plugins/sfDoctrineFBAutocompletePlugin/trunk/README
===================================================================
--- plugins/sfDoctrineFBAutocompletePlugin/trunk/README 2010-04-14 15:53:20 UTC
(rev 29148)
+++ plugins/sfDoctrineFBAutocompletePlugin/trunk/README 2010-04-14 16:09:57 UTC
(rev 29149)
@@ -0,0 +1,33 @@
+# Symfony Jquery FaceBook Style Autocompleter based on #
+
+## Whats new ##
+V0.1 - initial Version
+
+
+## Installation ##
+You must enable the module for the nested set manager in your application
settings.yml
+
+ [yaml]
+ all:
+ .settings:
+ enabled_modules: [default, sfDoctrineFBAutocompleteJson ...]
+
+
+## Usage ##
+in your [mymodel]Form.class.php
+
+ [php]
+ <?php
+ ...
+ $this->widgetSchema['myfield'] = new
sfWidgetFormDoctrineFBAutocompleter(array('model' => 'GenreArticle'));
+ ...?>
+
+
+## Screenshots ##
+
+
+
+
+## Creditential ##
+
+This plugin is based on [FCBKcomplete for
jQuery](http://www.emposha.com/javascript/fcbkcomplete.html "FCBKcomplete for
jQuery")
Modified:
plugins/sfDoctrineFBAutocompletePlugin/trunk/lib/widget/sfWidgetFormDoctrineFBAutocompleter.class.php
===================================================================
---
plugins/sfDoctrineFBAutocompletePlugin/trunk/lib/widget/sfWidgetFormDoctrineFBAutocompleter.class.php
2010-04-14 15:53:20 UTC (rev 29148)
+++
plugins/sfDoctrineFBAutocompletePlugin/trunk/lib/widget/sfWidgetFormDoctrineFBAutocompleter.class.php
2010-04-14 16:09:57 UTC (rev 29149)
@@ -49,25 +49,9 @@
$this->addOption('template', <<<EOF
%associated%
<script type="text/javascript">
-
jQuery(document).ready(function() {
-
jQuery("#%id% option").attr('selected','selected');
- jQuery("#%id%").fcbkcomplete({
- %json_url%
- %cache%
- %newel%
- %firstselected%
- %filter_case%
- %filter_hide%
- %filter_selected%
- %complete_text%
- %maxshownitems%
- %maxitems%
- %onselect%
- %onremove%
- %delay%
- })
+ jQuery("#%id%").fcbkcomplete({%config%});
});
</script>
EOF
@@ -117,24 +101,15 @@
$onremove = $this->getOption('onremove') ? 'onremove :
"'.$this->getOption('onremove').'",' : '' ;
$delay = $this->getOption('delay') ? 'delay :
"'.$this->getOption('delay').'",' : '' ;
-
+ $config =
$json_url.$cache.$newel.$firstselected.$filter_case.$filter_hide.$filter_selected.$complete_text.$maxshownitems.$maxitems.$onselect.$onremove.$delay;
+
+ $config = substr($config,0,-1);
+
$associatedWidget = new sfWidgetFormSelect(array('multiple' => true,
'choices' => $associated ));
return strtr($this->getOption('template'), array(
'%id%' => $this->generateId($name),
- '%json_url%' => $json_url,
- '%cache%' => $cache,
- '%newel%' => $newel,
- '%firstselected%' => $firstselected,
- '%filter_case%' => $filter_case,
- '%filter_hide%' => $filter_hide,
- '%filter_selected%' => $filter_selected,
- '%complete_text%' => $complete_text,
- '%maxshownitems%' => $maxshownitems,
- '%maxitems%' => $maxitems,
- '%onselect%' => $onselect,
- '%onremove%' => $onremove,
- '%delay%' => $delay,
+ '%config%' => $config,
'%associated%' => $associatedWidget->render($name)
));
Modified:
plugins/sfDoctrineFBAutocompletePlugin/trunk/modules/sfDoctrineFBAutocompleteJson/lib/BasesfDoctrineFBAutocompleteJsonActions.class.php
===================================================================
---
plugins/sfDoctrineFBAutocompletePlugin/trunk/modules/sfDoctrineFBAutocompleteJson/lib/BasesfDoctrineFBAutocompleteJsonActions.class.php
2010-04-14 15:53:20 UTC (rev 29148)
+++
plugins/sfDoctrineFBAutocompletePlugin/trunk/modules/sfDoctrineFBAutocompleteJson/lib/BasesfDoctrineFBAutocompleteJsonActions.class.php
2010-04-14 16:09:57 UTC (rev 29149)
@@ -16,7 +16,7 @@
throw new sfException('sfDoctrineFBAutocompleteJson : Model is not
defined');
}
$this->items = Doctrine_Core::getTable(
$request->getParameter('model') )->findAll();
-
+
$this->setLayout(false);
$request->setParameter('sf_format','json');
}
Modified:
plugins/sfDoctrineFBAutocompletePlugin/trunk/modules/sfDoctrineFBAutocompleteJson/templates/listSuccess.json.php
===================================================================
---
plugins/sfDoctrineFBAutocompletePlugin/trunk/modules/sfDoctrineFBAutocompleteJson/templates/listSuccess.json.php
2010-04-14 15:53:20 UTC (rev 29148)
+++
plugins/sfDoctrineFBAutocompletePlugin/trunk/modules/sfDoctrineFBAutocompleteJson/templates/listSuccess.json.php
2010-04-14 16:09:57 UTC (rev 29149)
@@ -1 +1 @@
-[<?php foreach($items as $item): ?>{"caption":"<?php echo
addslashes($item);?>", "value":<?php echo $item->id;?>},<?php endforeach;?>]
\ No newline at end of file
+[<?php foreach($items as $k => $item): ?>{"caption":"<?php echo $k .'-' .
addslashes($item);?>", "value":<?php echo $item->id;?>}<?php if(
$items->count() > $k + 1 ):?>,<?php endif;?><?php endforeach;?>]
\ No newline at end of file
Modified: plugins/sfDoctrineFBAutocompletePlugin/trunk/package.xml.tmpl
===================================================================
--- plugins/sfDoctrineFBAutocompletePlugin/trunk/package.xml.tmpl
2010-04-14 15:53:20 UTC (rev 29148)
+++ plugins/sfDoctrineFBAutocompletePlugin/trunk/package.xml.tmpl
2010-04-14 16:09:57 UTC (rev 29149)
@@ -2,12 +2,12 @@
<package xmlns="http://pear.php.net/dtd/package-2.0"
xmlns:tasks="http://pear.php.net/dtd/tasks-1.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" packagerversion="1.4.1"
version="2.0" xsi:schemaLocation="http://pear.php.net/dtd/tasks-1.0
http://pear.php.net/dtd/tasks-1.0.xsd http://pear.php.net/dtd/package-2.0
http://pear.php.net/dtd/package-2.0.xsd">
<name>sfDoctrineFBAutocompletePlugin</name>
<channel>pear.symfony-project.com</channel>
- <summary>##SUMMARY##</summary>
- <description>##SUMMARY##</description>
+ <summary>This Plugin provide you with a widget that will allow you to manage
many 2 many relations betwwen Doctrine Object with an autocompletion field
(Facebook Style)</summary>
+ <description>This Plugin provide you with a widget that will allow you to
manage many 2 many relations betwwen Doctrine Object with an autocompletion
field (Facebook Style)</description>
<lead>
- <name>##LEAD_NAME##</name>
- <user>##LEAD_USERNAME##</user>
- <email>##LEAD_EMAIL##</email>
+ <name>Gregory SCHURGAST</name>
+ <user>michkinn</user>
+ <email>[email protected]</email>
<active>yes</active>
</lead>
<date>##CURRENT_DATE##</date>
@@ -35,9 +35,8 @@
<package>
<name>symfony</name>
<channel>pear.symfony-project.com</channel>
- <min>1.2.0</min>
- <max>1.3.0</max>
- <exclude>1.3.0</exclude>
+ <min>1.3.0</min>
+ <max>1.4.0</max>
</package>
</required>
</dependencies>
--
You received this message because you are subscribed to the Google Groups
"symfony SVN" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/symfony-svn?hl=en.