send extra argument to dialog show method.
authorAlan Knowles <alan@roojs.com>
Thu, 11 Feb 2021 04:40:01 +0000 (12:40 +0800)
committerAlan Knowles <alan@roojs.com>
Thu, 11 Feb 2021 04:40:01 +0000 (12:40 +0800)
src/JsRender/Roo.vala

index 630543b..290591f 100644 (file)
@@ -569,7 +569,7 @@ namespace JsRender {
                 " dialog : false,",
                 " callback:  false,",
                 "",   
-                " show : function(data, cb, opts)",
+                " show : function(data, cb)",
                 " {",
                 "  if (!this.dialog) {",
                 "   this.create();",
@@ -577,7 +577,7 @@ namespace JsRender {
                 "",
                 "  this.callback = cb;",
                 "  this.data = data;",
-                "  this.dialog.show(this.data._el, opts);",
+                "  this.dialog.show.apply(this.dialog,  Array.prototype.slice.call(arguments).slice(2));",
                 "  if (this.form) {",
                 "   this.form.reset();",
                 "   this.form.setValues(data);",
@@ -640,7 +640,7 @@ namespace JsRender {
                 " dialog : false,",
                 " callback:  false,",
                 "",   
-                " show : function(data, cb, opts)",
+                " show : function(data, cb)",
                 " {",
                 "  if (!this.dialog) {",
                 "   this.create();",
@@ -648,7 +648,7 @@ namespace JsRender {
                 "",
                 "  this.callback = cb;",
                 "  this.data = data;",
-                "  this.dialog.show(this.data._el, opts);",
+                "  this.dialog.show.apply(this.dialog,  Array.prototype.slice.call(arguments).slice(2));",
                 "  if (this.form) {",
                 "   this.form.reset();",
                 "   this.form.setValues(data);",