1

我想在“DHTMLX”库的灯箱中添加这些字段(注释(文本区域)、状态(列表框)、类型(列表框))

最初的

我必须在哪个 javascript 文件中添加这些字段?

4

2 回答 2

1

如果您使用 .NET 的 dhtmlxScheduler(随 DHTMLX.dll 提供),则必须使用 c# 而不是 javascript 添加控件。灯箱控件有几个类,它们可以很容易地使用

        var scheduler = new DHXScheduler(this);
        var select = new LightboxSelect("type", "Type");
        select.AddOptions(new List<object>{
            new { key = 1, label = "Job" },
            new { key = 2, label = "Family" },
            new { key = 3, label = "Other" }
        });
        scheduler.Lightbox.Add(select);

这是整体文档http://scheduler-net.com/docs/lightbox.html 如果您有调度程序的试用包,请查看 Samplese/Scheduler.MVC3/Controllers/AddRangeController.cs ,有一个使用示例。

如果您使用客户端组件,这里是相关文档 http://docs.dhtmlx.com/scheduler/lightbox_editors.html

不建议修改源文件,因为它会导致更新到较新版本的组件时出现问题。

仅供参考,我为 DHTMLX 工作

于 2013-07-09T16:11:17.573 回答
0

我找到了这个解决方案:修改文件dhtmlxscheduler.js 我的意思是 section字段:

lightbox: {
        sections: [
            { name: "description", height: 40, map_to: "text", type: "textarea", focus: true },
            { name: "Note", height: 40, map_to: "text", type: "textarea", focus: true },
            { name: "Status", height: 40, map_to: "text", type: "textarea", focus: true },
            { name: "Type", height: 40, map_to: "text", type: "textarea", focus: true },
            { name: "Sequence", height: 40, map_to: "text", type: "textarea", focus: true },
            {name: "time", height: 72, type: "time", map_to: "auto"}
        ]
    },

labels:{
        dhx_cal_today_button:"Today",
        day_tab:"Day",
        week_tab:"Week",
        month_tab:"Month",
        new_event:"Nouvelle Tache",
        icon_save:"Save",
        icon_cancel:"Cancel",
        icon_details:"Details",
        icon_edit:"Edit",
        icon_delete:"Delete",
        confirm_closing:"",//Your changes will be lost, are your sure ?
        confirm_deleting:"Event will be deleted permanently, are you sure?",
        section_description: "Description",
        section_Note: "Note",
        section_Status: "Status",
        section_Type: "Type",
        section_Sequence: "Sequence",
        section_time:"Periode",
于 2013-07-09T16:04:26.893 回答