a lot of new functions (e.g. add event form), style fixes, bug fixes
This commit is contained in:
parent
82bd2ad310
commit
d1daca5029
|
@ -1,25 +0,0 @@
|
|||
<?php
|
||||
require_once("../libs/sanitize.php");
|
||||
require_once ("../../../lib/base.php");
|
||||
if( !OC_USER::isLoggedIn()){
|
||||
die("nosession");
|
||||
}
|
||||
if(sanitize_paranoid_string($_GET["task"]) == "load_events"){
|
||||
echo "parsing_fail";
|
||||
exit;
|
||||
}elseif(sanitize_paranoid_string($_GET["task"]) == "edit_event"){
|
||||
echo "edit_event";
|
||||
exit;
|
||||
}elseif(sanitize_paranoid_string($_GET["task"]) == "new_event"){
|
||||
echo "new_event";
|
||||
exit;
|
||||
}elseif(sanitize_paranoid_string($_GET["task"]) == "edit_settings"){
|
||||
echo "edit_settings";
|
||||
exit;
|
||||
}elseif(sanitize_paranoid_string($_GET["task"]) == "choose_calendar"){
|
||||
echo "choose_calendar";
|
||||
exit;
|
||||
}else{
|
||||
die("unknown task");
|
||||
}
|
||||
?>
|
|
@ -0,0 +1 @@
|
|||
|
|
@ -7,7 +7,7 @@
|
|||
* email: ownclouddev at georgswebsite dot de *
|
||||
* homepage: ownclouddev.georgswebsite.de *
|
||||
* manual: ownclouddev.georgswebsite.de/manual *
|
||||
* License: GNU General Public License (GPL) *
|
||||
* License: GNU AFFERO GENERAL PUBLIC LICENSE *
|
||||
* *
|
||||
* If you are not able to view the License, *
|
||||
* <http://www.gnu.org/licenses/> *
|
||||
|
@ -17,19 +17,11 @@
|
|||
* 59 Temple Place, Suite 330, Boston, *
|
||||
* MA 02111-1307 USA *
|
||||
*************************************************/
|
||||
require_once ("../../lib/base.php");
|
||||
require_once('../../../lib/base.php');
|
||||
$l10n = new OC_L10N('calendar');
|
||||
if(!OC_USER::isLoggedIn()) {
|
||||
header("Location: " . OC_HELPER::linkTo("index.php"));
|
||||
exit();
|
||||
die("<script type=\"text/javascript\">document.location = oc_webroot;</script>");
|
||||
}
|
||||
if(!file_exists("cfg/" . OC_USER::getUser() . ".cfg.php")) {
|
||||
header("Location: install.php");
|
||||
}
|
||||
OC_UTIL::addScript("calendar", "calendar");
|
||||
OC_UTIL::addScript("calendar", "calendar_init");
|
||||
OC_UTIL::addStyle("calendar", "style");
|
||||
require_once ("template.php");
|
||||
OC_APP::setActiveNavigationEntry("calendar_settings");
|
||||
$output = new OC_TEMPLATE("calendar", "settings", "admin");
|
||||
$output = new OC_TEMPLATE("calendar", "part.newevent");
|
||||
$output -> printpage();
|
||||
?>
|
|
@ -4,7 +4,7 @@
|
|||
<name>Calendar</name>
|
||||
<version>0.1</version>
|
||||
<licence>AGPL</licence>
|
||||
<author>Jakob Sack, Georg Ehrke (Interface)</author>
|
||||
<author>Jakob Sack, Georg Ehrke (Userinterface)</author>
|
||||
<require>2</require>
|
||||
<description>CalDAV server with viewing support.</description>
|
||||
</info>
|
||||
|
|
|
@ -1,7 +0,0 @@
|
|||
<?php
|
||||
$defaultview = "onemonthview";
|
||||
$calendar = array("files/calendar_app/private.ics", "files/calendar_app/german_hol.ics","files/calendar_app/christ_hol.ics");
|
||||
$calendar_name = array("files/calendar_app/private.ics"=>"Privater Kalender", "files/calendar_app/german_hol.ics"=>"Deutsche Feiertage", "files/calendar_app/christ_hol.ics"=>"Christliche Feiertage");
|
||||
$calendar_status = array("files/calendar_app/private.ics"=>"enabled", "files/calendar_app/german_hol.ics"=>"disabled", "files/calendar_app/christ_hol.ics"=>"enabled");
|
||||
$default_timezone;
|
||||
?>
|
|
@ -44,12 +44,12 @@
|
|||
.actions {height: 33px; min-width: 800px;}
|
||||
.controls {min-width: 800px;}
|
||||
.center {text-align: center;}
|
||||
.dateinfo {height: 15px; width: 100%; overflow: hidden; margin: 0; padding: 0; font-size: 12px;}
|
||||
.dateinfo {height: 15px; width: 100%; overflow: hidden; margin: 0; padding: 0; font-size: 12px;background: #F7F7F7;}
|
||||
.events {height: 65px; width: 100%; margin: 0; padding: 0;}
|
||||
.calendar_row {height: 20px; text-align: center;background: #ffffff;}
|
||||
.calendar_time {height: 20px; width: 50px; text-align:right;background: #ffffff;}
|
||||
.fourweeksview_item {text-align: center; height: 80px; background: #ffffff;}
|
||||
.onemonthview_item {text-align: center; height: 80px; margin: 0; padding: 0; vertical-align: top; background: #ffffff;}
|
||||
.weekend{text-align: center;height: 80px;margin: 0; padding: 0; vertical-align: top;background: #F3F3F3;}
|
||||
.fourweeksview_item {text-align: center; background: #ffffff;width: 14%;}
|
||||
.onemonthview_item {text-align: center; height: 80px; margin: 0; padding: 0;height: 100px; vertical-align: top; background: #ffffff; width: 14%; height: 16%;}
|
||||
.weekend{text-align: center;margin: 0; padding: 0; vertical-align: top;background: #F3F3F3;}
|
||||
.weekend_thead, .weekend_row{height: 20px;text-align: center;text-align: center;background: #F3F3F3;}
|
||||
.thisday{background: #FFFABC;}
|
||||
.thisday{background: #FFFABC;text-align: center;}
|
|
@ -479,17 +479,43 @@ function oc_cal_load_cal(loadview) {
|
|||
if(loadview == "oneday") {
|
||||
document.getElementById("datecontrol_date").value = oc_cal_dayshort[oc_cal_dayofweek] + oc_cal_space + oc_cal_dayofmonth + oc_cal_space + oc_cal_monthshort[oc_cal_month] + oc_cal_space + oc_cal_year;
|
||||
document.getElementById("onedayview_today").innerHTML = oc_cal_daylong[oc_cal_dayofweek] + oc_cal_space + oc_cal_dayofmonth + oc_cal_space + oc_cal_monthshort[oc_cal_month];
|
||||
var generate_dayofmonth = oc_cal_dayofmonth;
|
||||
var generate_month = oc_cal_month;
|
||||
var generate_year = oc_cal_year;
|
||||
if(parseInt(generate_dayofmonth) <= 9){
|
||||
generate_dayofmonth = "0" + generate_dayofmonth;
|
||||
}
|
||||
generate_month++;
|
||||
if(parseInt(generate_month) <= 9){
|
||||
generate_month = "0" + generate_month;
|
||||
}
|
||||
var generate_title = String(generate_dayofmonth) + String(generate_month) + String(generate_year);
|
||||
document.getElementById('onedayview_today').title = generate_title;
|
||||
}
|
||||
if(loadview == "oneweek") {
|
||||
document.getElementById("datecontrol_date").value = "CW: " + oc_cal_calw();
|
||||
var dates = oc_cal_generate_dates("oneweek");
|
||||
document.getElementById("oneweekview_monday").innerHTML = oc_cal_dayshort[1] + oc_cal_space + dates[0][0] + oc_cal_space + oc_cal_monthshort[dates[0][1]];
|
||||
document.getElementById("oneweekview_tuesday").innerHTML = oc_cal_dayshort[2] + oc_cal_space + dates[1][0] + oc_cal_space + oc_cal_monthshort[dates[1][1]];
|
||||
document.getElementById("oneweekview_wednesday").innerHTML = oc_cal_dayshort[3] + oc_cal_space + dates[2][0] + oc_cal_space + oc_cal_monthshort[dates[2][1]];
|
||||
document.getElementById("oneweekview_thursday").innerHTML = oc_cal_dayshort[4] + oc_cal_space + dates[3][0] + oc_cal_space + oc_cal_monthshort[dates[3][1]];
|
||||
document.getElementById("oneweekview_friday").innerHTML = oc_cal_dayshort[5] + oc_cal_space + dates[4][0] + oc_cal_space + oc_cal_monthshort[dates[4][1]];
|
||||
document.getElementById("oneweekview_saturday").innerHTML = oc_cal_dayshort[6] + oc_cal_space + dates[5][0] + oc_cal_space + oc_cal_monthshort[dates[5][1]];
|
||||
document.getElementById("oneweekview_sunday").innerHTML = oc_cal_dayshort[0] + oc_cal_space + dates[6][0] + oc_cal_space + oc_cal_monthshort[dates[6][1]];
|
||||
var weekdays = new Array("monday", "tuesday", "wednesday", "thursday", "friday", "saturday", "sunday");
|
||||
var weekday = 1;
|
||||
for(var i = 0; i <= 6; i++){
|
||||
var generate_dayofmonth = String(dates[i][0]);
|
||||
var generate_month = String(dates[i][1]);
|
||||
document.getElementById("oneweekview_" + weekdays[i]).innerHTML = oc_cal_dayshort[weekday] + oc_cal_space + dates[i][0] + oc_cal_space + oc_cal_monthshort[dates[i][1]];
|
||||
if(parseInt(generate_dayofmonth) <= 9){
|
||||
generate_dayofmonth = "0" + generate_dayofmonth;
|
||||
}
|
||||
generate_month++;
|
||||
if(parseInt(generate_month) <= 9){
|
||||
generate_month = "0" + generate_month;
|
||||
}
|
||||
var generate_title = String(generate_dayofmonth) + String(generate_month) + String(dates[i][2]);
|
||||
document.getElementById("oneweekview_" + weekdays[i]).title = generate_title;
|
||||
if(weekday == 6){
|
||||
weekday = 0;
|
||||
}else{
|
||||
weekday++;
|
||||
}
|
||||
}
|
||||
}
|
||||
if(loadview == "fourweeks") {
|
||||
var calw1 = oc_cal_calw();
|
||||
|
@ -516,34 +542,29 @@ function oc_cal_load_cal(loadview) {
|
|||
}
|
||||
var calwplusfour = calw4;
|
||||
var dates = oc_cal_generate_dates("fourweeks");
|
||||
document.getElementById("dateinfo_fourweeksview_monday_1").innerHTML = dates[0][0] + oc_cal_space + oc_cal_monthshort[dates[0][1]];
|
||||
document.getElementById("dateinfo_fourweeksview_tuesday_1").innerHTML = dates[1][0] + oc_cal_space + oc_cal_monthshort[dates[1][1]];
|
||||
document.getElementById("dateinfo_fourweeksview_wednesday_1").innerHTML = dates[2][0] + oc_cal_space + oc_cal_monthshort[dates[2][1]];
|
||||
document.getElementById("dateinfo_fourweeksview_thursday_1").innerHTML = dates[3][0] + oc_cal_space + oc_cal_monthshort[dates[3][1]];
|
||||
document.getElementById("dateinfo_fourweeksview_friday_1").innerHTML = dates[4][0] + oc_cal_space + oc_cal_monthshort[dates[4][1]];
|
||||
document.getElementById("dateinfo_fourweeksview_saturday_1").innerHTML = dates[5][0] + oc_cal_space + oc_cal_monthshort[dates[5][1]];
|
||||
document.getElementById("dateinfo_fourweeksview_sunday_1").innerHTML = dates[6][0] + oc_cal_space + oc_cal_monthshort[dates[6][1]];
|
||||
document.getElementById("dateinfo_fourweeksview_monday_2").innerHTML = dates[7][0] + oc_cal_space + oc_cal_monthshort[dates[7][1]];
|
||||
document.getElementById("dateinfo_fourweeksview_tuesday_2").innerHTML = dates[8][0] + oc_cal_space + oc_cal_monthshort[dates[8][1]];
|
||||
document.getElementById("dateinfo_fourweeksview_wednesday_2").innerHTML = dates[9][0] + oc_cal_space + oc_cal_monthshort[dates[9][1]];
|
||||
document.getElementById("dateinfo_fourweeksview_thursday_2").innerHTML = dates[10][0] + oc_cal_space + oc_cal_monthshort[dates[10][1]];
|
||||
document.getElementById("dateinfo_fourweeksview_friday_2").innerHTML = dates[11][0] + oc_cal_space + oc_cal_monthshort[dates[11][1]];
|
||||
document.getElementById("dateinfo_fourweeksview_saturday_2").innerHTML = dates[12][0] + oc_cal_space + oc_cal_monthshort[dates[12][1]];
|
||||
document.getElementById("dateinfo_fourweeksview_sunday_2").innerHTML = dates[13][0] + oc_cal_space + oc_cal_monthshort[dates[13][1]];
|
||||
document.getElementById("dateinfo_fourweeksview_monday_3").innerHTML = dates[14][0] + oc_cal_space + oc_cal_monthshort[dates[14][1]];
|
||||
document.getElementById("dateinfo_fourweeksview_tuesday_3").innerHTML = dates[15][0] + oc_cal_space + oc_cal_monthshort[dates[15][1]];
|
||||
document.getElementById("dateinfo_fourweeksview_wednesday_3").innerHTML = dates[16][0] + oc_cal_space + oc_cal_monthshort[dates[16][1]];
|
||||
document.getElementById("dateinfo_fourweeksview_thursday_3").innerHTML = dates[17][0] + oc_cal_space + oc_cal_monthshort[dates[17][1]];
|
||||
document.getElementById("dateinfo_fourweeksview_friday_3").innerHTML = dates[18][0] + oc_cal_space + oc_cal_monthshort[dates[18][1]];
|
||||
document.getElementById("dateinfo_fourweeksview_saturday_3").innerHTML = dates[19][0] + oc_cal_space + oc_cal_monthshort[dates[19][1]];
|
||||
document.getElementById("dateinfo_fourweeksview_sunday_3").innerHTML = dates[20][0] + oc_cal_space + oc_cal_monthshort[dates[20][1]];
|
||||
document.getElementById("dateinfo_fourweeksview_monday_4").innerHTML = dates[21][0] + oc_cal_space + oc_cal_monthshort[dates[21][1]];
|
||||
document.getElementById("dateinfo_fourweeksview_tuesday_4").innerHTML = dates[22][0] + oc_cal_space + oc_cal_monthshort[dates[22][1]];
|
||||
document.getElementById("dateinfo_fourweeksview_wednesday_4").innerHTML = dates[23][0] + oc_cal_space + oc_cal_monthshort[dates[23][1]];
|
||||
document.getElementById("dateinfo_fourweeksview_thursday_4").innerHTML = dates[24][0] + oc_cal_space + oc_cal_monthshort[dates[24][1]];
|
||||
document.getElementById("dateinfo_fourweeksview_friday_4").innerHTML = dates[25][0] + oc_cal_space + oc_cal_monthshort[dates[25][1]];
|
||||
document.getElementById("dateinfo_fourweeksview_saturday_4").innerHTML = dates[26][0] + oc_cal_space + oc_cal_monthshort[dates[26][1]];
|
||||
document.getElementById("dateinfo_fourweeksview_sunday_4").innerHTML = dates[27][0] + oc_cal_space + oc_cal_monthshort[dates[27][1]];
|
||||
var weekdays = new Array("monday", "tuesday", "wednesday", "thursday", "friday", "saturday", "sunday");
|
||||
var weeknum = 1;
|
||||
var weekday = 0;
|
||||
for(var i = 0; i <= 27; i++){
|
||||
var generate_dayofmonth = String(dates[i][0]);
|
||||
var generate_month = String(dates[i][1]);
|
||||
document.getElementById("dateinfo_fourweeksview_" + weekdays[weekday] + "_" + weeknum).innerHTML = generate_dayofmonth + oc_cal_space + oc_cal_monthshort[generate_month];
|
||||
if(parseInt(generate_dayofmonth) <= 9){
|
||||
generate_dayofmonth = "0" + generate_dayofmonth;
|
||||
}
|
||||
generate_month++;
|
||||
if(parseInt(generate_month) <= 9){
|
||||
generate_month = "0" + generate_month;
|
||||
}
|
||||
var generate_title = String(generate_dayofmonth) + String(generate_month) + String(dates[i][2]);
|
||||
document.getElementById("fourweeksview_" + weekdays[weekday] + "_" + weeknum).title = generate_title;
|
||||
if(weekday == 6){
|
||||
weekday = 0;
|
||||
weeknum++;
|
||||
}else{
|
||||
weekday++;
|
||||
}
|
||||
}
|
||||
document.getElementById("fourweeksview_calw1").innerHTML = calw1;
|
||||
document.getElementById("fourweeksview_calw2").innerHTML = calw2;
|
||||
document.getElementById("fourweeksview_calw3").innerHTML = calw3;
|
||||
|
@ -572,48 +593,30 @@ function oc_cal_load_cal(loadview) {
|
|||
oc_cal_rows = oc_cal_rows / 7;
|
||||
oc_cal_rows = Math.ceil(oc_cal_rows);
|
||||
var dates = oc_cal_generate_dates("onemonth");
|
||||
document.getElementById("dateinfo_onemonthview_monday_1").innerHTML = dates[0][0] + oc_cal_space + oc_cal_monthshort[dates[0][1]];
|
||||
document.getElementById("dateinfo_onemonthview_tuesday_1").innerHTML = dates[1][0] + oc_cal_space + oc_cal_monthshort[dates[1][1]];
|
||||
document.getElementById("dateinfo_onemonthview_wednesday_1").innerHTML = dates[2][0] + oc_cal_space + oc_cal_monthshort[dates[2][1]];
|
||||
document.getElementById("dateinfo_onemonthview_thursday_1").innerHTML = dates[3][0] + oc_cal_space + oc_cal_monthshort[dates[3][1]];
|
||||
document.getElementById("dateinfo_onemonthview_friday_1").innerHTML = dates[4][0] + oc_cal_space + oc_cal_monthshort[dates[4][1]];
|
||||
document.getElementById("dateinfo_onemonthview_saturday_1").innerHTML = dates[5][0] + oc_cal_space + oc_cal_monthshort[dates[5][1]];
|
||||
document.getElementById("dateinfo_onemonthview_sunday_1").innerHTML = dates[6][0] + oc_cal_space + oc_cal_monthshort[dates[6][1]];
|
||||
document.getElementById("dateinfo_onemonthview_monday_2").innerHTML = dates[7][0] + oc_cal_space + oc_cal_monthshort[dates[7][1]];
|
||||
document.getElementById("dateinfo_onemonthview_tuesday_2").innerHTML = dates[8][0] + oc_cal_space + oc_cal_monthshort[dates[8][1]];
|
||||
document.getElementById("dateinfo_onemonthview_wednesday_2").innerHTML = dates[9][0] + oc_cal_space + oc_cal_monthshort[dates[9][1]];
|
||||
document.getElementById("dateinfo_onemonthview_thursday_2").innerHTML = dates[10][0] + oc_cal_space + oc_cal_monthshort[dates[10][1]];
|
||||
document.getElementById("dateinfo_onemonthview_friday_2").innerHTML = dates[11][0] + oc_cal_space + oc_cal_monthshort[dates[11][1]];
|
||||
document.getElementById("dateinfo_onemonthview_saturday_2").innerHTML = dates[12][0] + oc_cal_space + oc_cal_monthshort[dates[12][1]];
|
||||
document.getElementById("dateinfo_onemonthview_sunday_2").innerHTML = dates[13][0] + oc_cal_space + oc_cal_monthshort[dates[13][1]];
|
||||
document.getElementById("dateinfo_onemonthview_monday_3").innerHTML = dates[14][0] + oc_cal_space + oc_cal_monthshort[dates[14][1]];
|
||||
document.getElementById("dateinfo_onemonthview_tuesday_3").innerHTML = dates[15][0] + oc_cal_space + oc_cal_monthshort[dates[15][1]];
|
||||
document.getElementById("dateinfo_onemonthview_wednesday_3").innerHTML = dates[16][0] + oc_cal_space + oc_cal_monthshort[dates[16][1]];
|
||||
document.getElementById("dateinfo_onemonthview_thursday_3").innerHTML = dates[17][0] + oc_cal_space + oc_cal_monthshort[dates[17][1]];
|
||||
document.getElementById("dateinfo_onemonthview_friday_3").innerHTML = dates[18][0] + oc_cal_space + oc_cal_monthshort[dates[18][1]];
|
||||
document.getElementById("dateinfo_onemonthview_saturday_3").innerHTML = dates[19][0] + oc_cal_space + oc_cal_monthshort[dates[19][1]];
|
||||
document.getElementById("dateinfo_onemonthview_sunday_3").innerHTML = dates[20][0] + oc_cal_space + oc_cal_monthshort[dates[20][1]];
|
||||
document.getElementById("dateinfo_onemonthview_monday_4").innerHTML = dates[21][0] + oc_cal_space + oc_cal_monthshort[dates[21][1]];
|
||||
document.getElementById("dateinfo_onemonthview_tuesday_4").innerHTML = dates[22][0] + oc_cal_space + oc_cal_monthshort[dates[22][1]];
|
||||
document.getElementById("dateinfo_onemonthview_wednesday_4").innerHTML = dates[23][0] + oc_cal_space + oc_cal_monthshort[dates[23][1]];
|
||||
document.getElementById("dateinfo_onemonthview_thursday_4").innerHTML = dates[24][0] + oc_cal_space + oc_cal_monthshort[dates[24][1]];
|
||||
document.getElementById("dateinfo_onemonthview_friday_4").innerHTML = dates[25][0] + oc_cal_space + oc_cal_monthshort[dates[25][1]];
|
||||
document.getElementById("dateinfo_onemonthview_saturday_4").innerHTML = dates[26][0] + oc_cal_space + oc_cal_monthshort[dates[26][1]];
|
||||
document.getElementById("dateinfo_onemonthview_sunday_4").innerHTML = dates[27][0] + oc_cal_space + oc_cal_monthshort[dates[27][1]];
|
||||
document.getElementById("dateinfo_onemonthview_monday_5").innerHTML = dates[28][0] + oc_cal_space + oc_cal_monthshort[dates[28][1]];
|
||||
document.getElementById("dateinfo_onemonthview_tuesday_5").innerHTML = dates[29][0] + oc_cal_space + oc_cal_monthshort[dates[29][1]];
|
||||
document.getElementById("dateinfo_onemonthview_wednesday_5").innerHTML = dates[30][0] + oc_cal_space + oc_cal_monthshort[dates[30][1]];
|
||||
document.getElementById("dateinfo_onemonthview_thursday_5").innerHTML = dates[31][0] + oc_cal_space + oc_cal_monthshort[dates[31][1]];
|
||||
document.getElementById("dateinfo_onemonthview_friday_5").innerHTML = dates[32][0] + oc_cal_space + oc_cal_monthshort[dates[32][1]];
|
||||
document.getElementById("dateinfo_onemonthview_saturday_5").innerHTML = dates[33][0] + oc_cal_space + oc_cal_monthshort[dates[33][1]];
|
||||
document.getElementById("dateinfo_onemonthview_sunday_5").innerHTML = dates[34][0] + oc_cal_space + oc_cal_monthshort[dates[34][1]];
|
||||
document.getElementById("dateinfo_onemonthview_monday_6").innerHTML = dates[35][0] + oc_cal_space + oc_cal_monthshort[dates[35][1]];
|
||||
document.getElementById("dateinfo_onemonthview_tuesday_6").innerHTML = dates[36][0] + oc_cal_space + oc_cal_monthshort[dates[36][1]];
|
||||
document.getElementById("dateinfo_onemonthview_wednesday_6").innerHTML = dates[37][0] + oc_cal_space + oc_cal_monthshort[dates[37][1]];
|
||||
document.getElementById("dateinfo_onemonthview_thursday_6").innerHTML = dates[38][0] + oc_cal_space + oc_cal_monthshort[dates[38][1]];
|
||||
document.getElementById("dateinfo_onemonthview_friday_6").innerHTML = dates[39][0] + oc_cal_space + oc_cal_monthshort[dates[39][1]];
|
||||
document.getElementById("dateinfo_onemonthview_saturday_6").innerHTML = dates[40][0] + oc_cal_space + oc_cal_monthshort[dates[40][1]];
|
||||
document.getElementById("dateinfo_onemonthview_sunday_6").innerHTML = dates[41][0] + oc_cal_space + oc_cal_monthshort[dates[41][1]];
|
||||
var weekdays = new Array("monday", "tuesday", "wednesday", "thursday", "friday", "saturday", "sunday");
|
||||
var weeknum = 1;
|
||||
var weekday = 0;
|
||||
for(var i = 0; i <= 41; i++){
|
||||
var generate_dayofmonth = dates[i][0];
|
||||
var generate_month = dates[i][1];
|
||||
var generate_year = dates[i][2];
|
||||
document.getElementById("dateinfo_onemonthview_" + weekdays[weekday] + "_" + weeknum).innerHTML = generate_dayofmonth + oc_cal_space + oc_cal_monthshort[generate_month];
|
||||
if(parseInt(generate_dayofmonth) <= 9){
|
||||
generate_dayofmonth = "0" + generate_dayofmonth;
|
||||
}
|
||||
generate_month++;
|
||||
if(parseInt(generate_month) <= 9){
|
||||
generate_month = "0" + generate_month;
|
||||
}
|
||||
var generate_title = String(generate_dayofmonth) + String(generate_month) + String(generate_year);
|
||||
document.getElementById("onemonthview_" + weekdays[weekday] + "_" + weeknum).title = generate_title;
|
||||
if(weekday == 6){
|
||||
weekday = 0;
|
||||
weeknum++;
|
||||
}else{
|
||||
weekday++;
|
||||
}
|
||||
}
|
||||
if(oc_cal_rows == 5) {
|
||||
document.getElementById("onemonthview_week_5").style.display = "table-row";
|
||||
}
|
||||
|
@ -660,7 +663,6 @@ function oc_cal_load_events(loadview) {
|
|||
if(loadview == "oneweek") {//(generate_dayofmonth, generate_month, generate_year);
|
||||
var weekdays = new Array("monday", "tuesday", "wednesday", "thursday", "friday", "saturday", "sunday");
|
||||
var dates = oc_cal_generate_dates("oneweek");
|
||||
document.getElementById("devbox").innerHTML = "";
|
||||
for(var i = 0; i <= 6; i++) {
|
||||
var loadevents_month = dates[i][0];
|
||||
var loadevents_days = dates[i][1];
|
||||
|
@ -846,50 +848,29 @@ function oc_cal_remove_events(removeview) {
|
|||
document.getElementById("events_fourweeksview_sunday_4").innerHTML = "";
|
||||
}
|
||||
if(removeview == "onemonth") {
|
||||
document.getElementById("events_onemonthview_monday_1").innerHTML = "";
|
||||
document.getElementById("events_onemonthview_tuesday_1").innerHTML = "";
|
||||
document.getElementById("events_onemonthview_wednesday_1").innerHTML = "";
|
||||
document.getElementById("events_onemonthview_thursday_1").innerHTML = "";
|
||||
document.getElementById("events_onemonthview_friday_1").innerHTML = "";
|
||||
document.getElementById("events_onemonthview_saturday_1").innerHTML = "";
|
||||
document.getElementById("events_onemonthview_sunday_1").innerHTML = "";
|
||||
document.getElementById("events_onemonthview_monday_2").innerHTML = "";
|
||||
document.getElementById("events_onemonthview_tuesday_2").innerHTML = "";
|
||||
document.getElementById("events_onemonthview_wednesday_2").innerHTML = "";
|
||||
document.getElementById("events_onemonthview_thursday_2").innerHTML = "";
|
||||
document.getElementById("events_onemonthview_friday_2").innerHTML = "";
|
||||
document.getElementById("events_onemonthview_saturday_2").innerHTML = "";
|
||||
document.getElementById("events_onemonthview_sunday_2").innerHTML = "";
|
||||
document.getElementById("events_onemonthview_monday_3").innerHTML = "";
|
||||
document.getElementById("events_onemonthview_tuesday_3").innerHTML = "";
|
||||
document.getElementById("events_onemonthview_wednesday_3").innerHTML = "";
|
||||
document.getElementById("events_onemonthview_thursday_3").innerHTML = "";
|
||||
document.getElementById("events_onemonthview_friday_3").innerHTML = "";
|
||||
document.getElementById("events_onemonthview_saturday_3").innerHTML = "";
|
||||
document.getElementById("events_onemonthview_sunday_3").innerHTML = "";
|
||||
document.getElementById("events_onemonthview_monday_4").innerHTML = "";
|
||||
document.getElementById("events_onemonthview_tuesday_4").innerHTML = "";
|
||||
document.getElementById("events_onemonthview_wednesday_4").innerHTML = "";
|
||||
document.getElementById("events_onemonthview_thursday_4").innerHTML = "";
|
||||
document.getElementById("events_onemonthview_friday_4").innerHTML = "";
|
||||
document.getElementById("events_onemonthview_saturday_4").innerHTML = "";
|
||||
document.getElementById("events_onemonthview_sunday_4").innerHTML = "";
|
||||
document.getElementById("events_onemonthview_monday_5").innerHTML = "";
|
||||
document.getElementById("events_onemonthview_tuesday_5").innerHTML = "";
|
||||
document.getElementById("events_onemonthview_wednesday_5").innerHTML = "";
|
||||
document.getElementById("events_onemonthview_thursday_5").innerHTML = "";
|
||||
document.getElementById("events_onemonthview_friday_5").innerHTML = "";
|
||||
document.getElementById("events_onemonthview_saturday_5").innerHTML = "";
|
||||
document.getElementById("events_onemonthview_sunday_5").innerHTML = "";
|
||||
document.getElementById("events_onemonthview_monday_6").innerHTML = "";
|
||||
document.getElementById("events_onemonthview_tuesday_6").innerHTML = "";
|
||||
document.getElementById("events_onemonthview_wednesday_6").innerHTML = "";
|
||||
document.getElementById("events_onemonthview_thursday_6").innerHTML = "";
|
||||
document.getElementById("events_onemonthview_friday_6").innerHTML = "";
|
||||
document.getElementById("events_onemonthview_saturday_6").innerHTML = "";
|
||||
document.getElementById("events_onemonthview_sunday_6").innerHTML = "";
|
||||
var weekdays = new Array("monday", "tuesday", "wednesday", "thursday", "friday", "saturday", "sunday");
|
||||
var weeknum = 1;
|
||||
var weekday = 0;
|
||||
for(var i = 0; i <= 41; i++){//events_onemonthview_saturday_6
|
||||
document.getElementById("events_onemonthview_" + weekdays[weekday] + "_" + weeknum).innerHTML = "";
|
||||
document.getElementById("onemonthview_" + weekdays[weekday] + "_" + weeknum).className = "onemonthview_item";
|
||||
if(weekday == 6){
|
||||
weekday = 0;
|
||||
weeknum++;
|
||||
}else{
|
||||
weekday++;
|
||||
}
|
||||
}
|
||||
}
|
||||
if(removeview == "list") {
|
||||
document.getElementById("listview").innerHTML = "";
|
||||
}
|
||||
}
|
||||
function oc_cal_newevent(date, time){
|
||||
if(oc_cal_opendialog == 0){
|
||||
$("#dialog_holder").load(oc_webroot + "/apps/calendar/ajax/neweventform.php?d=" + date + "&t=" + time);
|
||||
oc_cal_opendialog = 1;
|
||||
}else{
|
||||
alert(t("calendar", "You can't open more than one dialog per site!"));
|
||||
}
|
||||
}
|
|
@ -25,24 +25,6 @@
|
|||
* newevent_dialog_submit - submit *
|
||||
* editevent_dialog_submit - submit *
|
||||
*************************************************/
|
||||
function oc_cal_choosecalendar_dialog() {
|
||||
$( function() {
|
||||
$( "#choosecalendar_dialog" ).dialog();
|
||||
});
|
||||
}
|
||||
|
||||
function oc_cal_newevent_dialog() {
|
||||
$( function() {
|
||||
$( "#newevent" ).dialog();
|
||||
});
|
||||
}
|
||||
|
||||
function oc_cal_editevent_dialog() {
|
||||
$( function() {
|
||||
$( "#editevent" ).dialog();
|
||||
});
|
||||
}
|
||||
|
||||
function oc_cal_choosecalendar_dialog_submit() {
|
||||
|
||||
}
|
||||
|
|
|
@ -17,11 +17,16 @@
|
|||
* 59 Temple Place, Suite 330, Boston, *
|
||||
* MA 02111-1307 USA *
|
||||
*************************************************/
|
||||
//loading Buttons
|
||||
$(function(){
|
||||
$("#choosecalendar").buttonset();
|
||||
$(".choosecalendar_check").button();
|
||||
$("#list").button();
|
||||
//loading multiselect
|
||||
$(document).ready(function(){
|
||||
$("#calendar_select").multiSelect({
|
||||
selectedText: "Calendars",
|
||||
noneSelectedText: "Calendars",
|
||||
selectedList: 0,
|
||||
close: function(){
|
||||
alert("abc");
|
||||
}
|
||||
});
|
||||
});
|
||||
//init date vars
|
||||
var oc_cal_date = new Date();
|
||||
|
@ -47,6 +52,8 @@ var oc_cal_rows;
|
|||
var oc_cal_dates;
|
||||
var oc_cal_listview_numofevents = 0;
|
||||
var oc_cal_listview_count = 0;
|
||||
var oc_cal_opendialog = 0;
|
||||
var oc_cal_datemonthyear = String(oc_cal_dayofmonth) + String(oc_cal_month) + String(oc_cal_year);
|
||||
//event vars
|
||||
var oc_cal_events = new Array(2011);
|
||||
oc_cal_events[2011] = new Array(0,1,2,3,4,5,6,7,8,9,10,11);
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -1,72 +0,0 @@
|
|||
<?php
|
||||
/**
|
||||
/ ownCloud - Calendar Plugin
|
||||
/
|
||||
/ (c) Copyright 2011 Georg Ehrke
|
||||
/ author: Georg Ehrke
|
||||
/ email: ownclouddev at georgswebsite dot de
|
||||
/ homepage: ownclouddev.georgswebsite.de
|
||||
/ License: GPL
|
||||
/ <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
class OC_CALENDAR_ICAL{
|
||||
public $defaultview;
|
||||
public $calendar;
|
||||
public $calendar_name;
|
||||
public $calendar_status;
|
||||
public $ics_properties;
|
||||
public $VCALENDAR;
|
||||
public $VTIMEZONE;
|
||||
public $DAYLIGHT;
|
||||
|
||||
function __construct(){
|
||||
include("cfg/" . OC_USER::getUser() . ".cfg.php");
|
||||
include("iCalcreator.php");
|
||||
$this->defaultview = $defaultview;
|
||||
$this->calendar = $calendar;
|
||||
$this->calendar_name = $calendar_name;
|
||||
$this->calendarstatus = $calendar_status;
|
||||
}
|
||||
|
||||
public function load_ics($path){
|
||||
if(!file_exists("../../data/" . OC_USER::getUser() . $path)){
|
||||
return false;
|
||||
}else{
|
||||
$calfile = file("../../data/" . OC_USER::getUser() . $path);
|
||||
$return = array();
|
||||
$eventnum = 0;
|
||||
foreach($calfile as $line){
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public function converttojs($cal){
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
public function addevent($event, $calendar){
|
||||
|
||||
}
|
||||
|
||||
public function removeevent($event, $calendar){
|
||||
|
||||
}
|
||||
|
||||
public function changeevent($event, $calendar){
|
||||
|
||||
}
|
||||
|
||||
public function moveevent($event, $calendar){
|
||||
|
||||
}
|
||||
|
||||
public function choosecalendar_dialog(){
|
||||
|
||||
}
|
||||
}
|
|
@ -1,271 +0,0 @@
|
|||
<?php
|
||||
/*
|
||||
* Copyright (c) 2002,2003 Free Software Foundation
|
||||
* developed under the custody of the
|
||||
* Open Web Application Security Project
|
||||
* (http://www.owasp.org)
|
||||
*
|
||||
* This file is part of the PHP Filters.
|
||||
* PHP Filters is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* PHP Filters is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
* See the GNU General Public License for more details.
|
||||
*
|
||||
* If you are not able to view the LICENSE, which should
|
||||
* always be possible within a valid and working PHP Filters release,
|
||||
* please write to the Free Software Foundation, Inc.,
|
||||
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
* to get a copy of the GNU General Public License or to report a
|
||||
* possible license violation.
|
||||
*/
|
||||
///////////////////////////////////////
|
||||
// sanitize.inc.php
|
||||
// Sanitization functions for PHP
|
||||
// by: Gavin Zuchlinski, Jamie Pratt, Hokkaido
|
||||
// webpage: http://libox.net
|
||||
// Last modified: December 21, 2003
|
||||
//
|
||||
// Many thanks to those on the webappsec list for helping me improve these functions
|
||||
///////////////////////////////////////
|
||||
// Function list:
|
||||
// sanitize_paranoid_string($string) -- input string, returns string stripped of all non
|
||||
// alphanumeric
|
||||
// sanitize_system_string($string) -- input string, returns string stripped of special
|
||||
// characters
|
||||
// sanitize_sql_string($string) -- input string, returns string with slashed out quotes
|
||||
// sanitize_html_string($string) -- input string, returns string with html replacements
|
||||
// for special characters
|
||||
// sanitize_int($integer) -- input integer, returns ONLY the integer (no extraneous
|
||||
// characters
|
||||
// sanitize_float($float) -- input float, returns ONLY the float (no extraneous
|
||||
// characters)
|
||||
// sanitize($input, $flags) -- input any variable, performs sanitization
|
||||
// functions specified in flags. flags can be bitwise
|
||||
// combination of PARANOID, SQL, SYSTEM, HTML, INT, FLOAT, LDAP,
|
||||
// UTF8
|
||||
//
|
||||
//
|
||||
///////////////////////////////////////
|
||||
//
|
||||
// 20031121 jp - added defines for magic_quotes and register_globals, added ; to replacements
|
||||
// in sanitize_sql_string() function, created rudimentary testing pages
|
||||
// 20031221 gz - added nice_addslashes and changed sanitize_sql_string to use it
|
||||
//
|
||||
/////////////////////////////////////////
|
||||
|
||||
define("PARANOID", 1);
|
||||
define("SQL", 2);
|
||||
define("SYSTEM", 4);
|
||||
define("HTML", 8);
|
||||
define("INT", 16);
|
||||
define("FLOAT", 32);
|
||||
define("LDAP", 64);
|
||||
define("UTF8", 128);
|
||||
|
||||
// get register_globals ini setting - jp
|
||||
$register_globals = (bool) ini_get('register_gobals');
|
||||
if ($register_globals == TRUE) { define("REGISTER_GLOBALS", 1); } else { define("REGISTER_GLOBALS", 0); }
|
||||
|
||||
// get magic_quotes_gpc ini setting - jp
|
||||
$magic_quotes = (bool) ini_get('magic_quotes_gpc');
|
||||
if ($magic_quotes == TRUE) { define("MAGIC_QUOTES", 1); } else { define("MAGIC_QUOTES", 0); }
|
||||
|
||||
// addslashes wrapper to check for gpc_magic_quotes - gz
|
||||
function nice_addslashes($string)
|
||||
{
|
||||
// if magic quotes is on the string is already quoted, just return it
|
||||
if(MAGIC_QUOTES)
|
||||
return $string;
|
||||
else
|
||||
return addslashes($string);
|
||||
}
|
||||
|
||||
// internal function for utf8 decoding
|
||||
// thanks to Hokkaido for noticing that PHP's utf8_decode function is a little
|
||||
// screwy, and to jamie for the code
|
||||
function my_utf8_decode($string)
|
||||
{
|
||||
return strtr($string,
|
||||
"???????<3F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>",
|
||||
"SOZsozYYuAAAAAAACEEEEIIIIDNOOOOOOUUUUYsaaaaaaaceeeeiiiionoooooouuuuyy");
|
||||
}
|
||||
|
||||
// paranoid sanitization -- only let the alphanumeric set through
|
||||
function sanitize_paranoid_string($string, $min='', $max='')
|
||||
{
|
||||
$string = preg_replace("/[^a-zA-Z0-9]/", "", $string);
|
||||
$len = strlen($string);
|
||||
if((($min != '') && ($len < $min)) || (($max != '') && ($len > $max)))
|
||||
return FALSE;
|
||||
return $string;
|
||||
}
|
||||
|
||||
// sanitize a string in prep for passing a single argument to system() (or similar)
|
||||
function sanitize_system_string($string, $min='', $max='')
|
||||
{
|
||||
$pattern = '/(;|\||`|>|<|&|^|"|'."\n|\r|'".'|{|}|[|]|\)|\()/i'; // no piping, passing possible environment variables ($),
|
||||
// seperate commands, nested execution, file redirection,
|
||||
// background processing, special commands (backspace, etc.), quotes
|
||||
// newlines, or some other special characters
|
||||
$string = preg_replace($pattern, '', $string);
|
||||
$string = '"'.preg_replace('/\$/', '\\\$', $string).'"'; //make sure this is only interpretted as ONE argument
|
||||
$len = strlen($string);
|
||||
if((($min != '') && ($len < $min)) || (($max != '') && ($len > $max)))
|
||||
return FALSE;
|
||||
return $string;
|
||||
}
|
||||
|
||||
// sanitize a string for SQL input (simple slash out quotes and slashes)
|
||||
function sanitize_sql_string($string, $min='', $max='')
|
||||
{
|
||||
$string = nice_addslashes($string); //gz
|
||||
$pattern = "/;/"; // jp
|
||||
$replacement = "";
|
||||
$len = strlen($string);
|
||||
if((($min != '') && ($len < $min)) || (($max != '') && ($len > $max)))
|
||||
return FALSE;
|
||||
return preg_replace($pattern, $replacement, $string);
|
||||
}
|
||||
|
||||
// sanitize a string for SQL input (simple slash out quotes and slashes)
|
||||
function sanitize_ldap_string($string, $min='', $max='')
|
||||
{
|
||||
$pattern = '/(\)|\(|\||&)/';
|
||||
$len = strlen($string);
|
||||
if((($min != '') && ($len < $min)) || (($max != '') && ($len > $max)))
|
||||
return FALSE;
|
||||
return preg_replace($pattern, '', $string);
|
||||
}
|
||||
|
||||
|
||||
// sanitize a string for HTML (make sure nothing gets interpretted!)
|
||||
function sanitize_html_string($string)
|
||||
{
|
||||
$pattern[0] = '/\&/';
|
||||
$pattern[1] = '/</';
|
||||
$pattern[2] = "/>/";
|
||||
$pattern[3] = '/\n/';
|
||||
$pattern[4] = '/"/';
|
||||
$pattern[5] = "/'/";
|
||||
$pattern[6] = "/%/";
|
||||
$pattern[7] = '/\(/';
|
||||
$pattern[8] = '/\)/';
|
||||
$pattern[9] = '/\+/';
|
||||
$pattern[10] = '/-/';
|
||||
$replacement[0] = '&';
|
||||
$replacement[1] = '<';
|
||||
$replacement[2] = '>';
|
||||
$replacement[3] = '<br>';
|
||||
$replacement[4] = '"';
|
||||
$replacement[5] = ''';
|
||||
$replacement[6] = '%';
|
||||
$replacement[7] = '(';
|
||||
$replacement[8] = ')';
|
||||
$replacement[9] = '+';
|
||||
$replacement[10] = '-';
|
||||
return preg_replace($pattern, $replacement, $string);
|
||||
}
|
||||
|
||||
// make int int!
|
||||
function sanitize_int($integer, $min='', $max='')
|
||||
{
|
||||
$int = intval($integer);
|
||||
if((($min != '') && ($int < $min)) || (($max != '') && ($int > $max)))
|
||||
return FALSE;
|
||||
return $int;
|
||||
}
|
||||
|
||||
// make float float!
|
||||
function sanitize_float($float, $min='', $max='')
|
||||
{
|
||||
$float = floatval($float);
|
||||
if((($min != '') && ($float < $min)) || (($max != '') && ($float > $max)))
|
||||
return FALSE;
|
||||
return $float;
|
||||
}
|
||||
|
||||
// glue together all the other functions
|
||||
function sanitize($input, $flags, $min='', $max='')
|
||||
{
|
||||
if($flags & UTF8) $input = my_utf8_decode($input);
|
||||
if($flags & PARANOID) $input = sanitize_paranoid_string($input, $min, $max);
|
||||
if($flags & INT) $input = sanitize_int($input, $min, $max);
|
||||
if($flags & FLOAT) $input = sanitize_float($input, $min, $max);
|
||||
if($flags & HTML) $input = sanitize_html_string($input, $min, $max);
|
||||
if($flags & SQL) $input = sanitize_sql_string($input, $min, $max);
|
||||
if($flags & LDAP) $input = sanitize_ldap_string($input, $min, $max);
|
||||
if($flags & SYSTEM) $input = sanitize_system_string($input, $min, $max);
|
||||
return $input;
|
||||
}
|
||||
|
||||
function check_paranoid_string($input, $min='', $max='')
|
||||
{
|
||||
if($input != sanitize_paranoid_string($input, $min, $max))
|
||||
return FALSE;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
function check_int($input, $min='', $max='')
|
||||
{
|
||||
if($input != sanitize_int($input, $min, $max))
|
||||
return FALSE;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
function check_float($input, $min='', $max='')
|
||||
{
|
||||
if($input != sanitize_float($input, $min, $max))
|
||||
return FALSE;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
function check_html_string($input, $min='', $max='')
|
||||
{
|
||||
if($input != sanitize_html_string($input, $min, $max))
|
||||
return FALSE;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
function check_sql_string($input, $min='', $max='')
|
||||
{
|
||||
if($input != sanitize_sql_string($input, $min, $max))
|
||||
return FALSE;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
function check_ldap_string($input, $min='', $max='')
|
||||
{
|
||||
if($input != sanitize_string($input, $min, $max))
|
||||
return FALSE;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
function check_system_string($input, $min='', $max='')
|
||||
{
|
||||
if($input != sanitize_system_string($input, $min, $max, TRUE))
|
||||
return FALSE;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
// glue together all the other functions
|
||||
function check($input, $flags, $min='', $max='')
|
||||
{
|
||||
$oldput = $input;
|
||||
if($flags & UTF8) $input = my_utf8_decode($input);
|
||||
if($flags & PARANOID) $input = sanitize_paranoid_string($input, $min, $max);
|
||||
if($flags & INT) $input = sanitize_int($input, $min, $max);
|
||||
if($flags & FLOAT) $input = sanitize_float($input, $min, $max);
|
||||
if($flags & HTML) $input = sanitize_html_string($input, $min, $max);
|
||||
if($flags & SQL) $input = sanitize_sql_string($input, $min, $max);
|
||||
if($flags & LDAP) $input = sanitize_ldap_string($input, $min, $max);
|
||||
if($flags & SYSTEM) $input = sanitize_system_string($input, $min, $max, TRUE);
|
||||
if($input != $oldput)
|
||||
return FALSE;
|
||||
return TRUE;
|
||||
}
|
||||
?>
|
|
@ -1,27 +0,0 @@
|
|||
<?php
|
||||
/************************************************
|
||||
* ownCloud - Calendar Plugin *
|
||||
* *
|
||||
* (c) Copyright 2011 Georg Ehrke *
|
||||
* author: Georg Ehrke *
|
||||
* email: ownclouddev at georgswebsite dot de *
|
||||
* homepage: http://ownclouddev.georgswebsite.de *
|
||||
* License: GPL *
|
||||
* <http://www.gnu.org/licenses/>. *
|
||||
************************************************/
|
||||
require_once('../../lib/base.php');
|
||||
if(!OC_USER::isLoggedIn()){
|
||||
header("Location: " . OC_HELPER::linkTo("index.php"));
|
||||
exit();
|
||||
}
|
||||
if(!file_exists("cfg/" . OC_USER::getUser() . ".cfg.php")){
|
||||
header("Location: install.php");
|
||||
}
|
||||
OC_UTIL::addScript("calendar", "calendar");
|
||||
OC_UTIL::addScript("calendar", "calendar_init");
|
||||
OC_UTIL::addStyle("calendar", "style");
|
||||
require_once("template.php");
|
||||
OC_APP::setActiveNavigationEntry("calendar_settings");
|
||||
$output = new OC_TEMPLATE("calendar", "settings", "admin");
|
||||
$output->printpage();
|
||||
?>
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,134 @@
|
|||
<div id="editevent" title="<?php echo $l -> t("Edit an event");?>">
|
||||
<table id="editevent_table" width="100%">
|
||||
<tr>
|
||||
<td width="75px"><?php echo $l -> t("Title");?>:</td>
|
||||
<td>
|
||||
<input type="text" style="width:350px;" size="100" placeholder="Title of the Event" maxlength="100" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="75px"><?php echo $l -> t("Location");?>:</td>
|
||||
<td>
|
||||
<input type="text" style="width:350px;" size="100" placeholder="Location of the Event" maxlength="100" />
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<table>
|
||||
<tr>
|
||||
<td width="75px"><?php echo $l -> t("Category");?>:</td>
|
||||
<td>
|
||||
<select class="formselect" id="formcategorie_select" style="width:140px;">
|
||||
<option>Coming soon</option><!--
|
||||
<option>Work</option>
|
||||
<option>Call</option>-->
|
||||
</select></td>
|
||||
<td width="75px"> <?php echo $l -> t("Calendar");?>:</td>
|
||||
<td>
|
||||
<select class="formselect" id="formcalendar_select" style="width:140px;">
|
||||
<option>Coming soon</option><!--
|
||||
<option>Calendar 1</option>
|
||||
<option>Calendar 2</option>
|
||||
<option>Calendar 3</option>-->
|
||||
</select></td>
|
||||
</tr>
|
||||
</table>
|
||||
<hr>
|
||||
<table>
|
||||
<tr>
|
||||
<td width="75px"></td>
|
||||
<td>
|
||||
<input onclick="lock_time();" type="checkbox" id="newcalendar_allday_checkbox">
|
||||
<label for="newcalendar_allday_checkbox"><?php echo $l -> t("All Day Event");?></label></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<?php $day = substr($_GET["d"], 0, 2);
|
||||
$month = substr($_GET["d"], 2, 2);
|
||||
$year = substr($_GET["d"], 4, 4);
|
||||
?>
|
||||
<td width="75px"><?php echo $l -> t("From");?>:</td>
|
||||
<td>
|
||||
<input type="text" value="<?php echo $day . "-" . $month . "-" . $year;?>" id="from">
|
||||
|
||||
<input type="time" value="<?php echo date("H:i");?>" id="fromtime">
|
||||
</td><!--use jquery-->
|
||||
</tr>
|
||||
<tr>
|
||||
<?php
|
||||
if(date("H") == 23) {$day++;
|
||||
$time = 0;
|
||||
} else {$time = date("H") + 1;
|
||||
}
|
||||
?>
|
||||
<td width="75px"><?php echo $l -> t("To");?>:</td>
|
||||
<td>
|
||||
<input type="text" value="<?php echo $day . "-" . $month . "-" . $year;?>" id="to">
|
||||
|
||||
<input type="time" value="<?php echo $time . date(":i");?>" id="totime">
|
||||
</td><!--use jquery-->
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="75px"><?php echo $l -> t("Repeat");?>:</td>
|
||||
<td>
|
||||
<select class="formselect" id="formrepeat_select" style="width:350px;">
|
||||
<option id="doesnotrepeat" selected="selected">Does not repeat</option>
|
||||
<option>Daily</option>
|
||||
<option>Weekly</option>
|
||||
<option>Every Weekday</option>
|
||||
<option>Bi-Weekly</option>
|
||||
<option>Monthly</option>
|
||||
<option>Yearly</option>
|
||||
</select></td>
|
||||
</tr>
|
||||
</table>
|
||||
<hr>
|
||||
<table>
|
||||
<tr>
|
||||
<td width="75px"><?php echo $l -> t("Attendees");?>:</td>
|
||||
<td style="height: 50px;"></td>
|
||||
</tr>
|
||||
</table>
|
||||
<hr>
|
||||
<table>
|
||||
<tr>
|
||||
<td width="75px" style="vertical-align: top;"><?php echo $l -> t("Description");?>:</td>
|
||||
<td> <textarea style="width:350px;height: 150px;"placeholder="Description of the Event"></textarea></td>
|
||||
</tr>
|
||||
</table>
|
||||
<span id="editevent_actions">
|
||||
<input type="button" style="float: left;" value="<?php echo $l -> t("Submit");?>">
|
||||
<input type="button" style="float: right;" value="<?php echo $l -> t("Reset");?>">
|
||||
</span>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
$( "#editevent" ).dialog({
|
||||
width : 500,
|
||||
close : function() {
|
||||
oc_cal_opendialog = 0;
|
||||
var lastchild = document.getElementById("body-user").lastChild
|
||||
while(lastchild.id != "lightbox"){
|
||||
document.getElementById("body-user").removeChild(lastchild);
|
||||
lastchild = document.getElementById("body-user").lastChild;
|
||||
}
|
||||
},
|
||||
open : function(){alert("Doesn't work yet.");}
|
||||
});
|
||||
$( "#from" ).datepicker({
|
||||
dateFormat : 'dd-mm-yy'
|
||||
});
|
||||
$( "#to" ).datepicker({
|
||||
dateFormat : 'dd-mm-yy'
|
||||
});
|
||||
function lock_time() {
|
||||
if(document.getElementById("totime").disabled == true) {
|
||||
document.getElementById("fromtime").disabled = false;
|
||||
document.getElementById("totime").disabled = false;
|
||||
document.getElementById("fromtime").style.color = "#333";
|
||||
document.getElementById("totime").style.color = "#333";
|
||||
} else {
|
||||
document.getElementById("fromtime").disabled = true;
|
||||
document.getElementById("totime").disabled = true;
|
||||
document.getElementById("fromtime").style.color = "#A9A9A9";
|
||||
document.getElementById("totime").style.color = "#A9A9A9";
|
||||
}
|
||||
}
|
||||
</script>
|
|
@ -0,0 +1,87 @@
|
|||
<div id="eventinfo" title="<?php echo $l -> t("Edit an event");?>">
|
||||
<table id="eventinfo_table" width="100%">
|
||||
<tr>
|
||||
<td width="75px"><?php echo $l -> t("Title");?>:</td>
|
||||
<td>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="75px"><?php echo $l -> t("Location");?>:</td>
|
||||
<td>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<table>
|
||||
<tr>
|
||||
<td width="75px"><?php echo $l -> t("Category");?>:</td>
|
||||
<td></td>
|
||||
<td width="75px"> <?php echo $l -> t("Calendar");?>:</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
</table>
|
||||
<hr>
|
||||
<table>
|
||||
<tr>
|
||||
<td width="75px"></td>
|
||||
<td>
|
||||
<input type="checkbox" id="newcalendar_allday_checkbox" disabled="true">
|
||||
<label for="newcalendar_allday_checkbox"><?php echo $l -> t("All Day Event");?></label></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="75px"><?php echo $l -> t("From");?>:</td>
|
||||
<td>
|
||||
|
||||
</td><!--use jquery-->
|
||||
</tr>
|
||||
<tr>
|
||||
|
||||
<td width="75px"><?php echo $l -> t("To");?>:</td>
|
||||
<td>
|
||||
|
||||
</td><!--use jquery-->
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="75px"><?php echo $l -> t("Repeat");?>:</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
</table>
|
||||
<hr>
|
||||
<table>
|
||||
<tr>
|
||||
<td width="75px"><?php echo $l -> t("Attendees");?>:</td>
|
||||
<td style="height: 50px;"></td>
|
||||
</tr>
|
||||
</table>
|
||||
<hr>
|
||||
<table>
|
||||
<tr>
|
||||
<td width="75px" style="vertical-align: top;"><?php echo $l -> t("Description");?>:</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
</table>
|
||||
<span id="editevent_actions">
|
||||
<input type="button" style="float: left;" value="<?php echo $l -> t("Close");?>">
|
||||
<input type="button" style="float: right;" value="<?php echo $l -> t("Edit");?>">
|
||||
</span>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
$( "#eventinfo" ).dialog({
|
||||
width : 500,
|
||||
close : function() {
|
||||
oc_cal_opendialog = 0;
|
||||
var lastchild = document.getElementById("body-user").lastChild
|
||||
while(lastchild.id != "lightbox"){
|
||||
document.getElementById("body-user").removeChild(lastchild);
|
||||
lastchild = document.getElementById("body-user").lastChild;
|
||||
}
|
||||
},
|
||||
open : function(){alert("Doesn't work yet.");}
|
||||
});
|
||||
$( "#from" ).datepicker({
|
||||
dateFormat : 'dd-mm-yy'
|
||||
});
|
||||
$( "#to" ).datepicker({
|
||||
dateFormat : 'dd-mm-yy'
|
||||
});
|
||||
}
|
||||
</script>
|
|
@ -0,0 +1,149 @@
|
|||
<div id="newevent" title="<?php echo $l -> t("Create a new event");?>">
|
||||
<table id="newevent_table" width="100%">
|
||||
<tr>
|
||||
<td width="75px"><?php echo $l -> t("Title");?>:</td>
|
||||
<td>
|
||||
<input type="text" style="width:350px;" size="100" placeholder="Title of the Event" maxlength="100" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="75px"><?php echo $l -> t("Location");?>:</td>
|
||||
<td>
|
||||
<input type="text" style="width:350px;" size="100" placeholder="Location of the Event" maxlength="100" />
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<table>
|
||||
<tr>
|
||||
<td width="75px"><?php echo $l -> t("Category");?>:</td>
|
||||
<td>
|
||||
<select class="formselect" id="formcategorie_select" style="width:140px;">
|
||||
<option>Coming soon</option><!--
|
||||
<option>Work</option>
|
||||
<option>Call</option>-->
|
||||
</select></td>
|
||||
<td width="75px"> <?php echo $l -> t("Calendar");?>:</td>
|
||||
<td>
|
||||
<select class="formselect" id="formcalendar_select" style="width:140px;">
|
||||
<option>Coming soon</option><!--
|
||||
<option>Calendar 1</option>
|
||||
<option>Calendar 2</option>
|
||||
<option>Calendar 3</option>-->
|
||||
</select></td>
|
||||
</tr>
|
||||
</table>
|
||||
<hr>
|
||||
<?php $day = substr($_GET["d"], 0, 2);
|
||||
$month = substr($_GET["d"], 2, 2);
|
||||
$year = substr($_GET["d"], 4, 4);
|
||||
$time = $_GET["t"];
|
||||
if($time != "undefined" && !is_nan($_GET["t"]) && $_GET["t"] != "allday"){
|
||||
$time = $_GET["t"];
|
||||
$minutes = "00";
|
||||
}elseif($_GET["t"] == "allday"){
|
||||
$time = "0";
|
||||
$minutes = "00";
|
||||
$allday = true;
|
||||
}else{
|
||||
$time = date("H");
|
||||
$minutes = date("i");
|
||||
}
|
||||
?>
|
||||
<table>
|
||||
<tr>
|
||||
<td width="75px"></td>
|
||||
<td>
|
||||
<input onclick="lock_time();" type="checkbox"<?php if($allday == true){echo "checked=\"checked\"";} ?> id="newcalendar_allday_checkbox">
|
||||
<?php if($allday == true){echo "<script type=\"text/javascript\">lock_time();</script>";}?>
|
||||
<label for="newcalendar_allday_checkbox"><?php echo $l -> t("All Day Event");?></label></td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
||||
<td width="75px"><?php echo $l -> t("From");?>:</td>
|
||||
<td>
|
||||
<input type="text" value="<?php echo $day . "-" . $month . "-" . $year;?>" id="from">
|
||||
|
||||
<input type="time" value="<?php echo $time . ":" . $minutes;?>" id="fromtime">
|
||||
</td><!--use jquery-->
|
||||
</tr>
|
||||
<tr>
|
||||
<?php
|
||||
if(date("H") == 23) {
|
||||
$day++;
|
||||
$time = 0;
|
||||
} else {
|
||||
$time++;
|
||||
}
|
||||
?>
|
||||
<td width="75px"><?php echo $l -> t("To");?>:</td>
|
||||
<td>
|
||||
<input type="text" value="<?php echo $day . "-" . $month . "-" . $year;?>" id="to">
|
||||
|
||||
<input type="time" value="<?php echo $time . ":" . $minutes;?>" id="totime">
|
||||
</td><!--use jquery-->
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="75px"><?php echo $l -> t("Repeat");?>:</td>
|
||||
<td>
|
||||
<select class="formselect" id="formrepeat_select" style="width:350px;">
|
||||
<option id="doesnotrepeat" selected="selected">Does not repeat</option>
|
||||
<option>Daily</option>
|
||||
<option>Weekly</option>
|
||||
<option>Every Weekday</option>
|
||||
<option>Bi-Weekly</option>
|
||||
<option>Monthly</option>
|
||||
<option>Yearly</option>
|
||||
</select></td>
|
||||
</tr>
|
||||
</table>
|
||||
<hr>
|
||||
<table>
|
||||
<tr>
|
||||
<td width="75px"><?php echo $l -> t("Attendees");?>:</td>
|
||||
<td style="height: 50px;"></td>
|
||||
</tr>
|
||||
</table>
|
||||
<hr>
|
||||
<table>
|
||||
<tr>
|
||||
<td width="75px" style="vertical-align: top;"><?php echo $l -> t("Description");?>:</td>
|
||||
<td> <textarea style="width:350px;height: 150px;"placeholder="Description of the Event"></textarea></td>
|
||||
</tr>
|
||||
</table>
|
||||
<span id="newcalendar_actions">
|
||||
<input type="button" style="float: left;" value="<?php echo $l -> t("Submit");?>">
|
||||
<input type="button" style="float: right;" value="<?php echo $l -> t("Reset");?>">
|
||||
</span>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
$( "#newevent" ).dialog({
|
||||
width : 500,
|
||||
close : function() {
|
||||
oc_cal_opendialog = 0;
|
||||
var lastchild = document.getElementById("body-user").lastChild
|
||||
while(lastchild.id != "lightbox"){
|
||||
document.getElementById("body-user").removeChild(lastchild);
|
||||
lastchild = document.getElementById("body-user").lastChild;
|
||||
}
|
||||
}
|
||||
});
|
||||
$( "#from" ).datepicker({
|
||||
dateFormat : 'dd-mm-yy'
|
||||
});
|
||||
$( "#to" ).datepicker({
|
||||
dateFormat : 'dd-mm-yy'
|
||||
});
|
||||
function lock_time() {
|
||||
if(document.getElementById("totime").disabled == true) {
|
||||
document.getElementById("fromtime").disabled = false;
|
||||
document.getElementById("totime").disabled = false;
|
||||
document.getElementById("fromtime").style.color = "#333";
|
||||
document.getElementById("totime").style.color = "#333";
|
||||
} else {
|
||||
document.getElementById("fromtime").disabled = true;
|
||||
document.getElementById("totime").disabled = true;
|
||||
document.getElementById("fromtime").style.color = "#A9A9A9";
|
||||
document.getElementById("totime").style.color = "#A9A9A9";
|
||||
}
|
||||
}
|
||||
</script>
|
Loading…
Reference in New Issue