Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

make calendar-list sortable #9

Closed
georgehrke opened this issue Sep 17, 2016 · 12 comments · Fixed by #2244
Closed

make calendar-list sortable #9

georgehrke opened this issue Sep 17, 2016 · 12 comments · Fixed by #2244
Assignees
Labels
2. developing Work in progress design Related to design, interface, interaction design, UX, etc. enhancement New feature request Feature: Calendar list skill:frontend Issues and PRs that require JavaScript/Vue/styling development skills
Milestone

Comments

@georgehrke
Copy link
Member

georgehrke commented Sep 17, 2016


Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

@georgehrke georgehrke added 1. to develop Accepted and waiting to be taken care of design Related to design, interface, interaction design, UX, etc. enhancement New feature request skill:frontend Issues and PRs that require JavaScript/Vue/styling development skills Feature: Calendar list labels Sep 17, 2016
@georgehrke
Copy link
Member Author

This looks nice: https://github.com/RubaXa/Sortable
Comes without jQuery \o/

@georgehrke georgehrke added this to the 1.5-current milestone Sep 17, 2016
@georgehrke
Copy link
Member Author

georgehrke commented Sep 20, 2016

Hm, there is one issue with this feature.
We are currently not able to change the name, color, and also not the order of a shared calendar. We are able to set custom DAV properties though.

In the long run we need to fix this issue in core. (nextcloud/server#1463)

For now there are different possible solutions:

  • store all order properties in a custom DAV property.
  • store only the shared calendar order property in a custom DAV property

cc @tcitworld

@georgehrke
Copy link
Member Author

Blocked by this stupid line of code ...
https://github.com/nextcloud/server/blob/master/apps/dav/lib/CalDAV/Calendar.php#L179

we should fix nextcloud/server#1463 first ...
Postponing to some NC11+ release

@georgehrke georgehrke modified the milestones: 1.7.0, 1.5.0-current Oct 13, 2016
@eppfel
Copy link
Member

eppfel commented Oct 27, 2016

I unsure, if order should be stored in DAV. Isn't this a particular feature of this app?

@georgehrke
Copy link
Member Author

I unsure, if order should be stored in DAV. Isn't this a particular feature of this app?

Storing the actual order property is the job of the dav app, but I want to make the calendar list sortable. So the calendar client needs to be able to tell the server which order the user wants

@eppfel
Copy link
Member

eppfel commented Oct 27, 2016

Ah, ok. Thanks for the clarification. 😊

@ximex
Copy link

ximex commented Aug 10, 2017

nextcloud/server#1463 is fixed. Any updates here?

@georgehrke
Copy link
Member Author

It's assigned to the 1.7 milestone ;)

@nloomans
Copy link

nloomans commented May 22, 2018

If anyone with the required technical skills wants a workaround, you can manually set the order in the database.

First, connect to the database. If you don't know how to do this then this guide unfortunately isn't for you.

You can view all your calanders using SELECT * FROM nextcloud.oc_calendars;

+----+---------------------------+-------------------+---------------------+-----------+-------------+---------------+---------------+----------+--------------+-------------+
| id | principaluri              | displayname       | uri                 | synctoken | description | calendarorder | calendarcolor | timezone | components   | transparent |
+----+---------------------------+-------------------+---------------------+-----------+-------------+---------------+---------------+----------+--------------+-------------+
|  2 | principals/system/system  | Contact birthdays | contact_birthdays   |         1 | NULL        |             0 | #FFFFCA       | NULL     | VEVENT,VTODO |           0 |
|  3 | principals/users/nloomans | School            | school              |       241 | NULL        |             0 | #e774ca       | NULL     | VEVENT,VTODO |           0 |
|  5 | principals/users/nloomans | Persoonlijk       | persoonlijk         |         7 | NULL        |             0 | #78e774       | NULL     | VEVENT,VTODO |           0 |
|  6 | principals/users/nloomans | School toets      | school-toets        |         7 | NULL        |             0 | #e78074       | NULL     | VEVENT,VTODO |           0 |
+----+---------------------------+-------------------+---------------------+-----------+-------------+---------------+---------------+----------+--------------+-------------+

Here, I want "Persoonlijk" to be above everything else. To do that, I first have to move the rest down (you can not have negative orders).

UPDATE nextcloud.oc_calendars SET calendarorder=1;

Now I can set the order of the one you want to be first to zero:

UPDATE nextcloud.oc_calendars SET calendarorder=0 WHERE id=5;

And you are done! Simply reload the page and you should see the calendars reordered!

@biva
Copy link

biva commented Mar 28, 2019

Hello, any update here? If I put a new order following @nloomans trick, does the first one become the default calendar to receive invitations?

@readonly24
Copy link

I just upgraded to Nextcloud 17 and I was hoping that I can sort my calendars by name, but unfortunately I can't.

Isn't it that easy as put a value in the column calendarorder?

@georgehrke
Copy link
Member Author

Isn't it that easy as put a value in the column calendarorder?

Not quite that simple, but if you would be interested in sending a pull-request i would be happy to give a more detailed explanation how to implement this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
2. developing Work in progress design Related to design, interface, interaction design, UX, etc. enhancement New feature request Feature: Calendar list skill:frontend Issues and PRs that require JavaScript/Vue/styling development skills
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants