NetTalk Central

Author Topic: Javascript scheduler dhtmlxScheduler how to start?  (Read 5505 times)

sabra

  • Newbie
  • *
  • Posts: 28
    • View Profile
    • Email
Javascript scheduler dhtmlxScheduler how to start?
« on: February 22, 2011, 02:46:14 PM »
Hi all

I started with the javascript dhtmlxScheduler .  The folder structure is
 Codebase   \ dhtmlxscheduler.js
      \ dhtmlxscheduler.css
      \connector   \connector.js
            \*.php
      \ext      \small .js files
      \imgs

 1)   In nt the default scripts folder is ‘scripts’. Should I copy all the js files in this folder or is it best to keep the js in the codebase folder.? And how must I add this in NT script entry?
2)   In the example there is a file 02_units_view.html. If I open this in the browser, the scheduler opens and runs. Should I call this page directly as a hard page in NT or must I create a NT source page e.g.?
3)   See http://dhtmlx.com/docs/products/dhtmlxScheduler/sample_basic.html. You can download the code there.

Best regards,

Walter


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
   "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<head>
   <meta http-equiv="Content-type" content="text/html; charset=utf-8">
   <title></title>
</head>
   <script src="../../codebase/dhtmlxscheduler.js" type="text/javascript" charset="utf-8"></script>
   <script src="../../codebase/ext/dhtmlxscheduler_units.js" type="text/javascript" charset="utf-8"></script>
   <link rel="stylesheet" href="../../codebase/dhtmlxscheduler.css" type="text/css" title="no title" charset="utf-8">
   <script src="../../codebase/ext/dhtmlxscheduler_collision.js" type="text/javascript" charset="utf-8"></script>

   
<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() {

      var sections=[
         {key:1, label:"Section A"},
         {key:2, label:"Section B"},
         {key:3, label:"Section C"},
         {key:4, label:"Section D"}
      ];
      
      scheduler.locale.labels.unit_tab = "Unit"
      scheduler.locale.labels.section_custom="Section";
      scheduler.config.details_on_create=true;
      scheduler.config.details_on_dblclick=true;
      scheduler.config.xml_date="%Y-%m-%d %H:%i";
      
      scheduler.config.lightbox.sections=[   
         {name:"description", height:130, map_to:"text", type:"textarea" , focus:true},
         {name:"custom", height:23, type:"select", options:sections, map_to:"section_id" },
         {name:"time", height:72, type:"time", map_to:"auto"}
      ]
      
      scheduler.createUnitsView({
         name:"unit",
         property:"section_id",
         list:sections
      });
      scheduler.config.multi_day = true;
      
      scheduler.init('scheduler_here',new Date(2009,5,30),"unit");
      scheduler.load("../common/units.xml");
   }
</script>

<body onload="init();">
   <div id="scheduler_here" class="dhx_cal_container" style='width:100%; height:100%;'>
      <div class="dhx_cal_navline">
         <div class="dhx_cal_prev_button">&nbsp;</div>
         <div class="dhx_cal_next_button">&nbsp;</div>
         <div class="dhx_cal_today_button"></div>
         <div class="dhx_cal_date"></div>
         <div class="dhx_cal_tab" name="day_tab" style="right:204px;"></div>
         <div class="dhx_cal_tab" name="week_tab" style="right:140px;"></div>
         <div class="dhx_cal_tab" name="unit_tab" style="right:280px;"></div>
         <div class="dhx_cal_tab" name="month_tab" style="right:76px;"></div>
      </div>
      <div class="dhx_cal_header">
      </div>
      <div class="dhx_cal_data">
      </div>      
   </div>
</body>


kevin plummer

  • Hero Member
  • *****
  • Posts: 1195
    • View Profile
    • Production Accounting and Software Payroll
Re: Javascript scheduler dhtmlxScheduler how to start?
« Reply #1 on: February 22, 2011, 04:41:41 PM »
Hi Walter,

You can call the static page no problem from NTW without putting it into a netweb page. You do however lose the SSV functionality. It just needs to be accessible from the web folder.

Also, where does it store the data and can you access that from your app if you need to?

Bruce has added some calendar functionality to NTW. I haven't looked at it or seen how advanced he is with it yet but this may be a better path to go down if it offers the functionality you need.

Cheers,

Kev