diff --git a/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/controllers/LayoutManager.js b/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/controllers/LayoutManager.js index 8fc3789e3c352b47fc6e47eed856eb68a271e01e..2ccc6fad522362a4bac3dc7723a01555785aea97 100644 --- a/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/controllers/LayoutManager.js +++ b/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/controllers/LayoutManager.js @@ -305,6 +305,7 @@ var LayoutManager = { } if (view.header) { + view.header.css("height", 157); this.firstColumn.append(view.header); } diff --git a/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/controllers/MainController.js b/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/controllers/MainController.js index 0e8a774979f10b88959c3a7daa3246bd324d6302..5e1100ef3ab1b45c7158c19210b234817890a7de 100644 --- a/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/controllers/MainController.js +++ b/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/controllers/MainController.js @@ -608,7 +608,10 @@ function MainController(profile) { if(withContentOrContentId) { content = $("<div>"); - content.css("padding", "10px"); + content.css({ + "padding" : "10px", + "height" : "100%" + }); if((typeof withContentOrContentId === 'string' || withContentOrContentId instanceof String)) { content.attr("id", withContentOrContentId); } @@ -701,8 +704,8 @@ function MainController(profile) { //Show View var localInstance = this; this.serverFacade.searchWithUniqueId(permId, function(data) { - var content = localInstance._getBackwardsCompatibleMainContainer("container-sample-hierarchy"); - var sampleHierarchy = new SampleHierarchy(localInstance.serverFacade, "container-sample-hierarchy", localInstance.profile, data[0]); + var views = localInstance._getNewViewModel(true, true, false); + var sampleHierarchy = new SampleHierarchy(localInstance.serverFacade, views, localInstance.profile, data[0]); sampleHierarchy.init(); localInstance.currentView = sampleHierarchy; }); diff --git a/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/views/SampleHierarchyTable/widgets/HierarchyFilterView.js b/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/views/SampleHierarchyTable/widgets/HierarchyFilterView.js index 4d21e9ef4dbb8de886922dea47ae4d0d0a73522a..f7cfd0b4835b4af99b00e950ae44d9ce952943b3 100644 --- a/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/views/SampleHierarchyTable/widgets/HierarchyFilterView.js +++ b/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/views/SampleHierarchyTable/widgets/HierarchyFilterView.js @@ -54,8 +54,6 @@ function HierarchyFilterView(controller, model) { .append($filtersFormSliderParents) .append("<span style='padding-right:15px;'></span>") .append(' Show Types: ') - .append($filtersFormSampleTypes) - .append("<span style='position:absolute; left:30px; top:80px;'><svg height='100' width='100'><g id='svgControls'/></svg></span>"); - + .append($filtersFormSampleTypes); } } \ No newline at end of file diff --git a/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/views/legacy/SampleHierarchy.js b/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/views/legacy/SampleHierarchy.js index a7950b2e8658ff5038906e0558311a3c2f3664da..fbf0d6cdacb7936ddb4266432759459f812be6bf 100644 --- a/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/views/legacy/SampleHierarchy.js +++ b/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/views/legacy/SampleHierarchy.js @@ -14,10 +14,10 @@ * limitations under the License. */ -function SampleHierarchy(serverFacade, containerId, profile, sample) { +function SampleHierarchy(serverFacade, views, profile, sample) { this.nodeIdPrefix = "HIERARCHY_NODE_"; this.serverFacade = serverFacade; - this.containerId = containerId; + this.views = views; this.profile = profile; this.sample = sample; this.hierarchyFilterController = null; @@ -28,16 +28,19 @@ function SampleHierarchy(serverFacade, containerId, profile, sample) { this.repaint = function() { var localInstance = this; - $('#'+this.containerId).empty(); + this.views.header.empty(); + this.views.content.empty(); - var $form = $("<div>", { "style" : "margin-top: 20px;"}); - $('#'+this.containerId).append($form); - var $formColumn = $("<div>"); + var $form = $("<div>"); + this.views.content.append($form); + var $formColumn = $("<div>"); + $formColumn.append("<span><svg height='100' width='100'><g id='svgControls'/></svg></span>"); $form.append($formColumn); - localInstance.hierarchyFilterController = new HierarchyFilterController(this.sample, function() { - localInstance.filterSampleAndUpdate(); - }); - localInstance.hierarchyFilterController.init($formColumn); + + + views.header.append($("<h1>").append("" + ELNDictionary.Sample + " Hierarchy Graph for " + this.sample.identifier)); + localInstance.hierarchyFilterController = new HierarchyFilterController(this.sample, function() { localInstance.filterSampleAndUpdate(); }); + localInstance.hierarchyFilterController.init(views.header); $formColumn.append($('<div>', { 'id' : 'graphContainer' })); @@ -45,6 +48,8 @@ function SampleHierarchy(serverFacade, containerId, profile, sample) { this.filterSampleAndUpdate(); + + //Add SVG Map Controls var path1 = this._makeSVG('path', {'class' : 'svgButton', 'stroke-linecap':'round', 'stroke-miterlimit':'6', 'onclick':'javascript:mainController.currentView.pan( 0, 50);', 'd':'M50 10 l12 20 a40, 70 0 0,0 -24, 0z', 'stroke-width':'1.5', 'fill':'#0088CC', 'stroke': '#0088CC' }); var path2 = this._makeSVG('path', {'class' : 'svgButton', 'stroke-linecap':'round', 'stroke-miterlimit':'6', 'onclick':'javascript:mainController.currentView.pan( 50, 0);', 'd':'M10 50 l20 -12 a70, 40 0 0,0 0, 24z', 'stroke-width':'1.5', 'fill':'#0088CC', 'stroke': '#0088CC' }); @@ -69,8 +74,8 @@ function SampleHierarchy(serverFacade, containerId, profile, sample) { .append(rect3); //Centers SVG image if is smaller than the max size of the container. - var containerWidth = $(document).width() - $("#sideMenu").width() - 20; - var containerHeight = $(document).height() - 120; + var containerWidth = this.views.content.width(); + var containerHeight = this.views.content.height(); var realWidth = $('#svgMap')[0].getBoundingClientRect().width; var realHeight = $('#svgMap')[0].getBoundingClientRect().height; @@ -419,8 +424,8 @@ function SampleHierarchy(serverFacade, containerId, profile, sample) { .rankDir("TB"); //VMG Map container max size on screen - var containerWidth = $(document).width() - $("#sideMenu").width() - 20; - var containerHeight = $(document).height() - 120; + var containerWidth = this.views.content.width(); + var containerHeight = this.views.content.height(); //Render Layout renderer.layout(layout).run(g, svgG);