Author: jablko
Date: Thu Oct 21 21:30:35 2010
New Revision: 8360

Log:
Simplify

Modified:
   trunk/js/dialog.js

Modified: trunk/js/dialog.js
==============================================================================
--- trunk/js/dialog.js  Thu Oct 21 21:14:08 2010        (r8359)
+++ trunk/js/dialog.js  Thu Oct 21 21:30:35 2010        (r8360)
@@ -234,31 +234,25 @@
             return this.fields[fname];
           }
 
-        this.open = function ()
+        this.open = function (id)
           {
-            if (undefined == arguments[0])
+            this.id = id;
+            if (undefined == this.id)
             {
-              // If no "id" passed as argument then create unique id and skip 
the
-              // data load
+              // If no "id" passed as argument then create unique id and skip
+              // the data load
               this.id = 'new' + this.instances++;
-            }
-            else
-            {
-              this.id = arguments[0];
-            }
 
-            if (!arguments.length)
-            {
               this.yuiDialog.show();
               this.yuiDialog.focusFirst();
+
+              return;
             }
-            else
-            {
-              this.loadData(this.id, function ()
-                {
-                  thisDialog.yuiDialog.show();
-                });
-            }
+
+            this.loadData(this.id, function ()
+              {
+                thisDialog.yuiDialog.show();
+              });
           }
 
         this.loadData = function (id, callback)

-- 
You received this message because you are subscribed to the Google Groups 
"Qubit Toolkit Commits" 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/qubit-commits?hl=en.

Reply via email to