Guest User

Untitled

a guest
Mar 7th, 2012
63
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
HTML 5.07 KB | None | 0 0
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  2.         "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  3. <head>
  4.     <meta http-equiv="Content-type" content="text/html; charset=utf-8">
  5.     <title></title>
  6.     <!-- Load Google Maps API -->
  7.     <script src="http://maps.google.com/maps/api/js?sensor=false" type="text/javascript"></script>
  8.  
  9.     <!-- Load all js files-->
  10.     <script src="../../codebase/dhtmlxscheduler.js" type="text/javascript" charset="utf-8"></script>
  11.     <script src="../../codebase/ext/dhtmlxscheduler_serialize.js" type="text/javascript" charset="utf-8"></script>
  12.     <script src="../../codebase/ext/dhtmlxscheduler_map_view.js" type="text/javascript" charset="utf-8"></script>
  13.     <script src="../../codebase/ext/dhtmlxscheduler_recurring.js" type="text/javascript" charset="utf-8"></script>
  14.     <script src="../../codebase/ext/dhtmlxscheduler_year_view.js" type="text/javascript" charset="utf-8"></script>
  15.    
  16.     <!-- Language -->
  17.     <script src="../../sources/locale_de.js" type="text/javascript" charset="utf-8"></script>
  18.     <script src="../../sources/locale_recurring_de.js" type="text/javascript" charset="utf-8"></script>
  19.    
  20.     <!-- CSS style -->
  21.     <link rel="stylesheet" href="../../codebase/dhtmlxscheduler_glossy.css" type="text/css" media="screen" title="no title" charset="utf-8">
  22.  
  23.     <style type="text/css" media="screen">
  24.         html, body {
  25.             margin: 0px;
  26.             padding: 0px;
  27.             height: 100%;
  28.             overflow: hidden;
  29.         }
  30.     </style>
  31.  
  32. <script type="text/javascript" charset="utf-8">
  33.         function init() {
  34.             scheduler.config.xml_date = "%Y-%m-%d %H:%i";
  35.             scheduler.config.prevent_cache = true;
  36.    
  37.             scheduler.data_attributes = function() {
  38.                 var empty = function(a) {
  39.                     return a || "";
  40.                 };
  41.                 return [
  42.                     ["id"],
  43.                     ["text"],
  44.                     ["start_date",scheduler.templates.xml_format],
  45.                     ["end_date",scheduler.templates.xml_format],
  46.                     ["rec_type",empty],
  47.                     ["event_length",empty],
  48.                     ["event_pid",empty],
  49.                     ["event_location",empty],
  50.                     ["lat",empty],
  51.                     ["lng",empty]
  52.                    
  53.                 ];
  54.             }
  55.  
  56.  
  57.             // updating dates to display on before view change
  58.                 scheduler.attachEvent("onBeforeViewChange", function(old_mode, old_date, new_mode, new_date) {
  59.                 scheduler.config.map_start = scheduler.date.month_start(new Date((new_date || old_date).valueOf()));
  60.                 scheduler.config.map_end = scheduler.date.add(scheduler.config.map_start, 1, "month");
  61.                 return true;
  62.             });
  63.  
  64.             // defining add function for prev/next arrows
  65.                 scheduler.date.add_map = function(date, inc) {
  66.                 return scheduler.date.add(date, inc, "month");
  67.             };
  68.  
  69.             // defining date header
  70.                 var format = scheduler.date.date_to_str("%Y-%m-%d");
  71.                 scheduler.templates.map_date = function(start, end, mode) {
  72.                 return format(start) + " — " + format(end);
  73.             };
  74.  
  75.             // Map-Tab
  76.             scheduler.locale.labels.map_tab = "Map";
  77.             scheduler.locale.labels.section_location = "Location";     
  78.            
  79.             scheduler.xy.map_date_width = 180; // date column width
  80.             scheduler.xy.map_description_width = 400; // description column width
  81.  
  82.  
  83.             scheduler.config.lightbox.sections = [
  84.                 { name:"description", height:50, map_to:"text", type:"textarea", focus:true },
  85.                 { name:"location", height:43, map_to:"event_location", type:"textarea"  },
  86.                 { name:"time", height:72, type:"time", map_to:"auto"}
  87.             ]
  88.  
  89.             scheduler.config.map_inital_zoom = 8;
  90.             scheduler.config.map_resolve_user_location = true;
  91.             scheduler.config.map_resolve_event_location = false;
  92.  
  93.             //scheduler.init('scheduler_here', new Date(2012, 1, 20), "month");
  94.             scheduler.load("php/data_r.xml");
  95.  
  96.             scheduler.init('scheduler_here', new Date(), "map");
  97.             scheduler.load("php/events_map_view.php");
  98.  
  99.             var dp = new dataProcessor("php/events_map_view.php");
  100.             dp.init(scheduler);
  101.         }
  102.        
  103.         function save(){
  104.             var form = document.getElementById("xml_form");
  105.             form.elements.data.value = scheduler.toXML();
  106.             form.submit();
  107.         }
  108. </script>
  109.  
  110. </head>
  111.  
  112. <body onload="init();">
  113.     <form action="./php/xml_writer_r.php" id="xml_form" method="post" target="hidden_frame" accept-charset="utf-8">
  114.         <input type="hidden" name="data" value="" id="data">
  115.     </form>
  116.     <iframe src='about:blank' frameborder="0" style="width:0px; height:0px;" id="hidden_frame" name="hidden_frame"></iframe>
  117.     <div id="scheduler_here" class="dhx_cal_container" style='width:100%; height:100%;'>
  118.     <div class="dhx_cal_navline">
  119.         <input type="button" name="save" value="Speichern" onclick="save()" style="right:480px; position:absolute;">
  120.         <div class="dhx_cal_prev_button">&nbsp;</div>
  121.         <div class="dhx_cal_next_button">&nbsp;</div>
  122.         <div class="dhx_cal_today_button"></div>
  123.         <div class="dhx_cal_date"></div>
  124.         <div class="dhx_cal_tab" name="day_tab" style="right:204px;"></div>
  125.         <div class="dhx_cal_tab" name="week_tab" style="right:140px;"></div>
  126.         <div class="dhx_cal_tab" name="map_tab" style="right:400px;"></div>
  127.         <div class="dhx_cal_tab" name="month_tab" style="right:76px;"></div>
  128.         <div class="dhx_cal_tab" name="year_tab" style="right:280px;"></div>
  129.     </div>
  130.     <div class="dhx_cal_header">
  131.     </div>
  132.     <div class="dhx_cal_data">
  133.     </div>
  134. </div>
  135. </body>
Advertisement
Add Comment
Please, Sign In to add comment