Commit 9ec957ad58635c63c120d6df98f4cd4e84da67d3
- Diff rendering mode:
- inline
- side by side
server/alipi.py
(12 / 9)
  | |||
28 | 28 | root.make_links_absolute(d['foruri'], resolve_base_href = True) | |
29 | 29 | script_test = root.makeelement('script') | |
30 | 30 | 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") | ||
33 | 33 | # script_test.set("src", "http://localhost/alipi-1/server/ui.js") | |
34 | 34 | script_test.set("type", "text/javascript") | |
35 | 35 | ||
… | … | ||
42 | 42 | root.body.append(style) | |
43 | 43 | style.set("rel","stylesheet") | |
44 | 44 | 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") | ||
47 | 47 | # style.set("href", "http://localhost/alipi-1/server/stylesheet.css") | |
48 | 48 | ||
49 | 49 | connection = pymongo.Connection('localhost',27017) | |
… | … | ||
88 | 88 | return lxml.html.tostring(root) | |
89 | 89 | ||
90 | 90 | elif request.args.has_key('lang') == True and request.args.has_key('blog') == False: | |
91 | print "shalini" | ||
92 | 91 | d['lang'] = request.args['lang'] | |
93 | 92 | script_test = root.makeelement('script') | |
94 | 93 | 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") | ||
96 | 96 | script_test.set("type", "text/javascript") | |
97 | 97 | root.body.set("onload","a11ypi.ren()"); | |
98 | 98 | root.make_links_absolute(d['foruri'], resolve_base_href = True) | |
… | … | ||
101 | 101 | elif request.args.has_key('interactive') == True and request.args.has_key('blog') == True: | |
102 | 102 | script_test = root.makeelement('script') | |
103 | 103 | 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") | ||
105 | 106 | script_test.set("type", "text/javascript") | |
106 | 107 | root.body.set("onload","a11ypi.filter()"); | |
107 | 108 | root.make_links_absolute(d['foruri'], resolve_base_href = True) | |
… | … | ||
111 | 111 | elif request.args.has_key('interactive') == False and request.args.has_key('blog') == True: | |
112 | 112 | script_test = root.makeelement('script') | |
113 | 113 | 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") | ||
115 | 116 | script_test.set("type", "text/javascript") | |
116 | 117 | ||
117 | 118 | script_jq_mini = root.makeelement('script') | |
… | … | ||
124 | 124 | root.body.append(style) | |
125 | 125 | style.set("rel","stylesheet") | |
126 | 126 | 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") | ||
128 | 129 | ||
129 | 130 | connection = pymongo.Connection('localhost',27017) | |
130 | 131 | db = connection['alipi'] |
server/ui.js
(6 / 9)
  | |||
14 | 14 | } | |
15 | 15 | var v = content.document.getElementsByTagName("body"); | |
16 | 16 | 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"); | ||
19 | 19 | // a.setAttribute("src","http://localhost/alipi-1/server/wsgi/page_edit.js"); | |
20 | 20 | a.setAttribute("type","text/javascript"); | |
21 | 21 | v[0].appendChild(a); | |
… | … | ||
67 | 67 | } | |
68 | 68 | } | |
69 | 69 | } | |
70 | xhr.open("POST","http://192.168.100.100/menu",true); | ||
70 | xhr.open("POST","http://dev.a11y.in/menu",true); | ||
71 | 71 | xhr.setRequestHeader("Content-type","application/x-www-form-urlencoded"); | |
72 | 72 | d = window.location.search.split('?')[1]; | |
73 | 73 | var a =[]; | |
… | … | ||
97 | 97 | } | |
98 | 98 | } | |
99 | 99 | } | |
100 | xhr.open("POST","http://192.168.100.100/menu",true); | ||
100 | xhr.open("POST","http://dev.a11y.in/menu",true); | ||
101 | 101 | xhr.setRequestHeader("Content-type","application/x-www-form-urlencoded"); | |
102 | 102 | d = window.location.search.split('?')[1]; | |
103 | 103 | var a =[]; | |
… | … | ||
117 | 117 | }, | |
118 | 118 | ren: function() | |
119 | 119 | { | |
120 | alert("ren-shalini"); | ||
121 | 120 | var xhr = new XMLHttpRequest(); | |
122 | 121 | xhr.onreadystatechange = function() | |
123 | 122 | { | |
… | … | ||
158 | 158 | var lang= a['lang']; | |
159 | 159 | var data="url="+encodeURIComponent(url)+"&lang="+encodeURIComponent(lang); | |
160 | 160 | ||
161 | xhr.open("POST","http://192.168.100.100/replace",true); | ||
161 | xhr.open("POST","http://dev.a11y.in/replace",true); | ||
162 | 162 | xhr.setRequestHeader("Content-type","application/x-www-form-urlencoded"); | |
163 | 163 | xhr.send(data);// | |
164 | 164 | }, | |
165 | 165 | evaluate: function() | |
166 | 166 | { | |
167 | alert("evaluate-shalini"); | ||
168 | 167 | var nodes = document.evaluate(path, document, null, XPathResult.ANY_TYPE,null); | |
169 | 168 | try{ | |
170 | 169 | var result = nodes.iterateNext(); | |
… | … | ||
184 | 184 | } | |
185 | 185 | else{ | |
186 | 186 | result.textContent = newContent; | |
187 | alert(result.textContent); | ||
188 | 187 | } | |
189 | 188 | result=nodes.iterateNext(); | |
190 | 189 | } | |
… | … | ||
239 | 239 | var blog= a['blog']; | |
240 | 240 | var data="url="+encodeURIComponent(url)+"&lang="+encodeURIComponent(lang)+"&blog="+encodeURIComponent(blog); | |
241 | 241 | ||
242 | xhr.open("POST","http://192.168.100.100/filter",true); | ||
242 | xhr.open("POST","http://dev.a11y.in/filter",true); | ||
243 | 243 | xhr.setRequestHeader("Content-type","application/x-www-form-urlencoded"); | |
244 | 244 | xhr.send(data);// | |
245 | 245 | }, |