Lamloumi Afif
Lamloumi Afif

Reputation: 9081

Adding a new field in the DhtmlX library

i'd like to add these fields in the lightbox in ``DHTMLX` library ( note ( textarea), status(Listbox), type(listbox))

initial

in which javascript file i have to add these fields?

Upvotes: 1

Views: 783

Answers (2)

Paul
Paul

Reputation: 1656

If you use dhtmlxScheduler for .NET(which comes with DHTMLX.dll), controls must be added with c#, not javascript. There is several classes for lightbox controls, and they can be used pretty easy

        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);

Here is overall docs http://scheduler-net.com/docs/lightbox.html If you have the trial package of the scheduler, check Samplese/Scheduler.MVC3/Controllers/AddRangeController.cs , there is an example of usage.

If you useing client-side component, here is related doc http://docs.dhtmlx.com/scheduler/lightbox_editors.html

Modifying the source files is not recomended, since it will cause troubles with updating to newer version of the component.

FYI, i work for DHTMLX

Upvotes: 1

Lamloumi Afif
Lamloumi Afif

Reputation: 9081

I found this solution: Modify the file dhtmlxscheduler.js i mean section fields :

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"}
        ]
    },

and

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",

Upvotes: 0

Related Questions