[multi-sources-removal] Drop pyrorql and zmqrql sources
After a few years experementing "true" multi-sources, we're now
moving to "copy-based" source à la datafeed.
As pyro and zmq sources have no more known customers and the related
code is in the way of future refactoring of cubicweb's core, we decided
to drop support for those sources without backward compatibility.
If you're still using a zmqrql or pyrorql source and you want to upgrade,
ask support to move it to datafeed using a pre-3.19 version first.
Related to #2919300 (first step)
/* in CW 3.10, we should move these functions in this namespace */cw.htmlhelpers=newNamespace('cw.htmlhelpers');jQuery.extend(cw.htmlhelpers,{popupLoginBox:function(loginboxid,focusid){$('#'+loginboxid).toggleClass('hidden');jQuery('#'+focusid+':visible').focus();}});/** * .. function:: baseuri() * * returns the document's baseURI. (baseuri() uses document.baseURI if * available and inspects the <base> tag manually otherwise.) */functionbaseuri(){if(typeofBASE_URL==='undefined'){// backward compatibility, BASE_URL might be undefinedvaruri=document.baseURI;if(uri){// some browsers don't define baseURIreturnuri.toLowerCase();}returnjQuery('base').attr('href').toLowerCase();}returnBASE_URL;}/** * .. function:: setProgressCursor() * * set body's cursor to 'progress' */functionsetProgressCursor(){varbody=document.getElementsByTagName('body')[0];body.style.cursor='progress';}/** * .. function:: resetCursor(result) * * reset body's cursor to default (mouse cursor). The main * purpose of this function is to be used as a callback in the * deferreds' callbacks chain. */functionresetCursor(result){varbody=document.getElementsByTagName('body')[0];body.style.cursor='default';// pass result to next callback in the callback chainreturnresult;}functionupdateMessage(msg){varmsgdiv=DIV({'class':'message'});// don't pass msg to DIV() directly because DIV will html escape it// and msg should alreay be html escaped at this point.msgdiv.innerHTML=msg;jQuery('#appMsg').removeClass('hidden').empty().append(msgdiv);}/** * .. function:: asURL(props) * * builds an url from an object (used as a dictionary) * * >>> asURL({'rql' : "RQL", 'x': [1, 2], 'itemvid' : "oneline"}) * rql=RQL&vid=list&itemvid=oneline&x=1&x=2 * >>> asURL({'rql' : "a&b", 'x': [1, 2], 'itemvid' : "oneline"}) * rql=a%26b&x=1&x=2&itemvid=oneline */functionasURL(props){varchunks=[];for(keyinprops){varvalue=props[key];// generate a list of couple key=value if key is multivaluedif(cw.utils.isArrayLike(value)){for(vari=0;i<value.length;i++){chunks.push(key+'='+cw.urlEncode(value[i]));}}else{chunks.push(key+'='+cw.urlEncode(value));}}returnchunks.join('&');}/** * .. function:: firstSelected(selectNode) * * return selected value of a combo box if any */functionfirstSelected(selectNode){var$selection=$(selectNode).find('option:selected:first');return($selection.length>0)?$selection[0]:null;}/** * .. function:: toggleVisibility(elemId) * * toggle visibility of an element by its id */functiontoggleVisibility(elemId){cw.jqNode(elemId).toggleClass('hidden');}/** * .. function:: popupLoginBox() * * toggles visibility of login popup div */// XXX used exactly ONCE in basecomponentspopupLoginBox=cw.utils.deprecatedFunction(function(){$('#popupLoginBox').toggleClass('hidden');jQuery('#__login:visible').focus();});/** * .. function getElementsMatching(tagName, properties, \/* optional \*\/ parent) * * returns the list of elements in the document matching the tag name * and the properties provided * * * `tagName`, the tag's name * * * `properties`, a js Object used as a dict * * Return an iterator (if a *real* array is needed, you can use the * list() function) */functiongetElementsMatching(tagName,properties,/* optional */parent){parent=parent||document;returnjQuery.grep(parent.getElementsByTagName(tagName),functionelementMatches(element){for(propinproperties){if(jQuery(element).attr(prop)!=properties[prop]){returnfalse;}}returntrue;});}/** * .. function:: setCheckboxesState(nameprefix, value, checked) * * sets checked/unchecked status of checkboxes */functionsetCheckboxesState(nameprefix,value,checked){// XXX: this looks in *all* the document for inputsjQuery('input:checkbox[name^='+nameprefix+']').each(function(){if(value==null||this.value==value){this.checked=checked;}});}/** * .. function:: html2dom(source) * * this function is a hack to build a dom node from html source */functionhtml2dom(source){vartmpNode=SPAN();tmpNode.innerHTML=source;if(tmpNode.childNodes.length==1){returntmpNode.firstChild;}else{// we leave the span node when `source` has no root node// XXX This is cleary not the best solution, but css/html-wise,/// a span not should not be too much disturbingreturntmpNode;}}// *** HELPERS **************************************************** //functionrql_for_eid(eid){return'Any X WHERE X eid '+eid;}functionisTextNode(domNode){returndomNode.nodeType==3;}functionisElementNode(domNode){returndomNode.nodeType==1;}functionautogrow(area){if(area.scrollHeight>area.clientHeight&&!window.opera){if(area.rows<20){area.rows+=2;}}}