Coder Social home page Coder Social logo

mendixlabs / calendarwidget Goto Github PK

View Code? Open in Web Editor NEW
9.0 23.0 28.0 11.08 MB

This is a calendar widget for Mendix. It shows a Calendar and can render objects as events in it.

Home Page: https://appstore.home.mendix.com/link/app/248/Mendix/Calendar-widget

License: Apache License 2.0

Java 0.10% JavaScript 99.89% CSS 0.01%
mendix-widget mendix

calendarwidget's People

Contributors

achiel avatar allardbrand avatar andries-smit avatar arjenlammers avatar chadevansmx avatar chrisdeg avatar gredens avatar j3lte avatar jeltemx avatar mxpvdk avatar rcatersels avatar roelandsalij avatar rvthof avatar shott avatar tieniber avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

calendarwidget's Issues

Calendar week view wrong

In the test-project, the Calendar week view shows wrong dates (Nov 0, Nov 1, Dec 2). Need to check whether this has to do with the test-project, the widget itself or the calendar library

titleAttr as an optional reference.

If I understand correctly, prior to Mendix 5 (approximately) the Calendar widget supported titleAttr values that were either simple attributes or references. I believe that I am not alone in wishing for the capability. Also, by using the isPath="optional", I believe that this capability can be added without disrupting anyone who is currently using a simple attribute as the titleAttr.

Based on suggestions from the Forum, I've implemented this by adding a "prepareEvents()" method that precedes the "createEvents()" method. If the titleAttr is a reference, the createEvents() method does a mx.processor.get() to asynchronously get the data and then, once it has titles, calls createEvents() to actually prepare the events for display on the calendar.

Note: These changed files are based on the latest tagged version of Calendar-Widget that is, I believe, version 2.3.1.

Finally, I have also made minor changes to both calendar.xml and calendar.js that expose two addtional properties that are used by fullcalendar, but that had not bee previously visible to the Mendix calendar widget: axisFormat and slotMinutes. The axisFormat (that defaults to h(:mm)tt) is not appropriate if someone wants to use the 24-hour clock for all times. The axisFormat controls the vertical time axis that appears on the left of the calendar in day, week, and agenda views. The other property that I have made settable is the slotMinutes property that defaults to 30 minutes and controls the display increment in the calendar and, with "drag and drop" use of the calendar to create and/or alter calender events also controls the minimum reservable time. By exposing this propertly, on can display a "higher resolution" Calendar if it is set fo 10 or 15 minutes instead of the default 30 minutes.

Note: I have created a branch that is named (I think) titleAttr_as_reference, committed changes to calendar.xml and calendar.js in that branch and submitted a "Pull Request". I hope that I am following the proper protocol for this.

Thanks you,

John Shott -- [email protected]

Cant seem to make it work with serenity

Hello. Sorry to bug you but I'm trying to adapt this to a serenity that I have in visual studio and can't make it work. WOuld you be able to possibly help ?

Start position not refreshing

Hi, I'm using the calendar widget to show one day that is preferred using an attribute configured in the "start pos". It works fine when I create a new object. It shows my selected date. The problem is that it doesn't refresh when I change the date (there is an on change microflow running that does a refresh).

image

Working With Non-persistent Entities

Hi,
When the entities that are chosen for event entity and dataview entity are non-persistent, the following error message appears in the Mendix Studio Pro 8.18.1 console:
error.txt
Is it possible to utilize non-persistent entities via this widget ?

Start time does not work

Setting the start time on the agendaweek view does not cause the calendar to scroll to that time.

This is also visible in the test project for the Agendaweek test case.

It only works when the calendar is in a single dataview without any other content on the page.

Support of non-persistent entities

Not always the appointments are in the database because of real-time aggregations which is pushed to non-persistent entities. Please change the Calendar definition XML that the 'eventEntity' and 'contextEntity' are allowed for non-persistent entities.
Locally I've changed it and the widget (javascript) already works with non-persistent entities, but you as developer must keep in mind of the context.

calendar.zip

Refresh on Tab

Hi,

I use the calendar widget on a tab. When I put it on the first tab it is working correct, when I put it on any other tab, the calendar itself won't show at first. Only after hitting the today, day, week or another button will the calendar appear.

It is furthermore showing the same object multiple times. This starts with 2 times, and then 3, maybe 4, switch back to 3. It does not seem to be consistent behavior. This also only happens when the calendar is not on the first tab.

Kind regards,

Jeroen

Weekend toggle

Is it possible to have a weekend toggle button for showing or hiding Saterdays an Sundays?

I see the property 'Show Weekends'but this is a static setting.

Best regards,
Patrick Verhoeven - Appronto

Update to new view specific settings format

It seems the current version of Full Calendar uses a new format to enter view specific options.
Haven't confirmed it, but it seems this is already present in the version the widget uses as well.

We should update to the newest Full Calendar and make it fit this new format.

http://fullcalendar.io/docs/views/View-Specific-Options/

More specifically, this seems to give troubles when using both the Custom Date/Time Format and using View specific formats for these, which results in the view specific formats never been seen/used.

I've fixed the errors that these lead to in c749e97, but the actual problem still persists. It just doesn't break the widget anymore for now.

First day of week configurable

Hi,

Would it be possible to make the first day of week a configurable attribute of for example the dataview context entity? Maybe the Height could also be made configurable.

Kind regards,

Jeroen Pot

Mx7 construct error on widget

Hi, I tried running the widget in mx v7 and got the 'No constructor found for widget' error. Could you please upgrade it as we need to use it for our project. I have used it previously and its a great widget overall.
If you need contact me please feel free to do so on [email protected] for any testing that might be require.d

Thanks in advance,

Savan

axisFormat has disappeared ...

As reported on the forum, the axisFormat (that controls the format of the left time axis in the agenda modes) has disappeared. It was in the versions that were committed on February 27, 2015, but missing in the version committed on March 2, 2015.

It looks as if this was an oversight, rather than an intentional omission, as there is no mention of it having been dropped. For anyone used to seeing times in 24-hour format, this is a useful configuration option that is fully supported by the underlying fullcalendar widget.

If I get a chance, I will try to add these back in myself and create a pull request.

Thanks,

John

Entries not visible when specifying all day boolean

If upgraded to the last version (5.4.2) and at first I could not see the calendar entries that were visible before the upgrade. After checking the different configuration options for the calendar widget, I found out that my calendar entries were not visible because I had specified a boolean for the all day event. After removing this option (selected 'None'), all calendar entries were visible again.

After some testing I have found out that this problem only seems to happen with non all day events. Calendar entries for all day events were also visible when a boolean had been selected for the all day event, but the other entries were no longer visible. Apparently there is an issue with this option for non all day events.

Calendar Widget Start Position not working as intended

https://mxforum.mendix.com/questions/7397/Calendar-Widget-Start-Position-not-working-as-intended

I found a solution for your problem. Turned out it is a bug in the calendar widget. Follow the steps below to fix the problem.

Go to the widgets directory (root of the project probably).
Extract Calendar.mpk.
Open calendar.js inside the extracted Calendar>calendar>widget folder.
Search for the _renderCalendar function.
Inside this function there's a comment that starts with //go to the startposition if we have one and below the comment there's an if with something like if (this._mxObj && ....
Copy the comment and the complete if below.
Search for update : function(obj, callback) {.
Paste the copied part of the code right below this._fetchObjects(); inside the function.

Inconsistent Flow/firing of microflows

In general the flow/moment of firing of microflows has changed:

  1. Datasource: Microflow with context, Dataview context: NO reference to renderview, Viewchange: microflow defined => viewchange microflow NEVER gets triggered, before that it was always triggered.
  2. Datasource: Microflow with context, Dataview context: reference to renderview ADDED, Viewchange: microflow defined => navigating to widget first time this microflow is NOT triggered, when changing the view it still is.
  3. Datasource: Microflow with context (Retrieve events for each view), Dataview context: ADDED reference to renderview, navigating to widget first time this microflow is NOT triggered, when changing the view it still is.
    Jelte considered the first to be a bug, and would discuss the other ones with the developer.

Fix deprecations

Output from deprecations check:

==========================
Calendar widget v4.5  //  Calendar.mpk // calendar/widget/calendar.js
==========================
Possible violations: 5

Violations:
line:213 // column:18 // deprecation:[ mendix.lib.MxObject#getGUID ]
{
    "match": "\t\t\t\t\tobjTitles[obj.getGUID()] = obj.get(this.titleAttr);\r",
    "solution": "mendix/lib/MxObject#getGuid"
}

line:220 // column:18 // deprecation:[ mendix.lib.MxObject#getAttribute ]
{
    "match": "\t\t\t\t\tthisRef = obj.getAttribute(split[0]);\r",
    "solution": "mendix/lib/MxObject#get"
}

line:221 // column:18 // deprecation:[ mendix.lib.MxObject#getGUID ]
{
    "match": "\t\t\t\t\tobjTitles[obj.getGUID()] = thisRef;\r",
    "solution": "mendix/lib/MxObject#getGuid"
}

line:239 // column:27 // deprecation:[ mendix.lib.MxObject#getGUID ]
{
    "match": "\t\t\t\t\t\t\trefTitles[refObjs[i].getGUID()] = refObjs[i].get(split[2]);\r",
    "solution": "mendix/lib/MxObject#getGuid"
}

line:278 // column:23 // deprecation:[ mendix.lib.MxObject#getGUID ]
{
    "match": "\t\t\t\t\t\ttitle: titles[obj.getGUID()],\r",
    "solution": "mendix/lib/MxObject#getGuid"
}

Deprecations need to be fixed before next major MX release

Weekview / dayview - display end time not in 24 hour

In the month view the end time presentation is ok (16.00):
calendar month view ok

In the week and day view the end time presentation is not ok (4:00):
calendar week and day view not ok

I tried different custom time formats but it didn't help. Here the current properties in Mendix:
calendar mendix properties

Please help.

Regards,
René Smits

Changing to an association with no events does not clear calendar

Per a discussion on MX forums:

The problem:
I am using the calendar widget with Xpath retrieve. In the dataview where I have the calendar widget, I have attributes that can be switched on and off via checkboxes to filter the events that appear in the calendar. The checkboxes have an onchange microflow that repopulates the association used to retrieve events for the calendar. When the set of checkboxes selected returns events, this all works fine, i.e. the user checks or unchecks attributes and the events refresh as they should with fewer or more events. However, when the set of events retrieved is empty, and the corresponding association is set to empty, the events that were displayed in the calendar widget are not removed. So the user sees events in the calendar widget when there should be no events. This only happens in the case where no events are retrieved because the set of conditions is too restrictive.

The suggested fix:
https://github.com/mendix/Calendar/blob/master/src/calendar/widget/calendar.js#L229 On line 229, if the length of the events list is 0 or null, the function returns and nothing changes. It should probably be wiping all events from the calendar in this case, with a line like this: this._clearCalendar();

Mike Kumpf implemented this suggested solution and says it's working.

Until and including functionality

Currently, this widget displays multi-day events as 'until', which means that the last day is not marked as part of the event. Can you please add a toggle to switch this to 'until and including', which allows me to have the last day included in the event?

Show weekend options

Hello,
I can't make it work. Do you have the same issue?
I am able to change the start pos attribute as well as the first day of the week.
Therefore I think I am doing it the right way.
Nico

Timezone issue

  1. Open and run the testproject
  2. Click on a day (for example April first)
  3. The new event microflow is called

Result:
Startdate: 4/1/2015, 2:00 AM
Enddate: 4/2/2015, 2:00 AM

Expected result:
Startdate: 4/1/2015, 12:00 AM
Enddate: 4/2/2015, 12:00 AM

Cannot read property ....

Currently, I now get this error which is only visible in the Console of the browser, whenever I try to use the Microflow with context object (Retrieve events for each view) or Viewchange microflow
viewmendix.sys.Data.get: error in handler for [39125021762794985] : Cannot read property 'getGuid' of undefined (anonymous function) @ mxui.js:29
or
mendix.sys.Data.get: error in handler for [39125021762794985] : Cannot read property 'set' of undefined (anonymous function) @ mxui.js?635857954667837458:29

Error when trying to execute "onclick" microflow locally

This issue only occurs locally. Everything works as expected in the test environments and production. When clicking on a calendar item and trying to execute the "onclick" microflow, I get an uncaught JSON error regarding circular references.

Here is the exact error:
Uncaught TypeError: Converting circular structure to JSON
at JSON.stringify ()
at mxui.js?636591479055210948:1
at Array.map ()
at console.t.(:8080/anonymous function) [as debug] (http://localhost:8080/mxclientsystem/mxui/mxui.js?636591479055210948:1:681172)
at Object.debug (mxui.js?636591479055210948:1)
at O.(:8080/anonymous function).E._onEventClick (http://localhost:8080/widgets/calendar/widget/calendar.js?636591479055210948:362:20)
at HTMLAnchorElement. (mxui.js?636591479055210948:1)
at Calendar_constructor.trigger (fullcalendar.js?636591479055210948:9975)
at members.constructor.trigger (fullcalendar.js?636591479055210948:7917)
at members.constructor.handleSegClick (fullcalendar.js?636591479055210948:4225)
(anonymous) @ mxui.js?636591479055210948:1
t.(anonymous function) @ mxui.js?636591479055210948:1
debug @ mxui.js?636591479055210948:1
_onEventClick @ calendar.js?636591479055210948:362
(anonymous) @ mxui.js?636591479055210948:1
trigger @ fullcalendar.js?636591479055210948:9975
trigger @ fullcalendar.js?636591479055210948:7917
handleSegClick @ fullcalendar.js?636591479055210948:4225
(anonymous) @ fullcalendar.js?636591479055210948:4218
dispatch @ jquery.js?636591479055210948:4435
elemData.handle @ jquery.js?636591479055210948:4121

This may be related (or not): but I get this warning everytime the calendar loads:
mxui.js?636591479055210948:1 mendix.lib.MxObject(LabManagement.ParticipantSchedule:43065671436736515).get: No attribute

Leap year and agenda week view

Hi,

In the test project, when I use agenda week view it does not display correctly, probably because of the leap year.

image

Start view not working

With the new release (5.3.x) the start view is not working, if you set different views. This was mentioned in #45

Conditional loading

@JelteMX

I have added the calendar scheduler to the calendar widget. Only the scheduler is paid, so I would like to conditionally load the scheduler JS so the message only shows when you enable the feature.

I have looked around on the web but have not been able to conditionally add requires to the global scope. Do you know a way how to do this?

Start position not refreshing

Hi,

I posted this on the Mendix forum as well:

This week we upgraded our app from modeler 5.21.1 to 6.8.1. During this upgrade we had to update the calendar widget as well. We used version 4.2.4 and now we have the latest version. However, we now have the following issue with the calendar:

We use the calendar inside a dataview, so we have a dataview data source microflow. When the dataview is refreshed the data source microflow is called and new objects to show in the calendar are retrieved. However, the start position of the calendar does not change and the newly retrieved object can not be seen. The start position attibute used in the widget is shown in the dataview and they are not the same.

So, it looks like the calendar widget is refreshing when the dataview is refreshed (because the data source microflow is called again), but the start position of the calendar does not refresh. This was working fine in modeler 5.21.1 with widget version 4.2.4.

Business Hours

I don't believe the business hours restriction is working. (Mendix v 7.13.1)

Timeline Views weekly, mothly and yearly not available

Currently it´s not possible to have a timeline week /month / year view. It is possible to see a timeline day and timeline 3 days view but we need the other views for our current project. We already checked it´s available in fullcalendar.js v3.8 but you can not select it from within the widget configuration. We assume the only thing that is missing is the selection option under "Extras".
We know it´s a long time ago since you updated the widgett but it would be great if you could help us!

Max number of appointments shown on same day in Month view

When more than three appointments are planned on the same day, the height of the box increases. In the FullCalendar demo, the height of the box does not change. The appointments that are not shown in the box, can be viewed by clicking on "+[#] more".

FullCalendar demo:
image

CalendarWidget:
image

Calendar widget with scheduler doesn't work appropriately

I installed the calendar widget, the one with the Full Calendar jQuery plugin in my application. When I use the calendar view with scheduler, I can change the start time and end time of a reservation by dragging the meeting. The new timings of a reservation are then also changed in the database. However, this is not possible with dragging a reservation to a different resource. It just jumps right back to the original resource. In other words, it doesn't update the resource change in the database.
Do you have a way to make this work?

Calendar not shown in Tab Container

Calendar is not shown in Tab Container. The buttons "Today", "Previous" and "Next" are shown. Same for calendar in Group box which starts collapsed.
image

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.