From: Brandon King Date: Wed, 24 Jun 2009 22:55:55 +0000 (+0000) Subject: Made a dynamic way of adding div dynamically to the east panel. X-Git-Tag: 0.2.6~37 X-Git-Url: http://woldlab.caltech.edu/gitweb/?p=htsworkflow.git;a=commitdiff_plain;h=179214d503abf886a5b092c078bd7d20a69669f3 Made a dynamic way of adding div dynamically to the east panel. * see app_base.html template for example. --- diff --git a/htsworkflow/frontend/static/js/htsw.js b/htsworkflow/frontend/static/js/htsw.js index 3f1e243..2d12e87 100644 --- a/htsworkflow/frontend/static/js/htsw.js +++ b/htsworkflow/frontend/static/js/htsw.js @@ -61,9 +61,9 @@ $(document).ready(function(){ region: 'west', collapsible: true, split: true, + collapseMode: 'mini', margins: '4 0 0 0', //cmargins: '2 2 0 2', - collapseMode: 'mini', width: 200, minWidth: 150, border: false, @@ -78,6 +78,46 @@ $(document).ready(function(){ items: create_dynamic_panels().concat([panel_bcmagic]) }); + 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 no element exists with the supplied content id, report and error. + if (Ext.fly(east_id) == null){ + return 'east_region_config_error'; + } + return east_id; + } + + var east_panel_content_id = get_east_panel_content(); + if (east_panel_content_id.length > 0){ + var eastPanel = new Ext.Panel({ + region: 'east', + layout: 'auto', + //margins: '0 2 0 2', + width: 180, + collapsible: true, + split: true, + collapseMode: 'mini', + autoScroll: true, + contentEl: east_panel_content_id + }); + } else { + var eastPanel = new Ext.Panel({ + region: 'east', + layout: 'auto', + //margins: '0 2 0 2', + width: 180, + collapsible: true, + split: true, + hidden: true, + collapseMode: 'mini', + autoScroll: true + //contentEl: '' + }); + } + + //------------------------------- // Main Viewport Setup //------------------------------- @@ -113,13 +153,13 @@ $(document).ready(function(){ //autoScroll: true, layout: 'fit', margins: '2 2 2 2', - items: { + items: [{ //title: 'Inner Panel', contentEl: 'body_content', border: true, autoScroll: true - } - }] + }] + },eastPanel] }); //------------------------------- diff --git a/htsworkflow/frontend/templates/app_base.html b/htsworkflow/frontend/templates/app_base.html index 4e59ef5..a28e16c 100644 --- a/htsworkflow/frontend/templates/app_base.html +++ b/htsworkflow/frontend/templates/app_base.html @@ -72,6 +72,11 @@ {% include "magic.html" %} + {% block east_region %} +
+ {% endblock %} +
Check contents of div w/ id east_region_config, as the id supplied in text block does not exist.
+
{% block left_tbar_menu %} diff --git a/htsworkflow/frontend/templates/flowcell_libraries_app.html b/htsworkflow/frontend/templates/flowcell_libraries_app.html new file mode 100644 index 0000000..ef7c3e5 --- /dev/null +++ b/htsworkflow/frontend/templates/flowcell_libraries_app.html @@ -0,0 +1,29 @@ +{% extends "app_base.html" %} + +{% block additional_css %} + + {% if LANGUAGE_BIDI %}{% endif %} + {% block extrastyle %}{% endblock %} + {% block extrahead %}{% endblock %} + {% block blockbots %}{% endblock %} + +{% endblock %} + +{% block dynamic_panels %} + + +{% endblock %} + +{% block east_region %} +
changelist-filter
+{% endblock %} \ No newline at end of file