diff --git a/plasmid/source/core-plugins/newbrowser/1/as/webapps/newbrowser/html/img/chevron-down-icon.png b/plasmid/source/core-plugins/newbrowser/1/as/webapps/newbrowser/html/img/chevron-down-icon.png new file mode 100644 index 0000000000000000000000000000000000000000..c2253d249c996004a868b92d7b9cb6fa6e501f17 Binary files /dev/null and b/plasmid/source/core-plugins/newbrowser/1/as/webapps/newbrowser/html/img/chevron-down-icon.png differ diff --git a/plasmid/source/core-plugins/newbrowser/1/as/webapps/newbrowser/html/img/chevron-up-icon.png b/plasmid/source/core-plugins/newbrowser/1/as/webapps/newbrowser/html/img/chevron-up-icon.png new file mode 100644 index 0000000000000000000000000000000000000000..b564dd3cb0a4df26d964cc543a6a49130b852d7e Binary files /dev/null and b/plasmid/source/core-plugins/newbrowser/1/as/webapps/newbrowser/html/img/chevron-up-icon.png differ diff --git a/plasmid/source/core-plugins/newbrowser/1/as/webapps/newbrowser/html/img/eye-close-icon.png b/plasmid/source/core-plugins/newbrowser/1/as/webapps/newbrowser/html/img/eye-close-icon.png index 283ef9bc33aa85c61b17eeb4fbe7d4f6a0f7811e..573c252e1842050a7583c0dcb3bbfd5b8422bc93 100644 Binary files a/plasmid/source/core-plugins/newbrowser/1/as/webapps/newbrowser/html/img/eye-close-icon.png and b/plasmid/source/core-plugins/newbrowser/1/as/webapps/newbrowser/html/img/eye-close-icon.png differ diff --git a/plasmid/source/core-plugins/newbrowser/1/as/webapps/newbrowser/html/img/eye-open-icon.png b/plasmid/source/core-plugins/newbrowser/1/as/webapps/newbrowser/html/img/eye-open-icon.png index 1f612bd8c096770a97af5cb5f4e3f304c17a7b6e..9990da8b16876fc2bd756d09f9e3edfe41ca3c32 100644 Binary files a/plasmid/source/core-plugins/newbrowser/1/as/webapps/newbrowser/html/img/eye-open-icon.png and b/plasmid/source/core-plugins/newbrowser/1/as/webapps/newbrowser/html/img/eye-open-icon.png differ diff --git a/plasmid/source/core-plugins/newbrowser/1/as/webapps/newbrowser/html/img/hierarchy-icon.png b/plasmid/source/core-plugins/newbrowser/1/as/webapps/newbrowser/html/img/hierarchy-icon.png index 14d79935b79c6d5b7844c3dc74ed9a700bc58f5f..b3234cea853437d98995c7c007246a161ca7aa5e 100644 Binary files a/plasmid/source/core-plugins/newbrowser/1/as/webapps/newbrowser/html/img/hierarchy-icon.png and b/plasmid/source/core-plugins/newbrowser/1/as/webapps/newbrowser/html/img/hierarchy-icon.png differ diff --git a/plasmid/source/core-plugins/newbrowser/1/as/webapps/newbrowser/html/img/plus-sign-icon.png b/plasmid/source/core-plugins/newbrowser/1/as/webapps/newbrowser/html/img/plus-sign-icon.png new file mode 100644 index 0000000000000000000000000000000000000000..80cc9d7ccf59641a40df46e977520d91c1ed6152 Binary files /dev/null and b/plasmid/source/core-plugins/newbrowser/1/as/webapps/newbrowser/html/img/plus-sign-icon.png differ diff --git a/plasmid/source/core-plugins/newbrowser/1/as/webapps/newbrowser/html/js/views/Inspector.js b/plasmid/source/core-plugins/newbrowser/1/as/webapps/newbrowser/html/js/views/Inspector.js index 2b743a3c138accc667522a68dd7b861c33377b9a..8ec486817034209b39c6dbe80607d0dbe80b4cb9 100644 --- a/plasmid/source/core-plugins/newbrowser/1/as/webapps/newbrowser/html/js/views/Inspector.js +++ b/plasmid/source/core-plugins/newbrowser/1/as/webapps/newbrowser/html/js/views/Inspector.js @@ -262,10 +262,12 @@ function Inspector(serverFacade, containerId, profile) { if(withLinks) { - var printButton = "<span class='btn inspectorToolbar' style='float:right; margin: 2px;' onclick='mainController.inspector.printInspector(\""+entity.permId+"\")'><i class='icon-print'></i></span>"; + var printButton = "<span class='btn inspectorToolbar' style='float:right; margin: 2px;' onclick='javascript:mainController.inspector.printInspector(\""+entity.permId+"\")'><i class='icon-print'></i></span>"; inspector += printButton; - var viewButton = "<span class='btn inspectorToolbar' style='float:right; margin: 2px' onclick='mainController.changeView(\"showViewSamplePageFromPermId\",\""+entity.permId+"\")'><i class='icon-edit'></i></span>"; + var viewButton = "<span class='btn inspectorToolbar' style='float:right; margin: 2px' onclick='javascript:mainController.changeView(\"showViewSamplePageFromPermId\",\""+entity.permId+"\")'><i class='icon-edit'></i></span>"; inspector += viewButton; + var hierarchyButton = "<span class='btn inspectorToolbar' style='float:right; margin: 2px' onclick=\"javascript:mainController.changeView('showSampleHierarchyPage','"+entity.permId+"');\"><img src='./img/hierarchy-icon.png' style='width:16px; height:17px;' /></span>"; + inspector += hierarchyButton; } inspector += "<table id='" + entity.permId +"_TOOGLE' class='properties table table-condensed'>" diff --git a/plasmid/source/core-plugins/newbrowser/1/as/webapps/newbrowser/html/js/views/SampleForm.js b/plasmid/source/core-plugins/newbrowser/1/as/webapps/newbrowser/html/js/views/SampleForm.js index 1791040b0e253ea53ecbaf016c8e3e2ad8366435..128adea3acc0e9279754446905d65e48278d2171 100644 --- a/plasmid/source/core-plugins/newbrowser/1/as/webapps/newbrowser/html/js/views/SampleForm.js +++ b/plasmid/source/core-plugins/newbrowser/1/as/webapps/newbrowser/html/js/views/SampleForm.js @@ -313,6 +313,10 @@ function SampleForm(serverFacade, inspector, containerId, profile, sampleTypeCod return component; } + this.getHierarchyButton = function() { + return "<a class='btn' href=\"javascript:mainController.changeView('showSampleHierarchyPage','"+this.sample.permId+"');\"><img src='./img/hierarchy-icon.png' style='width:16px; height:17px;' /></a>"; + } + this.getEditButton = function() { return "<a id='editButton' class='btn'><i class='icon-edit'></i> Enable Editing</a>"; } @@ -320,8 +324,6 @@ function SampleForm(serverFacade, inspector, containerId, profile, sampleTypeCod this.enableEditButtonEvent = function() { var localReference = this; $( "#editButton" ).click(function() { - //localReference.mode = SampleFormMode.EDIT; - //localReference.init(); mainController.navigationBar.updateBreadCrumbToMinusOne(); mainController.changeView('showEditSamplePage',sample); }); @@ -364,21 +366,24 @@ function SampleForm(serverFacade, inspector, containerId, profile, sampleTypeCod var message = null; var pinButton = ""; var editButton = ""; + var hierarchyButton = ""; if (this.mode === SampleFormMode.CREATE) { message = "Create"; } else if (this.mode === SampleFormMode.EDIT) { message = "Update"; pinButton = this.getPINButton(); + hierarchyButton = this.getHierarchyButton(); sampleTypeDisplayName = sample.code; } else if (this.mode === SampleFormMode.VIEW) { message = "View"; pinButton = this.getPINButton(); + hierarchyButton = this.getHierarchyButton(); editButton = this.getEditButton(); sampleTypeDisplayName = sample.code; } - component += "<h2>" + message + " " + sampleTypeDisplayName + " " + pinButton + " " + editButton + "</h2>"; + component += "<h2>" + message + " " + sampleTypeDisplayName + " " + pinButton + " " + hierarchyButton + " " + editButton + "</h2>"; component += "<form class='form-horizontal' action='javascript:void(0);' onsubmit='mainController.currentView.createSample();'>"; @@ -428,7 +433,10 @@ function SampleForm(serverFacade, inspector, containerId, profile, sampleTypeCod component += "<div class='control-group'>"; component += "<label class='control-label' for='inputCode'>Code:</label>"; component += "<div class='controls'>"; - component += "<input type='text' placeholder='Code' id='sampleCode' pattern='[a-zA-Z0-9_\\-\\.]+' required> (Required) (Allowed characters are: letters, numbers, '-', '_', '.')"; + component += "<input type='text' placeholder='Code' id='sampleCode' pattern='[a-zA-Z0-9_\\-\\.]+' required> (Required)"; + if(this.mode === SampleFormMode.CREATE) { + component += " (Allowed characters are: letters, numbers, '-', '_', '.')"; + } component += "</div>"; component += "</div>"; @@ -702,7 +710,12 @@ function SampleForm(serverFacade, inspector, containerId, profile, sampleTypeCod } var callbackOk = function() { - Util.unblockUI(); + mainController.changeView('showSamplesPage', localReference.sampleTypeCode); +// TO-DO: The Sample is not necessarily searchable after creation since the index runs asynchronously +// localReference.serverFacade.searchWithType(localReference.sampleTypeCode, $("#sampleCode")[0].value, function(data) { +// mainController.navigationBar.updateBreadCrumbToMinusOne(); +// mainController.changeView('showViewSamplePageFromPermId',data[0].permId); +// }); } Util.showSuccess(sampleTypeDisplayName + " " + message, callbackOk); diff --git a/plasmid/source/core-plugins/newbrowser/1/as/webapps/newbrowser/html/js/views/SampleHierarchy.js b/plasmid/source/core-plugins/newbrowser/1/as/webapps/newbrowser/html/js/views/SampleHierarchy.js index e60a4269fba47667f034b2d0eef1071aff2ed38b..323294f4e1db741bc976f149c718bc2874c5b269 100644 --- a/plasmid/source/core-plugins/newbrowser/1/as/webapps/newbrowser/html/js/views/SampleHierarchy.js +++ b/plasmid/source/core-plugins/newbrowser/1/as/webapps/newbrowser/html/js/views/SampleHierarchy.js @@ -413,18 +413,18 @@ function SampleHierarchy(serverFacade, inspector, containerId, profile, sample) var $dataLink = $('<a>', { 'href' : "javascript:mainController.currentView._updateDataFor(" + ((sample.showDataOnGraph)?false:true) + ",'" + sample.permId + "');" }).append( - $('<i>', { - 'class' : (sample.showDataOnGraph)?'icon-chevron-up':'icon-chevron-down', - 'style' : 'cursor:pointer', - })); + $('<img>', { + 'src' : (sample.showDataOnGraph)?'./img/chevron-up-icon.png':'./img/chevron-down-icon.png', + 'style' : 'cursor:pointer; width:13px; height:18px;', + })); var $addChildLink = $('<a>', { 'href' : "javascript:mainController.currentView._addChildFor('" + sample.permId + "');" }).append( - $('<i>', { - 'class' : 'icon-plus-sign', - 'style' : 'cursor:pointer', - })); + $('<img>', { + 'src' : './img/plus-sign-icon.png', + 'style' : 'cursor:pointer; width:13px; height:18px;', + })); var $sampleLink = $('<a>', { 'href' : "javascript:mainController.changeView('showViewSamplePageFromPermId', '" + sample.permId + "')"}).html(sample.code); diff --git a/plasmid/source/core-plugins/newbrowser/1/as/webapps/newbrowser/html/js/views/SampleTable.js b/plasmid/source/core-plugins/newbrowser/1/as/webapps/newbrowser/html/js/views/SampleTable.js index e880251524b5d481a2783f899cd5e97759b1c75c..e0c68f5a06f612ae7a0e16ceeb2289f3e47ce2a4 100644 --- a/plasmid/source/core-plugins/newbrowser/1/as/webapps/newbrowser/html/js/views/SampleTable.js +++ b/plasmid/source/core-plugins/newbrowser/1/as/webapps/newbrowser/html/js/views/SampleTable.js @@ -452,7 +452,7 @@ function SampleTable(serverFacade, sampleTableId, profile, sampleTypeCode, inspe } if(localReference.enableEdit) { - tableFields[tableFields.length] = "<a class='btn' href=\"javascript:mainController.changeView('showSampleHierarchyPage','"+sample.permId+"');\"><img src='./img/hierarchy-icon.png' style='width:16px; height:22px;' /></a>"; + tableFields[tableFields.length] = "<a class='btn' href=\"javascript:mainController.changeView('showSampleHierarchyPage','"+sample.permId+"');\"><img src='./img/hierarchy-icon.png' style='width:16px; height:17px;' /></a>"; tableFields[tableFields.length] = ""; } else { tableFields[tableFields.length] = "";