--- a/doc/conf.py Thu Nov 06 14:14:33 2008 +0100
+++ b/doc/conf.py Thu Nov 06 14:15:21 2008 +0100
@@ -23,8 +23,8 @@
# Add any Sphinx extension module names here, as strings. They can be extensions
# coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
-extensions = []
-
+extensions = ['sphinx.ext.autodoc']
+autoclass_content = 'both'
# Add any paths that contain templates here, relative to this directory.
templates_path = ['.templates']
@@ -122,7 +122,7 @@
#html_additional_pages = {}
# If false, no module index is generated.
-#html_use_modindex = True
+html_use_modindex = True
# If false, no index is generated.
#html_use_index = True
@@ -139,7 +139,7 @@
#html_use_opensearch = ''
# If nonempty, this is the file name suffix for HTML files (e.g. ".xhtml").
-#html_file_suffix = ''
+html_file_suffix = '.html'
# Output file base name for HTML help builder.
htmlhelp_basename = 'Cubicwebdoc'
--- a/doc/howto.fr.txt Thu Nov 06 14:14:33 2008 +0100
+++ b/doc/howto.fr.txt Thu Nov 06 14:15:21 2008 +0100
@@ -10,7 +10,8 @@
* Modification d'une relation non finale
* Modification d'une relation finale
- [TO COMPLETE]
+
+[TO COMPLETE]
* Comment créer un utilisateur anonyme?
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/doc/modules.txt Thu Nov 06 14:15:21 2008 +0100
@@ -0,0 +1,106 @@
+.. -*- coding: utf-8 -*-
+
+
+:mod:`cubes.addressbook`
+========================
+
+.. automodule:: cubes.addressbook
+ :members:
+
+:mod:`cubicweb`
+===============
+
+.. automodule:: cubicweb
+ :members:
+
+:mod:`cubicweb.common`
+======================
+
+.. automodule:: cubicweb.common
+ :members:
+
+:mod:`cubicweb.devtools`
+========================
+
+.. automodule:: cubicweb.devtools
+ :members:
+
+:mod:`cubicweb.entities`
+========================
+
+.. automodule:: cubicweb.entities
+ :members:
+
+:mod:`cubicweb.etwist`
+======================
+
+.. automodule:: cubicweb.etwist
+ :members:
+
+:mod:`cubicweb.goa`
+===================
+
+.. automodule:: cubicweb.goa
+ :members:
+
+:mod:`cubicweb.schemas`
+=======================
+
+.. automodule:: cubicweb.schemas
+ :members:
+
+:mod:`cubicweb.server`
+======================
+
+.. automodule:: cubicweb.server
+ :members:
+
+:mod:`cubicweb.skeleton`
+========================
+
+.. automodule:: cubicweb.skeleton
+ :members:
+
+:mod:`cubicweb.sobjects`
+========================
+
+.. automodule:: cubicweb.sobjects
+ :members:
+
+:mod:`cubicweb.web`
+===================
+
+.. automodule:: cubicweb.web
+ :members:
+
+:mod:`cubicweb.wsgi`
+====================
+
+.. automodule:: cubicweb.wsgi
+ :members:
+
+:mod:`indexer`
+==============
+
+.. automodule:: indexer
+ :members:
+
+:mod:`logilab`
+==============
+
+.. automodule:: logilab
+ :members:
+
+
+
+:mod:`rql`
+==========
+
+.. automodule:: rql
+ :members:
+
+:mod:`yams`
+===========
+
+.. automodule:: yams
+ :members:
--- a/goa/goactl.py Thu Nov 06 14:14:33 2008 +0100
+++ b/goa/goactl.py Thu Nov 06 14:15:21 2008 +0100
@@ -207,13 +207,13 @@
create_symlink(join(CW_SOFTWARE_ROOT, 'goa', 'overrides', fpath),
join(appldir, 'cubicweb', subfpath))
# link every supported components
- cubesdir = join(appldir, 'cubes')
+ packagesdir = join(appldir, 'cubes')
cubesdir = CubicWebConfiguration.cubes_dir()
- for include in ('eaddressbook','ebasket', 'eblog','eclassfolders',
- 'eclasstags', 'ecomment', 'efile', 'elink',
- 'emailinglist', 'eperson', 'etask', 'ezone',
+ for include in ('addressbook','basket', 'blog','classfolders',
+ 'classtags', 'comment', 'file', 'link',
+ 'mailinglist', 'person', 'task', 'zone',
):
- create_symlink(join(cubesdir, include), join(cubesdir, include))
+ create_symlink(join(cubesdir, include), join(packagesdir, include))
# generate sample config
from cubicweb.goa.goaconfig import GAEConfiguration
from cubicweb.common.migration import MigrationHelper
--- a/goa/overrides/rqlannotation.py Thu Nov 06 14:14:33 2008 +0100
+++ b/goa/overrides/rqlannotation.py Thu Nov 06 14:15:21 2008 +0100
@@ -1,6 +1,13 @@
-def sqlgen_annotate(schema, rqlhelper, rqlst):
- rqlst.has_text_query = False
- rqlst.need_distinct = False
-
def set_qdata(union, noinvariant):
pass
+
+class SQLGenAnnotator(object):
+ def __init__(self, schema):
+ self.schema = schema
+ self.nfdomain = frozenset(eschema.type for eschema in schema.entities()
+ if not eschema.is_final())
+ def annotate(self, rqlst):
+ rqlst.has_text_query = False
+ rqlst.need_distinct = False
+
+
--- a/goa/skel/app.yaml.tmpl Thu Nov 06 14:14:33 2008 +0100
+++ b/goa/skel/app.yaml.tmpl Thu Nov 06 14:15:21 2008 +0100
@@ -8,7 +8,7 @@
script: $PYTHON_LIB/google/appengine/ext/admin
login: admin
- url: /data
- static_dir: data
+ static_dir: cubes/shared/data
- url: /fckeditor
static_dir: fckeditor
- url: /_load
--- a/web/data/cubicweb.formfilter.js Thu Nov 06 14:14:33 2008 +0100
+++ b/web/data/cubicweb.formfilter.js Thu Nov 06 14:15:21 2008 +0100
@@ -17,35 +17,43 @@
}
function facetFormContent(form) {
- var names = [];
- var values = [];
- jQuery(form).find('.facet').each(function () {
- var facetName = jQuery(this).find('.facetTitle').attr('cubicweb:facetName');
- var facetValues = jQuery(this).find('.facetValueSelected').each(function(x) {
- names.push(facetName);
- values.push(this.getAttribute('cubicweb:value'));
- });
- });
- jQuery(form).find('input').each(function () {
- names.push(this.name);
- values.push(this.value);
- });
+ var names = [];
+ var values = [];
+ jQuery(form).find('.facet').each(function () {
+ var facetName = jQuery(this).find('.facetTitle').attr('cubicweb:facetName');
+ var facetValues = jQuery(this).find('.facetValueSelected').each(function(x) {
+ names.push(facetName);
+ values.push(this.getAttribute('cubicweb:value'));
+ });
+ });
+ jQuery(form).find('input').each(function () {
+ names.push(this.name);
+ values.push(this.value);
+ });
jQuery(form).find('select option[@selected]').each(function () {
names.push(this.parentNode.name);
values.push(this.value);
});
- return [names, values];
+ return [names, values];
}
function buildRQL(divid, vid, paginate, vidargs) {
jQuery(CubicWeb).trigger('facets-content-loading', [divid, vid, paginate, vidargs]);
var form = getNode(divid+'Form');
var zipped = facetFormContent(form);
- zipped[0].push('facetargs')
- zipped[1].push(vidargs)
+ zipped[0].push('facetargs');
+ zipped[1].push(vidargs);
var d = async_remote_exec('filter_build_rql', zipped[0], zipped[1]);
d.addCallback(function(result) {
var rql = result[0];
+ var $bkLink = jQuery('#facetBkLink');
+ if ($bkLink.length) {
+ var bkUrl = $bkLink.attr('cubicweb:target') + '&path=view?rql=' + rql;
+ if (vid) {
+ bkUrl += '&vid=' + vid;
+ }
+ $bkLink.attr('href', bkUrl);
+ }
var toupdate = result[1];
var extraparams = vidargs;
var displayactions = jQuery('#' + divid).attr('cubicweb:displayactions');
@@ -172,7 +180,7 @@
var facetargs = form.attr('cubicweb:facetargs');
if (facetargs) {
form.find('div.facet').each(function() {
- var facet = jQuery(this);
+ var facet = jQuery(this);
var lastSelected = null;
facet.find('div.facetCheckBox').each(function (i) {
var $this = jQuery(this);
--- a/web/views/facets.py Thu Nov 06 14:14:33 2008 +0100
+++ b/web/views/facets.py Thu Nov 06 14:15:21 2008 +0100
@@ -52,12 +52,13 @@
return rset, vid, divid, paginate
def call(self, view=None):
- self.req.add_js( ('cubicweb.ajax.js', 'cubicweb.formfilter.js') )
+ req = self.req
+ req.add_js( ('cubicweb.ajax.js', 'cubicweb.formfilter.js') )
rset, vid, divid, paginate = self._get_context(view)
if rset.rowcount < 2: # XXX done by selectors, though maybe necessary when rset has been hijacked
return
if vid is None:
- vid = self.req.form.get('vid')
+ vid = req.form.get('vid')
rqlst = rset.syntax_tree()
rqlst.save_state()
try:
@@ -71,14 +72,24 @@
if not widgets:
return
w = self.w
+ eschema = self.schema.eschema('Bookmark')
+ if eschema.has_perm(req, 'add'):
+ bk_path = 'view?rql=%s' % rset.printable_rql()
+ bk_title = req._('my custom search')
+ bk_add_url = self.build_url('add/Bookmark', path=bk_path, title=bk_title)
+ bk_base_url = self.build_url('add/Bookmark', title=bk_title)
+ w(u'<div class="bkSearch"><a cubicweb:target="%s" id="facetBkLink" href="%s">%s</a></div>' % (
+ html_escape(bk_base_url),
+ html_escape(bk_add_url),
+ req._('bookmark this search')))
w(u'<form method="post" id="%sForm" cubicweb:facetargs="%s" action="">' % (
divid, html_escape(dumps([divid, vid, paginate, self.facetargs()]))))
w(u'<fieldset>')
hiddens = {'facets': ','.join(wdg.facet.id for wdg in widgets),
'baserql': baserql}
for param in ('subvid', 'vtitle'):
- if param in self.req.form:
- hiddens[param] = self.req.form[param]
+ if param in req.form:
+ hiddens[param] = req.form[param]
filter_hiddens(w, **hiddens)
for wdg in widgets:
wdg.render(w=self.w)