minor
authorThierry Parmentelat <thierry.parmentelat@inria.fr>
Thu, 14 Mar 2013 14:41:24 +0000 (15:41 +0100)
committerThierry Parmentelat <thierry.parmentelat@inria.fr>
Thu, 14 Mar 2013 14:41:24 +0000 (15:41 +0100)
myslice/viewutils.py
plugins/querycode/querycode.js
trash/pluginview.py

index 98f16fd..2073ab4 100644 (file)
@@ -59,6 +59,8 @@ hard_wired_list.append("just like a standard plugin can be set as visible or not
 hard_wired_list.append("")    
 hard_wired_list.append("OTOH and IMHO, there should be two separate and explicit subclasses of SimpleList for slices or testbeds")
 
-quickfilter_criterias = [{'key': 'Slice', 'values': ['slice1','slice2']}, \
-                          {'key': 'Type', 'values': ['type1','type2']}, \
-                          {'key': 'Network', 'values': ['net1','net2']}]
+quickfilter_criterias = [
+    {'key': 'Slice', 'values': ['slice1','slice2']},
+    {'key': 'Type', 'values': ['type1','type2']},
+    {'key': 'Network', 'values': ['net1','net2']},
+    ]
index 15f9b1e..e8719c3 100644 (file)
@@ -7,12 +7,6 @@
  * License: GPLv3
  */
 
-function debug_object (msg, o) {
-    var keys=[];
-    for (var k in o) keys.push(k);
-    console.log (msg + " Keys : " + keys);
-}
-
 // xxx TODO
 // . turn back on syntax highlighting
 
@@ -131,7 +125,7 @@ function debug_object (msg, o) {
        });
        ofs = '[' + ofs + ']';
 
-       output += 'pp srv.call("' + title_case(query.action) +'", auth, "' + query.method + '", "' + query.timestamp + '", ' + ifs + ', ' + ofs + ')';
+       output += 'pp srv.call("' + mixed_case(query.action) +'", auth, "' + query.method + '", "' + query.timestamp + '", ' + ifs + ', ' + ofs + ')';
 
        var output = '<pre class="brush: ruby; toolbar: false;">' + output + "</pre>";
        return output;
@@ -164,12 +158,12 @@ function debug_object (msg, o) {
        });
        ofs = '[' + ofs + ']';
 
-       output += 'srv.' + title_case(query.action) + '(auth, "' + query.method + '", ' + ifs + ', {}, ' + ofs + ')';
+       output += 'srv.' + mixed_case(query.action) + '(auth, "' + query.method + '", ' + ifs + ', {}, ' + ofs + ')';
        var output = '<pre class="brush: python; toolbar: false;">' + output + "</pre>";
        return output;
     }
 
-    function title_case (txt){ return txt.charAt(0).toUpperCase() + txt.substr(1).toLowerCase();}
+    function mixed_case (txt){ return txt.charAt(0).toUpperCase() + txt.substr(1).toLowerCase();}
     
 })(jQuery); // end closure wrapper
 
index 5d29eb5..b6d6766 100644 (file)
@@ -56,9 +56,10 @@ def test_plugin_view (request):
                                               title='SimpleList with slice names', 
                                               list=hard_wired_slice_names,
                                               ),
-                                  QuickFilter (list=quickfilter_criterias,
-                                               page=page,
-                                               title='QuickFilter in main content') ] )
+                                  QuickFilter (page=page,
+                                               title='QuickFilter in main content',
+                                               list=quickfilter_criterias,
+                                               ) ] )
     # define 'content_main' to the template engine
     template_env [ 'content_main' ] = main_plugin.render(request)