Author: Jonathan.Wage
Date: 2010-01-12 22:01:38 +0100 (Tue, 12 Jan 2010)
New Revision: 26548
Modified:
plugins/sfSympalPlugin/trunk/lib/cache/sfSympalSuperCache.class.php
plugins/sfSympalPlugin/trunk/lib/core/sfSympalConfiguration.class.php
plugins/sfSympalPlugin/trunk/lib/plugins/sfSympalFrontendEditorPlugin/modules/sympal_editor/templates/_editor.php
Log:
[1.4][sfSympalPlugin][1.0] Fixing cache clearing for web directory and fixing
jumpyness of inline editor javascript
Modified: plugins/sfSympalPlugin/trunk/lib/cache/sfSympalSuperCache.class.php
===================================================================
--- plugins/sfSympalPlugin/trunk/lib/cache/sfSympalSuperCache.class.php
2010-01-12 20:31:06 UTC (rev 26547)
+++ plugins/sfSympalPlugin/trunk/lib/cache/sfSympalSuperCache.class.php
2010-01-12 21:01:38 UTC (rev 26548)
@@ -9,17 +9,6 @@
$this->_sympalConfiguration = $sympalConfiguration;
}
- public function listenToTaskCacheClear(sfEvent $event)
- {
- $event->getSubject()->logSection('sympal', 'Clearing Sympal super cache');
-
- $cacheDir = sfConfig::get('sf_web_dir').'/cache';
- if (is_dir($cacheDir))
- {
-
$event->getSubject()->getFilesystem()->remove(sfFinder::type('file')->ignore_version_control()->discard('.sf')->in($cacheDir));
- }
- }
-
public function listenToResponseFilterContent(sfEvent $event, $content)
{
$symfonyContext =
$this->_sympalConfiguration->getSympalContext()->getSymfonyContext();
Modified: plugins/sfSympalPlugin/trunk/lib/core/sfSympalConfiguration.class.php
===================================================================
--- plugins/sfSympalPlugin/trunk/lib/core/sfSympalConfiguration.class.php
2010-01-12 20:31:06 UTC (rev 26547)
+++ plugins/sfSympalPlugin/trunk/lib/core/sfSympalConfiguration.class.php
2010-01-12 21:01:38 UTC (rev 26548)
@@ -46,15 +46,27 @@
{
$superCache = new sfSympalSuperCache($this);
$this->_dispatcher->connect('response.filter_content',
array($superCache, 'listenToResponseFilterContent'));
- $this->_dispatcher->connect('task.cache.clear', array($superCache,
'listenToTaskCacheClear'));
}
+ $this->_dispatcher->connect('task.cache.clear', array($this,
'listenToTaskCacheClear'));
+
Doctrine_Manager::getInstance()->setAttribute(Doctrine_Core::ATTR_HYDRATE_OVERWRITE,
false);
Doctrine_Manager::getInstance()->setAttribute(Doctrine_Core::ATTR_TABLE_CLASS,
'sfSympalDoctrineTable');
Doctrine_Manager::getInstance()->setAttribute(Doctrine_Core::ATTR_QUERY_CLASS,
'sfSympalDoctrineQuery');
Doctrine_Manager::getInstance()->setAttribute(Doctrine_Core::ATTR_COLLECTION_CLASS,
'sfSympalDoctrineCollection');
}
+ public function listenToTaskCacheClear(sfEvent $event)
+ {
+ $event->getSubject()->logSection('sympal', 'Clearing Sympal super cache');
+
+ $cacheDir = sfConfig::get('sf_web_dir').'/cache';
+ if (is_dir($cacheDir))
+ {
+
$event->getSubject()->getFilesystem()->remove(sfFinder::type('file')->ignore_version_control()->discard('.sf')->in($cacheDir));
+ }
+ }
+
public function listenToRoutingLoadConfiguration(sfEvent $event)
{
// Append route at end to catch all
Modified:
plugins/sfSympalPlugin/trunk/lib/plugins/sfSympalFrontendEditorPlugin/modules/sympal_editor/templates/_editor.php
===================================================================
---
plugins/sfSympalPlugin/trunk/lib/plugins/sfSympalFrontendEditorPlugin/modules/sympal_editor/templates/_editor.php
2010-01-12 20:31:06 UTC (rev 26547)
+++
plugins/sfSympalPlugin/trunk/lib/plugins/sfSympalFrontendEditorPlugin/modules/sympal_editor/templates/_editor.php
2010-01-12 21:01:38 UTC (rev 26548)
@@ -5,6 +5,28 @@
</div>
<?php endif; ?>
+<style type="text/css">
+<?php if ($sf_request->getCookie('sympal_inline_edit_mode') == 'true'): ?>
+ .sympal_inline_edit_bar_buttons
+ {
+ display: normal;
+ }
+ .toggle_edit_mode
+ {
+ display: none;
+ }
+<?php else: ?>
+ .sympal_inline_edit_bar_buttons
+ {
+ display: none;
+ }
+ .toggle_edit_mode
+ {
+ display: normal;
+ }
+<?php endif; ?>
+</style>
+
<div class="sympal_inline_edit_bar_container">
<div class="sympal_inline_edit_bar sympal_form">
<ul>
--
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.