戻る

大まかな予定を書き込めるJavaScriptカレンダー

動作例

ダウンロード

リポジトリ

ファイル構成

分類ファイル名概要依存するファイル
使用例calendar_null.htmlカレンダーのHTML。データを保存しないバージョン。UIのテスト用。default.css, calendar.css, holiday.js, calendar.js, calendar_db_null.js
calendar_cgi_pstore.htmlカレンダーのHTML。CGIを通してデータを保存するバージョン。サーバー上でのデータの保存はRubyのpstoreを使う。default.css, calendar.css, holiday.js, calendar.js, calendar_db_cgi.js, http_loader.js
calendar_cookie.htmlカレンダーのHTML。クッキーにデータを保存するバージョン。サーバーは不要。データの共有は出来ない。容量制限あり。default.css, calendar.css, holiday.js, calendar.js, calendar_db_cookie.js
default.css*.htmlから共通で使用するスタイルシート。
UIcalendar.jsカレンダーのUIを実現するためのJavaScript。テーブルの生成、セルの入力処理、イベント項目の表示・入力処理を行う。実際のデータの読み書きはcalendar_db_*.jsのいずれかに依頼する。holiday.js, calendar_db_*.js
calendar.csscalendar.jsが生成するカレンダーテーブルの見た目を決めるスタイルシート。
holiday.js休日情報を提供するJavaScript。
データインタフェースcalendar_db_null.jsデータを保存しないダミーのカレンダーデータインタフェース。
calendar_db_cgi.jsCGIを通してサーバーにデータを保存するカレンダーデータインタフェース。http_loader.js, cgi_*/list.rb, cgi_*/modify.rb
calendar_db_cookie.jsクッキーにデータを保存するカレンダーデータインタフェース。calendar.jsが使う。
http_loader.jsサーバーとの非同期通信をサポートするJavaScript。calendar_db_cgi.jsが使う。
CGI(pstore)cgi_pstore/list.rb読み込み用CGI。calendar_db_cgi.rbから呼び出す。cgi_pstore/utils.rb
cgi_pstore/modify.rb書き込み用CGI。calendar_db_cgi.rbから呼び出す。cgi_pstore/utils.rb
cgi_pstore/utils.rblist.rbとmodify.rbから使う共通コード。

カスタマイズ

月曜始まりにするには、calendar.js内の「firstDayOfWeek: 0」を「firstDayOfWeek: 1」へ変更してください。

休みの曜日を変更するには、calendar.js内の「holidayDaysOfWeek:」の後を変更してください。

見た目(色合いや寸法)を変更するには、calendar.cssを変更してください。

ライセンス

本ソフトウェアはMITライセンスに基づき自由に使用することが出来ます。

Copyright (c) 2009-2010 AKIYAMA Kouhei

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.