Fixed dynamic east panel code
authorBrandon King <kingb@caltech.edu>
Fri, 26 Jun 2009 19:57:07 +0000 (19:57 +0000)
committerBrandon King <kingb@caltech.edu>
Fri, 26 Jun 2009 19:57:07 +0000 (19:57 +0000)
htsworkflow/frontend/samples/views.py
htsworkflow/frontend/static/js/htsw.js
htsworkflow/frontend/templates/app_base.html
htsworkflow/frontend/templates/flowcell_libraries_app.html

index c72a8335c2677285542c3b894426df49994e1bef..853a0ff8a3aa217c6c2f2e426bc102324491bc76 100644 (file)
@@ -66,6 +66,7 @@ def library(request):
     
     app_context = {
         'page_name': 'Library Index',
+        'east_region_config_div': 'changelist-filter',
         'body': t.render(c)
     }
     app_context.update(SAMPLES_CONTEXT_DEFAULTS)
index d5829b3a0a59befa9b28554e1aa07e3c41dcfbac..8bbe43275aad8fc7b1d3011bc1b9061816d43459 100644 (file)
@@ -90,10 +90,19 @@ $(document).ready(function(){
        items: create_dynamic_panels().concat([panel_bcmagic])
     });
     
+    
+    
+    //-------------------------------
+    // East Region Setup
+    //-------------------------------
     var get_east_panel_content = function(){
       // East panel contentEl id is supplied in html div id of east_region_config.
       var east_id = Ext.fly('east_region_config').dom.textContent;
       
+      if (east_id.length == 0){
+       return east_id;
+      }
+      
       // If no element exists with the supplied content id, report and error.
       if (Ext.fly(east_id) == null){
        return 'east_region_config_error';
index 5b34e5da2681d237f74d6595bd3ade166223c29a..5338da2b938da3b90f974664df540d6d52f27a0b 100644 (file)
@@ -73,7 +73,7 @@
     </div>
     
     {% block east_region %}
-    <div id="east_region_config" class="x-hidden"></div>
+    <div id="east_region_config" class="x-hidden">{% if east_region_config_div %}{{ east_region_config_div }}{% endif %}</div>
     {% endblock %}
     <div id="east_region_config_error" class="x-hidden">Check contents of div w/ id east_region_config, as the id supplied in text block does not exist.</div>
     
index 02d12123df51d5761a60fb19cc06c45e9c82ed97..6e31b596f446e9939c45d3f0a1bd66e81ba54ad8 100644 (file)
@@ -32,7 +32,3 @@
 {% block app_toolbar_east %}
     <!--<div id="Admin" href="/admin/"></div>-->
 {% endblock %}
-
-{% block east_region %}
-<div id="east_region_config" class="x-hidden">changelist-filter</div>
-{% endblock %}
\ No newline at end of file