SAPUI5计划日历需要一行预约
我想用SAPUI5的计划日历。但是,当我切换到周视图时,我遇到了一个问题。在这里,紧密相连的约会用新行书写。但我不想要这种行为。所有的预约都应该一个接一个地写,即使我不能再阅读预约的内容。 似乎有一个预约的最小宽度。但是我找不到办法改变这个约会。 有人知道我怎样才能一个接一个地预约吗 挫折观 为属性BuiltinView设置新值 将预定义视图列表定义为数组。视图应该由它们的键指定 默认预定义视图及其键可在sap.m.PlanningCalendarBuiltInView中找到 注意:如果设置,所有指定视图将与任何自定义视图(如果可用)一起显示。如果未设置且没有可用的自定义视图,则将显示所有默认视图。如果未设置且有任何自定义视图可用,则仅显示自定义视图 当使用null或undefined值调用时,将恢复属性的默认值 默认值为[] 你要找的是某种调整——sap.m.PlanningCalendarBuiltInView.Week 还没有解决,我会寻找解决方案的!祝你一切顺利SAPUI5计划日历需要一行预约,sapui5,width,appointment,Sapui5,Width,Appointment,我想用SAPUI5的计划日历。但是,当我切换到周视图时,我遇到了一个问题。在这里,紧密相连的约会用新行书写。但我不想要这种行为。所有的预约都应该一个接一个地写,即使我不能再阅读预约的内容。 似乎有一个预约的最小宽度。但是我找不到办法改变这个约会。 有人知道我怎样才能一个接一个地预约吗 挫折观 为属性BuiltinView设置新值 将预定义视图列表定义为数组。视图应该由它们的键指定 默认预定义视图及其键可在sap.m.PlanningCalendarBuiltInView中找到 注意:如果设置,
sap.ui.define([
'sap/ui/core/mvc/Controller',
'sap/ui/model/json/JSONModel',
'sap/m/Dialog',
'sap/m/Button'
],
function(Controller, JSONModel,Dialog, Button) {
"use strict";
var PageController = Controller.extend("sample1.View1", {
onInit: function () {
// create model
var oModel = new JSONModel();
oModel.setData({
startDate: new Date("2015", "11", "15", "8", "0"),
people: [
{
pic: "sap-icon://employee",
name: "John Doe",
role: "team member",
appointments: [
{
start: new Date("2015", "11", "15", "08", "30"),
end: new Date("2015", "11", "15", "10", "30"),
title: "Meeting",
type: "Type02",
tentative: false
},
{
start: new Date("2015", "11", "15", "10", "30"),
end: new Date("2015", "11", "15", "12", "0"),
title: "Team meeting",
info: "room 1",
type: "Type01",
pic: "sap-icon://sap-ui5",
tentative: false
},
{
start: new Date("2015", "11", "15", "12", "00"),
end: new Date("2015", "11", "15", "13", "30"),
title: "Lunch",
type: "Type03",
tentative: true
}
]
}
]
});
this.getView().setModel(oModel);
},
handleAppointmentSelect: function (oEvent) {
var oAppointment = oEvent.getParameter("appointment");
if (oAppointment) {
alert("Appointment selected: " + oAppointment.getTitle());
}else {
var aAppointments = oEvent.getParameter("appointments");
var sValue = aAppointments.length + " Appointments selected";
alert(sValue);
}
},
handleIntervalSelect:function(oEvent){
var dialogData = {
newEntry: {
start: oEvent.getParameter("startDate"),
end: oEvent.getParameter("endDate"),
title: "",
info: "",
type: "Type01",
pic: "sap-icon://sap-ui5",
tentative: false
},
people: this.getView().getModel().getProperty("/people").map(function(p,i){ return { name: p.name, index: i, selected: true }; }) //A List of all people. All selected by default.
};
var dialogModel = new JSONModel(dialogData);
var that = this;
var planningDialog = new Dialog({
title:"Add Appointment",
content: sap.ui.xmlview({viewName:"sample1.AppointmentDialog"}).setModel(dialogModel),
leftButton: new Button({
text: "Cancel",
press: function(){
planningDialog.close();
planningDialog.destroy();
}}),
rightButton: new Button({
text: "Save",
type: "Accept",
press: function(){
planningDialog.close();
that.addAppointment(dialogData);
}}),
});
planningDialog.open();
},
addAppointment:function(data){
var model = this.getView().getModel();
var peopleList = model.getProperty("/people");
data.people
.filter(function(p){return p.selected;})
.forEach(function(p){
peopleList[p.index].appointments.push(data.newEntry);
});
model.setProperty("/people",peopleList); //Updates Bindings
}
});
return PageController;
});