You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

93 lines
3.6 KiB

  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <title>Timeline localization demo</title>
  5. <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
  6. <style>
  7. body {
  8. font: 10pt verdana;
  9. }
  10. </style>
  11. <script type="text/javascript" src="http://www.google.com/jsapi"></script>
  12. <script type="text/javascript" src="../timeline.js"></script>
  13. <script type="text/javascript" src="../timeline-locales.js"></script>
  14. <link rel="stylesheet" type="text/css" href="../timeline.css">
  15. <script type="text/javascript">
  16. google.load("visualization", "1");
  17. // Set callback to run when API is loaded
  18. google.setOnLoadCallback(drawVisualization);
  19. var timeline;
  20. var data;
  21. // Called when the Visualization API is loaded.
  22. function drawVisualization() {
  23. // Create and populate a data table.
  24. data = new google.visualization.DataTable();
  25. data.addColumn('datetime', 'start');
  26. data.addColumn('datetime', 'end');
  27. data.addColumn('string', 'content');
  28. data.addRows([
  29. [new Date(2011, 01, 23), , '<div>Conversation</div><img src="../examples/img/comments-icon.png" style="width:32px; height:32px;">'],
  30. [new Date(2011, 01, 23, 23, 00, 00), , '<div>Mail from boss</div><img src="../examples/img/mail-icon.png" style="width:32px; height:32px;">'],
  31. [new Date(2011, 01, 24, 16, 00, 00), , '<span onclick="alert(\'test\')">Click here!</span>'],
  32. [new Date(2011, 01, 26), new Date(2011, 02, 02), 'Traject A'],
  33. [new Date(2011, 01, 27), , '<div>Memo</div><img src="../examples/img/notes-edit-icon.png" style="width:48px; height:48px;">'],
  34. [new Date(2011, 01, 28), new Date(2011, 02, 03), 'Traject B'],
  35. [new Date(2011, 02, 04, 12, 00, 00), , '<div>Report</div><img src="../examples/img/attachment-icon.png" style="width:32px; height:32px;">']
  36. ]);
  37. // specify options
  38. var options = {
  39. width: "100%",
  40. height: "200px",
  41. editable: true, // enable dragging and editing events
  42. enableKeys: true,
  43. axisOnTop: false,
  44. showNavigation: true,
  45. showButtonNew: true,
  46. animate: true,
  47. animateZoom: true,
  48. layout: "box"
  49. };
  50. timeline = new links.Timeline(document.getElementById('mytimeline1'), options);
  51. options.locale = "de";
  52. timeline.draw(data);
  53. timeline = new links.Timeline(document.getElementById('mytimeline2'), options);
  54. options.locale = "es";
  55. timeline.draw(data);
  56. timeline = new links.Timeline(document.getElementById('mytimeline3'), options);
  57. options.locale = "ru";
  58. timeline.draw(data);
  59. }
  60. </script>
  61. </head>
  62. <body>
  63. <p><strong>This page demonstrates the timeline localization (i18n text).</strong></p>
  64. <p><strong>German Timeline</strong></p>
  65. <div id="mytimeline1"></div>
  66. <p><strong>Spanish Timeline</strong></p>
  67. <div id="mytimeline2"></div>
  68. <p><strong>Russian Timeline</strong></p>
  69. <div id="mytimeline3"></div>
  70. <!-- Information about where the used icons come from -->
  71. <p style="color:gray; font-size:10px; font-style:italic;">
  72. Icons by <a href="http://dryicons.com" target="_blank" title="Aesthetica 2 Icons by DryIcons" style="color:gray;">DryIcons</a>
  73. and <a href="http://www.tpdkdesign.net" target="_blank" title="Refresh Cl Icons by TpdkDesign.net" style="color:gray;">TpdkDesign.net</a>
  74. </p>
  75. </body>
  76. </html>