Author: ornicar2
Date: 2010-02-08 11:45:28 +0100 (Mon, 08 Feb 2010)
New Revision: 27723

Modified:
   plugins/diemPlugin/trunk/dmFrontPlugin/web/js/page/dmZone.js
Log:
[Diem]
- simplified dmZone.js

Modified: plugins/diemPlugin/trunk/dmFrontPlugin/web/js/page/dmZone.js
===================================================================
--- plugins/diemPlugin/trunk/dmFrontPlugin/web/js/page/dmZone.js        
2010-02-08 10:44:12 UTC (rev 27722)
+++ plugins/diemPlugin/trunk/dmFrontPlugin/web/js/page/dmZone.js        
2010-02-08 10:45:28 UTC (rev 27723)
@@ -4,29 +4,23 @@
 
   _init : function()
   {
-    var self = this;
-    
-    self.initialize();
+    this.initialize();
   },
   
   initialize: function()
   {
-    this.id = this.element.attr('id').substring(8);
+    var self = this;
     
-    this.initWidgets();
+    self.id = self.element.attr('id').substring(8);
     
-    this.initEdit();
-  },
-  
-  initEdit: function()
-  {
-    var zone = this;
+    self.initWidgets();
     
-    $('a.dm_zone_edit', this.element).bind('click', function() {
-      if (zone.element.hasClass('dm_dragging')) {
-        return false;
+    $('a.dm_zone_edit', self.element).bind('click', function()
+    {
+      if (!self.element.hasClass('dm_dragging'))
+      {
+        self.openEditDialog();
       }
-      zone.openEditDialog();
     });
   },
        
@@ -44,7 +38,8 @@
       data:     { zone_id: zone.getId() },
       title:    $('#dm_zone_'+zone.getId()+' > a.dm_zone_edit').attr('title'),
                        'class':  dialog_class,
-      beforeClose:  function() {
+      beforeClose:  function()
+      {
         if (zone.deleted) return;
         setTimeout(function() {
           $.ajax({
@@ -57,7 +52,8 @@
           });
         }, 100);
       }
-    }).bind('dmAjaxResponse', function() {
+    }).bind('dmAjaxResponse', function()
+    {
       $dialog.prepare();
       /*
        * Apply generic front form abilities

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