summaryrefslogtreecommitdiffstats
path: root/funcweb
diff options
context:
space:
mode:
authormakkalot <makkalot@gmail.com>2008-08-01 23:19:05 +0300
committermakkalot <makkalot@gmail.com>2008-08-01 23:19:05 +0300
commit6d073bbf14319bb37a3a892c35a290f59f167c67 (patch)
treec7e7c2a2507c9c3e22d661bc6c326606194c1033 /funcweb
parent127a70342f6f3a112b032281125c8859634c8df2 (diff)
downloadfunc-6d073bbf14319bb37a3a892c35a290f59f167c67.tar.gz
func-6d073bbf14319bb37a3a892c35a290f59f167c67.tar.xz
func-6d073bbf14319bb37a3a892c35a290f59f167c67.zip
the current js form handling code for ajaxian request didnt understand when we have some checklistst that fixes the situation
Diffstat (limited to 'funcweb')
-rw-r--r--funcweb/funcweb/static/javascript/ajax.js18
1 files changed, 15 insertions, 3 deletions
diff --git a/funcweb/funcweb/static/javascript/ajax.js b/funcweb/funcweb/static/javascript/ajax.js
index 1b8d44f..d9927a3 100644
--- a/funcweb/funcweb/static/javascript/ajax.js
+++ b/funcweb/funcweb/static/javascript/ajax.js
@@ -24,8 +24,18 @@ function addDomAjaxREsult(){
function remoteFormRequest(form, target, options) {
var query = Array();
var contents = formContents(form);
- for (var j=0; j<contents[0].length; j++)
- query[contents[0][j]] = contents[1][j];
+ for (var j=0; j<contents[0].length; j++){
+ if(compare(target,'group_small')==0){
+ if(!query[contents[0][j]]){
+ query[contents[0][j]] = [];
+ }
+ //add that here
+ query[contents[0][j]].push(contents[1][j]);
+
+ }
+ else
+ query[contents[0][j]] = contents[1][j];
+ }
query["tg_random"] = new Date().getTime();
//makePOSTRequest(form.action, target, queryString(query));
remoteRequest(form, form.action, target, query, options);
@@ -110,7 +120,8 @@ function glob_submit(form_element,target_dom){
* Because it is a common function we have to move it here for better results
* form_element is what we submit and the target_dom is the place that will be replaced
*/
-
+
+ before_action = null;
//sometimes we are not sure which dom to get so is that situation
if(compare(target_dom,'not_sure')==0)
target_dom = which_dom();
@@ -134,6 +145,7 @@ function glob_submit(form_element,target_dom){
'before':before_action
}
);
+
return form_result;
}