The SSH host key has changed on 8 April, 2022 to this one: SHA256:573uTBSeh74kvOo0HJXi5ijdzRm8me27suzNEDlGyrQ

Made group creation possible (open groups only, yet)

master
Polonkai Gergely 10 years ago
parent cab47219b3
commit 9f49b70d67
  1. 1
      app/AppKernel.php
  2. 2
      composer.json
  3. 15
      composer.lock
  4. 118
      src/KekRozsak/FrontBundle/Controller/DefaultController.php
  5. 175
      src/KekRozsak/FrontBundle/Controller/GroupController.php
  6. 5
      src/KekRozsak/FrontBundle/Entity/Group.php
  7. 8
      src/KekRozsak/FrontBundle/Entity/UserGroupMembership.php
  8. 33
      src/KekRozsak/FrontBundle/Extensions/Slugifier.php
  9. 25
      src/KekRozsak/FrontBundle/Form/Type/GroupType.php
  10. 10
      src/KekRozsak/FrontBundle/Resources/views/Group/groupCreate.html.twig
  11. 0
      src/KekRozsak/FrontBundle/Resources/views/Group/groupDocuments.html.twig
  12. 0
      src/KekRozsak/FrontBundle/Resources/views/Group/groupJoin.html.twig
  13. 4
      src/KekRozsak/FrontBundle/Resources/views/Group/groupList.html.twig
  14. 0
      src/KekRozsak/FrontBundle/Resources/views/Group/groupMembers.html.twig
  15. 2
      src/KekRozsak/FrontBundle/Resources/views/Group/groupView.html.twig
  16. 222
      vendor/composer/installed.json
  17. 2
      vendor/egeloen/ckeditor-bundle/Ivory/CKEditorBundle
  18. 1
      vendor/symfony/symfony/src/Symfony/Bridge/Doctrine/CHANGELOG.md
  19. 27
      vendor/symfony/symfony/src/Symfony/Bridge/Doctrine/Form/Type/DoctrineType.php
  20. 28
      vendor/symfony/symfony/src/Symfony/Bridge/Doctrine/Tests/Form/Type/EntityTypeTest.php
  21. 2
      vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Controller/RedirectController.php
  22. 1327
      web/bundles/ivoryckeditor/LICENSE.html
  23. 149
      web/bundles/ivoryckeditor/ckeditor.js
  24. 11
      web/bundles/ivoryckeditor/config.js
  25. 25
      web/bundles/ivoryckeditor/contents.css
  26. BIN
      web/bundles/ivoryckeditor/images/spacer.gif
  27. 6
      web/bundles/ivoryckeditor/lang/_languages.js
  28. 61
      web/bundles/ivoryckeditor/lang/_translationstatus.txt
  29. 6
      web/bundles/ivoryckeditor/lang/af.js
  30. 6
      web/bundles/ivoryckeditor/lang/ar.js
  31. 6
      web/bundles/ivoryckeditor/lang/bg.js
  32. 6
      web/bundles/ivoryckeditor/lang/bn.js
  33. 6
      web/bundles/ivoryckeditor/lang/bs.js
  34. 6
      web/bundles/ivoryckeditor/lang/ca.js
  35. 6
      web/bundles/ivoryckeditor/lang/cs.js
  36. 6
      web/bundles/ivoryckeditor/lang/cy.js
  37. 6
      web/bundles/ivoryckeditor/lang/da.js
  38. 6
      web/bundles/ivoryckeditor/lang/de.js
  39. 6
      web/bundles/ivoryckeditor/lang/el.js
  40. 6
      web/bundles/ivoryckeditor/lang/en-au.js
  41. 6
      web/bundles/ivoryckeditor/lang/en-ca.js
  42. 6
      web/bundles/ivoryckeditor/lang/en-gb.js
  43. 6
      web/bundles/ivoryckeditor/lang/en.js
  44. 6
      web/bundles/ivoryckeditor/lang/eo.js
  45. 6
      web/bundles/ivoryckeditor/lang/es.js
  46. 6
      web/bundles/ivoryckeditor/lang/et.js
  47. 6
      web/bundles/ivoryckeditor/lang/eu.js
  48. 6
      web/bundles/ivoryckeditor/lang/fa.js
  49. 6
      web/bundles/ivoryckeditor/lang/fi.js
  50. 6
      web/bundles/ivoryckeditor/lang/fo.js
  51. 6
      web/bundles/ivoryckeditor/lang/fr-ca.js
  52. 6
      web/bundles/ivoryckeditor/lang/fr.js
  53. 6
      web/bundles/ivoryckeditor/lang/gl.js
  54. 6
      web/bundles/ivoryckeditor/lang/gu.js
  55. 6
      web/bundles/ivoryckeditor/lang/he.js
  56. 6
      web/bundles/ivoryckeditor/lang/hi.js
  57. 6
      web/bundles/ivoryckeditor/lang/hr.js
  58. 6
      web/bundles/ivoryckeditor/lang/hu.js
  59. 6
      web/bundles/ivoryckeditor/lang/is.js
  60. 6
      web/bundles/ivoryckeditor/lang/it.js
  61. 6
      web/bundles/ivoryckeditor/lang/ja.js
  62. 6
      web/bundles/ivoryckeditor/lang/ka.js
  63. 6
      web/bundles/ivoryckeditor/lang/km.js
  64. 6
      web/bundles/ivoryckeditor/lang/ko.js
  65. 6
      web/bundles/ivoryckeditor/lang/lt.js
  66. 6
      web/bundles/ivoryckeditor/lang/lv.js
  67. 6
      web/bundles/ivoryckeditor/lang/mn.js
  68. 6
      web/bundles/ivoryckeditor/lang/ms.js
  69. 6
      web/bundles/ivoryckeditor/lang/nb.js
  70. 6
      web/bundles/ivoryckeditor/lang/nl.js
  71. 6
      web/bundles/ivoryckeditor/lang/no.js
  72. 6
      web/bundles/ivoryckeditor/lang/pl.js
  73. 6
      web/bundles/ivoryckeditor/lang/pt-br.js
  74. 6
      web/bundles/ivoryckeditor/lang/pt.js
  75. 6
      web/bundles/ivoryckeditor/lang/ro.js
  76. 6
      web/bundles/ivoryckeditor/lang/ru.js
  77. 6
      web/bundles/ivoryckeditor/lang/sk.js
  78. 6
      web/bundles/ivoryckeditor/lang/sl.js
  79. 6
      web/bundles/ivoryckeditor/lang/sr-latn.js
  80. 6
      web/bundles/ivoryckeditor/lang/sr.js
  81. 6
      web/bundles/ivoryckeditor/lang/sv.js
  82. 6
      web/bundles/ivoryckeditor/lang/th.js
  83. 6
      web/bundles/ivoryckeditor/lang/tr.js
  84. 6
      web/bundles/ivoryckeditor/lang/uk.js
  85. 6
      web/bundles/ivoryckeditor/lang/vi.js
  86. 6
      web/bundles/ivoryckeditor/lang/zh-cn.js
  87. 6
      web/bundles/ivoryckeditor/lang/zh.js
  88. 7
      web/bundles/ivoryckeditor/plugins/a11yhelp/dialogs/a11yhelp.js
  89. 6
      web/bundles/ivoryckeditor/plugins/a11yhelp/lang/en.js
  90. 6
      web/bundles/ivoryckeditor/plugins/a11yhelp/lang/he.js
  91. 6
      web/bundles/ivoryckeditor/plugins/about/dialogs/about.js
  92. BIN
      web/bundles/ivoryckeditor/plugins/about/dialogs/logo_ckeditor.png
  93. 6
      web/bundles/ivoryckeditor/plugins/adobeair/plugin.js
  94. 6
      web/bundles/ivoryckeditor/plugins/ajax/plugin.js
  95. 6
      web/bundles/ivoryckeditor/plugins/autogrow/plugin.js
  96. 9
      web/bundles/ivoryckeditor/plugins/bbcode/plugin.js
  97. 7
      web/bundles/ivoryckeditor/plugins/clipboard/dialogs/paste.js
  98. 7
      web/bundles/ivoryckeditor/plugins/colordialog/dialogs/colordialog.js
  99. 6
      web/bundles/ivoryckeditor/plugins/devtools/lang/en.js
  100. 6
      web/bundles/ivoryckeditor/plugins/devtools/plugin.js
  101. Some files were not shown because too many files have changed in this diff Show More

@ -19,6 +19,7 @@ class AppKernel extends Kernel
new JMS\AopBundle\JMSAopBundle(),
new JMS\DiExtraBundle\JMSDiExtraBundle($this),
new JMS\SecurityExtraBundle\JMSSecurityExtraBundle(),
new Ivory\CKEditorBundle\IvoryCKEditorBundle(),
new KekRozsak\FrontBundle\KekRozsakFrontBundle(),
new KekRozsak\SecurityBundle\KekRozsakSecurityBundle(),
new KekRozsak\AdminBundle\KekRozsakAdminBundle(),

@ -18,7 +18,7 @@
"sensio/generator-bundle": "dev-master",
"jms/security-extra-bundle": "1.1.*",
"jms/di-extra-bundle": "1.0.*",
"egeloen/ckeditor-bundle": "2.0.*"
"egeloen/ckeditor-bundle": "dev-master"
},
"scripts": {
"post-install-cmd": [

15
composer.lock generated

@ -1,5 +1,5 @@
{
"hash": "0890891a613a13d9980307e458190353",
"hash": "ddad7f2ad3884b1f4190d2d1c04a7f63",
"packages": [
{
"package": "doctrine/common",
@ -22,9 +22,9 @@
},
{
"package": "egeloen/ckeditor-bundle",
"version": "2.0.x-dev",
"source-reference": "ca9d4a631577d7195c6517dd89ae8a3cc02b85ba",
"commit-date": "1337272707"
"version": "dev-master",
"source-reference": "98c9771b3d2748af0052b5efc697d5c1403c6473",
"commit-date": "1338211007"
},
{
"package": "jms/aop-bundle",
@ -118,8 +118,8 @@
{
"package": "symfony/symfony",
"version": "dev-master",
"source-reference": "151b79a6ce3f459e2fa8815cd9f2786eef750993",
"commit-date": "1342376835"
"source-reference": "f52ce6178243e4b11aa09bde147f684d596fb120",
"commit-date": "1342516073"
},
{
"package": "twig/extensions",
@ -152,6 +152,7 @@
"symfony/monolog-bundle": 20,
"sensio/distribution-bundle": 20,
"sensio/framework-extra-bundle": 20,
"sensio/generator-bundle": 20
"sensio/generator-bundle": 20,
"egeloen/ckeditor-bundle": 20
}
}

@ -78,124 +78,6 @@ class DefaultController extends Controller
);
}
/**
* @Route("/csoportok", name="KekRozsakFrontBundle_groupList")
* @Template()
*/
public function groupListAction()
{
$groupRepo = $this->getDoctrine()->getRepository('KekRozsakFrontBundle:Group');
$groups = $groupRepo->findAll(array('name' => 'DESC'));
return array(
'groups' => $groups,
);
}
/**
* @Route("/csoport/{groupSlug}", name="KekRozsakFrontBundle_groupView")
* @Template()
*/
public function groupViewAction($groupSlug)
{
$groupRepo = $this->getDoctrine()->getRepository('KekRozsakFrontBundle:Group');
if (!($group = $groupRepo->findOneBySlug($groupSlug)))
throw $this->createNotFoundException('A kért csoport nem létezik!');
return array(
'group' => $group,
);
}
/**
* @Route("/csoport/{groupSlug}/tagok", name="KekRozsakFrontBundle_groupMembers")
* @Template()
*/
public function groupMembersAction($groupSlug)
{
$groupRepo = $this->getDoctrine()->getRepository('KekRozsakFrontBundle:Group');
if (!($group = $groupRepo->findOneBySlug($groupSlug)))
throw $this->createNotFoundException('A kért csoport nem létezik!');
return array(
'group' => $group,
);
}
/**
* @Route("/csoport/{groupSlug}/dokumentumok", name="KekRozsakFrontBundle_groupDocuments")
* @Template()
*/
public function groupDocumentsAction($groupSlug)
{
$groupRepo = $this->getDoctrine()->getRepository('KekRozsakFrontBundle:Group');
if (!($group = $groupRepo->findOneBySlug($groupSlug)))
throw $this->createNotFoundException('A kért csoport nem létezik!');
return array(
'group' => $group,
);
}
/**
* @Route("/csoport/{groupSlug}/belepes", name="KekRozsakFrontBundle_groupJoin")
* @Template()
*/
public function groupJoinAction($groupSlug)
{
$user = $this->get('security.context')->getToken()->getUser();
$groupRepo = $this->getDoctrine()->getRepository('KekRozsakFrontBundle:Group');
if (!($group = $groupRepo->findOneBySlug($groupSlug)))
throw $this->createNotFoundException('A kért csoport nem létezik!');
if ($group->isMember($user))
{
return $this->redirect($this->generateUrl('KekRozsakFrontBundle_groupView', array($groupSlug => $group->getSlug())));
}
if ($group->isRequested($user))
{
return array(
'isRequested' => true,
'needApproval' => false,
'group' => $group,
);
}
$membership = new UserGroupMembership();
$membership->setUser($user);
$membership->setGroup($group);
$membership->setMembershipRequestedAt(new \DateTime('now'));
if ($group->isOpen())
{
$membership->setMembershipAcceptedAt(new \DateTime('now'));
}
$em = $this->getDoctrine()->getEntityManager();
$em->persist($membership);
$em->flush();
if ($group->isOpen())
{
return $this->redirect($this->generateUrl('KekRozsakFrontBundle_groupView', array($groupSlug => $group->getSlug())));
}
else
{
$message = \Swift_Message::newInstance()
->setSubject('Új jelentkező a csoportodban (' . $group->getName() . '): ' . $user->getDisplayName())
// TODO: Make this a config parameter!
->setFrom('info@blueroses.hu')
->setTo($group->getLeader()->getEmail())
->setBody($this->renderView('KekRozsakFrontBundle:Email:groupJoinRequest.txt.twig', array('user' => $user, 'group' => $group)));
$this->get('mailer')->send($message);
return array(
'isRequested' => false,
'needApproval' => true,
'group' => $group,
);
}
}
/**
* @Route("/dokumentum/{documentSlug}", name="KekRozsakFrontBundle_documentView")
* @Template()

@ -0,0 +1,175 @@
<?php
namespace KekRozsak\FrontBundle\Controller;
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Template;
use KekRozsak\FrontBundle\Entity\UserGroupMembership;
use KekRozsak\FrontBundle\Entity\Group;
use KekRozsak\FrontBundle\Form\Type\GroupType;
use KekRozsak\FrontBundle\Extensions\Slugifier;
class GroupController extends Controller
{
/**
* @Route("/csoportok", name="KekRozsakFrontBundle_groupList")
* @Template()
*/
public function groupListAction()
{
$groupRepo = $this->getDoctrine()->getRepository('KekRozsakFrontBundle:Group');
$groups = $groupRepo->findAll(array('name' => 'DESC'));
return array(
'groups' => $groups,
);
}
/**
* @Route("/csoport/{groupSlug}", name="KekRozsakFrontBundle_groupView")
* @Template()
*/
public function groupViewAction($groupSlug)
{
$groupRepo = $this->getDoctrine()->getRepository('KekRozsakFrontBundle:Group');
if (!($group = $groupRepo->findOneBySlug($groupSlug)))
throw $this->createNotFoundException('A kért csoport nem létezik!');
return array(
'group' => $group,
);
}
/**
* @Route("/csoport/{groupSlug}/tagok", name="KekRozsakFrontBundle_groupMembers")
* @Template()
*/
public function groupMembersAction($groupSlug)
{
$groupRepo = $this->getDoctrine()->getRepository('KekRozsakFrontBundle:Group');
if (!($group = $groupRepo->findOneBySlug($groupSlug)))
throw $this->createNotFoundException('A kért csoport nem létezik!');
return array(
'group' => $group,
);
}
/**
* @Route("/csoport/{groupSlug}/dokumentumok", name="KekRozsakFrontBundle_groupDocuments")
* @Template()
*/
public function groupDocumentsAction($groupSlug)
{
$groupRepo = $this->getDoctrine()->getRepository('KekRozsakFrontBundle:Group');
if (!($group = $groupRepo->findOneBySlug($groupSlug)))
throw $this->createNotFoundException('A kért csoport nem létezik!');
return array(
'group' => $group,
);
}
/**
* @Route("/csoport/{groupSlug}/belepes", name="KekRozsakFrontBundle_groupJoin")
* @Template()
*/
public function groupJoinAction($groupSlug)
{
$user = $this->get('security.context')->getToken()->getUser();
$groupRepo = $this->getDoctrine()->getRepository('KekRozsakFrontBundle:Group');
if (!($group = $groupRepo->findOneBySlug($groupSlug)))
throw $this->createNotFoundException('A kért csoport nem létezik!');
if ($group->isMember($user))
{
return $this->redirect($this->generateUrl('KekRozsakFrontBundle_groupView', array($groupSlug => $group->getSlug())));
}
if ($group->isRequested($user))
{
return array(
'isRequested' => true,
'needApproval' => false,
'group' => $group,
);
}
$membership = new UserGroupMembership();
$membership->setUser($user);
$membership->setGroup($group);
$membership->setMembershipRequestedAt(new \DateTime('now'));
if ($group->isOpen())
{
$membership->setMembershipAcceptedAt(new \DateTime('now'));
}
$em = $this->getDoctrine()->getEntityManager();
$em->persist($membership);
$em->flush();
if ($group->isOpen())
{
return $this->redirect($this->generateUrl('KekRozsakFrontBundle_groupView', array($groupSlug => $group->getSlug())));
}
else
{
$message = \Swift_Message::newInstance()
->setSubject('Új jelentkező a csoportodban (' . $group->getName() . '): ' . $user->getDisplayName())
// TODO: Make this a config parameter!
->setFrom('info@blueroses.hu')
->setTo($group->getLeader()->getEmail())
->setBody($this->renderView('KekRozsakFrontBundle:Email:groupJoinRequest.txt.twig', array('user' => $user, 'group' => $group)));
$this->get('mailer')->send($message);
return array(
'isRequested' => false,
'needApproval' => true,
'group' => $group,
);
}
}
/**
* @Route("/csoportok/uj", name="KekRozsakFrontBundle_groupCreate")
* @Template()
*/
public function groupCreateAction()
{
$group = new Group();
$form = $this->createForm(new GroupType(), $group);
$request = $this->getRequest();
if ($request->getMethod() == 'POST')
{
$form->bindRequest($request);
if ($form->isValid())
{
$slugifier = new Slugifier();
$user = $this->get('security.context')->getToken()->getUser();
$group->setCreatedBy($user);
$group->setSlug($slugifier->slugify($group->getName()));
$group->setCreatedAt(new \DateTime('now'));
$group->setOpen(true);
$em = $this->getDoctrine()->getEntityManager();
$em->persist($group);
$em->flush();
$membership = new UserGroupMembership($user, $group);
$em->persist($membership);
$em->flush();
return $this->redirect($this->generateUrl('KekRozsakFrontBundle_groupList'));
}
}
return array(
'form' => $form->createView(),
);
}
}

@ -4,6 +4,8 @@ namespace KekRozsak\FrontBundle\Entity;
use Doctrine\ORM\Mapping as ORM;
use Doctrine\Common\Collections\ArrayCollection;
use Symfony\Component\Validator\Constraints as Assert;
use Symfony\Bridge\Doctrine\Validator\Constraints as DoctrineAssert;
use KekRozsak\SecurityBundle\Entity\User;
use KekRozsak\FrontBundle\Entity\Document;
@ -12,6 +14,8 @@ use KekRozsak\FrontBundle\Entity\Document;
* KekRozsak\FrontBundle\Entity\Group
* @ORM\Entity
* @ORM\Table(name="groups")
* @DoctrineAssert\UniqueEntity(fields="name", message="Ilyen nevű csoport már létezik. Kérlek, válassz másikat!")
* @DoctrineAssert\UniqueEntity(fields="slug", message="Ilyen nevű csoport már létezik. Kérlek, válasz másikat!")
*/
class Group
{
@ -70,6 +74,7 @@ class Group
/**
* @var string $name
* @ORM\Column(type="string", length=50, nullable=false, unique=true)
* @Assert\NotBlank()
*/
protected $name;

@ -15,6 +15,14 @@ use KekRozsak\SecurityBundle\Entity\User;
*/
class UserGroupMembership
{
public function __construct(\KekRozsak\SecurityBundle\Entity\User $user, \KekRozsak\FrontBundle\Entity\Group $group)
{
$this->setUser($user);
$this->setGroup($group);
$this->setMembershipRequestedAt(new \DateTime('now'));
$this->setMembershipAcceptedAt(new \DateTime('now'));
}
/**
* @var integer $id
* @ORM\Id

@ -0,0 +1,33 @@
<?php
namespace KekRozsak\FrontBundle\Extensions;
class Slugifier
{
/**
* Slugify string
*
* @param string $text
* @return string
*/
public function slugify($text)
{
$text = trim(preg_replace('~[^\\pL\d]+~u', '-', $text));
if (function_exists('iconv'))
{
$text = iconv('utf-8', 'us-ascii//TRANSLIT', $text);
}
$text = strtolower($text);
$text = preg_replace('~[^-\w]+~', '', $text);
if (empty($text))
{
$text = 'n-a';
}
return $text;
}
}

@ -0,0 +1,25 @@
<?php
namespace KekRozsak\FrontBundle\Form\Type;
use Symfony\Component\Form\AbstractType;
use Symfony\Component\Form\FormBuilderInterface;
class GroupType extends AbstractType
{
public function buildForm(FormBuilderInterface $builder, array $options)
{
$builder->add('name', null, array(
'label' => 'A csoport neve',
));
$builder->add('description', 'ckeditor', array(
'label' => 'A csoport leírása',
));
}
public function getName()
{
return 'group';
}
}

@ -0,0 +1,10 @@
{% extends '::main_template.html.twig' %}
{% block title %} - Csoport létrehozása{% endblock %}
{% block content %}
<h3>Csoport létrehozása</h3>
<p>Warning</p>
<form method="post" action="{{ path('KekRozsakFrontBundle_groupCreate') }}">
{{ form_widget(form) }}
<button type="submit">Létrehozás</button>
</form>
{% endblock content %}

@ -26,7 +26,7 @@
<span title="Már jelentkeztél, de a jelentkezésedet a csoport vezetője még nem fogadta el" class="ikon">[jelentkeztél ikon]</span>
{% else %}
{% if group.isOpen %}
<a href="{{ path('KekRozsakFrontBundle_groupJoin, { groupSlug: group.slug }') }}"><span title="Nyílt csoport, kattints a belépéshez!" class="ikon">[nyílt ikon]</span></a>
<a href="{{ path('KekRozsakFrontBundle_groupJoin', { groupSlug: group.slug }) }}"><span title="Nyílt csoport, kattints a belépéshez!" class="ikon">[nyílt ikon]</span></a>
{% else %}
<a href="{{ path('KekRozsakFrontBundle_groupJoin', { groupSlug: group.slug }) }}"><span title="Zárt csoport, kattints a jelentkezéshez!" class="ikon">[zárt ikon]</span></a>
{% endif %}
@ -37,7 +37,7 @@
{% endfor %}
</tbody>
</table>
Új csoport létrehozása
<a href="{{ path('KekRozsakFrontBundle_groupCreate') }}">Új csoport létrehozása</a>
{% endblock content %}
{% block bottomscripts %}
<script type="text/javascript">

@ -9,5 +9,5 @@
<li><a href="{{ path('KekRozsakFrontBundle_groupDocuments', {groupSlug: group.slug }) }}">Dokumentumok</a></li>
</ul>
<h3>{{ group.name }}</h3>
{{ group.description }}
{{ group.description|raw }}
{% endblock %}

@ -3,7 +3,7 @@
"name": "jms/metadata",
"version": "1.1.1",
"version_normalized": "1.1.1.0",
"time": "2011-12-29 20:32:49",
"time": "2011-12-29 19:32:49",
"source": {
"type": "git",
"url": "https://github.com/schmittjoh/metadata",
@ -47,7 +47,7 @@
"name": "jms/cg",
"version": "1.0.0",
"version_normalized": "1.0.0.0",
"time": "2011-12-29 19:40:52",
"time": "2011-12-29 18:40:52",
"source": {
"type": "git",
"url": "git://github.com/schmittjoh/cg-library.git",
@ -89,7 +89,7 @@
"version": "1.0.0",
"version_normalized": "1.0.0.0",
"target-dir": "JMS/AopBundle",
"time": "2011-12-29 19:50:26",
"time": "2011-12-29 18:50:26",
"source": {
"type": "git",
"url": "https://github.com/schmittjoh/JMSAopBundle",
@ -133,7 +133,7 @@
"version": "1.1.0",
"version_normalized": "1.1.0.0",
"target-dir": "JMS/SecurityExtraBundle",
"time": "2011-12-29 23:38:12",
"time": "2011-12-29 22:38:12",
"source": {
"type": "git",
"url": "https://github.com/schmittjoh/JMSSecurityExtraBundle",
@ -178,7 +178,7 @@
"version": "1.0.1",
"version_normalized": "1.0.1.0",
"target-dir": "JMS/DiExtraBundle",
"time": "2012-02-24 15:01:54",
"time": "2012-02-24 14:01:54",
"source": {
"type": "git",
"url": "https://github.com/schmittjoh/JMSDiExtraBundle",
@ -221,7 +221,7 @@
"name": "doctrine/common",
"version": "2.2.2",
"version_normalized": "2.2.2.0",
"time": "2012-04-06 23:46:44",
"time": "2012-04-06 21:46:44",
"source": {
"type": "git",
"url": "https://github.com/doctrine/common",
@ -287,7 +287,7 @@
"name": "monolog/monolog",
"version": "1.1.0",
"version_normalized": "1.1.0.0",
"time": "2012-04-17 10:27:40",
"time": "2012-04-17 08:27:40",
"source": {
"type": "git",
"url": "https://github.com/Seldaek/monolog.git",
@ -337,7 +337,7 @@
"name": "twig/extensions",
"version": "dev-master",
"version_normalized": "9999999-dev",
"time": "2012-05-15 17:28:19",
"time": "2012-05-15 15:28:19",
"source": {
"type": "git",
"url": "https://github.com/fabpot/Twig-extensions",
@ -382,7 +382,7 @@
"name": "kriswallsmith/assetic",
"version": "dev-master",
"version_normalized": "9999999-dev",
"time": "2012-06-06 21:41:54",
"time": "2012-06-06 19:41:54",
"source": {
"type": "git",
"url": "http://github.com/kriswallsmith/assetic.git",
@ -442,7 +442,7 @@
"version": "dev-master",
"version_normalized": "9999999-dev",
"target-dir": "Doctrine/Bundle/DoctrineBundle",
"time": "2012-07-02 06:42:17",
"time": "2012-07-02 04:42:17",
"source": {
"type": "git",
"url": "git://github.com/doctrine/DoctrineBundle.git",
@ -516,7 +516,7 @@
"name": "doctrine/orm",
"version": "2.2.x-dev",
"version_normalized": "2.2.9999999.9999999-dev",
"time": "2012-07-06 03:48:00",
"time": "2012-07-06 01:48:00",
"source": {
"type": "git",
"url": "git://github.com/doctrine/doctrine2.git",
@ -581,7 +581,7 @@
"name": "doctrine/dbal",
"version": "2.2.x-dev",
"version_normalized": "2.2.9999999.9999999-dev",
"time": "2012-07-07 14:30:35",
"time": "2012-07-07 12:30:35",
"source": {
"type": "git",
"url": "https://github.com/doctrine/dbal",
@ -642,56 +642,12 @@
}
}
},
{
"name": "egeloen/ckeditor-bundle",
"version": "2.0.x-dev",
"version_normalized": "2.0.9999999.9999999-dev",
"target-dir": "Ivory/CKEditorBundle",
"time": "2012-05-16 14:38:27",
"source": {
"type": "git",
"url": "https://github.com/egeloen/IvoryCKEditorBundle",
"reference": "ca9d4a631577d7195c6517dd89ae8a3cc02b85ba"
},
"dist": {
"type": "zip",
"url": "https://github.com/egeloen/IvoryCKEditorBundle/zipball/ca9d4a631577d7195c6517dd89ae8a3cc02b85ba",
"reference": "ca9d4a631577d7195c6517dd89ae8a3cc02b85ba",
"shasum": ""
},
"require": {
"php": ">=5.3.0",
"symfony/framework-bundle": "2.*"
},
"type": "symfony-bundle",
"installation-source": "source",
"license": [
"MIT"
],
"authors": [
{
"name": "Eric GELOEN",
"email": "geloen.eric@gmail.com",
"homepage": null,
"role": null
}
],
"description": "Provides a CKEditor integration for your Symfony2 Project.",
"keywords": [
"CKEditor"
],
"autoload": {
"psr-0": {
"Ivory\\CKEditorBundle": ""
}
}
},
{
"name": "sensio/generator-bundle",
"version": "dev-master",
"version_normalized": "9999999-dev",
"target-dir": "Sensio/Bundle/GeneratorBundle",
"time": "2012-07-12 20:04:48",
"time": "2012-07-12 18:04:48",
"source": {
"type": "git",
"url": "https://github.com/sensio/SensioGeneratorBundle",
@ -744,7 +700,7 @@
"version": "dev-master",
"version_normalized": "9999999-dev",
"target-dir": "Symfony/Bundle/AsseticBundle",
"time": "2012-07-12 02:51:17",
"time": "2012-07-12 00:51:17",
"source": {
"type": "git",
"url": "https://github.com/symfony/AsseticBundle",
@ -800,7 +756,7 @@
"version": "dev-master",
"version_normalized": "9999999-dev",
"target-dir": "Symfony/Bundle/MonologBundle",
"time": "2012-06-30 01:48:07",
"time": "2012-06-29 23:48:07",
"source": {
"type": "git",
"url": "https://github.com/symfony/MonologBundle",
@ -860,7 +816,7 @@
"version": "dev-master",
"version_normalized": "9999999-dev",
"target-dir": "Sensio/Bundle/FrameworkExtraBundle",
"time": "2012-07-11 19:13:52",
"time": "2012-07-11 17:13:52",
"source": {
"type": "git",
"url": "https://github.com/sensio/SensioFrameworkExtraBundle",
@ -909,7 +865,7 @@
"name": "twig/twig",
"version": "dev-master",
"version_normalized": "9999999-dev",
"time": "2012-07-15 19:42:44",
"time": "2012-07-15 17:42:44",
"source": {
"type": "git",
"url": "git://github.com/fabpot/Twig.git",
@ -964,7 +920,7 @@
"version": "dev-master",
"version_normalized": "9999999-dev",
"target-dir": "Symfony/Bundle/SwiftmailerBundle",
"time": "2012-07-05 07:33:34",
"time": "2012-07-05 05:33:34",
"source": {
"type": "git",
"url": "https://github.com/symfony/SwiftmailerBundle",
@ -1022,7 +978,7 @@
"name": "swiftmailer/swiftmailer",
"version": "dev-master",
"version_normalized": "9999999-dev",
"time": "2012-07-13 08:47:17",
"time": "2012-07-13 06:47:17",
"source": {
"type": "git",
"url": "git://github.com/swiftmailer/swiftmailer.git",
@ -1073,20 +1029,108 @@
]
}
},
{
"name": "sensio/distribution-bundle",
"version": "dev-master",
"version_normalized": "9999999-dev",
"target-dir": "Sensio/Bundle/DistributionBundle",
"time": "2012-07-15 04:24:10",
"source": {
"type": "git",
"url": "https://github.com/sensio/SensioDistributionBundle",
"reference": "5886adae1613c0a72fbb95259a83ae798e86c0d3"
},
"dist": {
"type": "zip",
"url": "https://github.com/sensio/SensioDistributionBundle/zipball/5886adae1613c0a72fbb95259a83ae798e86c0d3",
"reference": "5886adae1613c0a72fbb95259a83ae798e86c0d3",
"shasum": ""
},
"require": {
"symfony/framework-bundle": "2.1.*"
},
"type": "symfony-bundle",
"installation-source": "source",
"license": [
"MIT"
],
"authors": [
{
"name": "Fabien Potencier",
"email": "fabien@symfony.com",
"homepage": null,
"role": null
}
],
"description": "The base bundle for the Symfony Distributions",
"keywords": [
"distribution",
"configuration"
],
"autoload": {
"psr-0": {
"Sensio\\Bundle\\DistributionBundle": ""
}
}
},
{
"name": "egeloen/ckeditor-bundle",
"version": "dev-master",
"version_normalized": "9999999-dev",
"target-dir": "Ivory/CKEditorBundle",
"time": "2012-05-28 13:16:47",
"source": {
"type": "git",
"url": "https://github.com/egeloen/IvoryCKEditorBundle",
"reference": "98c9771b3d2748af0052b5efc697d5c1403c6473"
},
"dist": {
"type": "zip",
"url": "https://github.com/egeloen/IvoryCKEditorBundle/zipball/98c9771b3d2748af0052b5efc697d5c1403c6473",
"reference": "98c9771b3d2748af0052b5efc697d5c1403c6473",
"shasum": ""
},
"require": {
"php": ">=5.3.0",
"symfony/framework-bundle": "2.*"
},
"type": "symfony-bundle",
"installation-source": "source",
"license": [
"MIT"
],
"authors": [
{
"name": "Eric GELOEN",
"email": "geloen.eric@gmail.com",
"homepage": null,
"role": null
}
],
"description": "Provides a CKEditor integration for your Symfony2 Project.",
"keywords": [
"CKEditor"
],
"autoload": {
"psr-0": {
"Ivory\\CKEditorBundle": ""
}
}
},
{
"name": "symfony/symfony",
"version": "dev-master",
"version_normalized": "9999999-dev",
"time": "2012-07-15 12:27:15",
"time": "2012-07-17 09:07:53",
"source": {
"type": "git",
"url": "git://github.com/symfony/symfony.git",
"reference": "151b79a6ce3f459e2fa8815cd9f2786eef750993"
"reference": "f52ce6178243e4b11aa09bde147f684d596fb120"
},
"dist": {
"type": "zip",
"url": "https://github.com/symfony/symfony/zipball/151b79a6ce3f459e2fa8815cd9f2786eef750993",
"reference": "151b79a6ce3f459e2fa8815cd9f2786eef750993",
"url": "https://github.com/symfony/symfony/zipball/f52ce6178243e4b11aa09bde147f684d596fb120",
"reference": "f52ce6178243e4b11aa09bde147f684d596fb120",
"shasum": ""
},
"require": {
@ -1173,49 +1217,5 @@
"SessionHandlerInterface": "src/Symfony/Component/HttpFoundation/Resources/stubs"
}
}
},
{
"name": "sensio/distribution-bundle",
"version": "dev-master",
"version_normalized": "9999999-dev",
"target-dir": "Sensio/Bundle/DistributionBundle",
"time": "2012-07-15 06:24:10",
"source": {
"type": "git",
"url": "https://github.com/sensio/SensioDistributionBundle",
"reference": "5886adae1613c0a72fbb95259a83ae798e86c0d3"
},
"dist": {
"type": "zip",
"url": "https://github.com/sensio/SensioDistributionBundle/zipball/5886adae1613c0a72fbb95259a83ae798e86c0d3",
"reference": "5886adae1613c0a72fbb95259a83ae798e86c0d3",
"shasum": ""
},
"require": {
"symfony/framework-bundle": "2.1.*"
},
"type": "symfony-bundle",
"installation-source": "source",
"license": [
"MIT"
],
"authors": [
{
"name": "Fabien Potencier",
"email": "fabien@symfony.com",
"homepage": null,
"role": null
}
],
"description": "The base bundle for the Symfony Distributions",
"keywords": [
"distribution",
"configuration"
],
"autoload": {
"psr-0": {
"Sensio\\Bundle\\DistributionBundle": ""
}
}
}
]

@ -1 +1 @@
Subproject commit ca9d4a631577d7195c6517dd89ae8a3cc02b85ba
Subproject commit 98c9771b3d2748af0052b5efc697d5c1403c6473

@ -8,3 +8,4 @@ CHANGELOG
* added a session storage for Doctrine DBAL
* DoctrineOrmTypeGuesser now guesses "collection" for array Doctrine type
* DoctrineType now caches its choice lists in order to improve performance
* DoctrineType now uses ManagerRegistry::getManagerForClass() if the option "em" is not set

@ -55,19 +55,15 @@ abstract class DoctrineType extends AbstractType
$registry = $this->registry;
$type = $this;
$loader = function (Options $options) use ($type, $registry) {
$loader = function (Options $options) use ($type) {
if (null !== $options['query_builder']) {
$manager = $registry->getManager($options['em']);
return $type->getLoader($manager, $options['query_builder'], $options['class']);
return $type->getLoader($options['em'], $options['query_builder'], $options['class']);
}
return null;
};
$choiceList = function (Options $options) use ($registry, &$choiceListCache, &$time) {
$manager = $registry->getManager($options['em']);
$choiceList = function (Options $options) use (&$choiceListCache, &$time) {
// Support for closures
$propertyHash = is_object($options['property'])
? spl_object_hash($options['property'])
@ -96,7 +92,7 @@ abstract class DoctrineType extends AbstractType
: $options['group_by'];
$hash = md5(json_encode(array(
spl_object_hash($manager),
spl_object_hash($options['em']),
$options['class'],
$propertyHash,
$loaderHash,
@ -106,7 +102,7 @@ abstract class DoctrineType extends AbstractType
if (!isset($choiceListCache[$hash])) {
$choiceListCache[$hash] = new EntityChoiceList(
$manager,
$options['em'],
$options['class'],
$options['property'],
$options['loader'],
@ -118,6 +114,15 @@ abstract class DoctrineType extends AbstractType
return $choiceListCache[$hash];
};
$emFilter = function (Options $options, $em) use ($registry) {
/* @var ManagerRegistry $registry */
if (null !== $em) {
return $registry->getManager($em);
}
return $registry->getManagerForClass($options['class']);
};
$resolver->setDefaults(array(
'em' => null,
'class' => null,
@ -128,6 +133,10 @@ abstract class DoctrineType extends AbstractType
'choice_list' => $choiceList,
'group_by' => null,
));
$resolver->setFilters(array(
'em' => $emFilter,
));
}
/**

@ -32,8 +32,16 @@ class EntityTypeTest extends TypeTestCase
const COMPOSITE_IDENT_CLASS = 'Symfony\Bridge\Doctrine\Tests\Fixtures\CompositeIdentEntity';
const COMPOSITE_STRING_IDENT_CLASS = 'Symfony\Bridge\Doctrine\Tests\Fixtures\CompositeStringIdentEntity';
/**
* @var \Doctrine\ORM\EntityManager
*/
private $em;
/**
* @var \PHPUnit_Framework_MockObject_MockObject
*/
private $emRegistry;
protected function setUp()
{
if (!class_exists('Symfony\Component\Form\Form')) {
@ -53,6 +61,7 @@ class EntityTypeTest extends TypeTestCase
}
$this->em = DoctrineOrmTestCase::createTestEntityManager();
$this->emRegistry = $this->createRegistryMock('default', $this->em);
parent::setUp();
@ -86,7 +95,7 @@ class EntityTypeTest extends TypeTestCase
protected function getExtensions()
{
return array_merge(parent::getExtensions(), array(
new DoctrineOrmExtension($this->createRegistryMock('default', $this->em)),
new DoctrineOrmExtension($this->emRegistry),
));
}
@ -684,6 +693,23 @@ class EntityTypeTest extends TypeTestCase
$this->assertSame('0', $field->getClientData());
}
public function testGetManagerForClassIfNoEm()
{
$this->emRegistry->expects($this->never())
->method('getManager');
$this->emRegistry->expects($this->once())
->method('getManagerForClass')
->with(self::SINGLE_IDENT_CLASS)
->will($this->returnValue($this->em));
$this->factory->createNamed('name', 'entity', null, array(
'class' => self::SINGLE_IDENT_CLASS,
'required' => false,
'property' => 'name'
));
}
protected function createRegistryMock($name, $em)
{
$registry = $this->getMock('Doctrine\Common\Persistence\ManagerRegistry');

@ -28,7 +28,7 @@ class RedirectController extends ContainerAware
* It expects a route path parameter.
* By default, the response status code is 301.
*
* If the route empty, the status code will be 410.
* If the route is empty, the status code will be 410.
* If the permanent path parameter is set, the status code will be 302.
*
* @param string $route The route pattern to redirect to

File diff suppressed because it is too large Load Diff

@ -0,0 +1,149 @@
/*
Copyright (c) 2003-2011, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
*/
(function(){if(window.CKEDITOR&&window.CKEDITOR.dom)return;if(!window.CKEDITOR)window.CKEDITOR=(function(){var a={timestamp:'B8DJ5M3',version:'3.6.2',revision:'7275',_:{},status:'unloaded',basePath:(function(){var d=window.CKEDITOR_BASEPATH||'';if(!d){var e=document.getElementsByTagName('script');for(var f=0;f<e.length;f++){var g=e[f].src.match(/(^|.*[\\\/])ckeditor(?:_basic)?(?:_source)?.js(?:\?.*)?$/i);if(g){d=g[1];break;}}}if(d.indexOf(':/')==-1)if(d.indexOf('/')===0)d=location.href.match(/^.*?:\/\/[^\/]*/)[0]+d;else d=location.href.match(/^[^\?]*\/(?:)/)[0]+d;if(!d)throw 'The CKEditor installation path could not be automatically detected. Please set the global variable "CKEDITOR_BASEPATH" before creating editor instances.';return d;})(),getUrl:function(d){if(d.indexOf(':/')==-1&&d.indexOf('/')!==0)d=this.basePath+d;if(this.timestamp&&d.charAt(d.length-1)!='/'&&!/[&?]t=/.test(d))d+=(d.indexOf('?')>=0?'&':'?')+'t='+this.timestamp;return d;}},b=window.CKEDITOR_GETURL;if(b){var c=a.getUrl;a.getUrl=function(d){return b.call(a,d)||c.call(a,d);};}return a;})();var a=CKEDITOR;if(!a.event){a.event=function(){};a.event.implementOn=function(b){var c=a.event.prototype;for(var d in c){if(b[d]==undefined)b[d]=c[d];}};a.event.prototype=(function(){var b=function(d){var e=d.getPrivate&&d.getPrivate()||d._||(d._={});return e.events||(e.events={});},c=function(d){this.name=d;this.listeners=[];};c.prototype={getListenerIndex:function(d){for(var e=0,f=this.listeners;e<f.length;e++){if(f[e].fn==d)return e;}return-1;}};return{on:function(d,e,f,g,h){var i=b(this),j=i[d]||(i[d]=new c(d));if(j.getListenerIndex(e)<0){var k=j.listeners;if(!f)f=this;if(isNaN(h))h=10;var l=this,m=function(o,p,q,r){var s={name:d,sender:this,editor:o,data:p,listenerData:g,stop:q,cancel:r,removeListener:function(){l.removeListener(d,e);}};e.call(f,s);return s.data;};m.fn=e;m.priority=h;for(var n=k.length-1;n>=0;n--){if(k[n].priority<=h){k.splice(n+1,0,m);return;}}k.unshift(m);}},fire:(function(){var d=false,e=function(){d=true;},f=false,g=function(){f=true;};return function(h,i,j){var k=b(this)[h],l=d,m=f;d=f=false;if(k){var n=k.listeners;if(n.length){n=n.slice(0);for(var o=0;o<n.length;o++){var p=n[o].call(this,j,i,e,g);if(typeof p!='undefined')i=p;if(d||f)break;}}}var q=f||(typeof i=='undefined'?false:i);d=l;f=m;return q;};})(),fireOnce:function(d,e,f){var g=this.fire(d,e,f);delete b(this)[d];return g;},removeListener:function(d,e){var f=b(this)[d];if(f){var g=f.getListenerIndex(e);if(g>=0)f.listeners.splice(g,1);
}},hasListeners:function(d){var e=b(this)[d];return e&&e.listeners.length>0;}};})();}if(!a.editor){a.ELEMENT_MODE_NONE=0;a.ELEMENT_MODE_REPLACE=1;a.ELEMENT_MODE_APPENDTO=2;a.editor=function(b,c,d,e){var f=this;f._={instanceConfig:b,element:c,data:e};f.elementMode=d||0;a.event.call(f);f._init();};a.editor.replace=function(b,c){var d=b;if(typeof d!='object'){d=document.getElementById(b);if(d&&d.tagName.toLowerCase() in {style:1,script:1,base:1,link:1,meta:1,title:1})d=null;if(!d){var e=0,f=document.getElementsByName(b);while((d=f[e++])&&d.tagName.toLowerCase()!='textarea'){}}if(!d)throw '[CKEDITOR.editor.replace] The element with id or name "'+b+'" was not found.';}d.style.visibility='hidden';return new a.editor(c,d,1);};a.editor.appendTo=function(b,c,d){var e=b;if(typeof e!='object'){e=document.getElementById(b);if(!e)throw '[CKEDITOR.editor.appendTo] The element with id "'+b+'" was not found.';}return new a.editor(c,e,2,d);};a.editor.prototype={_init:function(){var b=a.editor._pending||(a.editor._pending=[]);b.push(this);},fire:function(b,c){return a.event.prototype.fire.call(this,b,c,this);},fireOnce:function(b,c){return a.event.prototype.fireOnce.call(this,b,c,this);}};a.event.implementOn(a.editor.prototype,true);}if(!a.env)a.env=(function(){var b=navigator.userAgent.toLowerCase(),c=window.opera,d={ie:/*@cc_on!@*/false,opera:!!c&&c.version,webkit:b.indexOf(' applewebkit/')>-1,air:b.indexOf(' adobeair/')>-1,mac:b.indexOf('macintosh')>-1,quirks:document.compatMode=='BackCompat',mobile:b.indexOf('mobile')>-1,iOS:/(ipad|iphone|ipod)/.test(b),isCustomDomain:function(){if(!this.ie)return false;var g=document.domain,h=window.location.hostname;return g!=h&&g!='['+h+']';},secure:location.protocol=='https:'};d.gecko=navigator.product=='Gecko'&&!d.webkit&&!d.opera;var e=0;if(d.ie){e=parseFloat(b.match(/msie (\d+)/)[1]);d.ie8=!!document.documentMode;d.ie8Compat=document.documentMode==8;d.ie9Compat=document.documentMode==9;d.ie7Compat=e==7&&!document.documentMode||document.documentMode==7;d.ie6Compat=e<7||d.quirks;}if(d.gecko){var f=b.match(/rv:([\d\.]+)/);if(f){f=f[1].split('.');e=f[0]*10000+(f[1]||0)*100+ +(f[2]||0);}}if(d.opera)e=parseFloat(c.version());if(d.air)e=parseFloat(b.match(/ adobeair\/(\d+)/)[1]);if(d.webkit)e=parseFloat(b.match(/ applewebkit\/(\d+)/)[1]);d.version=e;d.isCompatible=d.iOS&&e>=534||!d.mobile&&(d.ie&&e>=6||d.gecko&&e>=10801||d.opera&&e>=9.5||d.air&&e>=1||d.webkit&&e>=522||false);d.cssClass='cke_browser_'+(d.ie?'ie':d.gecko?'gecko':d.opera?'opera':d.webkit?'webkit':'unknown');
if(d.quirks)d.cssClass+=' cke_browser_quirks';if(d.ie){d.cssClass+=' cke_browser_ie'+(d.version<7?'6':d.version>=8?document.documentMode:'7');if(d.quirks)d.cssClass+=' cke_browser_iequirks';}if(d.gecko&&e<10900)d.cssClass+=' cke_browser_gecko18';if(d.air)d.cssClass+=' cke_browser_air';return d;})();var b=a.env;var c=b.ie;if(a.status=='unloaded')(function(){a.event.implementOn(a);a.loadFullCore=function(){if(a.status!='basic_ready'){a.loadFullCore._load=1;return;}delete a.loadFullCore;var e=document.createElement('script');e.type='text/javascript';e.src=a.basePath+'ckeditor.js';document.getElementsByTagName('head')[0].appendChild(e);};a.loadFullCoreTimeout=0;a.replaceClass='ckeditor';a.replaceByClassEnabled=1;var d=function(e,f,g,h){if(b.isCompatible){if(a.loadFullCore)a.loadFullCore();var i=g(e,f,h);a.add(i);return i;}return null;};a.replace=function(e,f){return d(e,f,a.editor.replace);};a.appendTo=function(e,f,g){return d(e,f,a.editor.appendTo,g);};a.add=function(e){var f=this._.pending||(this._.pending=[]);f.push(e);};a.replaceAll=function(){var e=document.getElementsByTagName('textarea');for(var f=0;f<e.length;f++){var g=null,h=e[f];if(!h.name&&!h.id)continue;if(typeof arguments[0]=='string'){var i=new RegExp('(?:^|\\s)'+arguments[0]+'(?:$|\\s)');if(!i.test(h.className))continue;}else if(typeof arguments[0]=='function'){g={};if(arguments[0](h,g)===false)continue;}this.replace(h,g);}};(function(){var e=function(){var f=a.loadFullCore,g=a.loadFullCoreTimeout;if(a.replaceByClassEnabled)a.replaceAll(a.replaceClass);a.status='basic_ready';if(f&&f._load)f();else if(g)setTimeout(function(){if(a.loadFullCore)a.loadFullCore();},g*1000);};if(window.addEventListener)window.addEventListener('load',e,false);else if(window.attachEvent)window.attachEvent('onload',e);})();a.status='basic_loaded';})();a.dom={};var d=a.dom;(function(){var e=[];a.on('reset',function(){e=[];});a.tools={arrayCompare:function(f,g){if(!f&&!g)return true;if(!f||!g||f.length!=g.length)return false;for(var h=0;h<f.length;h++){if(f[h]!=g[h])return false;}return true;},clone:function(f){var g;if(f&&f instanceof Array){g=[];for(var h=0;h<f.length;h++)g[h]=this.clone(f[h]);return g;}if(f===null||typeof f!='object'||f instanceof String||f instanceof Number||f instanceof Boolean||f instanceof Date||f instanceof RegExp)return f;g=new f.constructor();for(var i in f){var j=f[i];g[i]=this.clone(j);}return g;},capitalize:function(f){return f.charAt(0).toUpperCase()+f.substring(1).toLowerCase();},extend:function(f){var g=arguments.length,h,i;
if(typeof (h=arguments[g-1])=='boolean')g--;else if(typeof (h=arguments[g-2])=='boolean'){i=arguments[g-1];g-=2;}for(var j=1;j<g;j++){var k=arguments[j];for(var l in k){if(h===true||f[l]==undefined)if(!i||l in i)f[l]=k[l];}}return f;},prototypedCopy:function(f){var g=function(){};g.prototype=f;return new g();},isArray:function(f){return!!f&&f instanceof Array;},isEmpty:function(f){for(var g in f){if(f.hasOwnProperty(g))return false;}return true;},cssStyleToDomStyle:(function(){var f=document.createElement('div').style,g=typeof f.cssFloat!='undefined'?'cssFloat':typeof f.styleFloat!='undefined'?'styleFloat':'float';return function(h){if(h=='float')return g;else return h.replace(/-./g,function(i){return i.substr(1).toUpperCase();});};})(),buildStyleHtml:function(f){f=[].concat(f);var g,h=[];for(var i=0;i<f.length;i++){g=f[i];if(/@import|[{}]/.test(g))h.push('<style>'+g+'</style>');else h.push('<link type="text/css" rel=stylesheet href="'+g+'">');}return h.join('');},htmlEncode:function(f){var g=function(k){var l=new d.element('span');l.setText(k);return l.getHtml();},h=g('\n').toLowerCase()=='<br>'?function(k){return g(k).replace(/<br>/gi,'\n');}:g,i=g('>')=='>'?function(k){return h(k).replace(/>/g,'&gt;');}:h,j=g(' ')=='&nbsp; '?function(k){return i(k).replace(/&nbsp;/g,' ');}:i;this.htmlEncode=j;return this.htmlEncode(f);},htmlEncodeAttr:function(f){return f.replace(/"/g,'&quot;').replace(/</g,'&lt;').replace(/>/g,'&gt;');},getNextNumber:(function(){var f=0;return function(){return++f;};})(),getNextId:function(){return 'cke_'+this.getNextNumber();},override:function(f,g){return g(f);},setTimeout:function(f,g,h,i,j){if(!j)j=window;if(!h)h=j;return j.setTimeout(function(){if(i)f.apply(h,[].concat(i));else f.apply(h);},g||0);},trim:(function(){var f=/(?:^[ \t\n\r]+)|(?:[ \t\n\r]+$)/g;return function(g){return g.replace(f,'');};})(),ltrim:(function(){var f=/^[ \t\n\r]+/g;return function(g){return g.replace(f,'');};})(),rtrim:(function(){var f=/[ \t\n\r]+$/g;return function(g){return g.replace(f,'');};})(),indexOf:Array.prototype.indexOf?function(f,g){return f.indexOf(g);}:function(f,g){for(var h=0,i=f.length;h<i;h++){if(f[h]===g)return h;}return-1;},bind:function(f,g){return function(){return f.apply(g,arguments);};},createClass:function(f){var g=f.$,h=f.base,i=f.privates||f._,j=f.proto,k=f.statics;if(i){var l=g;g=function(){var p=this;var m=p._||(p._={});for(var n in i){var o=i[n];m[n]=typeof o=='function'?a.tools.bind(o,p):o;}l.apply(p,arguments);};}if(h){g.prototype=this.prototypedCopy(h.prototype);
g.prototype['constructor']=g;g.prototype.base=function(){this.base=h.prototype.base;h.apply(this,arguments);this.base=arguments.callee;};}if(j)this.extend(g.prototype,j,true);if(k)this.extend(g,k,true);return g;},addFunction:function(f,g){return e.push(function(){return f.apply(g||this,arguments);})-1;},removeFunction:function(f){e[f]=null;},callFunction:function(f){var g=e[f];return g&&g.apply(window,Array.prototype.slice.call(arguments,1));},cssLength:(function(){return function(f){return f+(!f||isNaN(Number(f))?'':'px');};})(),convertToPx:(function(){var f;return function(g){if(!f){f=d.element.createFromHtml('<div style="position:absolute;left:-9999px;top:-9999px;margin:0px;padding:0px;border:0px;"></div>',a.document);a.document.getBody().append(f);}if(!/%$/.test(g)){f.setStyle('width',g);return f.$.clientWidth;}return g;};})(),repeat:function(f,g){return new Array(g+1).join(f);},tryThese:function(){var f;for(var g=0,h=arguments.length;g<h;g++){var i=arguments[g];try{f=i();break;}catch(j){}}return f;},genKey:function(){return Array.prototype.slice.call(arguments).join('-');}};})();var e=a.tools;a.dtd=(function(){var f=e.extend,g={isindex:1,fieldset:1},h={input:1,button:1,select:1,textarea:1,label:1},i=f({a:1},h),j=f({iframe:1},i),k={hr:1,ul:1,menu:1,div:1,section:1,header:1,footer:1,nav:1,article:1,aside:1,figure:1,dialog:1,hgroup:1,mark:1,time:1,meter:1,command:1,keygen:1,output:1,progress:1,audio:1,video:1,details:1,datagrid:1,datalist:1,blockquote:1,noscript:1,table:1,center:1,address:1,dir:1,pre:1,h5:1,dl:1,h4:1,noframes:1,h6:1,ol:1,h1:1,h3:1,h2:1},l={ins:1,del:1,script:1,style:1},m=f({b:1,acronym:1,bdo:1,'var':1,'#':1,abbr:1,code:1,br:1,i:1,cite:1,kbd:1,u:1,strike:1,s:1,tt:1,strong:1,q:1,samp:1,em:1,dfn:1,span:1,wbr:1},l),n=f({sub:1,img:1,object:1,sup:1,basefont:1,map:1,applet:1,font:1,big:1,small:1,mark:1},m),o=f({p:1},n),p=f({iframe:1},n,h),q={img:1,noscript:1,br:1,kbd:1,center:1,button:1,basefont:1,h5:1,h4:1,samp:1,h6:1,ol:1,h1:1,h3:1,h2:1,form:1,font:1,'#':1,select:1,menu:1,ins:1,abbr:1,label:1,code:1,table:1,script:1,cite:1,input:1,iframe:1,strong:1,textarea:1,noframes:1,big:1,small:1,span:1,hr:1,sub:1,bdo:1,'var':1,div:1,section:1,header:1,footer:1,nav:1,article:1,aside:1,figure:1,dialog:1,hgroup:1,mark:1,time:1,meter:1,menu:1,command:1,keygen:1,output:1,progress:1,audio:1,video:1,details:1,datagrid:1,datalist:1,object:1,sup:1,strike:1,dir:1,map:1,dl:1,applet:1,del:1,isindex:1,fieldset:1,ul:1,b:1,acronym:1,a:1,blockquote:1,i:1,u:1,s:1,tt:1,address:1,q:1,pre:1,p:1,em:1,dfn:1},r=f({a:1},p),s={tr:1},t={'#':1},u=f({param:1},q),v=f({form:1},g,j,k,o),w={li:1},x={style:1,script:1},y={base:1,link:1,meta:1,title:1},z=f(y,x),A={head:1,body:1},B={html:1},C={address:1,blockquote:1,center:1,dir:1,div:1,section:1,header:1,footer:1,nav:1,article:1,aside:1,figure:1,dialog:1,hgroup:1,time:1,meter:1,menu:1,command:1,keygen:1,output:1,progress:1,audio:1,video:1,details:1,datagrid:1,datalist:1,dl:1,fieldset:1,form:1,h1:1,h2:1,h3:1,h4:1,h5:1,h6:1,hr:1,isindex:1,noframes:1,ol:1,p:1,pre:1,table:1,ul:1};
return{$nonBodyContent:f(B,A,y),$block:C,$blockLimit:{body:1,div:1,section:1,header:1,footer:1,nav:1,article:1,aside:1,figure:1,dialog:1,hgroup:1,time:1,meter:1,menu:1,command:1,keygen:1,output:1,progress:1,audio:1,video:1,details:1,datagrid:1,datalist:1,td:1,th:1,caption:1,form:1},$inline:r,$body:f({script:1,style:1},C),$cdata:{script:1,style:1},$empty:{area:1,base:1,br:1,col:1,hr:1,img:1,input:1,link:1,meta:1,param:1,wbr:1},$listItem:{dd:1,dt:1,li:1},$list:{ul:1,ol:1,dl:1},$nonEditable:{applet:1,button:1,embed:1,iframe:1,map:1,object:1,option:1,script:1,textarea:1,param:1,audio:1,video:1},$captionBlock:{caption:1,legend:1},$removeEmpty:{abbr:1,acronym:1,address:1,b:1,bdo:1,big:1,cite:1,code:1,del:1,dfn:1,em:1,font:1,i:1,ins:1,label:1,kbd:1,q:1,s:1,samp:1,small:1,span:1,strike:1,strong:1,sub:1,sup:1,tt:1,u:1,'var':1,mark:1},$tabIndex:{a:1,area:1,button:1,input:1,object:1,select:1,textarea:1},$tableContent:{caption:1,col:1,colgroup:1,tbody:1,td:1,tfoot:1,th:1,thead:1,tr:1},html:A,head:z,style:t,script:t,body:v,base:{},link:{},meta:{},title:t,col:{},tr:{td:1,th:1},img:{},colgroup:{col:1},noscript:v,td:v,br:{},wbr:{},th:v,center:v,kbd:r,button:f(o,k),basefont:{},h5:r,h4:r,samp:r,h6:r,ol:w,h1:r,h3:r,option:t,h2:r,form:f(g,j,k,o),select:{optgroup:1,option:1},font:r,ins:r,menu:w,abbr:r,label:r,table:{thead:1,col:1,tbody:1,tr:1,colgroup:1,caption:1,tfoot:1},code:r,tfoot:s,cite:r,li:v,input:{},iframe:v,strong:r,textarea:t,noframes:v,big:r,small:r,span:r,hr:{},dt:r,sub:r,optgroup:{option:1},param:{},bdo:r,'var':r,div:v,object:u,sup:r,dd:v,strike:r,area:{},dir:w,map:f({area:1,form:1,p:1},g,l,k),applet:u,dl:{dt:1,dd:1},del:r,isindex:{},fieldset:f({legend:1},q),thead:s,ul:w,acronym:r,b:r,a:p,blockquote:v,caption:r,i:r,u:r,tbody:s,s:r,address:f(j,o),tt:r,legend:r,q:r,pre:f(m,i),p:r,em:r,dfn:r,section:v,header:v,footer:v,nav:v,article:v,aside:v,figure:v,dialog:v,hgroup:v,mark:r,time:r,meter:r,menu:r,command:r,keygen:r,output:r,progress:u,audio:u,video:u,details:u,datagrid:u,datalist:u};})();var f=a.dtd;d.event=function(g){this.$=g;};d.event.prototype={getKey:function(){return this.$.keyCode||this.$.which;},getKeystroke:function(){var h=this;var g=h.getKey();if(h.$.ctrlKey||h.$.metaKey)g+=1114112;if(h.$.shiftKey)g+=2228224;if(h.$.altKey)g+=4456448;return g;},preventDefault:function(g){var h=this.$;if(h.preventDefault)h.preventDefault();else h.returnValue=false;if(g)this.stopPropagation();},stopPropagation:function(){var g=this.$;if(g.stopPropagation)g.stopPropagation();else g.cancelBubble=true;
},getTarget:function