Customization of details for.

Hello,

Thanks for your quick responses on my earlier posts. I have two more on the scheduler.

  1. Is it possible to have two separate details page for the same page. We display two distinct set of events which have entirely different form elements in the details page. So, was wondering if we can have two separate values that can be set to scheduler.config.lightbox.sections object based on the event.
  2. Is it possible to make only individual text area elements read-only in the details form. The entire form wont be read-only but only a couple of form elements will be read-only.

Any help in pointing me to the right direction would be greatly appreciated.

Regards
Prashanth

Hello,

  1. Yes, check following sample:

[code]

<script src="../../codebase/dhtmlxscheduler.js" type="text/javascript" charset="utf-8"></script>
<link rel="stylesheet" href="../../codebase/dhtmlxscheduler.css" type="text/css" media="screen" title="no title"
      charset="utf-8">

<style type="text/css" media="screen">
	html, body {
		margin: 0px;
		padding: 0px;
		height: 100%;
		overflow: hidden;
	}
</style>

<script type="text/javascript" charset="utf-8">
	function init() {
		scheduler.config.multi_day = true;

		scheduler.config.xml_date = "%Y-%m-%d %H:%i";
		scheduler.locale.labels.section_hidden = "Hidden section";

		var full_lightbox = [
			{ name: "description", height: 200, map_to: "text", type: "textarea", focus: true},
			{ name: "hidden", height: 23, map_to: "hidden", type: "textarea"},
			{ name: "time", height: 72, type: "time", map_to: "auto"}
		];
		var restricted_lightbox = [
			{ name: "description", height: 200, map_to: "text", type: "textarea", focus: true},
			{ name: "time", height: 72, type: "time", map_to: "auto"}
		];

		scheduler.config.lightbox.sections = restricted_lightbox;

		scheduler.attachEvent("onBeforeLightbox", function(event_id) {
			scheduler.resetLightbox();
			var ev = scheduler.getEvent(event_id);
			scheduler.config.lightbox.sections = (ev.restricted) ? restricted_lightbox : full_lightbox;
			return true;
		});

		scheduler.init('scheduler_here', new Date(2009, 5, 30), "week");
		scheduler.parse([
			{ start_date: "2009-06-30 09:00", end_date: "2009-06-30 12:00", text: "Restricted event", hidden: "You won't see me", restricted: true },
			{ start_date: "2009-06-30 10:00", end_date: "2009-06-30 16:00", text: "Full access", hidden: "Hidden text" }
		], "json");

	}
</script>
 
 
[/code]
  1. Not directly. You can create another lightbox configuration and there you can use template sections to simply some value.

Best regards,
Ilya

Thanks Ilya, I can try this out.