Author: ornicar2
Date: 2010-01-19 22:44:43 +0100 (Tue, 19 Jan 2010)
New Revision: 26902

Modified:
   
plugins/diemPlugin/trunk/dmFrontPlugin/modules/dmZone/actions/actions.class.php
   plugins/diemPlugin/trunk/dmFrontPlugin/web/js/page/dmZone.js
Log:
[Diem]
- fixed javascript warning when cancel edition on a zone without css class
- aesthetical changes in zone actions class

Modified: 
plugins/diemPlugin/trunk/dmFrontPlugin/modules/dmZone/actions/actions.class.php
===================================================================
--- 
plugins/diemPlugin/trunk/dmFrontPlugin/modules/dmZone/actions/actions.class.php 
    2010-01-19 20:31:44 UTC (rev 26901)
+++ 
plugins/diemPlugin/trunk/dmFrontPlugin/modules/dmZone/actions/actions.class.php 
    2010-01-19 21:44:43 UTC (rev 26902)
@@ -9,10 +9,10 @@
       $this->zone = 
dmDb::table('DmZone')->find($request->getParameter('zone_id'))
     );
 
-    $this->getServiceContainer()->setParameter('zone_form.object', 
$this->zone);
-    $this->form = $this->context->get('zone_form');
-    
-    $this->form->removeCsrfProtection();
+    $this->form = $this->getServiceContainer()
+    ->setParameter('zone_form.object', $this->zone)
+    ->getService('zone_form')
+    ->removeCsrfProtection();
 
     if ($request->isMethod('post') && $this->form->bindAndValid($request))
     {
@@ -76,9 +76,7 @@
 
     $zone = dmDb::create('DmZone')->fromArray(array('dm_area_id' => 
$toArea->id))->saveGet();
 
-    $helper = $this->context->get('page_helper');
-
-    return $this->renderText($helper->renderZone($zone->toArray(), true));
+    return 
$this->renderText($this->getService('page_helper')->renderZone($zone->toArray(),
 true));
   }
 
   public function executeMove(sfWebRequest $request)

Modified: plugins/diemPlugin/trunk/dmFrontPlugin/web/js/page/dmZone.js
===================================================================
--- plugins/diemPlugin/trunk/dmFrontPlugin/web/js/page/dmZone.js        
2010-01-19 20:31:44 UTC (rev 26901)
+++ plugins/diemPlugin/trunk/dmFrontPlugin/web/js/page/dmZone.js        
2010-01-19 21:44:43 UTC (rev 26902)
@@ -52,7 +52,7 @@
             url:      $.dm.ctrl.getHref('+/dmZone/getAttributes'),
             data:     { zone_id: zone.getId() },
             success:  function(datas) {
-              zone.element.attr('class', 'dm_zone '+ datas[1].replace(/\./g, ' 
')).css('width', datas[0]);
+              zone.element.attr('class', 'dm_zone '+ (datas[1] || 
"").replace(/\./g, ' ')).css('width', datas[0]);
             }
           });
         }, 100);

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