tweak googlemap initial point of view
[unfold.git] / portal / sliceview.py
index 8201814..f640b32 100644 (file)
@@ -32,6 +32,7 @@ class SliceView (LoginRequiredAutoLogoutView):
     
         page = Page(request)
         page.add_css_files ('css/slice-view.css')
+        page.add_js_files  ( [ "js/common.functions.js" ] )
         page.add_js_chunks ('$(function() { console.log("sliceview: jQuery version " + $.fn.jquery); });')
         page.add_js_chunks ('$(function() { console.log("sliceview: users turned %s"); });'%("on" if do_query_users else "off"))
         page.expose_js_metadata()
@@ -120,8 +121,8 @@ class SliceView (LoginRequiredAutoLogoutView):
             checkboxes = True,
             # center on Paris
             latitude   = 49.,
-            longitude  = 2.2,
-            zoom       = 3,
+            longitude  = 9,
+            zoom       = 4,
         )
 
         resources_as_list = Hazelnut( 
@@ -143,7 +144,7 @@ class SliceView (LoginRequiredAutoLogoutView):
 
         resources_query_editor = QueryEditor(
             page  = page,
-            query = sq_resource,
+            query = query_resource_all,
             title = "Select Columns",
             )
         resources_active_filters = ActiveFilters(
@@ -205,11 +206,9 @@ class SliceView (LoginRequiredAutoLogoutView):
                 query_all  = query_user_all,
                 checkboxes  = True,
                 datatables_options = { 
-                    # for now we turn off sorting on the checkboxes columns this way
-                    # this of course should be automatic in hazelnut
-                    'aoColumns'      : [None, None, None, None, {'bSortable': False}],
                     'iDisplayLength' : 25,
                     'bLengthChange'  : True,
+                    'bAutoWidth'     : True,
                 },
             ))
     
@@ -235,11 +234,9 @@ class SliceView (LoginRequiredAutoLogoutView):
             query       = sq_measurement,
             checkboxes  = True,
             datatables_options = { 
-                # for now we turn off sorting on the checkboxes columns this way
-                # this of course should be automatic in hazelnut
-                'aoColumns'      : [None, None, None, None, {'bSortable': False}],
                 'iDisplayLength' : 25,
                 'bLengthChange'  : True,
+                'bAutoWidth'     : True,
             },
         ))