[web/css] move jquery.treeview.css override to a separate file
authorJulien Cristau <julien.cristau@logilab.fr>
Thu, 23 Oct 2014 11:20:44 +0200
changeset 10099 12f4f2509a38
parent 10098 e8889211f256
child 10100 6718c03f8938
[web/css] move jquery.treeview.css override to a separate file Patched embedded code copies are a maintenance disaster (even more so than plain embedded code copies). Let's not do that.
web/data/cubicweb.treeview.css
web/data/jquery.treeview.css
web/views/treeview.py
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/web/data/cubicweb.treeview.css	Thu Oct 23 11:20:44 2014 +0200
@@ -0,0 +1,2 @@
+/* override settings in jquery.treeview.css */
+ul.placeholder { display: none; }
--- a/web/data/jquery.treeview.css	Wed Oct 22 14:39:51 2014 +0200
+++ b/web/data/jquery.treeview.css	Thu Oct 23 11:20:44 2014 +0200
@@ -66,6 +66,3 @@
 .filetree span.folder { background: url(folder.gif) 0 0 no-repeat; }
 .filetree li.expandable span.folder { background: url(folder-closed.gif) 0 0 no-repeat; }
 .filetree span.file { background: url(file.gif) 0 0 no-repeat; }
-
-/* added by adim */
-ul.placeholder { display: none; }
\ No newline at end of file
--- a/web/views/treeview.py	Wed Oct 22 14:39:51 2014 +0200
+++ b/web/views/treeview.py	Thu Oct 23 11:20:44 2014 +0200
@@ -146,7 +146,7 @@
         return subvid, treeid, toplevel_thru_ajax, toplevel
 
     def _init_headers(self, treeid):
-        self._cw.add_css('jquery.treeview.css')
+        self._cw.add_css(('jquery.treeview.css', 'cubicweb.treeview.css'))
         self._cw.add_js(('cubicweb.ajax.js', 'cubicweb.widgets.js', 'jquery.treeview.js'))
         self._cw.html_headers.add_onload(u"""
 jQuery("#tree-%s").treeview({toggle: toggleTree, prerendered: true});""" % treeid)