diff --git a/.gitignore b/.gitignore new file mode 100644 index 000000000..b05862155 --- /dev/null +++ b/.gitignore @@ -0,0 +1,50 @@ +# just sane ignores +.*.sw[po] +*.bak +*.BAK +*~ +*.orig +*.class +.cvsignore +Thumbs.db +*.py[co] +_darcs/* +CVS/* +.svn/* +RCS/* +*.backup* + +# kdevelop +.kdev +*.kdev4 +*.kate-swp + +# kate editor +.kateproject* + +# Lokalize +*lokalize* + +# eclipse +.project +.settings + +# netbeans +nbproject + +# phpStorm +.idea +*.iml + +# geany +*.geany + +# Cloud9IDE +.settings.xml +.c9revisions + +# vim ex mode +.vimrc + +# Mac OS +.DS_Store \ No newline at end of file diff --git a/3rdparty/fullcalendar/css/fullcalendar.css b/3rdparty/fullcalendar/css/fullcalendar.css index 2df45443d..61ee82a1e 100644 --- a/3rdparty/fullcalendar/css/fullcalendar.css +++ b/3rdparty/fullcalendar/css/fullcalendar.css @@ -1,5 +1,5 @@ /*! - * FullCalendar v1.6.1 Stylesheet + * FullCalendar v1.6.4 Stylesheet * Docs & License: http://arshaw.com/fullcalendar/ * (c) 2013 Adam Shaw */ @@ -102,10 +102,11 @@ html .fc, .fc-content { clear: both; + zoom: 1; /* for IE7, gives accurate coordinates for [un]freezeContentHeight */ } .fc-view { - width: 100%; /* needed for view switching (when view is absolute) */ + width: 100%; overflow: hidden; } @@ -120,7 +121,7 @@ html .fc, } .fc-state-highlight { /*
"; + html += + " | " + + htmlEscape(weekNumberTitle) + + " | "; } - for (i=0; i" + - "" + - " | "; + date = cellToDate(row, 0); + html += + "" +
+ " " +
+ htmlEscape(formatDate(date, weekNumberFormat)) +
+ " " +
+ " | ";
}
- for (j=0; j
---|
"),r=0;re>r;r++)o=F(0,r),s+=" | ";for(s+=" |
---|---|
"+""+" | "),a=0;re>a;a++)o=F(r,a),i=["fc-day","fc-"+Se[o.getDay()],l],o.getMonth()!=u&&i.push("fc-other-month"),+o==+d&&(i.push("fc-today"),i.push(be+"-state-highlight")),s+=""+" ",n&&(s+=" "+o.getDate()+" "),s+=" | ";s+="
":" | ",r=0;Le>r;r++)e+=" | ";for(e+=" | "+" |
---|---|---|---|
",r=0;Le>r;r++)e+=" | "+" "+" "+""+" "+" | ";for(e+=""+" |
"+tn("allDayText")+" | "+""+" "+" | "+""+" |
---|
"+(l&&i?" ":un(a,tn("axisFormat")))+" | "+""+" | "+"
---|
"+Ue("allDayText")+" | "+""+" "+" | "+""+" |
---|
"+(f&&i?" ":on(r,Ue("axisFormat")))+" | "+""+" | "+"
---|
').html(view.title).text()); + viewRender: function(view) { + $('#datecontrol_current').html($('
').html(view.title).text()); + $( "#datecontrol_date" ).datepicker("setDate", $('#fullcalendar').fullCalendar('getDate')); if (view.name != defaultView) { $.post(OC.filePath('calendar', 'ajax', 'changeview.php'), {v:view.name}); defaultView = view.name; @@ -903,6 +981,10 @@ $(document).ready(function(){ else { $('#fullcalendar').fullCalendar('option', 'aspectRatio', 1.35); } + try { + Calendar.Util.setTimeline(); + } catch(err) { + } }, columnFormat: { week: 'ddd d. MMM' @@ -933,9 +1015,20 @@ $(document).ready(function(){ onSelect: function(value, inst) { var date = inst.input.datepicker('getDate'); $('#fullcalendar').fullCalendar('gotoDate', date); + + var view = $('#fullcalendar').fullCalendar('getView'); + if(view.name == 'agendaWeek'){ + $("[class*='fc-col']").removeClass('activeDay'); + daySel=Calendar.Util.getDayOfWeek(date.getDay()); + $('td.fc-'+daySel).addClass('activeDay'); + } + if (view.name == 'month') { + $('td.fc-day').removeClass('activeDay'); + prettyDate = $.datepicker.formatDate( 'yy-mm-dd',date); + $('td[data-date=' + prettyDate + ']').addClass('activeDay'); + } } }); - fillWindow($('#content')); $(OC.Tags).on('change', function(event, data) { if(data.type === 'event') { @@ -964,13 +1057,30 @@ $(document).ready(function(){ $('#datecontrol_right').click(function(){ $('#fullcalendar').fullCalendar('next'); }); + $('#datecontrol_current').click(function() { + $('#datecontrol_date').slideToggle(500); + }); + $('#datecontrol_date').hide(); + $('#app-settings-header').on('click keydown',function(event) { + if(wrongKey(event)) { + return; + } + var bodyListener = function(e) { + if($('#app-settings').find($(e.target)).length === 0) { + $('#app-settings').switchClass('open', ''); + } + }; + if($('#app-settings').hasClass('open')) { + $('#app-settings').switchClass('open', ''); + $('body').unbind('click', bodyListener); + } else { + $('#app-settings').switchClass('', 'open'); + $('body').bind('click', bodyListener); + } + }); Calendar.UI.Share.init(); Calendar.UI.Drop.init(); - $('#choosecalendar .generalsettings').on('click keydown', function(event) { - event.preventDefault(); - OC.appSettings({appid:'calendar', loadJS:true, cache:false, scriptName:'settingswrapper.php'}); - }); - $('#fullcalendar').fullCalendar('option', 'height', $(window).height() - $('#controls').height() - $('#header').height() - 15); + $('#fullcalendar').fullCalendar('option', 'height', $(window).height() - $('#controls').height() - $('#header').height()); // Save the eventSource for shared events. for (var i in eventSources) { if (eventSources[i].url.substr(-13) === 'shared_events') { @@ -978,3 +1088,8 @@ $(document).ready(function(){ } } }); + +var wrongKey = function(event) { + return ((event.type === 'keydown' || event.type === 'keypress') + && (event.keyCode !== 32 && event.keyCode !== 13)); +}; diff --git a/js/settings.js b/js/settings.js index dabd1cd56..e3ca098de 100644 --- a/js/settings.js +++ b/js/settings.js @@ -4,7 +4,6 @@ $(document).ready(function(){ $.post( OC.filePath('calendar', 'ajax/settings', 'settimezone.php'), post, function(data){return;}); return false; }); - $('#timezone').chosen(); $('#timeformat').change( function(){ var data = $('#timeformat').serialize(); $.post( OC.filePath('calendar', 'ajax/settings', 'settimeformat.php'), data, function(data){ @@ -29,7 +28,6 @@ $(document).ready(function(){ }); $.getJSON(OC.filePath('calendar', 'ajax/settings', 'timeformat.php'), function(jsondata, status) { $('#' + jsondata.timeformat).attr('selected',true); - $('#timeformat').chosen(); $('#timeformat_chzn').css('width', '100px'); }); $.getJSON(OC.filePath('calendar', 'ajax/settings', 'gettimezonedetection.php'), function(jsondata, status){ @@ -39,7 +37,6 @@ $(document).ready(function(){ }); $.getJSON(OC.filePath('calendar', 'ajax/settings', 'getfirstday.php'), function(jsondata, status) { $('#' + jsondata.firstday).attr('selected',true); - $('#firstday').chosen(); $('#firstday_chzn').css('width', '100px'); }); $('#cleancalendarcache').click(function(){ diff --git a/settings.php b/settings.php deleted file mode 100644 index f56351804..000000000 --- a/settings.php +++ /dev/null @@ -1,17 +0,0 @@ - - * This file is licensed under the Affero General Public License version 3 or - * later. - * See the COPYING-README file. - */ - -$tmpl = new OCP\Template( 'calendar', 'settings'); -$timezone=OCP\Config::getUserValue(OCP\USER::getUser(),'calendar','timezone',''); -$tmpl->assign('timezone',$timezone); -$tmpl->assign('timezones',DateTimeZone::listIdentifiers()); -$tmpl->assign('calendars', OC_Calendar_Calendar::allCalendars(OCP\USER::getUser()), false); - -OCP\Util::addscript('calendar','settings'); - -$tmpl->printPage(); \ No newline at end of file diff --git a/templates/calendar.php b/templates/calendar.php index a71b50eec..c6d4a1d43 100644 --- a/templates/calendar.php +++ b/templates/calendar.php @@ -1,24 +1,116 @@
-t('Displayname')) ?> | -
+ t("Edit calendar")); ?>" colspan="6">
+
- |
-
---|---|
t('Calendar color')) ?> | -- - | -
- - - | -- - | -
- - | -- - - - | -
- - - | -- - | -
- - - | -- - | -
- - - | -- - | -