Author: ornicar2
Date: 2010-02-03 21:08:47 +0100 (Wed, 03 Feb 2010)
New Revision: 27512

Modified:
   plugins/diemPlugin/trunk/dmAdminPlugin/web/js/dmAdminForm.js
Log:
[Diem]
- admin markdown editor and preview scrolls are synced when at the bottom

Modified: plugins/diemPlugin/trunk/dmAdminPlugin/web/js/dmAdminForm.js
===================================================================
--- plugins/diemPlugin/trunk/dmAdminPlugin/web/js/dmAdminForm.js        
2010-02-03 19:39:44 UTC (rev 27511)
+++ plugins/diemPlugin/trunk/dmAdminPlugin/web/js/dmAdminForm.js        
2010-02-03 20:08:47 UTC (rev 27512)
@@ -59,6 +59,14 @@
 
         var $container = $editor.closest('div.markItUpContainer');
 
+        $editor.bind('scroll', function()
+        {
+          if($editor.scrollTop()+$editor.height() == $editor[0].scrollHeight)
+          {
+            $preview.scrollTop($preview[0].scrollHeight - $preview.height());
+          }
+        });
+
         var resize = function()
         {
           $preview.height($container.innerHeight() - 13);

-- 
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.

Reply via email to