[vreg] move base registry implementation to logilab.common. Closes #1916014
A new logilab.common.registry module has been created with content from
* cw.vreg (the whole things that was in there)
* cw.appobject (base selectors and all).
In the process, we've done some renaming:
* former selector functions are now known as "predicate", though you still
use predicates to build an object'selector
* hence `objectify_selector` decorator is now `objectify_predicate`
* the top level registry is now `RegistryStore` (was `VRegistry`)
Also there is no more need for the @lltrace decorator.
On the CubicWeb side, the `selectors` module has been renamed to `predicates`.
There should be full backward compat with proper deprecation warnings.
$(document).ready(function(){module("module2",{setup:function(){$('#main').append('<select id="theselect" multiple="multiple" size="2">'+'</select>');}});test("test first selected",function(){$('#theselect').append('<option value="foo">foo</option>'+'<option selected="selected" value="bar">bar</option>'+'<option value="baz">baz</option>'+'<option selected="selecetd"value="spam">spam</option>');varselected=firstSelected(document.getElementById("theselect"));equals(selected.value,'bar');});test("test first selected 2",function(){$('#theselect').append('<option value="foo">foo</option>'+'<option value="bar">bar</option>'+'<option value="baz">baz</option>'+'<option value="spam">spam</option>');varselected=firstSelected(document.getElementById("theselect"));equals(selected,null);});module("visibilty");test('toggleVisibility',function(){$('#main').append('<div id="foo"></div>');toggleVisibility('foo');ok($('#foo').hasClass('hidden'),'check hidden class is set');});});