diff --git a/plasmid/source/core-plugins/newbrowser/1/as/initialize-master-data.py b/plasmid/source/core-plugins/newbrowser/1/as/initialize-master-data.py index 28ead11151fdb4f72b33644ac81ac278ebc1f34a..c7082b6178776593aae2492001f01d8b3bebf49a 100644 --- a/plasmid/source/core-plugins/newbrowser/1/as/initialize-master-data.py +++ b/plasmid/source/core-plugins/newbrowser/1/as/initialize-master-data.py @@ -69,16 +69,20 @@ def addProperty(entity, propertyCode, section, propertyLabel, dataType, vocabula if propertyCode in propertiesCache: property = propertiesCache[propertyCode]; else: - property = tr.getOrCreateNewPropertyType(propertyCode, dataType); - property.setDescription(propertyDescription); - property.setLabel(propertyLabel); - propertiesCache[propertyCode] = property; - if dataType == DataType.CONTROLLEDVOCABULARY: - property.setVocabulary(vocabulariesCache[vocabularyCode]); + property = createProperty(propertyCode, dataType, propertyLabel, propertyDescription, vocabularyCode); propertyAssignment = tr.assignPropertyType(entity, property); propertyAssignment.setSection(section); +def createProperty(propertyCode, dataType, propertyLabel, propertyDescription, vocabularyCode): + property = tr.getOrCreateNewPropertyType(propertyCode, dataType); + property.setDescription(propertyDescription); + property.setLabel(propertyLabel); + propertiesCache[propertyCode] = property; + if dataType == DataType.CONTROLLEDVOCABULARY: + property.setVocabulary(vocabulariesCache[vocabularyCode]); + return property; + ## ## Vocabulary Types ## @@ -346,6 +350,22 @@ createVocabularyWithTerms("MACHINE", [ ["LIGHT_CYCLER", "LightCycler 480"] ]); +createVocabularyWithTerms("PLASMID_RELATIONSHIP", [ + ["DELETION", "Deletion"], + ["INTEGRATION", "Integration"], + ["MODIFICATION", "Modification"], + ["OTHER", "Other"] + ]); + +## +## Property Types for annotations +## + +createProperty("COMMENTS", DataType.VARCHAR, "Comments", "", None); +createProperty("QUANTITY", DataType.VARCHAR, "Quantity", "", None); +createProperty("PLASMID_ANNOTATION", DataType.VARCHAR, "Plasmid annotation", "", None); +createProperty("PLASMID_RELATIONSHIP", DataType.CONTROLLEDVOCABULARY, "Plasmid relationship", "", "PLASMID_RELATIONSHIP"); + ## ## DataSet Types ## diff --git a/plasmid/source/core-plugins/newbrowser/1/as/webapps/newbrowser/html/index.html b/plasmid/source/core-plugins/newbrowser/1/as/webapps/newbrowser/html/index.html index 0b15e4c6532a254db4b4a34826c967806637cdbb..d8136b81916dcddd85076c7b5db6a439c4f6cb57 100644 --- a/plasmid/source/core-plugins/newbrowser/1/as/webapps/newbrowser/html/index.html +++ b/plasmid/source/core-plugins/newbrowser/1/as/webapps/newbrowser/html/index.html @@ -160,7 +160,6 @@ var profile = new StandardProfile(); - // // Global variables // diff --git a/plasmid/source/core-plugins/newbrowser/1/as/webapps/newbrowser/html/js/config/StandardProfile.js b/plasmid/source/core-plugins/newbrowser/1/as/webapps/newbrowser/html/js/config/StandardProfile.js index 2b2f0d800b82c755665bc0ea73e79a4f25284119..786f4f39bc65c39816f7124d957c4c6bacc0eeb3 100644 --- a/plasmid/source/core-plugins/newbrowser/1/as/webapps/newbrowser/html/js/config/StandardProfile.js +++ b/plasmid/source/core-plugins/newbrowser/1/as/webapps/newbrowser/html/js/config/StandardProfile.js @@ -7,48 +7,48 @@ $.extend(StandardProfile.prototype, DefaultProfile.prototype, { init: function(serverFacade){ DefaultProfile.prototype.init.call(this, serverFacade); - this.inventorySpaces = ["INVENTORY"]; +// this.inventorySpaces = ["INVENTORY"]; - this.storagesConfiguration = { - "isEnabled" : true, - /* - * Should be the same across all storages, if not correct behaviour is not guaranteed. - */ - "STORAGE_PROPERTIES": [{ - "STORAGE_PROPERTY_GROUP" : "Storage Utility", //Where the storage will be painted. - "STORAGE_GROUP_DISPLAY_NAME" : "Storage Utility", //Storage Group Name - "NAME_PROPERTY" : "FREEZER_NAME", //Should be a Vocabulary. - "ROW_PROPERTY" : "ROW", //Should be an integer. - "COLUMN_PROPERTY" : "COLUMN", //Should be an integer. - "BOX_PROPERTY" : "BOX_NUMBER", //Should be text. - "USER_PROPERTY" : "USER_PROPERTY" //Should be text. - }], - /* - * Storages map, can hold configurations for several storages. - */ - "STORAGE_CONFIGS": { - "MINUS80_1" : { //Freezer name given by the NAME_PROPERTY - "ROW_NUM" : 9, //Number of rows - "COLUMN_NUM" : 9, //Number of columns - "BOX_NUM" : 3 //Boxes on each rack, used for validation, to avoid validation increase the number to 9999 for example - }, - "MINUS80_2" : { //Freezer name given by the NAME_PROPERTY - "ROW_NUM" : 9, //Number of rows - "COLUMN_NUM" : 9, //Number of columns - "BOX_NUM" : 3 //Boxes on each rack, used for validation, to avoid validation increase the number to 9999 for example - }, - "MINUS820_1" : { //Freezer name given by the NAME_PROPERTY - "ROW_NUM" : 9, //Number of rows - "COLUMN_NUM" : 9, //Number of columns - "BOX_NUM" : 3 //Boxes on each rack, used for validation, to avoid validation increase the number to 9999 for example - }, - "BENCH" : { //Freezer name given by the NAME_PROPERTY - "ROW_NUM" : 1, //Number of rows - "COLUMN_NUM" : 1, //Number of columns - "BOX_NUM" : 99999 //Boxes on each rack, used for validation, to avoid validation increase the number to 9999 for example - } - } - }; +// this.storagesConfiguration = { +// "isEnabled" : true, +// /* +// * Should be the same across all storages, if not correct behaviour is not guaranteed. +// */ +// "STORAGE_PROPERTIES": [{ +// "STORAGE_PROPERTY_GROUP" : "Storage Utility", //Where the storage will be painted. +// "STORAGE_GROUP_DISPLAY_NAME" : "Storage Utility", //Storage Group Name +// "NAME_PROPERTY" : "FREEZER_NAME", //Should be a Vocabulary. +// "ROW_PROPERTY" : "ROW", //Should be an integer. +// "COLUMN_PROPERTY" : "COLUMN", //Should be an integer. +// "BOX_PROPERTY" : "BOX_NUMBER", //Should be text. +// "USER_PROPERTY" : "USER_PROPERTY" //Should be text. +// }], +// /* +// * Storages map, can hold configurations for several storages. +// */ +// "STORAGE_CONFIGS": { +// "MINUS80_1" : { //Freezer name given by the NAME_PROPERTY +// "ROW_NUM" : 9, //Number of rows +// "COLUMN_NUM" : 9, //Number of columns +// "BOX_NUM" : 3 //Boxes on each rack, used for validation, to avoid validation increase the number to 9999 for example +// }, +// "MINUS80_2" : { //Freezer name given by the NAME_PROPERTY +// "ROW_NUM" : 9, //Number of rows +// "COLUMN_NUM" : 9, //Number of columns +// "BOX_NUM" : 3 //Boxes on each rack, used for validation, to avoid validation increase the number to 9999 for example +// }, +// "MINUS820_1" : { //Freezer name given by the NAME_PROPERTY +// "ROW_NUM" : 9, //Number of rows +// "COLUMN_NUM" : 9, //Number of columns +// "BOX_NUM" : 3 //Boxes on each rack, used for validation, to avoid validation increase the number to 9999 for example +// }, +// "BENCH" : { //Freezer name given by the NAME_PROPERTY +// "ROW_NUM" : 1, //Number of rows +// "COLUMN_NUM" : 1, //Number of columns +// "BOX_NUM" : 99999 //Boxes on each rack, used for validation, to avoid validation increase the number to 9999 for example +// } +// } +// }; /* New Sample definition tests*/ this.sampleTypeDefinitionsExtension = { diff --git a/plasmid/source/core-plugins/newbrowser/1/as/webapps/newbrowser/html/js/views/legacy/SampleLinksWidget.js b/plasmid/source/core-plugins/newbrowser/1/as/webapps/newbrowser/html/js/views/legacy/SampleLinksWidget.js index 55f6e3b172bb5769a2f377df6eacb1331ce6bfbf..1a0b89516b08068b97ea16af127f051f7faf4308 100644 --- a/plasmid/source/core-plugins/newbrowser/1/as/webapps/newbrowser/html/js/views/legacy/SampleLinksWidget.js +++ b/plasmid/source/core-plugins/newbrowser/1/as/webapps/newbrowser/html/js/views/legacy/SampleLinksWidget.js @@ -399,9 +399,6 @@ function SampleLinksWidget(containerId, profile, serverFacade, title, sampleType } this._getPlus = function() { - if(this.isDisabled) { - return ""; - } var id = this.containerId + "-plus-button"; var tableId = id + "-table"; var $component = $("<div>", { "id" : id, "class" : "form-group", "style" : 'padding: 10px 0px 0px 10px'} );