Commit 681a8c50 authored by Adrien PARROT's avatar Adrien PARROT
Browse files

multicombobox in searchPage

parent ec64deba
......@@ -31,10 +31,10 @@ sap.ui.jsview("conceptmapper.CSVPage", {
}) ]
});
var oUpload = new sap.ui.unified.FileUploader().addStyleClass("searchPage");
var oUpload = new sap.ui.unified.FileUploader().addStyleClass("CSVPage");
var oButton = new sap.m.Button({
text:"{i18n>CSV_upload}"
}).addStyleClass("searchPage");
}).addStyleClass("CSVPage");
var oPage = new sap.m.Page({
title : "{i18n>app_head}",
......
......@@ -7,7 +7,7 @@ sap.ui.controller("conceptmapper.searchPage", {
*/
onInit: function() {
var oData1 = {
var oData1 = {
"names" : [ {
concept_id : "aparrot",
concept_name : "toto",
......@@ -32,7 +32,49 @@ sap.ui.controller("conceptmapper.searchPage", {
var oModel = new sap.ui.model.json.JSONModel(oData1);
sap.ui.getCore().setModel(oModel, "concept");
sap.ui.getCore().byId("__container1-Master").addStyleClass('searchPage');
var oModel = new sap.ui.model.json.JSONModel();
var mData = {
"selected" : [],
"items" : [{
"key" : "Condition",
"text" : "Condition"
},
{
"key" : "Device",
"text" : "Device"
},
{
"key" : "Cost",
"text" : "Cost"
}]
};
oModel.setData(mData);
sap.ui.getCore().setModel(oModel, "domain");
var oModel = new sap.ui.model.json.JSONModel();
var mData = {
"selected" : [],
"items" : [{
"key" : "SNOMED",
"text" : "SNOMED"
},
{
"key" : "LOINC",
"text" : "LOINC"
},
{
"key" : "PCORNET",
"text" : "PCORNET"
}]
};
oModel.setData(mData);
sap.ui.getCore().setModel(oModel, "vocabulary");
},
/**
......
......@@ -183,11 +183,64 @@ sap.ui.jsview("conceptmapper.searchPage", {
enabled: true,
text: "Valid concepts"
});
var oItemTemplateDomain = new sap.ui.core.Item({
key : "{domain>key}",
text : "{domain>text}",
enabled : "{domain>enabled}"
});
var oDomainMCB = new sap.m.MultiComboBox({
id : "oDomainMCB",
//width : "400px",
placeholder : "Choose your domain",
items : {
path : "domain>/items",
template : oItemTemplateDomain
},
selectedKeys : {
path : "domain>/selected",
template : "{domain>selected}"
},
// change : function(oControlEvent) {
// jQuery.sap.log.info('Event fired: "change" value property to ' + oControlEvent.getParameter("value") + " on "
// + this);
// },
// selectionChange : function(oControlEvent) {
// jQuery.sap.log.info('Event fired: "selectionChange" value property to ' + oControlEvent.getParameter("changedItem")
// + " with selected=" + oControlEvent.getParameter("selected") + " on " + this);
// },
// selectionFinish : function(oControlEvent) {
// jQuery.sap.log.info('Event fired: "selectionFinish" value property to ' + oControlEvent.getParameter("selectedItems")
// + " on " + this);
// }
});
var oItemTemplateVoc = new sap.ui.core.Item({
key : "{vocabulary>key}",
text : "{vocabulary>text}",
enabled : "{vocabulary>enabled}"
});
var oVocMCB = new sap.m.MultiComboBox({
id : "oVocMCB",
//width : "400px",
placeholder : "Choose your vocabulary",
items : {
path : "vocabulary>/items",
template : oItemTemplateVoc
},
selectedKeys : {
path : "vocabulary>/selected",
template : "{vocabulary>selected}"
},
});
// domain, standard, vocabulary => MultiComboBox
var oMasterPage = new sap.m.Page({
title : "Filters",
content : [ oStandardCB, oValidCB ]
content : [ oStandardCB, oValidCB, oDomainMCB, oVocMCB ]
});
......
.searchPage {
width: 40% !important;
margin-left: 30% !important;
width: 20% !important;
}
.CSVPage {
width: 55% !important;
padding-left:36% !important;
}
\ No newline at end of file
......@@ -10,9 +10,9 @@ CSV_upload=Upload File
research=Search
#userPage
app_subhead_csv=manage users (you can only select one user)
create_user=Create user
update_user=Update user's data
delete_user=Delete user
create_user=Create
update_user=Update
delete_user=Delete
username=Username
password=Password
firtname=Firtname
......@@ -21,9 +21,9 @@ address=Address
email=Email
#searchPage
app_subhead_search=Research concept page
create_concept=Create concept
update_concept=Update concept
delete_concept=Delete concept
create_concept=Create
update_concept=Update
delete_concept=Delete
concept_id=Id
concept_code=Concept_code
concept_name=Name
......
......@@ -10,9 +10,9 @@ CSV_upload=Telechargement
research=Recherche
#userPage
app_subhead_csv=Utilisateurs (un seul utilisateur peut etre selectionne a la fois)
create_user=Creation d'un utilisateur
update_user=Mise a jour d'un utilisateur
delete_user=Suppression d'un utilisateur
create_user=Creation
update_user=Actualisation
delete_user=Suppression
username=Username
password=Mot de passe
firstname=Prenom
......@@ -21,9 +21,9 @@ address=Adresse
email=email
#searchPage
app_subhead_search=Recherche des concepts
create_concept=Creer un concept
update_concept=Mise a jour d'un concept
delete_concept=Suprression d'un concept
create_concept=Creation
update_concept=Actualisation
delete_concept=Suppression
concept_id=Id
concept_code=Concept_code
concept_name=Nom
......
......@@ -17,7 +17,7 @@
// create an app
var app = new sap.m.App({
initialPage : "idSearchPage"
initialPage : "idHomePage"
});
// Adding all the pages to the app
......@@ -41,7 +41,8 @@
viewName : "conceptmapper.CSVPage",
type : sap.ui.core.mvc.ViewType.JS
}));
//var shell = new sap.m.Shell();
//shell.setApp(app);
app.placeAt("content");
</script>
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment