[Xsltforms-support] Xsltforms minor fix
Brought to you by:
alain-couthures
From: Javier D. <jd...@tc...> - 2015-03-05 08:20:23
|
Hello, another change (i don't know if it is a better way to share this than using this maillist). When a get submission is done where instance parameters are passed in url, if xsltforms instance is empty (because form is still empty), no data is appended to url but the separator is always included at the end of url. It is necessary to validate if there is any data to avoid include the separator when it isn't needed: $ svn diff xsltforms.js Index: xsltforms.js =================================================================== --- xsltforms.js (revisión: 610) +++ xsltforms.js (copia de trabajo) @@ -8090,8 +8090,10 @@ } if ((method === "get" || method === "delete") && this.serialization !== "none" && action.substr(0, 9) !== "opener://" && action.substr(0, 8) !== "local://") { var tourl = XsltForms_submission.toUrl_(node, this.separator); - action += (action.indexOf('?') === -1? '?' : this.separator) + + if (tourl.length > 0) { + action += (action.indexOf('?') === -1? '?' : this.separator) + tourl.substr(0, tourl.length - this.separator.length); + } } } var ser = ""; |