jQWidgets Forums

Forum Replies Created

Viewing 1 post (of 1 total)
  • Author
    Posts

  • luna80
    Participant

    thanks for the reply!

    This is my code, I don’t add custom css…that’s all

    $("#div_agenda").jqxScheduler({
    			date: new $.jqx.date(),
    			width: '100%',
    			height: 1000,
    			source: adapter,
    			view: 'weekView',
    			showLegend: true,
    			localization: localizationobj,
    			editDialog: true,
    			contextMenu: true,
    			editDialogDateTimeFormatString: 'dd-MM-yyyy HH:mm',
    			appointmentDataFields:
    			{
    				date: "dataDa",
    				from: "dataDa",
    				to: "dataA",
    				id: "id",
    				subject: "titolo",
    				description: "informazioni",
    				location: "luogo",
    				tooltip: "tooltip"
    				
    			},
    			editDialogCreate: function (dialog, fields, editAppointment) {
    				fields.subjectLabel.html("Titolo");
    				fields.locationLabel.html("Luogo");
    				fields.fromLabel.html("Inizio");
    				fields.toLabel.html("Fine");
    				fields.descriptionLabel.html("Informazioni");
    				fields.toLabel.html("Fine");
    				fields.repeatContainer.hide();
    				fields.statusContainer.hide();
    				fields.timeZoneContainer.hide();
    				fields.resourceContainer.hide();
    				fields.allDayContainer.hide();
    				fields.colorContainer.hide();
    			},
    			editDialogOpen: function (dialog, fields, editAppointment) {
    				//fields.saveButton.click(function()
    				//{
    				//});
                },
    			editDialogClose: function (dialog, fields, editAppointment) {
    			},
    			editDialogKeyDown: function (dialog, fields, editAppointment, event) {
    			},
    			contextMenuCreate: function(menu, settings)
    			{
    				var source = settings.source;
                    source.push({ label: "Elimina evento", id: "delete" });
    				for (let i = 0; i < source.length; i++) {
    					if(source[i]["id"] == "editAppointment")
    						source[i]["label"] = "Modifica evento";
    					else if(source[i]["id"] == "createAppointment")
    						source[i]["label"] = "Nuovo evento";
    				}
    			},
    			contextMenuItemClick: function (menu, appointment, event)
    			{
    				var args = event.args;
    				switch (args.id) {
    					case "create":
    						$("#div_agenda").jqxScheduler('createAppointment', appointment.id);
    						return true;
    					case "edit":
    						$("#div_agenda").jqxScheduler('editAppointment', appointment.id);
    						return true;
    					case "delete":
    						$("#div_agenda").jqxScheduler('deleteAppointment', appointment.id);
    						return true;
    				}
    			},
    			contextMenuOpen: function (menu, appointment, event) {
    				if (!appointment) {
    					menu.jqxMenu('hideItem', 'editAppointment');
    					menu.jqxMenu('hideItem', 'delete');
    				}
    				else {
    					menu.jqxMenu('showItem', 'createAppointment');
    					menu.jqxMenu('showItem', 'editAppointment');
    					menu.jqxMenu('showItem', 'delete');
    				}
    			},
    			contextMenuClose: function (menu, appointment, event) {
    			},
    			ready: function () {
                        $("#div_agenda").jqxScheduler('scrollTop', 420);
                        <?php foreach($listaagendaeventi as $evento)
    						echo "$('#div_agenda').jqxScheduler('setAppointmentProperty', '".$evento['idAgendaEvento']."', 'draggable', false);";
                        ?>
                    },
    			views:
    			[
    				'dayView',
    				'weekView',
    				'monthView'
    			]
    	});

    ps.: I think there is a problem with the forum…I can’t see my post

Viewing 1 post (of 1 total)