Author: ornicar2
Date: 2010-01-18 14:45:45 +0100 (Mon, 18 Jan 2010)
New Revision: 26812
Modified:
plugins/dmCkEditorPlugin/config/dmCkEditorPluginConfiguration.class.php
plugins/dmCkEditorPlugin/lib/dmWidget/dmWidgetContentCkEditorForm.php
plugins/dmCkEditorPlugin/web/js/front/widgetForm.js
Log:
[Diem][dmCkEditorPlugin]
- enhanced asynchronous assets inclusion
- declared CKEDITOR_BASEPATH
Modified:
plugins/dmCkEditorPlugin/config/dmCkEditorPluginConfiguration.class.php
===================================================================
--- plugins/dmCkEditorPlugin/config/dmCkEditorPluginConfiguration.class.php
2010-01-18 13:39:26 UTC (rev 26811)
+++ plugins/dmCkEditorPlugin/config/dmCkEditorPluginConfiguration.class.php
2010-01-18 13:45:45 UTC (rev 26812)
@@ -15,7 +15,7 @@
public function listenToContextLoadedEvent(sfEvent $e)
{
- if ($this->configuration instanceof dmAdminApplicationConfiguration ||
true)
+ if ($this->configuration instanceof dmAdminApplicationConfiguration)
{
$e->getSubject()->getResponse()
->addJavascript('dmCkEditorPlugin.adminLauncher')
Modified: plugins/dmCkEditorPlugin/lib/dmWidget/dmWidgetContentCkEditorForm.php
===================================================================
--- plugins/dmCkEditorPlugin/lib/dmWidget/dmWidgetContentCkEditorForm.php
2010-01-18 13:39:26 UTC (rev 26811)
+++ plugins/dmCkEditorPlugin/lib/dmWidget/dmWidgetContentCkEditorForm.php
2010-01-18 13:45:45 UTC (rev 26812)
@@ -6,18 +6,26 @@
public function configure()
{
parent::configure();
-
- $this->addRequiredStylesheet(array(
- 'dmCkEditorPlugin.widgetForm'
- ));
- $this->addRequiredJavascript(array(
- 'dmCkEditorPlugin.widgetForm'
- ));
$this->widgetSchema['html'] = new sfWidgetFormTextareaDmCkEditor();
$this->validatorSchema['html'] = new sfValidatorString();
}
+ public function getStylesheets()
+ {
+ return array_merge(parent::getStylesheets(), array(
+ 'dmCkEditorPlugin.widgetForm'
+ ));
+ }
+
+ public function getJavascripts()
+ {
+ $javascripts = parent::getJavascripts();
+ array_unshift($javascripts, 'dmCkEditorPlugin.widgetForm');
+
+ return $javascripts;
+ }
+
protected function renderContent($attributes)
{
$h = $this->getHelper();
@@ -25,18 +33,6 @@
return $h->£('ul.dm_form_elements',
$h->£('li.dm_form_element.clearfix', $this['html']->field()->error()).
$this['cssClass']->renderRow()
- ).$this->includeJavascripts();
+ );
}
-
- protected function includeJavascripts()
- {
- $html = '';
-
- foreach($this->widgetSchema['html']->getJavascripts() as $javascript)
- {
- $html .= sprintf('<script type="text/javascript" src="%s" />',
$this->getHelper()->getJavascriptWebPath($javascript));
- }
-
- return $html;
- }
}
\ No newline at end of file
Modified: plugins/dmCkEditorPlugin/web/js/front/widgetForm.js
===================================================================
--- plugins/dmCkEditorPlugin/web/js/front/widgetForm.js 2010-01-18 13:39:26 UTC
(rev 26811)
+++ plugins/dmCkEditorPlugin/web/js/front/widgetForm.js 2010-01-18 13:45:45 UTC
(rev 26812)
@@ -10,4 +10,6 @@
$this.ckeditor(options);
});
}
-});
\ No newline at end of file
+});
+
+window.CKEDITOR_BASEPATH =
dm_configuration.relative_url_root+'/dmCkEditorPlugin/js/ckeditor/';
\ No newline at end of file
--
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.