Commit 4f15cb6647c96424622033c677cf742dc463480b
- Diff rendering mode:
- inline
- side by side
server/wsgi/page_edit.js
(9 / 7)
  | |||
1799 | 1799 | source: function(req, add){ | |
1800 | 1800 | ||
1801 | 1801 | //pass request to server | |
1802 | $.getJSON("http://localhost/getData?", req, function(data) { | ||
1802 | $.getJSON("http://dev.a11y.in/getData?", req, function(data) { | ||
1803 | 1803 | ||
1804 | 1804 | //create array for response objects | |
1805 | 1805 | var suggestions = []; | |
… | … | ||
1823 | 1823 | source: function(req, add){ | |
1824 | 1824 | ||
1825 | 1825 | //pass request to server | |
1826 | $.getJSON("http://localhost/getLang?", req, function(data) { | ||
1826 | $.getJSON("http://dev.a11y.in/getLang?", req, function(data) { | ||
1827 | 1827 | ||
1828 | 1828 | //create array for response objects | |
1829 | 1829 | var suggestions = []; | |
… | … | ||
2178 | 2178 | } | |
2179 | 2179 | } | |
2180 | 2180 | } | |
2181 | xmlhttp.open("POST","http://localhost/narration",true); | ||
2181 | xmlhttp.open("POST","http://dev.a11y.in/narration",true); | ||
2182 | 2182 | xmlhttp.setRequestHeader("Content-type","application/x-www-form-urlencoded"); | |
2183 | 2183 | xmlhttp.send(data); | |
2184 | 2184 | ||
… | … | ||
3156 | 3156 | break; | |
3157 | 3157 | ||
3158 | 3158 | case 'AUDIO_CREATE': | |
3159 | brk = document.createElement("br"); | ||
3159 | 3160 | audioElement = document.createElement('audio'); | |
3161 | audioElement.setAttribute("id", "audiotag"); | ||
3160 | 3162 | audioElement.setAttribute('src',command.data); | |
3161 | 3163 | audioElement.setAttribute('controls','controls'); | |
3162 | selectedElement.appendChild(audioElement); | ||
3163 | audioElement.play(); | ||
3164 | $(brk).insertBefore("#alipiSelectedElement"); | ||
3165 | $(audioElement).insertBefore($(brk)); | ||
3164 | 3166 | pageEditor.showMessage('Audio added'); | |
3165 | 3167 | break; | |
3166 | 3168 | ||
… | … | ||
3233 | 3233 | if(document.getElementById('our-check').checked) | |
3234 | 3234 | { | |
3235 | 3235 | localStorage.myContent = buildDataString(); | |
3236 | window.location.href = "http://localhost/test.html"; | ||
3236 | window.location.href = "http://dev.a11y.in/test.html"; | ||
3237 | 3237 | window.reload(); | |
3238 | 3238 | } | |
3239 | 3239 | else{ | |
3240 | 3240 | ||
3241 | AJAX.post('http://localhost/test', buildDataString(), function(result) { | ||
3241 | AJAX.post('http://dev.a11y.in/test', buildDataString(), function(result) { | ||
3242 | 3242 | ajaxResultProcessor.processPublishedResponse(result); | |
3243 | 3243 | }); | |
3244 | 3244 | } |