From 2cbb613cd4eba33ac3c3d2a9ace7c55799748d1a Mon Sep 17 00:00:00 2001 From: Brandon King Date: Fri, 26 Jun 2009 19:57:07 +0000 Subject: [PATCH] Fixed dynamic east panel code --- htsworkflow/frontend/samples/views.py | 1 + htsworkflow/frontend/static/js/htsw.js | 9 +++++++++ htsworkflow/frontend/templates/app_base.html | 2 +- .../frontend/templates/flowcell_libraries_app.html | 4 ---- 4 files changed, 11 insertions(+), 5 deletions(-) diff --git a/htsworkflow/frontend/samples/views.py b/htsworkflow/frontend/samples/views.py index c72a833..853a0ff 100644 --- a/htsworkflow/frontend/samples/views.py +++ b/htsworkflow/frontend/samples/views.py @@ -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) diff --git a/htsworkflow/frontend/static/js/htsw.js b/htsworkflow/frontend/static/js/htsw.js index d5829b3..8bbe432 100644 --- a/htsworkflow/frontend/static/js/htsw.js +++ b/htsworkflow/frontend/static/js/htsw.js @@ -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'; diff --git a/htsworkflow/frontend/templates/app_base.html b/htsworkflow/frontend/templates/app_base.html index 5b34e5d..5338da2 100644 --- a/htsworkflow/frontend/templates/app_base.html +++ b/htsworkflow/frontend/templates/app_base.html @@ -73,7 +73,7 @@ {% block east_region %} -
+
{% if east_region_config_div %}{{ east_region_config_div }}{% endif %}
{% endblock %}
Check contents of div w/ id east_region_config, as the id supplied in text block does not exist.
diff --git a/htsworkflow/frontend/templates/flowcell_libraries_app.html b/htsworkflow/frontend/templates/flowcell_libraries_app.html index 02d1212..6e31b59 100644 --- a/htsworkflow/frontend/templates/flowcell_libraries_app.html +++ b/htsworkflow/frontend/templates/flowcell_libraries_app.html @@ -32,7 +32,3 @@ {% block app_toolbar_east %} {% endblock %} - -{% block east_region %} -
changelist-filter
-{% endblock %} \ No newline at end of file -- 2.30.2