commit 8233cc4566d3f63b93462ec8a2c33434cb4064e0
parent 6830b5896a9031493bdd112622e1409077201304
Author: Alexander Burger <abu@software-lab.de>
Date: Thu, 1 Dec 2011 16:37:15 +0100
Changed jsHint post from URL to data
Diffstat:
2 files changed, 9 insertions(+), 9 deletions(-)
diff --git a/lib/form.js b/lib/form.js
@@ -1,4 +1,4 @@
-/* 30nov11abu
+/* 01dec11abu
* (c) Software Lab. Alexander Burger
*/
@@ -372,8 +372,7 @@ function hintKey(field, event, tok, coy) {
((i = field.form.action.indexOf("~")) <= 0? "" :
field.form.action.substr(0, i+1) ) +
((i = field.id.lastIndexOf("-")) < 0? "!jsHint?$" + field.id :
- "!jsHint?+" + field.id.substr(i+1) ) +
- "&" + encodeURIComponent(field.value.substring(Beg, End)) );
+ "!jsHint?+" + field.id.substr(i+1) ) );
}
catch (e) {return true;}
HintReq.onreadystatechange = function() {
@@ -398,11 +397,12 @@ function hintKey(field, event, tok, coy) {
}
}
}
+ var data = "*JsHint=" + encodeURIComponent(field.value.substring(Beg,End));
for (i = 0; i < field.form.elements.length; ++i) {
var fld = field.form.elements[i];
if (fld.name == "*Get")
- data = "*Get=" + fld.value;
+ data += "&*Get=" + fld.value;
else if (fld.name == "*Form")
data += "&*Form=" + fld.value;
}
diff --git a/lib/form.l b/lib/form.l
@@ -1,4 +1,4 @@
-# 26nov11abu
+# 01dec11abu
# (c) Software Lab. Alexander Burger
# *PRG *Top *Gui *Btn *Get *Got *Form *Evt *Lock *Spans
@@ -6,7 +6,7 @@
(allow (path "@img/") T)
(push1 '*JS (allow (path "@lib/form.js")))
-(mapc allow '(*Gui *Get *Got *Form *Evt *Drop "!jsForm" "!jsHint"))
+(mapc allow '(*Gui *Get *Got *Form *Evt *Drop "!jsForm" *JsHint "!jsHint"))
(one "*Cnt")
(off "*Lst" "*Post2" "*Cho")
@@ -516,12 +516,12 @@
")" ) ) )
(extra "Var") ) )
-(de jsHint (I Str)
+(de jsHint (I)
(httpHead "text/plain; charset=utf-8")
(ht:Out *Chunked
(let? L
(if (sym? I)
- ((; I hint) Str)
+ ((; I hint) *JsHint)
(let? Lst (get "*Lst" (- "*Cnt" (format *Get)))
(try 'hint>
(get
@@ -530,7 +530,7 @@
(get Lst 1 (+ (length (car Lst)) (format *Form)) 1) )
'gui
I )
- Str ) ) )
+ *JsHint ) ) )
(prin
(ht:Fmt
(if (atom (car L))