use the new css and js naming convention
authorAdrien Di Mascio <Adrien.DiMascio@logilab.fr>
Wed, 05 Nov 2008 10:19:26 +0100
changeset 14 adb16584d61a
parent 13 05e436072196
child 15 b141a9101bd3
use the new css and js naming convention
data/cubes.keyword.js
data/cubicweb.keywords.js
views.py
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/data/cubes.keyword.js	Wed Nov 05 10:19:26 2008 +0100
@@ -0,0 +1,44 @@
+/*
+ *  :organization: Logilab
+ *  :copyright: 2003-2008 LOGILAB S.A. (Paris, FRANCE), all rights reserved.
+ *  :contact: http://www.logilab.fr/ -- mailto:contact@logilab.fr
+ */
+
+CubicWeb.require('python.js');
+CubicWeb.require('ajax.js');
+CubicWeb.require('widgets.js');
+
+var kwform = null;
+
+/* callback called when tag-edition is finished */
+function validateKeywords(kwform, kwlist) {
+    var eid = kwform.eid;
+    d = async_remote_exec('add_keywords', eid, kwlist);
+    d.addCallback(function(msg) {
+	log('got message', msg);
+ 	reloadComponent('keywordsbar', 'Any X WHERE X eid '+eid, 'contentnavigation');
+  	document.location.hash = '#header';
+ 	kwform.destroy();
+ 	updateMessage(msg);
+    });
+}
+
+
+function onkwformDestroy() { kwform = null;}
+
+/* builds the tagselection widget */
+function showKeywordSelector(eid, oklabel, cancellabel) {
+    // if tagform is already on screen, destroy it
+    if (kwform) { kwform.destroy(); }
+    else {
+	kwform = new Widgets.SuggestForm('kwinput', 'possible_keywords', [eid],
+					  validateKeywords, {multi : true,
+							     oklabel : oklabel,
+							     cancellabel : cancellabel});
+	kwform.eid = eid // gruik !
+	connect(kwform, 'destroy', onkwformDestroy);
+	kwform.show($('kwformholder'));
+    }
+}
+
+Cubicweb.provide('keywords.js');
--- a/data/cubicweb.keywords.js	Thu Oct 30 21:55:53 2008 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,44 +0,0 @@
-/*
- *  :organization: Logilab
- *  :copyright: 2003-2008 LOGILAB S.A. (Paris, FRANCE), all rights reserved.
- *  :contact: http://www.logilab.fr/ -- mailto:contact@logilab.fr
- */
-
-CubicWeb.require('python.js');
-CubicWeb.require('ajax.js');
-CubicWeb.require('widgets.js');
-
-var kwform = null;
-
-/* callback called when tag-edition is finished */
-function validateKeywords(kwform, kwlist) {
-    var eid = kwform.eid;
-    d = async_remote_exec('add_keywords', eid, kwlist);
-    d.addCallback(function(msg) {
-	log('got message', msg);
- 	reloadComponent('keywordsbar', 'Any X WHERE X eid '+eid, 'contentnavigation');
-  	document.location.hash = '#header';
- 	kwform.destroy();
- 	updateMessage(msg);
-    });
-}
-
-
-function onkwformDestroy() { kwform = null;}
-
-/* builds the tagselection widget */
-function showKeywordSelector(eid, oklabel, cancellabel) {
-    // if tagform is already on screen, destroy it
-    if (kwform) { kwform.destroy(); }
-    else {
-	kwform = new Widgets.SuggestForm('kwinput', 'possible_keywords', [eid],
-					  validateKeywords, {multi : true,
-							     oklabel : oklabel,
-							     cancellabel : cancellabel});
-	kwform.eid = eid // gruik !
-	connect(kwform, 'destroy', onkwformDestroy);
-	kwform.show($('kwformholder'));
-    }
-}
-
-Cubicweb.provide('keywords.js');
--- a/views.py	Thu Oct 30 21:55:53 2008 +0100
+++ b/views.py	Wed Nov 05 10:19:26 2008 +0100
@@ -102,8 +102,8 @@
     condition = 'X is ET, CL classifies ET'
 
     def call(self):
-        self.add_js(['widgets.js', 'cubicweb.keywords.js'])
-        self.req.add_css('suggest.css')
+        self.add_js(['cubicweb.widgets.js', 'cubes.keyword.js'])
+        self.req.add_css('cubicweb.suggest.css')
         entity = self.entity(0)
         self.w(u'<table><tr><td>')
         self.w(u'<a class="button sglink" href="javascript: showKeywordSelector(%s, \'%s\', \'%s\');">%s</a></td>' % (