Commit 9ec957ad58635c63c120d6df98f4cd4e84da67d3

  • avatar
  • shalini
  • Tue Nov 01 19:45:14 IST 2011
cleaned up the code by removing alerts and print statements
  
2828 root.make_links_absolute(d['foruri'], resolve_base_href = True)
2929 script_test = root.makeelement('script')
3030 root.body.append(script_test)
31 script_test.set("src", "http://192.168.100.100/server/ui.js")
32# script_test.set("src", "http://dev.a11y.in/alipi/ui.js")
31# script_test.set("src", "http://192.168.100.100/server/ui.js")
32 script_test.set("src", "http://dev.a11y.in/alipi/ui.js")
3333# script_test.set("src", "http://localhost/alipi-1/server/ui.js")
3434 script_test.set("type", "text/javascript")
3535
4242 root.body.append(style)
4343 style.set("rel","stylesheet")
4444 style.set("type", "text/css")
45 style.set("href", "http://192.168.100.100/server/stylesheet.css")
46# style.set("href", "http://dev.a11y.in/alipi/stylesheet.css")
45# style.set("href", "http://192.168.100.100/server/stylesheet.css")
46 style.set("href", "http://dev.a11y.in/alipi/stylesheet.css")
4747# style.set("href", "http://localhost/alipi-1/server/stylesheet.css")
4848
4949 connection = pymongo.Connection('localhost',27017)
8888 return lxml.html.tostring(root)
8989
9090 elif request.args.has_key('lang') == True and request.args.has_key('blog') == False:
91 print "shalini"
9291 d['lang'] = request.args['lang']
9392 script_test = root.makeelement('script')
9493 root.body.append(script_test)
95 script_test.set("src", "http://192.168.100.100/server/ui.js")
94 script_test.set("src", "http://dev.a11y.in/alipi/ui.js")
95 #script_test.set("src", "http://192.168.100.100/server/ui.js")
9696 script_test.set("type", "text/javascript")
9797 root.body.set("onload","a11ypi.ren()");
9898 root.make_links_absolute(d['foruri'], resolve_base_href = True)
101101 elif request.args.has_key('interactive') == True and request.args.has_key('blog') == True:
102102 script_test = root.makeelement('script')
103103 root.body.append(script_test)
104 script_test.set("src", "http://192.168.100.100/server/ui.js")
104 script_test.set("src", "http://dev.a11y.in/alipi/ui.js")
105 #script_test.set("src", "http://192.168.100.100/server/ui.js")
105106 script_test.set("type", "text/javascript")
106107 root.body.set("onload","a11ypi.filter()");
107108 root.make_links_absolute(d['foruri'], resolve_base_href = True)
111111 elif request.args.has_key('interactive') == False and request.args.has_key('blog') == True:
112112 script_test = root.makeelement('script')
113113 root.body.append(script_test)
114 script_test.set("src", "http://192.168.100.100/server/ui.js")
114 script_test.set("src", "http://dev.a11y.in/alipi/ui.js")
115 #script_test.set("src", "http://192.168.100.100/server/ui.js")
115116 script_test.set("type", "text/javascript")
116117
117118 script_jq_mini = root.makeelement('script')
124124 root.body.append(style)
125125 style.set("rel","stylesheet")
126126 style.set("type", "text/css")
127 style.set("href", "http://192.168.100.100/server/stylesheet.css")
127 script_test.set("src", "http://dev.a11y.in/alipi/stylesheet.css")
128 #style.set("href", "http://192.168.100.100/server/stylesheet.css")
128129
129130 connection = pymongo.Connection('localhost',27017)
130131 db = connection['alipi']
  
1414 }
1515 var v = content.document.getElementsByTagName("body");
1616 var a = content.document.createElement("script");
17 a.setAttribute("src","http://192.168.100.100/server/wsgi/page_edit.js");
18// a.setAttribute("src","http://dev.a11y.in/alipi/wsgi/page_edit.js");
17// a.setAttribute("src","http://192.168.100.100/server/wsgi/page_edit.js");
18 a.setAttribute("src","http://dev.a11y.in/alipi/wsgi/page_edit.js");
1919// a.setAttribute("src","http://localhost/alipi-1/server/wsgi/page_edit.js");
2020 a.setAttribute("type","text/javascript");
2121 v[0].appendChild(a);
6767 }
6868 }
6969 }
70 xhr.open("POST","http://192.168.100.100/menu",true);
70 xhr.open("POST","http://dev.a11y.in/menu",true);
7171 xhr.setRequestHeader("Content-type","application/x-www-form-urlencoded");
7272 d = window.location.search.split('?')[1];
7373 var a =[];
9797 }
9898 }
9999 }
100 xhr.open("POST","http://192.168.100.100/menu",true);
100 xhr.open("POST","http://dev.a11y.in/menu",true);
101101 xhr.setRequestHeader("Content-type","application/x-www-form-urlencoded");
102102 d = window.location.search.split('?')[1];
103103 var a =[];
117117 },
118118 ren: function()
119119 {
120 alert("ren-shalini");
121120 var xhr = new XMLHttpRequest();
122121 xhr.onreadystatechange = function()
123122 {
158158 var lang= a['lang'];
159159 var data="url="+encodeURIComponent(url)+"&lang="+encodeURIComponent(lang);
160160
161 xhr.open("POST","http://192.168.100.100/replace",true);
161 xhr.open("POST","http://dev.a11y.in/replace",true);
162162 xhr.setRequestHeader("Content-type","application/x-www-form-urlencoded");
163163 xhr.send(data);//
164164 },
165165 evaluate: function()
166166 {
167 alert("evaluate-shalini");
168167 var nodes = document.evaluate(path, document, null, XPathResult.ANY_TYPE,null);
169168 try{
170169 var result = nodes.iterateNext();
184184 }
185185 else{
186186 result.textContent = newContent;
187 alert(result.textContent);
188187 }
189188 result=nodes.iterateNext();
190189 }
239239 var blog= a['blog'];
240240 var data="url="+encodeURIComponent(url)+"&lang="+encodeURIComponent(lang)+"&blog="+encodeURIComponent(blog);
241241
242 xhr.open("POST","http://192.168.100.100/filter",true);
242 xhr.open("POST","http://dev.a11y.in/filter",true);
243243 xhr.setRequestHeader("Content-type","application/x-www-form-urlencoded");
244244 xhr.send(data);//
245245 },