'+b.html+' '),d=a("#"+c).find("a").first();return d.click(e(function(a){return this.choice_destroy_link_click(a)},this))},b.prototype.choice_destroy_link_click=function(b){b.preventDefault(),this.pending_destroy_click=!0;return this.choice_destroy(a(b.target))},b.prototype.choice_destroy=function(a){this.choices-=1,this.show_search_field_default(),this.is_multiple&&this.choices>0&&this.search_field.val().length<1&&this.results_hide(),this.result_deselect(a.attr("rel"));return a.parents("li").first().remove()},b.prototype.result_select=function(){var a,b,c,d;if(this.result_highlight){a=this.result_highlight,b=a.attr("id"),this.result_clear_highlight(),a.addClass("result-selected"),this.is_multiple?this.result_deactivate(a):this.result_single_selected=a,d=b.substr(b.lastIndexOf("_")+1),c=this.results_data[d],c.selected=!0,this.form_field.options[c.options_index].selected=!0,this.is_multiple?this.choice_build(c):this.selected_item.find("span").first().text(c.text),this.results_hide(),this.search_field.val(""),this.form_field_jq.trigger("change");return this.search_field_scale()}},b.prototype.result_activate=function(a){return a.addClass("active-result").show()},b.prototype.result_deactivate=function(a){return a.removeClass("active-result").hide()},b.prototype.result_deselect=function(b){var c,d;d=this.results_data[b],d.selected=!1,this.form_field.options[d.options_index].selected=!1,c=a("#"+this.container_id+"_o_"+b),c.removeClass("result-selected").addClass("active-result").show(),this.result_clear_highlight(),this.winnow_results(),this.form_field_jq.trigger("change");return this.search_field_scale()},b.prototype.results_search=function(a){return this.results_showing?this.winnow_results():this.results_show()},b.prototype.winnow_results=function(){var b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r;j=new Date,this.no_results_clear(),h=0,i=this.search_field.val()===this.default_text?"":a("
").text(a.trim(this.search_field.val())).html(),f=new RegExp("^"+i.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),"i"),m=new RegExp(i.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),"i"),r=this.results_data;for(n=0,p=r.length;n=0||c.html.indexOf("[")===0){e=c.html.replace(/\[|\]/g,"").split(" ");if(e.length)for(o=0,q=e.length;o"+c.html.substr(k+i.length),l=l.substr(0,k)+""+l.substr(k)):l=c.html,a("#"+g).html!==l&&a("#"+g).html(l),this.result_activate(a("#"+g)),c.group_array_index!=null&&a("#"+this.results_data[c.group_array_index].dom_id).show()):(this.result_highlight&&g===this.result_highlight.attr("id")&&this.result_clear_highlight(),this.result_deactivate(a("#"+g)))}}return h<1&&i.length?this.no_results(i):this.winnow_results_set_highlight()},b.prototype.winnow_results_clear=function(){var b,c,d,e,f;this.search_field.val(""),c=this.search_results.find("li"),f=[];for(d=0,e=c.length;dNo results match " "'),c.find("span").first().html(b);return this.search_results.append(c)},b.prototype.no_results_clear=function(){return this.search_results.find(".no-results").remove()},b.prototype.keydown_arrow=function(){var b,c;this.result_highlight?this.results_showing&&(c=this.result_highlight.nextAll("li.active-result").first(),c&&this.result_do_highlight(c)):(b=this.search_results.find("li.active-result").first(),b&&this.result_do_highlight(a(b)));if(!this.results_showing)return this.results_show()},b.prototype.keyup_arrow=function(){var a;if(!this.results_showing&&!this.is_multiple)return this.results_show();if(this.result_highlight){a=this.result_highlight.prevAll("li.active-result");if(a.length)return this.result_do_highlight(a.first());this.choices>0&&this.results_hide();return this.result_clear_highlight()}},b.prototype.keydown_backstroke=function(){if(this.pending_backstroke){this.choice_destroy(this.pending_backstroke.find("a").first());return this.clear_backstroke()}this.pending_backstroke=this.search_container.siblings("li.search-choice").last();return this.pending_backstroke.addClass("search-choice-focus")},b.prototype.clear_backstroke=function(){this.pending_backstroke&&this.pending_backstroke.removeClass("search-choice-focus");return this.pending_backstroke=null},b.prototype.keyup_checker=function(a){var b,c;b=(c=a.which)!=null?c:a.keyCode,this.search_field_scale();switch(b){case 8:if(this.is_multiple&&this.backstroke_length<1&&this.choices>0)return this.keydown_backstroke();if(!this.pending_backstroke){this.result_clear_highlight();return this.results_search()}break;case 13:a.preventDefault();if(this.results_showing)return this.result_select();break;case 27:if(this.results_showing)return this.results_hide();break;case 9:case 38:case 40:case 16:break;default:return this.results_search()}},b.prototype.keydown_checker=function(a){var b,c;b=(c=a.which)!=null?c:a.keyCode,this.search_field_scale(),b!==8&&this.pending_backstroke&&this.clear_backstroke();switch(b){case 8:this.backstroke_length=this.search_field.val().length;break;case 9:this.mouse_on_container=!1;break;case 13:a.preventDefault();break;case 38:a.preventDefault(),this.keyup_arrow();break;case 40:this.keydown_arrow()}},b.prototype.search_field_scale=function(){var b,c,d,e,f,g,h,i,j;if(this.is_multiple){d=0,h=0,f="position:absolute; left: -1000px; top: -1000px; display:none;",g=["font-size","font-style","font-weight","font-family","line-height","text-transform","letter-spacing"];for(i=0,j=g.length;i ",{style:f}),c.text(this.search_field.val()),a("body").append(c),h=c.width()+25,c.remove(),h>this.f_width-10&&(h=this.f_width-10),this.search_field.css({width:h+"px"}),b=this.container.height();return this.dropdown.css({top:b+"px"})}},b.prototype.generate_field_id=function(){var a;a=this.generate_random_id(),this.form_field.id=a;return a},b.prototype.generate_random_id=function(){var b;b="sel"+this.generate_random_char()+this.generate_random_char()+this.generate_random_char();while(a("#"+b).length>0)b+=this.generate_random_char();return b},b.prototype.generate_random_char=function(){var a,b,c;a="0123456789ABCDEFGHIJKLMNOPQRSTUVWXTZ",c=Math.floor(Math.random()*a.length);return b=a.substring(c,c+1)};return b}(),c=function(a){var b;return b=a.outerWidth()-a.width()},d.get_side_border_padding=c}).call(this),function(){var a;a=function(){function a(){this.options_index=0,this.parsed=[]}a.prototype.add_node=function(a){return a.nodeName==="OPTGROUP"?this.add_group(a):this.add_option(a)},a.prototype.add_group=function(a){var b,c,d,e,f,g;b=this.parsed.length,this.parsed.push({array_index:b,group:!0,label:a.label,children:0,disabled:a.disabled}),f=a.childNodes,g=[];for(d=0,e=f.length;d ",{id:this.container_id,"class":"chzn-container"+(this.is_rtl?" chzn-rtl":""),style:"width: "+this.f_width+"px;"}),this.is_multiple?b.html(''):b.html(''+this.default_text+'
'),this.form_field_jq.hide().after(b),this.container=a("#"+this.container_id),this.container.addClass("chzn-container-"+(this.is_multiple?"multi":"single")),!this.is_multiple&&this.form_field.options.length<=this.disable_search_threshold&&this.container.addClass("chzn-container-single-nosearch"),this.dropdown=this.container.find("div.chzn-drop").first(),d=this.container.height(),e=this.f_width-c(this.dropdown),this.dropdown.css({width:e+"px",top:d+"px"}),this.search_field=this.container.find("input").first(),this.search_results=this.container.find("ul.chzn-results").first(),this.search_field_scale(),this.search_no_results=this.container.find("li.no-results").first(),this.is_multiple?(this.search_choices=this.container.find("ul.chzn-choices").first(),this.search_container=this.container.find("li.search-field").first()):(this.search_container=this.container.find("div.chzn-search").first(),this.selected_item=this.container.find(".chzn-single").first(),f=e-c(this.search_container)-c(this.search_field),this.search_field.css({width:f+"px"})),this.results_build();return this.set_tab_index()},b.prototype.register_observers=function(){this.container.mousedown(e(function(a){return this.container_mousedown(a)},this)),this.container.mouseup(e(function(a){return this.container_mouseup(a)},this)),this.container.mouseenter(e(function(a){return this.mouse_enter(a)},this)),this.container.mouseleave(e(function(a){return this.mouse_leave(a)},this)),this.search_results.mouseup(e(function(a){return this.search_results_mouseup(a)},this)),this.search_results.mouseover(e(function(a){return this.search_results_mouseover(a)},this)),this.search_results.mouseout(e(function(a){return this.search_results_mouseout(a)},this)),this.form_field_jq.bind("liszt:updated",e(function(a){return this.results_update_field(a)},this)),this.search_field.blur(e(function(a){return this.input_blur(a)},this)),this.search_field.keyup(e(function(a){return this.keyup_checker(a)},this)),this.search_field.keydown(e(function(a){return this.keydown_checker(a)},this));if(this.is_multiple){this.search_choices.click(e(function(a){return this.choices_click(a)},this));return this.search_field.focus(e(function(a){return this.input_focus(a)},this))}},b.prototype.search_field_disabled=function(){this.is_disabled=this.form_field_jq.attr("disabled");if(this.is_disabled){this.container.addClass("chzn-disabled"),this.search_field.attr("disabled",!0),this.is_multiple||this.selected_item.unbind("focus",this.activate_action);return this.close_field()}this.container.removeClass("chzn-disabled"),this.search_field.attr("disabled",!1);if(!this.is_multiple)return this.selected_item.bind("focus",this.activate_action)},b.prototype.container_mousedown=function(b){var c;if(!this.is_disabled){c=b!=null?a(b.target).hasClass("search-choice-close"):!1,b&&b.type==="mousedown"&&b.stopPropagation();if(!this.pending_destroy_click&&!c){this.active_field?!this.is_multiple&&b&&(a(b.target)===this.selected_item||a(b.target).parents("a.chzn-single").length)&&(b.preventDefault(),this.results_toggle()):(this.is_multiple&&this.search_field.val(""),a(document).click(this.click_test_action),this.results_show());return this.activate_field()}return this.pending_destroy_click=!1}},b.prototype.container_mouseup=function(a){if(a.target.nodeName==="ABBR")return this.results_reset(a)},b.prototype.mouse_enter=function(){return this.mouse_on_container=!0},b.prototype.mouse_leave=function(){return this.mouse_on_container=!1},b.prototype.input_focus=function(a){if(!this.active_field)return setTimeout(e(function(){return this.container_mousedown()},this),50)},b.prototype.input_blur=function(a){if(!this.mouse_on_container){this.active_field=!1;return setTimeout(e(function(){return this.blur_test()},this),100)}},b.prototype.blur_test=function(a){if(!this.active_field&&this.container.hasClass("chzn-container-active"))return this.close_field()},b.prototype.close_field=function(){a(document).unbind("click",this.click_test_action),this.is_multiple||(this.selected_item.attr("tabindex",this.search_field.attr("tabindex")),this.search_field.attr("tabindex",-1)),this.active_field=!1,this.results_hide(),this.container.removeClass("chzn-container-active"),this.winnow_results_clear(),this.clear_backstroke(),this.show_search_field_default();return this.search_field_scale()},b.prototype.activate_field=function(){!this.is_multiple&&!this.active_field&&(this.search_field.attr("tabindex",this.selected_item.attr("tabindex")),this.selected_item.attr("tabindex",-1)),this.container.addClass("chzn-container-active"),this.active_field=!0,this.search_field.val(this.search_field.val());return this.search_field.focus()},b.prototype.test_active_click=function(b){return a(b.target).parents("#"+this.container_id).length?this.active_field=!0:this.close_field()},b.prototype.results_build=function(){var a,b,c,e,f,g;c=new Date,this.parsing=!0,this.results_data=d.SelectParser.select_to_array(this.form_field),this.is_multiple&&this.choices>0?(this.search_choices.find("li.search-choice").remove(),this.choices=0):this.is_multiple||this.selected_item.find("span").text(this.default_text),a="",g=this.results_data;for(e=0,f=g.length;e')));this.search_field_disabled(),this.show_search_field_default(),this.search_field_scale(),this.search_results.html(a);return this.parsing=!1},b.prototype.result_add_group=function(b){if(!b.disabled){b.dom_id=this.container_id+"_g_"+b.array_index;return''+a("
").text(b.label).html()+" "}return""},b.prototype.result_add_option=function(a){var b,c;if(!a.disabled){a.dom_id=this.container_id+"_o_"+a.array_index,b=a.selected&&this.is_multiple?[]:["active-result"],a.selected&&b.push("result-selected"),a.group_array_index!=null&&b.push("group-option"),a.classes!==""&&b.push(a.classes),c=a.style.cssText!==""?' style="'+a.style+'"':"";return'"+a.html+" "}return""},b.prototype.results_update_field=function(){this.result_clear_highlight(),this.result_single_selected=null;return this.results_build()},b.prototype.result_do_highlight=function(a){var b,c,d,e,f;if(a.length){this.result_clear_highlight(),this.result_highlight=a,this.result_highlight.addClass("highlighted"),d=parseInt(this.search_results.css("maxHeight"),10),f=this.search_results.scrollTop(),e=d+f,c=this.result_highlight.position().top+this.search_results.scrollTop(),b=c+this.result_highlight.outerHeight();if(b>=e)return this.search_results.scrollTop(b-d>0?b-d:0);if(c'+b.html+' '),d=a("#"+c).find("a").first();return d.click(e(function(a){return this.choice_destroy_link_click(a)},this))},b.prototype.choice_destroy_link_click=function(b){b.preventDefault();if(!this.is_disabled){this.pending_destroy_click=!0;return this.choice_destroy(a(b.target))}return b.stopPropagation},b.prototype.choice_destroy=function(a){this.choices-=1,this.show_search_field_default(),this.is_multiple&&this.choices>0&&this.search_field.val().length<1&&this.results_hide(),this.result_deselect(a.attr("rel"));return a.parents("li").first().remove()},b.prototype.results_reset=function(b){this.form_field.options[0].selected=!0,this.selected_item.find("span").text(this.default_text),this.show_search_field_default(),a(b.target).remove(),this.form_field_jq.trigger("change");if(this.active_field)return this.results_hide()},b.prototype.result_select=function(a){var b,c,d,e;if(this.result_highlight){b=this.result_highlight,c=b.attr("id"),this.result_clear_highlight(),this.is_multiple?this.result_deactivate(b):(this.search_results.find(".result-selected").removeClass("result-selected"),this.result_single_selected=b),b.addClass("result-selected"),e=c.substr(c.lastIndexOf("_")+1),d=this.results_data[e],d.selected=!0,this.form_field.options[d.options_index].selected=!0,this.is_multiple?this.choice_build(d):(this.selected_item.find("span").first().text(d.text),this.allow_single_deselect&&this.selected_item.find("span").first().after(' ')),(!a.metaKey||!this.is_multiple)&&this.results_hide(),this.search_field.val(""),this.form_field_jq.trigger("change");return this.search_field_scale()}},b.prototype.result_activate=function(a){return a.addClass("active-result")},b.prototype.result_deactivate=function(a){return a.removeClass("active-result")},b.prototype.result_deselect=function(b){var c,d;d=this.results_data[b],d.selected=!1,this.form_field.options[d.options_index].selected=!1,c=a("#"+this.container_id+"_o_"+b),c.removeClass("result-selected").addClass("active-result").show(),this.result_clear_highlight(),this.winnow_results(),this.form_field_jq.trigger("change");return this.search_field_scale()},b.prototype.results_search=function(a){return this.results_showing?this.winnow_results():this.results_show()},b.prototype.winnow_results=function(){var b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r;j=new Date,this.no_results_clear(),h=0,i=this.search_field.val()===this.default_text?"":a("
").text(a.trim(this.search_field.val())).html(),f=new RegExp("^"+i.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),"i"),m=new RegExp(i.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),"i"),r=this.results_data;for(n=0,p=r.length;n=0||c.html.indexOf("[")===0){e=c.html.replace(/\[|\]/g,"").split(" ");if(e.length)for(o=0,q=e.length;o"+c.html.substr(k+i.length),l=l.substr(0,k)+""+l.substr(k)):l=c.html,a("#"+g).html!==l&&a("#"+g).html(l),this.result_activate(a("#"+g)),c.group_array_index!=null&&a("#"+this.results_data[c.group_array_index].dom_id).show()):(this.result_highlight&&g===this.result_highlight.attr("id")&&this.result_clear_highlight(),this.result_deactivate(a("#"+g)))}}return h<1&&i.length?this.no_results(i):this.winnow_results_set_highlight()},b.prototype.winnow_results_clear=function(){var b,c,d,e,f;this.search_field.val(""),c=this.search_results.find("li"),f=[];for(d=0,e=c.length;d'+this.results_none_found+' " "'),c.find("span").first().html(b);return this.search_results.append(c)},b.prototype.no_results_clear=function(){return this.search_results.find(".no-results").remove()},b.prototype.keydown_arrow=function(){var b,c;this.result_highlight?this.results_showing&&(c=this.result_highlight.nextAll("li.active-result").first(),c&&this.result_do_highlight(c)):(b=this.search_results.find("li.active-result").first(),b&&this.result_do_highlight(a(b)));if(!this.results_showing)return this.results_show()},b.prototype.keyup_arrow=function(){var a;if(!this.results_showing&&!this.is_multiple)return this.results_show();if(this.result_highlight){a=this.result_highlight.prevAll("li.active-result");if(a.length)return this.result_do_highlight(a.first());this.choices>0&&this.results_hide();return this.result_clear_highlight()}},b.prototype.keydown_backstroke=function(){if(this.pending_backstroke){this.choice_destroy(this.pending_backstroke.find("a").first());return this.clear_backstroke()}this.pending_backstroke=this.search_container.siblings("li.search-choice").last();return this.pending_backstroke.addClass("search-choice-focus")},b.prototype.clear_backstroke=function(){this.pending_backstroke&&this.pending_backstroke.removeClass("search-choice-focus");return this.pending_backstroke=null},b.prototype.keyup_checker=function(a){var b,c;b=(c=a.which)!=null?c:a.keyCode,this.search_field_scale();switch(b){case 8:if(this.is_multiple&&this.backstroke_length<1&&this.choices>0)return this.keydown_backstroke();if(!this.pending_backstroke){this.result_clear_highlight();return this.results_search()}break;case 13:a.preventDefault();if(this.results_showing)return this.result_select(a);break;case 27:if(this.results_showing)return this.results_hide();break;case 9:case 38:case 40:case 16:case 91:case 17:break;default:return this.results_search()}},b.prototype.keydown_checker=function(a){var b,c;b=(c=a.which)!=null?c:a.keyCode,this.search_field_scale(),b!==8&&this.pending_backstroke&&this.clear_backstroke();switch(b){case 8:this.backstroke_length=this.search_field.val().length;break;case 9:this.mouse_on_container=!1;break;case 13:a.preventDefault();break;case 38:a.preventDefault(),this.keyup_arrow();break;case 40:this.keydown_arrow()}},b.prototype.search_field_scale=function(){var b,c,d,e,f,g,h,i,j;if(this.is_multiple){d=0,h=0,f="position:absolute; left: -1000px; top: -1000px; display:none;",g=["font-size","font-style","font-weight","font-family","line-height","text-transform","letter-spacing"];for(i=0,j=g.length;i ",{style:f}),c.text(this.search_field.val()),a("body").append(c),h=c.width()+25,c.remove(),h>this.f_width-10&&(h=this.f_width-10),this.search_field.css({width:h+"px"}),b=this.container.height();return this.dropdown.css({top:b+"px"})}},b.prototype.generate_field_id=function(){var a;a=this.generate_random_id(),this.form_field.id=a;return a},b.prototype.generate_random_id=function(){var b;b="sel"+this.generate_random_char()+this.generate_random_char()+this.generate_random_char();while(a("#"+b).length>0)b+=this.generate_random_char();return b},b.prototype.generate_random_char=function(){var a,b,c;a="0123456789ABCDEFGHIJKLMNOPQRSTUVWXTZ",c=Math.floor(Math.random()*a.length);return b=a.substring(c,c+1)};return b}(),c=function(a){var b;return b=a.outerWidth()-a.width()},d.get_side_border_padding=c}).call(this),function(){var a;a=function(){function a(){this.options_index=0,this.parsed=[]}a.prototype.add_node=function(a){return a.nodeName==="OPTGROUP"?this.add_group(a):this.add_option(a)},a.prototype.add_group=function(a){var b,c,d,e,f,g;b=this.parsed.length,this.parsed.push({array_index:b,group:!0,label:a.label,children:0,disabled:a.disabled}),f=a.childNodes,g=[];for(d=0,e=f.length;d").appendTo("body"),c=b.css("display");b.remove();if(c==="none"||c==="")c="block";bZ[a]=c}return bZ[a]}function cc(a,b){var c={};d.each(cb.concat.apply([],cb.slice(0,b)),function(){c[this]=a});return c}function bY(){try{return new a.ActiveXObject("Microsoft.XMLHTTP")}catch(b){}}function bX(){try{return new a.XMLHttpRequest}catch(b){}}function bW(){d(a).unload(function(){for(var a in bU)bU[a](0,1)})}function bQ(a,c){a.dataFilter&&(c=a.dataFilter(c,a.dataType));var e=a.dataTypes,f={},g,h,i=e.length,j,k=e[0],l,m,n,o,p;for(g=1;g=0===c})}function N(a){return!a||!a.parentNode||a.parentNode.nodeType===11}function F(a,b){return(a&&a!=="*"?a+".":"")+b.replace(r,"`").replace(s,"&")}function E(a){var b,c,e,f,g,h,i,j,k,l,m,n,o,q=[],r=[],s=d._data(this,"events");if(a.liveFired!==this&&s&&s.live&&!a.target.disabled&&(!a.button||a.type!=="click")){a.namespace&&(n=new RegExp("(^|\\.)"+a.namespace.split(".").join("\\.(?:.*\\.)?")+"(\\.|$)")),a.liveFired=this;var t=s.live.slice(0);for(i=0;ic)break;a.currentTarget=f.elem,a.data=f.handleObj.data,a.handleObj=f.handleObj,o=f.handleObj.origHandler.apply(f.elem,arguments);if(o===!1||a.isPropagationStopped()){c=f.level,o===!1&&(b=!1);if(a.isImmediatePropagationStopped())break}}return b}}function C(a,c,e){var f=d.extend({},e[0]);f.type=a,f.originalEvent={},f.liveFired=b,d.event.handle.call(c,f),f.isDefaultPrevented()&&e[0].preventDefault()}function w(){return!0}function v(){return!1}function g(a){for(var b in a)if(b!=="toJSON")return!1;return!0}function f(a,c,f){if(f===b&&a.nodeType===1){f=a.getAttribute("data-"+c);if(typeof f==="string"){try{f=f==="true"?!0:f==="false"?!1:f==="null"?null:d.isNaN(f)?e.test(f)?d.parseJSON(f):f:parseFloat(f)}catch(g){}d.data(a,c,f)}else f=b}return f}var c=a.document,d=function(){function I(){if(!d.isReady){try{c.documentElement.doScroll("left")}catch(a){setTimeout(I,1);return}d.ready()}}var d=function(a,b){return new d.fn.init(a,b,g)},e=a.jQuery,f=a.$,g,h=/^(?:[^<]*(<[\w\W]+>)[^>]*$|#([\w\-]+)$)/,i=/\S/,j=/^\s+/,k=/\s+$/,l=/\d/,m=/^<(\w+)\s*\/?>(?:<\/\1>)?$/,n=/^[\],:{}\s]*$/,o=/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,p=/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,q=/(?:^|:|,)(?:\s*\[)+/g,r=/(webkit)[ \/]([\w.]+)/,s=/(opera)(?:.*version)?[ \/]([\w.]+)/,t=/(msie) ([\w.]+)/,u=/(mozilla)(?:.*? rv:([\w.]+))?/,v=navigator.userAgent,w,x=!1,y,z="then done fail isResolved isRejected promise".split(" "),A,B=Object.prototype.toString,C=Object.prototype.hasOwnProperty,D=Array.prototype.push,E=Array.prototype.slice,F=String.prototype.trim,G=Array.prototype.indexOf,H={};d.fn=d.prototype={constructor:d,init:function(a,e,f){var g,i,j,k;if(!a)return this;if(a.nodeType){this.context=this[0]=a,this.length=1;return this}if(a==="body"&&!e&&c.body){this.context=c,this[0]=c.body,this.selector="body",this.length=1;return this}if(typeof a==="string"){g=h.exec(a);if(!g||!g[1]&&e)return!e||e.jquery?(e||f).find(a):this.constructor(e).find(a);if(g[1]){e=e instanceof d?e[0]:e,k=e?e.ownerDocument||e:c,j=m.exec(a),j?d.isPlainObject(e)?(a=[c.createElement(j[1])],d.fn.attr.call(a,e,!0)):a=[k.createElement(j[1])]:(j=d.buildFragment([g[1]],[k]),a=(j.cacheable?d.clone(j.fragment):j.fragment).childNodes);return d.merge(this,a)}i=c.getElementById(g[2]);if(i&&i.parentNode){if(i.id!==g[2])return f.find(a);this.length=1,this[0]=i}this.context=c,this.selector=a;return this}if(d.isFunction(a))return f.ready(a);a.selector!==b&&(this.selector=a.selector,this.context=a.context);return d.makeArray(a,this)},selector:"",jquery:"1.5.1",length:0,size:function(){return this.length},toArray:function(){return E.call(this,0)},get:function(a){return a==null?this.toArray():a<0?this[this.length+a]:this[a]},pushStack:function(a,b,c){var e=this.constructor();d.isArray(a)?D.apply(e,a):d.merge(e,a),e.prevObject=this,e.context=this.context,b==="find"?e.selector=this.selector+(this.selector?" ":"")+c:b&&(e.selector=this.selector+"."+b+"("+c+")");return e},each:function(a,b){return d.each(this,a,b)},ready:function(a){d.bindReady(),y.done(a);return this},eq:function(a){return a===-1?this.slice(a):this.slice(a,+a+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},slice:function(){return this.pushStack(E.apply(this,arguments),"slice",E.call(arguments).join(","))},map:function(a){return this.pushStack(d.map(this,function(b,c){return a.call(b,c,b)}))},end:function(){return this.prevObject||this.constructor(null)},push:D,sort:[].sort,splice:[].splice},d.fn.init.prototype=d.fn,d.extend=d.fn.extend=function(){var a,c,e,f,g,h,i=arguments[0]||{},j=1,k=arguments.length,l=!1;typeof i==="boolean"&&(l=i,i=arguments[1]||{},j=2),typeof i!=="object"&&!d.isFunction(i)&&(i={}),k===j&&(i=this,--j);for(;j0)return;y.resolveWith(c,[d]),d.fn.trigger&&d(c).trigger("ready").unbind("ready")}},bindReady:function(){if(!x){x=!0;if(c.readyState==="complete")return setTimeout(d.ready,1);if(c.addEventListener)c.addEventListener("DOMContentLoaded",A,!1),a.addEventListener("load",d.ready,!1);else if(c.attachEvent){c.attachEvent("onreadystatechange",A),a.attachEvent("onload",d.ready);var b=!1;try{b=a.frameElement==null}catch(e){}c.documentElement.doScroll&&b&&I()}}},isFunction:function(a){return d.type(a)==="function"},isArray:Array.isArray||function(a){return d.type(a)==="array"},isWindow:function(a){return a&&typeof a==="object"&&"setInterval"in a},isNaN:function(a){return a==null||!l.test(a)||isNaN(a)},type:function(a){return a==null?String(a):H[B.call(a)]||"object"},isPlainObject:function(a){if(!a||d.type(a)!=="object"||a.nodeType||d.isWindow(a))return!1;if(a.constructor&&!C.call(a,"constructor")&&!C.call(a.constructor.prototype,"isPrototypeOf"))return!1;var c;for(c in a){}return c===b||C.call(a,c)},isEmptyObject:function(a){for(var b in a)return!1;return!0},error:function(a){throw a},parseJSON:function(b){if(typeof b!=="string"||!b)return null;b=d.trim(b);if(n.test(b.replace(o,"@").replace(p,"]").replace(q,"")))return a.JSON&&a.JSON.parse?a.JSON.parse(b):(new Function("return "+b))();d.error("Invalid JSON: "+b)},parseXML:function(b,c,e){a.DOMParser?(e=new DOMParser,c=e.parseFromString(b,"text/xml")):(c=new ActiveXObject("Microsoft.XMLDOM"),c.async="false",c.loadXML(b)),e=c.documentElement,(!e||!e.nodeName||e.nodeName==="parsererror")&&d.error("Invalid XML: "+b);return c},noop:function(){},globalEval:function(a){if(a&&i.test(a)){var b=c.head||c.getElementsByTagName("head")[0]||c.documentElement,e=c.createElement("script");d.support.scriptEval()?e.appendChild(c.createTextNode(a)):e.text=a,b.insertBefore(e,b.firstChild),b.removeChild(e)}},nodeName:function(a,b){return a.nodeName&&a.nodeName.toUpperCase()===b.toUpperCase()},each:function(a,c,e){var f,g=0,h=a.length,i=h===b||d.isFunction(a);if(e){if(i){for(f in a)if(c.apply(a[f],e)===!1)break}else for(;g1){var f=E.call(arguments,0),g=b,h=function(a){return function(b){f[a]=arguments.length>1?E.call(arguments,0):b,--g||c.resolveWith(e,f)}};while(b--)a=f[b],a&&d.isFunction(a.promise)?a.promise().then(h(b),c.reject):--g;g||c.resolveWith(e,f)}else c!==a&&c.resolve(a);return e},uaMatch:function(a){a=a.toLowerCase();var b=r.exec(a)||s.exec(a)||t.exec(a)||a.indexOf("compatible")<0&&u.exec(a)||[];return{browser:b[1]||"",version:b[2]||"0"}},sub:function(){function a(b,c){return new a.fn.init(b,c)}d.extend(!0,a,this),a.superclass=this,a.fn=a.prototype=this(),a.fn.constructor=a,a.subclass=this.subclass,a.fn.init=function b(b,c){c&&c instanceof d&&!(c instanceof a)&&(c=a(c));return d.fn.init.call(this,b,c,e)},a.fn.init.prototype=a.fn;var e=a(c);return a},browser:{}}),y=d._Deferred(),d.each("Boolean Number String Function Array Date RegExp Object".split(" "),function(a,b){H["[object "+b+"]"]=b.toLowerCase()}),w=d.uaMatch(v),w.browser&&(d.browser[w.browser]=!0,d.browser.version=w.version),d.browser.webkit&&(d.browser.safari=!0),G&&(d.inArray=function(a,b){return G.call(b,a)}),i.test(" ")&&(j=/^[\s\xA0]+/,k=/[\s\xA0]+$/),g=d(c),c.addEventListener?A=function(){c.removeEventListener("DOMContentLoaded",A,!1),d.ready()}:c.attachEvent&&(A=function(){c.readyState==="complete"&&(c.detachEvent("onreadystatechange",A),d.ready())});return d}();(function(){d.support={};var b=c.createElement("div");b.style.display="none",b.innerHTML=" a ";var e=b.getElementsByTagName("*"),f=b.getElementsByTagName("a")[0],g=c.createElement("select"),h=g.appendChild(c.createElement("option")),i=b.getElementsByTagName("input")[0];if(e&&e.length&&f){d.support={leadingWhitespace:b.firstChild.nodeType===3,tbody:!b.getElementsByTagName("tbody").length,htmlSerialize:!!b.getElementsByTagName("link").length,style:/red/.test(f.getAttribute("style")),hrefNormalized:f.getAttribute("href")==="/a",opacity:/^0.55$/.test(f.style.opacity),cssFloat:!!f.style.cssFloat,checkOn:i.value==="on",optSelected:h.selected,deleteExpando:!0,optDisabled:!1,checkClone:!1,noCloneEvent:!0,noCloneChecked:!0,boxModel:null,inlineBlockNeedsLayout:!1,shrinkWrapBlocks:!1,reliableHiddenOffsets:!0},i.checked=!0,d.support.noCloneChecked=i.cloneNode(!0).checked,g.disabled=!0,d.support.optDisabled=!h.disabled;var j=null;d.support.scriptEval=function(){if(j===null){var b=c.documentElement,e=c.createElement("script"),f="script"+d.now();try{e.appendChild(c.createTextNode("window."+f+"=1;"))}catch(g){}b.insertBefore(e,b.firstChild),a[f]?(j=!0,delete a[f]):j=!1,b.removeChild(e),b=e=f=null}return j};try{delete b.test}catch(k){d.support.deleteExpando=!1}!b.addEventListener&&b.attachEvent&&b.fireEvent&&(b.attachEvent("onclick",function l(){d.support.noCloneEvent=!1,b.detachEvent("onclick",l)}),b.cloneNode(!0).fireEvent("onclick")),b=c.createElement("div"),b.innerHTML=" ";var m=c.createDocumentFragment();m.appendChild(b.firstChild),d.support.checkClone=m.cloneNode(!0).cloneNode(!0).lastChild.checked,d(function(){var a=c.createElement("div"),b=c.getElementsByTagName("body")[0];if(b){a.style.width=a.style.paddingLeft="1px",b.appendChild(a),d.boxModel=d.support.boxModel=a.offsetWidth===2,"zoom"in a.style&&(a.style.display="inline",a.style.zoom=1,d.support.inlineBlockNeedsLayout=a.offsetWidth===2,a.style.display="",a.innerHTML="
",d.support.shrinkWrapBlocks=a.offsetWidth!==2),a.innerHTML="";var e=a.getElementsByTagName("td");d.support.reliableHiddenOffsets=e[0].offsetHeight===0,e[0].style.display="",e[1].style.display="none",d.support.reliableHiddenOffsets=d.support.reliableHiddenOffsets&&e[0].offsetHeight===0,a.innerHTML="",b.removeChild(a).style.display="none",a=e=null}});var n=function(a){var b=c.createElement("div");a="on"+a;if(!b.attachEvent)return!0;var d=a in b;d||(b.setAttribute(a,"return;"),d=typeof b[a]==="function"),b=null;return d};d.support.submitBubbles=n("submit"),d.support.changeBubbles=n("change"),b=e=f=null}})();var e=/^(?:\{.*\}|\[.*\])$/;d.extend({cache:{},uuid:0,expando:"jQuery"+(d.fn.jquery+Math.random()).replace(/\D/g,""),noData:{embed:!0,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",applet:!0},hasData:function(a){a=a.nodeType?d.cache[a[d.expando]]:a[d.expando];return!!a&&!g(a)},data:function(a,c,e,f){if(d.acceptData(a)){var g=d.expando,h=typeof c==="string",i,j=a.nodeType,k=j?d.cache:a,l=j?a[d.expando]:a[d.expando]&&d.expando;if((!l||f&&l&&!k[l][g])&&h&&e===b)return;l||(j?a[d.expando]=l=++d.uuid:l=d.expando),k[l]||(k[l]={},j||(k[l].toJSON=d.noop));if(typeof c==="object"||typeof c==="function")f?k[l][g]=d.extend(k[l][g],c):k[l]=d.extend(k[l],c);i=k[l],f&&(i[g]||(i[g]={}),i=i[g]),e!==b&&(i[c]=e);if(c==="events"&&!i[c])return i[g]&&i[g].events;return h?i[c]:i}},removeData:function(b,c,e){if(d.acceptData(b)){var f=d.expando,h=b.nodeType,i=h?d.cache:b,j=h?b[d.expando]:d.expando;if(!i[j])return;if(c){var k=e?i[j][f]:i[j];if(k){delete k[c];if(!g(k))return}}if(e){delete i[j][f];if(!g(i[j]))return}var l=i[j][f];d.support.deleteExpando||i!=a?delete i[j]:i[j]=null,l?(i[j]={},h||(i[j].toJSON=d.noop),i[j][f]=l):h&&(d.support.deleteExpando?delete b[d.expando]:b.removeAttribute?b.removeAttribute(d.expando):b[d.expando]=null)}},_data:function(a,b,c){return d.data(a,b,c,!0)},acceptData:function(a){if(a.nodeName){var b=d.noData[a.nodeName.toLowerCase()];if(b)return b!==!0&&a.getAttribute("classid")===b}return!0}}),d.fn.extend({data:function(a,c){var e=null;if(typeof a==="undefined"){if(this.length){e=d.data(this[0]);if(this[0].nodeType===1){var g=this[0].attributes,h;for(var i=0,j=g.length;i-1)return!0;return!1},val:function(a){if(!arguments.length){var c=this[0];if(c){if(d.nodeName(c,"option")){var e=c.attributes.value;return!e||e.specified?c.value:c.text}if(d.nodeName(c,"select")){var f=c.selectedIndex,g=[],h=c.options,i=c.type==="select-one";if(f<0)return null;for(var k=i?f:0,l=i?f+1:h.length;k=0;else if(d.nodeName(this,"select")){var f=d.makeArray(e);d("option",this).each(function(){this.selected=d.inArray(d(this).val(),f)>=0}),f.length||(this.selectedIndex=-1)}else this.value=e}})}}),d.extend({attrFn:{val:!0,css:!0,html:!0,text:!0,data:!0,width:!0,height:!0,offset:!0},attr:function(a,c,e,f){if(!a||a.nodeType===3||a.nodeType===8||a.nodeType===2)return b;if(f&&c in d.attrFn)return d(a)[c](e);var g=a.nodeType!==1||!d.isXMLDoc(a),h=e!==b;c=g&&d.props[c]||c;if(a.nodeType===1){var i=k.test(c);if(c==="selected"&&!d.support.optSelected){var j=a.parentNode;j&&(j.selectedIndex,j.parentNode&&j.parentNode.selectedIndex)}if((c in a||a[c]!==b)&&g&&!i){h&&(c==="type"&&l.test(a.nodeName)&&a.parentNode&&d.error("type property can't be changed"),e===null?a.nodeType===1&&a.removeAttribute(c):a[c]=e);if(d.nodeName(a,"form")&&a.getAttributeNode(c))return a.getAttributeNode(c).nodeValue;if(c==="tabIndex"){var o=a.getAttributeNode("tabIndex");return o&&o.specified?o.value:m.test(a.nodeName)||n.test(a.nodeName)&&a.href?0:b}return a[c]}if(!d.support.style&&g&&c==="style"){h&&(a.style.cssText=""+e);return a.style.cssText}h&&a.setAttribute(c,""+e);if(!a.attributes[c]&&(a.hasAttribute&&!a.hasAttribute(c)))return b;var p=!d.support.hrefNormalized&&g&&i?a.getAttribute(c,2):a.getAttribute(c);return p===null?b:p}h&&(a[c]=e);return a[c]}});var p=/\.(.*)$/,q=/^(?:textarea|input|select)$/i,r=/\./g,s=/ /g,t=/[^\w\s.|`]/g,u=function(a){return a.replace(t,"\\$&")};d.event={add:function(c,e,f,g){if(c.nodeType!==3&&c.nodeType!==8){try{d.isWindow(c)&&(c!==a&&!c.frameElement)&&(c=a)}catch(h){}if(f===!1)f=v;else if(!f)return;var i,j;f.handler&&(i=f,f=i.handler),f.guid||(f.guid=d.guid++);var k=d._data(c);if(!k)return;var l=k.events,m=k.handle;l||(k.events=l={}),m||(k.handle=m=function(){return typeof d!=="undefined"&&!d.event.triggered?d.event.handle.apply(m.elem,arguments):b}),m.elem=c,e=e.split(" ");var n,o=0,p;while(n=e[o++]){j=i?d.extend({},i):{handler:f,data:g},n.indexOf(".")>-1?(p=n.split("."),n=p.shift(),j.namespace=p.slice(0).sort().join(".")):(p=[],j.namespace=""),j.type=n,j.guid||(j.guid=f.guid);var q=l[n],r=d.event.special[n]||{};if(!q){q=l[n]=[];if(!r.setup||r.setup.call(c,g,p,m)===!1)c.addEventListener?c.addEventListener(n,m,!1):c.attachEvent&&c.attachEvent("on"+n,m)}r.add&&(r.add.call(c,j),j.handler.guid||(j.handler.guid=f.guid)),q.push(j),d.event.global[n]=!0}c=null}},global:{},remove:function(a,c,e,f){if(a.nodeType!==3&&a.nodeType!==8){e===!1&&(e=v);var g,h,i,j,k=0,l,m,n,o,p,q,r,s=d.hasData(a)&&d._data(a),t=s&&s.events;if(!s||!t)return;c&&c.type&&(e=c.handler,c=c.type);if(!c||typeof c==="string"&&c.charAt(0)==="."){c=c||"";for(h in t)d.event.remove(a,h+c);return}c=c.split(" ");while(h=c[k++]){r=h,q=null,l=h.indexOf(".")<0,m=[],l||(m=h.split("."),h=m.shift(),n=new RegExp("(^|\\.)"+d.map(m.slice(0).sort(),u).join("\\.(?:.*\\.)?")+"(\\.|$)")),p=t[h];if(!p)continue;if(!e){for(j=0;j=0&&(a.type=f=f.slice(0,-1),a.exclusive=!0),e||(a.stopPropagation(),d.event.global[f]&&d.each(d.cache,function(){var b=d.expando,e=this[b];e&&e.events&&e.events[f]&&d.event.trigger(a,c,e.handle.elem)}));if(!e||e.nodeType===3||e.nodeType===8)return b;a.result=b,a.target=e,c=d.makeArray(c),c.unshift(a)}a.currentTarget=e;var h=d._data(e,"handle");h&&h.apply(e,c);var i=e.parentNode||e.ownerDocument;try{e&&e.nodeName&&d.noData[e.nodeName.toLowerCase()]||e["on"+f]&&e["on"+f].apply(e,c)===!1&&(a.result=!1,a.preventDefault())}catch(j){}if(!a.isPropagationStopped()&&i)d.event.trigger(a,c,i,!0);else if(!a.isDefaultPrevented()){var k,l=a.target,m=f.replace(p,""),n=d.nodeName(l,"a")&&m==="click",o=d.event.special[m]||{};if((!o._default||o._default.call(e,a)===!1)&&!n&&!(l&&l.nodeName&&d.noData[l.nodeName.toLowerCase()])){try{l[m]&&(k=l["on"+m],k&&(l["on"+m]=null),d.event.triggered=!0,l[m]())}catch(q){}k&&(l["on"+m]=k),d.event.triggered=!1}}},handle:function(c){var e,f,g,h,i,j=[],k=d.makeArray(arguments);c=k[0]=d.event.fix(c||a.event),c.currentTarget=this,e=c.type.indexOf(".")<0&&!c.exclusive,e||(g=c.type.split("."),c.type=g.shift(),j=g.slice(0).sort(),h=new RegExp("(^|\\.)"+j.join("\\.(?:.*\\.)?")+"(\\.|$)")),c.namespace=c.namespace||j.join("."),i=d._data(this,"events"),f=(i||{})[c.type];if(i&&f){f=f.slice(0);for(var l=0,m=f.length;l-1?d.map(a.options,function(a){return a.selected}).join("-"):"":a.nodeName.toLowerCase()==="select"&&(c=a.selectedIndex);return c},B=function B(a){var c=a.target,e,f;if(q.test(c.nodeName)&&!c.readOnly){e=d._data(c,"_change_data"),f=A(c),(a.type!=="focusout"||c.type!=="radio")&&d._data(c,"_change_data",f);if(e===b||f===e)return;if(e!=null||f)a.type="change",a.liveFired=b,d.event.trigger(a,arguments[1],c)}};d.event.special.change={filters:{focusout:B,beforedeactivate:B,click:function(a){var b=a.target,c=b.type;(c==="radio"||c==="checkbox"||b.nodeName.toLowerCase()==="select")&&B.call(this,a)},keydown:function(a){var b=a.target,c=b.type;(a.keyCode===13&&b.nodeName.toLowerCase()!=="textarea"||a.keyCode===32&&(c==="checkbox"||c==="radio")||c==="select-multiple")&&B.call(this,a)},beforeactivate:function(a){var b=a.target;d._data(b,"_change_data",A(b))}},setup:function(a,b){if(this.type==="file")return!1;for(var c in z)d.event.add(this,c+".specialChange",z[c]);return q.test(this.nodeName)},teardown:function(a){d.event.remove(this,".specialChange");return q.test(this.nodeName)}},z=d.event.special.change.filters,z.focus=z.beforeactivate}c.addEventListener&&d.each({focus:"focusin",blur:"focusout"},function(a,b){function c(a){a=d.event.fix(a),a.type=b;return d.event.handle.call(this,a)}d.event.special[b]={setup:function(){this.addEventListener(a,c,!0)},teardown:function(){this.removeEventListener(a,c,!0)}}}),d.each(["bind","one"],function(a,c){d.fn[c]=function(a,e,f){if(typeof a==="object"){for(var g in a)this[c](g,e,a[g],f);return this}if(d.isFunction(e)||e===!1)f=e,e=b;var h=c==="one"?d.proxy(f,function(a){d(this).unbind(a,h);return f.apply(this,arguments)}):f;if(a==="unload"&&c!=="one")this.one(a,e,f);else for(var i=0,j=this.length;i0?this.bind(b,a,c):this.trigger(b)},d.attrFn&&(d.attrFn[b]=!0)}),function(){function u(a,b,c,d,e,f){for(var g=0,h=d.length;g0){j=i;break}}i=i[a]}d[g]=j}}}function t(a,b,c,d,e,f){for(var g=0,h=d.length;g+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,e=0,f=Object.prototype.toString,g=!1,h=!0,i=/\\/g,j=/\W/;[0,0].sort(function(){h=!1;return 0});var k=function(b,d,e,g){e=e||[],d=d||c;var h=d;if(d.nodeType!==1&&d.nodeType!==9)return[];if(!b||typeof b!=="string")return e;var i,j,n,o,q,r,s,t,u=!0,w=k.isXML(d),x=[],y=b;do{a.exec(""),i=a.exec(y);if(i){y=i[3],x.push(i[1]);if(i[2]){o=i[3];break}}}while(i);if(x.length>1&&m.exec(b))if(x.length===2&&l.relative[x[0]])j=v(x[0]+x[1],d);else{j=l.relative[x[0]]?[d]:k(x.shift(),d);while(x.length)b=x.shift(),l.relative[b]&&(b+=x.shift()),j=v(b,j)}else{!g&&x.length>1&&d.nodeType===9&&!w&&l.match.ID.test(x[0])&&!l.match.ID.test(x[x.length-1])&&(q=k.find(x.shift(),d,w),d=q.expr?k.filter(q.expr,q.set)[0]:q.set[0]);if(d){q=g?{expr:x.pop(),set:p(g)}:k.find(x.pop(),x.length===1&&(x[0]==="~"||x[0]==="+")&&d.parentNode?d.parentNode:d,w),j=q.expr?k.filter(q.expr,q.set):q.set,x.length>0?n=p(j):u=!1;while(x.length)r=x.pop(),s=r,l.relative[r]?s=x.pop():r="",s==null&&(s=d),l.relative[r](n,s,w)}else n=x=[]}n||(n=j),n||k.error(r||b);if(f.call(n)==="[object Array]")if(u)if(d&&d.nodeType===1)for(t=0;n[t]!=null;t++)n[t]&&(n[t]===!0||n[t].nodeType===1&&k.contains(d,n[t]))&&e.push(j[t]);else for(t=0;n[t]!=null;t++)n[t]&&n[t].nodeType===1&&e.push(j[t]);else e.push.apply(e,n);else p(n,e);o&&(k(o,h,e,g),k.uniqueSort(e));return e};k.uniqueSort=function(a){if(r){g=h,a.sort(r);if(g)for(var b=1;b0},k.find=function(a,b,c){var d;if(!a)return[];for(var e=0,f=l.order.length;e":function(a,b){var c,d=typeof b==="string",e=0,f=a.length;if(d&&!j.test(b)){b=b.toLowerCase();for(;e=0)?c||d.push(h):c&&(b[g]=!1));return!1},ID:function(a){return a[1].replace(i,"")},TAG:function(a,b){return a[1].replace(i,"").toLowerCase()},CHILD:function(a){if(a[1]==="nth"){a[2]||k.error(a[0]),a[2]=a[2].replace(/^\+|\s*/g,"");var b=/(-?)(\d*)(?:n([+\-]?\d*))?/.exec(a[2]==="even"&&"2n"||a[2]==="odd"&&"2n+1"||!/\D/.test(a[2])&&"0n+"+a[2]||a[2]);a[2]=b[1]+(b[2]||1)-0,a[3]=b[3]-0}else a[2]&&k.error(a[0]);a[0]=e++;return a},ATTR:function(a,b,c,d,e,f){var g=a[1]=a[1].replace(i,"");!f&&l.attrMap[g]&&(a[1]=l.attrMap[g]),a[4]=(a[4]||a[5]||"").replace(i,""),a[2]==="~="&&(a[4]=" "+a[4]+" ");return a},PSEUDO:function(b,c,d,e,f){if(b[1]==="not")if((a.exec(b[3])||"").length>1||/^\w/.test(b[3]))b[3]=k(b[3],null,null,c);else{var g=k.filter(b[3],c,d,!0^f);d||e.push.apply(e,g);return!1}else if(l.match.POS.test(b[0])||l.match.CHILD.test(b[0]))return!0;return b},POS:function(a){a.unshift(!0);return a}},filters:{enabled:function(a){return a.disabled===!1&&a.type!=="hidden"},disabled:function(a){return a.disabled===!0},checked:function(a){return a.checked===!0},selected:function(a){a.parentNode&&a.parentNode.selectedIndex;return a.selected===!0},parent:function(a){return!!a.firstChild},empty:function(a){return!a.firstChild},has:function(a,b,c){return!!k(c[3],a).length},header:function(a){return/h\d/i.test(a.nodeName)},text:function(a){return"text"===a.getAttribute("type")},radio:function(a){return"radio"===a.type},checkbox:function(a){return"checkbox"===a.type},file:function(a){return"file"===a.type},password:function(a){return"password"===a.type},submit:function(a){return"submit"===a.type},image:function(a){return"image"===a.type},reset:function(a){return"reset"===a.type},button:function(a){return"button"===a.type||a.nodeName.toLowerCase()==="button"},input:function(a){return/input|select|textarea|button/i.test(a.nodeName)}},setFilters:{first:function(a,b){return b===0},last:function(a,b,c,d){return b===d.length-1},even:function(a,b){return b%2===0},odd:function(a,b){return b%2===1},lt:function(a,b,c){return bc[3]-0},nth:function(a,b,c){return c[3]-0===b},eq:function(a,b,c){return c[3]-0===b}},filter:{PSEUDO:function(a,b,c,d){var e=b[1],f=l.filters[e];if(f)return f(a,c,b,d);if(e==="contains")return(a.textContent||a.innerText||k.getText([a])||"").indexOf(b[3])>=0;if(e==="not"){var g=b[3];for(var h=0,i=g.length;h=0}},ID:function(a,b){return a.nodeType===1&&a.getAttribute("id")===b},TAG:function(a,b){return b==="*"&&a.nodeType===1||a.nodeName.toLowerCase()===b},CLASS:function(a,b){return(" "+(a.className||a.getAttribute("class"))+" ").indexOf(b)>-1},ATTR:function(a,b){var c=b[1],d=l.attrHandle[c]?l.attrHandle[c](a):a[c]!=null?a[c]:a.getAttribute(c),e=d+"",f=b[2],g=b[4];return d==null?f==="!=":f==="="?e===g:f==="*="?e.indexOf(g)>=0:f==="~="?(" "+e+" ").indexOf(g)>=0:g?f==="!="?e!==g:f==="^="?e.indexOf(g)===0:f==="$="?e.substr(e.length-g.length)===g:f==="|="?e===g||e.substr(0,g.length+1)===g+"-":!1:e&&d!==!1},POS:function(a,b,c,d){var e=b[2],f=l.setFilters[e];if(f)return f(a,c,b,d)}}},m=l.match.POS,n=function(a,b){return"\\"+(b-0+1)};for(var o in l.match)l.match[o]=new RegExp(l.match[o].source+/(?![^\[]*\])(?![^\(]*\))/.source),l.leftMatch[o]=new RegExp(/(^(?:.|\r|\n)*?)/.source+l.match[o].source.replace(/\\(\d+)/g,n));var p=function(a,b){a=Array.prototype.slice.call(a,0);if(b){b.push.apply(b,a);return b}return a};try{Array.prototype.slice.call(c.documentElement.childNodes,0)[0].nodeType}catch(q){p=function(a,b){var c=0,d=b||[];if(f.call(a)==="[object Array]")Array.prototype.push.apply(d,a);else if(typeof a.length==="number")for(var e=a.length;c ",e.insertBefore(a,e.firstChild),c.getElementById(d)&&(l.find.ID=function(a,c,d){if(typeof c.getElementById!=="undefined"&&!d){var e=c.getElementById(a[1]);return e?e.id===a[1]||typeof e.getAttributeNode!=="undefined"&&e.getAttributeNode("id").nodeValue===a[1]?[e]:b:[]}},l.filter.ID=function(a,b){var c=typeof a.getAttributeNode!=="undefined"&&a.getAttributeNode("id");return a.nodeType===1&&c&&c.nodeValue===b}),e.removeChild(a),e=a=null}(),function(){var a=c.createElement("div");a.appendChild(c.createComment("")),a.getElementsByTagName("*").length>0&&(l.find.TAG=function(a,b){var c=b.getElementsByTagName(a[1]);if(a[1]==="*"){var d=[];for(var e=0;c[e];e++)c[e].nodeType===1&&d.push(c[e]);c=d}return c}),a.innerHTML=" ",a.firstChild&&typeof a.firstChild.getAttribute!=="undefined"&&a.firstChild.getAttribute("href")!=="#"&&(l.attrHandle.href=function(a){return a.getAttribute("href",2)}),a=null}(),c.querySelectorAll&&function(){var a=k,b=c.createElement("div"),d="__sizzle__";b.innerHTML="
";if(!b.querySelectorAll||b.querySelectorAll(".TEST").length!==0){k=function(b,e,f,g){e=e||c;if(!g&&!k.isXML(e)){var h=/^(\w+$)|^\.([\w\-]+$)|^#([\w\-]+$)/.exec(b);if(h&&(e.nodeType===1||e.nodeType===9)){if(h[1])return p(e.getElementsByTagName(b),f);if(h[2]&&l.find.CLASS&&e.getElementsByClassName)return p(e.getElementsByClassName(h[2]),f)}if(e.nodeType===9){if(b==="body"&&e.body)return p([e.body],f);if(h&&h[3]){var i=e.getElementById(h[3]);if(!i||!i.parentNode)return p([],f);if(i.id===h[3])return p([i],f)}try{return p(e.querySelectorAll(b),f)}catch(j){}}else if(e.nodeType===1&&e.nodeName.toLowerCase()!=="object"){var m=e,n=e.getAttribute("id"),o=n||d,q=e.parentNode,r=/^\s*[+~]/.test(b);n?o=o.replace(/'/g,"\\$&"):e.setAttribute("id",o),r&&q&&(e=e.parentNode);try{if(!r||q)return p(e.querySelectorAll("[id='"+o+"'] "+b),f)}catch(s){}finally{n||m.removeAttribute("id")}}}return a(b,e,f,g)};for(var e in a)k[e]=a[e];b=null}}(),function(){var a=c.documentElement,b=a.matchesSelector||a.mozMatchesSelector||a.webkitMatchesSelector||a.msMatchesSelector,d=!1;try{b.call(c.documentElement,"[test!='']:sizzle")}catch(e){d=!0}b&&(k.matchesSelector=function(a,c){c=c.replace(/\=\s*([^'"\]]*)\s*\]/g,"='$1']");if(!k.isXML(a))try{if(d||!l.match.PSEUDO.test(c)&&!/!=/.test(c))return b.call(a,c)}catch(e){}return k(c,null,null,[a]).length>0})}(),function(){var a=c.createElement("div");a.innerHTML="
";if(a.getElementsByClassName&&a.getElementsByClassName("e").length!==0){a.lastChild.className="e";if(a.getElementsByClassName("e").length===1)return;l.order.splice(1,0,"CLASS"),l.find.CLASS=function(a,b,c){if(typeof b.getElementsByClassName!=="undefined"&&!c)return b.getElementsByClassName(a[1])},a=null}}(),c.documentElement.contains?k.contains=function(a,b){return a!==b&&(a.contains?a.contains(b):!0)}:c.documentElement.compareDocumentPosition?k.contains=function(a,b){return!!(a.compareDocumentPosition(b)&16)}:k.contains=function(){return!1},k.isXML=function(a){var b=(a?a.ownerDocument||a:0).documentElement;return b?b.nodeName!=="HTML":!1};var v=function(a,b){var c,d=[],e="",f=b.nodeType?[b]:b;while(c=l.match.PSEUDO.exec(a))e+=c[0],a=a.replace(l.match.PSEUDO,"");a=l.relative[a]?a+"*":a;for(var g=0,h=f.length;g0)for(var g=c;g0},closest:function(a,b){var c=[],e,f,g=this[0];if(d.isArray(a)){var h,i,j={},k=1;if(g&&a.length){for(e=0,f=a.length;e-1:d(g).is(h))&&c.push({selector:i,elem:g,level:k});g=g.parentNode,k++}}return c}var l=L.test(a)?d(a,b||this.context):null;for(e=0,f=this.length;e-1:d.find.matchesSelector(g,a)){c.push(g);break}g=g.parentNode;if(!g||!g.ownerDocument||g===b)break}}c=c.length>1?d.unique(c):c;return this.pushStack(c,"closest",a)},index:function(a){if(!a||typeof a==="string")return d.inArray(this[0],a?d(a):this.parent().children());return d.inArray(a.jquery?a[0]:a,this)},add:function(a,b){var c=typeof a==="string"?d(a,b):d.makeArray(a),e=d.merge(this.get(),c);return this.pushStack(N(c[0])||N(e[0])?e:d.unique(e))},andSelf:function(){return this.add(this.prevObject)}}),d.each({parent:function(a){var b=a.parentNode;return b&&b.nodeType!==11?b:null},parents:function(a){return d.dir(a,"parentNode")},parentsUntil:function(a,b,c){return d.dir(a,"parentNode",c)},next:function(a){return d.nth(a,2,"nextSibling")},prev:function(a){return d.nth(a,2,"previousSibling")},nextAll:function(a){return d.dir(a,"nextSibling")},prevAll:function(a){return d.dir(a,"previousSibling")},nextUntil:function(a,b,c){return d.dir(a,"nextSibling",c)},prevUntil:function(a,b,c){return d.dir(a,"previousSibling",c)},siblings:function(a){return d.sibling(a.parentNode.firstChild,a)},children:function(a){return d.sibling(a.firstChild)},contents:function(a){return d.nodeName(a,"iframe")?a.contentDocument||a.contentWindow.document:d.makeArray(a.childNodes)}},function(a,b){d.fn[a]=function(c,e){var f=d.map(this,b,c),g=K.call(arguments);G.test(a)||(e=c),e&&typeof e==="string"&&(f=d.filter(e,f)),f=this.length>1&&!M[a]?d.unique(f):f,(this.length>1||I.test(e))&&H.test(a)&&(f=f.reverse());return this.pushStack(f,a,g.join(","))}}),d.extend({filter:function(a,b,c){c&&(a=":not("+a+")");return b.length===1?d.find.matchesSelector(b[0],a)?[b[0]]:[]:d.find.matches(a,b)},dir:function(a,c,e){var f=[],g=a[c];while(g&&g.nodeType!==9&&(e===b||g.nodeType!==1||!d(g).is(e)))g.nodeType===1&&f.push(g),g=g[c];return f},nth:function(a,b,c,d){b=b||1;var e=0;for(;a;a=a[c])if(a.nodeType===1&&++e===b)break;return a},sibling:function(a,b){var c=[];for(;a;a=a.nextSibling)a.nodeType===1&&a!==b&&c.push(a);return c}});var P=/ jQuery\d+="(?:\d+|null)"/g,Q=/^\s+/,R=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/ig,S=/<([\w:]+)/,T=/",""],legend:[1,""," "],thead:[1,""],tr:[2,""],td:[3,""],col:[2,""],area:[1,""," "],_default:[0,"",""]};X.optgroup=X.option,X.tbody=X.tfoot=X.colgroup=X.caption=X.thead,X.th=X.td,d.support.htmlSerialize||(X._default=[1,"div","
"]),d.fn.extend({text:function(a){if(d.isFunction(a))return this.each(function(b){var c=d(this);c.text(a.call(this,b,c.text()))});if(typeof a!=="object"&&a!==b)return this.empty().append((this[0]&&this[0].ownerDocument||c).createTextNode(a));return d.text(this)},wrapAll:function(a){if(d.isFunction(a))return this.each(function(b){d(this).wrapAll(a.call(this,b))});if(this[0]){var b=d(a,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&b.insertBefore(this[0]),b.map(function(){var a=this;while(a.firstChild&&a.firstChild.nodeType===1)a=a.firstChild;return a}).append(this)}return this},wrapInner:function(a){if(d.isFunction(a))return this.each(function(b){d(this).wrapInner(a.call(this,b))});return this.each(function(){var b=d(this),c=b.contents();c.length?c.wrapAll(a):b.append(a)})},wrap:function(a){return this.each(function(){d(this).wrapAll(a)})},unwrap:function(){return this.parent().each(function(){d.nodeName(this,"body")||d(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,!0,function(a){this.nodeType===1&&this.appendChild(a)})},prepend:function(){return this.domManip(arguments,!0,function(a){this.nodeType===1&&this.insertBefore(a,this.firstChild)})},before:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,!1,function(a){this.parentNode.insertBefore(a,this)});if(arguments.length){var a=d(arguments[0]);a.push.apply(a,this.toArray());return this.pushStack(a,"before",arguments)}},after:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,!1,function(a){this.parentNode.insertBefore(a,this.nextSibling)});if(arguments.length){var a=this.pushStack(this,"after",arguments);a.push.apply(a,d(arguments[0]).toArray());return a}},remove:function(a,b){for(var c=0,e;(e=this[c])!=null;c++)if(!a||d.filter(a,[e]).length)!b&&e.nodeType===1&&(d.cleanData(e.getElementsByTagName("*")),d.cleanData([e])),e.parentNode&&e.parentNode.removeChild(e);return this},empty:function(){for(var a=0,b;(b=this[a])!=null;a++){b.nodeType===1&&d.cleanData(b.getElementsByTagName("*"));while(b.firstChild)b.removeChild(b.firstChild)}return this},clone:function(a,b){a=a==null?!1:a,b=b==null?a:b;return this.map(function(){return d.clone(this,a,b)})},html:function(a){if(a===b)return this[0]&&this[0].nodeType===1?this[0].innerHTML.replace(P,""):null;if(typeof a!=="string"||V.test(a)||!d.support.leadingWhitespace&&Q.test(a)||X[(S.exec(a)||["",""])[1].toLowerCase()])d.isFunction(a)?this.each(function(b){var c=d(this);c.html(a.call(this,b,c.html()))}):this.empty().append(a);else{a=a.replace(R,"<$1>$2>");try{for(var c=0,e=this.length;c1&&l0?this.clone(!0):this).get();d(f[h])[b](j),e=e.concat(j)}return this.pushStack(e,a,f.selector)}}),d.extend({clone:function(a,b,c){var e=a.cloneNode(!0),f,g,h;if((!d.support.noCloneEvent||!d.support.noCloneChecked)&&(a.nodeType===1||a.nodeType===11)&&!d.isXMLDoc(a)){$(a,e),f=_(a),g=_(e);for(h=0;f[h];++h)$(f[h],g[h])}if(b){Z(a,e);if(c){f=_(a),g=_(e);for(h=0;f[h];++h)Z(f[h],g[h])}}return e},clean:function(a,b,e,f){b=b||c,typeof b.createElement==="undefined"&&(b=b.ownerDocument||b[0]&&b[0].ownerDocument||c);var g=[];for(var h=0,i;(i=a[h])!=null;h++){typeof i==="number"&&(i+="");if(!i)continue;if(typeof i!=="string"||U.test(i)){if(typeof i==="string"){i=i.replace(R,"<$1>$2>");var j=(S.exec(i)||["",""])[1].toLowerCase(),k=X[j]||X._default,l=k[0],m=b.createElement("div");m.innerHTML=k[1]+i+k[2];while(l--)m=m.lastChild;if(!d.support.tbody){var n=T.test(i),o=j==="table"&&!n?m.firstChild&&m.firstChild.childNodes:k[1]===""&&!n?m.childNodes:[];for(var p=o.length-1;p>=0;--p)d.nodeName(o[p],"tbody")&&!o[p].childNodes.length&&o[p].parentNode.removeChild(o[p])}!d.support.leadingWhitespace&&Q.test(i)&&m.insertBefore(b.createTextNode(Q.exec(i)[0]),m.firstChild),i=m.childNodes}}else i=b.createTextNode(i);i.nodeType?g.push(i):g=d.merge(g,i)}if(e)for(h=0;g[h];h++)!f||!d.nodeName(g[h],"script")||g[h].type&&g[h].type.toLowerCase()!=="text/javascript"?(g[h].nodeType===1&&g.splice.apply(g,[h+1,0].concat(d.makeArray(g[h].getElementsByTagName("script")))),e.appendChild(g[h])):f.push(g[h].parentNode?g[h].parentNode.removeChild(g[h]):g[h]);return g},cleanData:function(a){var b,c,e=d.cache,f=d.expando,g=d.event.special,h=d.support.deleteExpando;for(var i=0,j;(j=a[i])!=null;i++){if(j.nodeName&&d.noData[j.nodeName.toLowerCase()])continue;c=j[d.expando];if(c){b=e[c]&&e[c][f];if(b&&b.events){for(var k in b.events)g[k]?d.event.remove(j,k):d.removeEvent(j,k,b.handle);b.handle&&(b.handle.elem=null)}h?delete j[d.expando]:j.removeAttribute&&j.removeAttribute(d.expando),delete e[c]}}}});var bb=/alpha\([^)]*\)/i,bc=/opacity=([^)]*)/,bd=/-([a-z])/ig,be=/([A-Z])/g,bf=/^-?\d+(?:px)?$/i,bg=/^-?\d/,bh={position:"absolute",visibility:"hidden",display:"block"},bi=["Left","Right"],bj=["Top","Bottom"],bk,bl,bm,bn=function(a,b){return b.toUpperCase()};d.fn.css=function(a,c){if(arguments.length===2&&c===b)return this;return d.access(this,a,c,!0,function(a,c,e){return e!==b?d.style(a,c,e):d.css(a,c)})},d.extend({cssHooks:{opacity:{get:function(a,b){if(b){var c=bk(a,"opacity","opacity");return c===""?"1":c}return a.style.opacity}}},cssNumber:{zIndex:!0,fontWeight:!0,opacity:!0,zoom:!0,lineHeight:!0},cssProps:{"float":d.support.cssFloat?"cssFloat":"styleFloat"},style:function(a,c,e,f){if(a&&a.nodeType!==3&&a.nodeType!==8&&a.style){var g,h=d.camelCase(c),i=a.style,j=d.cssHooks[h];c=d.cssProps[h]||h;if(e===b){if(j&&"get"in j&&(g=j.get(a,!1,f))!==b)return g;return i[c]}if(typeof e==="number"&&isNaN(e)||e==null)return;typeof e==="number"&&!d.cssNumber[h]&&(e+="px");if(!j||!("set"in j)||(e=j.set(a,e))!==b)try{i[c]=e}catch(k){}}},css:function(a,c,e){var f,g=d.camelCase(c),h=d.cssHooks[g];c=d.cssProps[g]||g;if(h&&"get"in h&&(f=h.get(a,!0,e))!==b)return f;if(bk)return bk(a,c,g)},swap:function(a,b,c){var d={};for(var e in b)d[e]=a.style[e],a.style[e]=b[e];c.call(a);for(e in b)a.style[e]=d[e]},camelCase:function(a){return a.replace(bd,bn)}}),d.curCSS=d.css,d.each(["height","width"],function(a,b){d.cssHooks[b]={get:function(a,c,e){var f;if(c){a.offsetWidth!==0?f=bo(a,b,e):d.swap(a,bh,function(){f=bo(a,b,e)});if(f<=0){f=bk(a,b,b),f==="0px"&&bm&&(f=bm(a,b,b));if(f!=null)return f===""||f==="auto"?"0px":f}if(f<0||f==null){f=a.style[b];return f===""||f==="auto"?"0px":f}return typeof f==="string"?f:f+"px"}},set:function(a,b){if(!bf.test(b))return b;b=parseFloat(b);if(b>=0)return b+"px"}}}),d.support.opacity||(d.cssHooks.opacity={get:function(a,b){return bc.test((b&&a.currentStyle?a.currentStyle.filter:a.style.filter)||"")?parseFloat(RegExp.$1)/100+"":b?"1":""},set:function(a,b){var c=a.style;c.zoom=1;var e=d.isNaN(b)?"":"alpha(opacity="+b*100+")",f=c.filter||"";c.filter=bb.test(f)?f.replace(bb,e):c.filter+" "+e}}),c.defaultView&&c.defaultView.getComputedStyle&&(bl=function(a,c,e){var f,g,h;e=e.replace(be,"-$1").toLowerCase();if(!(g=a.ownerDocument.defaultView))return b;if(h=g.getComputedStyle(a,null))f=h.getPropertyValue(e),f===""&&!d.contains(a.ownerDocument.documentElement,a)&&(f=d.style(a,e));return f}),c.documentElement.currentStyle&&(bm=function(a,b){var c,d=a.currentStyle&&a.currentStyle[b],e=a.runtimeStyle&&a.runtimeStyle[b],f=a.style;!bf.test(d)&&bg.test(d)&&(c=f.left,e&&(a.runtimeStyle.left=a.currentStyle.left),f.left=b==="fontSize"?"1em":d||0,d=f.pixelLeft+"px",f.left=c,e&&(a.runtimeStyle.left=e));return d===""?"auto":d}),bk=bl||bm,d.expr&&d.expr.filters&&(d.expr.filters.hidden=function(a){var b=a.offsetWidth,c=a.offsetHeight;return b===0&&c===0||!d.support.reliableHiddenOffsets&&(a.style.display||d.css(a,"display"))==="none"},d.expr.filters.visible=function(a){return!d.expr.filters.hidden(a)});var bp=/%20/g,bq=/\[\]$/,br=/\r?\n/g,bs=/#.*$/,bt=/^(.*?):[ \t]*([^\r\n]*)\r?$/mg,bu=/^(?:color|date|datetime|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i,bv=/(?:^file|^widget|\-extension):$/,bw=/^(?:GET|HEAD)$/,bx=/^\/\//,by=/\?/,bz=/
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Select a localisation :
+
+ Français
+ Deutsch
+ Japanese
+
+
+
+
+
+
+
+
+
+
+ List of localisations :
+
+
+
\ No newline at end of file
diff --git a/3rdparty/timepicker/js/i18n/jquery.ui.timepicker-de.js b/3rdparty/timepicker/js/i18n/jquery.ui.timepicker-de.js
new file mode 100644
index 00000000000..c010a498e15
--- /dev/null
+++ b/3rdparty/timepicker/js/i18n/jquery.ui.timepicker-de.js
@@ -0,0 +1,9 @@
+/* Deutsch initialisation for the timepicker plugin */
+/* Written by Bernd Plagge (bplagge@choicenet.ne.jp). */
+jQuery(function($){
+ $.timepicker.regional['de'] = {
+ hourText: 'Stunde',
+ minuteText: 'Minuten',
+ amPmText: ['AM', 'PM'] }
+ $.timepicker.setDefaults($.timepicker.regional['de']);
+});
\ No newline at end of file
diff --git a/3rdparty/timepicker/js/i18n/jquery.ui.timepicker-fr.js b/3rdparty/timepicker/js/i18n/jquery.ui.timepicker-fr.js
new file mode 100644
index 00000000000..bd37d731c8d
--- /dev/null
+++ b/3rdparty/timepicker/js/i18n/jquery.ui.timepicker-fr.js
@@ -0,0 +1,13 @@
+/* French initialisation for the jQuery time picker plugin. */
+/* Written by Bernd Plagge (bplagge@choicenet.ne.jp),
+ Francois Gelinas (frank@fgelinas.com) */
+jQuery(function($){
+ $.timepicker.regional['fr'] = {
+ hourText: 'Heures',
+ minuteText: 'Minutes',
+ amPmText: ['AM', 'PM'],
+ closeButtonText: 'Fermer',
+ nowButtonText: 'Maintenant',
+ deselectButtonText: 'Désélectionner' }
+ $.timepicker.setDefaults($.timepicker.regional['fr']);
+});
\ No newline at end of file
diff --git a/3rdparty/timepicker/js/i18n/jquery.ui.timepicker-ja.js b/3rdparty/timepicker/js/i18n/jquery.ui.timepicker-ja.js
new file mode 100644
index 00000000000..01b2c8a3de5
--- /dev/null
+++ b/3rdparty/timepicker/js/i18n/jquery.ui.timepicker-ja.js
@@ -0,0 +1,9 @@
+/* Japanese initialisation for the jQuery time picker plugin. */
+/* Written by Bernd Plagge (bplagge@choicenet.ne.jp). */
+jQuery(function($){
+ $.timepicker.regional['ja'] = {
+ hourText: '時間',
+ minuteText: '分',
+ amPmText: ['午前', '午後'] }
+ $.timepicker.setDefaults($.timepicker.regional['ja']);
+});
diff --git a/3rdparty/timepicker/js/jquery.ui.timepicker.js b/3rdparty/timepicker/js/jquery.ui.timepicker.js
new file mode 100644
index 00000000000..d086b674b7b
--- /dev/null
+++ b/3rdparty/timepicker/js/jquery.ui.timepicker.js
@@ -0,0 +1,1345 @@
+/*
+ * jQuery UI Timepicker 0.2.9
+ *
+ * Copyright 2010-2011, Francois Gelinas
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * http://fgelinas.com/code/timepicker
+ *
+ * Depends:
+ * jquery.ui.core.js
+ * jquery.ui.position.js (only if position settngs are used)
+ *
+ * Change version 0.1.0 - moved the t-rex up here
+ *
+ ____
+ ___ .-~. /_"-._
+ `-._~-. / /_ "~o\ :Y
+ \ \ / : \~x. ` ')
+ ] Y / | Y< ~-.__j
+ / ! _.--~T : l l< /.-~
+ / / ____.--~ . ` l /~\ \<|Y
+ / / .-~~" /| . ',-~\ \L|
+ / / / .^ \ Y~Y \.^>/l_ "--'
+ / Y .-"( . l__ j_j l_/ /~_.-~ .
+ Y l / \ ) ~~~." / `/"~ / \.__/l_
+ | \ _.-" ~-{__ l : l._Z~-.___.--~
+ | ~---~ / ~~"---\_ ' __[>
+ l . _.^ ___ _>-y~
+ \ \ . .-~ .-~ ~>--" /
+ \ ~---" / ./ _.-'
+ "-.,_____.,_ _.--~\ _.-~
+ ~~ ( _} -Row
+ `. ~(
+ ) \
+ /,`--'~\--'~\
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ ->T-Rex<-
+*/
+
+(function ($, undefined) {
+
+ $.extend($.ui, { timepicker: { version: "0.2.9"} });
+
+ var PROP_NAME = 'timepicker';
+ var tpuuid = new Date().getTime();
+
+ /* Time picker manager.
+ Use the singleton instance of this class, $.timepicker, to interact with the time picker.
+ Settings for (groups of) time pickers are maintained in an instance object,
+ allowing multiple different settings on the same page. */
+
+ function Timepicker() {
+ this.debug = true; // Change this to true to start debugging
+ this._curInst = null; // The current instance in use
+ this._isInline = false; // true if the instance is displayed inline
+ this._disabledInputs = []; // List of time picker inputs that have been disabled
+ this._timepickerShowing = false; // True if the popup picker is showing , false if not
+ this._inDialog = false; // True if showing within a "dialog", false if not
+ this._dialogClass = 'ui-timepicker-dialog'; // The name of the dialog marker class
+ this._mainDivId = 'ui-timepicker-div'; // The ID of the main timepicker division
+ this._inlineClass = 'ui-timepicker-inline'; // The name of the inline marker class
+ this._currentClass = 'ui-timepicker-current'; // The name of the current hour / minutes marker class
+ this._dayOverClass = 'ui-timepicker-days-cell-over'; // The name of the day hover marker class
+
+ this.regional = []; // Available regional settings, indexed by language code
+ this.regional[''] = { // Default regional settings
+ hourText: 'Hour', // Display text for hours section
+ minuteText: 'Minute', // Display text for minutes link
+ amPmText: ['AM', 'PM'], // Display text for AM PM
+ closeButtonText: 'Done', // Text for the confirmation button (ok button)
+ nowButtonText: 'Now', // Text for the now button
+ deselectButtonText: 'Deselect' // Text for the deselect button
+ };
+ this._defaults = { // Global defaults for all the time picker instances
+ showOn: 'focus', // 'focus' for popup on focus,
+ // 'button' for trigger button, or 'both' for either (not yet implemented)
+ button: null, // 'button' element that will trigger the timepicker
+ showAnim: 'fadeIn', // Name of jQuery animation for popup
+ showOptions: {}, // Options for enhanced animations
+ appendText: '', // Display text following the input box, e.g. showing the format
+
+ beforeShow: null, // Define a callback function executed before the timepicker is shown
+ onSelect: null, // Define a callback function when a hour / minutes is selected
+ onClose: null, // Define a callback function when the timepicker is closed
+
+ timeSeparator: ':', // The character to use to separate hours and minutes.
+ periodSeparator: ' ', // The character to use to separate the time from the time period.
+ showPeriod: false, // Define whether or not to show AM/PM with selected time
+ showPeriodLabels: true, // Show the AM/PM labels on the left of the time picker
+ showLeadingZero: true, // Define whether or not to show a leading zero for hours < 10. [true/false]
+ showMinutesLeadingZero: true, // Define whether or not to show a leading zero for minutes < 10.
+ altField: '', // Selector for an alternate field to store selected time into
+ defaultTime: 'now', // Used as default time when input field is empty or for inline timePicker
+ // (set to 'now' for the current time, '' for no highlighted time)
+ myPosition: 'left top', // Position of the dialog relative to the input.
+ // see the position utility for more info : http://jqueryui.com/demos/position/
+ atPosition: 'left bottom', // Position of the input element to match
+ // Note : if the position utility is not loaded, the timepicker will attach left top to left bottom
+ //NEW: 2011-02-03
+ onHourShow: null, // callback for enabling / disabling on selectable hours ex : function(hour) { return true; }
+ onMinuteShow: null, // callback for enabling / disabling on time selection ex : function(hour,minute) { return true; }
+
+ hours: {
+ starts: 0, // first displayed hour
+ ends: 23 // last displayed hour
+ },
+ minutes: {
+ starts: 0, // first displayed minute
+ ends: 55, // last displayed minute
+ interval: 5 // interval of displayed minutes
+ },
+ rows: 4, // number of rows for the input tables, minimum 2, makes more sense if you use multiple of 2
+ // 2011-08-05 0.2.4
+ showHours: true, // display the hours section of the dialog
+ showMinutes: true, // display the minute section of the dialog
+ optionalMinutes: false, // optionally parse inputs of whole hours with minutes omitted
+
+ // buttons
+ showCloseButton: false, // shows an OK button to confirm the edit
+ showNowButton: false, // Shows the 'now' button
+ showDeselectButton: false // Shows the deselect time button
+
+ };
+ $.extend(this._defaults, this.regional['']);
+
+ this.tpDiv = $('
');
+ }
+
+ $.extend(Timepicker.prototype, {
+ /* Class name added to elements to indicate already configured with a time picker. */
+ markerClassName: 'hasTimepicker',
+
+ /* Debug logging (if enabled). */
+ log: function () {
+ if (this.debug)
+ console.log.apply('', arguments);
+ },
+
+ _widgetTimepicker: function () {
+ return this.tpDiv;
+ },
+
+ /* Override the default settings for all instances of the time picker.
+ @param settings object - the new settings to use as defaults (anonymous object)
+ @return the manager object */
+ setDefaults: function (settings) {
+ extendRemove(this._defaults, settings || {});
+ return this;
+ },
+
+ /* Attach the time picker to a jQuery selection.
+ @param target element - the target input field or division or span
+ @param settings object - the new settings to use for this time picker instance (anonymous) */
+ _attachTimepicker: function (target, settings) {
+ // check for settings on the control itself - in namespace 'time:'
+ var inlineSettings = null;
+ for (var attrName in this._defaults) {
+ var attrValue = target.getAttribute('time:' + attrName);
+ if (attrValue) {
+ inlineSettings = inlineSettings || {};
+ try {
+ inlineSettings[attrName] = eval(attrValue);
+ } catch (err) {
+ inlineSettings[attrName] = attrValue;
+ }
+ }
+ }
+ var nodeName = target.nodeName.toLowerCase();
+ var inline = (nodeName == 'div' || nodeName == 'span');
+
+ if (!target.id) {
+ this.uuid += 1;
+ target.id = 'tp' + this.uuid;
+ }
+ var inst = this._newInst($(target), inline);
+ inst.settings = $.extend({}, settings || {}, inlineSettings || {});
+ if (nodeName == 'input') {
+ this._connectTimepicker(target, inst);
+ // init inst.hours and inst.minutes from the input value
+ this._setTimeFromField(inst);
+ } else if (inline) {
+ this._inlineTimepicker(target, inst);
+ }
+
+
+ },
+
+ /* Create a new instance object. */
+ _newInst: function (target, inline) {
+ var id = target[0].id.replace(/([^A-Za-z0-9_-])/g, '\\\\$1'); // escape jQuery meta chars
+ return {
+ id: id, input: target, // associated target
+ inline: inline, // is timepicker inline or not :
+ tpDiv: (!inline ? this.tpDiv : // presentation div
+ $('
'))
+ };
+ },
+
+ /* Attach the time picker to an input field. */
+ _connectTimepicker: function (target, inst) {
+ var input = $(target);
+ inst.append = $([]);
+ inst.trigger = $([]);
+ if (input.hasClass(this.markerClassName)) { return; }
+ this._attachments(input, inst);
+ input.addClass(this.markerClassName).
+ keydown(this._doKeyDown).
+ keyup(this._doKeyUp).
+ bind("setData.timepicker", function (event, key, value) {
+ inst.settings[key] = value;
+ }).
+ bind("getData.timepicker", function (event, key) {
+ return this._get(inst, key);
+ });
+ $.data(target, PROP_NAME, inst);
+ },
+
+ /* Handle keystrokes. */
+ _doKeyDown: function (event) {
+ var inst = $.timepicker._getInst(event.target);
+ var handled = true;
+ inst._keyEvent = true;
+ if ($.timepicker._timepickerShowing) {
+ switch (event.keyCode) {
+ case 9: $.timepicker._hideTimepicker();
+ handled = false;
+ break; // hide on tab out
+ case 13:
+ $.timepicker._updateSelectedValue(inst);
+ $.timepicker._hideTimepicker();
+
+ return false; // don't submit the form
+ break; // select the value on enter
+ case 27: $.timepicker._hideTimepicker();
+ break; // hide on escape
+ default: handled = false;
+ }
+ }
+ else if (event.keyCode == 36 && event.ctrlKey) { // display the time picker on ctrl+home
+ $.timepicker._showTimepicker(this);
+ }
+ else {
+ handled = false;
+ }
+ if (handled) {
+ event.preventDefault();
+ event.stopPropagation();
+ }
+ },
+
+ /* Update selected time on keyUp */
+ /* Added verion 0.0.5 */
+ _doKeyUp: function (event) {
+ var inst = $.timepicker._getInst(event.target);
+ $.timepicker._setTimeFromField(inst);
+ $.timepicker._updateTimepicker(inst);
+ },
+
+ /* Make attachments based on settings. */
+ _attachments: function (input, inst) {
+ var appendText = this._get(inst, 'appendText');
+ var isRTL = this._get(inst, 'isRTL');
+ if (inst.append) { inst.append.remove(); }
+ if (appendText) {
+ inst.append = $('' + appendText + ' ');
+ input[isRTL ? 'before' : 'after'](inst.append);
+ }
+ input.unbind('focus.timepicker', this._showTimepicker);
+ if (inst.trigger) { inst.trigger.remove(); }
+
+ var showOn = this._get(inst, 'showOn');
+ if (showOn == 'focus' || showOn == 'both') { // pop-up time picker when in the marked field
+ input.bind("focus.timepicker", this._showTimepicker);
+ }
+ if (showOn == 'button' || showOn == 'both') { // pop-up time picker when 'button' element is clicked
+ var button = this._get(inst, 'button');
+ $(button).bind("click.timepicker", function () {
+ if ($.timepicker._timepickerShowing && $.timepicker._lastInput == input[0]) { $.timepicker._hideTimepicker(); }
+ else { $.timepicker._showTimepicker(input[0]); }
+ return false;
+ });
+
+ }
+ },
+
+
+ /* Attach an inline time picker to a div. */
+ _inlineTimepicker: function(target, inst) {
+ var divSpan = $(target);
+ if (divSpan.hasClass(this.markerClassName))
+ return;
+ divSpan.addClass(this.markerClassName).append(inst.tpDiv).
+ bind("setData.timepicker", function(event, key, value){
+ inst.settings[key] = value;
+ }).bind("getData.timepicker", function(event, key){
+ return this._get(inst, key);
+ });
+ $.data(target, PROP_NAME, inst);
+
+ this._setTimeFromField(inst);
+ this._updateTimepicker(inst);
+ inst.tpDiv.show();
+ },
+
+ /* Pop-up the time picker for a given input field.
+ @param input element - the input field attached to the time picker or
+ event - if triggered by focus */
+ _showTimepicker: function (input) {
+ input = input.target || input;
+ if (input.nodeName.toLowerCase() != 'input') { input = $('input', input.parentNode)[0]; } // find from button/image trigger
+ if ($.timepicker._isDisabledTimepicker(input) || $.timepicker._lastInput == input) { return; } // already here
+
+ // fix v 0.0.8 - close current timepicker before showing another one
+ $.timepicker._hideTimepicker();
+
+ var inst = $.timepicker._getInst(input);
+ if ($.timepicker._curInst && $.timepicker._curInst != inst) {
+ $.timepicker._curInst.tpDiv.stop(true, true);
+ }
+ var beforeShow = $.timepicker._get(inst, 'beforeShow');
+ extendRemove(inst.settings, (beforeShow ? beforeShow.apply(input, [input, inst]) : {}));
+ inst.lastVal = null;
+ $.timepicker._lastInput = input;
+
+ $.timepicker._setTimeFromField(inst);
+
+ // calculate default position
+ if ($.timepicker._inDialog) { input.value = ''; } // hide cursor
+ if (!$.timepicker._pos) { // position below input
+ $.timepicker._pos = $.timepicker._findPos(input);
+ $.timepicker._pos[1] += input.offsetHeight; // add the height
+ }
+ var isFixed = false;
+ $(input).parents().each(function () {
+ isFixed |= $(this).css('position') == 'fixed';
+ return !isFixed;
+ });
+ if (isFixed && $.browser.opera) { // correction for Opera when fixed and scrolled
+ $.timepicker._pos[0] -= document.documentElement.scrollLeft;
+ $.timepicker._pos[1] -= document.documentElement.scrollTop;
+ }
+
+ var offset = { left: $.timepicker._pos[0], top: $.timepicker._pos[1] };
+
+ $.timepicker._pos = null;
+ // determine sizing offscreen
+ inst.tpDiv.css({ position: 'absolute', display: 'block', top: '-1000px' });
+ $.timepicker._updateTimepicker(inst);
+
+
+ // position with the ui position utility, if loaded
+ if ( ( ! inst.inline ) && ( typeof $.ui.position == 'object' ) ) {
+ inst.tpDiv.position({
+ of: inst.input,
+ my: $.timepicker._get( inst, 'myPosition' ),
+ at: $.timepicker._get( inst, 'atPosition' ),
+ // offset: $( "#offset" ).val(),
+ // using: using,
+ collision: 'flip'
+ });
+ var offset = inst.tpDiv.offset();
+ $.timepicker._pos = [offset.top, offset.left];
+ }
+
+
+ // reset clicked state
+ inst._hoursClicked = false;
+ inst._minutesClicked = false;
+
+ // fix width for dynamic number of time pickers
+ // and adjust position before showing
+ offset = $.timepicker._checkOffset(inst, offset, isFixed);
+ inst.tpDiv.css({ position: ($.timepicker._inDialog && $.blockUI ?
+ 'static' : (isFixed ? 'fixed' : 'absolute')), display: 'none',
+ left: offset.left + 'px', top: offset.top + 'px'
+ });
+ if ( ! inst.inline ) {
+ var showAnim = $.timepicker._get(inst, 'showAnim');
+ var duration = $.timepicker._get(inst, 'duration');
+
+ var postProcess = function () {
+ $.timepicker._timepickerShowing = true;
+ var borders = $.timepicker._getBorders(inst.tpDiv);
+ inst.tpDiv.find('iframe.ui-timepicker-cover'). // IE6- only
+ css({ left: -borders[0], top: -borders[1],
+ width: inst.tpDiv.outerWidth(), height: inst.tpDiv.outerHeight()
+ });
+ };
+
+ // Fixed the zIndex problem for real (I hope) - FG - v 0.2.9
+ inst.tpDiv.css('zIndex', $.timepicker._getZIndex(input) +1);
+
+ if ($.effects && $.effects[showAnim]) {
+ inst.tpDiv.show(showAnim, $.timepicker._get(inst, 'showOptions'), duration, postProcess);
+ }
+ else {
+ inst.tpDiv[showAnim || 'show']((showAnim ? duration : null), postProcess);
+ }
+ if (!showAnim || !duration) { postProcess(); }
+ if (inst.input.is(':visible') && !inst.input.is(':disabled')) { inst.input.focus(); }
+ $.timepicker._curInst = inst;
+ }
+ },
+
+ // This is a copy of the zIndex function of UI core 1.8.??
+ // Copied in the timepicker to stay backward compatible.
+ _getZIndex: function (target) {
+ var elem = $( target ), position, value;
+ while ( elem.length && elem[ 0 ] !== document ) {
+ position = elem.css( "position" );
+ if ( position === "absolute" || position === "relative" || position === "fixed" ) {
+ value = parseInt( elem.css( "zIndex" ), 10 );
+ if ( !isNaN( value ) && value !== 0 ) {
+ return value;
+ }
+ }
+ elem = elem.parent();
+ }
+ },
+
+ /* Generate the time picker content. */
+ _updateTimepicker: function (inst) {
+ inst.tpDiv.empty().append(this._generateHTML(inst));
+ this._rebindDialogEvents(inst);
+
+ },
+
+ _rebindDialogEvents: function (inst) {
+ var borders = $.timepicker._getBorders(inst.tpDiv),
+ self = this;
+ inst.tpDiv
+ .find('iframe.ui-timepicker-cover') // IE6- only
+ .css({ left: -borders[0], top: -borders[1],
+ width: inst.tpDiv.outerWidth(), height: inst.tpDiv.outerHeight()
+ })
+ .end()
+ // after the picker html is appended bind the click & double click events (faster in IE this way
+ // then letting the browser interpret the inline events)
+ // the binding for the minute cells also exists in _updateMinuteDisplay
+ .find('.ui-timepicker-minute-cell')
+ .unbind()
+ .bind("click", { fromDoubleClick:false }, $.proxy($.timepicker.selectMinutes, this))
+ .bind("dblclick", { fromDoubleClick:true }, $.proxy($.timepicker.selectMinutes, this))
+ .end()
+ .find('.ui-timepicker-hour-cell')
+ .unbind()
+ .bind("click", { fromDoubleClick:false }, $.proxy($.timepicker.selectHours, this))
+ .bind("dblclick", { fromDoubleClick:true }, $.proxy($.timepicker.selectHours, this))
+ .end()
+ .find('.ui-timepicker td a')
+ .unbind()
+ .bind('mouseout', function () {
+ $(this).removeClass('ui-state-hover');
+ if (this.className.indexOf('ui-timepicker-prev') != -1) $(this).removeClass('ui-timepicker-prev-hover');
+ if (this.className.indexOf('ui-timepicker-next') != -1) $(this).removeClass('ui-timepicker-next-hover');
+ })
+ .bind('mouseover', function () {
+ if ( ! self._isDisabledTimepicker(inst.inline ? inst.tpDiv.parent()[0] : inst.input[0])) {
+ $(this).parents('.ui-timepicker-calendar').find('a').removeClass('ui-state-hover');
+ $(this).addClass('ui-state-hover');
+ if (this.className.indexOf('ui-timepicker-prev') != -1) $(this).addClass('ui-timepicker-prev-hover');
+ if (this.className.indexOf('ui-timepicker-next') != -1) $(this).addClass('ui-timepicker-next-hover');
+ }
+ })
+ .end()
+ .find('.' + this._dayOverClass + ' a')
+ .trigger('mouseover')
+ .end()
+ .find('.ui-timepicker-now').bind("click",function(e) {
+ $.timepicker.selectNow(e);
+ }).end()
+ .find('.ui-timepicker-deselect').bind("click",function(e) {
+ $.timepicker.deselectTime(e);
+ }).end()
+ .find('.ui-timepicker-close').bind("click",function(e) {
+ $.timepicker._hideTimepicker();
+ }).end();
+ },
+
+ /* Generate the HTML for the current state of the time picker. */
+ _generateHTML: function (inst) {
+
+ var h, m, row, col, html, hoursHtml, minutesHtml = '',
+ showPeriod = (this._get(inst, 'showPeriod') == true),
+ showPeriodLabels = (this._get(inst, 'showPeriodLabels') == true),
+ showLeadingZero = (this._get(inst, 'showLeadingZero') == true),
+ showHours = (this._get(inst, 'showHours') == true),
+ showMinutes = (this._get(inst, 'showMinutes') == true),
+ amPmText = this._get(inst, 'amPmText'),
+ rows = this._get(inst, 'rows'),
+ amRows = 0,
+ pmRows = 0,
+ amItems = 0,
+ pmItems = 0,
+ amFirstRow = 0,
+ pmFirstRow = 0,
+ hours = Array(),
+ hours_options = this._get(inst, 'hours'),
+ hoursPerRow = null,
+ hourCounter = 0,
+ hourLabel = this._get(inst, 'hourText'),
+ showCloseButton = this._get(inst, 'showCloseButton'),
+ closeButtonText = this._get(inst, 'closeButtonText'),
+ showNowButton = this._get(inst, 'showNowButton'),
+ nowButtonText = this._get(inst, 'nowButtonText'),
+ showDeselectButton = this._get(inst, 'showDeselectButton'),
+ deselectButtonText = this._get(inst, 'deselectButtonText'),
+ showButtonPanel = showCloseButton || showNowButton || showDeselectButton;
+
+
+
+ // prepare all hours and minutes, makes it easier to distribute by rows
+ for (h = hours_options.starts; h <= hours_options.ends; h++) {
+ hours.push (h);
+ }
+ hoursPerRow = Math.ceil(hours.length / rows); // always round up
+
+ if (showPeriodLabels) {
+ for (hourCounter = 0; hourCounter < hours.length; hourCounter++) {
+ if (hours[hourCounter] < 12) {
+ amItems++;
+ }
+ else {
+ pmItems++;
+ }
+ }
+ hourCounter = 0;
+
+ amRows = Math.floor(amItems / hours.length * rows);
+ pmRows = Math.floor(pmItems / hours.length * rows);
+
+ // assign the extra row to the period that is more densly populated
+ if (rows != amRows + pmRows) {
+ // Make sure: AM Has Items and either PM Does Not, AM has no rows yet, or AM is more dense
+ if (amItems && (!pmItems || !amRows || (pmRows && amItems / amRows >= pmItems / pmRows))) {
+ amRows++;
+ } else {
+ pmRows++;
+ }
+ }
+ amFirstRow = Math.min(amRows, 1);
+ pmFirstRow = amRows + 1;
+ hoursPerRow = Math.ceil(Math.max(amItems / amRows, pmItems / pmRows));
+ }
+
+
+ html = '';
+
+ if (showHours) {
+
+ html += '' +
+ '' +
+ '';
+
+ for (row = 1; row <= rows; row++) {
+ html += '';
+ // AM
+ if (row == amFirstRow && showPeriodLabels) {
+ html += '' + amPmText[0] + ' ';
+ }
+ // PM
+ if (row == pmFirstRow && showPeriodLabels) {
+ html += '' + amPmText[1] + ' ';
+ }
+ for (col = 1; col <= hoursPerRow; col++) {
+ if (showPeriodLabels && row < pmFirstRow && hours[hourCounter] >= 12) {
+ html += this._generateHTMLHourCell(inst, undefined, showPeriod, showLeadingZero);
+ } else {
+ html += this._generateHTMLHourCell(inst, hours[hourCounter], showPeriod, showLeadingZero);
+ hourCounter++;
+ }
+ }
+ html += ' ';
+ }
+ html += '
' + // Close the hours cells table
+ ' '; // Close the Hour td
+ }
+
+ if (showMinutes) {
+ html += '';
+ html += this._generateHTMLMinutes(inst);
+ html += ' ';
+ }
+
+ html += ' ';
+
+
+ if (showButtonPanel) {
+ var buttonPanel = '';
+ if (showNowButton) {
+ buttonPanel += ''
+ + nowButtonText + ' ';
+ }
+ if (showDeselectButton) {
+ buttonPanel += ''
+ + deselectButtonText + ' ';
+ }
+ if (showCloseButton) {
+ buttonPanel += ''
+ + closeButtonText + ' ';
+ }
+
+ html += buttonPanel + '
';
+ }
+ html += '
';
+
+ /* IE6 IFRAME FIX (taken from datepicker 1.5.3, fixed in 0.1.2 */
+ html += ($.browser.msie && parseInt($.browser.version,10) < 7 && !inst.inline ?
+ '' : '');
+
+ return html;
+ },
+
+ /* Special function that update the minutes selection in currently visible timepicker
+ * called on hour selection when onMinuteShow is defined */
+ _updateMinuteDisplay: function (inst) {
+ var newHtml = this._generateHTMLMinutes(inst);
+ inst.tpDiv.find('td.ui-timepicker-minutes').html(newHtml);
+ this._rebindDialogEvents(inst);
+ // after the picker html is appended bind the click & double click events (faster in IE this way
+ // then letting the browser interpret the inline events)
+ // yes I know, duplicate code, sorry
+/* .find('.ui-timepicker-minute-cell')
+ .bind("click", { fromDoubleClick:false }, $.proxy($.timepicker.selectMinutes, this))
+ .bind("dblclick", { fromDoubleClick:true }, $.proxy($.timepicker.selectMinutes, this));
+*/
+
+ },
+
+ /*
+ * Generate the minutes table
+ * This is separated from the _generateHTML function because is can be called separately (when hours changes)
+ */
+ _generateHTMLMinutes: function (inst) {
+
+ var m, row, html = '',
+ rows = this._get(inst, 'rows'),
+ minutes = Array(),
+ minutes_options = this._get(inst, 'minutes'),
+ minutesPerRow = null,
+ minuteCounter = 0,
+ showMinutesLeadingZero = (this._get(inst, 'showMinutesLeadingZero') == true),
+ onMinuteShow = this._get(inst, 'onMinuteShow'),
+ minuteLabel = this._get(inst, 'minuteText');
+
+ if ( ! minutes_options.starts) {
+ minutes_options.starts = 0;
+ }
+ if ( ! minutes_options.ends) {
+ minutes_options.ends = 59;
+ }
+ for (m = minutes_options.starts; m <= minutes_options.ends; m += minutes_options.interval) {
+ minutes.push(m);
+ }
+ minutesPerRow = Math.round(minutes.length / rows + 0.49); // always round up
+
+ /*
+ * The minutes table
+ */
+ // if currently selected minute is not enabled, we have a problem and need to select a new minute.
+ if (onMinuteShow &&
+ (onMinuteShow.apply((inst.input ? inst.input[0] : null), [inst.hours , inst.minutes]) == false) ) {
+ // loop minutes and select first available
+ for (minuteCounter = 0; minuteCounter < minutes.length; minuteCounter += 1) {
+ m = minutes[minuteCounter];
+ if (onMinuteShow.apply((inst.input ? inst.input[0] : null), [inst.hours, m])) {
+ inst.minutes = m;
+ break;
+ }
+ }
+ }
+
+
+
+ html += '' +
+ '';
+
+ minuteCounter = 0;
+ for (row = 1; row <= rows; row++) {
+ html += '';
+ while (minuteCounter < row * minutesPerRow) {
+ var m = minutes[minuteCounter];
+ var displayText = '';
+ if (m !== undefined ) {
+ displayText = (m < 10) && showMinutesLeadingZero ? "0" + m.toString() : m.toString();
+ }
+ html += this._generateHTMLMinuteCell(inst, m, displayText);
+ minuteCounter++;
+ }
+ html += ' ';
+ }
+
+ html += '
';
+
+ return html;
+ },
+
+ /* Generate the content of a "Hour" cell */
+ _generateHTMLHourCell: function (inst, hour, showPeriod, showLeadingZero) {
+
+ var displayHour = hour;
+ if ((hour > 12) && showPeriod) {
+ displayHour = hour - 12;
+ }
+ if ((displayHour == 0) && showPeriod) {
+ displayHour = 12;
+ }
+ if ((displayHour < 10) && showLeadingZero) {
+ displayHour = '0' + displayHour;
+ }
+
+ var html = "";
+ var enabled = true;
+ var onHourShow = this._get(inst, 'onHourShow'); //custom callback
+
+ if (hour == undefined) {
+ html = ' ';
+ return html;
+ }
+
+ if (onHourShow) {
+ enabled = onHourShow.apply((inst.input ? inst.input[0] : null), [hour]);
+ }
+
+ if (enabled) {
+ html = '' +
+ '' +
+ displayHour.toString() +
+ ' ';
+ }
+ else {
+ html =
+ '' +
+ '' +
+ displayHour.toString() +
+ ' ' +
+ ' ';
+ }
+ return html;
+ },
+
+ /* Generate the content of a "Hour" cell */
+ _generateHTMLMinuteCell: function (inst, minute, displayText) {
+ var html = "";
+ var enabled = true;
+ var onMinuteShow = this._get(inst, 'onMinuteShow'); //custom callback
+ if (onMinuteShow) {
+ //NEW: 2011-02-03 we should give the hour as a parameter as well!
+ enabled = onMinuteShow.apply((inst.input ? inst.input[0] : null), [inst.hours,minute]); //trigger callback
+ }
+
+ if (minute == undefined) {
+ html = ' ';
+ return html;
+ }
+
+ if (enabled) {
+ html = '' +
+ '' +
+ displayText +
+ ' ';
+ }
+ else {
+
+ html = '' +
+ '' +
+ displayText +
+ ' ' +
+ ' ';
+ }
+ return html;
+ },
+
+
+ /* Enable the date picker to a jQuery selection.
+ @param target element - the target input field or division or span */
+ _enableTimepicker: function(target) {
+ var $target = $(target),
+ target_id = $target.attr('id'),
+ inst = $.data(target, PROP_NAME);
+
+ if (!$target.hasClass(this.markerClassName)) {
+ return;
+ }
+ var nodeName = target.nodeName.toLowerCase();
+ if (nodeName == 'input') {
+ target.disabled = false;
+ inst.trigger.filter('button').
+ each(function() { this.disabled = false; }).end();
+ }
+ else if (nodeName == 'div' || nodeName == 'span') {
+ var inline = $target.children('.' + this._inlineClass);
+ inline.children().removeClass('ui-state-disabled');
+ }
+ this._disabledInputs = $.map(this._disabledInputs,
+ function(value) { return (value == target_id ? null : value); }); // delete entry
+ },
+
+ /* Disable the time picker to a jQuery selection.
+ @param target element - the target input field or division or span */
+ _disableTimepicker: function(target) {
+ var $target = $(target);
+ var inst = $.data(target, PROP_NAME);
+ if (!$target.hasClass(this.markerClassName)) {
+ return;
+ }
+ var nodeName = target.nodeName.toLowerCase();
+ if (nodeName == 'input') {
+ target.disabled = true;
+
+ inst.trigger.filter('button').
+ each(function() { this.disabled = true; }).end();
+
+ }
+ else if (nodeName == 'div' || nodeName == 'span') {
+ var inline = $target.children('.' + this._inlineClass);
+ inline.children().addClass('ui-state-disabled');
+ }
+ this._disabledInputs = $.map(this._disabledInputs,
+ function(value) { return (value == target ? null : value); }); // delete entry
+ this._disabledInputs[this._disabledInputs.length] = $target.attr('id');
+ },
+
+ /* Is the first field in a jQuery collection disabled as a timepicker?
+ @param target_id element - the target input field or division or span
+ @return boolean - true if disabled, false if enabled */
+ _isDisabledTimepicker: function (target_id) {
+ if ( ! target_id) { return false; }
+ for (var i = 0; i < this._disabledInputs.length; i++) {
+ if (this._disabledInputs[i] == target_id) { return true; }
+ }
+ return false;
+ },
+
+ /* Check positioning to remain on screen. */
+ _checkOffset: function (inst, offset, isFixed) {
+ var tpWidth = inst.tpDiv.outerWidth();
+ var tpHeight = inst.tpDiv.outerHeight();
+ var inputWidth = inst.input ? inst.input.outerWidth() : 0;
+ var inputHeight = inst.input ? inst.input.outerHeight() : 0;
+ var viewWidth = document.documentElement.clientWidth + $(document).scrollLeft();
+ var viewHeight = document.documentElement.clientHeight + $(document).scrollTop();
+
+ offset.left -= (this._get(inst, 'isRTL') ? (tpWidth - inputWidth) : 0);
+ offset.left -= (isFixed && offset.left == inst.input.offset().left) ? $(document).scrollLeft() : 0;
+ offset.top -= (isFixed && offset.top == (inst.input.offset().top + inputHeight)) ? $(document).scrollTop() : 0;
+
+ // now check if datepicker is showing outside window viewport - move to a better place if so.
+ offset.left -= Math.min(offset.left, (offset.left + tpWidth > viewWidth && viewWidth > tpWidth) ?
+ Math.abs(offset.left + tpWidth - viewWidth) : 0);
+ offset.top -= Math.min(offset.top, (offset.top + tpHeight > viewHeight && viewHeight > tpHeight) ?
+ Math.abs(tpHeight + inputHeight) : 0);
+
+ return offset;
+ },
+
+ /* Find an object's position on the screen. */
+ _findPos: function (obj) {
+ var inst = this._getInst(obj);
+ var isRTL = this._get(inst, 'isRTL');
+ while (obj && (obj.type == 'hidden' || obj.nodeType != 1)) {
+ obj = obj[isRTL ? 'previousSibling' : 'nextSibling'];
+ }
+ var position = $(obj).offset();
+ return [position.left, position.top];
+ },
+
+ /* Retrieve the size of left and top borders for an element.
+ @param elem (jQuery object) the element of interest
+ @return (number[2]) the left and top borders */
+ _getBorders: function (elem) {
+ var convert = function (value) {
+ return { thin: 1, medium: 2, thick: 3}[value] || value;
+ };
+ return [parseFloat(convert(elem.css('border-left-width'))),
+ parseFloat(convert(elem.css('border-top-width')))];
+ },
+
+
+ /* Close time picker if clicked elsewhere. */
+ _checkExternalClick: function (event) {
+ if (!$.timepicker._curInst) { return; }
+ var $target = $(event.target);
+ if ($target[0].id != $.timepicker._mainDivId &&
+ $target.parents('#' + $.timepicker._mainDivId).length == 0 &&
+ !$target.hasClass($.timepicker.markerClassName) &&
+ !$target.hasClass($.timepicker._triggerClass) &&
+ $.timepicker._timepickerShowing && !($.timepicker._inDialog && $.blockUI))
+ $.timepicker._hideTimepicker();
+ },
+
+ /* Hide the time picker from view.
+ @param input element - the input field attached to the time picker */
+ _hideTimepicker: function (input) {
+ var inst = this._curInst;
+ if (!inst || (input && inst != $.data(input, PROP_NAME))) { return; }
+ if (this._timepickerShowing) {
+ var showAnim = this._get(inst, 'showAnim');
+ var duration = this._get(inst, 'duration');
+ var postProcess = function () {
+ $.timepicker._tidyDialog(inst);
+ this._curInst = null;
+ };
+ if ($.effects && $.effects[showAnim]) {
+ inst.tpDiv.hide(showAnim, $.timepicker._get(inst, 'showOptions'), duration, postProcess);
+ }
+ else {
+ inst.tpDiv[(showAnim == 'slideDown' ? 'slideUp' :
+ (showAnim == 'fadeIn' ? 'fadeOut' : 'hide'))]((showAnim ? duration : null), postProcess);
+ }
+ if (!showAnim) { postProcess(); }
+ var onClose = this._get(inst, 'onClose');
+ if (onClose) {
+ onClose.apply(
+ (inst.input ? inst.input[0] : null),
+ [(inst.input ? inst.input.val() : ''), inst]); // trigger custom callback
+ }
+ this._timepickerShowing = false;
+ this._lastInput = null;
+ if (this._inDialog) {
+ this._dialogInput.css({ position: 'absolute', left: '0', top: '-100px' });
+ if ($.blockUI) {
+ $.unblockUI();
+ $('body').append(this.tpDiv);
+ }
+ }
+ this._inDialog = false;
+ }
+ },
+
+
+
+ /* Tidy up after a dialog display. */
+ _tidyDialog: function (inst) {
+ inst.tpDiv.removeClass(this._dialogClass).unbind('.ui-timepicker');
+ },
+
+ /* Retrieve the instance data for the target control.
+ @param target element - the target input field or division or span
+ @return object - the associated instance data
+ @throws error if a jQuery problem getting data */
+ _getInst: function (target) {
+ try {
+ return $.data(target, PROP_NAME);
+ }
+ catch (err) {
+ throw 'Missing instance data for this timepicker';
+ }
+ },
+
+ /* Get a setting value, defaulting if necessary. */
+ _get: function (inst, name) {
+ return inst.settings[name] !== undefined ?
+ inst.settings[name] : this._defaults[name];
+ },
+
+ /* Parse existing time and initialise time picker. */
+ _setTimeFromField: function (inst) {
+ if (inst.input.val() == inst.lastVal) { return; }
+ var defaultTime = this._get(inst, 'defaultTime');
+
+ var timeToParse = defaultTime == 'now' ? this._getCurrentTimeRounded(inst) : defaultTime;
+ if ((inst.inline == false) && (inst.input.val() != '')) { timeToParse = inst.input.val() }
+
+ if (timeToParse instanceof Date) {
+ inst.hours = timeToParse.getHours();
+ inst.minutes = timeToParse.getMinutes();
+ } else {
+ var timeVal = inst.lastVal = timeToParse;
+ if (timeToParse == '') {
+ inst.hours = -1;
+ inst.minutes = -1;
+ } else {
+ var time = this.parseTime(inst, timeVal);
+ inst.hours = time.hours;
+ inst.minutes = time.minutes;
+ }
+ }
+
+
+ $.timepicker._updateTimepicker(inst);
+ },
+
+ /* Update or retrieve the settings for an existing time picker.
+ @param target element - the target input field or division or span
+ @param name object - the new settings to update or
+ string - the name of the setting to change or retrieve,
+ when retrieving also 'all' for all instance settings or
+ 'defaults' for all global defaults
+ @param value any - the new value for the setting
+ (omit if above is an object or to retrieve a value) */
+ _optionTimepicker: function(target, name, value) {
+ var inst = this._getInst(target);
+ if (arguments.length == 2 && typeof name == 'string') {
+ return (name == 'defaults' ? $.extend({}, $.timepicker._defaults) :
+ (inst ? (name == 'all' ? $.extend({}, inst.settings) :
+ this._get(inst, name)) : null));
+ }
+ var settings = name || {};
+ if (typeof name == 'string') {
+ settings = {};
+ settings[name] = value;
+ }
+ if (inst) {
+ if (this._curInst == inst) {
+ this._hideTimepicker();
+ }
+ extendRemove(inst.settings, settings);
+ this._updateTimepicker(inst);
+ }
+ },
+
+
+ /* Set the time for a jQuery selection.
+ @param target element - the target input field or division or span
+ @param time String - the new time */
+ _setTimeTimepicker: function(target, time) {
+ var inst = this._getInst(target);
+ if (inst) {
+ this._setTime(inst, time);
+ this._updateTimepicker(inst);
+ this._updateAlternate(inst, time);
+ }
+ },
+
+ /* Set the time directly. */
+ _setTime: function(inst, time, noChange) {
+ var origHours = inst.hours;
+ var origMinutes = inst.minutes;
+ var time = this.parseTime(inst, time);
+ inst.hours = time.hours;
+ inst.minutes = time.minutes;
+
+ if ((origHours != inst.hours || origMinutes != inst.minuts) && !noChange) {
+ inst.input.trigger('change');
+ }
+ this._updateTimepicker(inst);
+ this._updateSelectedValue(inst);
+ },
+
+ /* Return the current time, ready to be parsed, rounded to the closest 5 minute */
+ _getCurrentTimeRounded: function (inst) {
+ var currentTime = new Date(),
+ currentMinutes = currentTime.getMinutes(),
+ // round to closest 5
+ adjustedMinutes = Math.round( currentMinutes / 5 ) * 5;
+ currentTime.setMinutes(adjustedMinutes);
+ return currentTime;
+ },
+
+ /*
+ * Parse a time string into hours and minutes
+ */
+ parseTime: function (inst, timeVal) {
+ var retVal = new Object();
+ retVal.hours = -1;
+ retVal.minutes = -1;
+
+ var timeSeparator = this._get(inst, 'timeSeparator'),
+ amPmText = this._get(inst, 'amPmText'),
+ showHours = this._get(inst, 'showHours'),
+ showMinutes = this._get(inst, 'showMinutes'),
+ optionalMinutes = this._get(inst, 'optionalMinutes'),
+ showPeriod = (this._get(inst, 'showPeriod') == true),
+ p = timeVal.indexOf(timeSeparator);
+
+ // check if time separator found
+ if (p != -1) {
+ retVal.hours = parseInt(timeVal.substr(0, p), 10);
+ retVal.minutes = parseInt(timeVal.substr(p + 1), 10);
+ }
+ // check for hours only
+ else if ( (showHours) && ( !showMinutes || optionalMinutes ) ) {
+ retVal.hours = parseInt(timeVal, 10);
+ }
+ // check for minutes only
+ else if ( ( ! showHours) && (showMinutes) ) {
+ retVal.minutes = parseInt(timeVal, 10);
+ }
+
+ if (showHours) {
+ var timeValUpper = timeVal.toUpperCase();
+ if ((retVal.hours < 12) && (showPeriod) && (timeValUpper.indexOf(amPmText[1].toUpperCase()) != -1)) {
+ retVal.hours += 12;
+ }
+ // fix for 12 AM
+ if ((retVal.hours == 12) && (showPeriod) && (timeValUpper.indexOf(amPmText[0].toUpperCase()) != -1)) {
+ retVal.hours = 0;
+ }
+ }
+
+ return retVal;
+ },
+
+ selectNow: function(e) {
+
+ var id = $(e.target).attr("data-timepicker-instance-id"),
+ $target = $(id),
+ inst = this._getInst($target[0]);
+
+ //if (!inst || (input && inst != $.data(input, PROP_NAME))) { return; }
+ var currentTime = new Date();
+ inst.hours = currentTime.getHours();
+ inst.minutes = currentTime.getMinutes();
+ this._updateSelectedValue(inst);
+ this._updateTimepicker(inst);
+ this._hideTimepicker();
+ },
+
+ deselectTime: function(e) {
+ var id = $(e.target).attr("data-timepicker-instance-id"),
+ $target = $(id),
+ inst = this._getInst($target[0]);
+ inst.hours = -1;
+ inst.minutes = -1;
+ this._updateSelectedValue(inst);
+ this._hideTimepicker();
+ },
+
+
+ selectHours: function (event) {
+ var $td = $(event.currentTarget),
+ id = $td.attr("data-timepicker-instance-id"),
+ newHours = $td.attr("data-hour"),
+ fromDoubleClick = event.data.fromDoubleClick,
+ $target = $(id),
+ inst = this._getInst($target[0]),
+ showMinutes = (this._get(inst, 'showMinutes') == true);
+
+ // don't select if disabled
+ if ( $.timepicker._isDisabledTimepicker($target.attr('id')) ) { return false }
+
+ $td.parents('.ui-timepicker-hours:first').find('a').removeClass('ui-state-active');
+ $td.children('a').addClass('ui-state-active');
+ inst.hours = newHours;
+
+ // added for onMinuteShow callback
+ var onMinuteShow = this._get(inst, 'onMinuteShow');
+ if (onMinuteShow) {
+ // this will trigger a callback on selected hour to make sure selected minute is allowed.
+ this._updateMinuteDisplay(inst);
+ }
+
+ this._updateSelectedValue(inst);
+
+ inst._hoursClicked = true;
+ if ((inst._minutesClicked) || (fromDoubleClick) || (showMinutes == false)) {
+ $.timepicker._hideTimepicker();
+ }
+ // return false because if used inline, prevent the url to change to a hashtag
+ return false;
+ },
+
+ selectMinutes: function (event) {
+ var $td = $(event.currentTarget),
+ id = $td.attr("data-timepicker-instance-id"),
+ newMinutes = $td.attr("data-minute"),
+ fromDoubleClick = event.data.fromDoubleClick,
+ $target = $(id),
+ inst = this._getInst($target[0]),
+ showHours = (this._get(inst, 'showHours') == true);
+
+ // don't select if disabled
+ if ( $.timepicker._isDisabledTimepicker($target.attr('id')) ) { return false }
+
+ $td.parents('.ui-timepicker-minutes:first').find('a').removeClass('ui-state-active');
+ $td.children('a').addClass('ui-state-active');
+
+ inst.minutes = newMinutes;
+ this._updateSelectedValue(inst);
+
+ inst._minutesClicked = true;
+ if ((inst._hoursClicked) || (fromDoubleClick) || (showHours == false)) {
+ $.timepicker._hideTimepicker();
+ // return false because if used inline, prevent the url to change to a hashtag
+ return false;
+ }
+
+ // return false because if used inline, prevent the url to change to a hashtag
+ return false;
+ },
+
+ _updateSelectedValue: function (inst) {
+ var newTime = this._getParsedTime(inst);
+ if (inst.input) {
+ inst.input.val(newTime);
+ inst.input.trigger('change');
+ }
+ var onSelect = this._get(inst, 'onSelect');
+ if (onSelect) { onSelect.apply((inst.input ? inst.input[0] : null), [newTime, inst]); } // trigger custom callback
+ this._updateAlternate(inst, newTime);
+ return newTime;
+ },
+
+ /* this function process selected time and return it parsed according to instance options */
+ _getParsedTime: function(inst) {
+
+ if (inst.hours == -1 && inst.minutes == -1) {
+ return '';
+ }
+
+ if ((inst.hours < 0) || (inst.hours > 23)) { inst.hours = 12; }
+ if ((inst.minutes < 0) || (inst.minutes > 59)) { inst.minutes = 0; }
+
+ var period = "",
+ showPeriod = (this._get(inst, 'showPeriod') == true),
+ showLeadingZero = (this._get(inst, 'showLeadingZero') == true),
+ showHours = (this._get(inst, 'showHours') == true),
+ showMinutes = (this._get(inst, 'showMinutes') == true),
+ optionalMinutes = (this._get(inst, 'optionalMinutes') == true),
+ amPmText = this._get(inst, 'amPmText'),
+ selectedHours = inst.hours ? inst.hours : 0,
+ selectedMinutes = inst.minutes ? inst.minutes : 0,
+ displayHours = selectedHours ? selectedHours : 0,
+ parsedTime = '';
+
+ if (showPeriod) {
+ if (inst.hours == 0) {
+ displayHours = 12;
+ }
+ if (inst.hours < 12) {
+ period = amPmText[0];
+ }
+ else {
+ period = amPmText[1];
+ if (displayHours > 12) {
+ displayHours -= 12;
+ }
+ }
+ }
+
+ var h = displayHours.toString();
+ if (showLeadingZero && (displayHours < 10)) { h = '0' + h; }
+
+ var m = selectedMinutes.toString();
+ if (selectedMinutes < 10) { m = '0' + m; }
+
+ if (showHours) {
+ parsedTime += h;
+ }
+ if (showHours && showMinutes && (!optionalMinutes || m != 0)) {
+ parsedTime += this._get(inst, 'timeSeparator');
+ }
+ if (showMinutes && (!optionalMinutes || m != 0)) {
+ parsedTime += m;
+ }
+ if (showHours) {
+ if (period.length > 0) { parsedTime += this._get(inst, 'periodSeparator') + period; }
+ }
+
+ return parsedTime;
+ },
+
+ /* Update any alternate field to synchronise with the main field. */
+ _updateAlternate: function(inst, newTime) {
+ var altField = this._get(inst, 'altField');
+ if (altField) { // update alternate field too
+ $(altField).each(function(i,e) {
+ $(e).val(newTime);
+ });
+ }
+ },
+
+ /* This might look unused but it's called by the $.fn.timepicker function with param getTime */
+ /* added v 0.2.3 - gitHub issue #5 - Thanks edanuff */
+ _getTimeTimepicker : function(input) {
+ var inst = this._getInst(input);
+ return this._getParsedTime(inst);
+ },
+ _getHourTimepicker: function(input) {
+ var inst = this._getInst(input);
+ if ( inst == undefined) { return -1; }
+ return inst.hours;
+ },
+ _getMinuteTimepicker: function(input) {
+ var inst= this._getInst(input);
+ if ( inst == undefined) { return -1; }
+ return inst.minutes;
+ }
+
+ });
+
+
+
+ /* Invoke the timepicker functionality.
+ @param options string - a command, optionally followed by additional parameters or
+ Object - settings for attaching new timepicker functionality
+ @return jQuery object */
+ $.fn.timepicker = function (options) {
+
+ /* Initialise the time picker. */
+ if (!$.timepicker.initialized) {
+ $(document).mousedown($.timepicker._checkExternalClick).
+ find('body').append($.timepicker.tpDiv);
+ $.timepicker.initialized = true;
+ }
+
+ var otherArgs = Array.prototype.slice.call(arguments, 1);
+ if (typeof options == 'string' && (options == 'getTime' || options == 'getHour' || options == 'getMinute' ))
+ return $.timepicker['_' + options + 'Timepicker'].
+ apply($.timepicker, [this[0]].concat(otherArgs));
+ if (options == 'option' && arguments.length == 2 && typeof arguments[1] == 'string')
+ return $.timepicker['_' + options + 'Timepicker'].
+ apply($.timepicker, [this[0]].concat(otherArgs));
+ return this.each(function () {
+ typeof options == 'string' ?
+ $.timepicker['_' + options + 'Timepicker'].
+ apply($.timepicker, [this].concat(otherArgs)) :
+ $.timepicker._attachTimepicker(this, options);
+ });
+ };
+
+ /* jQuery extend now ignores nulls! */
+ function extendRemove(target, props) {
+ $.extend(target, props);
+ for (var name in props)
+ if (props[name] == null || props[name] == undefined)
+ target[name] = props[name];
+ return target;
+ };
+
+ $.timepicker = new Timepicker(); // singleton instance
+ $.timepicker.initialized = false;
+ $.timepicker.uuid = new Date().getTime();
+ $.timepicker.version = "0.2.9";
+
+ // Workaround for #4055
+ // Add another global to avoid noConflict issues with inline event handlers
+ window['TP_jQuery_' + tpuuid] = $;
+
+})(jQuery);
diff --git a/3rdparty/timepicker/releases.txt b/3rdparty/timepicker/releases.txt
new file mode 100644
index 00000000000..64622d49429
--- /dev/null
+++ b/3rdparty/timepicker/releases.txt
@@ -0,0 +1,105 @@
+Release 0.2.9 - November 13, 2011
+Fixed the zIndex problem and removed the zIndex option (Thanks everyone who reported the problem)
+Fix a bug where repeatedly clicking on hour cells made the timepicker very slow.
+Added Italian translation, thanks to Serge Margarita.
+
+Release 0.2.8 - November 5, 2011
+Updated "defaultTime" to allow for Date object (github issue #26)
+Fixed the now and deselect buttons in IE
+
+Release 0.2.7 - October 19, 2011
+Added option to omit minutes in parsed time when user select 0 for minutes. (Thanks tribalvibes, Github issue #23)
+Added support for internationalisation (fr, de and ja, Thanks Bernd Plagge).
+
+Release 0.2.6 - October 12, 2011
+Fixed a bug when input ID have more then one special char. (Thamks Jacqueline Krijnen)
+Fixed a bug when parsing hours only or minutes only time. (Thanks protron, github issue #20 )
+Added 'Now', 'Deselect' and 'Close' buttons. (Thanks Christian Grobmeier for the close button code, github issue #22 )
+
+Release 0.2.5 - September 13, 2011
+Added support for disable and enable. (Suggested by danielrex, github issue #17)
+Added an example for 2 timepicker to behave as a period selector (start time and end time). (Thanks Bill Pellowe)
+Renamed the stylesheet to jquery.ui.timepicker.css to be more consistent with jQuery UI file name convention.
+
+Release 0.2.4 - August 5, 2011
+Fixed the hand cursor in the css file. (Thanks Mike Neumegen)
+Added position option to use with the jquery ui position utility.
+Added option to display only hours or only minutes.
+
+Release 0.2.3 - July 11, 2011
+Fix github issue #3 : Bug when hours or minutes choices does not divide by number of rows (thanks wukimus)
+Changed default behavior of the defaultTime option, if set to '' and input is empty, there will be no highlighted time in the popup (Thanks Rasmus Schultz)
+Fix github issue #4 : Error when generating empty minute cell. (Thanks 123Haynes)
+Fix github issue #5 : Add functionality for "getTime" option. (Thanks edanuff)
+Added the periodSeparator option. (thanks jrchamp)
+Fixed "getTime" for inline timepickers. (thanks Mike Neumegen)
+Added "getHour" and "getMinute" to get individual values.
+
+Release 0.2.2 - June 16, 2011
+Fixed a "console.log" line that I forgot to remove before release 0.2.1
+
+Release 0.2.1 - June 12, 2011
+Timepicker does not give the focus back to the input any more after time selection. This is similar to the datepicker behaviour and is more natural to the user because it shows the dialog again when the user click on the input again, as expected.
+Added options to customize the hours and minutes ranges and interval for more customization.
+
+Release 0.2 - May 28, 2011
+So in the previous release I mixed up versions and lost some changes, I guess that's what happen when you drink and code.
+
+Release 0.1.2 - May 26, 2011
+Fixed a bug with inline timepickers that would append a #timepickr hashtag when selecting hours and minutes.
+Fixed z-index problem with IE6 (Thanks Graham Bentley)
+Added selection of highlighted text when enter is pressed on the input field (Thanks Glen Chiacchieri)
+Adjusted some focus problems, now the input gets the focus back when the used click on hours / minutes.
+
+Release 0.1.something aka the lost release - around April 11
+Fixed a bug for when input Id had a dot in it, it was getting double escaped when it should not. (Thanks Zdenek Machac)
+So in 0.1.1 I created a bug that made timepicker changes the location hash, well now it's fixed. (Thanks Lucas Falk)
+
+Release 0.1.1 - April 6, 2011
+Changed the cells click and dblclick binding for faster rendering in IE6/7 (Thanks Blair Parsons)
+Fixed a class naming bug created in 0.1.0 (Thanks Morlion Peter)
+
+Release 0.1.0 - March 23, 2011
+Fixed some bugs with release 0.0.9
+
+Release 0.0.9 - March 22, 2011
+Added zIndex option (Thanks Frank Enderle)
+Added option showPeriodLabels that defines if the AM/PM labels are displayed on the left (Thanks Frank Enderle)
+Added showOn ['focus'|'button'|'both'] and button options for alternate trigger method
+
+Release 0.0.8 - Fev 17, 2011
+Fixed close event not triggered when switching to another input with time picker (thanks Stuart Gregg)
+
+Release 0.0.7 - Fev 10, 2011
+Added function to set time after initialisation :$('#timepicker').timepicker('setTime',newTime);
+Added support for disabled period of time : onHourShow and onMinuteShow (thanks Rene Felgentr�ger)
+
+Release 0.0.6 - Jan 19, 2011
+Added standard "change" event being triggered on the input when the content changes. (Thanks Rasmus Schultz)
+Added support for inline timePicker, attached to div or span
+Added altField that receive the parsed time value when selected time changes
+Added defaultTime value to use when input field is missing (inline) or input value is empty
+ if defaultTime is missing, current time is used
+
+Release 0.0.5 - Jan 18, 2011
+Now updating time picker selected value when manually typing in the text field (thanks Rasmus Schultz)
+Fixed : with showPeriod: true and showLeadingZero: true, PM hours did not show leading zeros (thanks Chandler May)
+Fixed : with showPeriod: true and showLeadingZero: true, Selecting 12 AM shows as 00 AM in the input field, also parsing 12AM did not work correctly (thanks Rasmus Schultz)
+
+Release 0.0.4 - jan 10, 2011
+changed showLeadingZero to affect only hours, added showMinutesLeadingZero for minutes display
+Removed width:100% for tables in css
+
+Release 0.0.3 - Jan 8, 2011
+Re-added a display:none on the main div (fix a small empty div visible at the bottom of the page before timepicker is called) (Thanks Gertjan van Roekel)
+Fixed a problem where the timepicker was never displayed with jquery ui 1.8.7 css,
+ the problem was the class ui-helper-hidden-accessible, witch I removed.
+ Thanks Alexander Fietz and StackOverflow : http://stackoverflow.com/questions/4522274/jquery-timepicker-and-jqueryui-1-8-7-conflict
+
+Release 0.0.2 - Jan 6, 2011
+Updated to include common display options for USA users
+Stephen Commisso - Jan 2011
+
+As it is a timepicker, I inspired most of the code from the datepicker
+Francois Gelinas - Nov 2010
+
diff --git a/3rdparty/when/MIT-LICENSE.txt b/3rdparty/when/MIT-LICENSE.txt
new file mode 100644
index 00000000000..b4429c89ac1
--- /dev/null
+++ b/3rdparty/when/MIT-LICENSE.txt
@@ -0,0 +1,9 @@
+License
+
+Copyright (c) 2010 Thomas Planer
+
+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.
\ No newline at end of file
diff --git a/3rdparty/when/When.php b/3rdparty/when/When.php
new file mode 100755
index 00000000000..d54f296ed61
--- /dev/null
+++ b/3rdparty/when/When.php
@@ -0,0 +1,731 @@
+
+ * Location: http://github.com/tplaner/When
+ * Created: September 2010
+ * Description: Determines the next date of recursion given an iCalendar "rrule" like pattern.
+ * Requirements: PHP 5.3+ - makes extensive use of the Date and Time library (http://us2.php.net/manual/en/book.datetime.php)
+ */
+class When
+{
+ protected $frequency;
+
+ protected $start_date;
+ protected $try_date;
+
+ protected $end_date;
+
+ protected $gobymonth;
+ protected $bymonth;
+
+ protected $gobyweekno;
+ protected $byweekno;
+
+ protected $gobyyearday;
+ protected $byyearday;
+
+ protected $gobymonthday;
+ protected $bymonthday;
+
+ protected $gobyday;
+ protected $byday;
+
+ protected $gobysetpos;
+ protected $bysetpos;
+
+ protected $suggestions;
+
+ protected $count;
+ protected $counter;
+
+ protected $goenddate;
+
+ protected $interval;
+
+ protected $wkst;
+
+ protected $valid_week_days;
+ protected $valid_frequency;
+
+ /**
+ * __construct
+ */
+ public function __construct()
+ {
+ $this->frequency = null;
+
+ $this->gobymonth = false;
+ $this->bymonth = range(1,12);
+
+ $this->gobymonthday = false;
+ $this->bymonthday = range(1,31);
+
+ $this->gobyday = false;
+ // setup the valid week days (0 = sunday)
+ $this->byday = range(0,6);
+
+ $this->gobyyearday = false;
+ $this->byyearday = range(0,366);
+
+ $this->gobysetpos = false;
+ $this->bysetpos = range(1,366);
+
+ $this->gobyweekno = false;
+ // setup the range for valid weeks
+ $this->byweekno = range(0,54);
+
+ $this->suggestions = array();
+
+ // this will be set if a count() is specified
+ $this->count = 0;
+ // how many *valid* results we returned
+ $this->counter = 0;
+
+ // max date we'll return
+ $this->end_date = new DateTime('9999-12-31');
+
+ // the interval to increase the pattern by
+ $this->interval = 1;
+
+ // what day does the week start on? (0 = sunday)
+ $this->wkst = 0;
+
+ $this->valid_week_days = array('SU', 'MO', 'TU', 'WE', 'TH', 'FR', 'SA');
+
+ $this->valid_frequency = array('SECONDLY', 'MINUTELY', 'HOURLY', 'DAILY', 'WEEKLY', 'MONTHLY', 'YEARLY');
+ }
+
+ /**
+ * @param DateTime|string $start_date of the recursion - also is the first return value.
+ * @param string $frequency of the recrusion, valid frequencies: secondly, minutely, hourly, daily, weekly, monthly, yearly
+ */
+ public function recur($start_date, $frequency = "daily")
+ {
+ try
+ {
+ if(is_object($start_date))
+ {
+ $this->start_date = clone $start_date;
+ }
+ else
+ {
+ // timestamps within the RFC have a 'Z' at the end of them, remove this.
+ $start_date = trim($start_date, 'Z');
+ $this->start_date = new DateTime($start_date);
+ }
+
+ $this->try_date = clone $this->start_date;
+ }
+ catch(Exception $e)
+ {
+ throw new InvalidArgumentException('Invalid start date DateTime: ' . $e);
+ }
+
+ $this->freq($frequency);
+
+ return $this;
+ }
+
+ public function freq($frequency)
+ {
+ if(in_array(strtoupper($frequency), $this->valid_frequency))
+ {
+ $this->frequency = strtoupper($frequency);
+ }
+ else
+ {
+ throw new InvalidArgumentException('Invalid frequency type.');
+ }
+
+ return $this;
+ }
+
+ // accepts an rrule directly
+ public function rrule($rrule)
+ {
+ // strip off a trailing semi-colon
+ $rrule = trim($rrule, ";");
+
+ $parts = explode(";", $rrule);
+
+ foreach($parts as $part)
+ {
+ list($rule, $param) = explode("=", $part);
+
+ $rule = strtoupper($rule);
+ $param = strtoupper($param);
+
+ switch($rule)
+ {
+ case "FREQ":
+ $this->frequency = $param;
+ break;
+ case "UNTIL":
+ $this->until($param);
+ break;
+ case "COUNT":
+ $this->count($param);
+ break;
+ case "INTERVAL":
+ $this->interval($param);
+ break;
+ case "BYDAY":
+ $params = explode(",", $param);
+ $this->byday($params);
+ break;
+ case "BYMONTHDAY":
+ $params = explode(",", $param);
+ $this->bymonthday($params);
+ break;
+ case "BYYEARDAY":
+ $params = explode(",", $param);
+ $this->byyearday($params);
+ break;
+ case "BYWEEKNO":
+ $params = explode(",", $param);
+ $this->byweekno($params);
+ break;
+ case "BYMONTH":
+ $params = explode(",", $param);
+ $this->bymonth($params);
+ break;
+ case "BYSETPOS":
+ $params = explode(",", $param);
+ $this->bysetpos($params);
+ break;
+ case "WKST":
+ $this->wkst($param);
+ break;
+ }
+ }
+
+ return $this;
+ }
+
+ //max number of items to return based on the pattern
+ public function count($count)
+ {
+ $this->count = (int)$count;
+
+ return $this;
+ }
+
+ // how often the recurrence rule repeats
+ public function interval($interval)
+ {
+ $this->interval = (int)$interval;
+
+ return $this;
+ }
+
+ // starting day of the week
+ public function wkst($day)
+ {
+ switch($day)
+ {
+ case 'SU':
+ $this->wkst = 0;
+ break;
+ case 'MO':
+ $this->wkst = 1;
+ break;
+ case 'TU':
+ $this->wkst = 2;
+ break;
+ case 'WE':
+ $this->wkst = 3;
+ break;
+ case 'TH':
+ $this->wkst = 4;
+ break;
+ case 'FR':
+ $this->wkst = 5;
+ break;
+ case 'SA':
+ $this->wkst = 6;
+ break;
+ }
+
+ return $this;
+ }
+
+ // max date
+ public function until($end_date)
+ {
+ try
+ {
+ if(is_object($end_date))
+ {
+ $this->end_date = clone $end_date;
+ }
+ else
+ {
+ // timestamps within the RFC have a 'Z' at the end of them, remove this.
+ $end_date = trim($end_date, 'Z');
+ $this->end_date = new DateTime($end_date);
+ }
+ }
+ catch(Exception $e)
+ {
+ throw new InvalidArgumentException('Invalid end date DateTime: ' . $e);
+ }
+
+ return $this;
+ }
+
+ public function bymonth($months)
+ {
+ if(is_array($months))
+ {
+ $this->gobymonth = true;
+ $this->bymonth = $months;
+ }
+
+ return $this;
+ }
+
+ public function bymonthday($days)
+ {
+ if(is_array($days))
+ {
+ $this->gobymonthday = true;
+ $this->bymonthday = $days;
+ }
+
+ return $this;
+ }
+
+ public function byweekno($weeks)
+ {
+ $this->gobyweekno = true;
+
+ if(is_array($weeks))
+ {
+ $this->byweekno = $weeks;
+ }
+
+ return $this;
+ }
+
+ public function bysetpos($days)
+ {
+ $this->gobysetpos = true;
+
+ if(is_array($days))
+ {
+ $this->bysetpos = $days;
+ }
+
+ return $this;
+ }
+
+ public function byday($days)
+ {
+ $this->gobyday = true;
+
+ if(is_array($days))
+ {
+ $this->byday = array();
+ foreach($days as $day)
+ {
+ $len = strlen($day);
+
+ $as = '+';
+
+ // 0 mean no occurence is set
+ $occ = 0;
+
+ if($len == 3)
+ {
+ $occ = substr($day, 0, 1);
+ }
+ if($len == 4)
+ {
+ $as = substr($day, 0, 1);
+ $occ = substr($day, 1, 1);
+ }
+
+ if($as == '-')
+ {
+ $occ = '-' . $occ;
+ }
+ else
+ {
+ $occ = '+' . $occ;
+ }
+
+ $day = substr($day, -2, 2);
+ switch($day)
+ {
+ case 'SU':
+ $this->byday[] = $occ . 'SU';
+ break;
+ case 'MO':
+ $this->byday[] = $occ . 'MO';
+ break;
+ case 'TU':
+ $this->byday[] = $occ . 'TU';
+ break;
+ case 'WE':
+ $this->byday[] = $occ . 'WE';
+ break;
+ case 'TH':
+ $this->byday[] = $occ . 'TH';
+ break;
+ case 'FR':
+ $this->byday[] = $occ . 'FR';
+ break;
+ case 'SA':
+ $this->byday[] = $occ . 'SA';
+ break;
+ }
+ }
+ }
+
+ return $this;
+ }
+
+ public function byyearday($days)
+ {
+ $this->gobyyearday = true;
+
+ if(is_array($days))
+ {
+ $this->byyearday = $days;
+ }
+
+ return $this;
+ }
+
+ // this creates a basic list of dates to "try"
+ protected function create_suggestions()
+ {
+ switch($this->frequency)
+ {
+ case "YEARLY":
+ $interval = 'year';
+ break;
+ case "MONTHLY":
+ $interval = 'month';
+ break;
+ case "WEEKLY":
+ $interval = 'week';
+ break;
+ case "DAILY":
+ $interval = 'day';
+ break;
+ case "HOURLY":
+ $interval = 'hour';
+ break;
+ case "MINUTELY":
+ $interval = 'minute';
+ break;
+ case "SECONDLY":
+ $interval = 'second';
+ break;
+ }
+
+ $month_day = $this->try_date->format('j');
+ $month = $this->try_date->format('n');
+ $year = $this->try_date->format('Y');
+
+ $timestamp = $this->try_date->format('H:i:s');
+
+ if($this->gobysetpos)
+ {
+ if($this->try_date == $this->start_date)
+ {
+ $this->suggestions[] = clone $this->try_date;
+ }
+ else
+ {
+ if($this->gobyday)
+ {
+ foreach($this->bysetpos as $_pos)
+ {
+ $tmp_array = array();
+ $_mdays = range(1, date('t',mktime(0,0,0,$month,1,$year)));
+ foreach($_mdays as $_mday)
+ {
+ $date_time = new DateTime($year . '-' . $month . '-' . $_mday . ' ' . $timestamp);
+
+ $occur = ceil($_mday / 7);
+
+ $day_of_week = $date_time->format('l');
+ $dow_abr = strtoupper(substr($day_of_week, 0, 2));
+
+ // set the day of the month + (positive)
+ $occur = '+' . $occur . $dow_abr;
+ $occur_zero = '+0' . $dow_abr;
+
+ // set the day of the month - (negative)
+ $total_days = $date_time->format('t') - $date_time->format('j');
+ $occur_neg = '-' . ceil(($total_days + 1)/7) . $dow_abr;
+
+ $day_from_end_of_month = $date_time->format('t') + 1 - $_mday;
+
+ if(in_array($occur, $this->byday) || in_array($occur_zero, $this->byday) || in_array($occur_neg, $this->byday))
+ {
+ $tmp_array[] = clone $date_time;
+ }
+ }
+
+ if($_pos > 0)
+ {
+ $this->suggestions[] = clone $tmp_array[$_pos - 1];
+ }
+ else
+ {
+ $this->suggestions[] = clone $tmp_array[count($tmp_array) + $_pos];
+ }
+
+ }
+ }
+ }
+ }
+ elseif($this->gobyyearday)
+ {
+ foreach($this->byyearday as $_day)
+ {
+ if($_day >= 0)
+ {
+ $_day--;
+
+ $_time = strtotime('+' . $_day . ' days', mktime(0, 0, 0, 1, 1, $year));
+ $this->suggestions[] = new Datetime(date('Y-m-d', $_time) . ' ' . $timestamp);
+ }
+ else
+ {
+ $year_day_neg = 365 + $_day;
+ $leap_year = $this->try_date->format('L');
+ if($leap_year == 1)
+ {
+ $year_day_neg = 366 + $_day;
+ }
+
+ $_time = strtotime('+' . $year_day_neg . ' days', mktime(0, 0, 0, 1, 1, $year));
+ $this->suggestions[] = new Datetime(date('Y-m-d', $_time) . ' ' . $timestamp);
+ }
+ }
+ }
+ // special case because for years you need to loop through the months too
+ elseif($this->gobyday && $interval == "year")
+ {
+ foreach($this->bymonth as $_month)
+ {
+ // this creates an array of days of the month
+ $_mdays = range(1, date('t',mktime(0,0,0,$_month,1,$year)));
+ foreach($_mdays as $_mday)
+ {
+ $date_time = new DateTime($year . '-' . $_month . '-' . $_mday . ' ' . $timestamp);
+
+ // get the week of the month (1, 2, 3, 4, 5, etc)
+ $week = $date_time->format('W');
+
+ if($date_time >= $this->start_date && in_array($week, $this->byweekno))
+ {
+ $this->suggestions[] = clone $date_time;
+ }
+ }
+ }
+ }
+ elseif($interval == "day")
+ {
+ $this->suggestions[] = clone $this->try_date;
+ }
+ elseif($interval == "week")
+ {
+ $this->suggestions[] = clone $this->try_date;
+
+ if($this->gobyday)
+ {
+ $week_day = $this->try_date->format('w');
+
+ $days_in_month = $this->try_date->format('t');
+
+ $overflow_count = 1;
+ $_day = $month_day;
+
+ $run = true;
+ while($run)
+ {
+ $_day++;
+ if($_day <= $days_in_month)
+ {
+ $tmp_date = new DateTime($year . '-' . $month . '-' . $_day . ' ' . $timestamp);
+ }
+ else
+ {
+ //$tmp_month = $month+1;
+ $tmp_date = new DateTime($year . '-' . $month . '-' . $overflow_count . ' ' . $timestamp);
+ $tmp_date->modify('+1 month');
+ $overflow_count++;
+ }
+
+ $week_day = $tmp_date->format('w');
+
+ if($this->try_date == $this->start_date)
+ {
+ if($week_day == $this->wkst)
+ {
+ $this->try_date = clone $tmp_date;
+ $this->try_date->modify('-7 days');
+ $run = false;
+ }
+ }
+
+ if($week_day != $this->wkst)
+ {
+ $this->suggestions[] = clone $tmp_date;
+ }
+ else
+ {
+ $run = false;
+ }
+ }
+ }
+ }
+ elseif($this->gobyday && $interval == "month")
+ {
+ $_mdays = range(1, date('t',mktime(0,0,0,$month,1,$year)));
+ foreach($_mdays as $_mday)
+ {
+ $date_time = new DateTime($year . '-' . $month . '-' . $_mday . ' ' . $timestamp);
+
+ // get the week of the month (1, 2, 3, 4, 5, etc)
+ $week = $date_time->format('W');
+
+ if($date_time >= $this->start_date && in_array($week, $this->byweekno))
+ {
+ $this->suggestions[] = clone $date_time;
+ }
+ }
+ }
+ elseif($this->gobymonth)
+ {
+ foreach($this->bymonth as $_month)
+ {
+ $date_time = new DateTime($year . '-' . $_month . '-' . $month_day . ' ' . $timestamp);
+
+ if($date_time >= $this->start_date)
+ {
+ $this->suggestions[] = clone $date_time;
+ }
+ }
+ }
+ else
+ {
+ $this->suggestions[] = clone $this->try_date;
+ }
+
+ if($interval == "month")
+ {
+
+ $this->try_date->modify('first day of next month');
+ if((int) date('t', $this->try_date->format('U')) > (int) $this->start_date->format('j')){
+ $this->try_date->modify('+' . (int) $this->start_date->format('j') - 1 . ' day');
+ }else{
+ $this->try_date->modify('+' . (int) date('t', $this->try_date->format('U')) - 1 . ' day');
+ }
+ }
+ else
+ {
+ $this->try_date->modify($this->interval . ' ' . $interval);
+ }
+ }
+
+ protected function valid_date($date)
+ {
+ $year = $date->format('Y');
+ $month = $date->format('n');
+ $day = $date->format('j');
+
+ $year_day = $date->format('z') + 1;
+
+ $year_day_neg = -366 + $year_day;
+ $leap_year = $date->format('L');
+ if($leap_year == 1)
+ {
+ $year_day_neg = -367 + $year_day;
+ }
+
+ // this is the nth occurence of the date
+ $occur = ceil($day / 7);
+
+ $week = $date->format('W');
+
+ $day_of_week = $date->format('l');
+ $dow_abr = strtoupper(substr($day_of_week, 0, 2));
+
+ // set the day of the month + (positive)
+ $occur = '+' . $occur . $dow_abr;
+ $occur_zero = '+0' . $dow_abr;
+
+ // set the day of the month - (negative)
+ $total_days = $date->format('t') - $date->format('j');
+ $occur_neg = '-' . ceil(($total_days + 1)/7) . $dow_abr;
+
+ $day_from_end_of_month = $date->format('t') + 1 - $day;
+
+ if(in_array($month, $this->bymonth) &&
+ (in_array($occur, $this->byday) || in_array($occur_zero, $this->byday) || in_array($occur_neg, $this->byday)) &&
+ in_array($week, $this->byweekno) &&
+ (in_array($day, $this->bymonthday) || in_array(-$day_from_end_of_month, $this->bymonthday)) &&
+ (in_array($year_day, $this->byyearday) || in_array($year_day_neg, $this->byyearday)))
+ {
+ return true;
+ }
+ else
+ {
+ return false;
+ }
+ }
+
+ // return the next valid DateTime object which matches the pattern and follows the rules
+ public function next()
+ {
+ // check the counter is set
+ if($this->count !== 0)
+ {
+ if($this->counter >= $this->count)
+ {
+ return false;
+ }
+ }
+
+ // create initial set of suggested dates
+ if(count($this->suggestions) === 0)
+ {
+ $this->create_suggestions();
+ }
+
+ // loop through the suggested dates
+ while(count($this->suggestions) > 0)
+ {
+ // get the first one on the array
+ $try_date = array_shift($this->suggestions);
+
+ // make sure the date doesn't exceed the max date
+ if($try_date > $this->end_date)
+ {
+ return false;
+ }
+
+ // make sure it falls within the allowed days
+ if($this->valid_date($try_date) === true)
+ {
+ $this->counter++;
+ return $try_date;
+ }
+ else
+ {
+ // we might be out of suggested days, so load some more
+ if(count($this->suggestions) === 0)
+ {
+ $this->create_suggestions();
+ }
+ }
+ }
+ }
+}
diff --git a/apps/admin_dependencies_chk/appinfo/app.php b/apps/admin_dependencies_chk/appinfo/app.php
new file mode 100644
index 00000000000..e2169b5dd77
--- /dev/null
+++ b/apps/admin_dependencies_chk/appinfo/app.php
@@ -0,0 +1,9 @@
+ 14,
+ 'id' => 'admin_dependencies_chk',
+ 'name' => 'Owncloud Install Info' ));
+
+OC_APP::registerAdmin('admin_dependencies_chk','settings');
diff --git a/apps/admin_dependencies_chk/appinfo/info.xml b/apps/admin_dependencies_chk/appinfo/info.xml
new file mode 100644
index 00000000000..10721ece15b
--- /dev/null
+++ b/apps/admin_dependencies_chk/appinfo/info.xml
@@ -0,0 +1,11 @@
+
+
+ admin_dependencies_chk
+ Owncloud dependencies info
+ 0.01
+ AGPL
+ Brice Maron (eMerzh)
+ 2
+ Display OwnCloud's dependencies informations (missings modules, ...)
+
+
diff --git a/apps/admin_dependencies_chk/css/style.css b/apps/admin_dependencies_chk/css/style.css
new file mode 100644
index 00000000000..30f204be7bc
--- /dev/null
+++ b/apps/admin_dependencies_chk/css/style.css
@@ -0,0 +1,9 @@
+#status_list legend { font-weight: bold; color: #888888; }
+.state > li { margin-bottom: 3px; padding-left: 0.5em; list-style-type: circle; }
+.state .state_module { font-weight:bold; text-shadow: 0 1px 0 #DDD; cursor:help;}
+
+.state_used ul, .state_used li { display:inline; }
+
+.state_ok .state_module { color: #009700; }
+.state_warning .state_module { color: #FF9B29; }
+.state_error .state_module { color: #FF3B3B; }
diff --git a/apps/admin_dependencies_chk/settings.php b/apps/admin_dependencies_chk/settings.php
new file mode 100644
index 00000000000..ce90dd604ca
--- /dev/null
+++ b/apps/admin_dependencies_chk/settings.php
@@ -0,0 +1,90 @@
+.
+ *
+ */
+$l=new OC_L10N('admin_dependencies_chk');
+$tmpl = new OC_Template( 'admin_dependencies_chk', 'settings');
+
+$modules = array();
+
+//Possible status are : ok, error, warning
+$modules[] =array(
+ 'status' => function_exists('json_encode') ? 'ok' : 'error',
+ 'part'=> 'php-json',
+ 'modules'=> array('core'),
+ 'message'=> $l->t('The php-json module is needed by the many applications for inter communications'));
+
+$modules[] =array(
+ 'status' => function_exists('curl_init') ? 'ok' : 'error',
+ 'part'=> 'php-curl',
+ 'modules'=> array('bookmarks'),
+ 'message'=> $l->t('The php-curl modude is needed to fetch the page title when adding a bookmarks'));
+
+$modules[] =array(
+ 'status' => function_exists('imagepng') ? 'ok' : 'error',
+ 'part'=> 'php-gd',
+ 'modules'=> array('gallery'),
+ 'message'=> $l->t('The php-gd module is needed to create thumbnails of your images'));
+
+$modules[] =array(
+ 'status' => function_exists("ldap_bind") ? 'ok' : 'error',
+ 'part'=> 'php-ldap',
+ 'modules'=> array('user_ldap'),
+ 'message'=> $l->t('The php-ldap module is needed connect to your ldap server'));
+
+$modules[] =array(
+ 'status' => class_exists('ZipArchive') ? 'ok' : 'warning',
+ 'part'=> 'php-zip',
+ 'modules'=> array('admin_export','core'),
+ 'message'=> $l->t('The php-zip module is needed download multiple files at once'));
+
+$modules[] =array(
+ 'status' => function_exists('mb_detect_encoding') ? 'ok' : 'error',
+ 'part'=> 'php-mb_multibyte ',
+ 'modules'=> array('core'),
+ 'message'=> $l->t('The php-mb_multibyte module is needed to manage correctly the encoding.'));
+
+$modules[] =array(
+ 'status' => function_exists('ctype_digit') ? 'ok' : 'error',
+ 'part'=> 'php-ctype',
+ 'modules'=> array('core'),
+ 'message'=> $l->t('The php-ctype module is needed validate data.'));
+
+$modules[] =array(
+ 'status' => ini_get('allow_url_fopen') == '1' ? 'ok' : 'error',
+ 'part'=> 'allow_url_fopen',
+ 'modules'=> array('core'),
+ 'message'=> $l->t('The allow_url_fopen directive of your php.ini should be set to 1 to retrieve knowledge base from OCS servers'));
+
+foreach($modules as $key => $module) {
+ $enabled = false ;
+ foreach($module['modules'] as $app) {
+ if(OC_App::isEnabled($app) || $app=='core'){
+ $enabled = true;
+ }
+ }
+ if($enabled == false) unset($modules[$key]);
+}
+
+OC_UTIL::addStyle('admin_dependencies_chk', 'style');
+$tmpl->assign( 'items', $modules );
+
+return $tmpl->fetchPage();
diff --git a/apps/admin_dependencies_chk/templates/settings.php b/apps/admin_dependencies_chk/templates/settings.php
new file mode 100644
index 00000000000..8ff27ebb187
--- /dev/null
+++ b/apps/admin_dependencies_chk/templates/settings.php
@@ -0,0 +1,16 @@
+
+ t('Dependencies status');?>
+
+
+
+
+ t('Used by :');?>
+
+
+
+
+
\ No newline at end of file
diff --git a/apps/admin_export/appinfo/info.xml b/apps/admin_export/appinfo/info.xml
index c4a2a9b398c..df8a07c2f5b 100644
--- a/apps/admin_export/appinfo/info.xml
+++ b/apps/admin_export/appinfo/info.xml
@@ -7,4 +7,5 @@
AGPL
Thomas Schmidt
2
+
diff --git a/apps/admin_export/settings.php b/apps/admin_export/settings.php
index fb069038f1e..a33c872ccf4 100644
--- a/apps/admin_export/settings.php
+++ b/apps/admin_export/settings.php
@@ -25,15 +25,15 @@ OC_Util::checkAppEnabled('admin_export');
if (isset($_POST['admin_export'])) {
$root = OC::$SERVERROOT . "/";
$zip = new ZipArchive();
- $filename = sys_get_temp_dir() . "/owncloud_export_" . date("y-m-d_H-i-s") . ".zip";
- error_log("Creating export file at: " . $filename);
+ $filename = get_temp_dir() . "/owncloud_export_" . date("y-m-d_H-i-s") . ".zip";
+ OC_Log::write('admin_export',"Creating export file at: " . $filename,OC_Log::INFO);
if ($zip->open($filename, ZIPARCHIVE::CREATE) !== TRUE) {
exit("Cannot open <$filename>\n");
}
if (isset($_POST['owncloud_system'])) {
// adding owncloud system files
- error_log("Adding owncloud system files to export");
+ OC_Log::write('admin_export',"Adding owncloud system files to export",OC_Log::INFO);
zipAddDir($root, $zip, false);
foreach (array(".git", "3rdparty", "apps", "core", "files", "l10n", "lib", "ocs", "search", "settings", "tests") as $dirname) {
zipAddDir($root . $dirname, $zip, true, basename($root) . "/");
@@ -43,7 +43,7 @@ if (isset($_POST['admin_export'])) {
if (isset($_POST['owncloud_config'])) {
// adding owncloud config
// todo: add database export
- error_log("Adding owncloud config to export");
+ OC_Log::write('admin_export',"Adding owncloud config to export",OC_Log::INFO);
zipAddDir($root . "config/", $zip, true, basename($root) . "/");
$zip->addFile($root . '/data/.htaccess', basename($root) . "/data/owncloud.db");
}
@@ -53,7 +53,7 @@ if (isset($_POST['admin_export'])) {
$zip->addFile($root . '/data/.htaccess', basename($root) . "/data/.htaccess");
$zip->addFile($root . '/data/index.html', basename($root) . "/data/index.html");
foreach (OC_User::getUsers() as $i) {
- error_log("Adding owncloud user files of $i to export");
+ OC_Log::write('admin_export',"Adding owncloud user files of $i to export",OC_Log::INFO);
zipAddDir($root . "data/" . $i, $zip, true, basename($root) . "/data/");
}
}
@@ -78,19 +78,19 @@ function zipAddDir($dir, $zip, $recursive=true, $internalDir='') {
$internalDir.=$dirname.='/';
if ($dirhandle = opendir($dir)) {
- while (false !== ( $file = readdir($dirhandle))) {
+ while (false !== ( $file = readdir($dirhandle))) {
- if (( $file != '.' ) && ( $file != '..' )) {
+ if (( $file != '.' ) && ( $file != '..' )) {
- if (is_dir($dir . '/' . $file) && $recursive) {
- zipAddDir($dir . '/' . $file, $zip, $recursive, $internalDir);
- } elseif (is_file($dir . '/' . $file)) {
- $zip->addFile($dir . '/' . $file, $internalDir . $file);
+ if (is_dir($dir . '/' . $file) && $recursive) {
+ zipAddDir($dir . '/' . $file, $zip, $recursive, $internalDir);
+ } elseif (is_file($dir . '/' . $file)) {
+ $zip->addFile($dir . '/' . $file, $internalDir . $file);
+ }
+ }
}
- }
- }
- closedir($dirhandle);
+ closedir($dirhandle);
} else {
- error_log("Was not able to open directory: " . $dir);
+ OC_Log::write('admin_export',"Was not able to open directory: " . $dir,OC_Log::ERROR);
}
}
diff --git a/apps/bookmarks/ajax/addBookmark.php b/apps/bookmarks/ajax/addBookmark.php
index 0a7cdfc9be3..45b16ae5fa6 100644
--- a/apps/bookmarks/ajax/addBookmark.php
+++ b/apps/bookmarks/ajax/addBookmark.php
@@ -33,6 +33,8 @@ OC_JSON::checkAppEnabled('bookmarks');
$CONFIG_DBTYPE = OC_Config::getValue( "dbtype", "sqlite" );
if( $CONFIG_DBTYPE == 'sqlite' or $CONFIG_DBTYPE == 'sqlite3' ){
$_ut = "strftime('%s','now')";
+} elseif($CONFIG_DBTYPE == 'pgsql') {
+ $_ut = 'date_part(\'epoch\',now())::integer';
} else {
$_ut = "UNIX_TIMESTAMP()";
}
@@ -51,7 +53,9 @@ $params=array(
OC_User::getUser()
);
$query->execute($params);
-$b_id = OC_DB::insertid();
+
+$b_id = OC_DB::insertid('*PREFIX*bookmarks');
+
if($b_id !== false) {
$query = OC_DB::prepare("
diff --git a/apps/bookmarks/ajax/editBookmark.php b/apps/bookmarks/ajax/editBookmark.php
index e205f69bf5a..35f30ebcb7a 100644
--- a/apps/bookmarks/ajax/editBookmark.php
+++ b/apps/bookmarks/ajax/editBookmark.php
@@ -33,6 +33,8 @@ OC_JSON::checkAppEnabled('bookmarks');
$CONFIG_DBTYPE = OC_Config::getValue( "dbtype", "sqlite" );
if( $CONFIG_DBTYPE == 'sqlite' or $CONFIG_DBTYPE == 'sqlite3' ){
$_ut = "strftime('%s','now')";
+} elseif($CONFIG_DBTYPE == 'pgsql') {
+ $_ut = 'date_part(\'epoch\',now())::integer';
} else {
$_ut = "UNIX_TIMESTAMP()";
}
diff --git a/apps/bookmarks/ajax/updateList.php b/apps/bookmarks/ajax/updateList.php
index f2c81256bb6..d2a5397452f 100644
--- a/apps/bookmarks/ajax/updateList.php
+++ b/apps/bookmarks/ajax/updateList.php
@@ -38,12 +38,14 @@ $filterTag = isset($_GET['tag']) ? '%' . htmlspecialchars_decode($_GET['tag']) .
if($filterTag){
$sqlFilterTag = 'HAVING tags LIKE ?';
$params[] = $filterTag;
+ if($CONFIG_DBTYPE == 'pgsql' ) {
+ $sqlFilterTag = 'HAVING array_to_string(array_agg(tag), \' \') LIKE ?';
+ }
} else {
$sqlFilterTag = '';
}
$offset = isset($_GET['page']) ? intval($_GET['page']) * 10 : 0;
-$params[] = $offset;
$sort = isset($_GET['sort']) ? ($_GET['sort']) : 'bookmarks_sorting_recent';
if($sort == 'bookmarks_sorting_clicks') {
@@ -58,26 +60,41 @@ if( $CONFIG_DBTYPE == 'sqlite' or $CONFIG_DBTYPE == 'sqlite3' ){
$_gc_separator = 'SEPARATOR \' \'';
}
-$query = OC_DB::prepare('
- SELECT id, url, title,
- CASE WHEN *PREFIX*bookmarks.id = *PREFIX*bookmarks_tags.bookmark_id
- THEN GROUP_CONCAT( tag ' .$_gc_separator. ' )
- ELSE \' \'
- END
- AS tags
- FROM *PREFIX*bookmarks
- LEFT JOIN *PREFIX*bookmarks_tags ON 1=1
- WHERE (*PREFIX*bookmarks.id = *PREFIX*bookmarks_tags.bookmark_id
- OR *PREFIX*bookmarks.id NOT IN (
- SELECT *PREFIX*bookmarks_tags.bookmark_id FROM *PREFIX*bookmarks_tags
+if($CONFIG_DBTYPE == 'pgsql' ){
+ $params[] = $offset;
+ $query = OC_DB::prepare('
+ SELECT id, url, title, array_to_string(array_agg(tag), \' \') as tags
+ FROM *PREFIX*bookmarks
+ LEFT JOIN *PREFIX*bookmarks_tags ON *PREFIX*bookmarks.id = *PREFIX*bookmarks_tags.bookmark_id
+ WHERE
+ *PREFIX*bookmarks.user_id = ?
+ GROUP BY id, url, title
+ '.$sqlFilterTag.'
+ ORDER BY *PREFIX*bookmarks.'.$sqlSort.'
+ LIMIT 10
+ OFFSET ?');
+} else {
+ $query = OC_DB::prepare('
+ SELECT id, url, title,
+ CASE WHEN *PREFIX*bookmarks.id = *PREFIX*bookmarks_tags.bookmark_id
+ THEN GROUP_CONCAT( tag ' .$_gc_separator. ' )
+ ELSE \' \'
+ END
+ AS tags
+ FROM *PREFIX*bookmarks
+ LEFT JOIN *PREFIX*bookmarks_tags ON 1=1
+ WHERE (*PREFIX*bookmarks.id = *PREFIX*bookmarks_tags.bookmark_id
+ OR *PREFIX*bookmarks.id NOT IN (
+ SELECT *PREFIX*bookmarks_tags.bookmark_id FROM *PREFIX*bookmarks_tags
+ )
)
- )
- AND *PREFIX*bookmarks.user_id = ?
- GROUP BY url
- '.$sqlFilterTag.'
- ORDER BY *PREFIX*bookmarks.'.$sqlSort.'
- LIMIT ?, 10');
-
+ AND *PREFIX*bookmarks.user_id = ?
+ GROUP BY url
+ '.$sqlFilterTag.'
+ ORDER BY *PREFIX*bookmarks.'.$sqlSort.'
+ LIMIT '.$offset.', 10');
+}
+
$bookmarks = $query->execute($params)->fetchAll();
OC_JSON::success(array('data' => $bookmarks));
diff --git a/apps/bookmarks/bookmarksHelper.php b/apps/bookmarks/bookmarksHelper.php
index 44d4235b9b3..ac512fbc241 100644
--- a/apps/bookmarks/bookmarksHelper.php
+++ b/apps/bookmarks/bookmarksHelper.php
@@ -56,6 +56,9 @@ function getURLMetadata($url) {
}
$metadata['url'] = $url;
+ if (!function_exists('curl_init')){
+ return $metadata;
+ }
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
@@ -66,4 +69,4 @@ function getURLMetadata($url) {
$metadata['title'] = htmlspecialchars_decode(@$match[1]);
return $metadata;
-}
\ No newline at end of file
+}
diff --git a/apps/calendar/ajax/activation.php b/apps/calendar/ajax/activation.php
index 89239f21759..ada2e44547b 100644
--- a/apps/calendar/ajax/activation.php
+++ b/apps/calendar/ajax/activation.php
@@ -7,11 +7,13 @@
*/
require_once ("../../../lib/base.php");
-if(!OC_USER::isLoggedIn()) {
- die("");
-}
+OC_JSON::checkLoggedIn();
OC_JSON::checkAppEnabled('calendar');
$calendarid = $_POST['calendarid'];
+$calendar = OC_Calendar_App::getCalendar($calendarid);//access check
OC_Calendar_Calendar::setCalendarActive($calendarid, $_POST['active']);
-$cal = OC_Calendar_Calendar::findCalendar($calendarid);
-echo $cal['active'];
+$calendar = OC_Calendar_App::getCalendar($calendarid);
+OC_JSON::success(array(
+ 'active' => $calendar['active'],
+ 'eventSource' => OC_Calendar_Calendar::getEventSourceInfo($calendar),
+));
diff --git a/apps/calendar/ajax/changeview.php b/apps/calendar/ajax/changeview.php
index b396ff4945b..ef05c7cd496 100644
--- a/apps/calendar/ajax/changeview.php
+++ b/apps/calendar/ajax/changeview.php
@@ -7,10 +7,9 @@
*/
require_once ("../../../lib/base.php");
-if(!OC_USER::isLoggedIn()) {
- die("");
-}
+OC_JSON::checkLoggedIn();
OC_JSON::checkAppEnabled('calendar');
$currentview = $_GET["v"];
OC_Preferences::setValue(OC_USER::getUser(), "calendar", "currentview", $currentview);
+OC_JSON::success();
?>
diff --git a/apps/calendar/ajax/choosecalendar.php b/apps/calendar/ajax/choosecalendar.php
index 0935a4c42ad..9281c8edbdc 100644
--- a/apps/calendar/ajax/choosecalendar.php
+++ b/apps/calendar/ajax/choosecalendar.php
@@ -8,9 +8,7 @@
require_once('../../../lib/base.php');
$l10n = new OC_L10N('calendar');
-if(!OC_USER::isLoggedIn()) {
- die("");
-}
+OC_JSON::checkLoggedIn();
OC_JSON::checkAppEnabled('calendar');
$output = new OC_TEMPLATE("calendar", "part.choosecalendar");
$output -> printpage();
diff --git a/apps/calendar/ajax/createcalendar.php b/apps/calendar/ajax/createcalendar.php
index 3fb2e8398a3..b719b207c74 100644
--- a/apps/calendar/ajax/createcalendar.php
+++ b/apps/calendar/ajax/createcalendar.php
@@ -8,16 +8,30 @@
require_once('../../../lib/base.php');
-$l10n = new OC_L10N('calendar');
-
// Check if we are a user
OC_JSON::checkLoggedIn();
OC_JSON::checkAppEnabled('calendar');
+if(trim($_POST['name']) == ''){
+ OC_JSON::error(array('message'=>'empty'));
+ exit;
+}
+$calendars = OC_Calendar_Calendar::allCalendars(OC_User::getUser());
+foreach($calendars as $cal){
+ if($cal['displayname'] == $_POST['name']){
+ OC_JSON::error(array('message'=>'namenotavailable'));
+ exit;
+ }
+}
+
$userid = OC_User::getUser();
$calendarid = OC_Calendar_Calendar::addCalendar($userid, $_POST['name'], 'VEVENT,VTODO,VJOURNAL', null, 0, $_POST['color']);
OC_Calendar_Calendar::setCalendarActive($calendarid, 1);
-$calendar = OC_Calendar_Calendar::findCalendar($calendarid);
+
+$calendar = OC_Calendar_Calendar::find($calendarid);
$tmpl = new OC_Template('calendar', 'part.choosecalendar.rowfields');
$tmpl->assign('calendar', $calendar);
-OC_JSON::success(array('data' => $tmpl->fetchPage()));
+OC_JSON::success(array(
+ 'page' => $tmpl->fetchPage(),
+ 'eventSource' => OC_Calendar_Calendar::getEventSourceInfo($calendar),
+));
diff --git a/apps/calendar/ajax/daysofweekend.php b/apps/calendar/ajax/daysofweekend.php
deleted file mode 100755
index 606d13b1e1c..00000000000
--- a/apps/calendar/ajax/daysofweekend.php
+++ /dev/null
@@ -1,11 +0,0 @@
-
- * This file is licensed under the Affero General Public License version 3 or
- * later.
- * See the COPYING-README file.
- */
-require_once('../../../lib/base.php');
-OC_JSON::checkLoggedIn();
-echo OC_Preferences::getValue( OC_User::getUser(), 'calendar', 'weekend', '{"Monday":"false","Tuesday":"false","Wednesday":"false","Thursday":"false","Friday":"false","Saturday":"true","Sunday":"true"}');
-?>
diff --git a/apps/calendar/ajax/deletecalendar.php b/apps/calendar/ajax/deletecalendar.php
index e8ffe0d0598..901cbbfcb08 100644
--- a/apps/calendar/ajax/deletecalendar.php
+++ b/apps/calendar/ajax/deletecalendar.php
@@ -7,19 +7,11 @@
*/
require_once('../../../lib/base.php');
-$l10n = new OC_L10N('calendar');
-
-if(!OC_USER::isLoggedIn()) {
- die('');
-}
+OC_JSON::checkLoggedIn();
OC_JSON::checkAppEnabled('calendar');
$cal = $_POST["calendarid"];
-$calendar = OC_Calendar_Calendar::findCalendar($cal);
-if($calendar["userid"] != OC_User::getUser()){
- OC_JSON::error(array('error'=>'permission_denied'));
- exit;
-}
+$calendar = OC_Calendar_App::getCalendar($cal);
$del = OC_Calendar_Calendar::deleteCalendar($cal);
if($del == true){
OC_JSON::success();
diff --git a/apps/calendar/ajax/deleteevent.php b/apps/calendar/ajax/deleteevent.php
index 9e3c7dd87dd..b25a5af1a29 100644
--- a/apps/calendar/ajax/deleteevent.php
+++ b/apps/calendar/ajax/deleteevent.php
@@ -9,23 +9,11 @@ require_once('../../../lib/base.php');
$l10n = new OC_L10N('calendar');
-if(!OC_USER::isLoggedIn()) {
- die('');
-}
+OC_JSON::checkLoggedIn();
OC_JSON::checkAppEnabled('calendar');
$id = $_POST['id'];
-$data = OC_Calendar_Object::find($id);
-if (!$data)
-{
- OC_JSON::error();
- exit;
-}
-$calendar = OC_Calendar_Calendar::findCalendar($data['calendarid']);
-if($calendar['userid'] != OC_User::getUser()){
- OC_JSON::error();
- exit;
-}
+$event_object = OC_Calendar_App::getEventObject($id);
$result = OC_Calendar_Object::delete($id);
OC_JSON::success();
?>
diff --git a/apps/calendar/ajax/duration.php b/apps/calendar/ajax/duration.php
deleted file mode 100644
index cdc41388abd..00000000000
--- a/apps/calendar/ajax/duration.php
+++ /dev/null
@@ -1,12 +0,0 @@
-
- * This file is licensed under the Affero General Public License version 3 or
- * later.
- * See the COPYING-README file.
- */
-require_once('../../../lib/base.php');
-OC_JSON::checkLoggedIn();
-$duration = OC_Preferences::getValue( OC_User::getUser(), 'calendar', 'duration', "60");
-OC_JSON::encodedPrint(array("duration" => $duration));
-?>
diff --git a/apps/calendar/ajax/editcalendar.php b/apps/calendar/ajax/editcalendar.php
index d23e5287868..7aeb5bbe305 100644
--- a/apps/calendar/ajax/editcalendar.php
+++ b/apps/calendar/ajax/editcalendar.php
@@ -7,13 +7,11 @@
*/
require_once('../../../lib/base.php');
-$l10n = new OC_L10N('calendar');
-if(!OC_USER::isLoggedIn()) {
- die("");
-}
+OC_JSON::checkLoggedIn();
OC_JSON::checkAppEnabled('calendar');
+
$calendarcolor_options = OC_Calendar_Calendar::getCalendarColorOptions();
-$calendar = OC_Calendar_Calendar::findCalendar($_GET['calendarid']);
+$calendar = OC_Calendar_App::getCalendar($_GET['calendarid']);
$tmpl = new OC_Template("calendar", "part.editcalendar");
$tmpl->assign('new', false);
$tmpl->assign('calendarcolor_options', $calendarcolor_options);
diff --git a/apps/calendar/ajax/editevent.php b/apps/calendar/ajax/editevent.php
index 3abf4de98b3..5a487da1758 100644
--- a/apps/calendar/ajax/editevent.php
+++ b/apps/calendar/ajax/editevent.php
@@ -7,12 +7,7 @@
*/
require_once('../../../lib/base.php');
-
-$l10n = new OC_L10N('calendar');
-
-if(!OC_USER::isLoggedIn()) {
- die('');
-}
+OC_JSON::checkLoggedIn();
OC_JSON::checkAppEnabled('calendar');
$errarr = OC_Calendar_Object::validateRequest($_POST);
@@ -23,19 +18,12 @@ if($errarr){
}else{
$id = $_POST['id'];
$cal = $_POST['calendar'];
- $data = OC_Calendar_Object::find($id);
- if (!$data)
- {
- OC_JSON::error();
- exit;
- }
- $calendar = OC_Calendar_Calendar::findCalendar($data['calendarid']);
- if($calendar['userid'] != OC_User::getUser()){
- OC_JSON::error();
- exit;
- }
- $vcalendar = Sabre_VObject_Reader::read($data['calendardata']);
+ $data = OC_Calendar_App::getEventObject($id);
+ $vcalendar = OC_VObject::parse($data['calendardata']);
+
+ OC_Calendar_App::isNotModified($vcalendar->VEVENT, $_POST['lastmodified']);
OC_Calendar_Object::updateVCalendarFromRequest($_POST, $vcalendar);
+
$result = OC_Calendar_Object::edit($id, $vcalendar->serialize());
if ($data['calendarid'] != $cal) {
OC_Calendar_Object::moveToCalendar($id, $cal);
diff --git a/apps/calendar/ajax/editeventform.php b/apps/calendar/ajax/editeventform.php
index 34d6c657cec..9ae3ffa8d94 100644
--- a/apps/calendar/ajax/editeventform.php
+++ b/apps/calendar/ajax/editeventform.php
@@ -8,26 +8,16 @@
require_once('../../../lib/base.php');
-$l10n = new OC_L10N('calendar');
-
if(!OC_USER::isLoggedIn()) {
die('');
}
OC_JSON::checkAppEnabled('calendar');
-$calendar_options = OC_Calendar_Calendar::allCalendars(OC_User::getUser());
-$category_options = OC_Calendar_Object::getCategoryOptions($l10n);
-$repeat_options = OC_Calendar_Object::getRepeatOptions($l10n);
-
$id = $_GET['id'];
-$data = OC_Calendar_Object::find($id);
-$calendar = OC_Calendar_Calendar::findCalendar($data['calendarid']);
-if($calendar['userid'] != OC_User::getUser()){
- echo $l10n->t('Wrong calendar');
- exit;
-}
-$object = Sabre_VObject_Reader::read($data['calendardata']);
+$data = OC_Calendar_App::getEventObject($id);
+$object = OC_VObject::parse($data['calendardata']);
$vevent = $object->VEVENT;
+
$dtstart = $vevent->DTSTART;
$dtend = OC_Calendar_Object::getDTEndFromVEvent($vevent);
switch($dtstart->getDateType()) {
@@ -49,26 +39,183 @@ switch($dtstart->getDateType()) {
break;
}
-$summary = isset($vevent->SUMMARY) ? $vevent->SUMMARY->value : '';
-$location = isset($vevent->LOCATION) ? $vevent->LOCATION->value : '';
-$categories = array();
-if (isset($vevent->CATEGORIES)){
- $categories = explode(',', $vevent->CATEGORIES->value);
- $categories = array_map('trim', $categories);
-}
+$summary = $vevent->getAsString('SUMMARY');
+$location = $vevent->getAsString('LOCATION');
+$categories = $vevent->getAsArray('CATEGORIES');
+$description = $vevent->getAsString('DESCRIPTION');
foreach($categories as $category){
if (!in_array($category, $category_options)){
array_unshift($category_options, $category);
}
}
-$repeat = isset($vevent->CATEGORY) ? $vevent->CATEGORY->value : '';
-$description = isset($vevent->DESCRIPTION) ? $vevent->DESCRIPTION->value : '';
+$last_modified = $vevent->__get('LAST-MODIFIED');
+if ($last_modified){
+ $lastmodified = $last_modified->getDateTime()->format('U');
+}else{
+ $lastmodified = 0;
+}
+if($data['repeating'] == 1){
+ $rrule = explode(';', $vevent->getAsString('RRULE'));
+ $rrulearr = array();
+ foreach($rrule as $rule){
+ list($attr, $val) = explode('=', $rule);
+ $rrulearr[$attr] = $val;
+ }
+ if(!isset($rrulearr['INTERVAL']) || $rrulearr['INTERVAL'] == ''){
+ $rrulearr['INTERVAL'] = 1;
+ }
+ if(array_key_exists('BYDAY', $rrulearr)){
+ if(substr_count($rrulearr['BYDAY'], ',') == 0){
+ if(strlen($rrulearr['BYDAY']) == 2){
+ $repeat['weekdays'] = array($rrulearr['BYDAY']);
+ }elseif(strlen($rrulearr['BYDAY']) == 3){
+ $repeat['weekofmonth'] = substr($rrulearr['BYDAY'], 0, 1);
+ $repeat['weekdays'] = array(substr($rrulearr['BYDAY'], 1, 2));
+ }elseif(strlen($rrulearr['BYDAY']) == 4){
+ $repeat['weekofmonth'] = substr($rrulearr['BYDAY'], 0, 2);
+ $repeat['weekdays'] = array(substr($rrulearr['BYDAY'], 2, 2));
+ }
+ }else{
+ $byday_days = explode(',', $rrulearr['BYDAY']);
+ foreach($byday_days as $byday_day){
+ if(strlen($byday_day) == 2){
+ $repeat['weekdays'][] = $byday_day;
+ }elseif(strlen($byday_day) == 3){
+ $repeat['weekofmonth'] = substr($byday_day , 0, 1);
+ $repeat['weekdays'][] = substr($byday_day , 1, 2);
+ }elseif(strlen($byday_day) == 4){
+ $repeat['weekofmonth'] = substr($byday_day , 0, 2);
+ $repeat['weekdays'][] = substr($byday_day , 2, 2);
+ }
+ }
+ }
+ }
+ if(array_key_exists('BYMONTHDAY', $rrulearr)){
+ if(substr_count($rrulearr['BYMONTHDAY'], ',') == 0){
+ $repeat['bymonthday'][] = $rrulearr['BYMONTHDAY'];
+ }else{
+ $bymonthdays = explode(',', $rrulearr['BYMONTHDAY']);
+ foreach($bymonthdays as $bymonthday){
+ $repeat['bymonthday'][] = $bymonthday;
+ }
+ }
+ }
+ if(array_key_exists('BYYEARDAY', $rrulearr)){
+ if(substr_count($rrulearr['BYYEARDAY'], ',') == 0){
+ $repeat['byyearday'][] = $rrulearr['BYYEARDAY'];
+ }else{
+ $byyeardays = explode(',', $rrulearr['BYYEARDAY']);
+ foreach($byyeardays as $yearday){
+ $repeat['byyearday'][] = $yearday;
+ }
+ }
+ }
+ if(array_key_exists('BYWEEKNO', $rrulearr)){
+ if(substr_count($rrulearr['BYWEEKNO'], ',') == 0){
+ $repeat['byweekno'][] = (string) $rrulearr['BYWEEKNO'];
+ }else{
+ $byweekno = explode(',', $rrulearr['BYWEEKNO']);
+ foreach($byweekno as $weekno){
+ $repeat['byweekno'][] = (string) $weekno;
+ }
+ }
+ }
+ if(array_key_exists('BYMONTH', $rrulearr)){
+ $months = OC_Calendar_App::getByMonthOptions();
+ if(substr_count($rrulearr['BYMONTH'], ',') == 0){
+ $repeat['bymonth'][] = $months[$month];
+ }else{
+ $bymonth = explode(',', $rrulearr['BYMONTH']);
+ foreach($bymonth as $month){
+ $repeat['bymonth'][] = $months[$month];
+ }
+ }
+ }
+ switch($rrulearr['FREQ']){
+ case 'DAILY':
+ $repeat['repeat'] = 'daily';
+ break;
+ case 'WEEKLY':
+ if($rrulearr['INTERVAL'] % 2 == 0){
+ $repeat['repeat'] = 'biweekly';
+ $rrulearr['INTERVAL'] = $rrulearr['INTERVAL'] / 2;
+ }elseif($rrulearr['BYDAY'] == 'MO,TU,WE,TH,FR'){
+ $repeat['repeat'] = 'weekday';
+ }else{
+ $repeat['repeat'] = 'weekly';
+ }
+ break;
+ case 'MONTHLY':
+ $repeat['repeat'] = 'monthly';
+ if(array_key_exists('BYDAY', $rrulearr)){
+ $repeat['month'] = 'weekday';
+ }else{
+ $repeat['month'] = 'monthday';
+ }
+ break;
+ case 'YEARLY':
+ $repeat['repeat'] = 'yearly';
+ if(array_key_exists('BYMONTH', $rrulearr)){
+ $repeat['year'] = 'bydaymonth';
+ }elseif(array_key_exists('BYWEEKNO', $rrulearr)){
+ $repeat['year'] = 'byweekno';
+ }else{
+ $repeat['year'] = 'byyearday';
+ }
+ }
+ $repeat['interval'] = $rrulearr['INTERVAL'];
+ if(array_key_exists('COUNT', $rrulearr)){
+ $repeat['end'] = 'count';
+ $repeat['count'] = $rrulearr['COUNT'];
+ }elseif(array_key_exists('UNTIL', $rrulearr)){
+ $repeat['end'] = 'date';
+ $endbydate_day = substr($rrulearr['UNTIL'], 6, 2);
+ $endbydate_month = substr($rrulearr['UNTIL'], 4, 2);
+ $endbydate_year = substr($rrulearr['UNTIL'], 0, 4);
+ $repeat['date'] = $endbydate_day . '-' . $endbydate_month . '-' . $endbydate_year;
+ }else{
+ $repeat['end'] = 'never';
+ }
+ if(array_key_exists('weekdays', $repeat)){
+ $repeat_weekdays_ = array();
+ $days = OC_Calendar_App::getWeeklyOptions();
+ foreach($repeat['weekdays'] as $weekday){
+ $repeat_weekdays_[] = $days[$weekday];
+ }
+ $repeat['weekdays'] = $repeat_weekdays_;
+ }
+}else{
+ $repeat['repeat'] = 'doesnotrepeat';
+}
+
+$calendar_options = OC_Calendar_Calendar::allCalendars(OC_User::getUser());
+$category_options = OC_Calendar_App::getCategoryOptions();
+$repeat_options = OC_Calendar_App::getRepeatOptions();
+$repeat_end_options = OC_Calendar_App::getEndOptions();
+$repeat_month_options = OC_Calendar_App::getMonthOptions();
+$repeat_year_options = OC_Calendar_App::getYearOptions();
+$repeat_weekly_options = OC_Calendar_App::getWeeklyOptions();
+$repeat_weekofmonth_options = OC_Calendar_App::getWeekofMonth();
+$repeat_byyearday_options = OC_Calendar_App::getByYearDayOptions();
+$repeat_bymonth_options = OC_Calendar_App::getByMonthOptions();
+$repeat_byweekno_options = OC_Calendar_App::getByWeekNoOptions();
+$repeat_bymonthday_options = OC_Calendar_App::getByMonthDayOptions();
$tmpl = new OC_Template('calendar', 'part.editevent');
$tmpl->assign('id', $id);
+$tmpl->assign('lastmodified', $lastmodified);
$tmpl->assign('calendar_options', $calendar_options);
$tmpl->assign('category_options', $category_options);
$tmpl->assign('repeat_options', $repeat_options);
+$tmpl->assign('repeat_month_options', $repeat_month_options);
+$tmpl->assign('repeat_weekly_options', $repeat_weekly_options);
+$tmpl->assign('repeat_end_options', $repeat_end_options);
+$tmpl->assign('repeat_year_options', $repeat_year_options);
+$tmpl->assign('repeat_byyearday_options', $repeat_byyearday_options);
+$tmpl->assign('repeat_bymonth_options', $repeat_bymonth_options);
+$tmpl->assign('repeat_byweekno_options', $repeat_byweekno_options);
+$tmpl->assign('repeat_bymonthday_options', $repeat_bymonthday_options);
+$tmpl->assign('repeat_weekofmonth_options', $repeat_weekofmonth_options);
$tmpl->assign('title', $summary);
$tmpl->assign('location', $location);
@@ -79,8 +226,23 @@ $tmpl->assign('startdate', $startdate);
$tmpl->assign('starttime', $starttime);
$tmpl->assign('enddate', $enddate);
$tmpl->assign('endtime', $endtime);
-$tmpl->assign('repeat', $repeat);
$tmpl->assign('description', $description);
+
+$tmpl->assign('repeat', $repeat['repeat']);
+if($repeat['repeat'] != 'doesnotrepeat'){
+ $tmpl->assign('repeat_month', $repeat['month']);
+ $tmpl->assign('repeat_weekdays', $repeat['weekdays']);
+ $tmpl->assign('repeat_interval', $repeat['interval']);
+ $tmpl->assign('repeat_end', $repeat['end']);
+ $tmpl->assign('repeat_count', $repeat['count']);
+ $tmpl->assign('repeat_weekofmonth', $repeat['weekofmonth']);
+ $tmpl->assign('repeat_date', $repeat['date']);
+ $tmpl->assign('repeat_year', $repeat['year']);
+ $tmpl->assign('repeat_byyearday', $repeat['byyearday']);
+ $tmpl->assign('repeat_bymonthday', $repeat['bymonthday']);
+ $tmpl->assign('repeat_bymonth', $repeat['bymonth']);
+ $tmpl->assign('repeat_byweekno', $repeat['byweekno']);
+}
$tmpl->printpage();
-?>
-
+
+?>
\ No newline at end of file
diff --git a/apps/calendar/ajax/events.php b/apps/calendar/ajax/events.php
new file mode 100644
index 00000000000..998991c2fb4
--- /dev/null
+++ b/apps/calendar/ajax/events.php
@@ -0,0 +1,84 @@
+
+ * This file is licensed under the Affero General Public License version 3 or
+ * later.
+ * See the COPYING-README file.
+ */
+
+require_once ('../../../lib/base.php');
+require_once('../../../3rdparty/when/When.php');
+
+function addoutput($event, $vevent, $return_event){
+ $return_event['id'] = (int)$event['id'];
+ $return_event['title'] = $event['summary'];
+ $return_event['description'] = isset($vevent->DESCRIPTION)?$vevent->DESCRIPTION->value:'';
+ $last_modified = $vevent->__get('LAST-MODIFIED');
+ if ($last_modified){
+ $lastmodified = $last_modified->getDateTime()->format('U');
+ }else{
+ $lastmodified = 0;
+ }
+ $return_event['lastmodified'] = (int)$lastmodified;
+ return $return_event;
+}
+
+OC_JSON::checkLoggedIn();
+OC_JSON::checkAppEnabled('calendar');
+
+$start = DateTime::createFromFormat('U', $_GET['start']);
+$end = DateTime::createFromFormat('U', $_GET['end']);
+
+$events = OC_Calendar_Object::allInPeriod($_GET['calendar_id'], $start, $end);
+$user_timezone = OC_Preferences::getValue(OC_USER::getUser(), 'calendar', 'timezone', date_default_timezone_get());
+$return = array();
+foreach($events as $event){
+ $object = OC_VObject::parse($event['calendardata']);
+ $vevent = $object->VEVENT;
+ $dtstart = $vevent->DTSTART;
+ $dtend = OC_Calendar_Object::getDTEndFromVEvent($vevent);
+ $return_event = array();
+ $start_dt = $dtstart->getDateTime();
+ $start_dt->setTimezone(new DateTimeZone($user_timezone));
+ $end_dt = $dtend->getDateTime();
+ $end_dt->setTimezone(new DateTimeZone($user_timezone));
+ if ($dtstart->getDateType() == Sabre_VObject_Element_DateTime::DATE){
+ $return_event['allDay'] = true;
+ }else{
+ $return_event['allDay'] = false;
+ }
+ //Repeating Events
+ if($event['repeating'] == 1){
+ $duration = (double) $end_dt->format('U') - (double) $start_dt->format('U');
+ $r = new When();
+ $r->recur((string) $start_dt->format('Ymd\THis'))->rrule((string) $vevent->RRULE);
+ while($result = $r->next()){
+ if($result->format('U') > $_GET['end']){
+ break;
+ }
+ if($return_event['allDay'] == true){
+ $return_event['start'] = $result->format('Y-m-d');
+ $return_event['end'] = date('Y-m-d', $result->format('U') + --$duration);
+ }else{
+ $return_event['start'] = $result->format('Y-m-d H:i:s');
+ $return_event['end'] = date('Y-m-d H:i:s', $result->format('U') + $duration);
+ }
+ $return[] = addoutput($event, $vevent, $return_event);
+ }
+ }else{
+ $return_event = array();
+ if ($dtstart->getDateType() == Sabre_VObject_Element_DateTime::DATE){
+ $return_event['allDay'] = true;
+ $return_event['start'] = $start_dt->format('Y-m-d');
+ $end_dt->modify('-1 sec');
+ $return_event['end'] = $end_dt->format('Y-m-d');
+ }else{
+ $return_event['start'] = $start_dt->format('Y-m-d H:i:s');
+ $return_event['end'] = $end_dt->format('Y-m-d H:i:s');
+ $return_event['allDay'] = false;
+ }
+ $return[] = addoutput($event, $vevent, $return_event);
+ }
+}
+OC_JSON::encodedPrint($return);
+?>
\ No newline at end of file
diff --git a/apps/calendar/ajax/firstdayofweek.php b/apps/calendar/ajax/firstdayofweek.php
deleted file mode 100755
index eff82cece1d..00000000000
--- a/apps/calendar/ajax/firstdayofweek.php
+++ /dev/null
@@ -1,12 +0,0 @@
-
- * This file is licensed under the Affero General Public License version 3 or
- * later.
- * See the COPYING-README file.
- */
-require_once('../../../lib/base.php');
-OC_JSON::checkLoggedIn();
-$firstdayofweek = OC_Preferences::getValue( OC_User::getUser(), 'calendar', 'firstdayofweek', "1");
-OC_JSON::encodedPrint(array("firstdayofweek" => $firstdayofweek));
-?>
\ No newline at end of file
diff --git a/apps/calendar/ajax/getcal.php b/apps/calendar/ajax/getcal.php
deleted file mode 100644
index a65c6cf2602..00000000000
--- a/apps/calendar/ajax/getcal.php
+++ /dev/null
@@ -1,70 +0,0 @@
-
- * This file is licensed under the Affero General Public License version 3 or
- * later.
- * See the COPYING-README file.
- */
-
-require_once ("../../../lib/base.php");
-if(!OC_USER::isLoggedIn()) {
- die("");
-}
-OC_JSON::checkAppEnabled('calendar');
-
-$calendars = OC_Calendar_Calendar::allCalendars(OC_User::getUser(), 1);
-$events = array();
-$return = array('calendars'=>array());
-foreach($calendars as $calendar) {
- $tmp = OC_Calendar_Object::all($calendar['id']);
- $events = array_merge($events, $tmp);
- $return['calendars'][$calendar['id']] = array(
- 'displayname' => $calendar['displayname'],
- 'color' => '#'.$calendar['calendarcolor']
- );
-}
-
-$select_year = $_GET["year"];
-$user_timezone = OC_Preferences::getValue(OC_USER::getUser(), "calendar", "timezone", "Europe/London");
-foreach($events as $event)
-{
- if ($select_year != substr($event['startdate'], 0, 4))
- continue;
- $object = Sabre_VObject_Reader::read($event['calendardata']);
- $vevent = $object->VEVENT;
- $dtstart = $vevent->DTSTART;
- $dtend = OC_Calendar_Object::getDTEndFromVEvent($vevent);
- $start_dt = $dtstart->getDateTime();
- $start_dt->setTimezone(new DateTimeZone($user_timezone));
- $end_dt = $dtend->getDateTime();
- $end_dt->setTimezone(new DateTimeZone($user_timezone));
- $year = $start_dt->format('Y');
- $month = $start_dt->format('n') - 1; // return is 0 based
- $day = $start_dt->format('j');
- $hour = $start_dt->format('G');
- if ($dtstart->getDateType() == Sabre_VObject_Element_DateTime::DATE) {
- $hour = 'allday';
- }
-
- $return_event = array();
- foreach(array('id', 'calendarid', 'objecttype', 'repeating') as $prop)
- {
- $return_event[$prop] = $event[$prop];
- }
- $return_event['startdate'] = explode('|', $start_dt->format('Y|m|d|H|i'));
- $return_event['enddate'] = explode('|', $end_dt->format('Y|m|d|H|i'));
- $return_event['description'] = $event['summary'];
- if ($hour == 'allday')
- {
- $return_event['allday'] = true;
- }
- if (isset($return[$year][$month][$day][$hour]))
- {
- $return[$year][$month][$day][$hour][] = $return_event;
- }
- else
- {
- $return[$year][$month][$day][$hour] = array(1 => $return_event);
- }
-}
-OC_JSON::encodedPrint($return);
diff --git a/apps/calendar/ajax/gettimezonedetection.php b/apps/calendar/ajax/gettimezonedetection.php
new file mode 100644
index 00000000000..ae58370712d
--- /dev/null
+++ b/apps/calendar/ajax/gettimezonedetection.php
@@ -0,0 +1,11 @@
+
+ * This file is licensed under the Affero General Public License version 3 or
+ * later.
+ * See the COPYING-README file.
+ */
+require_once ("../../../lib/base.php");
+OC_JSON::checkLoggedIn();
+OC_JSON::checkAppEnabled('calendar');
+OC_JSON::success(array('detection' => OC_Preferences::getValue(OC_USER::getUser(), 'calendar', 'timezonedetection')));
\ No newline at end of file
diff --git a/apps/calendar/ajax/guesstimezone.php b/apps/calendar/ajax/guesstimezone.php
new file mode 100755
index 00000000000..41aea26985f
--- /dev/null
+++ b/apps/calendar/ajax/guesstimezone.php
@@ -0,0 +1,48 @@
+
+ * This file is licensed under the Affero General Public License version 3 or
+ * later.
+ * See the COPYING-README file.
+ */
+function make_array_out_of_xml ($xml){
+ $returnarray = array();
+ $xml = (array)$xml ;
+ foreach ($xml as $property => $value){
+ $value = (array)$value;
+ if(!isset($value[0])){
+ $returnarray[$property] = make_array_out_of_xml($value);
+ }else{
+ $returnarray[$property] = trim($value[0]);
+ }
+ }
+ return $returnarray;
+}
+require_once ("../../../lib/base.php");
+OC_JSON::checkLoggedIn();
+OC_JSON::checkAppEnabled('calendar');
+$l = new OC_L10N('calendar');
+$lat = $_GET['lat'];
+$long = $_GET['long'];
+if(OC_Preferences::getValue(OC_USER::getUser(), 'calendar', 'position') == $lat . '-' . $long && OC_Preferences::getValue(OC_USER::getUser(), 'calendar', 'timezone') != null){
+ OC_JSON::success();
+ exit;
+}
+OC_Preferences::setValue(OC_USER::getUser(), 'calendar', 'position', $lat . '-' . $long);
+$geolocation = file_get_contents('http://ws.geonames.org/timezone?lat=' . $lat . '&lng=' . $long);
+//Information are by Geonames (http://www.geonames.org) and licensed under the Creative Commons Attribution 3.0 License
+$geoxml = simplexml_load_string($geolocation);
+$geoarray = make_array_out_of_xml($geoxml);
+if($geoarray['timezone']['timezoneId'] == OC_Preferences::getValue(OC_USER::getUser(), 'calendar', 'timezone')){
+ OC_JSON::success();
+ exit;
+}
+if(in_array($geoarray['timezone']['timezoneId'], DateTimeZone::listIdentifiers())){
+ OC_Preferences::setValue(OC_USER::getUser(), 'calendar', 'timezone', $geoarray['timezone']['timezoneId']);
+ $message = array('message'=> $l->t('New Timezone:') . $geoarray['timezone']['timezoneId']);
+ OC_JSON::success($message);
+}else{
+ OC_JSON::error();
+}
+
+?>
diff --git a/apps/calendar/ajax/importdialog.php b/apps/calendar/ajax/importdialog.php
index 232b4ba5807..f6b8453fc22 100644
--- a/apps/calendar/ajax/importdialog.php
+++ b/apps/calendar/ajax/importdialog.php
@@ -1,20 +1,17 @@
+ * Copyright (c) 2012 Georg Ehrke
* This file is licensed under the Affero General Public License version 3 or
* later.
* See the COPYING-README file.
*/
require_once('../../../lib/base.php');
-
+OC_JSON::checkLoggedIn();
+OC_Util::checkAppEnabled('calendar');
$l10n = new OC_L10N('calendar');
-
-if(!OC_USER::isLoggedIn()) {
- die("");
-}
-OC_JSON::checkAppEnabled('calendar');
-
$tmpl = new OC_Template('calendar', 'part.import');
+$tmpl->assign('path', $_POST['path']);
+$tmpl->assign('filename', $_POST['filename']);
$tmpl->printpage();
?>
diff --git a/apps/calendar/ajax/moveevent.php b/apps/calendar/ajax/moveevent.php
index e2b777969da..f2256d4eee6 100644
--- a/apps/calendar/ajax/moveevent.php
+++ b/apps/calendar/ajax/moveevent.php
@@ -1,103 +1,43 @@
+ * Copyright (c) 2011 Bart Visscher
* This file is licensed under the Affero General Public License version 3 or
* later.
* See the COPYING-README file.
*/
-error_reporting(E_ALL);
require_once('../../../lib/base.php');
OC_JSON::checkLoggedIn();
-$data = OC_Calendar_Object::find($_POST["id"]);
-$calendarid = $data["calendarid"];
-$cal = $calendarid;
-$id = $_POST["id"];
-$calendar = OC_Calendar_Calendar::findCalendar($calendarid);
-if(OC_User::getUser() != $calendar["userid"]){
- OC_JSON::error();
- exit;
-}
-$newdate = $_POST["newdate"];
-$caldata = array();
-//modified part of editeventform.php
-$object = Sabre_VObject_Reader::read($data['calendardata']);
-$vevent = $object->VEVENT;
+
+$id = $_POST['id'];
+
+$vcalendar = OC_Calendar_App::getVCalendar($id);
+$vevent = $vcalendar->VEVENT;
+
+$allday = $_POST['allDay'];
+$delta = new DateInterval('P0D');
+$delta->d = $_POST['dayDelta'];
+$delta->i = $_POST['minuteDelta'];
+
+OC_Calendar_App::isNotModified($vevent, $_POST['lastmodified']);
+
$dtstart = $vevent->DTSTART;
$dtend = OC_Calendar_Object::getDTEndFromVEvent($vevent);
-switch($dtstart->getDateType()) {
- case Sabre_VObject_Element_DateTime::LOCALTZ:
- case Sabre_VObject_Element_DateTime::LOCAL:
- $startdate = $dtstart->getDateTime()->format('d-m-Y');
- $starttime = $dtstart->getDateTime()->format('H:i');
- $enddate = $dtend->getDateTime()->format('d-m-Y');
- $endtime = $dtend->getDateTime()->format('H:i');
- $allday = false;
- break;
- case Sabre_VObject_Element_DateTime::DATE:
- $startdate = $dtstart->getDateTime()->format('d-m-Y');
- $starttime = '00:00';
- $dtend->getDateTime()->modify('-1 day');
- $enddate = $dtend->getDateTime()->format('d-m-Y');
- $endtime = '23:59';
- $allday = true;
- break;
+$start_type = $dtstart->getDateType();
+$end_type = $dtend->getDateType();
+if ($allday && $start_type != Sabre_VObject_Element_DateTime::DATE){
+ $start_type = $end_type = Sabre_VObject_Element_DateTime::DATE;
+ $dtend->setDateTime($dtend->getDateTime()->modify('+1 day'), $end_type);
}
-$caldata["title"] = isset($vevent->SUMMARY) ? $vevent->SUMMARY->value : '';
-$caldata["location"] = isset($vevent->LOCATION) ? $vevent->LOCATION->value : '';
-$caldata["categories"] = array();
-if (isset($vevent->CATEGORIES)){
- $caldata["categories"] = explode(',', $vevent->CATEGORIES->value);
- $caldata["categories"] = array_map('trim', $categories);
+if (!$allday && $start_type == Sabre_VObject_Element_DateTime::DATE){
+ $start_type = $end_type = Sabre_VObject_Element_DateTime::LOCALTZ;
}
-foreach($caldata["categories"] as $category){
- if (!in_array($category, $category_options)){
- array_unshift($category_options, $category);
- }
-}
-$caldata["repeat"] = isset($vevent->CATEGORY) ? $vevent->CATEGORY->value : '';
-$caldata["description"] = isset($vevent->DESCRIPTION) ? $vevent->DESCRIPTION->value : '';
-//end part of editeventform.php
-$startdatearray = explode("-", $startdate);
-$starttimearray = explode(":", $starttime);
-$startunix = mktime($starttimearray[0], $starttimearray[1], 0, $startdatearray[1], $startdatearray[0], $startdatearray[2]);
-$enddatearray = explode("-", $enddate);
-$endtimearray = explode(":", $endtime);
-$endunix = mktime($endtimearray[0], $endtimearray[1], 0, $enddatearray[1], $enddatearray[0], $enddatearray[2]);
-$difference = $endunix - $startunix;
-if(strlen($newdate) > 10){
- $newdatestringarray = explode("-", $newdate);
- if($newdatestringarray[1] == "allday"){
- $allday = true;
- $newdatestringarray[1] = "00:00";
- }else{
- if($allday == true){
- $difference = 3600;
- }
- $allday = false;
- }
-}else{
- $newdatestringarray = array();
- $newdatestringarray[0] = $newdate;
- $newdatestringarray[1] = $starttime;
-}
-$newdatearray = explode(".", $newdatestringarray[0]);
-$newtimearray = explode(":", $newdatestringarray[1]);
-$newstartunix = mktime($newtimearray[0], $newtimearray[1], 0, $newdatearray[1], $newdatearray[0], $newdatearray[2]);
-$newendunix = $newstartunix + $difference;
-if($allday == true){
- $caldata["allday"] = true;
-}else{
- unset($caldata["allday"]);
-}
-$caldata["from"] = date("d-m-Y", $newstartunix);
-$caldata["fromtime"] = date("H:i", $newstartunix);
-$caldata["to"] = date("d-m-Y", $newendunix);
-$caldata["totime"] = date("H:i", $newendunix);
-//modified part of editevent.php
-$vcalendar = Sabre_VObject_Reader::read($data["calendardata"]);
-OC_Calendar_Object::updateVCalendarFromRequest($caldata, $vcalendar);
+$dtstart->setDateTime($dtstart->getDateTime()->add($delta), $start_type);
+$dtend->setDateTime($dtend->getDateTime()->add($delta), $end_type);
+unset($vevent->DURATION);
+
+$vevent->setDateTime('LAST-MODIFIED', 'now', Sabre_VObject_Element_DateTime::UTC);
+$vevent->setDateTime('DTSTAMP', 'now', Sabre_VObject_Element_DateTime::UTC);
$result = OC_Calendar_Object::edit($id, $vcalendar->serialize());
-OC_JSON::success();
-//end part of editevent.php
-?>
\ No newline at end of file
+$lastmodified = $vevent->__get('LAST-MODIFIED')->getDateTime();
+OC_JSON::success(array('lastmodified'=>(int)$lastmodified->format('U')));
diff --git a/apps/calendar/ajax/newcalendar.php b/apps/calendar/ajax/newcalendar.php
index a7935c95672..af3ba4fbbea 100644
--- a/apps/calendar/ajax/newcalendar.php
+++ b/apps/calendar/ajax/newcalendar.php
@@ -8,9 +8,7 @@
require_once('../../../lib/base.php');
$l10n = new OC_L10N('calendar');
-if(!OC_USER::isLoggedIn()) {
- die("");
-}
+OC_JSON::checkLoggedIn();
OC_JSON::checkAppEnabled('calendar');
$calendarcolor_options = OC_Calendar_Calendar::getCalendarColorOptions();
$calendar = array(
diff --git a/apps/calendar/ajax/newevent.php b/apps/calendar/ajax/newevent.php
index 1a696cf7780..c7c4d29943a 100644
--- a/apps/calendar/ajax/newevent.php
+++ b/apps/calendar/ajax/newevent.php
@@ -10,9 +10,7 @@ require_once('../../../lib/base.php');
$l10n = new OC_L10N('calendar');
-if(!OC_USER::isLoggedIn()) {
- die("");
-}
+OC_JSON::checkLoggedIn();
OC_JSON::checkAppEnabled('calendar');
$errarr = OC_Calendar_Object::validateRequest($_POST);
diff --git a/apps/calendar/ajax/neweventform.php b/apps/calendar/ajax/neweventform.php
index 9d4dcfa2e13..3870c879b0e 100644
--- a/apps/calendar/ajax/neweventform.php
+++ b/apps/calendar/ajax/neweventform.php
@@ -8,50 +8,69 @@
require_once('../../../lib/base.php');
-$l10n = new OC_L10N('calendar');
-
if(!OC_USER::isLoggedIn()) {
die('');
}
OC_JSON::checkAppEnabled('calendar');
-$calendar_options = OC_Calendar_Calendar::allCalendars(OC_User::getUser());
-$category_options = OC_Calendar_Object::getCategoryOptions($l10n);
-$repeat_options = OC_Calendar_Object::getRepeatOptions($l10n);
-$startday = substr($_GET['d'], 0, 2);
-$startmonth = substr($_GET['d'], 2, 2);
-$startyear = substr($_GET['d'], 4, 4);
-$starttime = $_GET['t'];
-$allday = $starttime == 'allday';
-if($starttime != 'undefined' && !is_nan($starttime) && !$allday){
- $startminutes = '00';
-}elseif($allday){
- $starttime = '0';
- $startminutes = '00';
-}else{
- $starttime = date('G');
-
- $startminutes = date('i');
+if (!isset($_POST['start'])){
+ OC_JSON::error();
+ die;
}
+$start = $_POST['start'];
+$end = $_POST['end'];
+$allday = $_POST['allday'];
-$datetimestamp = mktime($starttime, $startminutes, 0, $startmonth, $startday, $startyear);
-$duration = OC_Preferences::getValue( OC_User::getUser(), 'calendar', 'duration', "60");
-$datetimestamp = $datetimestamp + ($duration * 60);
-$endmonth = date("m", $datetimestamp);
-$endday = date("d", $datetimestamp);
-$endyear = date("Y", $datetimestamp);
-$endtime = date("G", $datetimestamp);
-$endminutes = date("i", $datetimestamp);
-
+if (!$end){
+ $duration = OC_Preferences::getValue( OC_User::getUser(), 'calendar', 'duration', '60');
+ $end = $start + ($duration * 60);
+}
+$start = new DateTime('@'.$start);
+$end = new DateTime('@'.$end);
+$timezone = OC_Preferences::getValue(OC_USER::getUser(), 'calendar', 'timezone', date_default_timezone_get());
+$start->setTimezone(new DateTimeZone($timezone));
+$end->setTimezone(new DateTimeZone($timezone));
+$calendar_options = OC_Calendar_Calendar::allCalendars(OC_User::getUser());
+$category_options = OC_Calendar_App::getCategoryOptions();
+$repeat_options = OC_Calendar_App::getRepeatOptions();
+$repeat_end_options = OC_Calendar_App::getEndOptions();
+$repeat_month_options = OC_Calendar_App::getMonthOptions();
+$repeat_year_options = OC_Calendar_App::getYearOptions();
+$repeat_weekly_options = OC_Calendar_App::getWeeklyOptions();
+$repeat_weekofmonth_options = OC_Calendar_App::getWeekofMonth();
+$repeat_byyearday_options = OC_Calendar_App::getByYearDayOptions();
+$repeat_bymonth_options = OC_Calendar_App::getByMonthOptions();
+$repeat_byweekno_options = OC_Calendar_App::getByWeekNoOptions();
+$repeat_bymonthday_options = OC_Calendar_App::getByMonthDayOptions();
$tmpl = new OC_Template('calendar', 'part.newevent');
$tmpl->assign('calendar_options', $calendar_options);
$tmpl->assign('category_options', $category_options);
-$tmpl->assign('startdate', $startday . '-' . $startmonth . '-' . $startyear);
-$tmpl->assign('starttime', ($starttime <= 9 ? '0' : '') . $starttime . ':' . $startminutes);
-$tmpl->assign('enddate', $endday . '-' . $endmonth . '-' . $endyear);
-$tmpl->assign('endtime', ($endtime <= 9 ? '0' : '') . $endtime . ':' . $endminutes);
+$tmpl->assign('repeat_options', $repeat_options);
+$tmpl->assign('repeat_month_options', $repeat_month_options);
+$tmpl->assign('repeat_weekly_options', $repeat_weekly_options);
+$tmpl->assign('repeat_end_options', $repeat_end_options);
+$tmpl->assign('repeat_year_options', $repeat_year_options);
+$tmpl->assign('repeat_byyearday_options', $repeat_byyearday_options);
+$tmpl->assign('repeat_bymonth_options', $repeat_bymonth_options);
+$tmpl->assign('repeat_byweekno_options', $repeat_byweekno_options);
+$tmpl->assign('repeat_bymonthday_options', $repeat_bymonthday_options);
+$tmpl->assign('repeat_weekofmonth_options', $repeat_weekofmonth_options);
+
+$tmpl->assign('startdate', $start->format('d-m-Y'));
+$tmpl->assign('starttime', $start->format('H:i'));
+$tmpl->assign('enddate', $end->format('d-m-Y'));
+$tmpl->assign('endtime', $end->format('H:i'));
$tmpl->assign('allday', $allday);
+$tmpl->assign('repeat', 'doesnotrepeat');
+$tmpl->assign('repeat_month', 'monthday');
+$tmpl->assign('repeat_weekdays', array());
+$tmpl->assign('repeat_interval', 1);
+$tmpl->assign('repeat_end', 'never');
+$tmpl->assign('repeat_count', '10');
+$tmpl->assign('repeat_weekofmonth', 'auto');
+$tmpl->assign('repeat_date', '');
+$tmpl->assign('repeat_year', 'bydate');
$tmpl->printpage();
?>
diff --git a/apps/calendar/ajax/resizeevent.php b/apps/calendar/ajax/resizeevent.php
new file mode 100644
index 00000000000..68347906529
--- /dev/null
+++ b/apps/calendar/ajax/resizeevent.php
@@ -0,0 +1,32 @@
+
+ * This file is licensed under the Affero General Public License version 3 or
+ * later.
+ * See the COPYING-README file.
+ */
+require_once('../../../lib/base.php');
+OC_JSON::checkLoggedIn();
+
+$id = $_POST['id'];
+
+$vcalendar = OC_Calendar_App::getVCalendar($id);
+$vevent = $vcalendar->VEVENT;
+
+$delta = new DateInterval('P0D');
+$delta->d = $_POST['dayDelta'];
+$delta->i = $_POST['minuteDelta'];
+
+OC_Calendar_App::isNotModified($vevent, $_POST['lastmodified']);
+
+$dtend = OC_Calendar_Object::getDTEndFromVEvent($vevent);
+$end_type = $dtend->getDateType();
+$dtend->setDateTime($dtend->getDateTime()->add($delta), $end_type);
+unset($vevent->DURATION);
+
+$vevent->setDateTime('LAST-MODIFIED', 'now', Sabre_VObject_Element_DateTime::UTC);
+$vevent->setDateTime('DTSTAMP', 'now', Sabre_VObject_Element_DateTime::UTC);
+
+$result = OC_Calendar_Object::edit($id, $vcalendar->serialize());
+$lastmodified = $vevent->__get('LAST-MODIFIED')->getDateTime();
+OC_JSON::success(array('lastmodified'=>(int)$lastmodified->format('U')));
diff --git a/apps/calendar/ajax/setdaysofweekend.php b/apps/calendar/ajax/setdaysofweekend.php
deleted file mode 100755
index b5ef5f8573f..00000000000
--- a/apps/calendar/ajax/setdaysofweekend.php
+++ /dev/null
@@ -1,30 +0,0 @@
-
- * This file is licensed under the Affero General Public License version 3 or
- * later.
- * See the COPYING-README file.
- */
-require_once('../../../lib/base.php');
-OC_JSON::checkLoggedIn();
-$weekenddays = array("Monday"=>"false", "Tuesday"=>"false", "Wednesday"=>"false", "Thursday"=>"false", "Friday"=>"false", "Saturday"=>"false", "Sunday"=>"false");
-for($i = 0;$i < count($_POST["weekend"]); $i++){
- switch ($_POST["weekend"][$i]){
- case "Monday":
- case "Tuesday":
- case "Wednesday":
- case "Thursday":
- case "Friday":
- case "Saturday":
- case "Sunday":
- break;
- default:
- OC_JSON::error();
- exit;
- }
- $weekenddays[$_POST["weekend"][$i]] = "true";
-}
-$setValue = json_encode($weekenddays);
-OC_Preferences::setValue(OC_User::getUser(), 'calendar', 'weekend', $setValue);
-OC_JSON::success();
-?>
diff --git a/apps/calendar/ajax/setduration.php b/apps/calendar/ajax/setduration.php
deleted file mode 100644
index a75c8faea42..00000000000
--- a/apps/calendar/ajax/setduration.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.
- */
-require_once('../../../lib/base.php');
-OC_JSON::checkLoggedIn();
-if(isset($_POST["duration"])){
- OC_Preferences::setValue(OC_User::getUser(), 'calendar', 'duration', $_POST["duration"]);
- OC_JSON::success();
-}else{
- OC_JSON::error();
-}
-?>
-
diff --git a/apps/calendar/ajax/setfirstdayofweek.php b/apps/calendar/ajax/setfirstdayofweek.php
deleted file mode 100755
index 571b95af0e3..00000000000
--- a/apps/calendar/ajax/setfirstdayofweek.php
+++ /dev/null
@@ -1,16 +0,0 @@
-
- * This file is licensed under the Affero General Public License version 3 or
- * later.
- * See the COPYING-README file.
- */
-require_once('../../../lib/base.php');
-OC_JSON::checkLoggedIn();
-if(isset($_POST["firstdayofweek"])){
- OC_Preferences::setValue(OC_User::getUser(), 'calendar', 'firstdayofweek', $_POST["firstdayofweek"]);
- OC_JSON::success();
-}else{
- OC_JSON::error();
-}
-?>
diff --git a/apps/calendar/ajax/timezonedetection.php b/apps/calendar/ajax/timezonedetection.php
new file mode 100644
index 00000000000..77e4c4f6ebe
--- /dev/null
+++ b/apps/calendar/ajax/timezonedetection.php
@@ -0,0 +1,17 @@
+
+ * This file is licensed under the Affero General Public License version 3 or
+ * later.
+ * See the COPYING-README file.
+ */
+require_once ("../../../lib/base.php");
+OC_JSON::checkLoggedIn();
+OC_JSON::checkAppEnabled('calendar');
+if($_POST['timezonedetection'] == 'on'){
+ OC_Preferences::setValue(OC_USER::getUser(), 'calendar', 'timezonedetection', 'true');
+}else{
+ OC_Preferences::setValue(OC_USER::getUser(), 'calendar', 'timezonedetection', 'false');
+}
+OC_JSON::success();
+
diff --git a/apps/calendar/ajax/updatecalendar.php b/apps/calendar/ajax/updatecalendar.php
index a81644ded17..269b7b7ca06 100644
--- a/apps/calendar/ajax/updatecalendar.php
+++ b/apps/calendar/ajax/updatecalendar.php
@@ -8,16 +8,31 @@
require_once('../../../lib/base.php');
-$l10n = new OC_L10N('calendar');
-
// Check if we are a user
OC_JSON::checkLoggedIn();
OC_JSON::checkAppEnabled('calendar');
+if(trim($_POST['name']) == ''){
+ OC_JSON::error(array('message'=>'empty'));
+ exit;
+}
+$calendars = OC_Calendar_Calendar::allCalendars(OC_User::getUser());
+foreach($calendars as $cal){
+ if($cal['displayname'] == $_POST['name'] && $cal['id'] != $_POST['id']){
+ OC_JSON::error(array('message'=>'namenotavailable'));
+ exit;
+ }
+}
+
$calendarid = $_POST['id'];
+$calendar = OC_Calendar_App::getCalendar($calendarid);//access check
OC_Calendar_Calendar::editCalendar($calendarid, $_POST['name'], null, null, null, $_POST['color']);
OC_Calendar_Calendar::setCalendarActive($calendarid, $_POST['active']);
-$calendar = OC_Calendar_Calendar::findCalendar($calendarid);
+
+$calendar = OC_Calendar_App::getCalendar($calendarid);
$tmpl = new OC_Template('calendar', 'part.choosecalendar.rowfields');
$tmpl->assign('calendar', $calendar);
-OC_JSON::success(array('data' => $tmpl->fetchPage()));
+OC_JSON::success(array(
+ 'page' => $tmpl->fetchPage(),
+ 'eventSource' => OC_Calendar_Calendar::getEventSourceInfo($calendar),
+));
diff --git a/apps/calendar/appinfo/app.php b/apps/calendar/appinfo/app.php
index 2dc01eab0f6..9c95768895f 100644
--- a/apps/calendar/appinfo/app.php
+++ b/apps/calendar/appinfo/app.php
@@ -1,23 +1,23 @@
10,
- 'id' => 'calendar',
- 'name' => 'Calendar' ));
-
-OC_App::addNavigationEntry( array(
- 'id' => 'calendar_index',
- 'order' => 10,
- 'href' => OC_Helper::linkTo( 'calendar', 'index.php' ),
- 'icon' => OC_Helper::imagePath( 'calendar', 'icon.png' ),
- 'name' => $l->t('Calendar')));
-
-OC_App::registerPersonal('calendar', 'settings');
+if(version_compare(PHP_VERSION, '5.3.0', '>=')){
+ $l=new OC_L10N('calendar');
+ OC::$CLASSPATH['OC_Calendar_App'] = 'apps/calendar/lib/app.php';
+ OC::$CLASSPATH['OC_Calendar_Calendar'] = 'apps/calendar/lib/calendar.php';
+ OC::$CLASSPATH['OC_Calendar_Object'] = 'apps/calendar/lib/object.php';
+ OC::$CLASSPATH['OC_Calendar_Hooks'] = 'apps/calendar/lib/hooks.php';
+ OC::$CLASSPATH['OC_Connector_Sabre_CalDAV'] = 'apps/calendar/lib/connector_sabre.php';
+ OC_HOOK::connect('OC_User', 'post_deleteUser', 'OC_Calendar_Hooks', 'deleteUser');
+ OC_Util::addScript('calendar','loader');
+ OC_App::register( array(
+ 'order' => 10,
+ 'id' => 'calendar',
+ 'name' => 'Calendar' ));
+ OC_App::addNavigationEntry( array(
+ 'id' => 'calendar_index',
+ 'order' => 10,
+ 'href' => OC_Helper::linkTo( 'calendar', 'index.php' ),
+ 'icon' => OC_Helper::imagePath( 'calendar', 'icon.svg' ),
+ 'name' => $l->t('Calendar')));
+ OC_App::registerPersonal('calendar', 'settings');
+ require_once('apps/calendar/lib/search.php');
+}
diff --git a/apps/calendar/appinfo/info.xml b/apps/calendar/appinfo/info.xml
index 6b1ecd2337f..46292af3db1 100644
--- a/apps/calendar/appinfo/info.xml
+++ b/apps/calendar/appinfo/info.xml
@@ -4,7 +4,7 @@
Calendar
0.2
AGPL
- Georg Ehrke (Userinterface), Jakob Sack
+ Georg Ehrke, Bart Visscher, Jakob Sack
2
Calendar with CalDAV support
diff --git a/apps/calendar/css/style.css b/apps/calendar/css/style.css
index 80d29ca8974..cffaf356402 100644
--- a/apps/calendar/css/style.css
+++ b/apps/calendar/css/style.css
@@ -17,19 +17,14 @@
#editentry_dialog {display: none;}
#parsingfail_dialog{display: none;}
-#calendar_holder {height: 100%; width: 100%;}
-#onedayview, #oneweekview, #fourweeksview, #onemonthview, #listview {display: none; position: absolute;bottom: 0; right: 0; left: 160px; top: 80px;}
-#onedayview table {margin: 0; padding: 0; width: 100%; height: 100%; border-spacing:1px; background: #EEEEEE;}
-#oneweekview table {margin: 0; padding: 0; width: 100%; height: 100%; border-spacing:1px; background: #EEEEEE;}
-#fourweeksview table {margin: 0; padding: 0; width: 100%; height: 100%; border-spacing:1px; background: #EEEEEE;overflow: hidden;}
-#onemonthview table {margin: 0; padding: 0; width: 100%; height: 100%; border-spacing:1px; background: #EEEEEE;}
+#loading { display: none;margin: 0;padding:0;margin-top:5px;}
+
+#calendar_holder {position: relative;bottom: 0; right: 0; left: 0; top: 3em;}
+.fc-content{padding:2px 4px;}
#listview {margin: 0; padding: 10px; background: #EEEEEE;}
#listview #more_before, #listview #more_after {border: 1px solid #1a1a1a; width:25em;padding: 3px;text-align: center;}
#listview #events {width:25em;padding: 4px;}
#listview #events .day {width:auto;padding-left:10px;border-bottom: 2px solid #EEEEEE;text-align:left;}
-#fourweeksview .calw{vertical-align: middle;text-align: center;width: 50px;}
-
-#sysbox{display: none;}
.actions {height: 33px; min-width: 800px;}
.controls {min-width: 800px;}
@@ -48,7 +43,7 @@
.popup {display: none; position: absolute; z-index: 1000; background: #eeeeee; color: #000000; border: 1px solid #1a1a1a; font-size: 90%;}
.event_popup {width: 280px; height: 40px; padding: 10px;}
-input[type="button"].active {color: #0098E4}
+input[type="button"].active {color: #6193CF}
#fromtime, #totime {
color:#333;
}
@@ -60,3 +55,75 @@ button.category{margin:0 3px;}
.calendar-colorpicker-color{display:inline-block;width:20px;height:20px;margin-right:2px;cursor:pointer;border:2px solid transparent;}
.calendar-colorpicker-color.active{border:2px solid black;}
+
+.fc-list-table
+{
+ margin: 10px;
+ border-style: hidden;
+ border-width: 10px;
+ padding: 10px;
+ vertical-align: top;
+ width: 100%;
+}
+.fc-list-table tr:hover
+{
+ color: #0000FF;
+ background-color: #CCFFCC;
+}
+
+
+.fc-list-date
+{
+ margin: 16px;
+ white-space: nowrap;
+ text-align: left;
+ width: 100%;
+ background-color: #808080;
+ color: #FFFFFF;
+ font-weight: bold;
+ font-family: Arial, Helvetica, sans-serif;
+}
+.fc-list-time
+{
+ text-align: center;
+ white-space: nowrap;
+ width: 1%;
+}
+
+.fc-list-event
+{
+ text-align: left;
+}
+
+.fc-list-event .fc-event-title
+{
+ cursor: pointer;
+}
+.tipsy-event .tipsy-inner{
+background-color:#0098E4;
+border:2px solid #1d2d44;
+max-width:400px;
+padding:0;
+}
+.tipsy-event .tipsy-arrow-s{
+border-top-color:#1d2d44;
+}
+.tipsy-event .tipsy-arrow-n{
+border-bottom-color:#1d2d44;
+}
+.tipsy-event .summary,
+.tipsy-event .timespan,
+.tipsy-event .description{
+padding:0 8px;
+}
+.tipsy-event .summary{
+background-color:#1d2d44;
+font-size:1.2em;
+font-weight:bold;
+text-align:left;
+padding:0 8px 2px;
+}
+.tipsy-event .description{
+line-height:1.2;
+margin-bottom:4px;
+}
diff --git a/apps/calendar/export.php b/apps/calendar/export.php
index 3e93a1ad618..9886ad8e8cc 100644
--- a/apps/calendar/export.php
+++ b/apps/calendar/export.php
@@ -1,38 +1,31 @@
+ * Copyright (c) 2012 Georg Ehrke
* This file is licensed under the Affero General Public License version 3 or
* later.
* See the COPYING-README file.
*/
-require_once ("../../lib/base.php");
+require_once ('../../lib/base.php');
OC_Util::checkLoggedIn();
OC_Util::checkAppEnabled('calendar');
-$cal = isset($_GET["calid"]) ? $_GET["calid"] : NULL;
-$event = isset($_GET["eventid"]) ? $_GET["eventid"] : NULL;
+$cal = isset($_GET['calid']) ? $_GET['calid'] : NULL;
+$event = isset($_GET['eventid']) ? $_GET['eventid'] : NULL;
+$nl = "\n";
if(isset($cal)){
- $calendar = OC_Calendar_Calendar::findCalendar($cal);
- if($calendar["userid"] != OC_User::getUser()){
- OC_JSON::error();
- exit;
- }
+ $calendar = OC_Calendar_App::getCalendar($cal);
$calobjects = OC_Calendar_Object::all($cal);
- header("Content-Type: text/Calendar");
- header("Content-Disposition: inline; filename=calendar.ics");
- for($i = 0;$i <= count($calobjects); $i++){
- echo $calobjects[$i]["calendardata"] . "\n";
+ header('Content-Type: text/Calendar');
+ header('Content-Disposition: inline; filename=' . $calendar['displayname'] . '.ics');
+ foreach($calobjects as $calobject){
+ echo $calobject['calendardata'] . $nl;
}
}elseif(isset($event)){
- $data = OC_Calendar_Object::find($_GET["eventid"]);
- $calendarid = $data["calendarid"];
- $calendar = OC_Calendar_Calendar::findCalendar($calendarid);
- if($calendar["userid"] != OC_User::getUser()){
- OC_JSON::error();
- exit;
- }
- header("Content-Type: text/Calendar");
- header("Content-Disposition: inline; filename=" . $data["summary"] . ".ics");
- echo $data["calendardata"];
+ $data = OC_Calendar_App::getEventObject($_GET['eventid']);
+ $calendarid = $data['calendarid'];
+ $calendar = OC_Calendar_App::getCalendar($calendarid);
+ header('Content-Type: text/Calendar');
+ header('Content-Disposition: inline; filename=' . $data['summary'] . '.ics');
+ echo $data['calendardata'];
}
?>
diff --git a/apps/calendar/img/Icon License b/apps/calendar/img/Icon License
new file mode 100644
index 00000000000..b1b292ace66
--- /dev/null
+++ b/apps/calendar/img/Icon License
@@ -0,0 +1,2 @@
+http://thenounproject.com/noun/calendar/#icon-No404
+Creative Commons BY 3.0
\ No newline at end of file
diff --git a/apps/calendar/img/icon.png b/apps/calendar/img/icon.png
index ee0249b2c9b..eb9e07cbb10 100644
Binary files a/apps/calendar/img/icon.png and b/apps/calendar/img/icon.png differ
diff --git a/apps/calendar/img/icon.svg b/apps/calendar/img/icon.svg
new file mode 100755
index 00000000000..211f74df066
--- /dev/null
+++ b/apps/calendar/img/icon.svg
@@ -0,0 +1,54 @@
+
+
+
+image/svg+xml
+
+
+
\ No newline at end of file
diff --git a/apps/calendar/import.php b/apps/calendar/import.php
index 211791f551b..b1c6f91df84 100644
--- a/apps/calendar/import.php
+++ b/apps/calendar/import.php
@@ -1,50 +1,120 @@
+ * Copyright (c) 2012 Georg Ehrke
* This file is licensed under the Affero General Public License version 3 or
* later.
* See the COPYING-README file.
*/
-
+//check for calendar rights or create new one
+ob_start();
require_once ('../../lib/base.php');
OC_JSON::checkLoggedIn();
OC_Util::checkAppEnabled('calendar');
-
-if($_GET["import"] == "existing"){
- $calid = $_GET["calid"];
- $calendar = OC_Calendar_Calendar::findCalendar($calid);
- if($calendar['userid'] != OC_User::getUser()){
- OC_JSON::error();
- exit;
- }
- if($_GET["path"] != ""){
- $filename = $_GET["path"] . "/" . $_GET["file"];
- }else{
- $filename = "/" . $_GET["file"];
- }
-}else{
+$nl = "\n";
+$progressfile = 'import_tmp/' . md5(session_id()) . '.txt';
+if(is_writable('import_tmp/')){
+ $progressfopen = fopen($progressfile, 'w');
+ fwrite($progressfopen, '10');
+ fclose($progressfopen);
+}
+$file = OC_Filesystem::file_get_contents($_POST['path'] . '/' . $_POST['file']);
+if($_POST['method'] == 'new'){
$id = OC_Calendar_Calendar::addCalendar(OC_User::getUser(), $_POST['calname']);
OC_Calendar_Calendar::setCalendarActive($id, 1);
- $calid = $id;
- if($_POST["path"] != ""){
- $filename = $_POST["path"] . "/" . $_POST["file"];
+}else{
+ $calendar = OC_Calendar_App::getCalendar($_POST['id']);
+ if($calendar['userid'] != OC_USER::getUser()){
+ OC_JSON::error();
+ exit();
+ }
+ $id = $_POST['id'];
+}
+//analyse the calendar file
+if(is_writable('import_tmp/')){
+ $progressfopen = fopen($progressfile, 'w');
+ fwrite($progressfopen, '20');
+ fclose($progressfopen);
+}
+$searchfor = array('VEVENT', 'VTODO', 'VJOURNAL');
+$parts = $searchfor;
+$filearr = explode($nl, $file);
+$inelement = false;
+$parts = array();
+$i = 0;
+foreach($filearr as $line){
+ foreach($searchfor as $search){
+ if(substr_count($line, $search) == 1){
+ list($attr, $val) = explode(':', $line);
+ if($attr == 'BEGIN'){
+ $parts[]['begin'] = $i;
+ $inelement = true;
+ }
+ if($attr == 'END'){
+ $parts[count($parts) - 1]['end'] = $i;
+ $inelement = false;
+ }
+ }
+ }
+ $i++;
+}
+//import the calendar
+if(is_writable('import_tmp/')){
+ $progressfopen = fopen($progressfile, 'w');
+ fwrite($progressfopen, '40');
+ fclose($progressfopen);
+}
+$start = '';
+for ($i = 0; $i < $parts[0]['begin']; $i++) {
+ if($i == 0){
+ $start = $filearr[0];
}else{
- $filename = "/" . $_POST["file"];
+ $start .= $nl . $filearr[$i];
}
}
-$vcalendar = OC_Filesystem::file_get_contents($filename);
-$vcalendar = explode("BEGIN:VEVENT", $vcalendar);
-for($i = 1;$i < count($vcalendar);$i++){
- $vcalendar[$i] = "BEGIN:VEVENT" . $vcalendar[$i];
+$end = '';
+for($i = $parts[count($parts) - 1]['end'] + 1;$i <= count($filearr) - 1; $i++){
+ if($i == $parts[count($parts) - 1]['end'] + 1){
+ $end = $filearr[$parts[count($parts) - 1]['end'] + 1];
+ }else{
+ $end .= $nl . $filearr[$i];
+ }
}
-for($i = 1;$i < count($vcalendar) - 1;$i++){
- $vcalendar[$i] = $vcalendar[$i] . "END:VCALENDAR";
+if(is_writable('import_tmp/')){
+ $progressfopen = fopen($progressfile, 'w');
+ fwrite($progressfopen, '50');
+ fclose($progressfopen);
}
-for($i = 1;$i < count($vcalendar);$i++){
- $vcalendar[$i] = $vcalendar[0] . $vcalendar[$i];
+$importready = array();
+foreach($parts as $part){
+ for($i = $part['begin']; $i <= $part['end'];$i++){
+ if($i == $part['begin']){
+ $content = $filearr[$i];
+ }else{
+ $content .= $nl . $filearr[$i];
+ }
+ }
+ $importready[] = $start . $nl . $content . $nl . $end;
}
-for($i = 1;$i < count($vcalendar);$i++){
- OC_Calendar_Object::add($calid, $vcalendar[$i]);
+if(is_writable('import_tmp/')){
+ $progressfopen = fopen($progressfile, 'w');
+ fwrite($progressfopen, '70');
+ fclose($progressfopen);
}
-OC_JSON::success();
-?>
\ No newline at end of file
+if(count($parts) == 1){
+ OC_Calendar_Object::add($id, $file);
+}else{
+ foreach($importready as $import){
+ OC_Calendar_Object::add($id, $import);
+ }
+}
+//done the import
+if(is_writable('import_tmp/')){
+ $progressfopen = fopen($progressfile, 'w');
+ fwrite($progressfopen, '100');
+ fclose($progressfopen);
+}
+sleep(3);
+if(is_writable('import_tmp/')){
+ unlink($progressfile);
+}
+OC_JSON::success();
\ No newline at end of file
diff --git a/apps/calendar/import_tmp/Info b/apps/calendar/import_tmp/Info
new file mode 100644
index 00000000000..abafbce435c
--- /dev/null
+++ b/apps/calendar/import_tmp/Info
@@ -0,0 +1,2 @@
+This folder contains static files with the percentage of the import.
+Requires write permission
diff --git a/apps/calendar/index.php b/apps/calendar/index.php
index 8b8ac729588..12b51f564b4 100644
--- a/apps/calendar/index.php
+++ b/apps/calendar/index.php
@@ -10,15 +10,41 @@ require_once ('../../lib/base.php');
OC_Util::checkLoggedIn();
OC_Util::checkAppEnabled('calendar');
// Create default calendar ...
-$calendars = OC_Calendar_Calendar::allCalendars(OC_User::getUser());
+$calendars = OC_Calendar_Calendar::allCalendars(OC_User::getUser(), 1);
if( count($calendars) == 0){
OC_Calendar_Calendar::addCalendar(OC_User::getUser(),'Default calendar');
- $calendars = OC_Calendar_Calendar::allCalendars(OC_User::getUser());
+ $calendars = OC_Calendar_Calendar::allCalendars(OC_User::getUser(), 1);
}
-OC_UTIL::addScript('calendar', 'calendar');
-OC_UTIL::addStyle('calendar', 'style');
-OC_UTIL::addScript('', 'jquery.multiselect');
-OC_UTIL::addStyle('', 'jquery.multiselect');
-OC_APP::setActiveNavigationEntry('calendar_index');
-$output = new OC_TEMPLATE('calendar', 'calendar', 'user');
-$output -> printPage();
+$eventSources = array();
+foreach($calendars as $calendar){
+ $eventSources[] = OC_Calendar_Calendar::getEventSourceInfo($calendar);
+}
+//Fix currentview for fullcalendar
+if(OC_Preferences::getValue(OC_USER::getUser(), 'calendar', 'currentview', 'month') == "oneweekview"){
+ OC_Preferences::setValue(OC_USER::getUser(), "calendar", "currentview", "agendaWeek");
+}
+if(OC_Preferences::getValue(OC_USER::getUser(), 'calendar', 'currentview', 'month') == "onemonthview"){
+ OC_Preferences::setValue(OC_USER::getUser(), "calendar", "currentview", "month");
+}
+if(OC_Preferences::getValue(OC_USER::getUser(), 'calendar', 'currentview', 'month') == "listview"){
+ OC_Preferences::setValue(OC_USER::getUser(), "calendar", "currentview", "list");
+}
+
+OC_Util::addScript('3rdparty/fullcalendar', 'fullcalendar');
+OC_Util::addStyle('3rdparty/fullcalendar', 'fullcalendar');
+OC_Util::addScript('3rdparty/timepicker', 'jquery.ui.timepicker');
+OC_Util::addStyle('3rdparty/timepicker', 'jquery.ui.timepicker');
+if(OC_Preferences::getValue(OC_USER::getUser(), "calendar", "timezone") == null || OC_Preferences::getValue(OC_USER::getUser(), 'calendar', 'timezonedetection') == 'true'){
+ OC_UTIL::addScript('calendar', 'geo');
+}
+OC_Util::addScript('calendar', 'calendar');
+OC_Util::addStyle('calendar', 'style');
+OC_Util::addScript('', 'jquery.multiselect');
+OC_Util::addStyle('', 'jquery.multiselect');
+OC_App::setActiveNavigationEntry('calendar_index');
+$tmpl = new OC_Template('calendar', 'calendar', 'user');
+$tmpl->assign('eventSources', $eventSources);
+if(array_key_exists('showevent', $_GET)){
+ $tmpl->assign('showevent', $_GET['showevent']);
+}
+$tmpl->printPage();
diff --git a/apps/calendar/js/calendar.js b/apps/calendar/js/calendar.js
index 1582dcd67b3..afd1b692dd4 100644
--- a/apps/calendar/js/calendar.js
+++ b/apps/calendar/js/calendar.js
@@ -1,5 +1,5 @@
/**
- * Copyright (c) 2011 Georg Ehrke
+ * Copyright (c) 2012 Georg Ehrke
* Copyright (c) 2011 Bart Visscher
* This file is licensed under the Affero General Public License version 3 or
* later.
@@ -7,262 +7,18 @@
*/
Calendar={
- space:' ',
- firstdayofweek: '',
- weekend: '',
- Date:{
- normal_year_cal: [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31],
- leap_year_cal: [31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31],
- calw:function() {
- var dayofweek = this.current.getDay();
- if(dayofweek == 0) {
- dayofweek = 7;
- }
- var calw = Math.floor((this.doy() - dayofweek) / 7) + 1;
- return calw;
- },
-
- doy:function() {
- var cal = this.getnumberofdays(this.current.getFullYear());
- var doy = 0;
- for(var i = 0; i < this.current.getMonth(); i++) {
- doy = doy + cal[i];
- }
- doy = doy + this.current.getDate();
- return doy;
- },
-
- getnumberofdays:function(year) {
- if(this.checkforleapyear(year) == true) {
- var cal = this.leap_year_cal;
- } else {
- var cal = this.normal_year_cal;
- }
- return cal;
- },
-
- checkforleapyear:function(year2check) {
- if((year2check / 600) == Math.floor(year2check / 400)) {
- return true;
- }
- if((year2check / 4) == Math.floor(year2check / 4)) {
- if((year2check / 100) == Math.floor(year2check / 100)) {
- return false;
- }
- return true;
- }
- return false;
- },
-
- current:new Date(),
- forward_day:function(){
- this.current.setDate(this.current.getDate()+1);
- },
-
- forward_week:function(){
- this.current.setDate(this.current.getDate()+7);
- },
-
- forward_month:function(){
- this.current.setMonth(this.current.getMonth()+1);
- },
-
- backward_day:function(){
- this.current.setDate(this.current.getDate()-1);
- },
-
- backward_week:function(){
- this.current.setDate(this.current.getDate()-7);
- },
-
- backward_month:function(){
- this.current.setMonth(this.current.getMonth()-1);
- },
-
- },
UI:{
- weekdays: '',
- formatDayShort:function(day){
- if (typeof(day) == 'undefined'){
- day = Calendar.Date.current.getDay();
+ loading: function(isLoading){
+ if (isLoading){
+ $('#loading').show();
+ }else{
+ $('#loading').hide();
}
- return this.dayshort[day];
- },
- formatDayLong:function(day){
- if (typeof(day) == 'undefined'){
- day = Calendar.Date.current.getDay();
- }
- return this.daylong[day];
- },
- formatMonthShort:function(month){
- if (typeof(month) == 'undefined'){
- month = Calendar.Date.current.getMonth();
- }
- return this.monthshort[month];
- },
- formatMonthLong:function(month){
- if (typeof(month) == 'undefined'){
- month = Calendar.Date.current.getMonth();
- }
- return this.monthlong[month];
- },
- formatDate:function(date){
- return date[0] + '-' + date[1] + '-' + date[2];
- },
- formatTime:function(date){
- return date[3] + ':' + date[4];
- },
- updateView:function(task) {
- this.current.removeEvents();
- this.current.renderCal();
- this.current.showEvents();
- },
- currentview:'none',
- setCurrentView:function(view){
- if (view == this.currentview){
- return;
- }
- $('#'+this.currentview).hide();
- $('#'+this.currentview + "_radio").removeClass('active');
- this.currentview = view;
- //sending ajax request on every change view
- $("#sysbox").load(OC.filePath('calendar', 'ajax', 'changeview.php') + "?v="+view);
- //not necessary to check whether the response is true or not
- switch(view) {
- case "onedayview":
- this.current = this.OneDay;
- break;
- case "oneweekview":
- this.current = this.OneWeek;
- break;
- case "fourweeksview":
- this.current = this.FourWeeks;
- break;
- case "onemonthview":
- this.current = this.OneMonth;
- break;
- case "listview":
- this.current = this.List;
- break;
- default:
- alert('Unknown view:'+view);
- break;
- }
- $(document).ready(function() {
- $('#'+Calendar.UI.currentview).show();
- $('#'+Calendar.UI.currentview + "_radio")
- .addClass('active');
- Calendar.UI.updateView()
- });
- },
- drageventid: '',
- updateDate:function(direction){
- if(direction == 'forward' && this.current.forward) {
- this.current.forward();
- if(Calendar.Date.current.getMonth() == 11){
- this.loadEvents(Calendar.Date.current.getFullYear() + 1);
- }
- this.updateView();
- }
- if(direction == 'backward' && this.current.backward) {
- this.current.backward();
- if(Calendar.Date.current.getMonth() == 0){
- this.loadEvents(Calendar.Date.current.getFullYear() - 1);
- }
- this.updateView();
- }
- },
- events:[],
- loadEvents:function(year){
- if( typeof (year) == 'undefined') {
- this.events = [];
- year = Calendar.Date.current.getFullYear();
- }
- if( typeof (this.events[year]) == "undefined") {
- this.events[year] = []
- }
- $.getJSON(OC.filePath('calendar', 'ajax', 'getcal.php') + "?year=" + year, function(jsondata, status) {
- if(status == "nosession") {
- alert("You are not logged in. That can happen if you don't use owncloud for a long time.");
- document.location(oc_webroot);
- }
- if(status == "parsingfail" || typeof (jsondata) == "undefined") {
- $.ready(function() {
- $( "#parsingfail_dialog" ).dialog();
- });
- } else {
- if (typeof(jsondata[year]) != 'undefined'){
- Calendar.UI.calendars = jsondata['calendars'];
- Calendar.UI.events[year] = jsondata[year];
- }
- $(document).ready(function() {
- Calendar.UI.updateView();
- });
- }
- });
- window.setTimeout("Calendar.UI.loadEvents(" + year + ")", 120000);
- },
- getEventsForDate:function(date){
- var day = date.getDate();
- var month = date.getMonth();
- var year = date.getFullYear();
- if( typeof (this.events[year]) == "undefined") {
- this.loadEvents(year);
- return false;
- }
- if( typeof (this.events[year][month]) == "undefined") {
- return false;
- }
- if( typeof (this.events[year][month][day]) == "undefined") {
- return false;
- }
- return this.events[year][month][day];
- },
- createEventsForDate:function(date, week){
- events = this.getEventsForDate(date);
- if (!events) {
- return;
- }
- var weekday = (date.getDay()+7-Calendar.firstdayofweek)%7;
- if( typeof (events["allday"]) != "undefined") {
- var eventnumber = 1;
- var eventcontainer = this.current.getEventContainer(week, weekday, "allday");
- while( typeof (events["allday"][eventnumber]) != "undefined") {
- this.addEventLabel(eventcontainer, events['allday'][eventnumber]);
- eventnumber++;
- }
- }
- for(var time = 0; time <= 23; time++) {
- if( typeof (events[time]) != "undefined") {
- var eventnumber = 1;
- var eventcontainer = this.current.getEventContainer(week, weekday, time);
- while( typeof (events[time][eventnumber]) != "undefined") {
- this.addEventLabel(eventcontainer, events[time][eventnumber]);
- eventnumber++;
- }
- }
- }
- },
- addEventLabel:function(eventcontainer, event){
- var event_holder = this.current.createEventLabel(event)
- .addClass('event')
- .data('event_info', event)
- .hover(this.createEventPopup,
- this.hideEventPopup)
- .draggable({
- drag: function() {
- Calendar.UI.drageventid = event.id;
- }
- })
- .click(this.editEvent);
- var color = this.calendars[event['calendarid']]['color'];
- if (color){
- event_holder.css('background-color', color)
- .addClass('colored');
- }
- eventcontainer.append(event_holder);
},
startEventDialog:function(){
+ Calendar.UI.loading(false);
+ $('.tipsy').remove();
+ $('#calendar_holder').fullCalendar('unselect');
Calendar.UI.lockTime();
$( "#from" ).datepicker({
dateFormat : 'dd-mm-yy'
@@ -270,6 +26,12 @@ Calendar={
$( "#to" ).datepicker({
dateFormat : 'dd-mm-yy'
});
+ $('#fromtime').timepicker({
+ showPeriodLabels: false
+ });
+ $('#totime').timepicker({
+ showPeriodLabels: false
+ });
$('#category').multiselect({
header: false,
noneSelectedText: $('#category').attr('title'),
@@ -277,6 +39,19 @@ Calendar={
minWidth:'auto',
classes: 'category',
});
+ Calendar.UI.repeat('init');
+ $('#end').change(function(){
+ Calendar.UI.repeat('end');
+ });
+ $('#repeat').change(function(){
+ Calendar.UI.repeat('repeat');
+ });
+ $('#advanced_year').change(function(){
+ Calendar.UI.repeat('year');
+ });
+ $('#advanced_month').change(function(){
+ Calendar.UI.repeat('month');
+ });
$('#event').dialog({
width : 500,
close : function(event, ui) {
@@ -284,46 +59,40 @@ Calendar={
}
});
},
- newEvent:function(selector, time){
- var date_info = $(selector).data('date_info');
- var dayofmonth = date_info.getDate();
- var month = date_info.getMonth();
- var year = date_info.getFullYear();
- if(dayofmonth <= 9){
- dayofmonth = '0' + dayofmonth;
+ newEvent:function(start, end, allday){
+ start = Math.round(start.getTime()/1000);
+ if (end){
+ end = Math.round(end.getTime()/1000);
}
- month++;
- if(month <= 9){
- month = '0' + month;
- }
- var date = String(dayofmonth) + String(month) + String(year);
if($('#event').dialog('isOpen') == true){
// TODO: save event
$('#event').dialog('destroy').remove();
}else{
- $('#dialog_holder').load(OC.filePath('calendar', 'ajax', 'neweventform.php') + '?d=' + date + '&t=' + time, Calendar.UI.startEventDialog);
+ Calendar.UI.loading(true);
+ $('#dialog_holder').load(OC.filePath('calendar', 'ajax', 'neweventform.php'), {start:start, end:end, allday:allday?1:0}, Calendar.UI.startEventDialog);
}
},
- editEvent:function(event){
- event.stopPropagation();
- var event_data = $(this).data('event_info');
- var id = event_data.id;
+ editEvent:function(calEvent, jsEvent, view){
+ var id = calEvent.id;
if($('#event').dialog('isOpen') == true){
// TODO: save event
$('#event').dialog('destroy').remove();
}else{
+ Calendar.UI.loading(true);
$('#dialog_holder').load(OC.filePath('calendar', 'ajax', 'editeventform.php') + '?id=' + id, Calendar.UI.startEventDialog);
}
},
submitDeleteEventForm:function(url){
- var post = $( "#event_form" ).serialize();
- $("#errorbox").empty();
+ var post = $( '#event_form' ).serialize();
+ $('#errorbox').empty();
+ Calendar.UI.loading(true);
$.post(url, post, function(data){
+ Calendar.UI.loading(false);
if(data.status == 'success'){
+ $('#calendar_holder').fullCalendar('removeEvents', $('#event_form input[name=id]').val());
$('#event').dialog('destroy').remove();
- Calendar.UI.loadEvents();
} else {
- $("#errorbox").html("Deletion failed");
+ $('#errorbox').html(t('calendar', 'Deletion failed'));
}
}, "json");
@@ -331,30 +100,32 @@ Calendar={
validateEventForm:function(url){
var post = $( "#event_form" ).serialize();
$("#errorbox").empty();
+ Calendar.UI.loading(true);
$.post(url, post,
function(data){
+ Calendar.UI.loading(false);
if(data.status == "error"){
- var output = "Missing fields: ";
+ var output = missing_field + ": ";
if(data.title == "true"){
- output = output + "Title ";
+ output = output + missing_field_title + " ";
}
if(data.cal == "true"){
- output = output + "Calendar ";
+ output = output + missing_field_calendar + " ";
}
if(data.from == "true"){
- output = output + "From Date ";
+ output = output + missing_field_fromdate + " ";
}
if(data.fromtime == "true"){
- output = output + "From Time ";
+ output = output + missing_field_fromtime + " ";
}
if(data.to == "true"){
- output = output + "To Date ";
+ output = output + missing_field_todate + " ";
}
if(data.totime == "true"){
- output = output + "To Time ";
+ output = output + missing_field_totime + " ";
}
if(data.endbeforestart == "true"){
- output = "The event ends before it starts!";
+ output = output + missing_field_startsbeforeends + "! ";
}
if(data.dberror == "true"){
output = "There was a database fail!";
@@ -363,65 +134,65 @@ Calendar={
} else
if(data.status == 'success'){
$('#event').dialog('destroy').remove();
- Calendar.UI.loadEvents();
+ $('#calendar_holder').fullCalendar('refetchEvents');
}
},"json");
},
- moveevent:function(eventid, newstartdate){
- $.post(OC.filePath('calendar', 'ajax', 'moveevent.php'), { id: eventid, newdate: newstartdate},
+ moveEvent:function(event, dayDelta, minuteDelta, allDay, revertFunc){
+ $('.tipsy').remove();
+ Calendar.UI.loading(true);
+ $.post(OC.filePath('calendar', 'ajax', 'moveevent.php'), { id: event.id, dayDelta: dayDelta, minuteDelta: minuteDelta, allDay: allDay?1:0, lastmodified: event.lastmodified},
function(data) {
- console.log("Event moved successfully");
+ Calendar.UI.loading(false);
+ if (data.status == 'success'){
+ event.lastmodified = data.lastmodified;
+ console.log("Event moved successfully");
+ }else{
+ revertFunc();
+ $('#calendar_holder').fullCalendar('refetchEvents');
+ }
+ });
+ },
+ resizeEvent:function(event, dayDelta, minuteDelta, revertFunc){
+ $('.tipsy').remove();
+ Calendar.UI.loading(true);
+ $.post(OC.filePath('calendar', 'ajax', 'resizeevent.php'), { id: event.id, dayDelta: dayDelta, minuteDelta: minuteDelta, lastmodified: event.lastmodified},
+ function(data) {
+ Calendar.UI.loading(false);
+ if (data.status == 'success'){
+ event.lastmodified = data.lastmodified;
+ console.log("Event resized successfully");
+ }else{
+ revertFunc();
+ $('#calendar_holder').fullCalendar('refetchEvents');
+ }
});
},
showadvancedoptions:function(){
- $("#advanced_options").css("display", "block");
+ $("#advanced_options").slideDown('slow');
$("#advanced_options_button").css("display", "none");
},
- createEventPopup:function(e){
- var popup = $(this).data('popup');
- if (!popup){
- var event = $(this).data('event_info');
- popup = $(document.createElement('div'));
- $(this).data('popup', popup).append(popup);
- popup.addClass('popup')
- popup.addClass('event_popup')
- .html(Calendar.UI.getEventPopupText(event));
+ showadvancedoptionsforrepeating:function(){
+ if($("#advanced_options_repeating").is(":hidden")){
+ $('#advanced_options_repeating').slideDown('slow');
+ }else{
+ $('#advanced_options_repeating').slideUp('slow');
}
- popup.css('left', -(popup.width() - $(this).width())/2)
- .show();
- },
- hideEventPopup:function(){
- $(this).data('popup').hide();
},
getEventPopupText:function(event){
- var startdate = this.formatDate(event.startdate)
- var starttime = this.formatTime(event.startdate)
- var enddate = this.formatDate(event.enddate)
- var endtime = this.formatTime(event.enddate)
- if (event.allday){
- var timespan = startdate;
- if (event.startdate[2] != parseInt(event.enddate[2])-1){
- timespan += ' - ' + enddate;
- }
+ if (event.allDay){
+ var timespan = $.fullCalendar.formatDates(event.start, event.end, 'ddd d MMMM[ yyyy]{ -[ddd d] MMMM yyyy}', {monthNamesShort: monthNamesShort, monthNames: monthNames, dayNames: dayNames, dayNamesShort: dayNamesShort}); //t('calendar', "ddd d MMMM[ yyyy]{ -[ddd d] MMMM yyyy}")
}else{
- var start = startdate + ' ' + starttime;
- if (startdate == enddate){
- var end = endtime;
- }else{
- var end = enddate + ' ' + endtime;
- }
- var timespan = start + ' - ' + end;
+ var timespan = $.fullCalendar.formatDates(event.start, event.end, 'ddd d MMMM[ yyyy] ' + defaulttime + '{ -[ ddd d MMMM yyyy]' + defaulttime + '}', {monthNamesShort: monthNamesShort, monthNames: monthNames, dayNames: dayNames, dayNamesShort: dayNamesShort}); //t('calendar', "ddd d MMMM[ yyyy] HH:mm{ -[ ddd d MMMM yyyy] HH:mm}")
+ // Tue 18 October 2011 08:00 - 16:00
}
- return '' + timespan + ' '
- + ' '
- + '' + event.description + ' ';
- },
- addDateInfo:function(selector, date){
- $(selector).data('date_info', date);
- },
- switch2Today:function(){
- Calendar.Date.current = new Date();
- Calendar.UI.updateView();
+ var html =
+ '' + event.title + '
' +
+ '' + timespan + '
';
+ if (event.description){
+ html += '' + event.description + '
';
+ }
+ return html;
},
lockTime:function(){
if($('#allday_checkbox').is(':checked')) {
@@ -441,24 +212,167 @@ Calendar={
$('#caldav_url').show();
$("#caldav_url_close").show();
},
- deleteCalendar:function(calid){
- var check = confirm("Do you really want to delete this calendar?");
- if(check == false){
- return false;
- }else{
- $.post(OC.filePath('calendar', 'ajax', 'deletecalendar.php'), { calendarid: calid},
- function(data) {
- Calendar.UI.loadEvents();
- $('#choosecalendar_dialog').dialog('destroy').remove();
- Calendar.UI.Calendar.overview();
- });
+ initScroll:function(){
+ if(window.addEventListener)
+ document.addEventListener('DOMMouseScroll', Calendar.UI.scrollCalendar);
+ //}else{
+ document.onmousewheel = Calendar.UI.scrollCalendar;
+ //}
+ },
+ scrollCalendar:function(event){
+ $('.tipsy').remove();
+ var direction;
+ if(event.detail){
+ if(event.detail < 0){
+ direction = 'top';
+ }else{
+ direction = 'down';
+ }
}
+ if (event.wheelDelta){
+ if(event.wheelDelta > 0){
+ direction = 'top';
+ }else{
+ direction = 'down';
+ }
+ }
+ var scroll = $(document).scrollTop(),
+ doc_height = $(document).height(),
+ win_height = $(window).height();
+ if(direction == 'down' && win_height == (doc_height - scroll)){
+ $('#calendar_holder').fullCalendar('next');
+ $(document).scrollTop(0);
+ event.preventDefault();
+ }else if (direction == 'top' && scroll == 0) {
+ $('#calendar_holder').fullCalendar('prev');
+ $(document).scrollTop(win_height);
+ event.preventDefault();
+ }
+ },
+ repeat:function(task){
+ if(task=='init'){
+ $('#byweekno').multiselect({
+ header: false,
+ noneSelectedText: $('#advanced_byweekno').attr('title'),
+ selectedList: 2,
+ minWidth:'auto'
+ });
+ $('#weeklyoptions').multiselect({
+ header: false,
+ noneSelectedText: $('#weeklyoptions').attr('title'),
+ selectedList: 2,
+ minWidth:'auto'
+ });
+ $('input[name="bydate"]').datepicker({
+ dateFormat : 'dd-mm-yy'
+ });
+ $('#byyearday').multiselect({
+ header: false,
+ noneSelectedText: $('#byyearday').attr('title'),
+ selectedList: 2,
+ minWidth:'auto'
+ });
+ $('#bymonth').multiselect({
+ header: false,
+ noneSelectedText: $('#bymonth').attr('title'),
+ selectedList: 2,
+ minWidth:'auto'
+ });
+ $('#bymonthday').multiselect({
+ header: false,
+ noneSelectedText: $('#bymonthday').attr('title'),
+ selectedList: 2,
+ minWidth:'auto'
+ });
+ Calendar.UI.repeat('end');
+ Calendar.UI.repeat('month');
+ Calendar.UI.repeat('year');
+ Calendar.UI.repeat('repeat');
+ }
+ if(task == 'end'){
+ $('#byoccurrences').css('display', 'none');
+ $('#bydate').css('display', 'none');
+ if($('#end option:selected').val() == 'count'){
+ $('#byoccurrences').css('display', 'block');
+ }
+ if($('#end option:selected').val() == 'date'){
+ $('#bydate').css('display', 'block');
+ }
+ }
+ if(task == 'repeat'){
+ $('#advanced_month').css('display', 'none');
+ $('#advanced_weekday').css('display', 'none');
+ $('#advanced_weekofmonth').css('display', 'none');
+ $('#advanced_byyearday').css('display', 'none');
+ $('#advanced_bymonth').css('display', 'none');
+ $('#advanced_byweekno').css('display', 'none');
+ $('#advanced_year').css('display', 'none');
+ $('#advanced_bymonthday').css('display', 'none');
+ if($('#repeat option:selected').val() == 'monthly'){
+ $('#advanced_month').css('display', 'block');
+ Calendar.UI.repeat('month');
+ }
+ if($('#repeat option:selected').val() == 'weekly'){
+ $('#advanced_weekday').css('display', 'block');
+ }
+ if($('#repeat option:selected').val() == 'yearly'){
+ $('#advanced_year').css('display', 'block');
+ Calendar.UI.repeat('year');
+ }
+ if($('#repeat option:selected').val() == 'doesnotrepeat'){
+ $('#advanced_options_repeating').slideUp('slow');
+ }
+ }
+ if(task == 'month'){
+ $('#advanced_weekday').css('display', 'none');
+ $('#advanced_weekofmonth').css('display', 'none');
+ if($('#advanced_month_select option:selected').val() == 'weekday'){
+ $('#advanced_weekday').css('display', 'block');
+ $('#advanced_weekofmonth').css('display', 'block');
+ }
+ }
+ if(task == 'year'){
+ $('#advanced_weekday').css('display', 'none');
+ $('#advanced_byyearday').css('display', 'none');
+ $('#advanced_bymonth').css('display', 'none');
+ $('#advanced_byweekno').css('display', 'none');
+ $('#advanced_bymonthday').css('display', 'none');
+ if($('#advanced_year_select option:selected').val() == 'byyearday'){
+ //$('#advanced_byyearday').css('display', 'block');
+ }
+ if($('#advanced_year_select option:selected').val() == 'byweekno'){
+ $('#advanced_byweekno').css('display', 'block');
+ }
+ if($('#advanced_year_select option:selected').val() == 'bydaymonth'){
+ $('#advanced_bymonth').css('display', 'block');
+ $('#advanced_bymonthday').css('display', 'block');
+ $('#advanced_weekday').css('display', 'block');
+ }
+ }
+
+ },
+ setViewActive: function(view){
+ $('#view input[type="button"]').removeClass('active');
+ var id;
+ switch (view) {
+ case 'agendaWeek':
+ id = 'oneweekview_radio';
+ break;
+ case 'month':
+ id = 'onemonthview_radio';
+ break;
+ case 'list':
+ id = 'listview_radio';
+ break;
+ }
+ $('#'+id).addClass('active');
},
Calendar:{
overview:function(){
if($('#choosecalendar_dialog').dialog('isOpen') == true){
$('#choosecalendar_dialog').dialog('moveToTop');
}else{
+ Calendar.UI.loading(true);
$('#dialog_holder').load(OC.filePath('calendar', 'ajax', 'choosecalendar.php'), function(){
$('#choosecalendar_dialog').dialog({
width : 600,
@@ -466,15 +380,24 @@ Calendar={
$(this).dialog('destroy').remove();
}
});
+ Calendar.UI.loading(false);
});
}
},
activation:function(checkbox, calendarid)
{
+ Calendar.UI.loading(true);
$.post(OC.filePath('calendar', 'ajax', 'activation.php'), { calendarid: calendarid, active: checkbox.checked?1:0 },
function(data) {
- checkbox.checked = data == 1;
- Calendar.UI.loadEvents();
+ Calendar.UI.loading(false);
+ if (data.status == 'success'){
+ checkbox.checked = data.active == 1;
+ if (data.active == 1){
+ $('#calendar_holder').fullCalendar('addEventSource', data.eventSource);
+ }else{
+ $('#calendar_holder').fullCalendar('removeEventSource', data.eventSource.url);
+ }
+ }
});
},
newCalendar:function(object){
@@ -489,6 +412,60 @@ Calendar={
function(){Calendar.UI.Calendar.colorPicker(this)});
$(object).closest('tr').after(tr).hide();
},
+ deleteCalendar:function(calid){
+ var check = confirm("Do you really want to delete this calendar?");
+ if(check == false){
+ return false;
+ }else{
+ $.post(OC.filePath('calendar', 'ajax', 'deletecalendar.php'), { calendarid: calid},
+ function(data) {
+ if (data.status == 'success'){
+ var url = 'ajax/events.php?calendar_id='+calid;
+ $('#calendar_holder').fullCalendar('removeEventSource', url);
+ $('#choosecalendar_dialog').dialog('destroy').remove();
+ Calendar.UI.Calendar.overview();
+ }
+ });
+ }
+ },
+ submit:function(button, calendarid){
+ var displayname = $.trim($("#displayname_"+calendarid).val());
+ var active = $("#edit_active_"+calendarid+":checked").length;
+ var description = $("#description_"+calendarid).val();
+ var calendarcolor = $("#calendarcolor_"+calendarid).val();
+ if(displayname == ''){
+ $("#displayname_"+calendarid).css('background-color', '#FF2626');
+ $("#displayname_"+calendarid).focus(function(){
+ $("#displayname_"+calendarid).css('background-color', '#F8F8F8');
+ });
+ }
+
+ var url;
+ if (calendarid == 'new'){
+ url = OC.filePath('calendar', 'ajax', 'createcalendar.php');
+ }else{
+ url = OC.filePath('calendar', 'ajax', 'updatecalendar.php');
+ }
+ $.post(url, { id: calendarid, name: displayname, active: active, description: description, color: calendarcolor },
+ function(data){
+ if(data.status == 'success'){
+ $(button).closest('tr').prev().html(data.page).show().next().remove();
+ $('#calendar_holder').fullCalendar('removeEventSource', data.eventSource.url);
+ $('#calendar_holder').fullCalendar('addEventSource', data.eventSource);
+ if (calendarid == 'new'){
+ $('#choosecalendar_dialog > table').append(' ');
+ }
+ }else{
+ $("#displayname_"+calendarid).css('background-color', '#FF2626');
+ $("#displayname_"+calendarid).focus(function(){
+ $("#displayname_"+calendarid).css('background-color', '#F8F8F8');
+ });
+ }
+ }, 'json');
+ },
+ cancel:function(button, calendarid){
+ $(button).closest('tr').prev().show().next().remove();
+ },
colorPicker:function(container){
// based on jquery-colorpicker at jquery.webspirited.com
var obj = $('.colorpicker', container);
@@ -514,428 +491,244 @@ Calendar={
position: 'absolute',
left: -10000
});
- },
- submit:function(button, calendarid){
- var displayname = $("#displayname_"+calendarid).val();
- var active = $("#edit_active_"+calendarid+":checked").length;
- var description = $("#description_"+calendarid).val();
- var calendarcolor = $("#calendarcolor_"+calendarid).val();
-
- var url;
- if (calendarid == 'new'){
- url = "ajax/createcalendar.php";
- }else{
- url = "ajax/updatecalendar.php";
- }
- $.post(url, { id: calendarid, name: displayname, active: active, description: description, color: calendarcolor },
- function(data){
- if(data.error == "true"){
- }else{
- $(button).closest('tr').prev().html(data.data).show().next().remove();
- Calendar.UI.loadEvents();
- }
- }, 'json');
- },
- cancel:function(button, calendarid){
- $(button).closest('tr').prev().show().next().remove();
- },
- },/*
- OneDay:{
- forward:function(){
- Calendar.Date.forward_day();
- },
- backward:function(){
- Calendar.Date.backward_day();
- },
- removeEvents:function(){
- $("#onedayview .calendar_row").empty();
- },
- renderCal:function(){
- $("#datecontrol_date").val(Calendar.UI.formatDayShort() + Calendar.space + Calendar.Date.current.getDate() + Calendar.space + Calendar.UI.formatMonthShort() + Calendar.space + Calendar.Date.current.getFullYear());
- $("#onedayview_today").html(Calendar.UI.formatDayLong() + Calendar.space + Calendar.Date.current.getDate() + Calendar.space + Calendar.UI.formatMonthShort());
- Calendar.UI.addDateInfo('#onedayview_today', new Date(Calendar.Date.current));
- },
- showEvents:function(){
- Calendar.UI.createEventsForDate(Calendar.Date.current, 0);
- },
- getEventContainer:function(week, weekday, when){
- return $("#onedayview ." + when);
- },
- createEventLabel:function(event){
- var time = '';
- if (!event['allday']){
- time = '' + Calendar.UI.formatTime(event['startdate']) + ' - ' + Calendar.UI.formatTime(event['enddate']) + ' ';
- }
- return $(document.createElement('p'))
- .html(time + event['description'])
- },
- },*/
- OneWeek:{
- forward:function(){
- Calendar.Date.forward_week();
- },
- backward:function(){
- Calendar.Date.backward_week();
- },
- removeEvents:function(){
- for( i = 0; i <= 6; i++) {
- $("#oneweekview ." + Calendar.UI.weekdays[i]).empty();
- }
- $("#oneweekview .thisday").removeClass("thisday");
- },
- renderCal:function(){
- $("#datecontrol_date").val(Calendar.UI.cw_label + ": " + Calendar.Date.calw());
- var dates = this.generateDates();
- var today = new Date();
- for(var i = 0; i <= 6; i++){
- $("#oneweekview th." + Calendar.UI.weekdays[i]).html(Calendar.UI.formatDayShort((i+Calendar.firstdayofweek)%7) + Calendar.space + dates[i].getDate() + Calendar.space + Calendar.UI.formatMonthShort(dates[i].getMonth()));
- $("#oneweekview td." + Calendar.UI.weekdays[i] + ".allday").attr('title', dates[i].getDate() + "." + String(parseInt(dates[i].getMonth()) + 1) + "." + dates[i].getFullYear() + "-" + "allday");
- $("#oneweekview td." + Calendar.UI.weekdays[i] + ".allday").droppable({
- drop: function() {
- Calendar.UI.moveevent(Calendar.UI.drageventid, this.title);
- Calendar.UI.loadEvents();
- }
- });
- for(var ii = 0;ii <= 23; ii++){
- $("#oneweekview td." + Calendar.UI.weekdays[i] + "." + String(ii)).attr('title', dates[i].getDate() + "." + String(parseInt(dates[i].getMonth()) + 1) + "." + dates[i].getFullYear() + "-" + String(ii) + ":00");
- $("#oneweekview td." + Calendar.UI.weekdays[i] + "." + String(ii)).droppable({
- drop: function() {
- Calendar.UI.moveevent(Calendar.UI.drageventid, this.title);
- Calendar.UI.loadEvents();
- }
- });
- }
- if(dates[i].getDate() == today.getDate() && dates[i].getMonth() == today.getMonth() && dates[i].getFullYear() == today.getFullYear()){
- $("#oneweekview ." + Calendar.UI.weekdays[i]).addClass("thisday");
- }
- Calendar.UI.addDateInfo('#oneweekview th.' + Calendar.UI.weekdays[i], dates[i]);
- }
- },
- showEvents:function(){
- var dates = this.generateDates();
- for(var weekday = 0; weekday <= 6; weekday++) {
- Calendar.UI.createEventsForDate(dates[weekday], 0);
- }
- },
- getEventContainer:function(week, weekday, when){
- return $("#oneweekview ." + Calendar.UI.weekdays[weekday] + "." + when);
- },
- createEventLabel:function(event){
- var time = '';
- if (!event['allday']){
- time = '' + Calendar.UI.formatTime(event['startdate']) + ' - ' + Calendar.UI.formatTime(event['enddate']) + ' ';
- }
- return $(document.createElement('p'))
- .html(time + event['description'])
- },
- generateDates:function(){
- var dates = new Array();
- var date = new Date(Calendar.Date.current)
- var dayofweek = date.getDay();
- if(dayofweek == 0) {
- dayofweek = 7;
- }
- if(Calendar.firstdayofweek > dayofweek){
- date.setDate(date.getDate() - dayofweek + Calendar.firstdayofweek - 7);
- }else{
- date.setDate(date.getDate() - dayofweek + Calendar.firstdayofweek);
- }
- for(var i = 0; i <= 6; i++) {
- dates[i] = new Date(date)
- date.setDate(date.getDate() + 1);
- }
- return dates;
- },
- },/*
- FourWeeks:{
- forward:function(){
- Calendar.Date.forward_week();
- },
- backward:function(){
- Calendar.Date.backward_week();
- },
- removeEvents:function(){
- $('#fourweeksview .day.thisday').removeClass('thisday');
- $('#fourweeksview .day .events').empty();
- },
- renderCal:function(){
- var calw1 = Calendar.Date.calw();
- var calw2 = calw1 + 1;
- var calw3 = calw1 + 2;
- var calw4 = calw1 + 3;
- switch(calw1) {
- case 50:
- calw4 = 1;
- break;
- case 51:
- calw3 = 1;
- calw4 = 2;
- break;
- case 52:
- calw2 = 1;
- calw3 = 2;
- calw4 = 3;
- break;
- }
- var calwplusfour = calw4;
- var dates = this.generateDates();
- var week = 1;
- var weekday = 0;
- var today = new Date();
- for(var i = 0; i <= 27; i++){
- var dayofmonth = dates[i].getDate();
- var month = dates[i].getMonth();
- var year = dates[i].getFullYear();
- $("#fourweeksview .week_" + week + " ." + Calendar.UI.weekdays[weekday] + " .dateinfo").html(dayofmonth + Calendar.space + Calendar.UI.formatMonthShort(month));
- if(dayofmonth == today.getDate() && month == today.getMonth() && year == today.getFullYear()){
- $("#fourweeksview .week_" + week + " ." + Calendar.UI.weekdays[weekday]).addClass('thisday');
- }
- Calendar.UI.addDateInfo('#fourweeksview .week_' + week + ' .' + Calendar.UI.weekdays[weekday], dates[i]);
- if(weekday == 6){
- weekday = 0;
- week++;
- }else{
- weekday++;
- }
- }
- $("#fourweeksview .week_1 .calw").html(calw1);
- $("#fourweeksview .week_2 .calw").html(calw2);
- $("#fourweeksview .week_3 .calw").html(calw3);
- $("#fourweeksview .week_4 .calw").html(calw4);
- $("#datecontrol_date").val(Calendar.UI.cws_label + ": " + Calendar.Date.calw() + " - " + calwplusfour);
- },
- showEvents:function(){
- var dates = this.generateDates();
- var weekdaynum = 0;
- var weeknum = 1;
- for(var i = 0; i <= 27; i++) {
- Calendar.UI.createEventsForDate(dates[i], weeknum);
- if(weekdaynum == 6){
- weekdaynum = 0;
- weeknum++;
- }else{
- weekdaynum++;
- }
- }
- },
- getEventContainer:function(week, weekday, when){
- return $("#fourweeksview .week_" + week + " .day." + Calendar.UI.weekdays[weekday] + " .events");
- },
- createEventLabel:function(event){
- var time = '';
- if (!event['allday']){
- time = '' + Calendar.UI.formatTime(event['startdate']) + ' ';
- }
- return $(document.createElement('p'))
- .html(time + event['description'])
- },
- generateDates:function(){
- var dates = new Array();
- var date = new Date(Calendar.Date.current)
- var dayofweek = date.getDay();
- if(dayofweek == 0) {
- dayofweek = 7;
- }
- date.setDate(date.getDate() - dayofweek + 1);
- for(var i = 0; i <= 27; i++) {
- dates[i] = new Date(date)
- date.setDate(date.getDate() + 1);
- }
- return dates;
- },
- },*/
- OneMonth:{
- forward:function(){
- Calendar.Date.forward_month();
- },
- backward:function(){
- Calendar.Date.backward_month();
- },
- removeEvents:function(){
- $('#onemonthview .day.thisday').removeClass('thisday');
- $('#onemonthview .day .events').empty();
- },
- renderCal:function(){
- $("#datecontrol_date").val(Calendar.UI.formatMonthLong() + Calendar.space + Calendar.Date.current.getFullYear());
- var cal = Calendar.Date.getnumberofdays(Calendar.Date.current.getFullYear());
- var monthview_dayofweek = Calendar.Date.current.getDay();
- var monthview_dayofmonth = Calendar.Date.current.getDate();
- for(var i = monthview_dayofmonth; i > 1; i--) {
- if(monthview_dayofweek == 0) {
- monthview_dayofweek = 6;
- } else {
- monthview_dayofweek--;
- }
- }
- $("#onemonthview .week_5").hide();
- $("#onemonthview .week_6").hide();
- this.rows = monthview_dayofweek + cal[Calendar.Date.current.getMonth()];
- this.rows = this.rows / 7;
- this.rows = Math.ceil(this.rows);
- var dates = this.generateDates();
- var week = 1;
- var weekday = 0;
- var today = new Date();
- for(var i = 0; i <= 41; i++){
- var dayofmonth = dates[i].getDate();
- var month = dates[i].getMonth();
- var year = dates[i].getFullYear();
- $("#onemonthview .week_" + week + " ." + Calendar.UI.weekdays[weekday] + " .dateinfo").html(dayofmonth + Calendar.space + Calendar.UI.formatMonthShort(month));
- $("#onemonthview .week_" + week + " ." + Calendar.UI.weekdays[weekday]).attr('title', dayofmonth + "." + String(parseInt(month) + 1) + "." + year);
- $("#onemonthview .week_" + week + " ." + Calendar.UI.weekdays[weekday]).droppable({
- drop: function() {
- Calendar.UI.moveevent(Calendar.UI.drageventid, this.title);
- Calendar.UI.loadEvents();
- }
- });
- if(dayofmonth == today.getDate() && month == today.getMonth() && year == today.getFullYear()){
- $("#onemonthview .week_" + week + " ." + Calendar.UI.weekdays[weekday]).addClass('thisday');
- }
- Calendar.UI.addDateInfo('#onemonthview .week_' + week + ' .' + Calendar.UI.weekdays[weekday], dates[i]);
- if(weekday == 6){
- weekday = 0;
- week++;
- }else{
- weekday++;
- }
- }
- if(this.rows == 4){
- for(var i = 1;i <= 6;i++){
- $("#onemonthview .week_" + String(i)).height("23%");
- }
- }
- if(this.rows == 5) {
- $("#onemonthview .week_5").show();
- for(var i = 1;i <= 6;i++){
- $("#onemonthview .week_" + String(i)).height("18%");
- }
- }
- if(this.rows == 6) {
- $("#onemonthview .week_5").show();
- $("#onemonthview .week_6").show();
- for(var i = 1;i <= 6;i++){
- $("#onemonthview .week_" + String(i)).height("14%");
- }
- }
- },
- showEvents:function(){
- var dates = this.generateDates();
- var weekdaynum = 0;
- var weeknum = 1;
- for(var i = 0; i <= 41; i++) {
- Calendar.UI.createEventsForDate(dates[i], weeknum);
- if(weekdaynum == 6){
- weekdaynum = 0;
- weeknum++;
- }else{
- weekdaynum++;
- }
- }
- },
- getEventContainer:function(week, weekday, when){
- return $("#onemonthview .week_" + week + " .day." + Calendar.UI.weekdays[weekday] + " .events");
- },
- createEventLabel:function(event){
- var time = '';
- if (!event['allday']){
- time = '' + Calendar.UI.formatTime(event['startdate']) + ' ';
- }
- return $(document.createElement('p'))
- .html(time + event['description'])
- },
- generateDates:function(){
- var dates = new Array();
- var date = new Date(Calendar.Date.current)
- date.setDate(1);
- var dayofweek = date.getDay();
- if(dayofweek == 0) {
- dayofweek = 7;
- this.rows++;
- }
- if(Calendar.firstdayofweek > dayofweek){
- date.setDate(date.getDate() - dayofweek + Calendar.firstdayofweek - 7);
- }else{
- date.setDate(date.getDate() - dayofweek + Calendar.firstdayofweek);
- }
- for(var i = 0; i <= 41; i++) {
- dates[i] = new Date(date)
- date.setDate(date.getDate() + 1);
- }
- return dates;
- },
- },
- List:{
- removeEvents:function(){
- this.eventContainer = $('#listview #events').empty();
- this.startdate = new Date();
- this.enddate = new Date();
- this.enddate.setDate(this.enddate.getDate());
- },
- renderCal:function(){
- var today = new Date();
- $('#datecontrol_date').val(this.formatDate(Calendar.Date.current));
- },
- showEvents:function(){
- this.renderMoreBefore();
- this.renderMoreAfter();
- },
- formatDate:function(date){
- return Calendar.UI.formatDayShort(date.getDay())
- + Calendar.space
- + date.getDate()
- + Calendar.space
- + Calendar.UI.formatMonthShort(date.getMonth())
- + Calendar.space
- + date.getFullYear();
- },
- createDay:function(date) {
- return $(document.createElement('div'))
- .addClass('day')
- .html(this.formatDate(date));
- },
- renderMoreBefore:function(){
- var date = Calendar.UI.List.startdate;
- for(var i = 0; i <= 13; i++) {
- if (Calendar.UI.getEventsForDate(date)) {
- Calendar.UI.List.dayContainer=Calendar.UI.List.createDay(date);
- Calendar.UI.createEventsForDate(date, 0);
- Calendar.UI.List.eventContainer.prepend(Calendar.UI.List.dayContainer);
- }
- date.setDate(date.getDate()-1);
- }
- var start = Calendar.UI.List.formatDate(date);
- $('#listview #more_before').html(String(Calendar.UI.more_before).replace('{startdate}', start));
- },
- renderMoreAfter:function(){
- var date = Calendar.UI.List.enddate;
- for(var i = 0; i <= 13; i++) {
- if (Calendar.UI.getEventsForDate(date)) {
- Calendar.UI.List.dayContainer=Calendar.UI.List.createDay(date);
- Calendar.UI.createEventsForDate(date, 0);
- Calendar.UI.List.eventContainer.append(Calendar.UI.List.dayContainer);
- }
- date.setDate(date.getDate()+1);
- }
- var end = Calendar.UI.List.formatDate(date);
- $('#listview #more_after').html(String(Calendar.UI.more_after).replace('{enddate}', end));
- },
- getEventContainer:function(week, weekday, when){
- return this.dayContainer;
- },
- createEventLabel:function(event){
- var time = '';
- if (!event['allday']){
- time = Calendar.UI.formatTime(event['startdate']) + ' - ' + Calendar.UI.formatTime(event['enddate']) + ' ';
- }
- return $(document.createElement('p'))
- .html(time + event['description'])
- },
+ }
}
}
}
+$.fullCalendar.views.list = ListView;
+function ListView(element, calendar) {
+ var t = this;
+
+ // imports
+ jQuery.fullCalendar.views.month.call(t, element, calendar);
+ var opt = t.opt;
+ var trigger = t.trigger;
+ var eventElementHandlers = t.eventElementHandlers;
+ var reportEventElement = t.reportEventElement;
+ var formatDate = calendar.formatDate;
+ var formatDates = calendar.formatDates;
+ var addDays = $.fullCalendar.addDays;
+ var cloneDate = $.fullCalendar.cloneDate;
+ function skipWeekend(date, inc, excl) {
+ inc = inc || 1;
+ while (!date.getDay() || (excl && date.getDay()==1 || !excl && date.getDay()==6)) {
+ addDays(date, inc);
+ }
+ return date;
+ }
+
+ // overrides
+ t.name='list';
+ t.render=render;
+ t.renderEvents=renderEvents;
+ t.setHeight=setHeight;
+ t.setWidth=setWidth;
+ t.clearEvents=clearEvents;
+
+ function setHeight(height, dateChanged) {
+ }
+
+ function setWidth(width) {
+ }
+
+ function clearEvents() {
+ this.reportEventClear();
+ }
+
+ // main
+ function sortEvent(a, b) {
+ return a.start - b.start;
+ }
+
+ function render(date, delta) {
+ if (!t.start){
+ t.start = addDays(cloneDate(date, true), -7);
+ t.end = addDays(cloneDate(date, true), 7);
+ }
+ if (delta) {
+ if (delta < 0){
+ addDays(t.start, -7);
+ if (!opt('weekends')) {
+ skipWeekend(t.start, delta < 0 ? -1 : 1);
+ }
+ }else{
+ addDays(t.end, 7);
+ if (!opt('weekends')) {
+ skipWeekend(t.end, delta < 0 ? -1 : 1);
+ }
+ }
+ }
+ t.title = formatDates(
+ t.start,
+ t.end,
+ opt('titleFormat', 'week')
+ );
+ t.visStart = cloneDate(t.start);
+ t.visEnd = cloneDate(t.end);
+ }
+
+ function eventsOfThisDay(events, theDate) {
+ var start = cloneDate(theDate, true);
+ var end = addDays(cloneDate(start), 1);
+ var retArr = new Array();
+ for (i in events) {
+ var event_end = t.eventEnd(events[i]);
+ if (events[i].start < end && event_end >= start) {
+ retArr.push(events[i]);
+ }
+ }
+ return retArr;
+ }
+
+ function renderEvent(event) {
+ if (event.allDay) { //all day event
+ var time = opt('allDayText');
+ }
+ else {
+ var time = formatDates(event.start, event.end, opt('timeFormat', 'agenda'));
+ }
+ var classes = ['fc-event', 'fc-list-event'];
+ classes = classes.concat(event.className);
+ if (event.source) {
+ classes = classes.concat(event.source.className || []);
+ }
+ var html = '' +
+ ' ' +
+ '' +
+ time +
+ ' ' +
+ ' ' +
+ '' +
+ '' +
+ '' +
+ event.title +
+ ' ' +
+ ' ' +
+ ' ' +
+ ' ';
+ return html;
+ }
+
+ function renderDay(date, events) {
+ var dayRows = $('' +
+ '' +
+ '' +
+ formatDate(date, opt('titleFormat', 'day')) +
+ ' ' +
+ ' ' +
+ ' ');
+ for (i in events) {
+ var event = events[i];
+ var eventElement = $(renderEvent(event));
+ triggerRes = trigger('eventRender', event, event, eventElement);
+ if (triggerRes === false) {
+ eventElement.remove();
+ }else{
+ if (triggerRes && triggerRes !== true) {
+ eventElement.remove();
+ eventElement = $(triggerRes);
+ }
+ $.merge(dayRows, eventElement);
+ eventElementHandlers(event, eventElement);
+ reportEventElement(event, eventElement);
+ }
+ }
+ return dayRows;
+ }
+
+ function renderEvents(events, modifiedEventId) {
+ events = events.sort(sortEvent);
+
+ var table = $('');
+ var total = events.length;
+ if (total > 0) {
+ var date = cloneDate(t.visStart);
+ while (date <= t.visEnd) {
+ var dayEvents = eventsOfThisDay(events, date);
+ if (dayEvents.length > 0) {
+ table.append(renderDay(date, dayEvents));
+ }
+ date=addDays(date, 1);
+ }
+ }
+
+ this.element.html(table);
+ }
+}
$(document).ready(function(){
- $('#listview #more_before').click(Calendar.UI.List.renderMoreBefore);
- $('#listview #more_after').click(Calendar.UI.List.renderMoreAfter);
+ Calendar.UI.initScroll();
+ $('#calendar_holder').fullCalendar({
+ header: false,
+ firstDay: 1,
+ editable: true,
+ defaultView: defaultView,
+ timeFormat: {
+ agenda: agendatime,
+ '': defaulttime
+ },
+ titleFormat: {
+ list: 'yyyy/MMM/d dddd'
+ },
+ axisFormat: defaulttime,
+ monthNames: monthNames,
+ monthNamesShort: monthNamesShort,
+ dayNames: dayNames,
+ dayNamesShort: dayNamesShort,
+ allDayText: allDayText,
+ viewDisplay: function(view) {
+ $('#datecontrol_date').html(view.title);
+ $.get(OC.filePath('calendar', 'ajax', 'changeview.php') + "?v="+view.name);
+ Calendar.UI.setViewActive(view.name);
+ if (view.name == 'agendaWeek') {
+ $('#calendar_holder').fullCalendar('option', 'aspectRatio', 0.1);
+ }
+ else {
+ $('#calendar_holder').fullCalendar('option', 'aspectRatio', 1.35);
+ }
+ },
+ columnFormat: {
+ week: 'ddd d. MMM'
+ },
+ selectable: true,
+ selectHelper: true,
+ select: Calendar.UI.newEvent,
+ eventClick: Calendar.UI.editEvent,
+ eventDrop: Calendar.UI.moveEvent,
+ eventResize: Calendar.UI.resizeEvent,
+ eventRender: function(event, element) {
+ element.tipsy({
+ className: 'tipsy-event',
+ opacity: 0.9,
+ gravity:$.fn.tipsy.autoBounds(150, 's'),
+ fade:true,
+ delayIn: 400,
+ html:true,
+ title:function() {
+ return Calendar.UI.getEventPopupText(event);
+ }
+ });
+ },
+ loading: Calendar.UI.loading,
+ eventSources: eventSources
+ });
+ $('#oneweekview_radio').click(function(){
+ $('#calendar_holder').fullCalendar('changeView', 'agendaWeek');
+ });
+ $('#onemonthview_radio').click(function(){
+ $('#calendar_holder').fullCalendar('changeView', 'month');
+ });
+ $('#listview_radio').click(function(){
+ $('#calendar_holder').fullCalendar('changeView', 'list');
+ });
+ $('#today_input').click(function(){
+ $('#calendar_holder').fullCalendar('today');
+ });
+ $('#datecontrol_left').click(function(){
+ $('#calendar_holder').fullCalendar('prev');
+ });
+ $('#datecontrol_right').click(function(){
+ $('#calendar_holder').fullCalendar('next');
+ });
});
-//event vars
-Calendar.UI.loadEvents();
diff --git a/apps/calendar/js/geo.js b/apps/calendar/js/geo.js
new file mode 100755
index 00000000000..ae6a971e938
--- /dev/null
+++ b/apps/calendar/js/geo.js
@@ -0,0 +1,21 @@
+/**
+ * Copyright (c) 2011 Georg Ehrke
+ * This file is licensed under the Affero General Public License version 3 or
+ * later.
+ * See the COPYING-README file.
+ */
+if (navigator.geolocation) {
+ navigator.geolocation.getCurrentPosition(function(position) {
+ $.getJSON(OC.filePath('calendar', 'ajax', 'guesstimezone.php?lat=' + position.coords.latitude + '&long=' + position.coords.longitude + ''),
+ function(data){
+ if (data.status == 'success' && typeof(data.message) != 'undefined'){
+ $('#notification').html(data.message);
+ $('#notification').attr('title', 'CC BY 3.0 by Geonames.org');
+ $('#notification').slideDown();
+ window.setTimeout(function(){$('#notification').slideUp();}, 5000);
+ }else{
+ console.log('Can\'t set new timezone.');
+ }
+ });
+ });
+}
\ No newline at end of file
diff --git a/apps/calendar/js/loader.js b/apps/calendar/js/loader.js
index 6eafec8b10d..4e483f9864e 100644
--- a/apps/calendar/js/loader.js
+++ b/apps/calendar/js/loader.js
@@ -1,16 +1,81 @@
-function importdialog(directory, filename){
- $("body").append("
");
- $("#importdialogholder").load(OC.filePath('calendar', 'ajax', 'importdialog.php?filename=' + filename + '&path=' + directory));
-}
-
-$(document).ready(function(){
- $('tr[data-file$=".ics"]').attr("data-mime", "text/calendar");
- $('tr[data-file$=".vcs"]').attr("data-mime", "text/calendar");
- $('tr[data-file$=".ical"]').attr("data-mime", "text/calendar");
- if(typeof FileActions!=='undefined'){
- FileActions.register('text/calendar','Import to Calendar','',function(filename){
- importdialog($('#dir').val(),filename);
+/**
+ * Copyright (c) 2012 Georg Ehrke
+ * This file is licensed under the Affero General Public License version 3 or
+ * later.
+ * See the COPYING-README file.
+ */
+Calendar_Import={
+ importdialog: function(filename){
+ var path = $('#dir').val();
+ $('body').append('
');
+ $('#calendar_import').load(OC.filePath('calendar', 'ajax', 'importdialog.php'), {filename:filename, path:path}, function(){Calendar_Import.initdialog(filename);});
+ },
+ initdialog: function(filename){
+ $('#calendar_import_dialog').dialog({
+ width : 500,
+ close : function() {
+ $(this).dialog('destroy').remove();
+ $('#calendar_import').remove();
+ }
+ });
+ $('#import_done_button').click(function(){
+ $('#calendar_import_dialog').dialog('destroy').remove();
+ $('#calendar_import').remove();
+ });
+ $('#progressbar').progressbar({value: 0});
+ $('#startimport').click(function(){
+ var filename = $('#filename').val();
+ var path = $('#path').val();
+ var calid = $('#calendar option:selected').val();
+ if($('#calendar option:selected').val() == 'newcal'){
+ var method = 'new';
+ var calname = $('#newcalendar').val();
+ var calname = $.trim(calname);
+ if(calname == ''){
+ $('#newcalendar').css('background-color', '#FF2626');
+ $('#newcalendar').focus(function(){
+ $('#newcalendar').css('background-color', '#F8F8F8');
+ });
+ return false;
+ }
+ }else{
+ var method = 'old';
+ }
+ $('#newcalendar').attr('readonly', 'readonly');
+ $('#calendar').attr('disabled', 'disabled');
+ var progressfile = $('#progressfile').val();
+ $.post(OC.filePath('calendar', '', 'import.php'), {method: String (method), calname: String (calname), path: String (path), file: String (filename), id: String (calid)}, function(data){
+ if(data.status == 'success'){
+ $('#progressbar').progressbar('option', 'value', 100);
+ $('#import_done').css('display', 'block');
+ }
+ });
+ $('#form_container').css('display', 'none');
+ $('#progressbar_container').css('display', 'block');
+ window.setTimeout('Calendar_Import.getimportstatus(\'' + progressfile + '\')', 500);
+ });
+ $('#calendar').change(function(){
+ if($('#calendar option:selected').val() == 'newcal'){
+ $('#newcalform').slideDown('slow');
+ }else{
+ $('#newcalform').slideUp('slow');
+ }
+ });
+ },
+ getimportstatus: function(progressfile){
+ $.get(OC.filePath('calendar', 'import_tmp', progressfile), function(percent){
+ $('#progressbar').progressbar('option', 'value', parseInt(percent));
+ if(percent < 100){
+ window.setTimeout('Calendar_Import.getimportstatus(\'' + progressfile + '\')', 500);
+ }else{
+ $('#import_done').css('display', 'block');
+ }
});
- FileActions.setDefault('text/calendar','Import to Calendar');
}
+}
+$(document).ready(function(){
+ if(typeof FileActions !== 'undefined'){
+ FileActions.register('text/calendar','importcal', '', Calendar_Import.importdialog);
+ FileActions.setDefault('text/calendar','importcal');
+ };
});
\ No newline at end of file
diff --git a/apps/calendar/js/settings.js b/apps/calendar/js/settings.js
index 6c00be06b39..73300885565 100644
--- a/apps/calendar/js/settings.js
+++ b/apps/calendar/js/settings.js
@@ -1,63 +1,35 @@
$(document).ready(function(){
- $("#timezone").change( function(){
+ $('#timezone').change( function(){
OC.msg.startSaving('#calendar .msg')
// Serialize the data
- var post = $( "#timezone" ).serialize();
+ var post = $( '#timezone' ).serialize();
$.post( OC.filePath('calendar', 'ajax', 'settimezone.php'), post, function(data){
//OC.msg.finishedSaving('#calendar .msg', data);
});
return false;
});
- $("#timezone").chosen();
- $("#firstdayofweek").change( function(){
- var data = $("#firstdayofweek").serialize();
- $.post( OC.filePath('calendar', 'ajax', 'setfirstdayofweek.php'), data, function(data){
- if(data == "error"){
- console.log("saving first day of week failed");
+ $('#timezone').chosen();
+ $('#timeformat').change( function(){
+ var data = $('#timeformat').serialize();
+ $.post( OC.filePath('calendar', 'ajax', 'settimeformat.php'), data, function(data){
+ if(data == 'error'){
+ console.log('saving timeformat failed');
}
});
});
- $.getJSON(OC.filePath('calendar', 'ajax', 'firstdayofweek.php'), function(jsondata, status) {
- $("#select_" + jsondata.firstdayofweek).attr('selected',true);
- $("#firstdayofweek").chosen();
- });
- $.getJSON(OC.filePath('calendar', 'ajax', 'daysofweekend.php'), function(jsondata, status) {
- for(day in jsondata){
- if(jsondata[day] == "true"){
- $("#selectweekend_" + day).attr('selected',true);
- }
- }
- $("#weekend").chosen();
- });
- $("#timeformat").change( function(){
- var data = $("#timeformat").serialize();
- $.post( OC.filePath('calendar', 'ajax', 'settimeformat.php'), data, function(data){
- if(data == "error"){
- console.log("saving timeformat failed");
- }
+ $('#timezonedetection').change( function(){
+ var post = $('#timezonedetection').serialize();
+ $.post( OC.filePath('calendar', 'ajax', 'timezonedetection.php'), post, function(data){
+
});
});
$.getJSON(OC.filePath('calendar', 'ajax', 'timeformat.php'), function(jsondata, status) {
- $("#" + jsondata.timeformat).attr('selected',true);
- $("#timeformat").chosen();
+ $('#' + jsondata.timeformat).attr('selected',true);
+ $('#timeformat').chosen();
});
- $("#duration").blur( function(){
- var data = $("#duration").val();
- $.post( OC.filePath('calendar', 'ajax', 'setduration.php'), {duration: data}, function(data){
- if(data == "error"){
- console.log("saving duration failed");
- }
- });
- });
- $.getJSON(OC.filePath('calendar', 'ajax', 'duration.php'), function(jsondata, status) {
- $("#duration").val(jsondata.duration);
- });
- $("#weekend").change( function(){
- var data = $("#weekend").serialize();
- $.post( OC.filePath('calendar', 'ajax', 'setdaysofweekend.php'), data, function(data){
- if(data == "error"){
- console.log("saving days of weekend failed");
- }
- });
+ $.getJSON(OC.filePath('calendar', 'ajax', 'gettimezonedetection.php'), function(jsondata, status){
+ if(jsondata.detection == 'true'){
+ $('#timezonedetection').attr('checked', 'checked');
+ }
});
});
diff --git a/apps/calendar/l10n/ar.php b/apps/calendar/l10n/ar.php
new file mode 100644
index 00000000000..13df7c7b5fd
--- /dev/null
+++ b/apps/calendar/l10n/ar.php
@@ -0,0 +1,155 @@
+ "التوقيت الجديد",
+"Timezone changed" => "تم تغيير المنطقة الزمنية",
+"Invalid request" => "طلب غير مفهوم",
+"Calendar" => "الجدول الزمني",
+"Wrong calendar" => "جدول زمني خاطئ",
+"Birthday" => "عيد ميلاد",
+"Business" => "عمل",
+"Call" => "إتصال",
+"Clients" => "الزبائن",
+"Deliverer" => "المرسل",
+"Holidays" => "عطلة",
+"Ideas" => "أفكار",
+"Journey" => "رحلة",
+"Jubilee" => "يوبيل",
+"Meeting" => "إجتماع",
+"Other" => "شيء آخر",
+"Personal" => "شخصي",
+"Projects" => "مشاريع",
+"Questions" => "اسئلة",
+"Work" => "العمل",
+"Does not repeat" => "لا يعاد",
+"Daily" => "يومي",
+"Weekly" => "أسبوعي",
+"Every Weekday" => "كل نهاية الأسبوع",
+"Bi-Weekly" => "كل اسبوعين",
+"Monthly" => "شهري",
+"Yearly" => "سنوي",
+"never" => "بتاتا",
+"by occurrences" => "حسب تسلسل الحدوث",
+"by date" => "حسب التاريخ",
+"by monthday" => "حسب يوم الشهر",
+"by weekday" => "حسب يوم الاسبوع",
+"Monday" => "الأثنين",
+"Tuesday" => "الثلاثاء",
+"Wednesday" => "الاربعاء",
+"Thursday" => "الخميس",
+"Friday" => "الجمعه",
+"Saturday" => "السبت",
+"Sunday" => "الاحد",
+"events week of month" => "الاحداث باسبوع الشهر",
+"first" => "أول",
+"second" => "ثاني",
+"third" => "ثالث",
+"fourth" => "رابع",
+"fifth" => "خامس",
+"last" => "أخير",
+"January" => "كانون الثاني",
+"February" => "شباط",
+"March" => "آذار",
+"April" => "نيسان",
+"May" => "أيار",
+"June" => "حزيران",
+"July" => "تموز",
+"August" => "آب",
+"September" => "أيلول",
+"October" => "تشرين الاول",
+"November" => "تشرين الثاني",
+"December" => "كانون الاول",
+"by events date" => "حسب تاريخ الحدث",
+"by yearday(s)" => "حسب يوم السنه",
+"by weeknumber(s)" => "حسب رقم الاسبوع",
+"by day and month" => "حسب اليوم و الشهر",
+"Not an array" => "ليس صفيف",
+"Date" => "تاريخ",
+"Cal." => "تقويم",
+"All day" => "كل النهار",
+"Missing fields" => "خانات خالية من المعلومات",
+"Title" => "عنوان",
+"From Date" => "من تاريخ",
+"From Time" => "إلى تاريخ",
+"To Date" => "إلى يوم",
+"To Time" => "إلى وقت",
+"The event ends before it starts" => "هذا الحدث ينتهي قبل أن يبدأ",
+"There was a database fail" => "خطأ في قاعدة البيانات",
+"Week" => "إسبوع",
+"Month" => "شهر",
+"List" => "قائمة",
+"Today" => "اليوم",
+"Calendars" => "الجداول الزمنية",
+"There was a fail, while parsing the file." => "لم يتم قراءة الملف بنجاح.",
+"Sun." => "أحد",
+"Mon." => "أثن.",
+"Tue." => "ثلا.",
+"Wed." => "أرب.",
+"Thu." => "خمي.",
+"Fri." => "جمع.",
+"Sat." => "سبت",
+"Jan." => "ك2",
+"Feb." => "شبا.",
+"Mar." => "اذار",
+"Apr." => "نيس.",
+"May." => "أيا.",
+"Jun." => "حزي.",
+"Jul." => "تمو.",
+"Aug." => "آب",
+"Sep." => "أيل.",
+"Oct." => "ت1",
+"Nov." => "ت2",
+"Dec." => "ك1",
+"Choose active calendars" => "إختر الجدول الزمني الرئيسي",
+"New Calendar" => "جدول زمني جديد",
+"CalDav Link" => "وصلة CalDav",
+"Download" => "تحميل",
+"Edit" => "تعديل",
+"Delete" => "حذف",
+"New calendar" => "جدول زمني جديد",
+"Edit calendar" => "عادل الجدول الزمني",
+"Displayname" => "الاسم المرئي",
+"Active" => "حالي",
+"Calendar color" => "لون الجدول الزمني",
+"Save" => "إحفظ",
+"Submit" => "أرسل",
+"Cancel" => "إلغاء",
+"Edit an event" => "عادل حدث",
+"Export" => "تصدير المعلومات",
+"Title of the Event" => "عنوان الحدث",
+"Category" => "فئة",
+"Select category" => "اختر الفئة",
+"All Day Event" => "حدث في يوم كامل",
+"From" => "من",
+"To" => "إلى",
+"Advanced options" => "خيارات متقدمة",
+"Repeat" => "إعادة",
+"Advanced" => "تعديلات متقدمه",
+"Select weekdays" => "اختر ايام الاسبوع",
+"Select days" => "اختر الايام",
+"and the events day of year." => "و التواريخ حسب يوم السنه.",
+"and the events day of month." => "و الاحداث حسب يوم الشهر.",
+"Select months" => "اختر الاشهر",
+"Select weeks" => "اختر الاسابيع",
+"and the events week of year." => "و الاحداث حسب اسبوع السنه",
+"Interval" => "المده الفاصله",
+"End" => "نهايه",
+"occurrences" => "الاحداث",
+"Location" => "مكان",
+"Location of the Event" => "مكان الحدث",
+"Description" => "مواصفات",
+"Description of the Event" => "وصف الحدث",
+"Import a calendar file" => "أدخل ملف التقويم",
+"Please choose the calendar" => "الرجاء إختر الجدول الزمني",
+"create a new calendar" => "انشاء جدول زمني جديد",
+"Name of new calendar" => "أسم الجدول الزمني الجديد",
+"Import" => "إدخال",
+"Importing calendar" => "يتم ادخال الجدول الزمني",
+"Calendar imported successfully" => "تم ادخال الجدول الزمني بنجاح",
+"Close Dialog" => "أغلق الحوار",
+"Create a new event" => "إضافة حدث جديد",
+"Timezone" => "المنطقة الزمنية",
+"Check always for changes of the timezone" => "راقب دائما تغير التقويم الزمني",
+"Timeformat" => "شكل الوقت",
+"24h" => "24 ساعة",
+"12h" => "12 ساعة",
+"Calendar CalDAV syncing address:" => "عنوان لتحديث ال CalDAV الجدول الزمني"
+);
diff --git a/apps/calendar/l10n/bg_BG.php b/apps/calendar/l10n/bg_BG.php
index 0c0b8604fb6..47610dcf67a 100644
--- a/apps/calendar/l10n/bg_BG.php
+++ b/apps/calendar/l10n/bg_BG.php
@@ -1,5 +1,4 @@
"Проблем с идентификацията",
"Timezone changed" => "Часовата зона е сменена",
"Invalid request" => "Невалидна заявка",
"Calendar" => "Календар",
@@ -11,50 +10,11 @@
"Monthly" => "Месечно",
"Yearly" => "Годишно",
"All day" => "Всички дни",
-"Sunday" => "Неделя",
-"Monday" => "Понеделник",
-"Tuesday" => "Вторник",
-"Wednesday" => "Сряда",
-"Thursday" => "Четвъртък",
-"Friday" => "Петък",
-"Saturday" => "Събота",
-"Sun." => "Нед.",
-"Mon." => "Пон.",
-"Tue." => "Втр.",
-"Wed." => "Сря.",
-"Thu." => "Чет.",
-"Fri." => "Пет.",
-"Sat." => "Съб.",
-"January" => "Януари",
-"February" => "Февруари",
-"March" => "Март",
-"April" => "Април",
-"May" => "Май",
-"June" => "Юни",
-"July" => "Юли",
-"August" => "Август",
-"September" => "Септември",
-"October" => "Октомври",
-"November" => "Ноември",
-"December" => "Декември",
-"Jan." => "Ян.",
-"Feb." => "Фв.",
-"Mar." => "Март",
-"Apr." => "Апр.",
-"Jun." => "Юни",
-"Jul." => "Юли",
-"Aug." => "Авг.",
-"Sep." => "Сеп.",
-"Oct." => "Окт.",
-"Nov." => "Ное.",
-"Dec." => "Дек.",
+"Title" => "Заглавие",
"Week" => "Седмица",
-"Weeks" => "Седмици",
-"Day" => "Ден",
"Month" => "Месец",
"Today" => "Днес",
"Calendars" => "Календари",
-"Time" => "Час",
"There was a fail, while parsing the file." => "Възникна проблем с разлистването на файла.",
"Choose active calendars" => "Изберете активен календар",
"Download" => "Изтегляне",
@@ -62,22 +22,19 @@
"Edit calendar" => "Промени календар",
"Displayname" => "Екранно име",
"Active" => "Активен",
-"Description" => "Описание",
"Calendar color" => "Цвят на календара",
"Submit" => "Продължи",
"Edit an event" => "Промяна на събитие",
-"Title" => "Заглавие",
"Title of the Event" => "Наименование",
-"Location" => "Локация",
-"Location of the Event" => "Локация",
"Category" => "Категория",
"All Day Event" => "Целодневно събитие",
"From" => "От",
"To" => "До",
"Repeat" => "Повтори",
-"Attendees" => "Присъстващи",
+"Location" => "Локация",
+"Location of the Event" => "Локация",
+"Description" => "Описание",
"Description of the Event" => "Описание",
-"Close" => "Затвори",
"Create a new event" => "Ново събитие",
"Timezone" => "Часова зона"
);
diff --git a/apps/calendar/l10n/ca.php b/apps/calendar/l10n/ca.php
index 13affe320f0..3b74e3da64c 100644
--- a/apps/calendar/l10n/ca.php
+++ b/apps/calendar/l10n/ca.php
@@ -1,8 +1,24 @@
"Error d'autenticació",
+"New Timezone:" => "Nova zona horària:",
"Timezone changed" => "La zona horària ha canviat",
"Invalid request" => "Sol.licitud no vàlida",
"Calendar" => "Calendari",
+"Wrong calendar" => "Calendari erroni",
+"Birthday" => "Aniversari",
+"Business" => "Feina",
+"Call" => "Trucada",
+"Clients" => "Clients",
+"Deliverer" => "Remitent",
+"Holidays" => "Vacances",
+"Ideas" => "Idees",
+"Journey" => "Viatge",
+"Jubilee" => "Sant",
+"Meeting" => "Reunió",
+"Other" => "Altres",
+"Personal" => "Personal",
+"Projects" => "Projectes",
+"Questions" => "Preguntes",
+"Work" => "Feina",
"Does not repeat" => "No es repeteix",
"Daily" => "Diari",
"Weekly" => "Mensual",
@@ -10,21 +26,25 @@
"Bi-Weekly" => "Bisetmanalment",
"Monthly" => "Mensualment",
"Yearly" => "Cada any",
-"All day" => "Tot el dia",
-"Sunday" => "Diumenge",
+"never" => "mai",
+"by occurrences" => "per aparicions",
+"by date" => "per data",
+"by monthday" => "per dia del mes",
+"by weekday" => "per dia de la setmana",
"Monday" => "Dilluns",
"Tuesday" => "Dimarts",
"Wednesday" => "Dimecres",
"Thursday" => "Dijous",
"Friday" => "Divendres",
"Saturday" => "Dissabte",
-"Sun." => "dg.",
-"Mon." => "dl.",
-"Tue." => "dm.",
-"Wed." => "dc.",
-"Thu." => "dj.",
-"Fri." => "dv.",
-"Sat." => "ds.",
+"Sunday" => "Diumenge",
+"events week of month" => "esdeveniments la setmana del mes",
+"first" => "primer",
+"second" => "segon",
+"third" => "tercer",
+"fourth" => "quart",
+"fifth" => "cinquè",
+"last" => "últim",
"January" => "Gener",
"February" => "Febrer",
"March" => "Març",
@@ -37,10 +57,41 @@
"October" => "Octubre",
"November" => "Novembre",
"December" => "Desembre",
+"by events date" => "per data d'esdeveniments",
+"by yearday(s)" => "per ahir(s)",
+"by weeknumber(s)" => "per número(s) de la setmana",
+"by day and month" => "per dia del mes",
+"Not an array" => "No és una sèrie",
+"Date" => "Data",
+"Cal." => "Cal.",
+"All day" => "Tot el dia",
+"New Calendar" => "Calendari nou",
+"Missing fields" => "Els camps que falten",
+"Title" => "Títol",
+"From Date" => "Des de la data",
+"From Time" => "Des de l'hora",
+"To Date" => "Fins a la data",
+"To Time" => "Fins a l'hora",
+"The event ends before it starts" => "L'esdeveniment acaba abans que comenci",
+"There was a database fail" => "Hi ha un error de base de dades",
+"Week" => "Setmana",
+"Month" => "Mes",
+"List" => "Llista",
+"Today" => "Avui",
+"Calendars" => "Calendaris",
+"There was a fail, while parsing the file." => "S'ha produït un error en analitzar el fitxer.",
+"Sun." => "dg.",
+"Mon." => "dl.",
+"Tue." => "dt.",
+"Wed." => "dc.",
+"Thu." => "dj.",
+"Fri." => "dv.",
+"Sat." => "ds.",
"Jan." => "gen.",
"Feb." => "febr.",
"Mar." => "març",
"Apr." => "abr.",
+"May." => "maig",
"Jun." => "juny",
"Jul." => "jul.",
"Aug." => "ag.",
@@ -48,36 +99,57 @@
"Oct." => "oct.",
"Nov." => "nov.",
"Dec." => "des.",
-"Week" => "Setmana",
-"Weeks" => "Setmanes",
-"Day" => "Dia",
-"Month" => "Mes",
-"Today" => "Avui",
-"Calendars" => "Calendaris",
-"Time" => "Hora",
-"There was a fail, while parsing the file." => "S'ha produït un error en analitzar el fitxer.",
"Choose active calendars" => "Seleccioneu calendaris actius",
+"CalDav Link" => "Enllaç CalDav",
"Download" => "Baixa",
"Edit" => "Edita",
+"Delete" => "Esborra",
+"New calendar" => "Calendari nou",
"Edit calendar" => "Edita el calendari",
"Displayname" => "Mostra el nom",
"Active" => "Actiu",
-"Description" => "Descripció",
"Calendar color" => "Color del calendari",
-"Submit" => "Tramet",
+"Save" => "Desa",
+"Submit" => "Envia",
+"Cancel" => "Cancel·la",
"Edit an event" => "Edició d'un esdeveniment",
-"Title" => "Títol",
+"Export" => "Exporta",
"Title of the Event" => "Títol de l'esdeveniment",
-"Location" => "Ubicació",
-"Location of the Event" => "Ubicació de l'esdeveniment",
"Category" => "Categoria",
+"Select category" => "Seleccioneu categoria",
"All Day Event" => "Esdeveniment de tot el dia",
"From" => "Des de",
"To" => "Fins a",
-"Repeat" => "Repeteix",
-"Attendees" => "Assistents",
+"Advanced options" => "Opcions avançades",
+"Repeat" => "Repetició",
+"Advanced" => "Avançat",
+"Select weekdays" => "Dies de la setmana seleccionats",
+"Select days" => "Seleccionar dies",
+"and the events day of year." => "i dies d'esdeveniment de l'any.",
+"and the events day of month." => "i dies d'esdeveniment del mes.",
+"Select months" => "Seleccionar mesos",
+"Select weeks" => "Seleccionar setmanes",
+"and the events week of year." => "i setmanes d'esdeveniment de l'any.",
+"Interval" => "Interval",
+"End" => "Final",
+"occurrences" => "aparicions",
+"Location" => "Ubicació",
+"Location of the Event" => "Ubicació de l'esdeveniment",
+"Description" => "Descripció",
"Description of the Event" => "Descripció de l'esdeveniment",
-"Close" => "Tanca",
+"Import a calendar file" => "Importa un fitxer de calendari",
+"Please choose the calendar" => "Escolliu el calendari",
+"create a new calendar" => "crea un nou calendari",
+"Name of new calendar" => "Nom del nou calendari",
+"Import" => "Importa",
+"Importing calendar" => "S'està important el calendari",
+"Calendar imported successfully" => "El calendari s'ha importat amb èxit",
+"Close Dialog" => "Tanca el diàleg",
"Create a new event" => "Crea un nou esdeveniment",
-"Timezone" => "Zona horària"
+"Timezone" => "Zona horària",
+"Check always for changes of the timezone" => "Comprova sempre en els canvis de zona horària",
+"Timeformat" => "Format de temps",
+"24h" => "24",
+"12h" => "12h",
+"Calendar CalDAV syncing address:" => "Adreça de sincronització del calendari CalDAV:"
);
diff --git a/apps/calendar/l10n/cs_CZ.php b/apps/calendar/l10n/cs_CZ.php
new file mode 100644
index 00000000000..a5d7bfcddff
--- /dev/null
+++ b/apps/calendar/l10n/cs_CZ.php
@@ -0,0 +1,155 @@
+ "Nová časová zóna:",
+"Timezone changed" => "Časová zóna byla změněna",
+"Invalid request" => "Chybný požadavek",
+"Calendar" => "Kalendář",
+"Wrong calendar" => "Nesprávný kalendář",
+"Birthday" => "Narozeniny",
+"Business" => "Pracovní",
+"Call" => "Volat",
+"Clients" => "Klienti",
+"Deliverer" => "Doručovatel",
+"Holidays" => "Prázdniny",
+"Ideas" => "Nápady",
+"Journey" => "Cesta",
+"Jubilee" => "Jubileum",
+"Meeting" => "Schůzka",
+"Other" => "Další",
+"Personal" => "Osobní",
+"Projects" => "Projekty",
+"Questions" => "Dotazy",
+"Work" => "Práce",
+"Does not repeat" => "Neopakuje se",
+"Daily" => "Denně",
+"Weekly" => "Týdně",
+"Every Weekday" => "Každý všední den",
+"Bi-Weekly" => "Jednou za dva týdny",
+"Monthly" => "Měsíčně",
+"Yearly" => "Ročně",
+"never" => "nikdy",
+"by occurrences" => "podle výskytu",
+"by date" => "podle data",
+"by monthday" => "podle dne v měsíci",
+"by weekday" => "podle dne v týdnu",
+"Monday" => "Pondělí",
+"Tuesday" => "Úterý",
+"Wednesday" => "Středa",
+"Thursday" => "Čtvrtek",
+"Friday" => "Pátek",
+"Saturday" => "Sobota",
+"Sunday" => "Neděle",
+"events week of month" => "týdenní události v měsíci",
+"first" => "první",
+"second" => "druhý",
+"third" => "třetí",
+"fourth" => "čtvrtý",
+"fifth" => "pátý",
+"last" => "poslední",
+"January" => "Leden",
+"February" => "Únor",
+"March" => "Břeyen",
+"April" => "Duben",
+"May" => "Květen",
+"June" => "Červen",
+"July" => "Červenec",
+"August" => "Srpen",
+"September" => "Září",
+"October" => "Říjen",
+"November" => "Listopad",
+"December" => "Prosinec",
+"by events date" => "podle data události",
+"by yearday(s)" => "po dni (dnech)",
+"by weeknumber(s)" => "podle čísel týdnů",
+"by day and month" => "podle dne a měsíce",
+"Not an array" => "Není zařazeno",
+"Date" => "Datum",
+"Cal." => "Kal.",
+"All day" => "Celý den",
+"New Calendar" => "Nový kalendář",
+"Missing fields" => "Chybějící pole",
+"Title" => "Název",
+"From Date" => "Od data",
+"From Time" => "Od",
+"To Date" => "Do data",
+"To Time" => "Do",
+"The event ends before it starts" => "Akce končí před zahájením",
+"There was a database fail" => "Chyba v databázi",
+"Week" => "týden",
+"Month" => "měsíc",
+"List" => "Seznam",
+"Today" => "dnes",
+"Calendars" => "Kalendáře",
+"There was a fail, while parsing the file." => "Chyba při převodu souboru",
+"Sun." => "Ne",
+"Mon." => "Po",
+"Tue." => "Út",
+"Wed." => "St",
+"Thu." => "Čt",
+"Fri." => "Pá",
+"Sat." => "So",
+"Jan." => "Led.",
+"Feb." => "Úno.",
+"Mar." => "Bře.",
+"Apr." => "Dub.",
+"May." => "Kvě.",
+"Jun." => "Čer.",
+"Jul." => "Čec.",
+"Aug." => "Srp.",
+"Sep." => "Zář.",
+"Oct." => "Říj.",
+"Nov." => "Lis.",
+"Dec." => "Pro.",
+"Choose active calendars" => "Vybrat aktivní kalendář",
+"CalDav Link" => "Odkaz CalDav",
+"Download" => "Stáhnout",
+"Edit" => "Editovat",
+"Delete" => "Odstranit",
+"New calendar" => "Nový kalendář",
+"Edit calendar" => "Editovat kalendář",
+"Displayname" => "Zobrazené jméno",
+"Active" => "Aktivní",
+"Calendar color" => "Barva kalendáře",
+"Save" => "Uložit",
+"Submit" => "Potvrdit",
+"Cancel" => "Storno",
+"Edit an event" => "Editovat událost",
+"Export" => "Export",
+"Title of the Event" => "Název události",
+"Category" => "Kategorie",
+"Select category" => "Vyberte kategorii",
+"All Day Event" => "Celodenní událost",
+"From" => "od",
+"To" => "do",
+"Advanced options" => "Pokročilé volby",
+"Repeat" => "Opakovat",
+"Advanced" => "Pokročilé",
+"Select weekdays" => "Vybrat dny v týdnu",
+"Select days" => "Vybrat dny",
+"and the events day of year." => "a denní události v roce",
+"and the events day of month." => "a denní události v měsíci",
+"Select months" => "Vybrat měsíce",
+"Select weeks" => "Vybrat týdny",
+"and the events week of year." => "a týden s událostmi v roce",
+"Interval" => "Interval",
+"End" => "Konec",
+"occurrences" => "výskyty",
+"Location" => "Umístění",
+"Location of the Event" => "Místo konání události",
+"Description" => "Popis",
+"Description of the Event" => "Popis události",
+"Import a calendar file" => "Importovat soubor kalendáře",
+"Please choose the calendar" => "Zvolte prosím kalendář",
+"create a new calendar" => "vytvořit nový kalendář",
+"Name of new calendar" => "Název nového kalendáře",
+"Import" => "Import",
+"Importing calendar" => "Kalendář se importuje",
+"Calendar imported successfully" => "Kalendář byl importován úspěšně",
+"Close Dialog" => "Zavřít dialog",
+"Create a new event" => "Vytvořit novou událost",
+"Timezone" => "Časové pásmo",
+"Check always for changes of the timezone" => "Zkontrolujte vždy změny časového pásma",
+"Timeformat" => "Formát času",
+"24h" => "24h",
+"12h" => "12h",
+"Calendar CalDAV syncing address:" => "Adresa pro synchronizaci kalendáře CalDAV:"
+);
diff --git a/apps/calendar/l10n/da.php b/apps/calendar/l10n/da.php
index 46af5cb43ab..c50a1db1d57 100644
--- a/apps/calendar/l10n/da.php
+++ b/apps/calendar/l10n/da.php
@@ -1,13 +1,14 @@
"Godkendelsesfejl",
-"Wrong calendar" => "Forkert kalender",
+"New Timezone:" => "Ny tidszone:",
"Timezone changed" => "Tidszone ændret",
"Invalid request" => "Ugyldig forespørgsel",
"Calendar" => "Kalender",
+"Wrong calendar" => "Forkert kalender",
"Birthday" => "Fødselsdag",
"Business" => "Forretning",
"Call" => "Ring",
"Clients" => "Kunder",
+"Deliverer" => "Leverance",
"Holidays" => "Helligdage",
"Ideas" => "Ideér",
"Journey" => "Rejse",
@@ -22,24 +23,28 @@
"Daily" => "Daglig",
"Weekly" => "Ugentlig",
"Every Weekday" => "Alle hverdage",
-"Bi-Weekly" => "Bi-Ugentligt",
-"Monthly" => "Månedlige",
+"Bi-Weekly" => "Hver anden uge",
+"Monthly" => "Månedlig",
"Yearly" => "Årlig",
-"All day" => "Hele dagen",
-"Sunday" => "Søndag",
+"never" => "aldrig",
+"by occurrences" => "efter forekomster",
+"by date" => "efter dato",
+"by monthday" => "efter dag i måneden",
+"by weekday" => "efter ugedag",
"Monday" => "Mandag",
"Tuesday" => "Tirsdag",
"Wednesday" => "Onsdag",
"Thursday" => "Torsdag",
"Friday" => "Fredag",
"Saturday" => "Lørdag",
-"Sun." => "Søn.",
-"Mon." => "Man.",
-"Tue." => "Tir.",
-"Wed." => "Ons.",
-"Thu." => "Tor.",
-"Fri." => "Fre.",
-"Sat." => "Lør.",
+"Sunday" => "øndag",
+"events week of month" => "begivenhedens uge i måneden",
+"first" => "første",
+"second" => "anden",
+"third" => "tredje",
+"fourth" => "fjerde",
+"fifth" => "femte",
+"last" => "sidste",
"January" => "Januar",
"February" => "Februar",
"March" => "Marts",
@@ -52,6 +57,36 @@
"October" => "Oktober",
"November" => "November",
"December" => "December",
+"by events date" => "efter begivenheders dato",
+"by yearday(s)" => "efter dag(e) i året",
+"by weeknumber(s)" => "efter ugenummer/-numre",
+"by day and month" => "efter dag og måned",
+"Not an array" => "Ikke en array",
+"Date" => "Dato",
+"Cal." => "Kal.",
+"All day" => "Hele dagen",
+"New Calendar" => "Ny Kalender",
+"Missing fields" => "Manglende felter",
+"Title" => "Titel",
+"From Date" => "Fra dato",
+"From Time" => "Fra tidspunkt",
+"To Date" => "Til dato",
+"To Time" => "Til tidspunkt",
+"The event ends before it starts" => "Begivenheden slutter, inden den begynder",
+"There was a database fail" => "Der var en fejl i databasen",
+"Week" => "Uge",
+"Month" => "Måned",
+"List" => "Liste",
+"Today" => "I dag",
+"Calendars" => "Kalendere",
+"There was a fail, while parsing the file." => "Der opstod en fejl under gennemlæsning af filen.",
+"Sun." => "Søn.",
+"Mon." => "Man.",
+"Tue." => "Tir.",
+"Wed." => "Ons.",
+"Thu." => "Tor.",
+"Fri." => "Fre.",
+"Sat." => "Lør.",
"Jan." => "Jan.",
"Feb." => "Feb.",
"Mar." => "Mar.",
@@ -60,49 +95,61 @@
"Jun." => "Jun.",
"Jul." => "Jul.",
"Aug." => "Aug.",
-"Sep." => "Sep.",
-"Oct." => "Oct.",
+"Sep." => "Sept.",
+"Oct." => "Okt.",
"Nov." => "Nov.",
"Dec." => "Dec.",
-"Week" => "Uge",
-"Weeks" => "Uger",
-"More before {startdate}" => "Mere før {startdate}",
-"More after {enddate}" => "Mere efter {enddate}",
-"Day" => "Dag",
-"Month" => "Måned",
-"List" => "Liste",
-"Today" => "I dag",
-"Calendars" => "Kalendere",
-"Time" => "Tid",
-"There was a fail, while parsing the file." => "Der opstod en fejl under gennemlæsning af filen.",
-"Choose active calendars" => "Vælg aktiv kalendere",
-"New Calendar" => "Ny Kalender",
-"CalDav Link" => "CalDav Link",
+"Choose active calendars" => "Vælg aktive kalendere",
+"CalDav Link" => "CalDav-link",
"Download" => "Hent",
"Edit" => "Rediger",
+"Delete" => "Slet",
"New calendar" => "Ny kalender",
"Edit calendar" => "Rediger kalender",
-"Displayname" => "Visningsnavn",
+"Displayname" => "Vist navn",
"Active" => "Aktiv",
-"Description" => "Beskrivelse",
-"Calendar color" => "Kalender farve",
+"Calendar color" => "Kalenderfarve",
"Save" => "Gem",
"Submit" => "Send",
-"Cancel" => "Annullér",
+"Cancel" => "Annuller",
"Edit an event" => "Redigér en begivenhed",
-"Title" => "Titel",
+"Export" => "Eksporter",
"Title of the Event" => "Titel på begivenheden",
-"Location" => "Sted",
-"Location of the Event" => "Placering af begivenheden",
"Category" => "Kategori",
"Select category" => "Vælg kategori",
"All Day Event" => "Heldagsarrangement",
"From" => "Fra",
"To" => "Til",
+"Advanced options" => "Avancerede indstillinger",
"Repeat" => "Gentag",
-"Attendees" => "Deltagere",
+"Advanced" => "Avanceret",
+"Select weekdays" => "Vælg ugedage",
+"Select days" => "Vælg dage",
+"and the events day of year." => "og begivenhedens dag i året.",
+"and the events day of month." => "og begivenhedens sag på måneden",
+"Select months" => "Vælg måneder",
+"Select weeks" => "Vælg uger",
+"and the events week of year." => "og begivenhedens uge i året.",
+"Interval" => "Interval",
+"End" => "Afslutning",
+"occurrences" => "forekomster",
+"Location" => "Sted",
+"Location of the Event" => "Placering af begivenheden",
+"Description" => "Beskrivelse",
"Description of the Event" => "Beskrivelse af begivenheden",
-"Close" => "Luk",
+"Import a calendar file" => "Importer en kalenderfil",
+"Please choose the calendar" => "Vælg venligst kalender",
+"create a new calendar" => "opret en ny kalender",
+"Name of new calendar" => "Navn på ny kalender",
+"Import" => "Importer",
+"Importing calendar" => "Importerer kalender",
+"Calendar imported successfully" => "Kalender importeret korrekt",
+"Close Dialog" => "Luk dialog",
"Create a new event" => "Opret en ny begivenhed",
-"Timezone" => "Tidszone"
+"Timezone" => "Tidszone",
+"Check always for changes of the timezone" => "Check altid efter ændringer i tidszone",
+"Timeformat" => "Tidsformat",
+"24h" => "24T",
+"12h" => "12T",
+"Calendar CalDAV syncing address:" => "Synkroniseringsadresse til CalDAV:"
);
diff --git a/apps/calendar/l10n/de.php b/apps/calendar/l10n/de.php
index 44bab2a5c35..736294e0f05 100644
--- a/apps/calendar/l10n/de.php
+++ b/apps/calendar/l10n/de.php
@@ -1,9 +1,9 @@
"Anmeldefehler",
-"Wrong calendar" => "Falscher Kalender",
+"New Timezone:" => "Neue Zeitzone:",
"Timezone changed" => "Zeitzone geändert",
"Invalid request" => "Anfragefehler",
"Calendar" => "Kalender",
+"Wrong calendar" => "Falscher Kalender",
"Birthday" => "Geburtstag",
"Business" => "Geschäftlich",
"Call" => "Anruf",
@@ -26,22 +26,25 @@
"Bi-Weekly" => "jede zweite Woche",
"Monthly" => "monatlich",
"Yearly" => "jährlich",
-"Not an array" => "Kein Feld",
-"All day" => "Ganztags",
-"Sunday" => "Sonntag",
+"never" => "niemals",
+"by occurrences" => "nach Vorkommen",
+"by date" => "nach Datum",
+"by monthday" => "an einem Monatstag",
+"by weekday" => "an einem Wochentag",
"Monday" => "Montag",
"Tuesday" => "Dienstag",
"Wednesday" => "Mittwoch",
"Thursday" => "Donnerstag",
"Friday" => "Freitag",
"Saturday" => "Samstag",
-"Sun." => "Son.",
-"Mon." => "Mon.",
-"Tue." => "Die.",
-"Wed." => "Mit.",
-"Thu." => "Don.",
-"Fri." => "Fre.",
-"Sat." => "Sam.",
+"Sunday" => "Sonntag",
+"events week of month" => "Woche des Monats vom Termin",
+"first" => "erste",
+"second" => "zweite",
+"third" => "dritte",
+"fourth" => "vierte",
+"fifth" => "fünfte",
+"last" => "letzte",
"January" => "Januar",
"February" => "Februar",
"March" => "März",
@@ -54,57 +57,99 @@
"October" => "Oktober",
"November" => "November",
"December" => "Dezember",
-"Jan." => "Jan.",
-"Feb." => "Feb.",
-"Mar." => "Mär.",
-"Apr." => "Apr.",
-"May." => "Mai",
-"Jun." => "Jun.",
-"Jul." => "Jul.",
-"Aug." => "Aug.",
-"Sep." => "Sep.",
-"Oct." => "Okt.",
-"Nov." => "Nov.",
-"Dec." => "Dez.",
+"by events date" => "bei Tag des Termins",
+"by yearday(s)" => "an einem Tag des Jahres",
+"by weeknumber(s)" => "an einer Wochennummer",
+"by day and month" => "an einer Tag und Monats Kombination",
+"Not an array" => "Kein Feld",
+"Date" => "Datum",
+"Cal." => "Kal.",
+"All day" => "Ganztags",
+"New Calendar" => "Neuer Kalender",
+"Missing fields" => "fehlende Felder",
+"Title" => "Titel",
+"From Date" => "Startdatum",
+"From Time" => "Startzeit",
+"To Date" => "Enddatum",
+"To Time" => "Endzeit",
+"The event ends before it starts" => "Der Termin hört auf, bevor er angefangen hat.",
+"There was a database fail" => "Datenbankfehler",
"Week" => "Woche",
-"Weeks" => "Wochen",
-"More before {startdate}" => "Mehr vor {startdate}",
-"More after {enddate}" => "Mehr nach {enddate}",
-"Day" => "Tag",
"Month" => "Monat",
"List" => "Liste",
"Today" => "Heute",
"Calendars" => "Kalender",
-"Time" => "Zeit",
"There was a fail, while parsing the file." => "Fehler beim Einlesen der Datei.",
+"Sun." => "So",
+"Mon." => "Mo",
+"Tue." => "Di",
+"Wed." => "Mi",
+"Thu." => "Do",
+"Fri." => "Fr",
+"Sat." => "Sa",
+"Jan." => "Jan",
+"Feb." => "Feb",
+"Mar." => "März",
+"Apr." => "Apr",
+"May." => "Mai",
+"Jun." => "Juni",
+"Jul." => "Juli",
+"Aug." => "Aug",
+"Sep." => "Sep",
+"Oct." => "Okt",
+"Nov." => "Nov",
+"Dec." => "Dez",
"Choose active calendars" => "Aktive Kalender wählen",
-"New Calendar" => "Neuer Kalender",
"CalDav Link" => "CalDAV-Link",
"Download" => "Herunterladen",
"Edit" => "Bearbeiten",
+"Delete" => "Löschen",
"New calendar" => "Neuer Kalender",
"Edit calendar" => "Kalender bearbeiten",
"Displayname" => "Anzeigename",
"Active" => "Aktiv",
-"Description" => "Beschreibung",
"Calendar color" => "Kalenderfarbe",
"Save" => "Speichern",
"Submit" => "Bestätigen",
"Cancel" => "Abbrechen",
"Edit an event" => "Ereignis bearbeiten",
-"Title" => "Titel",
+"Export" => "Exportieren",
"Title of the Event" => "Name",
-"Location" => "Ort",
-"Location of the Event" => "Ort",
"Category" => "Kategorie",
"Select category" => "Kategorie auswählen",
"All Day Event" => "Ganztägiges Ereignis",
"From" => "von",
"To" => "bis",
+"Advanced options" => "Erweiterte Optionen",
"Repeat" => "wiederholen",
-"Attendees" => "Teilnehmer",
+"Advanced" => "Erweitert",
+"Select weekdays" => "Wochentage auswählen",
+"Select days" => "Tage auswählen",
+"and the events day of year." => "und den Tag des Jahres vom Termin",
+"and the events day of month." => "und den Tag des Monats vom Termin",
+"Select months" => "Monate auswählen",
+"Select weeks" => "Wochen auswählen",
+"and the events week of year." => "und den Tag des Jahres vom Termin",
+"Interval" => "Intervall",
+"End" => "Ende",
+"occurrences" => "Vorkommen",
+"Location" => "Ort",
+"Location of the Event" => "Ort",
+"Description" => "Beschreibung",
"Description of the Event" => "Beschreibung",
-"Close" => "Schließen",
+"Import a calendar file" => "Kalender Datei Importieren",
+"Please choose the calendar" => "Bitte wählen Sie den Kalender.",
+"create a new calendar" => "Neuen Kalender anlegen",
+"Name of new calendar" => "Kalendername",
+"Import" => "Importieren",
+"Importing calendar" => "Kalender wird importiert.",
+"Calendar imported successfully" => "Kalender erfolgreich importiert",
+"Close Dialog" => "Dialog schließen",
"Create a new event" => "Neues Ereignis",
-"Timezone" => "Zeitzone"
+"Timezone" => "Zeitzone",
+"Check always for changes of the timezone" => "immer die Zeitzone überprüfen",
+"Timeformat" => "Zeitformat",
+"24h" => "24h",
+"12h" => "12h",
+"Calendar CalDAV syncing address:" => "Kalender CalDAV Synchronisationsadresse:"
);
diff --git a/apps/calendar/l10n/el.php b/apps/calendar/l10n/el.php
index e2c26502cef..af465beeed6 100644
--- a/apps/calendar/l10n/el.php
+++ b/apps/calendar/l10n/el.php
@@ -1,16 +1,19 @@
"Σφάλμα ταυτοποίησης",
-"Wrong calendar" => "Λάθος ημερολόγιο",
+"New Timezone:" => "Νέα ζώνη ώρας:",
"Timezone changed" => "Η ζώνη ώρας άλλαξε",
"Invalid request" => "Μη έγκυρο αίτημα",
"Calendar" => "Ημερολόγιο",
+"Wrong calendar" => "Λάθος ημερολόγιο",
"Birthday" => "Γενέθλια",
"Business" => "Επιχείρηση",
"Call" => "Κλήση",
"Clients" => "Πελάτες",
+"Deliverer" => "Παραδώσας",
"Holidays" => "Διακοπές",
"Ideas" => "Ιδέες",
"Journey" => "Ταξίδι",
+"Jubilee" => "Γιορτή",
+"Meeting" => "Συνάντηση",
"Other" => "Άλλο",
"Personal" => "Προσωπικό",
"Projects" => "Έργα",
@@ -23,27 +26,30 @@
"Bi-Weekly" => "Δύο φορές την εβδομάδα",
"Monthly" => "Μηνιαία",
"Yearly" => "Ετήσια",
-"Not an array" => "Δεν είναι μια σειρά",
-"All day" => "Ολοήμερο",
-"Sunday" => "Κυριακή",
+"never" => "ποτέ",
+"by occurrences" => "κατά συχνότητα πρόσβασης",
+"by date" => "κατά ημερομηνία",
+"by monthday" => "κατά ημέρα",
+"by weekday" => "κατά εβδομάδα",
"Monday" => "Δευτέρα",
"Tuesday" => "Τρίτη",
"Wednesday" => "Τετάρτη",
"Thursday" => "Πέμπτη",
"Friday" => "Παρασκευή",
"Saturday" => "Σάββατο",
-"Sun." => "Κυρ.",
-"Mon." => "Δευτ.",
-"Tue." => "Τρ.",
-"Wed." => "Τετ.",
-"Thu." => "Πέμ.",
-"Fri." => "Παρ.",
-"Sat." => "Σάβ.",
+"Sunday" => "Κυριακή",
+"events week of month" => "συμβάντα της εβδομάδας του μήνα",
+"first" => "πρώτο",
+"second" => "δεύτερο",
+"third" => "τρίτο",
+"fourth" => "τέταρτο",
+"fifth" => "πέμπτο",
+"last" => "τελευταίο",
"January" => "Ιανουάριος",
"February" => "Φεβρουάριος",
"March" => "Μάρτιος",
"April" => "Απρίλιος",
-"May" => "Μάιος",
+"May" => "Μάϊος",
"June" => "Ιούνιος",
"July" => "Ιούλιος",
"August" => "Αύγουστος",
@@ -51,52 +57,99 @@
"October" => "Οκτώβριος",
"November" => "Νοέμβριος",
"December" => "Δεκέμβριος",
-"Jan." => "Ιαν.",
-"Feb." => "Φεβ.",
-"Mar." => "Μαρ.",
-"Apr." => "Απρ.",
-"Jun." => "Ιούν.",
-"Jul." => "Ιούλ.",
-"Aug." => "Αύγ.",
-"Sep." => "Σεπ.",
-"Oct." => "Οκτ.",
-"Nov." => "Νοέ.",
-"Dec." => "Δεκ.",
+"by events date" => "κατά ημερομηνία συμβάντων",
+"by yearday(s)" => "κατά ημέρα(ες) του έτους",
+"by weeknumber(s)" => "κατά εβδομάδα(ες)",
+"by day and month" => "κατά ημέρα και μήνα",
+"Not an array" => "Δεν είναι μια σειρά",
+"Date" => "Ημερομηνία",
+"Cal." => "Ημερ.",
+"All day" => "Ολοήμερο",
+"New Calendar" => "Νέα Ημερολόγιο",
+"Missing fields" => "Πεδία που λείπουν",
+"Title" => "Τίτλος",
+"From Date" => "Από Ημερομηνία",
+"From Time" => "Από Ώρα",
+"To Date" => "Έως Ημερομηνία",
+"To Time" => "Έως Ώρα",
+"The event ends before it starts" => "Το γεγονός ολοκληρώνεται πριν από την έναρξή του",
+"There was a database fail" => "Υπήρξε σφάλμα στη βάση δεδομένων",
"Week" => "Εβδομάδα",
-"Weeks" => "Εβδομάδες",
-"Day" => "Ημέρα",
"Month" => "Μήνας",
"List" => "Λίστα",
"Today" => "Σήμερα",
"Calendars" => "Ημερολόγια",
-"Time" => "Ώρα",
-"There was a fail, while parsing the file." => "Υπήρχε μια αποτυχία, κατά την ανάλυση του αρχείου.",
+"There was a fail, while parsing the file." => "Υπήρξε μια αποτυχία, κατά την αξιολόγηση του αρχείου.",
+"Sun." => "Κυρ.",
+"Mon." => "Δευτ.",
+"Tue." => "Τρι.",
+"Wed." => "Τετ.",
+"Thu." => "Πέμ.",
+"Fri." => "Παρ.",
+"Sat." => "Σαβ.",
+"Jan." => "Ιαν.",
+"Feb." => "Φεβ.",
+"Mar." => "Μαρ.",
+"Apr." => "Απρ.",
+"May." => "Μάϊ.",
+"Jun." => "Ιον.",
+"Jul." => "Ιολ.",
+"Aug." => "Αύγ.",
+"Sep." => "Σεπ.",
+"Oct." => "Οκτ.",
+"Nov." => "Νοε.",
+"Dec." => "Δεκ.",
"Choose active calendars" => "Επιλέξτε τα ενεργά ημερολόγια",
-"New Calendar" => "Νέα Ημερολόγιο",
+"CalDav Link" => "Σύνδεση CalDAV",
"Download" => "Λήψη",
"Edit" => "Επεξεργασία",
+"Delete" => "Διαγραφή",
"New calendar" => "Νέο ημερολόγιο",
"Edit calendar" => "Επεξεργασία ημερολογίου",
"Displayname" => "Προβολή ονόματος",
"Active" => "Ενεργό",
-"Description" => "Περιγραφή",
"Calendar color" => "Χρώμα ημερολογίου",
+"Save" => "Αποθήκευση",
"Submit" => "Υποβολή",
"Cancel" => "Ακύρωση",
"Edit an event" => "Επεξεργασία ενός γεγονότος",
-"Title" => "Τίτλος",
+"Export" => "Εξαγωγή",
"Title of the Event" => "Τίτλος συμβάντος",
-"Location" => "Τοποθεσία",
-"Location of the Event" => "Τοποθεσία συμβάντος",
"Category" => "Κατηγορία",
"Select category" => "Επιλέξτε κατηγορία",
"All Day Event" => "Ολοήμερο συμβάν",
"From" => "Από",
"To" => "Έως",
+"Advanced options" => "Επιλογές για προχωρημένους",
"Repeat" => "Επαναλαμβανόμενο",
-"Attendees" => "Παρευρισκόμενοι",
+"Advanced" => "Για προχωρημένους",
+"Select weekdays" => "Επιλογή ημερών εβδομάδας",
+"Select days" => "Επιλογή ημερών",
+"and the events day of year." => "και των ημερών του χρόνου που υπάρχουν συμβάντα.",
+"and the events day of month." => "και των ημερών του μήνα που υπάρχουν συμβάντα.",
+"Select months" => "Επιλογή μηνών",
+"Select weeks" => "Επιλογή εβδομάδων",
+"and the events week of year." => "και των εβδομάδων του χρόνου που υπάρουν συμβάντα.",
+"Interval" => "Διάστημα",
+"End" => "Τέλος",
+"occurrences" => "περιστατικά",
+"Location" => "Τοποθεσία",
+"Location of the Event" => "Τοποθεσία συμβάντος",
+"Description" => "Περιγραφή",
"Description of the Event" => "Περιγραφή του συμβάντος",
-"Close" => "Κλείσιμο",
+"Import a calendar file" => "Εισαγωγή αρχείου ημερολογίου",
+"Please choose the calendar" => "Παρακαλώ επιλέξτε το ημερολόγιο",
+"create a new calendar" => "δημιουργία νέου ημερολογίου",
+"Name of new calendar" => "Όνομα νέου ημερολογίου",
+"Import" => "Εισαγωγή",
+"Importing calendar" => "Εισαγωγή ημερολογίου",
+"Calendar imported successfully" => "Το ημερολόγιο εισήχθει επιτυχώς",
+"Close Dialog" => "Κλείσιμο Διαλόγου",
"Create a new event" => "Δημιουργήστε ένα νέο συμβάν",
-"Timezone" => "Ζώνη ώρας"
+"Timezone" => "Ζώνη ώρας",
+"Check always for changes of the timezone" => "Έλεγοχς πάντα για τις αλλαγές της ζώνης ώρας",
+"Timeformat" => "Μορφή ώρας",
+"24h" => "24ω",
+"12h" => "12ω",
+"Calendar CalDAV syncing address:" => "Διεύθυνση για το συγχρονισμού του ημερολογίου CalDAV:"
);
diff --git a/apps/calendar/l10n/eo.php b/apps/calendar/l10n/eo.php
new file mode 100644
index 00000000000..7c1cc97b9ee
--- /dev/null
+++ b/apps/calendar/l10n/eo.php
@@ -0,0 +1,130 @@
+ "Nova horzono:",
+"Timezone changed" => "La horozono estas ŝanĝita",
+"Invalid request" => "Nevalida peto",
+"Calendar" => "Kalendaro",
+"Wrong calendar" => "Malĝusta kalendaro",
+"Birthday" => "Naskiĝotago",
+"Business" => "Negoco",
+"Call" => "Voko",
+"Clients" => "Klientoj",
+"Deliverer" => "Livero",
+"Holidays" => "Ferioj",
+"Ideas" => "Ideoj",
+"Journey" => "Vojaĝo",
+"Jubilee" => "Jubileo",
+"Meeting" => "Rendevuo",
+"Other" => "Alia",
+"Personal" => "Persona",
+"Projects" => "Projektoj",
+"Questions" => "Demandoj",
+"Work" => "Laboro",
+"Does not repeat" => "Ĉi tio ne ripetiĝas",
+"Daily" => "Tage",
+"Weekly" => "Semajne",
+"Every Weekday" => "Tage",
+"Bi-Weekly" => "Semajnduope",
+"Monthly" => "Monate",
+"Yearly" => "Jare",
+"never" => "neniam",
+"by occurrences" => "laŭ aperoj",
+"by date" => "laŭ dato",
+"by monthday" => "laŭ monattago",
+"by weekday" => "laŭ semajntago",
+"Monday" => "lundo",
+"Tuesday" => "mardo",
+"Wednesday" => "merkredo",
+"Thursday" => "ĵaŭdo",
+"Friday" => "vendredo",
+"Saturday" => "sabato",
+"Sunday" => "dimanĉo",
+"events week of month" => "la monatsemajno de la okazaĵo",
+"first" => "unua",
+"second" => "dua",
+"third" => "tria",
+"fourth" => "kvara",
+"fifth" => "kvina",
+"last" => "lasta",
+"January" => "Januaro",
+"February" => "Februaro",
+"March" => "Marto",
+"April" => "Aprilo",
+"May" => "Majo",
+"June" => "Junio",
+"July" => "Julio",
+"August" => "Aŭgusto",
+"September" => "Septembro",
+"October" => "Oktobro",
+"November" => "Novembro",
+"December" => "Decembro",
+"by events date" => "laŭ okazaĵdato",
+"by yearday(s)" => "laŭ jartago(j)",
+"by weeknumber(s)" => "laŭ semajnnumero(j)",
+"by day and month" => "laŭ tago kaj monato",
+"Not an array" => "Ĉi tio ne estas tabeltipa",
+"Date" => "Dato",
+"Cal." => "Kal.",
+"All day" => "La tuta tago",
+"Missing fields" => "Mankas iuj kampoj",
+"Title" => "Titolo",
+"From Date" => "ekde la dato",
+"From Time" => "ekde la horo",
+"To Date" => "ĝis la dato",
+"To Time" => "ĝis la horo",
+"The event ends before it starts" => "La okazaĵo finas antaŭ komenci",
+"There was a database fail" => "Datumbaza malsukceso okazis",
+"Week" => "Semajno",
+"Month" => "Monato",
+"List" => "Listo",
+"Today" => "Hodiaŭ",
+"Calendars" => "Kalendaroj",
+"There was a fail, while parsing the file." => "Malsukceso okazis dum analizo de la dosiero.",
+"Choose active calendars" => "Elektu aktivajn kalendarojn",
+"New Calendar" => "Nova kalendaro",
+"CalDav Link" => "CalDav-a ligilo",
+"Download" => "Elŝuti",
+"Edit" => "Redakti",
+"Delete" => "Forigi",
+"New calendar" => "Nova kalendaro",
+"Edit calendar" => "Redakti la kalendaron",
+"Displayname" => "Montrota nomo",
+"Active" => "Aktiva",
+"Calendar color" => "Kalendarokoloro",
+"Save" => "Konservi",
+"Submit" => "Sendi",
+"Cancel" => "Nuligi",
+"Edit an event" => "Redakti okazaĵon",
+"Export" => "Elporti",
+"Title of the Event" => "Okazaĵotitolo",
+"Category" => "Kategorio",
+"Select category" => "Elekti kategorion",
+"All Day Event" => "La tuta tago",
+"From" => "Ekde",
+"To" => "Ĝis",
+"Advanced options" => "Altnivela agordo",
+"Repeat" => "Ripeti",
+"Advanced" => "Altnivelo",
+"Select weekdays" => "Elekti semajntagojn",
+"Select days" => "Elekti tagojn",
+"and the events day of year." => "kaj la jartago de la okazaĵo.",
+"and the events day of month." => "kaj la monattago de la okazaĵo.",
+"Select months" => "Elekti monatojn",
+"Select weeks" => "Elekti semajnojn",
+"and the events week of year." => "kaj la jarsemajno de la okazaĵo.",
+"Interval" => "Intervalo",
+"End" => "Fino",
+"occurrences" => "aperoj",
+"Location" => "Loko",
+"Location of the Event" => "Okazaĵoloko",
+"Description" => "Priskribo",
+"Description of the Event" => "Okazaĵopriskribo",
+"Please choose the calendar" => "Bonvolu elekti kalendaron",
+"Import" => "Enporti",
+"Create a new event" => "Krei okazaĵon",
+"Timezone" => "Horozono",
+"Check always for changes of the timezone" => "Ĉiam kontroli ĉu la horzono ŝanĝiĝis",
+"Timeformat" => "Tempoformo",
+"24h" => "24h",
+"12h" => "12h",
+"Calendar CalDAV syncing address:" => "Adreso de kalendarosinkronigo per CalDAV:"
+);
diff --git a/apps/calendar/l10n/es.php b/apps/calendar/l10n/es.php
index 2d2d1d377ef..100ffc4b220 100644
--- a/apps/calendar/l10n/es.php
+++ b/apps/calendar/l10n/es.php
@@ -1,12 +1,14 @@
"Error de autentificación",
-"Wrong calendar" => "Calendario incorrecto",
+"New Timezone:" => "Nueva zona horaria:",
"Timezone changed" => "Zona horaria cambiada",
"Invalid request" => "Petición no válida",
"Calendar" => "Calendario",
+"Wrong calendar" => "Calendario incorrecto",
"Birthday" => "Cumpleaños",
"Business" => "Negocios",
+"Call" => "LLamada",
"Clients" => "Clientes",
+"Deliverer" => "Entrega",
"Holidays" => "Feriados",
"Ideas" => "Ideas",
"Journey" => "Viaje",
@@ -14,31 +16,35 @@
"Meeting" => "Reunión",
"Other" => "Otro",
"Personal" => "Personal",
-"Projects" => "Projectos",
+"Projects" => "Proyectos",
"Questions" => "Preguntas",
"Work" => "Trabajo",
"Does not repeat" => "No se repite",
"Daily" => "Diariamente",
"Weekly" => "Semanalmente",
-"Every Weekday" => "Una vez a la semana",
-"Bi-Weekly" => "Dos veces a la semana",
+"Every Weekday" => "Días de semana laboral",
+"Bi-Weekly" => "Cada 2 semanas",
"Monthly" => "Mensualmente",
"Yearly" => "Anualmente",
-"All day" => "Todo el día",
-"Sunday" => "Domingo",
+"never" => "nunca",
+"by occurrences" => "por ocurrencias",
+"by date" => "por fecha",
+"by monthday" => "por día del mes",
+"by weekday" => "por día de la semana",
"Monday" => "Lunes",
"Tuesday" => "Martes",
"Wednesday" => "Miércoles",
"Thursday" => "Jueves",
"Friday" => "Viernes",
"Saturday" => "Sábado",
-"Sun." => "Dom.",
-"Mon." => "Lun.",
-"Tue." => "Mar.",
-"Wed." => "Mie.",
-"Thu." => "Jue.",
-"Fri." => "Vie.",
-"Sat." => "Sáb.",
+"Sunday" => "Domingo",
+"events week of month" => "eventos de la semana del mes",
+"first" => "primer",
+"second" => "segundo",
+"third" => "tercer",
+"fourth" => "cuarto",
+"fifth" => "quinto",
+"last" => "último",
"January" => "Enero",
"February" => "Febrero",
"March" => "Marzo",
@@ -51,10 +57,41 @@
"October" => "Octubre",
"November" => "Noviembre",
"December" => "Diciembre",
+"by events date" => "por fecha de los eventos",
+"by yearday(s)" => "por día(s) del año",
+"by weeknumber(s)" => "por número(s) de semana",
+"by day and month" => "por día y mes",
+"Not an array" => "No es una serie",
+"Date" => "Fecha",
+"Cal." => "Cal.",
+"All day" => "Todo el día",
+"New Calendar" => "Nuevo calendario",
+"Missing fields" => "Los campos que faltan",
+"Title" => "Título",
+"From Date" => "Desde la fecha",
+"From Time" => "Desde la hora",
+"To Date" => "Hasta la fecha",
+"To Time" => "Hasta la hora",
+"The event ends before it starts" => "El evento termina antes de que comience",
+"There was a database fail" => "Hubo un error en la base de datos",
+"Week" => "Semana",
+"Month" => "Mes",
+"List" => "Lista",
+"Today" => "Hoy",
+"Calendars" => "Calendarios",
+"There was a fail, while parsing the file." => "Hubo un fallo al analizar el archivo.",
+"Sun." => "Dom.",
+"Mon." => "Lun.",
+"Tue." => "Mar.",
+"Wed." => "Mié.",
+"Thu." => "Jue.",
+"Fri." => "Vie.",
+"Sat." => "Sáb.",
"Jan." => "Ene.",
"Feb." => "Feb.",
"Mar." => "Mar.",
"Apr." => "Abr.",
+"May." => "May.",
"Jun." => "Jun.",
"Jul." => "Jul.",
"Aug." => "Ago.",
@@ -62,42 +99,57 @@
"Oct." => "Oct.",
"Nov." => "Nov.",
"Dec." => "Dic.",
-"Week" => "Semana",
-"Weeks" => "Semanas",
-"Day" => "Día",
-"Month" => "Mes",
-"List" => "Lista",
-"Today" => "Hoy",
-"Calendars" => "Calendarios",
-"Time" => "Hora",
-"There was a fail, while parsing the file." => "Hubo un fallo al analizar el archivo.",
"Choose active calendars" => "Elige los calendarios activos",
-"New Calendar" => "Nuevo calendario",
+"CalDav Link" => "Enlace a CalDav",
"Download" => "Descargar",
"Edit" => "Editar",
+"Delete" => "Eliminar",
"New calendar" => "Nuevo calendario",
"Edit calendar" => "Editar calendario",
"Displayname" => "Nombre",
"Active" => "Activo",
-"Description" => "Descripción",
"Calendar color" => "Color del calendario",
"Save" => "Guardar",
"Submit" => "Guardar",
"Cancel" => "Cancelar",
"Edit an event" => "Editar un evento",
-"Title" => "Título",
+"Export" => "Exportar",
"Title of the Event" => "Título del evento",
-"Location" => "Lugar",
-"Location of the Event" => "Lugar del Evento",
"Category" => "Categoría",
"Select category" => "Seleccionar categoría",
"All Day Event" => "Todo el día",
"From" => "Desde",
"To" => "Hasta",
+"Advanced options" => "Opciones avanzadas",
"Repeat" => "Repetir",
-"Attendees" => "Asistentes",
+"Advanced" => "Avanzado",
+"Select weekdays" => "Seleccionar días de la semana",
+"Select days" => "Seleccionar días",
+"and the events day of year." => "y el día del año de los eventos.",
+"and the events day of month." => "y el día del mes de los eventos.",
+"Select months" => "Seleccionar meses",
+"Select weeks" => "Seleccionar semanas",
+"and the events week of year." => "y la semana del año de los eventos.",
+"Interval" => "Intervalo",
+"End" => "Fin",
+"occurrences" => "ocurrencias",
+"Location" => "Lugar",
+"Location of the Event" => "Lugar del Evento",
+"Description" => "Descripción",
"Description of the Event" => "Descripción del evento",
-"Close" => "Cerrar",
+"Import a calendar file" => "Importar un archivo de calendario",
+"Please choose the calendar" => "Elija el calendario",
+"create a new calendar" => "Crear un nuevo calendario",
+"Name of new calendar" => "Nombre del nuevo calendario",
+"Import" => "Importar",
+"Importing calendar" => "Importando calendario",
+"Calendar imported successfully" => "Calendario importado exitosamente",
+"Close Dialog" => "Cerrar diálogo",
"Create a new event" => "Crear un nuevo evento",
-"Timezone" => "Zona horaria"
+"Timezone" => "Zona horaria",
+"Check always for changes of the timezone" => "Comprobar siempre por cambios en la zona horaria",
+"Timeformat" => "Formato de hora",
+"24h" => "24h",
+"12h" => "12h",
+"Calendar CalDAV syncing address:" => "Dirección de sincronización de calendario CalDAV:"
);
diff --git a/apps/calendar/l10n/et_EE.php b/apps/calendar/l10n/et_EE.php
index c66638f2b4c..7bff7bf42e7 100644
--- a/apps/calendar/l10n/et_EE.php
+++ b/apps/calendar/l10n/et_EE.php
@@ -1,8 +1,24 @@
"Autentimise viga",
+"New Timezone:" => "Uus ajavöönd:",
"Timezone changed" => "Ajavöönd on muudetud",
"Invalid request" => "Vigane päring",
"Calendar" => "Kalender",
+"Wrong calendar" => "Vale kalender",
+"Birthday" => "Sünnipäev",
+"Business" => "Äri",
+"Call" => "Helista",
+"Clients" => "Kliendid",
+"Deliverer" => "Kohaletoimetaja",
+"Holidays" => "Pühad",
+"Ideas" => "Ideed",
+"Journey" => "Reis",
+"Jubilee" => "Juubel",
+"Meeting" => "Kohtumine",
+"Other" => "Muu",
+"Personal" => "Isiklik",
+"Projects" => "Projektid",
+"Questions" => "Küsimused",
+"Work" => "Töö",
"Does not repeat" => "Ei kordu",
"Daily" => "Iga päev",
"Weekly" => "Iga nädal",
@@ -10,21 +26,25 @@
"Bi-Weekly" => "Üle nädala",
"Monthly" => "Igal kuul",
"Yearly" => "Igal aastal",
-"All day" => "Kogu päev",
-"Sunday" => "Pühapäev",
+"never" => "mitte kunagi",
+"by occurrences" => "toimumiskordade järgi",
+"by date" => "kuupäeva järgi",
+"by monthday" => "kuu päeva järgi",
+"by weekday" => "nädalapäeva järgi",
"Monday" => "Esmaspäev",
"Tuesday" => "Teisipäev",
"Wednesday" => "Kolmapäev",
"Thursday" => "Neljapäev",
"Friday" => "Reede",
"Saturday" => "Laupäev",
-"Sun." => "Pü.",
-"Mon." => "Esm.",
-"Tue." => "Teisip.",
-"Wed." => "Kolmap.",
-"Thu." => "Neljap.",
-"Fri." => "Reede",
-"Sat." => "Laup.",
+"Sunday" => "Pühapäev",
+"events week of month" => "ürituse kuu nädal",
+"first" => "esimene",
+"second" => "teine",
+"third" => "kolmas",
+"fourth" => "neljas",
+"fifth" => "viies",
+"last" => "viimane",
"January" => "Jaanuar",
"February" => "Veebruar",
"March" => "Märts",
@@ -37,10 +57,41 @@
"October" => "Oktoober",
"November" => "November",
"December" => "Detsember",
+"by events date" => "ürituste kuupäeva järgi",
+"by yearday(s)" => "aasta päeva(de) järgi",
+"by weeknumber(s)" => "nädala numbri(te) järgi",
+"by day and month" => "kuu ja päeva järgi",
+"Not an array" => "Pole andmemassiiv",
+"Date" => "Kuupäev",
+"Cal." => "Kal.",
+"All day" => "Kogu päev",
+"New Calendar" => "Uus kalender",
+"Missing fields" => "Puuduvad väljad",
+"Title" => "Pealkiri",
+"From Date" => "Alates kuupäevast",
+"From Time" => "Alates kellaajast",
+"To Date" => "Kuni kuupäevani",
+"To Time" => "Kuni kellaajani",
+"The event ends before it starts" => "Üritus lõpeb enne, kui see algab",
+"There was a database fail" => "Tekkis andmebaasi viga",
+"Week" => "Nädal",
+"Month" => "Kuu",
+"List" => "Nimekiri",
+"Today" => "Täna",
+"Calendars" => "Kalendrid",
+"There was a fail, while parsing the file." => "Faili parsimisel tekkis viga.",
+"Sun." => "Püh.",
+"Mon." => "Esm.",
+"Tue." => "Teisip.",
+"Wed." => "Kolmap.",
+"Thu." => "Meljap.",
+"Fri." => "Reede",
+"Sat." => "Laup.",
"Jan." => "Jan.",
"Feb." => "Veebr.",
-"Mar." => "Märts",
+"Mar." => "Mär.",
"Apr." => "Apr.",
+"May." => "Mai",
"Jun." => "Jun.",
"Jul." => "Jul.",
"Aug." => "Aug.",
@@ -48,36 +99,57 @@
"Oct." => "Okt.",
"Nov." => "Nov.",
"Dec." => "Dets.",
-"Week" => "Nädal",
-"Weeks" => "Nädalat",
-"Day" => "Päev",
-"Month" => "Kuu",
-"Today" => "Täna",
-"Calendars" => "Kalendrid",
-"Time" => "Kellaaeg",
-"There was a fail, while parsing the file." => "Faili parsimisel tekkis viga.",
"Choose active calendars" => "Vali aktiivsed kalendrid",
+"CalDav Link" => "CalDav Link",
"Download" => "Lae alla",
"Edit" => "Muuda",
+"Delete" => "Kustuta",
+"New calendar" => "Uus kalender",
"Edit calendar" => "Muuda kalendrit",
"Displayname" => "Näidatav nimi",
"Active" => "Aktiivne",
-"Description" => "Kirjeldus",
"Calendar color" => "Kalendri värv",
+"Save" => "Salvesta",
"Submit" => "OK",
+"Cancel" => "Loobu",
"Edit an event" => "Muuda sündmust",
-"Title" => "Pealkiri",
+"Export" => "Ekspordi",
"Title of the Event" => "Sündmuse pealkiri",
-"Location" => "Asukoht",
-"Location of the Event" => "Sündmuse toimumiskoht",
"Category" => "Kategooria",
+"Select category" => "Salvesta kategooria",
"All Day Event" => "Kogu päeva sündmus",
"From" => "Alates",
"To" => "Kuni",
+"Advanced options" => "Lisavalikud",
"Repeat" => "Korda",
-"Attendees" => "Osalejad",
+"Advanced" => "Täpsem",
+"Select weekdays" => "Vali nädalapäevad",
+"Select days" => "Vali päevad",
+"and the events day of year." => "ja ürituse päev aastas.",
+"and the events day of month." => "ja ürituse päev kuus.",
+"Select months" => "Vali kuud",
+"Select weeks" => "Vali nädalad",
+"and the events week of year." => "ja ürituse nädal aastas.",
+"Interval" => "Intervall",
+"End" => "Lõpp",
+"occurrences" => "toimumiskordi",
+"Location" => "Asukoht",
+"Location of the Event" => "Sündmuse toimumiskoht",
+"Description" => "Kirjeldus",
"Description of the Event" => "Sündmuse kirjeldus",
-"Close" => "Sulge",
+"Import a calendar file" => "Impordi kalendrifail",
+"Please choose the calendar" => "Palun vali kalender",
+"create a new calendar" => "loo uus kalender",
+"Name of new calendar" => "Uue kalendri nimi",
+"Import" => "Impordi",
+"Importing calendar" => "Kalendri importimine",
+"Calendar imported successfully" => "Kalender on imporditud",
+"Close Dialog" => "Sulge dialoogiaken",
"Create a new event" => "Loo sündmus",
-"Timezone" => "Ajavöönd"
+"Timezone" => "Ajavöönd",
+"Check always for changes of the timezone" => "Kontrolli alati muudatusi ajavööndis",
+"Timeformat" => "Aja vorming",
+"24h" => "24h",
+"12h" => "12h",
+"Calendar CalDAV syncing address:" => "Kalendri CalDAV sünkroniseerimise aadress:"
);
diff --git a/apps/calendar/l10n/eu.php b/apps/calendar/l10n/eu.php
new file mode 100644
index 00000000000..be5b3f2203d
--- /dev/null
+++ b/apps/calendar/l10n/eu.php
@@ -0,0 +1,80 @@
+ "Ordu-zona aldatuta",
+"Invalid request" => "Baligabeko eskaera",
+"Calendar" => "Egutegia",
+"Wrong calendar" => "Egutegi okerra",
+"Birthday" => "Jaioteguna",
+"Business" => "Negozioa",
+"Call" => "Deia",
+"Clients" => "Bezeroak",
+"Deliverer" => "Banatzailea",
+"Holidays" => "Oporrak",
+"Ideas" => "Ideiak",
+"Journey" => "Bidaia",
+"Jubilee" => "Urteurrena",
+"Meeting" => "Bilera",
+"Other" => "Bestelakoa",
+"Personal" => "Pertsonala",
+"Projects" => "Proiektuak",
+"Questions" => "Galderak",
+"Work" => "Lana",
+"Does not repeat" => "Ez da errepikatzen",
+"Daily" => "Egunero",
+"Weekly" => "Astero",
+"Every Weekday" => "Asteko egun guztietan",
+"Bi-Weekly" => "Bi-Astero",
+"Monthly" => "Hilabetero",
+"Yearly" => "Urtero",
+"Not an array" => "Ez da bektore bat",
+"All day" => "Egun guztia",
+"Missing fields" => "Eremuak faltan",
+"Title" => "Izenburua",
+"From Date" => "Hasierako Data",
+"From Time" => "Hasierako Ordua",
+"To Date" => "Bukaerako Data",
+"To Time" => "Bukaerako Ordua",
+"The event ends before it starts" => "Gertaera hasi baino lehen bukatzen da",
+"There was a database fail" => "Datu baseak huts egin du",
+"Week" => "Astea",
+"Month" => "Hilabetea",
+"List" => "Zerrenda",
+"Today" => "Gaur",
+"Calendars" => "Egutegiak",
+"There was a fail, while parsing the file." => "Huts bat egon da, fitxategia aztertzen zen bitartea.",
+"Choose active calendars" => "Aukeratu egutegi aktiboak",
+"New Calendar" => "Egutegi berria",
+"CalDav Link" => "CalDav Lotura",
+"Download" => "Deskargatu",
+"Edit" => "Editatu",
+"Delete" => "Ezabatu",
+"New calendar" => "Egutegi berria",
+"Edit calendar" => "Editatu egutegia",
+"Displayname" => "Bistaratzeko izena",
+"Active" => "Aktiboa",
+"Calendar color" => "Egutegiaren kolorea",
+"Save" => "Gorde",
+"Submit" => "Bidali",
+"Cancel" => "Ezeztatu",
+"Edit an event" => "Editatu gertaera",
+"Export" => "Exportatu",
+"Title of the Event" => "Gertaeraren izenburua",
+"Category" => "Kategoria",
+"Select category" => "Aukeratu kategoria",
+"All Day Event" => "Egun osoko gertaera",
+"From" => "Hasiera",
+"To" => "Bukaera",
+"Advanced options" => "Aukera aurreratuak",
+"Repeat" => "Errepikatu",
+"Location" => "Kokalekua",
+"Location of the Event" => "Gertaeraren kokalekua",
+"Description" => "Deskribapena",
+"Description of the Event" => "Gertaeraren deskribapena",
+"Please choose the calendar" => "Mesedez aukeratu egutegia",
+"Import" => "Importatu",
+"Create a new event" => "Sortu gertaera berria",
+"Timezone" => "Ordu-zona",
+"Timeformat" => "Ordu formatua",
+"24h" => "24h",
+"12h" => "12h",
+"Calendar CalDAV syncing address:" => "Egutegiaren CalDAV sinkronizazio helbidea"
+);
diff --git a/apps/calendar/l10n/fr.php b/apps/calendar/l10n/fr.php
index c12d773a67a..36ce1ad875c 100644
--- a/apps/calendar/l10n/fr.php
+++ b/apps/calendar/l10n/fr.php
@@ -1,17 +1,17 @@
"Erreur d'authentification",
-"Wrong calendar" => "Mauvais calendrier",
+"New Timezone:" => "Nouveau fuseau horaire :",
"Timezone changed" => "Fuseau horaire modifié",
"Invalid request" => "Requête invalide",
"Calendar" => "Calendrier",
+"Wrong calendar" => "Mauvais calendrier",
"Birthday" => "Anniversaire",
-"Business" => "Business",
+"Business" => "Professionnel",
"Call" => "Appel",
-"Clients" => "Clients",
-"Deliverer" => "Livreur",
+"Clients" => "Clientèle",
+"Deliverer" => "Livraison",
"Holidays" => "Vacances",
"Ideas" => "Idées",
-"Journey" => "Journée",
+"Journey" => "Déplacement",
"Jubilee" => "Jubilé",
"Meeting" => "Meeting",
"Other" => "Autre",
@@ -21,27 +21,29 @@
"Work" => "Travail",
"Does not repeat" => "Pas de répétition",
"Daily" => "Tous les jours",
-"Weekly" => "Toutes les semaines",
-"Every Weekday" => "Chaque jour de la semaine",
-"Bi-Weekly" => "Bimestriel",
-"Monthly" => "Tous les mois",
-"Yearly" => "Tous les ans",
-"Not an array" => "Ce n'est pas un tableau",
-"All day" => "Tous les jours",
-"Sunday" => "Dimanche",
+"Weekly" => "Hebdomadaire",
+"Every Weekday" => "Quotidien",
+"Bi-Weekly" => "Bi-hebdomadaire",
+"Monthly" => "Mensuel",
+"Yearly" => "Annuel",
+"never" => "jamais",
+"by occurrences" => "par occurrences",
+"by date" => "par date",
+"by monthday" => "par jour du mois",
+"by weekday" => "par jour de la semaine",
"Monday" => "Lundi",
"Tuesday" => "Mardi",
"Wednesday" => "Mercredi",
"Thursday" => "Jeudi",
"Friday" => "Vendredi",
"Saturday" => "Samedi",
-"Sun." => "Dim.",
-"Mon." => "Lun.",
-"Tue." => "Mar.",
-"Wed." => "Mer.",
-"Thu." => "Jeu.",
-"Fri." => "Ven.",
-"Sat." => "Sam.",
+"Sunday" => "Dimanche",
+"first" => "premier",
+"second" => "second",
+"third" => "troisième",
+"fourth" => "quatrième",
+"fifth" => "cinquième",
+"last" => "dernier",
"January" => "Janvier",
"February" => "Février",
"March" => "Mars",
@@ -54,57 +56,96 @@
"October" => "Octobre",
"November" => "Novembre",
"December" => "Décembre",
-"Jan." => "Jan.",
-"Feb." => "Fév.",
-"Mar." => "Mar.",
-"Apr." => "Avr.",
-"May." => "Peut-être *****",
-"Jun." => "Juin",
-"Jul." => "Juil.",
-"Aug." => "Aoû.",
-"Sep." => "Sep.",
-"Oct." => "Oct.",
-"Nov." => "Nov.",
-"Dec." => "Déc.",
+"by events date" => "par date d’événements",
+"by yearday(s)" => "par jour(s) de l'année",
+"by weeknumber(s)" => "par numéro de semaine(s)",
+"by day and month" => "par jour et mois",
+"Not an array" => "Ce n'est pas un tableau",
+"Date" => "Date",
+"Cal." => "Cal.",
+"All day" => "Journée entière",
+"Missing fields" => "Champs manquants",
+"Title" => "Titre",
+"From Date" => "De la date",
+"From Time" => "De l'heure",
+"To Date" => "A la date",
+"To Time" => "A l'heure",
+"The event ends before it starts" => "L'évènement s'est terminé avant qu'il ne commence",
+"There was a database fail" => "Il y a eu un échec dans la base de donnée",
"Week" => "Semaine",
-"Weeks" => "Semaines",
-"More before {startdate}" => "Voir plus avant {startdate}",
-"More after {enddate}" => "Voir plus après {enddate}",
-"Day" => "Jour",
"Month" => "Mois",
"List" => "Liste",
"Today" => "Aujourd'hui",
"Calendars" => "Calendriers",
-"Time" => "Heure",
"There was a fail, while parsing the file." => "Une erreur est survenue pendant la lecture du fichier.",
+"Sun." => "Dim.",
+"Mon." => "Lun.",
+"Tue." => "Mar.",
+"Wed." => "Mer.",
+"Thu." => "Jeu.",
+"Fri." => "Ven.",
+"Sat." => "Sam.",
+"Jan." => "Jan.",
+"Feb." => "Fév.",
+"Mar." => "Mar.",
+"Apr." => "Avr.",
+"May." => "Mai.",
+"Jun." => "Jui.",
+"Jul." => "Jit.",
+"Aug." => "Aou.",
+"Sep." => "Sep.",
+"Oct." => "Oct.",
+"Nov." => "Nov.",
+"Dec." => "Déc.",
"Choose active calendars" => "Choix des calendriers actifs",
"New Calendar" => "Nouveau Calendrier",
"CalDav Link" => "Lien CalDav",
"Download" => "Télécharger",
"Edit" => "Éditer",
+"Delete" => "Supprimer",
"New calendar" => "Nouveau calendrier",
"Edit calendar" => "Éditer le calendrier",
"Displayname" => "Nom d'affichage",
"Active" => "Actif",
-"Description" => "Description",
"Calendar color" => "Couleur du calendrier",
"Save" => "Sauvegarder",
"Submit" => "Soumettre",
"Cancel" => "Annuler",
"Edit an event" => "Éditer un événement",
-"Title" => "Titre",
+"Export" => "Exporter",
"Title of the Event" => "Titre de l'événement",
-"Location" => "Localisation",
-"Location of the Event" => "Localisation de l'événement",
"Category" => "Catégorie",
"Select category" => "Sélectionner une catégorie",
-"All Day Event" => "Événement de toute une journée",
+"All Day Event" => "Journée entière",
"From" => "De",
"To" => "À",
+"Advanced options" => "Options avancées",
"Repeat" => "Répétition",
-"Attendees" => "Personnes présentes",
+"Advanced" => "Avancé",
+"Select weekdays" => "Sélection des jours de la semaine",
+"Select days" => "Sélection des jours",
+"Select months" => "Sélection des mois",
+"Select weeks" => "Sélection des semaines",
+"Interval" => "Intervalle",
+"End" => "Fin",
+"occurrences" => "occurrences",
+"Location" => "Emplacement",
+"Location of the Event" => "Emplacement de l'événement",
+"Description" => "Description",
"Description of the Event" => "Description de l'événement",
-"Close" => "Fermer",
+"Import a calendar file" => "Importer un fichier de calendriers",
+"Please choose the calendar" => "Choisissez le calendrier svp",
+"create a new calendar" => "Créer un nouveau calendrier",
+"Name of new calendar" => "Nom pour le nouveau calendrier",
+"Import" => "Importer",
+"Importing calendar" => "Import du calendrier",
+"Calendar imported successfully" => "Calendrier importé avec succès",
+"Close Dialog" => "Fermer la fenêtre",
"Create a new event" => "Créer un nouvel événement",
-"Timezone" => "Fuseau horaire"
+"Timezone" => "Fuseau horaire",
+"Check always for changes of the timezone" => "Toujours vérifier d'éventuels changements de fuseau horaire",
+"Timeformat" => "Format de l'heure",
+"24h" => "24h",
+"12h" => "12h",
+"Calendar CalDAV syncing address:" => "Adresse de synchronisation du calendrier CalDAV :"
);
diff --git a/apps/calendar/l10n/gl.php b/apps/calendar/l10n/gl.php
new file mode 100644
index 00000000000..6b74a04f923
--- /dev/null
+++ b/apps/calendar/l10n/gl.php
@@ -0,0 +1,155 @@
+ "Novo fuso horario:",
+"Timezone changed" => "Fuso horario trocado",
+"Invalid request" => "Petición non válida",
+"Calendar" => "Calendario",
+"Wrong calendar" => "Calendario equivocado",
+"Birthday" => "Cumpleanos",
+"Business" => "Traballo",
+"Call" => "Chamada",
+"Clients" => "Clientes",
+"Deliverer" => "Remitente",
+"Holidays" => "Vacacións",
+"Ideas" => "Ideas",
+"Journey" => "Viaxe",
+"Jubilee" => "Aniversario",
+"Meeting" => "Reunión",
+"Other" => "Outro",
+"Personal" => "Personal",
+"Projects" => "Proxectos",
+"Questions" => "Preguntas",
+"Work" => "Traballo",
+"Does not repeat" => "Non se repite",
+"Daily" => "A diario",
+"Weekly" => "Semanalmente",
+"Every Weekday" => "Tódalas semanas",
+"Bi-Weekly" => "Cada dúas semanas",
+"Monthly" => "Mensualmente",
+"Yearly" => "Anual",
+"never" => "nunca",
+"by occurrences" => "por acontecementos",
+"by date" => "por data",
+"by monthday" => "por día do mes",
+"by weekday" => "por día da semana",
+"Monday" => "Luns",
+"Tuesday" => "Martes",
+"Wednesday" => "Mércores",
+"Thursday" => "Xoves",
+"Friday" => "Venres",
+"Saturday" => "Sábado",
+"Sunday" => "Domingo",
+"events week of month" => "semana dos eventos no mes",
+"first" => "primeiro",
+"second" => "segundo",
+"third" => "terceiro",
+"fourth" => "cuarto",
+"fifth" => "quinto",
+"last" => "último",
+"January" => "Xaneiro",
+"February" => "Febreiro",
+"March" => "Marzo",
+"April" => "Abril",
+"May" => "Maio",
+"June" => "Xuño",
+"July" => "Xullo",
+"August" => "Agosto",
+"September" => "Setembro",
+"October" => "Outubro",
+"November" => "Novembro",
+"December" => "Nadal",
+"by events date" => "por data dos eventos",
+"by yearday(s)" => "por dia(s) do ano",
+"by weeknumber(s)" => "por número(s) de semana",
+"by day and month" => "por día e mes",
+"Not an array" => "Non é un conxunto",
+"Date" => "Data",
+"Cal." => "Cal.",
+"All day" => "Todo o dia",
+"New Calendar" => "Novo calendario",
+"Missing fields" => "Faltan campos",
+"Title" => "Título",
+"From Date" => "Desde Data",
+"From Time" => "Desde Hora",
+"To Date" => "a Data",
+"To Time" => "a Hora",
+"The event ends before it starts" => "O evento remata antes de iniciarse",
+"There was a database fail" => "Houbo un erro na base de datos",
+"Week" => "Semana",
+"Month" => "Mes",
+"List" => "Lista",
+"Today" => "Hoxe",
+"Calendars" => "Calendarios",
+"There was a fail, while parsing the file." => "Houbo un erro ao procesar o ficheiro",
+"Sun." => "Dom.",
+"Mon." => "Lun.",
+"Tue." => "Mar.",
+"Wed." => "Mer.",
+"Thu." => "Xov.",
+"Fri." => "Ven.",
+"Sat." => "Sáb.",
+"Jan." => "Xan.",
+"Feb." => "Feb.",
+"Mar." => "Mar.",
+"Apr." => "Abr.",
+"May." => "Mai.",
+"Jun." => "Xuñ.",
+"Jul." => "Xul.",
+"Aug." => "Ago.",
+"Sep." => "Set.",
+"Oct." => "Out.",
+"Nov." => "Nov.",
+"Dec." => "Nad.",
+"Choose active calendars" => "Escolla os calendarios activos",
+"CalDav Link" => "Ligazón CalDav",
+"Download" => "Baixar",
+"Edit" => "Editar",
+"Delete" => "Borrar",
+"New calendar" => "Novo calendario",
+"Edit calendar" => "Editar calendario",
+"Displayname" => "Mostrar nome",
+"Active" => "Activo",
+"Calendar color" => "Cor do calendario",
+"Save" => "Gardar",
+"Submit" => "Enviar",
+"Cancel" => "Cancelar",
+"Edit an event" => "Editar un evento",
+"Export" => "Exportar",
+"Title of the Event" => "Título do evento",
+"Category" => "Categoría",
+"Select category" => "Seleccionar categoría",
+"All Day Event" => "Evento para todo o día",
+"From" => "Desde",
+"To" => "Para",
+"Advanced options" => "Opcións avanzadas",
+"Repeat" => "Repetir",
+"Advanced" => "Avanzado",
+"Select weekdays" => "Seleccionar días da semana",
+"Select days" => "Seleccionar días",
+"and the events day of year." => "e día dos eventos no ano.",
+"and the events day of month." => "e día dos eventos no mes.",
+"Select months" => "Seleccione meses",
+"Select weeks" => "Seleccione semanas",
+"and the events week of year." => "e semana dos eventos no ano.",
+"Interval" => "Intervalo",
+"End" => "Fin",
+"occurrences" => "acontecementos",
+"Location" => "Localización",
+"Location of the Event" => "Localización do evento",
+"Description" => "Descripción",
+"Description of the Event" => "Descripción do evento",
+"Import a calendar file" => "Importar ficheiro de calendario",
+"Please choose the calendar" => "Por favor, seleccione o calendario",
+"create a new calendar" => "crear un novo calendario",
+"Name of new calendar" => "Nome do novo calendario",
+"Import" => "Importar",
+"Importing calendar" => "Importar calendario",
+"Calendar imported successfully" => "Calendario importado con éxito",
+"Close Dialog" => "Pechar cadro",
+"Create a new event" => "Crear un novo evento",
+"Timezone" => "Fuso horario",
+"Check always for changes of the timezone" => "Comprobar sempre cambios de fuso horario",
+"Timeformat" => "Formato de hora",
+"24h" => "24h",
+"12h" => "12h",
+"Calendar CalDAV syncing address:" => "Dirección de sincronización do calendario CalDAV:"
+);
diff --git a/apps/calendar/l10n/he.php b/apps/calendar/l10n/he.php
new file mode 100644
index 00000000000..a399a9ff676
--- /dev/null
+++ b/apps/calendar/l10n/he.php
@@ -0,0 +1,67 @@
+ "אזור זמן השתנה",
+"Invalid request" => "בקשה לא חוקית",
+"Calendar" => "ח שנה",
+"Wrong calendar" => "לוח שנה לא נכון",
+"Birthday" => "יום הולדת",
+"Business" => "עסקים",
+"Call" => "שיחה",
+"Clients" => "לקוחות",
+"Deliverer" => "משלוח",
+"Holidays" => "חגים",
+"Ideas" => "רעיונות",
+"Journey" => "מסע",
+"Jubilee" => "יובל",
+"Meeting" => "פגישה",
+"Other" => "אחר",
+"Personal" => "אישי",
+"Projects" => "פרוייקטים",
+"Questions" => "שאלות",
+"Work" => "עבודה",
+"Does not repeat" => "ללא חזרה",
+"Daily" => "יומי",
+"Weekly" => "שבועי",
+"Every Weekday" => "כל יום עבודה",
+"Bi-Weekly" => "דו שבועי",
+"Monthly" => "חודשי",
+"Yearly" => "שנתי",
+"Not an array" => "לא מערך",
+"All day" => "היום",
+"Title" => "כותרת",
+"Week" => "שבוע",
+"Month" => "חודש",
+"List" => "רשימה",
+"Today" => "היום",
+"Calendars" => "לוחות שנה",
+"There was a fail, while parsing the file." => "אירעה שגיאה בעת פענוח הקובץ.",
+"Choose active calendars" => "בחר לוחות שנה פעילים",
+"New Calendar" => "לוח שנה חדש",
+"CalDav Link" => "קישור CalDav",
+"Download" => "הורדה",
+"Edit" => "עריכה",
+"Delete" => "מחיקה",
+"New calendar" => "לוח שנה חדש",
+"Edit calendar" => "עריכת לוח שנה",
+"Displayname" => "שם תצוגה",
+"Active" => "פעיל",
+"Calendar color" => "צבע לוח שנה",
+"Save" => "שמירה",
+"Submit" => "שליחה",
+"Cancel" => "ביטול",
+"Edit an event" => "עריכת אירוע",
+"Export" => "יצוא",
+"Title of the Event" => "כותרת האירוע",
+"Category" => "קטגוריה",
+"Select category" => "בחר קטגוריה",
+"All Day Event" => "אירוע של כל היום",
+"From" => "מאת",
+"To" => "עבור",
+"Repeat" => "חזרה",
+"Location" => "מיקום",
+"Location of the Event" => "מיקום האירוע",
+"Description" => "תיאור",
+"Description of the Event" => "תיאור האירוע",
+"Import" => "יבוא",
+"Create a new event" => "יצירת אירוע חדש",
+"Timezone" => "אזור זמן"
+);
diff --git a/apps/calendar/l10n/hr.php b/apps/calendar/l10n/hr.php
new file mode 100644
index 00000000000..1778511edee
--- /dev/null
+++ b/apps/calendar/l10n/hr.php
@@ -0,0 +1,80 @@
+ "Vremenska zona promijenjena",
+"Invalid request" => "Neispravan zahtjev",
+"Calendar" => "Kalendar",
+"Wrong calendar" => "Pogrešan kalendar",
+"Birthday" => "Rođendan",
+"Business" => "Poslovno",
+"Call" => "Poziv",
+"Clients" => "Klijenti",
+"Deliverer" => "Dostavljač",
+"Holidays" => "Odmori",
+"Ideas" => "Ideje",
+"Journey" => "Putovanje",
+"Jubilee" => "Obljetnica",
+"Meeting" => "Sastanak",
+"Other" => "Ostalo",
+"Personal" => "Osobno",
+"Projects" => "Projekti",
+"Questions" => "Pitanja",
+"Work" => "Posao",
+"Does not repeat" => "Ne ponavlja se",
+"Daily" => "Dnevno",
+"Weekly" => "Tjedno",
+"Every Weekday" => "Svakog radnog dana",
+"Bi-Weekly" => "Dvotjedno",
+"Monthly" => "Mjesečno",
+"Yearly" => "Godišnje",
+"Not an array" => "Nije niz",
+"All day" => "Cijeli dan",
+"Missing fields" => "Nedostaju polja",
+"Title" => "Naslov",
+"From Date" => "Datum Od",
+"From Time" => "Vrijeme Od",
+"To Date" => "Datum Do",
+"To Time" => "Vrijeme Do",
+"The event ends before it starts" => "Događaj završava prije nego počinje",
+"There was a database fail" => "Pogreška u bazi podataka",
+"Week" => "Tjedan",
+"Month" => "Mjesec",
+"List" => "Lista",
+"Today" => "Danas",
+"Calendars" => "Kalendari",
+"There was a fail, while parsing the file." => "Pogreška pri čitanju datoteke.",
+"Choose active calendars" => "Odaberite aktive kalendare",
+"New Calendar" => "Novi Kalendar",
+"CalDav Link" => "CalDav Poveznica",
+"Download" => "Spremi lokalno",
+"Edit" => "Uredi",
+"Delete" => "Briši",
+"New calendar" => "Novi kalendar",
+"Edit calendar" => "Uredi kalendar",
+"Displayname" => "Naziv",
+"Active" => "Aktivan",
+"Calendar color" => "Boja kalendara",
+"Save" => "Spremi",
+"Submit" => "Potvrdi",
+"Cancel" => "Odustani",
+"Edit an event" => "Uredi događaj",
+"Export" => "Izvoz",
+"Title of the Event" => "Naslov Događaja",
+"Category" => "Kategorija",
+"Select category" => "Odabir kategorije",
+"All Day Event" => "Cjelodnevni događaj",
+"From" => "Od",
+"To" => "Za",
+"Advanced options" => "Napredne mogućnosti",
+"Repeat" => "Ponavljanje",
+"Location" => "Lokacija",
+"Location of the Event" => "Lokacija Događaja",
+"Description" => "Opis",
+"Description of the Event" => "Opis događaja",
+"Please choose the calendar" => "Odaberite kalendar",
+"Import" => "Uvoz",
+"Create a new event" => "Unesi novi događaj",
+"Timezone" => "Vremenska zona",
+"Timeformat" => "Format vremena",
+"24h" => "24h",
+"12h" => "12h",
+"Calendar CalDAV syncing address:" => "Adresa za CalDAV sinkronizaciju kalendara"
+);
diff --git a/apps/calendar/l10n/hu_HU.php b/apps/calendar/l10n/hu_HU.php
new file mode 100644
index 00000000000..3c52551abb3
--- /dev/null
+++ b/apps/calendar/l10n/hu_HU.php
@@ -0,0 +1,78 @@
+ "Időzóna megváltozott",
+"Invalid request" => "Érvénytelen kérés",
+"Calendar" => "Naptár",
+"Wrong calendar" => "Hibás naptár",
+"Birthday" => "Születésap",
+"Business" => "Üzlet",
+"Call" => "Hívás",
+"Clients" => "Kliensek",
+"Deliverer" => "Szállító",
+"Holidays" => "Ünnepek",
+"Ideas" => "Ötletek",
+"Journey" => "Utazás",
+"Jubilee" => "Évforduló",
+"Meeting" => "Találkozó",
+"Other" => "Egyéb",
+"Personal" => "Személyes",
+"Projects" => "Projektek",
+"Questions" => "Kérdések",
+"Work" => "Munka",
+"Does not repeat" => "Nem ismétlődik",
+"Daily" => "Napi",
+"Weekly" => "Heti",
+"Every Weekday" => "Minden hétköznap",
+"Bi-Weekly" => "Kéthetente",
+"Monthly" => "Havi",
+"Yearly" => "Évi",
+"Not an array" => "Nem egy tömb",
+"All day" => "Egész nap",
+"Missing fields" => "Hiányzó mezők",
+"Title" => "Cím",
+"From Date" => "Napjától",
+"From Time" => "Időtől",
+"To Date" => "Napig",
+"To Time" => "Ideig",
+"The event ends before it starts" => "Az esemény véget ér a kezdés előtt.",
+"There was a database fail" => "Adatbázis hiba történt",
+"Week" => "Hét",
+"Month" => "Hónap",
+"List" => "Lista",
+"Today" => "Ma",
+"Calendars" => "Naptárak",
+"There was a fail, while parsing the file." => "Probléma volt a fájl elemzése közben.",
+"Choose active calendars" => "Aktív naptár kiválasztása",
+"New Calendar" => "Új naptár",
+"CalDav Link" => "CalDAV link",
+"Download" => "Letöltés",
+"Edit" => "Szerkesztés",
+"Delete" => "Törlés",
+"New calendar" => "Új naptár",
+"Edit calendar" => "Naptár szerkesztése",
+"Displayname" => "Megjelenítési név",
+"Active" => "Aktív",
+"Calendar color" => "Naptár szín",
+"Save" => "Mentés",
+"Submit" => "Beküldés",
+"Cancel" => "Mégse",
+"Edit an event" => "Esemény szerkesztése",
+"Export" => "Export",
+"Title of the Event" => "Az esemény címe",
+"Category" => "Kategória",
+"Select category" => "Kategória kiválasztása",
+"All Day Event" => "Egész napos esemény",
+"Advanced options" => "Haladó beállítások",
+"Repeat" => "Ismétlés",
+"Location" => "Hely",
+"Location of the Event" => "Az esemény helyszíne",
+"Description" => "Leírás",
+"Description of the Event" => "Az esemény leírása",
+"Please choose the calendar" => "Válassz naptárat",
+"Import" => "Importálás",
+"Create a new event" => "Új esemény létrehozása",
+"Timezone" => "Időzóna",
+"Timeformat" => "Időformátum",
+"24h" => "24h",
+"12h" => "12h",
+"Calendar CalDAV syncing address:" => "Naptár CalDAV szinkronizálási cím:"
+);
diff --git a/apps/calendar/l10n/hy.php b/apps/calendar/l10n/hy.php
new file mode 100644
index 00000000000..3b675693b0f
--- /dev/null
+++ b/apps/calendar/l10n/hy.php
@@ -0,0 +1,11 @@
+ "Օրացույց",
+"Other" => "Այլ",
+"Month" => "Ամիս",
+"Today" => "Այսօր",
+"Download" => "Բեռնել",
+"Delete" => "Ջնջել",
+"Save" => "Պահպանել",
+"Submit" => "Հաստատել",
+"Description" => "Նկարագրություն"
+);
diff --git a/apps/calendar/l10n/ia.php b/apps/calendar/l10n/ia.php
new file mode 100644
index 00000000000..547c96e5a07
--- /dev/null
+++ b/apps/calendar/l10n/ia.php
@@ -0,0 +1,27 @@
+ "Calendario",
+"Projects" => "Projectos",
+"Work" => "Travalio",
+"All day" => "Omne die",
+"Title" => "Titulo",
+"Week" => "Septimana",
+"Month" => "Mense",
+"List" => "Lista",
+"Today" => "Hodie",
+"Calendars" => "Calendarios",
+"Choose active calendars" => "Selectionar calendarios active",
+"New Calendar" => "Nove calendario",
+"Download" => "Discarga",
+"Edit" => "Modificar",
+"Delete" => "Deler",
+"Edit calendar" => "Modificar calendario",
+"Active" => "Active",
+"Calendar color" => "Color de calendario",
+"Save" => "Salveguardar",
+"Submit" => "Inviar",
+"Cancel" => "Cancellar",
+"Select category" => "Selectionar categoria",
+"From" => "Ab",
+"To" => "A",
+"Description" => "Description"
+);
diff --git a/apps/calendar/l10n/id.php b/apps/calendar/l10n/id.php
index 5cb95d0b358..a52891813c9 100644
--- a/apps/calendar/l10n/id.php
+++ b/apps/calendar/l10n/id.php
@@ -1,5 +1,4 @@
"Kesalahan otentikasi",
"Timezone changed" => "Zona waktu telah diubah",
"Invalid request" => "Permintaan tidak sah",
"Calendar" => "Kalender",
@@ -11,50 +10,11 @@
"Monthly" => "Bulanan",
"Yearly" => "Tahunan",
"All day" => "Semua Hari",
-"Sunday" => "Minggu",
-"Monday" => "Senin",
-"Tuesday" => "Selasa",
-"Wednesday" => "Rabu",
-"Thursday" => "Kamis",
-"Friday" => "Jumat",
-"Saturday" => "Sabtu",
-"Sun." => "Min.",
-"Mon." => "Sen.",
-"Tue." => "Sel.",
-"Wed." => "Rab.",
-"Thu." => "Kam.",
-"Fri." => "Jum.",
-"Sat." => "Sab.",
-"January" => "Januari",
-"February" => "Februari",
-"March" => "Maret",
-"April" => "April",
-"May" => "Mei",
-"June" => "Juni",
-"July" => "Juli",
-"August" => "Agustus",
-"September" => "September",
-"October" => "Oktober",
-"November" => "November",
-"December" => "Desember",
-"Jan." => "Jan.",
-"Feb." => "Feb.",
-"Mar." => "Mar.",
-"Apr." => "Apr.",
-"Jun." => "Jun.",
-"Jul." => "Jul.",
-"Aug." => "Agu.",
-"Sep." => "Sep.",
-"Oct." => "Okt.",
-"Nov." => "Nov.",
-"Dec." => "Des.",
+"Title" => "Judul",
"Week" => "Minggu",
-"Weeks" => "Minggu",
-"Day" => "Hari",
"Month" => "Bulan",
"Today" => "Hari ini",
"Calendars" => "Kalender",
-"Time" => "Waktu",
"There was a fail, while parsing the file." => "Terjadi kesalahan, saat mengurai berkas.",
"Choose active calendars" => "Pilih kalender aktif",
"Download" => "Unduh",
@@ -62,22 +22,19 @@
"Edit calendar" => "Sunting kalender",
"Displayname" => "Namatampilan",
"Active" => "Aktif",
-"Description" => "Deskripsi",
"Calendar color" => "Warna kalender",
"Submit" => "Sampaikan",
"Edit an event" => "Sunting agenda",
-"Title" => "Judul",
"Title of the Event" => "Judul Agenda",
-"Location" => "Lokasi",
-"Location of the Event" => "Lokasi Agenda",
"Category" => "Kategori",
"All Day Event" => "Agenda di Semua Hari",
"From" => "Dari",
"To" => "Ke",
"Repeat" => "Ulangi",
-"Attendees" => "Yang menghadiri",
+"Location" => "Lokasi",
+"Location of the Event" => "Lokasi Agenda",
+"Description" => "Deskripsi",
"Description of the Event" => "Deskripsi dari Agenda",
-"Close" => "Tutup",
"Create a new event" => "Buat agenda baru",
"Timezone" => "Zonawaktu"
);
diff --git a/apps/calendar/l10n/it.php b/apps/calendar/l10n/it.php
index dcb6799b04c..cb125043593 100644
--- a/apps/calendar/l10n/it.php
+++ b/apps/calendar/l10n/it.php
@@ -1,9 +1,9 @@
"Errore di autenticazione",
-"Wrong calendar" => "Calendario sbagliato",
+"New Timezone:" => "Nuovo fuso orario:",
"Timezone changed" => "Fuso orario cambiato",
-"Invalid request" => "Richiesta non validia",
+"Invalid request" => "Richiesta non valida",
"Calendar" => "Calendario",
+"Wrong calendar" => "Calendario sbagliato",
"Birthday" => "Compleanno",
"Business" => "Azienda",
"Call" => "Chiama",
@@ -26,22 +26,25 @@
"Bi-Weekly" => "Ogni due settimane",
"Monthly" => "Mensile",
"Yearly" => "Annuale",
-"Not an array" => "Non è un array",
-"All day" => "Tutti i giorni",
-"Sunday" => "Domenica",
+"never" => "mai",
+"by occurrences" => "per occorrenze",
+"by date" => "per data",
+"by monthday" => "per giorno del mese",
+"by weekday" => "per giorno della settimana",
"Monday" => "Lunedì",
"Tuesday" => "Martedì",
"Wednesday" => "Mercoledì",
"Thursday" => "Giovedì",
"Friday" => "Venerdì",
"Saturday" => "Sabato",
-"Sun." => "Dom.",
-"Mon." => "Lun.",
-"Tue." => "Mar.",
-"Wed." => "Mer.",
-"Thu." => "Gio.",
-"Fri." => "Ven.",
-"Sat." => "Sab.",
+"Sunday" => "Domenica",
+"events week of month" => "settimana del mese degli eventi",
+"first" => "primo",
+"second" => "secondo",
+"third" => "terzo",
+"fourth" => "quarto",
+"fifth" => "quinto",
+"last" => "ultimo",
"January" => "Gennaio",
"February" => "Febbraio",
"March" => "Marzo",
@@ -54,11 +57,40 @@
"October" => "Ottobre",
"November" => "Novembre",
"December" => "Dicembre",
+"by events date" => "per data evento",
+"by yearday(s)" => "per giorno/i dell'anno",
+"by weeknumber(s)" => "per numero/i settimana",
+"by day and month" => "per giorno e mese",
+"Not an array" => "Non è un array",
+"Date" => "Data",
+"Cal." => "Cal.",
+"All day" => "Tutti i giorni",
+"Missing fields" => "Campi mancanti",
+"Title" => "Titolo",
+"From Date" => "Dal giorno",
+"From Time" => "Ora inizio",
+"To Date" => "al giorno",
+"To Time" => "Ora fine",
+"The event ends before it starts" => "L'evento finisce prima d'iniziare",
+"There was a database fail" => "C'è stato un errore col database",
+"Week" => "Settimana",
+"Month" => "Mese",
+"List" => "Lista",
+"Today" => "Oggi",
+"Calendars" => "Calendari",
+"There was a fail, while parsing the file." => "C'è stato un errore nel parsing del file.",
+"Sun." => "Dom.",
+"Mon." => "Lun.",
+"Tue." => "Mar.",
+"Wed." => "Mer.",
+"Thu." => "Gio.",
+"Fri." => "Ven.",
+"Sat." => "Sab.",
"Jan." => "Gen.",
"Feb." => "Feb.",
"Mar." => "Mar.",
"Apr." => "Apr.",
-"May." => "Maggio.",
+"May." => "Mag.",
"Jun." => "Giu.",
"Jul." => "Lug.",
"Aug." => "Ago.",
@@ -66,45 +98,58 @@
"Oct." => "Ott.",
"Nov." => "Nov.",
"Dec." => "Dic.",
-"Week" => "Settimana",
-"Weeks" => "Settimane",
-"More before {startdate}" => "Prima di {startdate}",
-"More after {enddate}" => "Dopo {enddate}",
-"Day" => "Giorno",
-"Month" => "Mese",
-"List" => "Lista",
-"Today" => "Oggi",
-"Calendars" => "Calendari",
-"Time" => "Ora",
-"There was a fail, while parsing the file." => "C'è stato un errore nel parsing del file.",
"Choose active calendars" => "Selezionare calendari attivi",
"New Calendar" => "Nuovo Calendario",
"CalDav Link" => "CalDav Link",
"Download" => "Download",
"Edit" => "Modifica",
+"Delete" => "Elimina",
"New calendar" => "Nuovo calendario",
"Edit calendar" => "Modifica calendario",
"Displayname" => "Mostra nome",
"Active" => "Attivo",
-"Description" => "Descrizione",
"Calendar color" => "Colore calendario",
"Save" => "Salva",
"Submit" => "Invia",
"Cancel" => "Annulla",
"Edit an event" => "Modifica evento",
-"Title" => "Titolo",
+"Export" => "Esporta",
"Title of the Event" => "Titolo evento",
-"Location" => "Luogo",
-"Location of the Event" => "Luogo evento",
"Category" => "Categoria",
"Select category" => "Seleziona categoria",
"All Day Event" => "Tutti gli eventi del giorno",
"From" => "Da",
"To" => "A",
+"Advanced options" => "Opzioni avanzate",
"Repeat" => "Ripeti",
-"Attendees" => "Partecipanti",
+"Advanced" => "Avanzato",
+"Select weekdays" => "Seleziona i giorni della settimana",
+"Select days" => "Seleziona i giorni",
+"and the events day of year." => "e il giorno dell'anno degli eventi",
+"and the events day of month." => "e il giorno del mese degli eventi",
+"Select months" => "Seleziona i mesi",
+"Select weeks" => "Seleziona le settimane",
+"and the events week of year." => "e la settimana dell'anno degli eventi",
+"Interval" => "Intervallo",
+"End" => "Fine",
+"occurrences" => "occorrenze",
+"Location" => "Luogo",
+"Location of the Event" => "Luogo evento",
+"Description" => "Descrizione",
"Description of the Event" => "Descrizione evento",
-"Close" => "Chiuso",
+"Import a calendar file" => "Importa un file calendario",
+"Please choose the calendar" => "Per favore scegli il calendario",
+"create a new calendar" => "Crea un nuovo calendario",
+"Name of new calendar" => "Nome del nuovo calendario",
+"Import" => "Importa",
+"Importing calendar" => "Sto importando il calendario",
+"Calendar imported successfully" => "Calendario importato con successo",
+"Close Dialog" => "Chiudi la finestra di dialogo",
"Create a new event" => "Crea evento",
-"Timezone" => "Timezone"
+"Timezone" => "Fuso orario",
+"Check always for changes of the timezone" => "Controlla sempre i cambiamenti di fuso orario",
+"Timeformat" => "Formato ora",
+"24h" => "24h",
+"12h" => "12h",
+"Calendar CalDAV syncing address:" => "Indirizzo sincronizzazione calendario CalDAV:"
);
diff --git a/apps/calendar/l10n/ja_JP.php b/apps/calendar/l10n/ja_JP.php
new file mode 100644
index 00000000000..0645f6a2a2c
--- /dev/null
+++ b/apps/calendar/l10n/ja_JP.php
@@ -0,0 +1,155 @@
+ "新しいタイムゾーン:",
+"Timezone changed" => "タイムゾーンが変更されました",
+"Invalid request" => "無効なリクエストです",
+"Calendar" => "カレンダー",
+"Wrong calendar" => "誤ったカレンダーです",
+"Birthday" => "誕生日",
+"Business" => "ビジネス",
+"Call" => "電話をかける",
+"Clients" => "顧客",
+"Deliverer" => "運送会社",
+"Holidays" => "休日",
+"Ideas" => "アイデア",
+"Journey" => "旅行",
+"Jubilee" => "記念祭",
+"Meeting" => "ミーティング",
+"Other" => "その他",
+"Personal" => "個人",
+"Projects" => "プロジェクト",
+"Questions" => "質問事項",
+"Work" => "仕事",
+"Does not repeat" => "繰り返さない",
+"Daily" => "毎日",
+"Weekly" => "毎週",
+"Every Weekday" => "毎平日",
+"Bi-Weekly" => "2週間ごと",
+"Monthly" => "毎月",
+"Yearly" => "毎年",
+"never" => "無し",
+"by occurrences" => "回数で指定",
+"by date" => "日付で指定",
+"by monthday" => "日にちで指定",
+"by weekday" => "曜日で指定",
+"Monday" => "月曜日",
+"Tuesday" => "火曜日",
+"Wednesday" => "水曜日",
+"Thursday" => "木曜日",
+"Friday" => "金曜日",
+"Saturday" => "土曜日",
+"Sunday" => "日曜日",
+"events week of month" => "予定のある週を指定",
+"first" => "1週目",
+"second" => "2週目",
+"third" => "3週目",
+"fourth" => "4週目",
+"fifth" => "5週目",
+"last" => "最終週",
+"January" => "1月",
+"February" => "2月",
+"March" => "3月",
+"April" => "4月",
+"May" => "5月",
+"June" => "6月",
+"July" => "7月",
+"August" => "8月",
+"September" => "9月",
+"October" => "10月",
+"November" => "11月",
+"December" => "12月",
+"by events date" => "日付で指定",
+"by yearday(s)" => "日番号で指定",
+"by weeknumber(s)" => "週番号で指定",
+"by day and month" => "月と日で指定",
+"Not an array" => "配列ではありません",
+"Date" => "日付",
+"Cal." => "カレンダー",
+"All day" => "終日",
+"Missing fields" => "項目がありません",
+"Title" => "タイトル",
+"From Date" => "開始日",
+"From Time" => "開始時間",
+"To Date" => "終了日",
+"To Time" => "終了時間",
+"The event ends before it starts" => "イベント終了時間が開始時間より先です",
+"There was a database fail" => "データベースフェイルがありました",
+"Week" => "週",
+"Month" => "月",
+"List" => "リスト",
+"Today" => "今日",
+"Calendars" => "カレンダー",
+"There was a fail, while parsing the file." => "ファイルを構文解析する際に失敗しました",
+"Sun." => "日",
+"Mon." => "月",
+"Tue." => "火",
+"Wed." => "水",
+"Thu." => "木",
+"Fri." => "金",
+"Sat." => "土",
+"Jan." => "1月",
+"Feb." => "2月",
+"Mar." => "3月",
+"Apr." => "4月",
+"May." => "5月",
+"Jun." => "6月",
+"Jul." => "7月",
+"Aug." => "8月",
+"Sep." => "9月",
+"Oct." => "10月",
+"Nov." => "11月",
+"Dec." => "12月",
+"Choose active calendars" => "アクティブなカレンダーを選択してください",
+"New Calendar" => "新しくカレンダーを作成する",
+"CalDav Link" => "CalDavへのリンク",
+"Download" => "ダウンロード",
+"Edit" => "編集",
+"Delete" => "削除",
+"New calendar" => "新しくカレンダーを作成する",
+"Edit calendar" => "カレンダーを編集",
+"Displayname" => "表示名",
+"Active" => "アクティブ",
+"Calendar color" => "カレンダーの色",
+"Save" => "保存",
+"Submit" => "完了",
+"Cancel" => "キャンセル",
+"Edit an event" => "イベントを編集",
+"Export" => "エクスポート",
+"Title of the Event" => "イベントのタイトル",
+"Category" => "カテゴリー",
+"Select category" => "カテゴリーを選択してください",
+"All Day Event" => "終日イベント",
+"From" => "開始",
+"To" => "終了",
+"Advanced options" => "詳細設定",
+"Repeat" => "繰り返す",
+"Advanced" => "詳細設定",
+"Select weekdays" => "曜日を指定",
+"Select days" => "日付を指定",
+"and the events day of year." => "対象の年を選択する。",
+"and the events day of month." => "対象の月を選択する。",
+"Select months" => "月を指定する",
+"Select weeks" => "週を指定する",
+"and the events week of year." => "対象の週を選択する。",
+"Interval" => "周期",
+"End" => "繰り返す期間",
+"occurrences" => "回繰り返す",
+"Location" => "場所",
+"Location of the Event" => "イベントの場所",
+"Description" => "メモ",
+"Description of the Event" => "イベントのメモ",
+"Import a calendar file" => "カレンダーファイルをインポート",
+"Please choose the calendar" => "カレンダーを選択してください",
+"create a new calendar" => "新規カレンダーの作成",
+"Name of new calendar" => "新規カレンダーの名称",
+"Import" => "インポート",
+"Importing calendar" => "カレンダーを取り込み中",
+"Calendar imported successfully" => "カレンダーの取り込みに成功しました",
+"Close Dialog" => "閉じる",
+"Create a new event" => "新しいイベントを作成する",
+"Timezone" => "タイムゾーン",
+"Check always for changes of the timezone" => "タイムゾーン変更を常に確認する",
+"Timeformat" => "時刻のフォーマット",
+"24h" => "24時間制",
+"12h" => "12時間制",
+"Calendar CalDAV syncing address:" => "カレンダーのCalDAVシンクアドレス"
+);
diff --git a/apps/calendar/l10n/lb.php b/apps/calendar/l10n/lb.php
index 82cdac133fa..08b8d88f2a2 100644
--- a/apps/calendar/l10n/lb.php
+++ b/apps/calendar/l10n/lb.php
@@ -1,8 +1,23 @@
"Authentifizéierung's Feeler",
"Timezone changed" => "Zäitzon geännert",
"Invalid request" => "Ongülteg Requête",
"Calendar" => "Kalenner",
+"Wrong calendar" => "Falschen Kalenner",
+"Birthday" => "Gebuertsdag",
+"Business" => "Geschäftlech",
+"Call" => "Uruff",
+"Clients" => "Clienten",
+"Deliverer" => "Liwwerant",
+"Holidays" => "Vakanzen",
+"Ideas" => "Ideeën",
+"Journey" => "Dag",
+"Jubilee" => "Jubiläum",
+"Meeting" => "Meeting",
+"Other" => "Aner",
+"Personal" => "Perséinlech",
+"Projects" => "Projeten",
+"Questions" => "Froen",
+"Work" => "Aarbecht",
"Does not repeat" => "Widderhëlt sech net",
"Daily" => "Deeglech",
"Weekly" => "All Woch",
@@ -10,74 +25,56 @@
"Bi-Weekly" => "All zweet Woch",
"Monthly" => "All Mount",
"Yearly" => "All Joer",
+"Not an array" => "Keen array",
"All day" => "All Dag",
-"Sunday" => "Sonnden",
-"Monday" => "Méinden",
-"Tuesday" => "Dënschden",
-"Wednesday" => "Mëttwoch",
-"Thursday" => "Donneschden",
-"Friday" => "Freiden",
-"Saturday" => "Samschden",
-"Sun." => "So. ",
-"Mon." => "Méin. ",
-"Tue." => "Dën.",
-"Wed." => "Mëtt.",
-"Thu." => "Do.",
-"Fri." => "Fr.",
-"Sat." => "Sam.",
-"January" => "Januar",
-"February" => "Februar",
-"March" => "Mäerz",
-"April" => "Abrëll",
-"May" => "Mäi",
-"June" => "Juni",
-"July" => "Juli",
-"August" => "August",
-"September" => "September",
-"October" => "Oktober",
-"November" => "November",
-"December" => "Dezember",
-"Jan." => "Jan.",
-"Feb." => "Feb.",
-"Mar." => "Mär.",
-"Apr." => "Abr.",
-"Jun." => "Jun.",
-"Jul." => "Jul.",
-"Aug." => "Aug.",
-"Sep." => "Sep.",
-"Oct." => "Okt.",
-"Nov." => "Nov.",
-"Dec." => "Dez.",
+"Missing fields" => "Felder déi feelen",
+"Title" => "Titel",
+"From Date" => "Vun Datum",
+"From Time" => "Vun Zäit",
+"To Date" => "Bis Datum",
+"To Time" => "Bis Zäit",
+"The event ends before it starts" => "D'Evenement hält op ier et ufänkt",
+"There was a database fail" => "En Datebank Feeler ass opgetrueden",
"Week" => "Woch",
-"Weeks" => "Wochen",
-"Day" => "Dag",
"Month" => "Mount",
+"List" => "Lescht",
"Today" => "Haut",
"Calendars" => "Kalenneren",
-"Time" => "Zäit",
"There was a fail, while parsing the file." => "Feeler beim lueden vum Fichier.",
"Choose active calendars" => "Wiel aktiv Kalenneren aus",
+"New Calendar" => "Neien Kalenner",
+"CalDav Link" => "CalDav Link",
"Download" => "Eroflueden",
"Edit" => "Editéieren",
+"Delete" => "Läschen",
+"New calendar" => "Neien Kalenner",
"Edit calendar" => "Kalenner editéieren",
"Displayname" => "Numm",
"Active" => "Aktiv",
-"Description" => "Beschreiwung",
"Calendar color" => "Fuerf vum Kalenner",
+"Save" => "Späicheren",
"Submit" => "Fortschécken",
+"Cancel" => "Ofbriechen",
"Edit an event" => "Evenement editéieren",
-"Title" => "Titel",
+"Export" => "Export",
"Title of the Event" => "Titel vum Evenement",
-"Location" => "Uert",
-"Location of the Event" => "Uert vum Evenement",
"Category" => "Kategorie",
+"Select category" => "Kategorie auswielen",
"All Day Event" => "Ganz-Dag Evenement",
"From" => "Vun",
"To" => "Fir",
+"Advanced options" => "Avancéiert Optiounen",
"Repeat" => "Widderhuelen",
-"Attendees" => "Participanten",
+"Location" => "Uert",
+"Location of the Event" => "Uert vum Evenement",
+"Description" => "Beschreiwung",
"Description of the Event" => "Beschreiwung vum Evenement",
-"Close" => "Zoumaachen",
+"Please choose the calendar" => "Wiel den Kalenner aus",
+"Import" => "Import",
"Create a new event" => "En Evenement maachen",
-"Timezone" => "Zäitzon"
+"Timezone" => "Zäitzon",
+"Timeformat" => "Zäit Format",
+"24h" => "24h",
+"12h" => "12h",
+"Calendar CalDAV syncing address:" => "CalDAV Kalenner Synchronisatioun's Adress:"
);
diff --git a/apps/calendar/l10n/lt_LT.php b/apps/calendar/l10n/lt_LT.php
new file mode 100644
index 00000000000..7cc74887f75
--- /dev/null
+++ b/apps/calendar/l10n/lt_LT.php
@@ -0,0 +1,71 @@
+ "Laiko zona pakeista",
+"Invalid request" => "Klaidinga užklausa",
+"Calendar" => "Kalendorius",
+"Wrong calendar" => "Ne tas kalendorius",
+"Birthday" => "Gimtadienis",
+"Business" => "Verslas",
+"Call" => "Skambučiai",
+"Clients" => "Klientai",
+"Holidays" => "Išeiginės",
+"Ideas" => "Idėjos",
+"Journey" => "Kelionė",
+"Jubilee" => "Jubiliejus",
+"Meeting" => "Susitikimas",
+"Does not repeat" => "Nekartoti",
+"Daily" => "Kasdien",
+"Weekly" => "Kiekvieną savaitę",
+"Every Weekday" => "Kiekvieną savaitės dieną",
+"Bi-Weekly" => "Kas dvi savaites",
+"Monthly" => "Kiekvieną mėnesį",
+"Yearly" => "Kiekvienais metais",
+"Not an array" => "Ne masyvas",
+"All day" => "Visa diena",
+"Missing fields" => "Trūkstami laukai",
+"Title" => "Pavadinimas",
+"To Date" => "Iki datos",
+"To Time" => "Iki laiko",
+"The event ends before it starts" => "Įvykis baigiasi anksčiau nei jis prasideda",
+"There was a database fail" => "Įvyko duomenų bazės klaida",
+"Week" => "Savaitė",
+"Month" => "Mėnuo",
+"List" => "Sąrašas",
+"Today" => "Šiandien",
+"Calendars" => "Kalendoriai",
+"There was a fail, while parsing the file." => "Apdorojant failą įvyko klaida.",
+"Choose active calendars" => "Pasirinkite naudojamus kalendorius",
+"New Calendar" => "Naujas kalendorius",
+"CalDav Link" => "CalDav adresas",
+"Download" => "Atsisiųsti",
+"Edit" => "Keisti",
+"Delete" => "Trinti",
+"New calendar" => "Naujas kalendorius",
+"Edit calendar" => "Taisyti kalendorių",
+"Displayname" => "Pavadinimas",
+"Active" => "Naudojamas",
+"Save" => "Išsaugoti",
+"Submit" => "Išsaugoti",
+"Cancel" => "Atšaukti",
+"Edit an event" => "Taisyti įvykį",
+"Export" => "Eksportuoti",
+"Title of the Event" => "Įvykio pavadinimas",
+"Category" => "Kategorija",
+"Select category" => "Pasirinkite kategoriją",
+"All Day Event" => "Visos dienos įvykis",
+"From" => "Nuo",
+"To" => "Iki",
+"Advanced options" => "Papildomi nustatymai",
+"Repeat" => "Kartoti",
+"Location" => "Vieta",
+"Location of the Event" => "Įvykio vieta",
+"Description" => "Aprašymas",
+"Description of the Event" => "Įvykio aprašymas",
+"Please choose the calendar" => "Pasirinkite kalendorių",
+"Import" => "Importuoti",
+"Create a new event" => "Sukurti naują įvykį",
+"Timezone" => "Laiko juosta",
+"Timeformat" => "Laiko formatas",
+"24h" => "24val",
+"12h" => "12val",
+"Calendar CalDAV syncing address:" => "CalDAV kalendoriaus synchronizavimo adresas:"
+);
diff --git a/apps/calendar/l10n/ms_MY.php b/apps/calendar/l10n/ms_MY.php
index 625422a8582..663cc6a6468 100644
--- a/apps/calendar/l10n/ms_MY.php
+++ b/apps/calendar/l10n/ms_MY.php
@@ -1,5 +1,4 @@
"Ralat pengesahan",
"Timezone changed" => "Zon waktu diubah",
"Invalid request" => "Permintaan tidak sah",
"Calendar" => "Kalendar",
@@ -11,50 +10,11 @@
"Monthly" => "Bulanan",
"Yearly" => "Tahunan",
"All day" => "Sepanjang hari",
-"Sunday" => "Ahad",
-"Monday" => "Isnin",
-"Tuesday" => "Selasa",
-"Wednesday" => "Rabu",
-"Thursday" => "Khamis",
-"Friday" => "Jumaat",
-"Saturday" => "Sabtu",
-"Sun." => "Ahad",
-"Mon." => "Isnin",
-"Tue." => "Selasa",
-"Wed." => "Rabu",
-"Thu." => "Khamis",
-"Fri." => "Jumaat",
-"Sat." => "Sabtu",
-"January" => "Januari",
-"February" => "Februari",
-"March" => "Mac",
-"April" => "April ",
-"May" => "Mei",
-"June" => "Jun",
-"July" => "Julai",
-"August" => "Ogos",
-"September" => "September",
-"October" => "Oktober",
-"November" => "November",
-"December" => "Disember",
-"Jan." => "Jan",
-"Feb." => "Feb",
-"Mar." => "Mac",
-"Apr." => "Apr",
-"Jun." => "Jun",
-"Jul." => "Jul",
-"Aug." => "Ogos",
-"Sep." => "Sep",
-"Oct." => "Okt",
-"Nov." => "Nov",
-"Dec." => "Dis",
+"Title" => "Tajuk",
"Week" => "Minggu",
-"Weeks" => "Minggu",
-"Day" => "Hari",
"Month" => "Bulan",
"Today" => "Hari ini",
"Calendars" => "Kalendar",
-"Time" => "Waktu",
"There was a fail, while parsing the file." => "Berlaku kegagalan ketika penguraian fail. ",
"Choose active calendars" => "Pilih kalendar yang aktif",
"Download" => "Muat turun",
@@ -62,22 +22,19 @@
"Edit calendar" => "Edit kalendar",
"Displayname" => "Paparan nama",
"Active" => "Aktif",
-"Description" => "Huraian",
"Calendar color" => "Warna kalendar",
"Submit" => "Hantar",
"Edit an event" => "Edit agenda",
-"Title" => "Tajuk",
"Title of the Event" => "Tajuk agenda",
-"Location" => "Lokasi",
-"Location of the Event" => "Lokasi agenda",
"Category" => "kategori",
"All Day Event" => "Agenda di sepanjang hari ",
"From" => "Dari",
"To" => "ke",
"Repeat" => "Ulang",
-"Attendees" => "Hadirin",
+"Location" => "Lokasi",
+"Location of the Event" => "Lokasi agenda",
+"Description" => "Huraian",
"Description of the Event" => "Huraian agenda",
-"Close" => "Tutup",
"Create a new event" => "Buat agenda baru",
"Timezone" => "Zon waktu"
);
diff --git a/apps/calendar/l10n/nb_NO.php b/apps/calendar/l10n/nb_NO.php
index 95e555bc852..e7ecf47b6ed 100644
--- a/apps/calendar/l10n/nb_NO.php
+++ b/apps/calendar/l10n/nb_NO.php
@@ -1,5 +1,4 @@
"Autentifikasjonsfeil",
"Timezone changed" => "Tidssone endret",
"Invalid request" => "Ugyldig forespørsel",
"Calendar" => "Kalender",
@@ -10,72 +9,30 @@
"Monthly" => "Månedlig",
"Yearly" => "Årlig",
"All day" => "Hele dagen ",
-"Sunday" => "Søndag",
-"Monday" => "Mandag",
-"Tuesday" => "Tirsdag",
-"Wednesday" => "Onsdag",
-"Thursday" => "Torsdag",
-"Friday" => "Fredag",
-"Saturday" => "Lørdag",
-"Sun." => "Sø.",
-"Mon." => "Ma.",
-"Tue." => "Ti.",
-"Wed." => "On.",
-"Thu." => "To.",
-"Fri." => "Fr.",
-"Sat." => "Lø.",
-"January" => "Januar",
-"February" => "Februar",
-"March" => "Mars",
-"April" => "April",
-"May" => "Mai",
-"June" => "Juni",
-"July" => "Juli",
-"August" => "August",
-"September" => "September",
-"October" => "Oktober",
-"November" => "November",
-"December" => "Desember",
-"Jan." => "jan.",
-"Feb." => "feb.",
-"Mar." => "mar.",
-"Apr." => "apr.",
-"Jun." => "jun.",
-"Jul." => "jul.",
-"Aug." => "aug.",
-"Sep." => "sep.",
-"Oct." => "okt.",
-"Nov." => "nov.",
-"Dec." => "des.",
+"Title" => "Tittel",
"Week" => "Uke",
-"Weeks" => "Uke",
-"Day" => "Dag",
"Month" => "ned",
"Today" => "I dag",
"Calendars" => "Kalendre",
-"Time" => "Tid",
"Choose active calendars" => "Velg en aktiv kalender",
"Download" => "Last ned",
"Edit" => "Endre",
"Edit calendar" => "Rediger kalender",
"Displayname" => "Visningsnavn",
"Active" => "Aktiv",
-"Description" => "Beskrivelse",
"Calendar color" => "Kalenderfarge",
"Submit" => "Lagre",
"Edit an event" => "Rediger en hendelse",
-"Title" => "Tittel",
"Title of the Event" => "Hendelsestittel",
-"Location" => "Sted",
-"Location of the Event" => "Hendelsessted",
"Category" => "Kategori",
"All Day Event" => "Hele dagen-hendelse",
"From" => "Fra",
"To" => "Til",
"Repeat" => "Gjenta",
-"Attendees" => "Deltakere",
+"Location" => "Sted",
+"Location of the Event" => "Hendelsessted",
+"Description" => "Beskrivelse",
"Description of the Event" => "Hendelesebeskrivelse",
-"Close" => "Lukk",
"Create a new event" => "Opprett en ny hendelse",
"Timezone" => "Tidssone"
);
diff --git a/apps/calendar/l10n/nl.php b/apps/calendar/l10n/nl.php
index 3f7ebfe274e..e80694d610e 100644
--- a/apps/calendar/l10n/nl.php
+++ b/apps/calendar/l10n/nl.php
@@ -1,8 +1,24 @@
"Foute aanvraag",
-"Timezone changed" => "U kunt maar een venster tegelijk openen.",
+"New Timezone:" => "Nieuwe tijdszone:",
+"Timezone changed" => "Tijdzone is veranderd",
"Invalid request" => "Ongeldige aanvraag",
-"Calendar" => "Weergavenaam",
+"Calendar" => "Kalender",
+"Wrong calendar" => "Verkeerde kalender",
+"Birthday" => "Verjaardag",
+"Business" => "Zakelijk",
+"Call" => "Bellen",
+"Clients" => "Klanten",
+"Deliverer" => "Leverancier",
+"Holidays" => "Vakantie",
+"Ideas" => "Ideeën",
+"Journey" => "Reis",
+"Jubilee" => "Jubileum",
+"Meeting" => "Vergadering",
+"Other" => "Ander",
+"Personal" => "Persoonlijk",
+"Projects" => "Projecten",
+"Questions" => "Vragen",
+"Work" => "Werk",
"Does not repeat" => "Wordt niet herhaald",
"Daily" => "Dagelijks",
"Weekly" => "Wekelijks",
@@ -10,21 +26,24 @@
"Bi-Weekly" => "Tweewekelijks",
"Monthly" => "Maandelijks",
"Yearly" => "Jaarlijks",
-"All day" => "Tweewekelijks",
-"Sunday" => "Zondag",
+"never" => "nooit meer",
+"by occurrences" => "volgens gebeurtenissen",
+"by date" => "op datum",
+"by monthday" => "per dag van de maand",
+"by weekday" => "op weekdag",
"Monday" => "Maandag",
"Tuesday" => "Dinsdag",
"Wednesday" => "Woensdag",
"Thursday" => "Donderdag",
"Friday" => "Vrijdag",
"Saturday" => "Zaterdag",
-"Sun." => "Zo",
-"Mon." => "Ma",
-"Tue." => "Di",
-"Wed." => "Wo",
-"Thu." => "Do",
-"Fri." => "Vr",
-"Sat." => "Za",
+"Sunday" => "Zondag",
+"first" => "eerste",
+"second" => "tweede",
+"third" => "derde",
+"fourth" => "vierde",
+"fifth" => "vijfde",
+"last" => "laatste",
"January" => "Januari",
"February" => "Februari",
"March" => "Maart",
@@ -37,47 +56,88 @@
"October" => "Oktober",
"November" => "November",
"December" => "December",
-"Jan." => "Jan",
-"Feb." => "Feb",
-"Mar." => "Maa",
-"Apr." => "Apr",
-"Jun." => "Jun",
-"Jul." => "Jul",
-"Aug." => "Aug",
-"Sep." => "Sept",
-"Oct." => "Okt",
-"Nov." => "Nov",
-"Dec." => "Dec",
+"by events date" => "volgens evenementsdatum",
+"by yearday(s)" => "volgens jaardag(en)",
+"by weeknumber(s)" => "volgens weeknummer(s)",
+"by day and month" => "per dag en maand",
+"Not an array" => "Geen array",
+"Date" => "Datum",
+"All day" => "Hele dag",
+"Missing fields" => "missende velden",
+"Title" => "Titel",
+"From Date" => "Begindatum",
+"From Time" => "Begintijd",
+"To Date" => "Einddatum",
+"To Time" => "Eindtijd",
+"The event ends before it starts" => "Het evenement eindigt voordat het begint",
+"There was a database fail" => "Er was een databasefout",
"Week" => "Week",
-"Weeks" => "Weken",
-"Day" => "Dag",
"Month" => "Maand",
+"List" => "Lijst",
"Today" => "Vandaag",
"Calendars" => "Kalenders",
-"Time" => "Tijd",
"There was a fail, while parsing the file." => "Er is een fout opgetreden bij het verwerken van het bestand.",
+"Sun." => "Zo.",
+"Mon." => "Ma.",
+"Tue." => "Di.",
+"Wed." => "Woe.",
+"Thu." => "Do.",
+"Fri." => "Vrij.",
+"Sat." => "Zat.",
+"Jan." => "Jan.",
+"Feb." => "Feb.",
+"Mar." => "Maart",
+"Apr." => "April",
+"May." => "Mei",
+"Jun." => "Jun.",
+"Jul." => "Jul.",
+"Aug." => "Aug.",
+"Sep." => "Sept.",
+"Oct." => "Okt.",
+"Nov." => "Nov.",
+"Dec." => "Dec.",
"Choose active calendars" => "Kies actieve kalenders",
+"New Calendar" => "Nieuwe Kalender",
+"CalDav Link" => "CalDav Link",
"Download" => "Download",
"Edit" => "Bewerken",
+"Delete" => "Verwijderen",
+"New calendar" => "Nieuwe kalender",
"Edit calendar" => "Bewerk kalender",
"Displayname" => "Weergavenaam",
"Active" => "Actief",
-"Description" => "Beschrijving",
"Calendar color" => "Kalender kleur",
+"Save" => "Opslaan",
"Submit" => "Opslaan",
-"Edit an event" => "Bewerken een evenement",
-"Title" => "Titel",
-"Title of the Event" => "Titel van het evenement",
-"Location" => "Locatie",
-"Location of the Event" => "Locatie van het evenement",
+"Cancel" => "Annuleren",
+"Edit an event" => "Bewerken van een afspraak",
+"Export" => "Exporteren",
+"Title of the Event" => "Titel van de afspraak",
"Category" => "Categorie",
+"Select category" => "Kies een categorie",
"All Day Event" => "Hele dag",
"From" => "Van",
"To" => "Aan",
+"Advanced options" => "Geavanceerde opties",
"Repeat" => "Herhalen",
-"Attendees" => "Deelnemers",
+"Advanced" => "Geavanceerd",
+"Select weekdays" => "Selecteer weekdagen",
+"Select days" => "Selecteer dagen",
+"Select months" => "Selecteer maanden",
+"Select weeks" => "Selecteer weken",
+"End" => "Einde",
+"occurrences" => "gebeurtenissen",
+"Location" => "Locatie",
+"Location of the Event" => "Locatie van de afspraak",
+"Description" => "Beschrijving",
"Description of the Event" => "Beschrijving van het evenement",
-"Close" => "Sluiten",
-"Create a new event" => "Maak een nieuw evenement",
-"Timezone" => "Tijdzone"
+"Please choose the calendar" => "Kies de kalender",
+"Import" => "Importeer",
+"Create a new event" => "Maak een nieuwe afspraak",
+"Timezone" => "Tijdzone",
+"Check always for changes of the timezone" => "Controleer altijd op aanpassingen van de tijdszone",
+"Timeformat" => "Tijdformaat",
+"24h" => "24uur",
+"12h" => "12uur",
+"Calendar CalDAV syncing address:" => "CalDAV kalender synchronisatie adres:"
);
diff --git a/apps/calendar/l10n/nn_NO.php b/apps/calendar/l10n/nn_NO.php
new file mode 100644
index 00000000000..be1c7a02940
--- /dev/null
+++ b/apps/calendar/l10n/nn_NO.php
@@ -0,0 +1,65 @@
+ "Endra tidssone",
+"Invalid request" => "Ugyldig førespurnad",
+"Calendar" => "Kalender",
+"Wrong calendar" => "Feil kalender",
+"Birthday" => "Bursdag",
+"Business" => "Forretning",
+"Call" => "Telefonsamtale",
+"Clients" => "Klientar",
+"Deliverer" => "Forsending",
+"Holidays" => "Høgtid",
+"Ideas" => "Idear",
+"Journey" => "Reise",
+"Jubilee" => "Jubileum",
+"Meeting" => "Møte",
+"Other" => "Anna",
+"Personal" => "Personleg",
+"Projects" => "Prosjekt",
+"Questions" => "Spørsmål",
+"Work" => "Arbeid",
+"Does not repeat" => "Ikkje gjenta",
+"Daily" => "Kvar dag",
+"Weekly" => "Kvar veke",
+"Every Weekday" => "Kvar vekedag",
+"Bi-Weekly" => "Annakvar veke",
+"Monthly" => "Kvar månad",
+"Yearly" => "Kvart år",
+"Not an array" => "Ikkje ein matrise",
+"All day" => "Heile dagen",
+"Title" => "Tittel",
+"Week" => "Veke",
+"Month" => "Månad",
+"List" => "Liste",
+"Today" => "I dag",
+"Calendars" => "Kalendarar",
+"There was a fail, while parsing the file." => "Feil ved tolking av fila.",
+"Choose active calendars" => "Vel aktive kalendarar",
+"New Calendar" => "Ny kalender",
+"CalDav Link" => "CalDav-lenkje",
+"Download" => "Last ned",
+"Edit" => "Endra",
+"Delete" => "Slett",
+"New calendar" => "Ny kalender",
+"Edit calendar" => "Endra kalendarar",
+"Displayname" => "Visingsnamn",
+"Active" => "Aktiv",
+"Calendar color" => "Kalenderfarge",
+"Save" => "Lagra",
+"Submit" => "Lagra",
+"Cancel" => "Avbryt",
+"Edit an event" => "Endra ein hending",
+"Title of the Event" => "Tittel på hendinga",
+"Category" => "Kategori",
+"Select category" => "Vel kategori",
+"All Day Event" => "Heildagshending",
+"From" => "Frå",
+"To" => "Til",
+"Repeat" => "Gjenta",
+"Location" => "Stad",
+"Location of the Event" => "Stad for hendinga",
+"Description" => "Skildring",
+"Description of the Event" => "Skildring av hendinga",
+"Create a new event" => "Opprett ei ny hending",
+"Timezone" => "Tidssone"
+);
diff --git a/apps/calendar/l10n/pl.php b/apps/calendar/l10n/pl.php
index 2201cc397ab..a654c878d3c 100644
--- a/apps/calendar/l10n/pl.php
+++ b/apps/calendar/l10n/pl.php
@@ -1,9 +1,9 @@
"Błąd uwierzytelniania",
-"Wrong calendar" => "Zły kalendarz",
+"New Timezone:" => "Nowa strefa czasowa:",
"Timezone changed" => "Strefa czasowa została zmieniona",
"Invalid request" => "Nieprawidłowe żądanie",
"Calendar" => "Kalendarz",
+"Wrong calendar" => "Zły kalendarz",
"Birthday" => "Urodziny",
"Business" => "Interes",
"Call" => "Rozmowa",
@@ -26,22 +26,24 @@
"Bi-Weekly" => "Dwa razy w tygodniu",
"Monthly" => "Miesięcznie",
"Yearly" => "Rocznie",
-"Not an array" => "Nie ma w tablicy",
-"All day" => "Cały dzień",
-"Sunday" => "Niedziela",
+"never" => "nigdy",
+"by occurrences" => "przez wydarzenia",
+"by date" => "po dacie",
+"by monthday" => "miesięcznie",
+"by weekday" => "tygodniowo",
"Monday" => "Poniedziałek",
"Tuesday" => "Wtorek",
"Wednesday" => "Środa",
"Thursday" => "Czwartek",
"Friday" => "Piątek",
"Saturday" => "Sobota",
-"Sun." => "Nie.",
-"Mon." => "Po.",
-"Tue." => "Wt.",
-"Wed." => "Śr.",
-"Thu." => "Cz..",
-"Fri." => "Pią.",
-"Sat." => "So.",
+"Sunday" => "Niedziela",
+"first" => "pierwszy",
+"second" => "drugi",
+"third" => "trzeci",
+"fourth" => "czwarty",
+"fifth" => "piąty",
+"last" => "ostatni",
"January" => "Styczeń",
"February" => "Luty",
"March" => "Marzec",
@@ -54,11 +56,39 @@
"October" => "Październik",
"November" => "Listopad",
"December" => "Grudzień",
+"by events date" => "po datach wydarzeń",
+"by yearday(s)" => "po dniach roku",
+"by weeknumber(s)" => "po tygodniach",
+"Not an array" => "Nie ma w tablicy",
+"Date" => "Data",
+"Cal." => "Kal.",
+"All day" => "Cały dzień",
+"Missing fields" => "Brakujące pola",
+"Title" => "Tytuł",
+"From Date" => "Od dnia",
+"From Time" => "Od czasu",
+"To Date" => "Do daty",
+"To Time" => "Do czasu",
+"The event ends before it starts" => "Wydarzenie kończy się przed rozpoczęciem",
+"There was a database fail" => "Awaria bazy danych",
+"Week" => "Tydzień",
+"Month" => "Miesiąc",
+"List" => "Lista",
+"Today" => "Dzisiaj",
+"Calendars" => "Kalendarze",
+"There was a fail, while parsing the file." => "Nastąpił problem przy parsowaniu pliku..",
+"Sun." => "Nie.",
+"Mon." => "Poń.",
+"Tue." => "Wto.",
+"Wed." => "Śro.",
+"Thu." => "Czw.",
+"Fri." => "Pią.",
+"Sat." => "So.",
"Jan." => "Sty.",
"Feb." => "Lut.",
"Mar." => "Mar.",
"Apr." => "Kwi.",
-"May." => "Może.",
+"May." => "Maj",
"Jun." => "Cze.",
"Jul." => "Lip.",
"Aug." => "Sie.",
@@ -66,45 +96,52 @@
"Oct." => "Paź.",
"Nov." => "Lis.",
"Dec." => "Gru.",
-"Week" => "Tydzień",
-"Weeks" => "Tygodnie",
-"More before {startdate}" => "Więcej przed {startdate}",
-"More after {enddate}" => "Więcej po {enddate}",
-"Day" => "Dzień",
-"Month" => "Miesiąc",
-"List" => "Lista",
-"Today" => "Dzisiaj",
-"Calendars" => "Kalendarze",
-"Time" => "Czas",
-"There was a fail, while parsing the file." => "Nastąpił problem przy parsowaniu pliku..",
"Choose active calendars" => "Wybierz aktywne kalendarze",
"New Calendar" => "Nowy kalendarz",
"CalDav Link" => "Link do CalDAV",
"Download" => "Pobierz",
"Edit" => "Edytuj",
+"Delete" => "Usuń",
"New calendar" => "Nowy kalendarz",
"Edit calendar" => "Edycja kalendarza",
"Displayname" => "Displayname",
"Active" => "Aktywny",
-"Description" => "Opis",
"Calendar color" => "Kalendarz kolor",
"Save" => "Zapisz",
"Submit" => "Prześlij",
"Cancel" => "Anuluj",
"Edit an event" => "Edycja zdarzenia",
-"Title" => "Tytuł",
+"Export" => "Wyeksportuj",
"Title of the Event" => "Tytuł zdarzenia",
-"Location" => "Lokalizacja",
-"Location of the Event" => "Lokalizacja zdarzenia",
"Category" => "Kategoria",
"Select category" => "Wybierz kategorię",
"All Day Event" => "Całodniowe wydarzenie",
"From" => "Z",
"To" => "Do",
+"Advanced options" => "Opcje zaawansowane",
"Repeat" => "Powtórz",
-"Attendees" => "Uczestnicy",
+"Advanced" => "Zaawansowane",
+"Select weekdays" => "Wybierz dni powszechne",
+"Select days" => "Wybierz dni",
+"and the events day of year." => "oraz wydarzenia roku",
+"and the events day of month." => "oraz wydarzenia miesiąca",
+"Select months" => "Wybierz miesiące",
+"Select weeks" => "Wybierz tygodnie",
+"and the events week of year." => "oraz wydarzenia roku.",
+"Interval" => "Przedział",
+"End" => "Koniec",
+"occurrences" => "wystąpienia",
+"Location" => "Lokalizacja",
+"Location of the Event" => "Lokalizacja zdarzenia",
+"Description" => "Opis",
"Description of the Event" => "Opis zdarzenia",
-"Close" => "Zamknij",
+"Please choose the calendar" => "Proszę wybrać kalendarz",
+"Import" => "Import",
"Create a new event" => "Stwórz nowe wydarzenie",
-"Timezone" => "Strefa czasowa"
+"Timezone" => "Strefa czasowa",
+"Check always for changes of the timezone" => "Zawsze sprawdzaj zmiany strefy czasowej",
+"Timeformat" => "Format czasu",
+"24h" => "24h",
+"12h" => "12h",
+"Calendar CalDAV syncing address:" => "Adres synchronizacji kalendarza CalDAV:"
);
diff --git a/apps/calendar/l10n/pt_BR.php b/apps/calendar/l10n/pt_BR.php
index 91db5210438..324a85aa136 100644
--- a/apps/calendar/l10n/pt_BR.php
+++ b/apps/calendar/l10n/pt_BR.php
@@ -1,8 +1,23 @@
"Erro de autenticação",
"Timezone changed" => "Fuso horário alterado",
"Invalid request" => "Pedido inválido",
"Calendar" => "Calendário",
+"Wrong calendar" => "Calendário incorreto",
+"Birthday" => "Aniversário",
+"Business" => "Negócio",
+"Call" => "Chamada",
+"Clients" => "Clientes",
+"Deliverer" => "Entrega",
+"Holidays" => "Feriados",
+"Ideas" => "Idéias",
+"Journey" => "Jornada",
+"Jubilee" => "Jubileu",
+"Meeting" => "Reunião",
+"Other" => "Outros",
+"Personal" => "Pessoal",
+"Projects" => "Projetos",
+"Questions" => "Perguntas",
+"Work" => "Trabalho",
"Does not repeat" => "Não repetir",
"Daily" => "Diariamente",
"Weekly" => "Semanal",
@@ -10,74 +25,56 @@
"Bi-Weekly" => "De duas em duas semanas",
"Monthly" => "Mensal",
"Yearly" => "Anual",
+"Not an array" => "Não é um array",
"All day" => "Todo o dia",
-"Sunday" => "Domingo",
-"Monday" => "Segunda-feira",
-"Tuesday" => "Terça-feira",
-"Wednesday" => "Quarta-feira",
-"Thursday" => "Quinta-feira",
-"Friday" => "Sexta-feira",
-"Saturday" => "Sábado",
-"Sun." => "Dom.",
-"Mon." => "Seg.",
-"Tue." => "Ter.",
-"Wed." => "Qua.",
-"Thu." => "Qui.",
-"Fri." => "Sex.",
-"Sat." => "Sáb.",
-"January" => "Janeiro",
-"February" => "Fevereiro",
-"March" => "Março",
-"April" => "Abril",
-"May" => "Maio",
-"June" => "Junho",
-"July" => "Julho",
-"August" => "Agosto",
-"September" => "Setembro",
-"October" => "Outubro",
-"November" => "Novembro",
-"December" => "Dezembro",
-"Jan." => "Jan.",
-"Feb." => "Fev.",
-"Mar." => "Mar.",
-"Apr." => "Abr.",
-"Jun." => "Jun.",
-"Jul." => "Jul.",
-"Aug." => "Ago.",
-"Sep." => "Set.",
-"Oct." => "Out.",
-"Nov." => "Nov.",
-"Dec." => "Dez.",
+"Missing fields" => "Campos incompletos",
+"Title" => "Título",
+"From Date" => "Desde a Data",
+"From Time" => "Desde a Hora",
+"To Date" => "Até a Data",
+"To Time" => "Até a Hora",
+"The event ends before it starts" => "O evento termina antes de começar",
+"There was a database fail" => "Houve uma falha de banco de dados",
"Week" => "Semana",
-"Weeks" => "Semanas",
-"Day" => "Dia",
"Month" => "Mês",
+"List" => "Lista",
"Today" => "Hoje",
"Calendars" => "Calendários",
-"Time" => "Tempo",
"There was a fail, while parsing the file." => "Houve uma falha, ao analisar o arquivo.",
"Choose active calendars" => "Escolha calendários ativos",
+"New Calendar" => "Novo Calendário",
+"CalDav Link" => "Link para CalDav",
"Download" => "Baixar",
"Edit" => "Editar",
+"Delete" => "Excluir",
+"New calendar" => "Novo calendário",
"Edit calendar" => "Editar calendário",
"Displayname" => "Mostrar Nome",
"Active" => "Ativo",
-"Description" => "Descrição",
"Calendar color" => "Cor do Calendário",
+"Save" => "Salvar",
"Submit" => "Submeter",
+"Cancel" => "Cancelar",
"Edit an event" => "Editar um evento",
-"Title" => "Título",
+"Export" => "Exportar",
"Title of the Event" => "Título do evento",
-"Location" => "Local",
-"Location of the Event" => "Local do evento",
"Category" => "Categoria",
+"Select category" => "Selecionar categoria",
"All Day Event" => "Evento de dia inteiro",
"From" => "De",
"To" => "Para",
+"Advanced options" => "Opções avançadas",
"Repeat" => "Repetir",
-"Attendees" => "Participantes",
+"Location" => "Local",
+"Location of the Event" => "Local do evento",
+"Description" => "Descrição",
"Description of the Event" => "Descrição do Evento",
-"Close" => "Fechar",
+"Please choose the calendar" => "Por favor, escolha o calendário",
+"Import" => "Importar",
"Create a new event" => "Criar um novo evento",
-"Timezone" => "Fuso horário"
+"Timezone" => "Fuso horário",
+"Timeformat" => "Formato da Hora",
+"24h" => "24h",
+"12h" => "12h",
+"Calendar CalDAV syncing address:" => "Sincronização de endereço do calendário CalDAV :"
);
diff --git a/apps/calendar/l10n/pt_PT.php b/apps/calendar/l10n/pt_PT.php
new file mode 100644
index 00000000000..fd6ba7b9a60
--- /dev/null
+++ b/apps/calendar/l10n/pt_PT.php
@@ -0,0 +1,8 @@
+ "Calendário",
+"All day" => "Todo o dia",
+"Week" => "Semana",
+"Month" => "Mês",
+"Today" => "Hoje",
+"Calendars" => "Calendários"
+);
diff --git a/apps/calendar/l10n/ro.php b/apps/calendar/l10n/ro.php
index 75e8a715ea0..026c251e53c 100644
--- a/apps/calendar/l10n/ro.php
+++ b/apps/calendar/l10n/ro.php
@@ -1,8 +1,24 @@
"Eroare de autentificare",
+"New Timezone:" => "Fus orar nou:",
"Timezone changed" => "A fost schimbat fusul orar",
"Invalid request" => "Cerere eronată",
"Calendar" => "Calendar",
+"Wrong calendar" => "Calendar greșit",
+"Birthday" => "Zi de naștere",
+"Business" => "Afaceri",
+"Call" => "Sună",
+"Clients" => "Clienți",
+"Deliverer" => "Curier",
+"Holidays" => "Sărbători",
+"Ideas" => "Idei",
+"Journey" => "Călătorie",
+"Jubilee" => "Aniversare",
+"Meeting" => "Întâlnire",
+"Other" => "Altele",
+"Personal" => "Personal",
+"Projects" => "Proiecte",
+"Questions" => "Întrebări",
+"Work" => "Servici",
"Does not repeat" => "Nu se repetă",
"Daily" => "Zilnic",
"Weekly" => "Săptămânal",
@@ -10,21 +26,25 @@
"Bi-Weekly" => "Din două în două săptămâni",
"Monthly" => "Lunar",
"Yearly" => "Anual",
-"All day" => "Toată ziua",
-"Sunday" => "Duminică",
+"never" => "niciodată",
+"by occurrences" => "după repetiție",
+"by date" => "după dată",
+"by monthday" => "după ziua lunii",
+"by weekday" => "după ziua săptămânii",
"Monday" => "Luni",
"Tuesday" => "Marți",
"Wednesday" => "Miercuri",
"Thursday" => "Joi",
"Friday" => "Vineri",
"Saturday" => "Sâmbătă",
-"Sun." => "Dum.",
-"Mon." => "Lun.",
-"Tue." => "Mar.",
-"Wed." => "Mie.",
-"Thu." => "Joi.",
-"Fri." => "Vin.",
-"Sat." => "Sâm.",
+"Sunday" => "Duminică",
+"events week of month" => "evenimentele săptămânii din luna.",
+"first" => "primul",
+"second" => "al doilea",
+"third" => "al treilea",
+"fourth" => "al patrulea",
+"fifth" => "al cincilea",
+"last" => "ultimul",
"January" => "Ianuarie",
"February" => "Februarie",
"March" => "Martie",
@@ -37,47 +57,99 @@
"October" => "Octombrie",
"November" => "Noiembrie",
"December" => "Decembrie",
+"by events date" => "după data evenimentului",
+"by yearday(s)" => "după ziua(zilele) anului",
+"by weeknumber(s)" => "după numărul săptămânii",
+"by day and month" => "după zi și lună",
+"Not an array" => "Not an array",
+"Date" => "Data",
+"Cal." => "Cal.",
+"All day" => "Toată ziua",
+"New Calendar" => "Calendar nou",
+"Missing fields" => "Câmpuri lipsă",
+"Title" => "Titlu",
+"From Date" => "Începând cu",
+"From Time" => "De la",
+"To Date" => "Până pe",
+"To Time" => "La",
+"The event ends before it starts" => "Evenimentul se termină înainte să înceapă",
+"There was a database fail" => "A avut loc o eroare a bazei de date",
+"Week" => "Săptămâna",
+"Month" => "Luna",
+"List" => "Listă",
+"Today" => "Astăzi",
+"Calendars" => "Calendare",
+"There was a fail, while parsing the file." => "A fost întâmpinată o eroare în procesarea fișierului",
+"Sun." => "D",
+"Mon." => "L",
+"Tue." => "M",
+"Wed." => "M",
+"Thu." => "J",
+"Fri." => "V",
+"Sat." => "S",
"Jan." => "Ian.",
"Feb." => "Feb.",
"Mar." => "Mar.",
"Apr." => "Apr.",
+"May." => "Mai.",
"Jun." => "Iun.",
"Jul." => "Iul.",
"Aug." => "Aug.",
-"Sep." => "Sep.",
+"Sep." => "Sept.",
"Oct." => "Oct.",
"Nov." => "Nov.",
"Dec." => "Dec.",
-"Week" => "Săptămâna",
-"Weeks" => "Săptămâni",
-"Day" => "Zi",
-"Month" => "Luna",
-"Today" => "Astăzi",
-"Calendars" => "Calendare",
-"Time" => "Ora",
-"There was a fail, while parsing the file." => "A fost întâmpinată o eroare în procesarea fișierului",
"Choose active calendars" => "Alege activitățile din calendar",
+"CalDav Link" => "Link CalDav",
"Download" => "Descarcă",
"Edit" => "Modifică",
+"Delete" => "Șterge",
+"New calendar" => "Calendar nou",
"Edit calendar" => "Modifcă acest calendar",
"Displayname" => "Nume",
"Active" => "Activ",
-"Description" => "Descriere",
"Calendar color" => "Culoare calendar",
+"Save" => "Salveză",
"Submit" => "Trimite",
+"Cancel" => "Anulează",
"Edit an event" => "Modifică un eveniment",
-"Title" => "Titlu",
+"Export" => "Exportă",
"Title of the Event" => "Numele evenimentului",
-"Location" => "Localizare",
-"Location of the Event" => "Localizarea evenimentului",
"Category" => "Categorie",
+"Select category" => "Alege categoria",
"All Day Event" => "Toată ziua",
"From" => "De la",
"To" => "Către",
+"Advanced options" => "Opțiuni avansate",
"Repeat" => "Repetă",
-"Attendees" => "Participanți",
+"Advanced" => "Avansat",
+"Select weekdays" => "Selectează zilele săptămânii",
+"Select days" => "Selectează zilele",
+"and the events day of year." => "și evenimentele zilei.",
+"and the events day of month." => "și evenimentele zilei din lună.",
+"Select months" => "Selectează lunile",
+"Select weeks" => "Selectează săptămânile",
+"and the events week of year." => "și evenimentele săptămânii.",
+"Interval" => "Interval",
+"End" => "Sfârșit",
+"occurrences" => "repetiții",
+"Location" => "Localizare",
+"Location of the Event" => "Localizarea evenimentului",
+"Description" => "Descriere",
"Description of the Event" => "Descrierea evenimentului",
-"Close" => "Închide",
+"Import a calendar file" => "Importă un calendar",
+"Please choose the calendar" => "Alegeți calendarul",
+"create a new calendar" => "crează un calendar nou",
+"Name of new calendar" => "Numele noului calendar",
+"Import" => "Importă",
+"Importing calendar" => "Importă calendar",
+"Calendar imported successfully" => "Calendarul a fost importat cu succes",
+"Close Dialog" => "Închide",
"Create a new event" => "Crează un evenimetn nou",
-"Timezone" => "Fus orar"
+"Timezone" => "Fus orar",
+"Check always for changes of the timezone" => "Verifică mereu pentru schimbări ale fusului orar",
+"Timeformat" => "Format de timp",
+"24h" => "24h",
+"12h" => "12h",
+"Calendar CalDAV syncing address:" => "Adresa pentru sincronizarea calendarului CalDAV"
);
diff --git a/apps/calendar/l10n/ru.php b/apps/calendar/l10n/ru.php
index 170344dca8e..675fcecf18c 100644
--- a/apps/calendar/l10n/ru.php
+++ b/apps/calendar/l10n/ru.php
@@ -1,9 +1,9 @@
"Ошибка аутентификации",
-"Wrong calendar" => "Неверный календарь",
+"New Timezone:" => "Новый часовой пояс:",
"Timezone changed" => "Часовой пояс изменён",
"Invalid request" => "Неверный запрос",
"Calendar" => "Календарь",
+"Wrong calendar" => "Неверный календарь",
"Birthday" => "День рождения",
"Business" => "Бизнес",
"Call" => "Звонить",
@@ -26,22 +26,25 @@
"Bi-Weekly" => "Каждые две недели",
"Monthly" => "Каждый месяц",
"Yearly" => "Каждый год",
-"Not an array" => "Не массив",
-"All day" => "Весь день",
-"Sunday" => "Воскресенье",
+"never" => "никогда",
+"by occurrences" => "по числу повторений",
+"by date" => "по дате",
+"by monthday" => "по дню месяца",
+"by weekday" => "по дню недели",
"Monday" => "Понедельник",
"Tuesday" => "Вторник",
"Wednesday" => "Среда",
"Thursday" => "Четверг",
"Friday" => "Пятница",
"Saturday" => "Суббота",
-"Sun." => "Вс.",
-"Mon." => "Пн.",
-"Tue." => "Вт.",
-"Wed." => "Ср.",
-"Thu." => "Чт.",
-"Fri." => "Пт.",
-"Sat." => "Сб.",
+"Sunday" => "Воскресенье",
+"events week of month" => "неделя месяца",
+"first" => "первая",
+"second" => "вторая",
+"third" => "третья",
+"fourth" => "червётрая",
+"fifth" => "пятая",
+"last" => "последняя",
"January" => "Январь",
"February" => "Февраль",
"March" => "Март",
@@ -54,10 +57,40 @@
"October" => "Октябрь",
"November" => "Ноябрь",
"December" => "Декабрь",
+"by events date" => "по дате событий",
+"by yearday(s)" => "по дням недели",
+"by weeknumber(s)" => "по номерам недели",
+"by day and month" => "по дню и месяцу",
+"Not an array" => "Не массив",
+"Date" => "Дата",
+"Cal." => "Кал.",
+"All day" => "Весь день",
+"New Calendar" => "Новый Календарь",
+"Missing fields" => "Незаполненные поля",
+"Title" => "Название",
+"From Date" => "Дата начала",
+"From Time" => "Время начала",
+"To Date" => "Дата окончания",
+"To Time" => "Время окончания",
+"The event ends before it starts" => "Окончание события раньше, чем его начало",
+"There was a database fail" => "Ошибка базы данных",
+"Week" => "Неделя",
+"Month" => "Месяц",
+"List" => "Список",
+"Today" => "Сегодня",
+"Calendars" => "Календари",
+"There was a fail, while parsing the file." => "Не удалось обработать файл.",
+"Sun." => "Вс.",
+"Mon." => "Пн.",
+"Tue." => "Вт.",
+"Wed." => "Ср.",
+"Thu." => "Чт.",
+"Fri." => "Пт.",
+"Sat." => "Сб.",
"Jan." => "Янв.",
"Feb." => "Фев.",
"Mar." => "Мар.",
-"Apr." => "Апр.",
+"Apr." => "Сен.",
"May." => "Май.",
"Jun." => "Июн.",
"Jul." => "Июл.",
@@ -66,45 +99,57 @@
"Oct." => "Окт.",
"Nov." => "Ноя.",
"Dec." => "Дек.",
-"Week" => "Неделя",
-"Weeks" => "Недели",
-"More before {startdate}" => "Еще до {startdate}",
-"More after {enddate}" => "Больше после {startdate}",
-"Day" => "День",
-"Month" => "Месяц",
-"List" => "Список",
-"Today" => "Сегодня",
-"Calendars" => "Календари",
-"Time" => "Время",
-"There was a fail, while parsing the file." => "Не удалось обработать файл.",
"Choose active calendars" => "Выберите активные календари",
-"New Calendar" => "Новый Календарь",
"CalDav Link" => "Ссылка для CalDav",
"Download" => "Скачать",
"Edit" => "Редактировать",
+"Delete" => "Удалить",
"New calendar" => "Новый календарь",
"Edit calendar" => "Редактировать календарь",
"Displayname" => "Отображаемое имя",
"Active" => "Активен",
-"Description" => "Описание",
"Calendar color" => "Цвет календаря",
"Save" => "Сохранить",
"Submit" => "Отправить",
"Cancel" => "Отмена",
"Edit an event" => "Редактировать событие",
-"Title" => "Название",
+"Export" => "Экспортировать",
"Title of the Event" => "Название событие",
-"Location" => "Место",
-"Location of the Event" => "Место события",
"Category" => "Категория",
"Select category" => "Выбрать категорию",
"All Day Event" => "Событие на весь день",
"From" => "От",
"To" => "До",
+"Advanced options" => "Дополнительные параметры",
"Repeat" => "Повтор",
-"Attendees" => "Присутствующие",
+"Advanced" => "Дополнительно",
+"Select weekdays" => "Выбрать дни недели",
+"Select days" => "Выбрать дни",
+"and the events day of year." => "и день года события",
+"and the events day of month." => "и день месяца события",
+"Select months" => "Выбрать месяцы",
+"Select weeks" => "Выбрать недели",
+"and the events week of year." => "и номер недели события",
+"Interval" => "Интервал",
+"End" => "Окончание",
+"occurrences" => "повторений",
+"Location" => "Место",
+"Location of the Event" => "Место события",
+"Description" => "Описание",
"Description of the Event" => "Описание события",
-"Close" => "Закрыть",
+"Import a calendar file" => "Импортировать календарь из файла",
+"Please choose the calendar" => "Пожалуйста, выберите календарь",
+"create a new calendar" => "Создать новый календарь",
+"Name of new calendar" => "Название нового календаря",
+"Import" => "Импортировать",
+"Importing calendar" => "Импортируется календарь",
+"Calendar imported successfully" => "Календарь успешно импортирован",
+"Close Dialog" => "Закрыть Сообщение",
"Create a new event" => "Создать новое событие",
-"Timezone" => "Часовой пояс"
+"Timezone" => "Часовой пояс",
+"Check always for changes of the timezone" => "Всегда проверяйте изменение часового пояса",
+"Timeformat" => "Формат времени",
+"24h" => "24ч",
+"12h" => "12ч",
+"Calendar CalDAV syncing address:" => "Адрес синхронизации календаря CalDAV:"
);
diff --git a/apps/calendar/l10n/sk_SK.php b/apps/calendar/l10n/sk_SK.php
new file mode 100644
index 00000000000..6023a7af139
--- /dev/null
+++ b/apps/calendar/l10n/sk_SK.php
@@ -0,0 +1,144 @@
+ "Nová časová zóna:",
+"Timezone changed" => "Časové pásmo zmenené",
+"Invalid request" => "Neplatná požiadavka",
+"Calendar" => "Kalendár",
+"Wrong calendar" => "Zlý kalendár",
+"Birthday" => "Narodeniny",
+"Business" => "Podnikanie",
+"Call" => "Hovor",
+"Clients" => "Klienti",
+"Deliverer" => "Doručovateľ",
+"Holidays" => "Prázdniny",
+"Ideas" => "Nápady",
+"Journey" => "Cesta",
+"Jubilee" => "Jubileá",
+"Meeting" => "Stretnutia",
+"Other" => "Ostatné",
+"Personal" => "Osobné",
+"Projects" => "Projekty",
+"Questions" => "Otázky",
+"Work" => "Práca",
+"Does not repeat" => "Neopakovať",
+"Daily" => "Denne",
+"Weekly" => "Týždenne",
+"Every Weekday" => "Každý výkend",
+"Bi-Weekly" => "Každý druhý týždeň",
+"Monthly" => "Mesačne",
+"Yearly" => "Ročne",
+"never" => "nikdy",
+"by occurrences" => "podľa výskytu",
+"by date" => "podľa dátumu",
+"Monday" => "Pondelok",
+"Tuesday" => "Utorok",
+"Wednesday" => "Streda",
+"Thursday" => "Štvrtok",
+"Friday" => "Piatok",
+"Saturday" => "Sobota",
+"Sunday" => "Nedeľa",
+"first" => "prvý",
+"second" => "druhý",
+"third" => "tretí",
+"fourth" => "štvrtý",
+"fifth" => "piaty",
+"last" => "posledný",
+"January" => "Január",
+"February" => "Február",
+"March" => "Marec",
+"April" => "Apríl",
+"May" => "Máj",
+"June" => "Jún",
+"July" => "Júl",
+"August" => "August",
+"September" => "September",
+"October" => "Október",
+"November" => "November",
+"December" => "December",
+"by events date" => "podľa dátumu udalosti",
+"by day and month" => "podľa dňa a mesiaca",
+"Not an array" => "Nie je pole",
+"Date" => "Dátum",
+"All day" => "Celý deň",
+"New Calendar" => "Nový kalendár",
+"Missing fields" => "Nevyplnené položky",
+"Title" => "Nadpis",
+"From Date" => "Od Dátumu",
+"From Time" => "Od Času",
+"To Date" => "Do Dátumu",
+"To Time" => "Do Času",
+"The event ends before it starts" => "Udalosť končí ešte pred tým než začne",
+"There was a database fail" => "Nastala chyba databázy",
+"Week" => "Týždeň",
+"Month" => "Mesiac",
+"List" => "Zoznam",
+"Today" => "Dnes",
+"Calendars" => "Kalendáre",
+"There was a fail, while parsing the file." => "Nastala chyba počas parsovania súboru.",
+"Sun." => "Ned.",
+"Mon." => "Pon.",
+"Tue." => "Ut.",
+"Wed." => "Str.",
+"Thu." => "Štv.",
+"Fri." => "Pia.",
+"Sat." => "So.",
+"Jan." => "Jan.",
+"Feb." => "Feb.",
+"Mar." => "Mar.",
+"Apr." => "Apr.",
+"May." => "Máj",
+"Jun." => "Jún",
+"Jul." => "Júl",
+"Aug." => "Aug.",
+"Sep." => "Sep.",
+"Oct." => "Okt.",
+"Nov." => "Nov.",
+"Dec." => "Dec.",
+"Choose active calendars" => "Zvoľte aktívne kalendáre",
+"CalDav Link" => "CalDav odkaz",
+"Download" => "Stiahnuť",
+"Edit" => "Upraviť",
+"Delete" => "Odstrániť",
+"New calendar" => "Nový kalendár",
+"Edit calendar" => "Upraviť kalendár",
+"Displayname" => "Zobrazené meno",
+"Active" => "Aktívne",
+"Calendar color" => "Farba kalendáru",
+"Save" => "Uložiť",
+"Submit" => "Odoslať",
+"Cancel" => "Zrušiť",
+"Edit an event" => "Upraviť udalosť",
+"Export" => "Exportovať",
+"Title of the Event" => "Nadpis Udalosti",
+"Category" => "Kategória",
+"Select category" => "Vybrať kategóriu",
+"All Day Event" => "Celodenná udalosť",
+"From" => "Od",
+"To" => "Do",
+"Advanced options" => "Pokročilé možnosti",
+"Repeat" => "Opakovať",
+"Advanced" => "Pokročilé",
+"Select days" => "Vybrať dni",
+"Select months" => "Vybrať mesiace",
+"Select weeks" => "Vybrať týždne",
+"Interval" => "Interval",
+"End" => "Koniec",
+"occurrences" => "výskyty",
+"Location" => "Poloha",
+"Location of the Event" => "Poloha Udalosti",
+"Description" => "Popis",
+"Description of the Event" => "Popis Udalosti",
+"Import a calendar file" => "Importovať súbor kalendára",
+"Please choose the calendar" => "Prosím zvoľte kalendár",
+"create a new calendar" => "vytvoriť nový kalendár",
+"Name of new calendar" => "Meno nového kalendára",
+"Import" => "Importovať",
+"Importing calendar" => "Importujem kalendár",
+"Calendar imported successfully" => "Kalendár úspešne importovaný",
+"Close Dialog" => "Zatvoriť Dialóg",
+"Create a new event" => "Vytvoriť udalosť",
+"Timezone" => "Časová zóna",
+"Timeformat" => "Formát času",
+"24h" => "24h",
+"12h" => "12h",
+"Calendar CalDAV syncing address:" => "Synchronizačná adresa kalendára CalDAV: "
+);
diff --git a/apps/calendar/l10n/sl.php b/apps/calendar/l10n/sl.php
new file mode 100644
index 00000000000..753a31ac665
--- /dev/null
+++ b/apps/calendar/l10n/sl.php
@@ -0,0 +1,80 @@
+ "Časovna Cona spremenjena",
+"Invalid request" => "Neveljavna zahteva",
+"Calendar" => "Kolendar",
+"Wrong calendar" => "Napačen Kolendar",
+"Birthday" => "Rojstni Dan",
+"Business" => "Poslovno",
+"Call" => "Pokliči",
+"Clients" => "Stranke",
+"Deliverer" => "Dobavitelj",
+"Holidays" => "Dopust",
+"Ideas" => "Ideje",
+"Journey" => "Potovanje",
+"Jubilee" => "Obletnica",
+"Meeting" => "Sestanek",
+"Other" => "Ostalo",
+"Personal" => "Osebno",
+"Projects" => "Projekt",
+"Questions" => "Vprašanja",
+"Work" => "Delo",
+"Does not repeat" => "Se ne ponavlja",
+"Daily" => "Dnevno",
+"Weekly" => "Tedensko",
+"Every Weekday" => "Vsak dan v tednu",
+"Bi-Weekly" => "Dvakrat Tedensko",
+"Monthly" => "Mesečno",
+"Yearly" => "Letno",
+"Not an array" => "Not an array",
+"All day" => "Cel dan",
+"Missing fields" => "Mankajoča polja",
+"Title" => "Naslov",
+"From Date" => "od Datum",
+"From Time" => "od Čas",
+"To Date" => "do Datum",
+"To Time" => "do Čas",
+"The event ends before it starts" => "Dogodek se konča preden se začne",
+"There was a database fail" => "Napaka v podatkovni bazi. Kontaktirajte Administratorja",
+"Week" => "Teden",
+"Month" => "Mesec",
+"List" => "Seznam",
+"Today" => "Danes",
+"Calendars" => "Kolendarji",
+"There was a fail, while parsing the file." => "Pri razčlenjevanju datoteke je prišlo do napake.",
+"Choose active calendars" => "Izberi aktivni Kolendar",
+"New Calendar" => "Nov Kolendar",
+"CalDav Link" => "CalDav Povezava",
+"Download" => "Naloži dol",
+"Edit" => "Uredi",
+"Delete" => "Izbriši",
+"New calendar" => "Nov Kolendar",
+"Edit calendar" => "Uredi Kolendar",
+"Displayname" => "Prikazano Ime",
+"Active" => "Aktivno",
+"Calendar color" => "Barva Kolendarja",
+"Save" => "Shrani",
+"Submit" => "Potrdi",
+"Cancel" => "Prekliči",
+"Edit an event" => "Uredi Dogodek",
+"Export" => "Izvozi",
+"Title of the Event" => "Naslov",
+"Category" => "Kategorija",
+"Select category" => "Izberi Kategorijo",
+"All Day Event" => "Celodnevni Dogodek",
+"From" => "Od",
+"To" => "Za",
+"Advanced options" => "Napredne Možnosti",
+"Repeat" => "Ponovi",
+"Location" => "Lokacija",
+"Location of the Event" => "Lokacija dogodka",
+"Description" => "Opis",
+"Description of the Event" => "Opis Dogodka",
+"Please choose the calendar" => "Izberi kolendar",
+"Import" => "Uvozi",
+"Create a new event" => "Ustvari nov dogodek",
+"Timezone" => "Časovna Cona",
+"Timeformat" => "Časovni format",
+"24h" => "24ur",
+"12h" => "12ur",
+"Calendar CalDAV syncing address:" => "Kolendarjev CalDAV sinhronizacijski naslov"
+);
diff --git a/apps/calendar/l10n/sr.php b/apps/calendar/l10n/sr.php
index 67027204953..f006c9ec8e6 100644
--- a/apps/calendar/l10n/sr.php
+++ b/apps/calendar/l10n/sr.php
@@ -1,8 +1,23 @@
"Грешка аутентификације",
"Timezone changed" => "Временска зона је промењена",
"Invalid request" => "Неисправан захтев",
"Calendar" => "Календар",
+"Wrong calendar" => "Погрешан календар",
+"Birthday" => "Рођендан",
+"Business" => "Посао",
+"Call" => "Позив",
+"Clients" => "Клијенти",
+"Deliverer" => "Достављач",
+"Holidays" => "Празници",
+"Ideas" => "Идеје",
+"Journey" => "путовање",
+"Jubilee" => "јубилеј",
+"Meeting" => "Састанак",
+"Other" => "Друго",
+"Personal" => "Лично",
+"Projects" => "Пројекти",
+"Questions" => "Питања",
+"Work" => "Посао",
"Does not repeat" => "Не понавља се",
"Daily" => "дневно",
"Weekly" => "недељно",
@@ -10,74 +25,41 @@
"Bi-Weekly" => "двонедељно",
"Monthly" => "месечно",
"Yearly" => "годишње",
+"Not an array" => "Није област",
"All day" => "Цео дан",
-"Sunday" => "Недеља",
-"Monday" => "Понедељак",
-"Tuesday" => "Уторак",
-"Wednesday" => "Среда",
-"Thursday" => "Четвртак",
-"Friday" => "Петак",
-"Saturday" => "Субота",
-"Sun." => "Нед",
-"Mon." => "Пон",
-"Tue." => "Уто",
-"Wed." => "Сре",
-"Thu." => "Чет",
-"Fri." => "Пет",
-"Sat." => "Суб",
-"January" => "Јануар",
-"February" => "Фебруар",
-"March" => "Март",
-"April" => "Април",
-"May" => "Мај",
-"June" => "Јун",
-"July" => "Јул",
-"August" => "Август",
-"September" => "Септембар",
-"October" => "Октобар",
-"November" => "Новембар",
-"December" => "Децембар",
-"Jan." => "Јан",
-"Feb." => "Феб",
-"Mar." => "Мар",
-"Apr." => "Апр",
-"Jun." => "Јун",
-"Jul." => "Јул",
-"Aug." => "Авг",
-"Sep." => "Сеп",
-"Oct." => "Окт",
-"Nov." => "Нов",
-"Dec." => "Дец",
+"Title" => "Наслов",
"Week" => "Недеља",
-"Weeks" => "Недеља",
-"Day" => "Дан",
"Month" => "Месец",
+"List" => "Списак",
"Today" => "Данас",
"Calendars" => "Календари",
-"Time" => "Време",
"There was a fail, while parsing the file." => "дошло је до грешке при расчлањивању фајла.",
"Choose active calendars" => "Изаберите активне календаре",
+"New Calendar" => "Нови календар",
+"CalDav Link" => "КалДав веза",
"Download" => "Преузми",
"Edit" => "Уреди",
+"Delete" => "Обриши",
+"New calendar" => "Нови календар",
"Edit calendar" => "Уреди календар",
"Displayname" => "Приказаноиме",
"Active" => "Активан",
-"Description" => "Опис",
"Calendar color" => "Боја календара",
+"Save" => "Сними",
"Submit" => "Пошаљи",
+"Cancel" => "Откажи",
"Edit an event" => "Уреди догађај",
-"Title" => "Наслов",
"Title of the Event" => "Наслов догађаја",
-"Location" => "Локација",
-"Location of the Event" => "Локација догађаја",
"Category" => "Категорија",
+"Select category" => "Изаберите категорију",
"All Day Event" => "Целодневни догађај",
"From" => "Од",
"To" => "До",
"Repeat" => "Понављај",
-"Attendees" => "Присутни",
+"Location" => "Локација",
+"Location of the Event" => "Локација догађаја",
+"Description" => "Опис",
"Description of the Event" => "Опис догађаја",
-"Close" => "Затвори",
"Create a new event" => "Направи нови догађај",
"Timezone" => "Временска зона"
);
diff --git a/apps/calendar/l10n/sr@latin.php b/apps/calendar/l10n/sr@latin.php
index 55df4e21ba8..ea0181919d9 100644
--- a/apps/calendar/l10n/sr@latin.php
+++ b/apps/calendar/l10n/sr@latin.php
@@ -1,8 +1,23 @@
"Greška autentifikacije",
"Timezone changed" => "Vremenska zona je promenjena",
"Invalid request" => "Neispravan zahtev",
"Calendar" => "Kalendar",
+"Wrong calendar" => "Pogrešan kalendar",
+"Birthday" => "Rođendan",
+"Business" => "Posao",
+"Call" => "Poziv",
+"Clients" => "Klijenti",
+"Deliverer" => "Dostavljač",
+"Holidays" => "Praznici",
+"Ideas" => "Ideje",
+"Journey" => "putovanje",
+"Jubilee" => "jubilej",
+"Meeting" => "Sastanak",
+"Other" => "Drugo",
+"Personal" => "Lično",
+"Projects" => "Projekti",
+"Questions" => "Pitanja",
+"Work" => "Posao",
"Does not repeat" => "Ne ponavlja se",
"Daily" => "dnevno",
"Weekly" => "nedeljno",
@@ -10,74 +25,41 @@
"Bi-Weekly" => "dvonedeljno",
"Monthly" => "mesečno",
"Yearly" => "godišnje",
+"Not an array" => "Nije oblast",
"All day" => "Ceo dan",
-"Sunday" => "Nedelja",
-"Monday" => "Ponedeljak",
-"Tuesday" => "Utorak",
-"Wednesday" => "Sreda",
-"Thursday" => "Četvrtak",
-"Friday" => "Petak",
-"Saturday" => "Subota",
-"Sun." => "Ned",
-"Mon." => "Pon",
-"Tue." => "Uto",
-"Wed." => "Sre",
-"Thu." => "Čet",
-"Fri." => "Pet",
-"Sat." => "Sub",
-"January" => "Januar",
-"February" => "Februar",
-"March" => "Mart",
-"April" => "April",
-"May" => "Maj",
-"June" => "Jun",
-"July" => "Jul",
-"August" => "Avgust",
-"September" => "Septembar",
-"October" => "Oktobar",
-"November" => "Novembar",
-"December" => "Decembar",
-"Jan." => "Jan",
-"Feb." => "Feb",
-"Mar." => "Mar",
-"Apr." => "Apr",
-"Jun." => "Jun",
-"Jul." => "Jul",
-"Aug." => "Avg",
-"Sep." => "Sep",
-"Oct." => "Okt",
-"Nov." => "Nov",
-"Dec." => "Dec",
+"Title" => "Naslov",
"Week" => "Nedelja",
-"Weeks" => "Nedelja",
-"Day" => "Dan",
"Month" => "Mesec",
+"List" => "Spisak",
"Today" => "Danas",
"Calendars" => "Kalendari",
-"Time" => "Vreme",
"There was a fail, while parsing the file." => "došlo je do greške pri rasčlanjivanju fajla.",
"Choose active calendars" => "Izaberite aktivne kalendare",
+"New Calendar" => "Novi kalendar",
+"CalDav Link" => "KalDav veza",
"Download" => "Preuzmi",
"Edit" => "Uredi",
+"Delete" => "Obriši",
+"New calendar" => "Novi kalendar",
"Edit calendar" => "Uredi kalendar",
"Displayname" => "Prikazanoime",
"Active" => "Aktivan",
-"Description" => "Opis",
"Calendar color" => "Boja kalendara",
+"Save" => "Snimi",
"Submit" => "Pošalji",
+"Cancel" => "Otkaži",
"Edit an event" => "Uredi događaj",
-"Title" => "Naslov",
"Title of the Event" => "Naslov događaja",
-"Location" => "Lokacija",
-"Location of the Event" => "Lokacija događaja",
"Category" => "Kategorija",
+"Select category" => "Izaberite kategoriju",
"All Day Event" => "Celodnevni događaj",
"From" => "Od",
"To" => "Do",
"Repeat" => "Ponavljaj",
-"Attendees" => "Prisutni",
+"Location" => "Lokacija",
+"Location of the Event" => "Lokacija događaja",
+"Description" => "Opis",
"Description of the Event" => "Opis događaja",
-"Close" => "Zatvori",
"Create a new event" => "Napravi novi događaj",
"Timezone" => "Vremenska zona"
);
diff --git a/apps/calendar/l10n/sv.php b/apps/calendar/l10n/sv.php
new file mode 100644
index 00000000000..8923395a34d
--- /dev/null
+++ b/apps/calendar/l10n/sv.php
@@ -0,0 +1,80 @@
+ "Tidszon ändrad",
+"Invalid request" => "Ogiltig begäran",
+"Calendar" => "Kalender",
+"Wrong calendar" => "Fel kalender",
+"Birthday" => "Födelsedag",
+"Business" => "Företag",
+"Call" => "Ringa",
+"Clients" => "Klienter",
+"Deliverer" => "Leverantör",
+"Holidays" => "Semester",
+"Ideas" => "Idéer",
+"Journey" => "Resa",
+"Jubilee" => "Jubileum",
+"Meeting" => "Möte",
+"Other" => "Annat",
+"Personal" => "Personlig",
+"Projects" => "Projekt",
+"Questions" => "Frågor",
+"Work" => "Arbetet",
+"Does not repeat" => "Upprepas inte",
+"Daily" => "Dagligen",
+"Weekly" => "Varje vecka",
+"Every Weekday" => "Varje vardag",
+"Bi-Weekly" => "Varannan vecka",
+"Monthly" => "Varje månad",
+"Yearly" => "Årligen",
+"Not an array" => "ingen rad",
+"All day" => "Hela dagen",
+"Missing fields" => "Saknade fält",
+"Title" => "Rubrik",
+"From Date" => "Från datum",
+"From Time" => "Från tid",
+"To Date" => "Till datum",
+"To Time" => "Till tid",
+"The event ends before it starts" => "Händelsen slutar innan den börjar",
+"There was a database fail" => "Det blev ett databasfel",
+"Week" => "Vecka",
+"Month" => "Månad",
+"List" => "Lista",
+"Today" => "Idag",
+"Calendars" => "Kalendrar",
+"There was a fail, while parsing the file." => "Det blev ett fel medan filen analyserades.",
+"Choose active calendars" => "Välj aktiva kalendrar",
+"New Calendar" => "Ny kalender",
+"CalDav Link" => "CalDAV-länk",
+"Download" => "Ladda ner",
+"Edit" => "Redigera",
+"Delete" => "Radera",
+"New calendar" => "Nya kalender",
+"Edit calendar" => "Redigera kalender",
+"Displayname" => "Visningsnamn",
+"Active" => "Aktiv",
+"Calendar color" => "Kalender-färg",
+"Save" => "Spara",
+"Submit" => "Lägg till",
+"Cancel" => "Avbryt",
+"Edit an event" => "Redigera en händelse",
+"Export" => "Exportera",
+"Title of the Event" => "Rubrik för händelsen",
+"Category" => "Kategori",
+"Select category" => "Välj kategori",
+"All Day Event" => "Hela dagen",
+"From" => "Från",
+"To" => "Till",
+"Advanced options" => "Avancerade alternativ",
+"Repeat" => "Upprepa",
+"Location" => "Plats",
+"Location of the Event" => "Platsen för händelsen",
+"Description" => "Beskrivning",
+"Description of the Event" => "Beskrivning av händelse",
+"Please choose the calendar" => "Välj kalender",
+"Import" => "Importera",
+"Create a new event" => "Skapa en ny händelse",
+"Timezone" => "Tidszon",
+"Timeformat" => "Tidsformat",
+"24h" => "24h",
+"12h" => "12h",
+"Calendar CalDAV syncing address:" => "Synkroniseringsadress för CalDAV kalender:"
+);
diff --git a/apps/calendar/l10n/th_TH.php b/apps/calendar/l10n/th_TH.php
new file mode 100644
index 00000000000..60f4701211f
--- /dev/null
+++ b/apps/calendar/l10n/th_TH.php
@@ -0,0 +1,155 @@
+ "สร้างโซนเวลาใหม่:",
+"Timezone changed" => "โซนเวลาถูกเปลี่ยนแล้ว",
+"Invalid request" => "คำร้องขอไม่ถูกต้อง",
+"Calendar" => "ปฏิทิน",
+"Wrong calendar" => "ปฏิทินไม่ถูกต้อง",
+"Birthday" => "วันเกิด",
+"Business" => "ธุรกิจ",
+"Call" => "โทรติดต่อ",
+"Clients" => "ลูกค้า",
+"Deliverer" => "จัดส่ง",
+"Holidays" => "วันหยุด",
+"Ideas" => "ไอเดีย",
+"Journey" => "การเดินทาง",
+"Jubilee" => "งานเลี้ยง",
+"Meeting" => "นัดประชุม",
+"Other" => "อื่นๆ",
+"Personal" => "ส่วนตัว",
+"Projects" => "โครงการ",
+"Questions" => "คำถาม",
+"Work" => "งาน",
+"Does not repeat" => "ไม่ต้องทำซ้ำ",
+"Daily" => "รายวัน",
+"Weekly" => "รายสัปดาห์",
+"Every Weekday" => "ทุกวันหยุด",
+"Bi-Weekly" => "รายปักษ์",
+"Monthly" => "รายเดือน",
+"Yearly" => "รายปี",
+"never" => "ไม่ต้องเลย",
+"by occurrences" => "ตามจำนวนที่ปรากฏ",
+"by date" => "ตามวันที่",
+"by monthday" => "จากเดือน",
+"by weekday" => "จากสัปดาห์",
+"Monday" => "วันจันทร์",
+"Tuesday" => "วันอังคาร",
+"Wednesday" => "วันพุธ",
+"Thursday" => "วันพฤหัสบดี",
+"Friday" => "วันศุกร์",
+"Saturday" => "วันเสาร์",
+"Sunday" => "วันอาทิตย์",
+"events week of month" => "สัปดาห์ที่มีกิจกรรมของเดือน",
+"first" => "ลำดับแรก",
+"second" => "ลำดับที่สอง",
+"third" => "ลำดับที่สาม",
+"fourth" => "ลำดับที่สี่",
+"fifth" => "ลำดับที่ห้า",
+"last" => "ลำดับสุดท้าย",
+"January" => "มกราคม",
+"February" => "กุมภาพันธ์",
+"March" => "มีนาคม",
+"April" => "เมษายน",
+"May" => "พฤษภาคม",
+"June" => "มิถุนายน",
+"July" => "กรกฏาคม",
+"August" => "สิงหาคม",
+"September" => "กันยายน",
+"October" => "ตุลาคม",
+"November" => "พฤศจิกายน",
+"December" => "ธันวาคม",
+"by events date" => "ตามวันที่จัดกิจกรรม",
+"by yearday(s)" => "ของเมื่อวานนี้",
+"by weeknumber(s)" => "จากหมายเลขของสัปดาห์",
+"by day and month" => "ตามวันและเดือน",
+"Not an array" => "ไม่ใช่อาเรย์",
+"Date" => "วันที่",
+"Cal." => "คำนวณ",
+"All day" => "ทั้งวัน",
+"Missing fields" => "ช่องฟิลด์เกิดการสูญหาย",
+"Title" => "ชื่อกิจกรรม",
+"From Date" => "จากวันที่",
+"From Time" => "ตั้งแต่เวลา",
+"To Date" => "ถึงวันที่",
+"To Time" => "ถึงเวลา",
+"The event ends before it starts" => "วันที่สิ้นสุดกิจกรรมดังกล่าวอยู่ก่อนวันเริ่มต้น",
+"There was a database fail" => "เกิดความล้มเหลวกับฐานข้อมูล",
+"Week" => "สัปดาห์",
+"Month" => "เดือน",
+"List" => "รายการ",
+"Today" => "วันนี้",
+"Calendars" => "ปฏิทิน",
+"There was a fail, while parsing the file." => "เกิดความล้มเหลวในการแยกไฟล์",
+"Sun." => "อา.",
+"Mon." => "จ.",
+"Tue." => "อ.",
+"Wed." => "พ.",
+"Thu." => "พฤ.",
+"Fri." => "ศ.",
+"Sat." => "ส.",
+"Jan." => "ม.ค.",
+"Feb." => "ก.พ.",
+"Mar." => "มี.ค.",
+"Apr." => "เม.ย.",
+"May." => "พ.ค.",
+"Jun." => "มิ.ย.",
+"Jul." => "ก.ค.",
+"Aug." => "ส.ค.",
+"Sep." => "ก.ย.",
+"Oct." => "ต.ค.",
+"Nov." => "พ.ย.",
+"Dec." => "ธ.ค.",
+"Choose active calendars" => "เลือกปฏิทินที่ต้องการใช้งาน",
+"New Calendar" => "สร้างปฏิทินใหม่",
+"CalDav Link" => "ลิงค์ CalDav",
+"Download" => "ดาวน์โหลด",
+"Edit" => "แก้ไข",
+"Delete" => "ลบ",
+"New calendar" => "สร้างปฏิทินใหม่",
+"Edit calendar" => "แก้ไขปฏิทิน",
+"Displayname" => "ชื่อที่ต้องการให้แสดง",
+"Active" => "ใช้งาน",
+"Calendar color" => "สีของปฏิทิน",
+"Save" => "บันทึก",
+"Submit" => "ส่งข้อมูล",
+"Cancel" => "ยกเลิก",
+"Edit an event" => "แก้ไขกิจกรรม",
+"Export" => "ส่งออกข้อมูล",
+"Title of the Event" => "ชื่อของกิจกรรม",
+"Category" => "หมวดหมู่",
+"Select category" => "เลือกหมวดหมู่",
+"All Day Event" => "เป็นกิจกรรมตลอดทั้งวัน",
+"From" => "จาก",
+"To" => "ถึง",
+"Advanced options" => "ตัวเลือกขั้นสูง",
+"Repeat" => "ทำซ้ำ",
+"Advanced" => "ขั้นสูง",
+"Select weekdays" => "เลือกสัปดาห์",
+"Select days" => "เลือกวัน",
+"and the events day of year." => "และวันที่มีเหตุการณ์เกิดขึ้นในปี",
+"and the events day of month." => "และวันที่มีเหตุการณ์เกิดขึ้นในเดือน",
+"Select months" => "เลือกเดือน",
+"Select weeks" => "เลือกสัปดาห์",
+"and the events week of year." => "และสัปดาห์ที่มีเหตุการณ์เกิดขึ้นในปี",
+"Interval" => "ช่วงเวลา",
+"End" => "สิ้นสุด",
+"occurrences" => "จำนวนที่ปรากฏ",
+"Location" => "สถานที่",
+"Location of the Event" => "สถานที่จัดกิจกรรม",
+"Description" => "คำอธิบาย",
+"Description of the Event" => "คำอธิบายเกี่ยวกับกิจกรรม",
+"Import a calendar file" => "นำเข้าไฟล์ปฏิทิน",
+"Please choose the calendar" => "กรณาเลือกปฏิทิน",
+"create a new calendar" => "สร้างปฏิทินใหม่",
+"Name of new calendar" => "ชื่อของปฏิทิน",
+"Import" => "นำเข้าข้อมูล",
+"Importing calendar" => "นำเข้าข้อมูลปฏิทิน",
+"Calendar imported successfully" => "ปฏิทินถูกนำเข้าข้อมูลเรียบร้อยแล้ว",
+"Close Dialog" => "ปิดกล่องข้อความโต้ตอบ",
+"Create a new event" => "สร้างกิจกรรมใหม่",
+"Timezone" => "โซนเวลา",
+"Check always for changes of the timezone" => "ตรวจสอบการเปลี่ยนแปลงโซนเวลาอยู่เสมอ",
+"Timeformat" => "รูปแบบการแสดงเวลา",
+"24h" => "24 ช.ม.",
+"12h" => "12 ช.ม.",
+"Calendar CalDAV syncing address:" => "ที่อยู่ในการเชื่อมข้อมูลกับปฏิทิน CalDav:"
+);
diff --git a/apps/calendar/l10n/tr.php b/apps/calendar/l10n/tr.php
new file mode 100644
index 00000000000..6a46c239c7d
--- /dev/null
+++ b/apps/calendar/l10n/tr.php
@@ -0,0 +1,80 @@
+ "Zaman dilimi değiştirildi",
+"Invalid request" => "Geçersiz istek",
+"Calendar" => "Takvim",
+"Wrong calendar" => "Yanlış takvim",
+"Birthday" => "Doğum günü",
+"Business" => "İş",
+"Call" => "Arama",
+"Clients" => "Müşteriler",
+"Deliverer" => "Teslimatçı",
+"Holidays" => "Tatil günleri",
+"Ideas" => "Fikirler",
+"Journey" => "Seyahat",
+"Jubilee" => "Yıl dönümü",
+"Meeting" => "Toplantı",
+"Other" => "Diğer",
+"Personal" => "Kişisel",
+"Projects" => "Projeler",
+"Questions" => "Sorular",
+"Work" => "İş",
+"Does not repeat" => "Tekrar etmiyor",
+"Daily" => "Günlük",
+"Weekly" => "Haftalı",
+"Every Weekday" => "Haftaiçi Her gün",
+"Bi-Weekly" => "İki haftada bir",
+"Monthly" => "Aylık",
+"Yearly" => "Yıllı",
+"Not an array" => "Bir dizi değil",
+"All day" => "Tüm gün",
+"Missing fields" => "Eksik alanlar",
+"Title" => "Başlık",
+"From Date" => "Bu Tarihten",
+"From Time" => "Bu Saatten",
+"To Date" => "Bu Tarihe",
+"To Time" => "Bu Saate",
+"The event ends before it starts" => "Olay başlamadan önce bitiyor",
+"There was a database fail" => "Bir veritabanı başarısızlığı oluştu",
+"Week" => "Hafta",
+"Month" => "Ay",
+"List" => "Liste",
+"Today" => "Bugün",
+"Calendars" => "Takvimler",
+"There was a fail, while parsing the file." => "Dosya okunurken başarısızlık oldu.",
+"Choose active calendars" => "Aktif takvimleri seçin",
+"New Calendar" => "Yeni Takvim",
+"CalDav Link" => "CalDav Bağlantısı",
+"Download" => "İndir",
+"Edit" => "Düzenle",
+"Delete" => "Sil",
+"New calendar" => "Yeni takvim",
+"Edit calendar" => "Takvimi düzenle",
+"Displayname" => "Görünümadı",
+"Active" => "Aktif",
+"Calendar color" => "Takvim rengi",
+"Save" => "Kaydet",
+"Submit" => "Gönder",
+"Cancel" => "İptal",
+"Edit an event" => "Bir olay düzenle",
+"Export" => "Dışa aktar",
+"Title of the Event" => "Olayın Başlığı",
+"Category" => "Kategori",
+"Select category" => "Kategori seçin",
+"All Day Event" => "Tüm Gün Olay",
+"From" => "Kimden",
+"To" => "Kime",
+"Advanced options" => "Gelişmiş opsiyonlar",
+"Repeat" => "Tekrar",
+"Location" => "Konum",
+"Location of the Event" => "Olayın Konumu",
+"Description" => "Açıklama",
+"Description of the Event" => "Olayın Açıklaması",
+"Please choose the calendar" => "Lütfen takvimi seçin",
+"Import" => "İçe Al",
+"Create a new event" => "Yeni olay oluştur",
+"Timezone" => "Zaman dilimi",
+"Timeformat" => "Saat biçimi",
+"24h" => "24s",
+"12h" => "12s",
+"Calendar CalDAV syncing address:" => "CalDAV Takvim senkron adresi:"
+);
diff --git a/apps/calendar/l10n/xgettextfiles b/apps/calendar/l10n/xgettextfiles
index 4cc636436b4..a8c2601045f 100644
--- a/apps/calendar/l10n/xgettextfiles
+++ b/apps/calendar/l10n/xgettextfiles
@@ -1,7 +1,12 @@
../appinfo/app.php
+../lib/object.php
../templates/calendar.php
-../templates/part.editevent.php
-../templates/part.eventinfo.php
-../templates/part.newevent.php
../templates/part.choosecalendar.php
-../js/calendar.js
+../templates/part.choosecalendar.rowfields.php
+../templates/part.editcalendar.php
+../templates/part.editevent.php
+../templates/part.eventform.php
+../templates/part.import.php
+../templates/part.newevent.php
+../templates/settings.php
+../templates/lAfix.php
\ No newline at end of file
diff --git a/apps/calendar/l10n/zh_CN.php b/apps/calendar/l10n/zh_CN.php
index 2b7dc5677a4..bed47610b90 100644
--- a/apps/calendar/l10n/zh_CN.php
+++ b/apps/calendar/l10n/zh_CN.php
@@ -1,8 +1,24 @@
"验证错误",
+"New Timezone:" => "新时区:",
"Timezone changed" => "时区已修改",
"Invalid request" => "非法请求",
"Calendar" => "日历",
+"Wrong calendar" => "错误的日历",
+"Birthday" => "生日",
+"Business" => "商务",
+"Call" => "呼叫",
+"Clients" => "客户",
+"Deliverer" => "派送",
+"Holidays" => "节日",
+"Ideas" => "想法",
+"Journey" => "旅行",
+"Jubilee" => "周年纪念",
+"Meeting" => "会议",
+"Other" => "其他",
+"Personal" => "个人",
+"Projects" => "项目",
+"Questions" => "问题",
+"Work" => "工作",
"Does not repeat" => "不重复",
"Daily" => "每天",
"Weekly" => "每周",
@@ -10,37 +26,72 @@
"Bi-Weekly" => "每两周",
"Monthly" => "每月",
"Yearly" => "每年",
-"All day" => "全天",
-"Sunday" => "星期日",
+"never" => "从不",
+"by occurrences" => "按发生次数",
+"by date" => "按日期",
+"by monthday" => "按月的某天",
+"by weekday" => "按星期的某天",
"Monday" => "星期一",
"Tuesday" => "星期二",
"Wednesday" => "星期三",
"Thursday" => "星期四",
"Friday" => "星期五",
"Saturday" => "星期六",
-"Sun." => "日",
-"Mon." => "一",
-"Tue." => "二",
-"Wed." => "三",
-"Thu." => "四",
-"Fri." => "五",
-"Sat." => "六",
-"January" => "1月",
-"February" => "2月",
-"March" => "3月",
-"April" => "4月",
-"May" => "5月",
-"June" => "6月",
-"July" => "7月",
-"August" => "8月",
-"September" => "9月",
-"October" => "10月",
-"November" => "11月",
-"December" => "12月",
+"Sunday" => "星期日",
+"events week of month" => "事件在每月的第几个星期",
+"first" => "第一",
+"second" => "第二",
+"third" => "第三",
+"fourth" => "第四",
+"fifth" => "第五",
+"last" => "最后",
+"January" => "一月",
+"February" => "二月",
+"March" => "三月",
+"April" => "四月",
+"May" => "五月",
+"June" => "六月",
+"July" => "七月",
+"August" => "八月",
+"September" => "九月",
+"October" => "十月",
+"November" => "十一月",
+"December" => "十二月",
+"by events date" => "按事件日期",
+"by yearday(s)" => "按每年的某天",
+"by weeknumber(s)" => "按星期数",
+"by day and month" => "按天和月份",
+"Not an array" => "不是一个数组",
+"Date" => "日期",
+"Cal." => "日历",
+"All day" => "全天",
+"New Calendar" => "新日历",
+"Missing fields" => "缺少字段",
+"Title" => "标题",
+"From Date" => "从",
+"From Time" => "从",
+"To Date" => "至",
+"To Time" => "至",
+"The event ends before it starts" => "事件在开始前已结束",
+"There was a database fail" => "数据库访问失败",
+"Week" => "星期",
+"Month" => "月",
+"List" => "列表",
+"Today" => "今天",
+"Calendars" => "日历",
+"There was a fail, while parsing the file." => "解析文件失败",
+"Sun." => "周日",
+"Mon." => "周一",
+"Tue." => "周二",
+"Wed." => "周三",
+"Thu." => "周四",
+"Fri." => "周五",
+"Sat." => "周六",
"Jan." => "1月",
"Feb." => "2月",
"Mar." => "3月",
"Apr." => "4月",
+"May." => "5月",
"Jun." => "6月",
"Jul." => "7月",
"Aug." => "8月",
@@ -48,36 +99,57 @@
"Oct." => "10月",
"Nov." => "11月",
"Dec." => "12月",
-"Week" => "星期",
-"Weeks" => "星期",
-"Day" => "天",
-"Month" => "月",
-"Today" => "今天",
-"Calendars" => "日历",
-"Time" => "时间",
-"There was a fail, while parsing the file." => "解析文件失败",
"Choose active calendars" => "选择活动日历",
+"CalDav Link" => "CalDav 链接",
"Download" => "下载",
"Edit" => "编辑",
+"Delete" => "删除",
+"New calendar" => "新日历",
"Edit calendar" => "编辑日历",
"Displayname" => "显示名称",
"Active" => "激活",
-"Description" => "描述",
"Calendar color" => "日历颜色",
+"Save" => "保存",
"Submit" => "提交",
+"Cancel" => "取消",
"Edit an event" => "编辑事件",
-"Title" => "标题",
+"Export" => "导出",
"Title of the Event" => "事件标题",
-"Location" => "地点",
-"Location of the Event" => "事件地点",
"Category" => "分类",
+"Select category" => "选择分类",
"All Day Event" => "全天事件",
"From" => "自",
"To" => "至",
+"Advanced options" => "高级选项",
"Repeat" => "重复",
-"Attendees" => "参加者",
+"Advanced" => "高级",
+"Select weekdays" => "选择星期中的某天",
+"Select days" => "选择某天",
+"and the events day of year." => "选择每年事件发生的日子",
+"and the events day of month." => "选择每月事件发生的日子",
+"Select months" => "选择月份",
+"Select weeks" => "选择星期",
+"and the events week of year." => "选择每年的事件发生的星期",
+"Interval" => "间隔",
+"End" => "结束",
+"occurrences" => "次",
+"Location" => "地点",
+"Location of the Event" => "事件地点",
+"Description" => "描述",
"Description of the Event" => "事件描述",
-"Close" => "关闭",
+"Import a calendar file" => "导入日历文件",
+"Please choose the calendar" => "请选择日历",
+"create a new calendar" => "创建新日历",
+"Name of new calendar" => "新日历名称",
+"Import" => "导入",
+"Importing calendar" => "导入日历",
+"Calendar imported successfully" => "导入日历成功",
+"Close Dialog" => "关闭对话框",
"Create a new event" => "创建新事件",
-"Timezone" => "时区"
+"Timezone" => "时区",
+"Check always for changes of the timezone" => "选中则总是按照时区变化",
+"Timeformat" => "时间格式",
+"24h" => "24小时",
+"12h" => "12小时",
+"Calendar CalDAV syncing address:" => "日历CalDAV 同步地址:"
);
diff --git a/apps/calendar/lib/app.php b/apps/calendar/lib/app.php
new file mode 100644
index 00000000000..6e92cf67c5c
--- /dev/null
+++ b/apps/calendar/lib/app.php
@@ -0,0 +1,117 @@
+
+ * This file is licensed under the Affero General Public License version 3 or
+ * later.
+ * See the COPYING-README file.
+ */
+
+/**
+ * This class manages our app actions
+ */
+OC_Calendar_App::$l10n = new OC_L10N('calendar');
+class OC_Calendar_App{
+ public static $l10n;
+
+ public static function getCalendar($id){
+ $calendar = OC_Calendar_Calendar::find( $id );
+ if( $calendar === false || $calendar['userid'] != OC_User::getUser()){
+ OC_JSON::error(array('data' => array('message' => self::$l10n->t('Wrong calendar'))));
+ exit();
+ }
+ return $calendar;
+ }
+
+ public static function getEventObject($id){
+ $event_object = OC_Calendar_Object::find( $id );
+ if( $event_object === false ){
+ OC_JSON::error();
+ exit();
+ }
+
+ self::getCalendar( $event_object['calendarid'] );//access check
+ return $event_object;
+ }
+
+ public static function getVCalendar($id){
+ $event_object = self::getEventObject( $id );
+
+ $vcalendar = OC_VObject::parse($event_object['calendardata']);
+ // Check if the vcalendar is valid
+ if(is_null($vcalendar)){
+ OC_JSON::error();
+ exit();
+ }
+ return $vcalendar;
+ }
+
+ public static function isNotModified($vevent, $lastmodified)
+ {
+ $last_modified = $vevent->__get('LAST-MODIFIED');
+ if($last_modified && $lastmodified != $last_modified->getDateTime()->format('U')){
+ OC_JSON::error(array('modified'=>true));
+ exit;
+ }
+ }
+
+ public static function getCategoryOptions()
+ {
+ return array(
+ self::$l10n->t('Birthday'),
+ self::$l10n->t('Business'),
+ self::$l10n->t('Call'),
+ self::$l10n->t('Clients'),
+ self::$l10n->t('Deliverer'),
+ self::$l10n->t('Holidays'),
+ self::$l10n->t('Ideas'),
+ self::$l10n->t('Journey'),
+ self::$l10n->t('Jubilee'),
+ self::$l10n->t('Meeting'),
+ self::$l10n->t('Other'),
+ self::$l10n->t('Personal'),
+ self::$l10n->t('Projects'),
+ self::$l10n->t('Questions'),
+ self::$l10n->t('Work'),
+ );
+ }
+
+ public static function getRepeatOptions(){
+ return OC_Calendar_Object::getRepeatOptions(self::$l10n);
+ }
+
+ public static function getEndOptions(){
+ return OC_Calendar_Object::getEndOptions(self::$l10n);
+ }
+
+ public static function getMonthOptions(){
+ return OC_Calendar_Object::getMonthOptions(self::$l10n);
+ }
+
+ public static function getWeeklyOptions(){
+ return OC_Calendar_Object::getWeeklyOptions(self::$l10n);
+ }
+
+ public static function getYearOptions(){
+ return OC_Calendar_Object::getYearOptions(self::$l10n);
+ }
+
+ public static function getByYearDayOptions(){
+ return OC_Calendar_Object::getByYearDayOptions();
+ }
+
+ public static function getByMonthOptions(){
+ return OC_Calendar_Object::getByMonthOptions(self::$l10n);
+ }
+
+ public static function getByWeekNoOptions(){
+ return OC_Calendar_Object::getByWeekNoOptions();
+ }
+
+ public static function getByMonthDayOptions(){
+ return OC_Calendar_Object::getByMonthDayOptions();
+ }
+
+ public static function getWeekofMonth(){
+ return OC_Calendar_Object::getWeekofMonth(self::$l10n);
+ }
+}
diff --git a/apps/calendar/lib/calendar.php b/apps/calendar/lib/calendar.php
index c19c0e73c08..5e272991f20 100644
--- a/apps/calendar/lib/calendar.php
+++ b/apps/calendar/lib/calendar.php
@@ -82,7 +82,7 @@ class OC_Calendar_Calendar{
* @param integer $id
* @return associative array
*/
- public static function findCalendar($id){
+ public static function find($id){
$stmt = OC_DB::prepare( 'SELECT * FROM *PREFIX*calendar_calendars WHERE id = ?' );
$result = $stmt->execute(array($id));
@@ -111,7 +111,7 @@ class OC_Calendar_Calendar{
$stmt = OC_DB::prepare( 'INSERT INTO *PREFIX*calendar_calendars (userid,displayname,uri,ctag,calendarorder,calendarcolor,timezone,components) VALUES(?,?,?,?,?,?,?,?)' );
$result = $stmt->execute(array($userid,$name,$uri,1,$order,$color,$timezone,$components));
- return OC_DB::insertid();
+ return OC_DB::insertid('*PREFIX*calendar_calendar');
}
/**
@@ -131,7 +131,7 @@ class OC_Calendar_Calendar{
$stmt = OC_DB::prepare( 'INSERT INTO *PREFIX*calendar_calendars (userid,displayname,uri,ctag,calendarorder,calendarcolor,timezone,components) VALUES(?,?,?,?,?,?,?,?)' );
$result = $stmt->execute(array($userid,$name,$uri,1,$order,$color,$timezone,$components));
- return OC_DB::insertid();
+ return OC_DB::insertid('*PREFIX*calendar_calendars');
}
/**
@@ -148,14 +148,14 @@ class OC_Calendar_Calendar{
*/
public static function editCalendar($id,$name=null,$components=null,$timezone=null,$order=null,$color=null){
// Need these ones for checking uri
- $calendar = self::findCalendar($id);
+ $calendar = self::find($id);
// Keep old stuff
- if(is_null($name)) $name = $calendar['name'];
+ if(is_null($name)) $name = $calendar['displayname'];
if(is_null($components)) $components = $calendar['components'];
if(is_null($timezone)) $timezone = $calendar['timezone'];
if(is_null($order)) $order = $calendar['calendarorder'];
- if(is_null($color)) $color = $calendar['color'];
+ if(is_null($color)) $color = $calendar['calendarcolor'];
$stmt = OC_DB::prepare( 'UPDATE *PREFIX*calendar_calendars SET displayname=?,calendarorder=?,calendarcolor=?,timezone=?,components=?,ctag=ctag+1 WHERE id=?' );
$result = $stmt->execute(array($name,$order,$color,$timezone,$components,$id));
@@ -231,13 +231,21 @@ class OC_Calendar_Calendar{
public static function getCalendarColorOptions(){
return array(
'ff0000', // "Red"
- '00ff00', // "Green"
+ 'b3dc6c', // "Green"
'ffff00', // "Yellow"
'808000', // "Olive"
'ffa500', // "Orange"
'ff7f50', // "Coral"
'ee82ee', // "Violet"
- 'ecc255', // dark yellow
+ '9fc6e7', // "light blue"
+ );
+ }
+ public static function getEventSourceInfo($calendar){
+ return array(
+ 'url' => 'ajax/events.php?calendar_id='.$calendar['id'],
+ 'backgroundColor' => '#'.$calendar['calendarcolor'],
+ 'borderColor' => '#888',
+ 'textColor' => 'black',
);
}
}
diff --git a/apps/calendar/lib/object.php b/apps/calendar/lib/object.php
index 0c3e497d4f2..cbb1badf802 100644
--- a/apps/calendar/lib/object.php
+++ b/apps/calendar/lib/object.php
@@ -30,6 +30,36 @@ class OC_Calendar_Object{
return $calendarobjects;
}
+ /**
+ * @brief Returns all objects of a calendar between $start and $end
+ * @param integer $id
+ * @param DateTime $start
+ * @param DateTime $end
+ * @return array
+ *
+ * The objects are associative arrays. You'll find the original vObject
+ * in ['calendardata']
+ */
+ public static function allInPeriod($id, $start, $end){
+ $stmt = OC_DB::prepare( 'SELECT * FROM *PREFIX*calendar_objects WHERE calendarid = ?'
+ .' AND ((startdate >= ? AND startdate <= ? AND repeating = 0)'
+ .' OR (enddate >= ? AND enddate <= ? AND repeating = 0)'
+ .' OR (startdate <= ? AND repeating = 1))' );
+ $start = self::getUTCforMDB($start);
+ $end = self::getUTCforMDB($end);
+ $result = $stmt->execute(array($id,
+ $start, $end,
+ $start, $end,
+ $end));
+
+ $calendarobjects = array();
+ while( $row = $result->fetchRow()){
+ $calendarobjects[] = $row;
+ }
+
+ return $calendarobjects;
+ }
+
/**
* @brief Returns an object
* @param integer $id
@@ -62,7 +92,7 @@ class OC_Calendar_Object{
* @return insertid
*/
public static function add($id,$data){
- $object = self::parse($data);
+ $object = OC_VObject::parse($data);
list($type,$startdate,$enddate,$summary,$repeating,$uid) = self::extractData($object);
if(is_null($uid)){
@@ -78,7 +108,7 @@ class OC_Calendar_Object{
OC_Calendar_Calendar::touchCalendar($id);
- return OC_DB::insertid();
+ return OC_DB::insertid('*PREFIX*calendar_objects');
}
/**
@@ -89,7 +119,7 @@ class OC_Calendar_Object{
* @return insertid
*/
public static function addFromDAVData($id,$uri,$data){
- $object = self::parse($data);
+ $object = OC_VObject::parse($data);
list($type,$startdate,$enddate,$summary,$repeating,$uid) = self::extractData($object);
$stmt = OC_DB::prepare( 'INSERT INTO *PREFIX*calendar_objects (calendarid,objecttype,startdate,enddate,repeating,summary,calendardata,uri,lastmodified) VALUES(?,?,?,?,?,?,?,?,?)' );
@@ -97,7 +127,7 @@ class OC_Calendar_Object{
OC_Calendar_Calendar::touchCalendar($id);
- return OC_DB::insertid();
+ return OC_DB::insertid('*PREFIX*calendar_objects');
}
/**
@@ -109,7 +139,7 @@ class OC_Calendar_Object{
public static function edit($id, $data){
$oldobject = self::find($id);
- $object = self::parse($data);
+ $object = OC_VObject::parse($data);
list($type,$startdate,$enddate,$summary,$repeating,$uid) = self::extractData($object);
$stmt = OC_DB::prepare( 'UPDATE *PREFIX*calendar_objects SET objecttype=?,startdate=?,enddate=?,repeating=?,summary=?,calendardata=?, lastmodified = ? WHERE id = ?' );
@@ -130,7 +160,7 @@ class OC_Calendar_Object{
public static function editFromDAVData($cid,$uri,$data){
$oldobject = self::findWhereDAVDataIs($cid,$uri);
- $object = self::parse($data);
+ $object = OC_VObject::parse($data);
list($type,$startdate,$enddate,$summary,$repeating,$uid) = self::extractData($object);
$stmt = OC_DB::prepare( 'UPDATE *PREFIX*calendar_objects SET objecttype=?,startdate=?,enddate=?,repeating=?,summary=?,calendardata=?, lastmodified = ? WHERE id = ?' );
@@ -198,7 +228,7 @@ class OC_Calendar_Object{
// Child to use
$children = 0;
$use = null;
- foreach($object->children as &$property){
+ foreach($object->children as $property){
if($property->name == 'VEVENT'){
$children++;
$thisone = true;
@@ -229,12 +259,12 @@ class OC_Calendar_Object{
// one VTODO per object)
break;
}
- } unset($property);
+ }
// find the data
if(!is_null($use)){
$return[0] = $use->name;
- foreach($use->children as &$property){
+ foreach($use->children as $property){
if($property->name == 'DTSTART'){
$return[1] = self::getUTCforMDB($property->getDateTime());
}
@@ -250,7 +280,7 @@ class OC_Calendar_Object{
elseif($property->name == 'UID'){
$return[5] = $property->value;
}
- } unset($property);
+ }
}
// More than one child means reoccuring!
@@ -272,20 +302,6 @@ class OC_Calendar_Object{
return date('Y-m-d H:i', $datetime->format('U') - $datetime->getOffset());
}
- /**
- * @brief Parses the VObject
- * @param string VObject as string
- * @returns Sabre_VObject or null
- */
- public static function parse($data){
- try {
- $calendar = Sabre_VObject_Reader::read($data);
- return $calendar;
- } catch (Exception $e) {
- return null;
- }
- }
-
public static function getDTEndFromVEvent($vevent)
{
if ($vevent->DTEND) {
@@ -340,9 +356,99 @@ class OC_Calendar_Object{
'weekday' => $l10n->t('Every Weekday'),
'biweekly' => $l10n->t('Bi-Weekly'),
'monthly' => $l10n->t('Monthly'),
- 'yearly' => $l10n->t('Yearly'),
+ 'yearly' => $l10n->t('Yearly')
);
}
+
+ public static function getEndOptions($l10n)
+ {
+ return array(
+ 'never' => $l10n->t('never'),
+ 'count' => $l10n->t('by occurrences'),
+ 'date' => $l10n->t('by date')
+ );
+ }
+
+ public static function getMonthOptions($l10n)
+ {
+ return array(
+ 'monthday' => $l10n->t('by monthday'),
+ 'weekday' => $l10n->t('by weekday')
+ );
+ }
+
+ public static function getWeeklyOptions($l10n)
+ {
+ return array(
+ 'MO' => $l10n->t('Monday'),
+ 'TU' => $l10n->t('Tuesday'),
+ 'WE' => $l10n->t('Wednesday'),
+ 'TH' => $l10n->t('Thursday'),
+ 'FR' => $l10n->t('Friday'),
+ 'SA' => $l10n->t('Saturday'),
+ 'SU' => $l10n->t('Sunday')
+ );
+ }
+
+ public static function getWeekofMonth($l10n)
+ {
+ return array(
+ 'auto' => $l10n->t('events week of month'),
+ '1' => $l10n->t('first'),
+ '2' => $l10n->t('second'),
+ '3' => $l10n->t('third'),
+ '4' => $l10n->t('fourth'),
+ '5' => $l10n->t('fifth'),
+ '-1' => $l10n->t('last')
+ );
+ }
+
+ public static function getByYearDayOptions(){
+ $return = array();
+ foreach(range(1,366) as $num){
+ $return[(string) $num] = (string) $num;
+ }
+ return $return;
+ }
+
+ public static function getByMonthDayOptions(){
+ $return = array();
+ foreach(range(1,31) as $num){
+ $return[(string) $num] = (string) $num;
+ }
+ return $return;
+ }
+
+ public static function getByMonthOptions($l10n){
+ return array(
+ '1' => $l10n->t('January'),
+ '2' => $l10n->t('February'),
+ '3' => $l10n->t('March'),
+ '4' => $l10n->t('April'),
+ '5' => $l10n->t('May'),
+ '6' => $l10n->t('June'),
+ '7' => $l10n->t('July'),
+ '8' => $l10n->t('August'),
+ '9' => $l10n->t('September'),
+ '10' => $l10n->t('October'),
+ '11' => $l10n->t('November'),
+ '12' => $l10n->t('December')
+ );
+ }
+
+ public static function getYearOptions($l10n){
+ return array(
+ 'bydate' => $l10n->t('by events date'),
+ 'byyearday' => $l10n->t('by yearday(s)'),
+ 'byweekno' => $l10n->t('by weeknumber(s)'),
+ 'bydaymonth' => $l10n->t('by day and month')
+ );
+ }
+
+ public static function getByWeekNoOptions(){
+ return range(1, 52);
+ }
+
public static function validateRequest($request)
{
$errnum = 0;
@@ -351,7 +457,7 @@ class OC_Calendar_Object{
$errarr['title'] = 'true';
$errnum++;
}
- $calendar = OC_Calendar_Calendar::findCalendar($request['calendar']);
+ $calendar = OC_Calendar_Calendar::find($request['calendar']);
if($calendar['userid'] != OC_User::getUser()){
$errarr['cal'] = 'true';
$errnum++;
@@ -381,7 +487,91 @@ class OC_Calendar_Object{
$errarr['to'] = 'true';
$errnum++;
}
- ;
+ if($request['repeat'] != 'doesnotrepeat'){
+ if(is_nan($request['interval']) && $request['interval'] != ''){
+ $errarr['interval'] = 'true';
+ $ernum++;
+ }
+ if(array_key_exists('repeat', $request) && !array_key_exists($request['repeat'], self::getRepeatOptions(OC_Calendar_App::$l10n))){
+ $errarr['repeat'] = 'true';
+ $ernum++;
+ }
+ if(array_key_exists('advanced_month_select', $request) && !array_key_exists($request['advanced_month_select'], self::getMonthOptions(OC_Calendar_App::$l10n))){
+ $errarr['advanced_month_select'] = 'true';
+ $errnum++;
+ }
+ if(array_key_exists('advanced_year_select', $request) && !array_key_exists($request['advanced_year_select'], self::getYearOptions(OC_Calendar_App::$l10n))){
+ $errarr['advanced_year_select'] = 'true';
+ $errnum++;
+ }
+ if(array_key_exists('weekofmonthoptions', $request) && !array_key_exists($request['weekofmonthoptions'], self::getWeekofMonth(OC_Calendar_App::$l10n))){
+ $errarr['weekofmonthoptions'] = 'true';
+ $errnum++;
+ }
+ if($request['end'] != 'never'){
+ if(!array_key_exists($request['end'], self::getEndOptions(OC_Calendar_App::$l10n))){
+ $errarr['end'] = 'true';
+ $errnum++;
+ }
+ if($request['end'] == 'count' && is_nan($request['byoccurrences'])){
+ $errarr['byoccurrences'] = 'true';
+ $errnum++;
+ }
+ if($request['end'] == 'date'){
+ list($bydate_day, $bydate_month, $bydate_year) = explode('-', $request['bydate']);
+ if(!checkdate($bydate_month, $bydate_day, $bydate_year)){
+ $errarr['bydate'] = 'true';
+ $errnum++;
+ }
+ }
+ }
+ if(array_key_exists('weeklyoptions', $request)){
+ foreach($request['weeklyoptions'] as $option){
+ if(!in_array($option, self::getWeeklyOptions(OC_Calendar_App::$l10n))){
+ $errarr['weeklyoptions'] = 'true';
+ $errnum++;
+ }
+ }
+ }
+ if(array_key_exists('byyearday', $request)){
+ foreach($request['byyearday'] as $option){
+ if(!array_key_exists($option, self::getByYearDayOptions())){
+ $errarr['byyearday'] = 'true';
+ $errnum++;
+ }
+ }
+ }
+ if(array_key_exists('weekofmonthoptions', $request)){
+ if(is_nan((double)$request['weekofmonthoptions'])){
+ $errarr['weekofmonthoptions'] = 'true';
+ $errnum++;
+ }
+ }
+ if(array_key_exists('bymonth', $request)){
+ foreach($request['bymonth'] as $option){
+ if(!in_array($option, self::getByMonthOptions(OC_Calendar_App::$l10n))){
+ $errarr['bymonth'] = 'true';
+ $errnum++;
+ }
+ }
+ }
+ if(array_key_exists('byweekno', $request)){
+ foreach($request['byweekno'] as $option){
+ if(!array_key_exists($option, self::getByWeekNoOptions())){
+ $errarr['byweekno'] = 'true';
+ $errnum++;
+ }
+ }
+ }
+ if(array_key_exists('bymonthday', $request)){
+ foreach($request['bymonthday'] as $option){
+ if(!array_key_exists($option, self::getByMonthDayOptions())){
+ $errarr['bymonthday'] = 'true';
+ $errnum++;
+ }
+ }
+ }
+ }
if(!$allday && self::checkTime(urldecode($request['totime']))) {
$errarr['totime'] = 'true';
$errnum++;
@@ -398,7 +588,7 @@ class OC_Calendar_Object{
$errarr['endbeforestart'] = 'true';
$errnum++;
}
- if($fromday == $today && $frommonth == $tomonth && $fromyear == $toyear){
+ if(!$allday && $fromday == $today && $frommonth == $tomonth && $fromyear == $toyear){
list($tohours, $tominutes) = explode(':', $request['totime']);
list($fromhours, $fromminutes) = explode(':', $request['fromtime']);
if($tohours < $fromhours){
@@ -427,22 +617,16 @@ class OC_Calendar_Object{
public static function createVCalendarFromRequest($request)
{
- $vcalendar = new Sabre_VObject_Component('VCALENDAR');
+ $vcalendar = new OC_VObject('VCALENDAR');
$vcalendar->add('PRODID', 'ownCloud Calendar');
$vcalendar->add('VERSION', '2.0');
- $now = new DateTime();
-
- $vevent = new Sabre_VObject_Component('VEVENT');
+ $vevent = new OC_VObject('VEVENT');
$vcalendar->add($vevent);
- $created = new Sabre_VObject_Element_DateTime('CREATED');
- $created->setDateTime($now, Sabre_VObject_Element_DateTime::UTC);
- $vevent->add($created);
-
- $uid = self::createUID();
- $vevent->add('UID',$uid);
+ $vevent->setDateTime('CREATED', 'now', Sabre_VObject_Element_DateTime::UTC);
+ $vevent->setUID();
return self::updateVCalendarFromRequest($request, $vcalendar);
}
@@ -450,81 +634,181 @@ class OC_Calendar_Object{
{
$title = $request["title"];
$location = $request["location"];
- $categories = isset($request["categories"]) ? $request["categories"] : null;
+ $categories = isset($request["categories"]) ? $request["categories"] : array();
$allday = isset($request["allday"]);
$from = $request["from"];
- $fromtime = $request["fromtime"];
$to = $request["to"];
- $totime = $request["totime"];
+ if (!$allday){
+ $fromtime = $request['fromtime'];
+ $totime = $request['totime'];
+ }
+ $vevent = $vcalendar->VEVENT;
$description = $request["description"];
- //$repeat = $request["repeat"];
- /*switch($request["repeatfreq"]){
- case "DAILY":
- $repeatfreq = "DAILY";
- case "WEEKLY":
- $repeatfreq = "WEEKLY";
- case "WEEKDAY":
- $repeatfreq = "DAILY;BYDAY=MO,TU,WE,TH,FR"; //load weeksdayss from userconfig when weekdays are choosable
- case "":
- $repeatfreq = "";
- case "":
- $repeatfreq = "";
- case "":
- $repeatfreq = "";
- default:
- $repeat = "false";
- }*/
- $repeat = "false";
+ $repeat = $request["repeat"];
+ if($repeat != 'doesnotrepeat'){
+ $rrule = '';
+ $interval = $request['interval'];
+ $end = $request['end'];
+ $byoccurrences = $request['byoccurrences'];
+ switch($repeat){
+ case 'daily':
+ $rrule .= 'FREQ=DAILY';
+ break;
+ case 'weekly':
+ $rrule .= 'FREQ=WEEKLY';
+ if(array_key_exists('weeklyoptions', $request)){
+ $byday = '';
+ $daystrings = array_flip(self::getWeeklyOptions(OC_Calendar_App::$l10n));
+ foreach($request['weeklyoptions'] as $days){
+ if($byday == ''){
+ $byday .= $daystrings[$days];
+ }else{
+ $byday .= ',' .$daystrings[$days];
+ }
+ }
+ $rrule .= ';BYDAY=' . $byday;
+ }
+ break;
+ case 'weekday':
+ $rrule .= 'FREQ=WEEKLY';
+ $rrule .= ';BYDAY=MO,TU,WE,TH,FR';
+ break;
+ case 'biweekly':
+ $rrule .= 'FREQ=WEEKLY';
+ $interval = $interval * 2;
+ break;
+ case 'monthly':
+ $rrule .= 'FREQ=MONTHLY';
+ if($request['advanced_month_select'] == 'monthday'){
+ break;
+ }elseif($request['advanced_month_select'] == 'weekday'){
+ if($request['weekofmonthoptions'] == 'auto'){
+ list($_day, $_month, $_year) = explode('-', $from);
+ $weekofmonth = floor($_day/7);
+ }else{
+ $weekofmonth = $request['weekofmonthoptions'];
+ }
+ $days = array_flip(self::getWeeklyOptions(OC_Calendar_App::$l10n));
+ $byday = '';
+ foreach($request['weeklyoptions'] as $day){
+ if($byday == ''){
+ $byday .= $weekofmonth . $days[$day];
+ }else{
+ $byday .= ',' . $weekofmonth . $days[$day];
+ }
+ }
+ $rrule .= ';BYDAY=' . $byday;
+ }
+ break;
+ case 'yearly':
+ $rrule .= 'FREQ=YEARLY';
+ if($request['advanced_year_select'] == 'bydate'){
+
+ }elseif($request['advanced_year_select'] == 'byyearday'){
+ list($_day, $_month, $_year) = explode('-', $from);
+ $byyearday = date('z', mktime(0,0,0, $_month, $_day, $_year)) + 1;
+ if(array_key_exists('byyearday', $request)){
+ foreach($request['byyearday'] as $yearday){
+ $byyearday .= ',' . $yearday;
+ }
+ }
+ $rrule .= ';BYYEARDAY=' . $byyearday;
+ }elseif($request['advanced_year_select'] == 'byweekno'){
+ list($_day, $_month, $_year) = explode('-', $from);
+ $rrule .= ';BYDAY=' . strtoupper(substr(date('l', mktime(0,0,0, $_month, $_day, $_year)), 0, 2));
+ $byweekno = '';
+ foreach($request['byweekno'] as $weekno){
+ if($byweekno == ''){
+ $byweekno = $weekno;
+ }else{
+ $byweekno .= ',' . $weekno;
+ }
+ }
+ $rrule .= ';BYWEEKNO=' . $byweekno;
+ }elseif($request['advanced_year_select'] == 'bydaymonth'){
+ if(array_key_exists('weeklyoptions', $request)){
+ $days = array_flip(self::getWeeklyOptions(OC_Calendar_App::$l10n));
+ $byday = '';
+ foreach($request['weeklyoptions'] as $day){
+ if($byday == ''){
+ $byday .= $days[$day];
+ }else{
+ $byday .= ',' . $days[$day];
+ }
+ }
+ $rrule .= ';BYDAY=' . $byday;
+ }
+ if(array_key_exists('bymonth', $request)){
+ $monthes = array_flip(self::getByMonthOptions(OC_Calendar_App::$l10n));
+ $bymonth = '';
+ foreach($request['bymonth'] as $month){
+ if($bymonth == ''){
+ $bymonth .= $monthes[$month];
+ }else{
+ $bymonth .= ',' . $monthes[$month];
+ }
+ }
+ $rrule .= ';BYMONTH=' . $bymonth;
+
+ }
+ if(array_key_exists('bymonthday', $request)){
+ $bymonthday = '';
+ foreach($request['bymonthday'] as $monthday){
+ if($bymonthday == ''){
+ $bymonthday .= $monthday;
+ }else{
+ $bymonthday .= ',' . $monthday;
+ }
+ }
+ $rrule .= ';BYMONTHDAY=' . $bymonthday;
+
+ }
+ }
+ break;
+ default:
+ break;
+ }
+ if($interval != ''){
+ $rrule .= ';INTERVAL=' . $interval;
+ }
+ if($end == 'count'){
+ $rrule .= ';COUNT=' . $byoccurrences;
+ }
+ if($end == 'date'){
+ list($bydate_day, $bydate_month, $bydate_year) = explode('-', $request['bydate']);
+ $rrule .= ';UNTIL=' . $bydate_year . $bydate_month . $bydate_day;
+ }
+ $vevent->setString('RRULE', $rrule);
+ $repeat = "true";
+ }else{
+ $repeat = "false";
+ }
- $now = new DateTime();
- $vevent = $vcalendar->VEVENT[0];
- $last_modified = new Sabre_VObject_Element_DateTime('LAST-MODIFIED');
- $last_modified->setDateTime($now, Sabre_VObject_Element_DateTime::UTC);
- $vevent->__set('LAST-MODIFIED', $last_modified);
-
- $dtstamp = new Sabre_VObject_Element_DateTime('DTSTAMP');
- $dtstamp->setDateTime($now, Sabre_VObject_Element_DateTime::UTC);
- $vevent->DTSTAMP = $dtstamp;
-
- $vevent->SUMMARY = $title;
+ $vevent->setDateTime('LAST-MODIFIED', 'now', Sabre_VObject_Element_DateTime::UTC);
+ $vevent->setDateTime('DTSTAMP', 'now', Sabre_VObject_Element_DateTime::UTC);
+ $vevent->setString('SUMMARY', $title);
$dtstart = new Sabre_VObject_Element_DateTime('DTSTART');
$dtend = new Sabre_VObject_Element_DateTime('DTEND');
if($allday){
$start = new DateTime($from);
$end = new DateTime($to.' +1 day');
- $dtstart->setDateTime($start, Sabre_VObject_Element_DateTime::DATE);
- $dtend->setDateTime($end, Sabre_VObject_Element_DateTime::DATE);
+ $vevent->setDateTime('DTSTART', $start, Sabre_VObject_Element_DateTime::DATE);
+ $vevent->setDateTime('DTEND', $end, Sabre_VObject_Element_DateTime::DATE);
}else{
- $timezone = OC_Preferences::getValue(OC_USER::getUser(), "calendar", "timezone", "Europe/London");
+ $timezone = OC_Preferences::getValue(OC_USER::getUser(), 'calendar', 'timezone', date_default_timezone_get());
$timezone = new DateTimeZone($timezone);
$start = new DateTime($from.' '.$fromtime, $timezone);
$end = new DateTime($to.' '.$totime, $timezone);
- $dtstart->setDateTime($start, Sabre_VObject_Element_DateTime::LOCALTZ);
- $dtend->setDateTime($end, Sabre_VObject_Element_DateTime::LOCALTZ);
+ $vevent->setDateTime('DTSTART', $start, Sabre_VObject_Element_DateTime::LOCALTZ);
+ $vevent->setDateTime('DTEND', $end, Sabre_VObject_Element_DateTime::LOCALTZ);
}
- $vevent->DTSTART = $dtstart;
- $vevent->DTEND = $dtend;
unset($vevent->DURATION);
- if($location != ""){
- $vevent->LOCATION = $location;
- }else{
- unset($vevent->LOCATION);
- }
-
- if($description != ""){
- $vevent->DESCRIPTION = $description;
- }else{
- unset($vevent->DESCRIPTION);
- }
-
- if(!empty($categories)){
- $vevent->CATEGORIES = join(',', $categories);
- }else{
- unset($vevent->CATEGORIES);
- }
+ $vevent->setString('LOCATION', $location);
+ $vevent->setString('DESCRIPTION', $description);
+ $vevent->setString('CATEGORIES', join(',', $categories));
/*if($repeat == "true"){
$vevent->RRULE = $repeat;
@@ -532,4 +816,4 @@ class OC_Calendar_Object{
return $vcalendar;
}
-}
+}
\ No newline at end of file
diff --git a/apps/calendar/lib/search.php b/apps/calendar/lib/search.php
new file mode 100644
index 00000000000..425c93c7338
--- /dev/null
+++ b/apps/calendar/lib/search.php
@@ -0,0 +1,47 @@
+ 0){
+ $searchquery = explode(' ', $query);
+ }else{
+ $searchquery[] = $query;
+ }
+ $user_timezone = OC_Preferences::getValue(OC_USER::getUser(), 'calendar', 'timezone', date_default_timezone_get());
+ $l = new OC_l10n('calendar');
+ foreach($calendars as $calendar){
+ $objects = OC_Calendar_Object::all($calendar['id']);
+ foreach($objects as $object){
+ if(substr_count(strtolower($object['summary']), strtolower($query)) > 0){
+ $calendardata = OC_VObject::parse($object['calendardata']);
+ $vevent = $calendardata->VEVENT;
+ $dtstart = $vevent->DTSTART;
+ $dtend = OC_Calendar_Object::getDTEndFromVEvent($vevent);
+ $start_dt = $dtstart->getDateTime();
+ $start_dt->setTimezone(new DateTimeZone($user_timezone));
+ $end_dt = $dtend->getDateTime();
+ $end_dt->setTimezone(new DateTimeZone($user_timezone));
+ if ($dtstart->getDateType() == Sabre_VObject_Element_DateTime::DATE){
+ $end_dt->modify('-1 sec');
+ if($start_dt->format('d.m.Y') != $end_dt->format('d.m.Y')){
+ $info = $l->t('Date') . ': ' . $start_dt->format('d.m.Y') . ' - ' . $end_dt->format('d.m.Y');
+ }else{
+ $info = $l->t('Date') . ': ' . $start_dt->format('d.m.Y');
+ }
+ }else{
+ $info = $l->t('Date') . ': ' . $start_dt->format('d.m.y H:i') . ' - ' . $end_dt->format('d.m.y H:i');
+ }
+ $link = OC_Helper::linkTo('apps/calendar', 'index.php?showevent='.urlencode($object['id']));
+ $results[]=new OC_Search_Result($object['summary'],$info, $link,$l->t('Cal.'));//$name,$text,$link,$type
+ }
+ }
+ }
+ return $results;
+ }
+}
+new OC_Search_Provider_Calendar();
diff --git a/apps/calendar/resettimezone.php b/apps/calendar/resettimezone.php
new file mode 100644
index 00000000000..1ef9591ae39
--- /dev/null
+++ b/apps/calendar/resettimezone.php
@@ -0,0 +1,4 @@
+
\ No newline at end of file
diff --git a/apps/calendar/templates/calendar.php b/apps/calendar/templates/calendar.php
old mode 100644
new mode 100755
index 317bb17ddbc..2d5cdea4d74
--- a/apps/calendar/templates/calendar.php
+++ b/apps/calendar/templates/calendar.php
@@ -1,217 +1,63 @@
- $l->t('All day'),
- 0 => '0',
- 1 => '1',
- 2 => '2',
- 3 => '3',
- 4 => '4',
- 5 => '5',
- 6 => '6',
- 7 => '7',
- 8 => '8',
- 9 => '9',
- 10 => '10',
- 11 => '11',
- 12 => '12',
- 13 => '13',
- 14 => '14',
- 15 => '15',
- 16 => '16',
- 17 => '17',
- 18 => '18',
- 19 => '19',
- 20 => '20',
- 21 => '21',
- 22 => '22',
- 23 => '23',
-);
-$hoursampm = array(
- 'allday' => $l->t('All day'),
- 0 => '12 a.m.',
- 1 => '1 a.m.',
- 2 => '2 a.m.',
- 3 => '3 a.m.',
- 4 => '4 a.m.',
- 5 => '5 a.m.',
- 6 => '6 a.m.',
- 7 => '7 a.m.',
- 8 => '8 a.m.',
- 9 => '9 a.m.',
- 10 => '10 a.m.',
- 11 => '11 a.m.',
- 12 => '12 p.m.',
- 13 => '1 p.m.',
- 14 => '2 p.m.',
- 15 => '3 p.m.',
- 16 => '4 p.m.',
- 17 => '5 p.m.',
- 18 => '6 p.m.',
- 19 => '7 p.m.',
- 20 => '8 p.m.',
- 21 => '9 p.m.',
- 22 => '10 p.m.',
- 23 => '11 p.m.',
-);
-if(OC_Preferences::getValue( OC_User::getUser(), 'calendar', 'timeformat', "24") == "24"){
- $hours = $hours24;
-}else{
- $hours = $hoursampm;
-}
-$weekdaynames = array('sunday', 'monday', 'tuesday', 'wednesday', 'thursday', 'friday', 'saturday');
-$dayforgenerator = OC_Preferences::getValue( OC_User::getUser(), 'calendar', 'firstdayofweek', "1");
-$weekdays = array();
-for($i = 0;$i <= 6; $i++){
- $weekdays[$i] = $weekdaynames[$dayforgenerator];
- if($dayforgenerator == 6){
- $dayforgenerator = 0;
- }else{
- $dayforgenerator++;
- }
-}
-$weekendjson = OC_Preferences::getValue( OC_User::getUser(), 'calendar', 'weekend', '{"Monday":"false","Tuesday":"false","Wednesday":"false","Thursday":"false","Friday":"false","Saturday":"true","Sunday":"true"}');
-$weekend = json_decode($weekendjson, true);
-$weekenddays = array("sunday"=>$weekend["Sunday"], "monday"=>$weekend["Monday"], "tuesday"=>$weekend["Tuesday"], "wednesday"=>$weekend["Wednesday"], "thursday"=>$weekend["Thursday"], "friday"=>$weekend["Friday"], "saturday"=>$weekend["Saturday"]);
-?>
-
-
+
-
-
-
-
- t("Time");?>
-
-
-
-
- $time_label): ?>
-
-
-
-
-
-
-
-
-
-
-
-
- t("Time");?>
- $weekday): ?>
- " onclick="Calendar.UI.newEvent('#oneweekview th.');">
-
-
-
-
- $time_label): ?>
-
-
- $weekday): ?>
- " onclick="Calendar.UI.newEvent('#oneweekview th.', '');">
-
-
-
-
-
-
-
-
-
-
- t("Week");?>
- $weekday): ?>
- t(ucfirst($weekday)) ?>
-
-
-
-
-
-
-
- $weekday): ?>
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- $weekday): ?>
- ">t(ucfirst($weekday));?>
-
-
-
-
-
-
- $weekday): ?>
- " onclick="Calendar.UI.newEvent('#onemonthview .week_ .')">
-
-
-
-
-
-
-
-
-
-
diff --git a/apps/calendar/templates/part.choosecalendar.php b/apps/calendar/templates/part.choosecalendar.php
index 65eb39cbfdf..86f09d62076 100644
--- a/apps/calendar/templates/part.choosecalendar.php
+++ b/apps/calendar/templates/part.choosecalendar.php
@@ -12,7 +12,7 @@ for($i = 0; $i < count($option_calendars); $i++){
?>
- t('New Calendar') ?>
+
diff --git a/apps/calendar/templates/part.choosecalendar.rowfields.php b/apps/calendar/templates/part.choosecalendar.rowfields.php
index db0c71252bb..a789be45a43 100644
--- a/apps/calendar/templates/part.choosecalendar.rowfields.php
+++ b/apps/calendar/templates/part.choosecalendar.rowfields.php
@@ -1,4 +1,4 @@
";
echo "" . $_['calendar']["displayname"] . " ";
- echo "t("CalDav Link") . "\" class=\"action\"> t("Download") . "\" class=\"action\"> t("Edit") . "\" class=\"action\" onclick=\"Calendar.UI.Calendar.edit(this, " . $_['calendar']["id"] . ");\"> t("Delete") . "\" class=\"action\"> ";
+ echo "t("CalDav Link") . "\" class=\"action\"> t("Download") . "\" class=\"action\"> t("Edit") . "\" class=\"action\" onclick=\"Calendar.UI.Calendar.edit(this, " . $_['calendar']["id"] . ");\"> t("Delete") . "\" class=\"action\"> ";
diff --git a/apps/calendar/templates/part.editevent.php b/apps/calendar/templates/part.editevent.php
index ae969f2dc3b..b3acfc4a072 100644
--- a/apps/calendar/templates/part.editevent.php
+++ b/apps/calendar/templates/part.editevent.php
@@ -1,6 +1,7 @@
-
+
t("Category");?>:
- ">
- ' . $category . '';
- }
- ?>
-
+ ">
+ true));
+ ?>
+
+
t("Calendar");?>:
-
- ' . $calendar['displayname'] . '';
- }
- ?>
-
+
+ 'id', 'label'=>'displayname'));
+ ?>
+
+
-
-
-
-
-
-
- t("Description");?>:
-
-
-
+
+
+
+
+
+
+
+
+
+ ">
+ true));
+ ?>
+
+
+
+
+
+
+
+
+ ">
+ true));
+ ?>
+ t('and the events day of year.'); ?>
+
+
+
+
+
+
+
+ ">
+ true));
+ ?>
+ t('and the events day of month.'); ?>
+
+
+
+
+
+
+
+ ">
+ true));
+ ?>
+
+
+
+
+
+
+
+
+ ">
+ true));
+ ?>
+ t('and the events week of year.'); ?>
+
+
+
+
+
+
+
+
+
+
+ t("Description");?>:
+
+
+
+
+
diff --git a/apps/calendar/templates/part.import.php b/apps/calendar/templates/part.import.php
index b8805e6b6ef..8f46484b42b 100644
--- a/apps/calendar/templates/part.import.php
+++ b/apps/calendar/templates/part.import.php
@@ -1,69 +1,27 @@
-">
-
">
-
">
-
t("How to import the new calendar?");?>
-
- " onclick="$('#first').css('display', 'none');$('#existingcal').css('display', 'block');">
- " onclick="$('#first').css('display', 'none');$('#newcal').css('display', 'block');">
-
-
-
t("Please choose the calendar"); ?>
-