Skip to content

Commit

Permalink
Merge pull request #166 from williamtroup/2.8.2
Browse files Browse the repository at this point in the history
2.8.2
  • Loading branch information
William Troup authored Oct 7, 2023
2 parents 1064743 + 9509133 commit e290907
Show file tree
Hide file tree
Showing 27 changed files with 312 additions and 277 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Calendar.js
[![Tweet](https://img.shields.io/twitter/url/http/shields.io.svg?style=social)](https://twitter.com/intent/tweet?text=Calendar.js%2C%20a%20free%20JavaScript%20library&url=https://github.com/williamtroup/Calendar.js&hashtags=calendar,javascript,responsive,events)
</h1>
<p align="center">One of the world's easiest, most powerful, and fully responsive JavaScript Calendars!</p>
<p align="center">v2.8.1</p>
<p align="center">v2.8.2</p>
<br />

<h1>What views does Calendar.js support?</h1>
Expand Down
2 changes: 1 addition & 1 deletion dist/calendar.binding.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*! Calendar.js v2.8.1 | (c) Bunoon | GNU AGPLv3 License */
/*! Calendar.js v2.8.2 | (c) Bunoon | GNU AGPLv3 License */
(function(documentObject) {
var _attribute_Name = "data-binding-calendar";
documentObject.addEventListener("DOMContentLoaded", function() {
Expand Down
2 changes: 1 addition & 1 deletion dist/calendar.binding.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/calendar.jquery.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*! Calendar.js v2.8.1 | (c) Bunoon | GNU AGPLv3 License */
/*! Calendar.js v2.8.2 | (c) Bunoon | GNU AGPLv3 License */
(function($) {
$.fn.calendarJs = function(options) {
var instances = [];
Expand Down
2 changes: 1 addition & 1 deletion dist/calendar.jquery.min.js
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
/*! Calendar.js v2.8.1 | (c) Bunoon | GNU AGPLv3 License */
/*! Calendar.js v2.8.2 | (c) Bunoon | GNU AGPLv3 License */
(function(b){b.fn.calendarJs=function(c){var a=[];this.each(function(){a.push(new calendarJs(this,c))});return a}})(jQuery);
17 changes: 15 additions & 2 deletions dist/calendar.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*! Calendar.js v2.8.1 | (c) Bunoon | GNU AGPLv3 License */
/*! Calendar.js v2.8.2 | (c) Bunoon | GNU AGPLv3 License */
function calendarJs(elementOrId, options, searchOptions) {
function build(newStartDateTime, fullRebuild, forceRefreshViews) {
_currentDate = isDefinedDate(newStartDateTime) ? newStartDateTime : new Date();
Expand Down Expand Up @@ -1263,6 +1263,7 @@ function calendarJs(elementOrId, options, searchOptions) {
itemClosed = true;
}
hideTooltip();
hideAllContextMenusAcrossInstances();
if (hideSearchHistoryDropDown) {
hideSearchHistoryDropDownMenu();
}
Expand Down Expand Up @@ -3085,6 +3086,18 @@ function calendarJs(elementOrId, options, searchOptions) {
}
return closed;
}
function hideAllContextMenusAcrossInstances() {
var elements = _document.getElementsByClassName("calendar-context-menu");
var elementsArray = [].slice.call(elements);
var elementsArrayLength = elementsArray.length;
var elementsArrayIndex = 0;
for (; elementsArrayIndex < elementsArrayLength; elementsArrayIndex++) {
var element = elementsArray[elementsArrayIndex];
if (element.id !== _elementID) {
element.style.display = "none";
}
}
}
function isContextMenuVisible(element) {
return element !== null && element.style.display === "block";
}
Expand Down Expand Up @@ -8898,7 +8911,7 @@ function calendarJs(elementOrId, options, searchOptions) {
return this;
};
this.getVersion = function() {
return "2.8.1";
return "2.8.2";
};
this.getId = function() {
return _elementID;
Expand Down
2 changes: 1 addition & 1 deletion dist/calendar.js.css
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Calendar.js Library v2.8.1
* Calendar.js Library v2.8.2
*
* Copyright 2023 Bunoon
* Released under the GNU AGPLv3 license
Expand Down
2 changes: 1 addition & 1 deletion dist/calendar.js.min.css

Large diffs are not rendered by default.

501 changes: 251 additions & 250 deletions dist/calendar.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/translations/calendar.translations.ar.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*! Calendar.js v2.8.1 | (c) Bunoon | GNU AGPLv3 License */
/*! Calendar.js v2.8.2 | (c) Bunoon | GNU AGPLv3 License */
var __TRANSLATION_OPTIONS = {
"dayHeaderNames": [
"الاثنين",
Expand Down
2 changes: 1 addition & 1 deletion dist/translations/calendar.translations.bn.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*! Calendar.js v2.8.1 | (c) Bunoon | GNU AGPLv3 License */
/*! Calendar.js v2.8.2 | (c) Bunoon | GNU AGPLv3 License */
var __TRANSLATION_OPTIONS = {
"dayHeaderNames": [
"সোম",
Expand Down
2 changes: 1 addition & 1 deletion dist/translations/calendar.translations.de.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*! Calendar.js v2.8.1 | (c) Bunoon | GNU AGPLv3 License */
/*! Calendar.js v2.8.2 | (c) Bunoon | GNU AGPLv3 License */
var __TRANSLATION_OPTIONS = {
"dayHeaderNames": [
"Mo",
Expand Down
2 changes: 1 addition & 1 deletion dist/translations/calendar.translations.en.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*! Calendar.js v2.8.1 | (c) Bunoon | GNU AGPLv3 License */
/*! Calendar.js v2.8.2 | (c) Bunoon | GNU AGPLv3 License */
var __TRANSLATION_OPTIONS = {
"dayHeaderNames": [
"Mon",
Expand Down
2 changes: 1 addition & 1 deletion dist/translations/calendar.translations.es.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*! Calendar.js v2.8.1 | (c) Bunoon | GNU AGPLv3 License */
/*! Calendar.js v2.8.2 | (c) Bunoon | GNU AGPLv3 License */
var __TRANSLATION_OPTIONS = {
"dayHeaderNames": [
"Lun",
Expand Down
2 changes: 1 addition & 1 deletion dist/translations/calendar.translations.fr.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*! Calendar.js v2.8.1 | (c) Bunoon | GNU AGPLv3 License */
/*! Calendar.js v2.8.2 | (c) Bunoon | GNU AGPLv3 License */
var __TRANSLATION_OPTIONS = {
"dayHeaderNames": [
"Lun",
Expand Down
2 changes: 1 addition & 1 deletion dist/translations/calendar.translations.hi.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*! Calendar.js v2.8.1 | (c) Bunoon | GNU AGPLv3 License */
/*! Calendar.js v2.8.2 | (c) Bunoon | GNU AGPLv3 License */
var __TRANSLATION_OPTIONS = {
"dayHeaderNames": [
"सोमवार",
Expand Down
2 changes: 1 addition & 1 deletion dist/translations/calendar.translations.ja.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*! Calendar.js v2.8.1 | (c) Bunoon | GNU AGPLv3 License */
/*! Calendar.js v2.8.2 | (c) Bunoon | GNU AGPLv3 License */
var __TRANSLATION_OPTIONS = {
"dayHeaderNames": [
"月",
Expand Down
2 changes: 1 addition & 1 deletion dist/translations/calendar.translations.pl.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*! Calendar.js v2.8.1 | (c) Bunoon | GNU AGPLv3 License */
/*! Calendar.js v2.8.2 | (c) Bunoon | GNU AGPLv3 License */
var __TRANSLATION_OPTIONS = {
"dayHeaderNames": [
"Pn",
Expand Down
2 changes: 1 addition & 1 deletion dist/translations/calendar.translations.pt.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*! Calendar.js v2.8.1 | (c) Bunoon | GNU AGPLv3 License */
/*! Calendar.js v2.8.2 | (c) Bunoon | GNU AGPLv3 License */
var __TRANSLATION_OPTIONS = {
"dayHeaderNames": [
"Seg",
Expand Down
2 changes: 1 addition & 1 deletion dist/translations/calendar.translations.tr.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*! Calendar.js v2.8.1 | (c) Bunoon | GNU AGPLv3 License */
/*! Calendar.js v2.8.2 | (c) Bunoon | GNU AGPLv3 License */
var __TRANSLATION_OPTIONS = {
"dayHeaderNames": [
"Pzt",
Expand Down
2 changes: 1 addition & 1 deletion dist/translations/calendar.translations.zh.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*! Calendar.js v2.8.1 | (c) Bunoon | GNU AGPLv3 License */
/*! Calendar.js v2.8.2 | (c) Bunoon | GNU AGPLv3 License */
var __TRANSLATION_OPTIONS = {
"dayHeaderNames": [
"周一",
Expand Down
6 changes: 6 additions & 0 deletions docs/CHANGE_LOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Calendar.js - Change Log:

## Version 2.8.2:
- Fixed a fault that prevented the context menus on other calendar instances from closing when another context menu is opened.

<br>


## Version 2.8.1:
- In Widget mode, if the date is the current date, the widget will jump to the next day automatically when the day changes.
- Events in the Full Day/Week views can no longer be resized over the height of the day.
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "jcalendar.js",
"title": "Calendar.js",
"description": "A javascript drag & drop event calendar, that is fully responsive and compatible with all modern browsers.",
"version": "2.8.1",
"version": "2.8.2",
"main": "dist/calendar.js",
"homepage": "https://williamtroup.github.io/Calendar.js/",
"author": {
Expand Down
2 changes: 1 addition & 1 deletion src/calendar.binding.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* A javascript drag & drop event calendar, that is fully responsive and compatible with all modern browsers.
*
* @file calendar.binding.js
* @version v2.8.1
* @version v2.8.2
* @author Bunoon
* @license GNU AGPLv3
* @copyright Bunoon 2023
Expand Down
2 changes: 1 addition & 1 deletion src/calendar.jquery.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* A javascript drag & drop event calendar, that is fully responsive and compatible with all modern browsers.
*
* @file calendar.jquery.js
* @version v2.8.1
* @version v2.8.2
* @author Bunoon
* @license GNU AGPLv3
* @copyright Bunoon 2023
Expand Down
19 changes: 17 additions & 2 deletions src/calendar.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* A javascript drag & drop event calendar, that is fully responsive and compatible with all modern browsers.
*
* @file calendar.js
* @version v2.8.1
* @version v2.8.2
* @author Bunoon
* @license GNU AGPLv3
* @copyright Bunoon 2023
Expand Down Expand Up @@ -2570,6 +2570,7 @@ function calendarJs( elementOrId, options, searchOptions ) {
}

hideTooltip();
hideAllContextMenusAcrossInstances();

if ( hideSearchHistoryDropDown ) {
hideSearchHistoryDropDownMenu();
Expand Down Expand Up @@ -4973,6 +4974,20 @@ function calendarJs( elementOrId, options, searchOptions ) {
return closed;
}

function hideAllContextMenusAcrossInstances() {
var elements = _document.getElementsByClassName( "calendar-context-menu" ),
elementsArray = [].slice.call( elements ),
elementsArrayLength = elementsArray.length;

for ( var elementsArrayIndex = 0; elementsArrayIndex < elementsArrayLength; elementsArrayIndex++ ) {
var element = elementsArray[ elementsArrayIndex ];

if ( element.id !== _elementID ) {
element.style.display = "none";
}
}
}

function isContextMenuVisible( element ) {
return element !== null && element.style.display === "block";
}
Expand Down Expand Up @@ -12604,7 +12619,7 @@ function calendarJs( elementOrId, options, searchOptions ) {
* @returns {string} The version number.
*/
this.getVersion = function() {
return "2.8.1";
return "2.8.2";
};

/**
Expand Down
2 changes: 1 addition & 1 deletion src/calendar.js.scss
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Calendar.js Library v2.8.1
* Calendar.js Library v2.8.2
*
* Copyright 2023 Bunoon
* Released under the GNU AGPLv3 license
Expand Down

0 comments on commit e290907

Please sign in to comment.