--- a/server/ui.js +++ b/server/ui.js @@ -4,297 +4,298 @@ elementTagName: " ", elementId: " ", flag : 0, + showlinks : 0, + showbox : 0, + blog_flag : false, testContext : function() { - $(document).ready(function(){$('body *').contents().filter(function() - { - //console.log(this.nodeName); - try{ - if(this.nodeType == 3) - { - return (this.nodeType == 3) && this.nodeValue.match(/\S/);}} - catch(err) - { -// console.log(err.message); -// console.log(this); - }}).wrap('')}); + $(document).ready(function(){$('body *').contents().filter(function() +{ + try{ + if(this.nodeType == 3) + { + return (this.nodeType == 3) && this.nodeValue.match(/\S/);}} + catch(err) + { + }}).wrap('')}); vimg = document.getElementsByTagName('img'); for(i=0; i'; - $(result).before(audio); - } - else{ - result.textContent = newContent; - } - result=nodes.iterateNext(); - } - } - catch (e) - { - dump( 'error: Document tree modified during iteration ' + e ); - } + + + + + editPage: function() { + a11ypi.testContext(); page_edit_nele('4seiz', '4l85060vb9', '336e2nootv6nxjsvyjov', 'VISUAL', 'false', ''); + document.getElementById("renarrated_overlay").style.display = "none"; }, - close: function() { - document.getElementById('ren_overlay').style.display = 'none'; + + showBox: function() { + $(function() { + $( "#show-box" ).dialog( "destroy" ); + + $( "#show-box" ).dialog({ + width: 300, + height: 300, + modal: true + }); + }); + a11ypi.createMenu(a11ypi.showbox); }, - filter: function() - { + + showBox1: function() { + $(function() { + $( "#show-links" ).dialog( "destroy" ); + + $( "#show-links" ).dialog({ + width: 500, + height: 300, + modal: true + }); + }); + a11ypi.createDomainMenu(); + }, + + blogFilter: function() { + if (a11ypi.blog_flag == false) { + a11ypi.blog_flag = true; var xhr = new XMLHttpRequest(); xhr.onreadystatechange = function() { if(xhr.readyState == 4) - { - if(xhr.responseText =='empty') { - a11ypi.clearMenu(); - alert("An internal server error occured, please try later."); - } + if(xhr.responseText == "empty") + { } else - { - - d ={}; - var response=xhr.responseText.substring(3).split('###'); - for (var j= 0; j< response.length ; j++){ - chunk = response[j].substring(1).split('&'); - - for (var i= 0; i< chunk.length ; i++){ - pair =chunk[i].split("::"); - key = pair[0]; - value = pair[1]; - d[key] = value; + { + var sel = document.getElementById("blog-filter"); + var menu_list = JSON.parse(xhr.responseText); + blogArray = []; + for (var i=0; i< menu_list.length; i++) + { + blogArray[i] = menu_list[i].split("http://")[1].split(".com")[0] + ".com"; + } + blogArray.sort(); + for (var i=0; i < blogArray.length; i++) + { + if ( i == 0 ) + { + opt = document.createElement("option"); + opt.textContent = blogArray[0]; + sel.appendChild(opt); + } + else if(blogArray[i] == blogArray[i-1]) + { } + else + { + opt = document.createElement("option"); + opt.textContent = blogArray[i]; + sel.appendChild(opt); + } + } } - path = d['xpath']; - newContent = d['data']; - a11ypi.evaluate(path,newContent); - } } - } } - d = window.location.search.split('?')[1]; - var a =[]; - for (var i = 0;i document.body.clientWidth || event.clientY > document.body.clientHeight) { // passthrough if this click was outside of the html page, meaning on a scrollbar