calendar.html 37 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta charset="UTF-8">
  5. <title>AdminLTE | Calendar</title>
  6. <meta content='width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no' name='viewport'>
  7. <link href="//maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.min.css" rel="stylesheet" type="text/css" />
  8. <link href="//cdnjs.cloudflare.com/ajax/libs/font-awesome/4.1.0/css/font-awesome.min.css" rel="stylesheet" type="text/css" />
  9. <!-- Ionicons -->
  10. <link href="../css/ionicons.min.css" rel="stylesheet" type="text/css" />
  11. <!-- fullCalendar -->
  12. <link href="//cdnjs.cloudflare.com/ajax/libs/fullcalendar/2.0.2/fullcalendar.css" rel="stylesheet" type="text/css" />
  13. <link href="//cdnjs.cloudflare.com/ajax/libs/fullcalendar/2.0.2/fullcalendar.print.css" rel="stylesheet" type="text/css" media='print' />
  14. <!-- Theme style -->
  15. <link href="../css/AdminLTE.css" rel="stylesheet" type="text/css" />
  16. <!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
  17. <!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
  18. <!--[if lt IE 9]>
  19. <script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
  20. <script src="https://oss.maxcdn.com/libs/respond.js/1.3.0/respond.min.js"></script>
  21. <![endif]-->
  22. </head>
  23. <body class="skin-blue">
  24. <!-- header logo: style can be found in header.less -->
  25. <header class="header">
  26. <a href="../index.html" class="logo">
  27. <!-- Add the class icon to your logo image or logo icon to add the margining -->
  28. AdminLTE
  29. </a>
  30. <!-- Header Navbar: style can be found in header.less -->
  31. <nav class="navbar navbar-static-top" role="navigation">
  32. <!-- Sidebar toggle button-->
  33. <a href="#" class="navbar-btn sidebar-toggle" data-toggle="offcanvas" role="button">
  34. <span class="sr-only">Toggle navigation</span>
  35. <span class="icon-bar"></span>
  36. <span class="icon-bar"></span>
  37. <span class="icon-bar"></span>
  38. </a>
  39. <div class="navbar-right">
  40. <ul class="nav navbar-nav">
  41. <!-- Messages: style can be found in dropdown.less-->
  42. <li class="dropdown messages-menu">
  43. <a href="#" class="dropdown-toggle" data-toggle="dropdown">
  44. <i class="fa fa-envelope"></i>
  45. <span class="label label-success">4</span>
  46. </a>
  47. <ul class="dropdown-menu">
  48. <li class="header">You have 4 messages</li>
  49. <li>
  50. <!-- inner menu: contains the actual data -->
  51. <ul class="menu">
  52. <li><!-- start message -->
  53. <a href="#">
  54. <div class="pull-left">
  55. <img src="../img/avatar3.png" class="img-circle" alt="User Image"/>
  56. </div>
  57. <h4>
  58. Support Team
  59. <small><i class="fa fa-clock-o"></i> 5 mins</small>
  60. </h4>
  61. <p>Why not buy a new awesome theme?</p>
  62. </a>
  63. </li><!-- end message -->
  64. <li>
  65. <a href="#">
  66. <div class="pull-left">
  67. <img src="../img/avatar2.png" class="img-circle" alt="user image"/>
  68. </div>
  69. <h4>
  70. AdminLTE Design Team
  71. <small><i class="fa fa-clock-o"></i> 2 hours</small>
  72. </h4>
  73. <p>Why not buy a new awesome theme?</p>
  74. </a>
  75. </li>
  76. <li>
  77. <a href="#">
  78. <div class="pull-left">
  79. <img src="../img/avatar.png" class="img-circle" alt="user image"/>
  80. </div>
  81. <h4>
  82. Developers
  83. <small><i class="fa fa-clock-o"></i> Today</small>
  84. </h4>
  85. <p>Why not buy a new awesome theme?</p>
  86. </a>
  87. </li>
  88. <li>
  89. <a href="#">
  90. <div class="pull-left">
  91. <img src="../img/avatar2.png" class="img-circle" alt="user image"/>
  92. </div>
  93. <h4>
  94. Sales Department
  95. <small><i class="fa fa-clock-o"></i> Yesterday</small>
  96. </h4>
  97. <p>Why not buy a new awesome theme?</p>
  98. </a>
  99. </li>
  100. <li>
  101. <a href="#">
  102. <div class="pull-left">
  103. <img src="../img/avatar.png" class="img-circle" alt="user image"/>
  104. </div>
  105. <h4>
  106. Reviewers
  107. <small><i class="fa fa-clock-o"></i> 2 days</small>
  108. </h4>
  109. <p>Why not buy a new awesome theme?</p>
  110. </a>
  111. </li>
  112. </ul>
  113. </li>
  114. <li class="footer"><a href="#">See All Messages</a></li>
  115. </ul>
  116. </li>
  117. <!-- Notifications: style can be found in dropdown.less -->
  118. <li class="dropdown notifications-menu">
  119. <a href="#" class="dropdown-toggle" data-toggle="dropdown">
  120. <i class="fa fa-warning"></i>
  121. <span class="label label-warning">10</span>
  122. </a>
  123. <ul class="dropdown-menu">
  124. <li class="header">You have 10 notifications</li>
  125. <li>
  126. <!-- inner menu: contains the actual data -->
  127. <ul class="menu">
  128. <li>
  129. <a href="#">
  130. <i class="ion ion-ios7-people info"></i> 5 new members joined today
  131. </a>
  132. </li>
  133. <li>
  134. <a href="#">
  135. <i class="fa fa-warning danger"></i> Very long description here that may not fit into the page and may cause design problems
  136. </a>
  137. </li>
  138. <li>
  139. <a href="#">
  140. <i class="fa fa-users warning"></i> 5 new members joined
  141. </a>
  142. </li>
  143. <li>
  144. <a href="#">
  145. <i class="ion ion-ios7-cart success"></i> 25 sales made
  146. </a>
  147. </li>
  148. <li>
  149. <a href="#">
  150. <i class="ion ion-ios7-person danger"></i> You changed your username
  151. </a>
  152. </li>
  153. </ul>
  154. </li>
  155. <li class="footer"><a href="#">View all</a></li>
  156. </ul>
  157. </li>
  158. <!-- Tasks: style can be found in dropdown.less -->
  159. <li class="dropdown tasks-menu">
  160. <a href="#" class="dropdown-toggle" data-toggle="dropdown">
  161. <i class="fa fa-tasks"></i>
  162. <span class="label label-danger">9</span>
  163. </a>
  164. <ul class="dropdown-menu">
  165. <li class="header">You have 9 tasks</li>
  166. <li>
  167. <!-- inner menu: contains the actual data -->
  168. <ul class="menu">
  169. <li><!-- Task item -->
  170. <a href="#">
  171. <h3>
  172. Design some buttons
  173. <small class="pull-right">20%</small>
  174. </h3>
  175. <div class="progress xs">
  176. <div class="progress-bar progress-bar-aqua" style="width: 20%" role="progressbar" aria-valuenow="20" aria-valuemin="0" aria-valuemax="100">
  177. <span class="sr-only">20% Complete</span>
  178. </div>
  179. </div>
  180. </a>
  181. </li><!-- end task item -->
  182. <li><!-- Task item -->
  183. <a href="#">
  184. <h3>
  185. Create a nice theme
  186. <small class="pull-right">40%</small>
  187. </h3>
  188. <div class="progress xs">
  189. <div class="progress-bar progress-bar-green" style="width: 40%" role="progressbar" aria-valuenow="20" aria-valuemin="0" aria-valuemax="100">
  190. <span class="sr-only">40% Complete</span>
  191. </div>
  192. </div>
  193. </a>
  194. </li><!-- end task item -->
  195. <li><!-- Task item -->
  196. <a href="#">
  197. <h3>
  198. Some task I need to do
  199. <small class="pull-right">60%</small>
  200. </h3>
  201. <div class="progress xs">
  202. <div class="progress-bar progress-bar-red" style="width: 60%" role="progressbar" aria-valuenow="20" aria-valuemin="0" aria-valuemax="100">
  203. <span class="sr-only">60% Complete</span>
  204. </div>
  205. </div>
  206. </a>
  207. </li><!-- end task item -->
  208. <li><!-- Task item -->
  209. <a href="#">
  210. <h3>
  211. Make beautiful transitions
  212. <small class="pull-right">80%</small>
  213. </h3>
  214. <div class="progress xs">
  215. <div class="progress-bar progress-bar-yellow" style="width: 80%" role="progressbar" aria-valuenow="20" aria-valuemin="0" aria-valuemax="100">
  216. <span class="sr-only">80% Complete</span>
  217. </div>
  218. </div>
  219. </a>
  220. </li><!-- end task item -->
  221. </ul>
  222. </li>
  223. <li class="footer">
  224. <a href="#">View all tasks</a>
  225. </li>
  226. </ul>
  227. </li>
  228. <!-- User Account: style can be found in dropdown.less -->
  229. <li class="dropdown user user-menu">
  230. <a href="#" class="dropdown-toggle" data-toggle="dropdown">
  231. <i class="glyphicon glyphicon-user"></i>
  232. <span>Jane Doe <i class="caret"></i></span>
  233. </a>
  234. <ul class="dropdown-menu">
  235. <!-- User image -->
  236. <li class="user-header bg-light-blue">
  237. <img src="../img/avatar3.png" class="img-circle" alt="User Image" />
  238. <p>
  239. Jane Doe - Web Developer
  240. <small>Member since Nov. 2012</small>
  241. </p>
  242. </li>
  243. <!-- Menu Body -->
  244. <li class="user-body">
  245. <div class="col-xs-4 text-center">
  246. <a href="#">Followers</a>
  247. </div>
  248. <div class="col-xs-4 text-center">
  249. <a href="#">Sales</a>
  250. </div>
  251. <div class="col-xs-4 text-center">
  252. <a href="#">Friends</a>
  253. </div>
  254. </li>
  255. <!-- Menu Footer-->
  256. <li class="user-footer">
  257. <div class="pull-left">
  258. <a href="#" class="btn btn-default btn-flat">Profile</a>
  259. </div>
  260. <div class="pull-right">
  261. <a href="#" class="btn btn-default btn-flat">Sign out</a>
  262. </div>
  263. </li>
  264. </ul>
  265. </li>
  266. </ul>
  267. </div>
  268. </nav>
  269. </header>
  270. <div class="wrapper row-offcanvas row-offcanvas-left">
  271. <!-- Left side column. contains the logo and sidebar -->
  272. <aside class="left-side sidebar-offcanvas">
  273. <!-- sidebar: style can be found in sidebar.less -->
  274. <section class="sidebar">
  275. <!-- Sidebar user panel -->
  276. <div class="user-panel">
  277. <div class="pull-left image">
  278. <img src="../img/avatar3.png" class="img-circle" alt="User Image" />
  279. </div>
  280. <div class="pull-left info">
  281. <p>Hello, Jane</p>
  282. <a href="#"><i class="fa fa-circle text-success"></i> Online</a>
  283. </div>
  284. </div>
  285. <!-- search form -->
  286. <form action="#" method="get" class="sidebar-form">
  287. <div class="input-group">
  288. <input type="text" name="q" class="form-control" placeholder="Search..."/>
  289. <span class="input-group-btn">
  290. <button type='submit' name='seach' id='search-btn' class="btn btn-flat"><i class="fa fa-search"></i></button>
  291. </span>
  292. </div>
  293. </form>
  294. <!-- /.search form -->
  295. <!-- sidebar menu: : style can be found in sidebar.less -->
  296. <ul class="sidebar-menu">
  297. <li>
  298. <a href="../index.html">
  299. <i class="fa fa-dashboard"></i> <span>Dashboard</span>
  300. </a>
  301. </li>
  302. <li>
  303. <a href="widgets.html">
  304. <i class="fa fa-th"></i> <span>Widgets</span> <small class="badge pull-right bg-green">new</small>
  305. </a>
  306. </li>
  307. <li class="treeview">
  308. <a href="#">
  309. <i class="fa fa-bar-chart-o"></i>
  310. <span>Charts</span>
  311. <i class="fa fa-angle-left pull-right"></i>
  312. </a>
  313. <ul class="treeview-menu">
  314. <li><a href="charts/morris.html"><i class="fa fa-angle-double-right"></i> Morris</a></li>
  315. <li><a href="charts/flot.html"><i class="fa fa-angle-double-right"></i> Flot</a></li>
  316. <li><a href="charts/inline.html"><i class="fa fa-angle-double-right"></i> Inline charts</a></li>
  317. </ul>
  318. </li>
  319. <li class="treeview">
  320. <a href="#">
  321. <i class="fa fa-laptop"></i>
  322. <span>UI Elements</span>
  323. <i class="fa fa-angle-left pull-right"></i>
  324. </a>
  325. <ul class="treeview-menu">
  326. <li><a href="UI/general.html"><i class="fa fa-angle-double-right"></i> General</a></li>
  327. <li><a href="UI/icons.html"><i class="fa fa-angle-double-right"></i> Icons</a></li>
  328. <li><a href="UI/buttons.html"><i class="fa fa-angle-double-right"></i> Buttons</a></li>
  329. <li><a href="UI/sliders.html"><i class="fa fa-angle-double-right"></i> Sliders</a></li>
  330. <li><a href="UI/timeline.html"><i class="fa fa-angle-double-right"></i> Timeline</a></li>
  331. </ul>
  332. </li>
  333. <li class="treeview">
  334. <a href="#">
  335. <i class="fa fa-edit"></i> <span>Forms</span>
  336. <i class="fa fa-angle-left pull-right"></i>
  337. </a>
  338. <ul class="treeview-menu">
  339. <li><a href="forms/general.html"><i class="fa fa-angle-double-right"></i> General Elements</a></li>
  340. <li><a href="forms/advanced.html"><i class="fa fa-angle-double-right"></i> Advanced Elements</a></li>
  341. <li><a href="forms/editors.html"><i class="fa fa-angle-double-right"></i> Editors</a></li>
  342. </ul>
  343. </li>
  344. <li class="treeview">
  345. <a href="#">
  346. <i class="fa fa-table"></i> <span>Tables</span>
  347. <i class="fa fa-angle-left pull-right"></i>
  348. </a>
  349. <ul class="treeview-menu">
  350. <li><a href="tables/simple.html"><i class="fa fa-angle-double-right"></i> Simple tables</a></li>
  351. <li><a href="tables/data.html"><i class="fa fa-angle-double-right"></i> Data tables</a></li>
  352. </ul>
  353. </li>
  354. <li class="active">
  355. <a href="calendar.html">
  356. <i class="fa fa-calendar"></i> <span>Calendar</span>
  357. <small class="badge pull-right bg-red">3</small>
  358. </a>
  359. </li>
  360. <li>
  361. <a href="mailbox.html">
  362. <i class="fa fa-envelope"></i> <span>Mailbox</span>
  363. <small class="badge pull-right bg-yellow">12</small>
  364. </a>
  365. </li>
  366. <li class="treeview">
  367. <a href="#">
  368. <i class="fa fa-folder"></i> <span>Examples</span>
  369. <i class="fa fa-angle-left pull-right"></i>
  370. </a>
  371. <ul class="treeview-menu">
  372. <li><a href="examples/invoice.html"><i class="fa fa-angle-double-right"></i> Invoice</a></li>
  373. <li><a href="examples/login.html"><i class="fa fa-angle-double-right"></i> Login</a></li>
  374. <li><a href="examples/register.html"><i class="fa fa-angle-double-right"></i> Register</a></li>
  375. <li><a href="examples/lockscreen.html"><i class="fa fa-angle-double-right"></i> Lockscreen</a></li>
  376. <li><a href="examples/404.html"><i class="fa fa-angle-double-right"></i> 404 Error</a></li>
  377. <li><a href="examples/500.html"><i class="fa fa-angle-double-right"></i> 500 Error</a></li>
  378. <li><a href="examples/blank.html"><i class="fa fa-angle-double-right"></i> Blank Page</a></li>
  379. </ul>
  380. </li>
  381. </ul>
  382. </section>
  383. <!-- /.sidebar -->
  384. </aside>
  385. <!-- Right side column. Contains the navbar and content of the page -->
  386. <aside class="right-side">
  387. <!-- Content Header (Page header) -->
  388. <section class="content-header">
  389. <h1>
  390. Calendar
  391. <small>Control panel</small>
  392. </h1>
  393. <ol class="breadcrumb">
  394. <li><a href="#"><i class="fa fa-dashboard"></i> Home</a></li>
  395. <li class="active">Calendar</li>
  396. </ol>
  397. </section>
  398. <!-- Main content -->
  399. <section class="content">
  400. <div class="row">
  401. <div class="col-md-3">
  402. <div class="box box-primary">
  403. <div class="box-header">
  404. <h4 class="box-title">Draggable Events</h4>
  405. </div>
  406. <div class="box-body">
  407. <!-- the events -->
  408. <div id='external-events'>
  409. <div class='external-event bg-green'>Lunch</div>
  410. <div class='external-event bg-red'>Go home</div>
  411. <div class='external-event bg-aqua'>Do homework</div>
  412. <div class='external-event bg-yellow'>Work on UI design</div>
  413. <div class='external-event bg-navy'>Sleep tight</div>
  414. <p>
  415. <input type='checkbox' id='drop-remove' /> <label for='drop-remove'>remove after drop</label>
  416. </p>
  417. </div>
  418. </div><!-- /.box-body -->
  419. </div><!-- /. box -->
  420. <div class="box box-primary">
  421. <div class="box-header">
  422. <h3 class="box-title">Create Event</h3>
  423. </div>
  424. <div class="box-body">
  425. <div class="btn-group" style="width: 100%; margin-bottom: 10px;">
  426. <button type="button" id="color-chooser-btn" class="btn btn-danger btn-block btn-sm dropdown-toggle" data-toggle="dropdown">Color <span class="caret"></span></button>
  427. <ul class="dropdown-menu" id="color-chooser">
  428. <li><a class="text-green" href="#"><i class="fa fa-square"></i> Green</a></li>
  429. <li><a class="text-blue" href="#"><i class="fa fa-square"></i> Blue</a></li>
  430. <li><a class="text-navy" href="#"><i class="fa fa-square"></i> Navy</a></li>
  431. <li><a class="text-yellow" href="#"><i class="fa fa-square"></i> Yellow</a></li>
  432. <li><a class="text-orange" href="#"><i class="fa fa-square"></i> Orange</a></li>
  433. <li><a class="text-aqua" href="#"><i class="fa fa-square"></i> Aqua</a></li>
  434. <li><a class="text-red" href="#"><i class="fa fa-square"></i> Red</a></li>
  435. <li><a class="text-fuchsia" href="#"><i class="fa fa-square"></i> Fuchsia</a></li>
  436. <li><a class="text-purple" href="#"><i class="fa fa-square"></i> Purple</a></li>
  437. </ul>
  438. </div><!-- /btn-group -->
  439. <div class="input-group">
  440. <input id="new-event" type="text" class="form-control" placeholder="Event Title">
  441. <div class="input-group-btn">
  442. <button id="add-new-event" type="button" class="btn btn-default btn-flat">Add</button>
  443. </div><!-- /btn-group -->
  444. </div><!-- /input-group -->
  445. </div>
  446. </div>
  447. </div><!-- /.col -->
  448. <div class="col-md-9">
  449. <div class="box box-primary">
  450. <div class="box-body no-padding">
  451. <!-- THE CALENDAR -->
  452. <div id="calendar"></div>
  453. </div><!-- /.box-body -->
  454. </div><!-- /. box -->
  455. </div><!-- /.col -->
  456. </div><!-- /.row -->
  457. </section><!-- /.content -->
  458. </aside><!-- /.right-side -->
  459. </div><!-- ./wrapper -->
  460. <script src="//ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
  461. <script src="//maxcdn.bootstrapcdn.com/bootstrap/3.2.0/js/bootstrap.min.js" type="text/javascript"></script>
  462. <script src="//code.jquery.com/ui/1.11.1/jquery-ui.min.js" type="text/javascript"></script>
  463. <!-- AdminLTE App -->
  464. <script src="../js/AdminLTE/app.js" type="text/javascript"></script>
  465. <!-- AdminLTE for demo purposes -->
  466. <script src="../js/AdminLTE/demo.js" type="text/javascript"></script>
  467. <!-- fullCalendar -->
  468. <script src="//cdnjs.cloudflare.com/ajax/libs/moment.js/2.7.0/moment.min.js" type="text/javascript"></script>
  469. <script src="//cdnjs.cloudflare.com/ajax/libs/fullcalendar/2.0.2/fullcalendar.min.js" type="text/javascript"></script>
  470. <!-- Page specific script -->
  471. <script type="text/javascript">
  472. $(function() {
  473. /* initialize the external events
  474. -----------------------------------------------------------------*/
  475. function ini_events(ele) {
  476. ele.each(function() {
  477. // create an Event Object (http://arshaw.com/fullcalendar/docs/event_data/Event_Object/)
  478. // it doesn't need to have a start or end
  479. var eventObject = {
  480. title: $.trim($(this).text()) // use the element's text as the event title
  481. };
  482. // store the Event Object in the DOM element so we can get to it later
  483. $(this).data('eventObject', eventObject);
  484. // make the event draggable using jQuery UI
  485. $(this).draggable({
  486. zIndex: 1070,
  487. revert: true, // will cause the event to go back to its
  488. revertDuration: 0 // original position after the drag
  489. });
  490. });
  491. }
  492. ini_events($('#external-events div.external-event'));
  493. /* initialize the calendar
  494. -----------------------------------------------------------------*/
  495. //Date for the calendar events (dummy data)
  496. var date = new Date();
  497. var d = date.getDate(),
  498. m = date.getMonth(),
  499. y = date.getFullYear();
  500. $('#calendar').fullCalendar({
  501. header: {
  502. left: 'prev,next today',
  503. center: 'title',
  504. right: 'month,agendaWeek,agendaDay'
  505. },
  506. buttonText: {//This is to add icons to the visible buttons
  507. prev: "<span class='fa fa-caret-left'></span>",
  508. next: "<span class='fa fa-caret-right'></span>",
  509. today: 'today',
  510. month: 'month',
  511. week: 'week',
  512. day: 'day'
  513. },
  514. //Random default events
  515. events: [
  516. {
  517. title: 'All Day Event',
  518. start: new Date(y, m, 1),
  519. backgroundColor: "#f56954", //red
  520. borderColor: "#f56954" //red
  521. },
  522. {
  523. title: 'Long Event',
  524. start: new Date(y, m, d - 5),
  525. end: new Date(y, m, d - 2),
  526. backgroundColor: "#f39c12", //yellow
  527. borderColor: "#f39c12" //yellow
  528. },
  529. {
  530. title: 'Meeting',
  531. start: new Date(y, m, d, 10, 30),
  532. allDay: false,
  533. backgroundColor: "#0073b7", //Blue
  534. borderColor: "#0073b7" //Blue
  535. },
  536. {
  537. title: 'Lunch',
  538. start: new Date(y, m, d, 12, 0),
  539. end: new Date(y, m, d, 14, 0),
  540. allDay: false,
  541. backgroundColor: "#00c0ef", //Info (aqua)
  542. borderColor: "#00c0ef" //Info (aqua)
  543. },
  544. {
  545. title: 'Birthday Party',
  546. start: new Date(y, m, d + 1, 19, 0),
  547. end: new Date(y, m, d + 1, 22, 30),
  548. allDay: false,
  549. backgroundColor: "#00a65a", //Success (green)
  550. borderColor: "#00a65a" //Success (green)
  551. },
  552. {
  553. title: 'Click for Google',
  554. start: new Date(y, m, 28),
  555. end: new Date(y, m, 29),
  556. url: 'http://google.com/',
  557. backgroundColor: "#3c8dbc", //Primary (light-blue)
  558. borderColor: "#3c8dbc" //Primary (light-blue)
  559. }
  560. ],
  561. editable: true,
  562. droppable: true, // this allows things to be dropped onto the calendar !!!
  563. drop: function(date, allDay) { // this function is called when something is dropped
  564. // retrieve the dropped element's stored Event Object
  565. var originalEventObject = $(this).data('eventObject');
  566. // we need to copy it, so that multiple events don't have a reference to the same object
  567. var copiedEventObject = $.extend({}, originalEventObject);
  568. // assign it the date that was reported
  569. copiedEventObject.start = date;
  570. copiedEventObject.allDay = allDay;
  571. copiedEventObject.backgroundColor = $(this).css("background-color");
  572. copiedEventObject.borderColor = $(this).css("border-color");
  573. // render the event on the calendar
  574. // the last `true` argument determines if the event "sticks" (http://arshaw.com/fullcalendar/docs/event_rendering/renderEvent/)
  575. $('#calendar').fullCalendar('renderEvent', copiedEventObject, true);
  576. // is the "remove after drop" checkbox checked?
  577. if ($('#drop-remove').is(':checked')) {
  578. // if so, remove the element from the "Draggable Events" list
  579. $(this).remove();
  580. }
  581. }
  582. });
  583. /* ADDING EVENTS */
  584. var currColor = "#f56954"; //Red by default
  585. //Color chooser button
  586. var colorChooser = $("#color-chooser-btn");
  587. $("#color-chooser > li > a").click(function(e) {
  588. e.preventDefault();
  589. //Save color
  590. currColor = $(this).css("color");
  591. //Add color effect to button
  592. colorChooser
  593. .css({"background-color": currColor, "border-color": currColor})
  594. .html($(this).text()+' <span class="caret"></span>');
  595. });
  596. $("#add-new-event").click(function(e) {
  597. e.preventDefault();
  598. //Get value and make sure it is not null
  599. var val = $("#new-event").val();
  600. if (val.length == 0) {
  601. return;
  602. }
  603. //Create events
  604. var event = $("<div />");
  605. event.css({"background-color": currColor, "border-color": currColor, "color": "#fff"}).addClass("external-event");
  606. event.html(val);
  607. $('#external-events').prepend(event);
  608. //Add draggable funtionality
  609. ini_events(event);
  610. //Remove event from text input
  611. $("#new-event").val("");
  612. });
  613. });
  614. </script>
  615. </body>
  616. </html>