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

Open
georgehrke opened this Issue Sep 17, 2016 · 9 comments

Comments

Projects
None yet
4 participants
@georgehrke
Member

georgehrke commented Sep 17, 2016


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

@georgehrke

This comment has been minimized.

Show comment
Hide comment
@georgehrke

georgehrke Sep 17, 2016

Member

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

Member

georgehrke commented Sep 17, 2016

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

This comment has been minimized.

Show comment
Hide comment
@georgehrke

georgehrke Sep 20, 2016

Member

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

Member

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

This comment has been minimized.

Show comment
Hide comment
@georgehrke

georgehrke Oct 13, 2016

Member

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

Member

georgehrke commented Oct 13, 2016

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

This comment has been minimized.

Show comment
Hide comment
@eppfel

eppfel Oct 27, 2016

Member

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

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

This comment has been minimized.

Show comment
Hide comment
@georgehrke

georgehrke Oct 27, 2016

Member

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

Member

georgehrke commented Oct 27, 2016

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

This comment has been minimized.

Show comment
Hide comment
@eppfel

eppfel Oct 27, 2016

Member

Ah, ok. Thanks for the clarification. 😊

Member

eppfel commented Oct 27, 2016

Ah, ok. Thanks for the clarification. 😊

@ximex

This comment has been minimized.

Show comment
Hide comment
@ximex

ximex Aug 10, 2017

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

ximex commented Aug 10, 2017

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

@georgehrke

This comment has been minimized.

Show comment
Hide comment
@georgehrke

georgehrke Aug 10, 2017

Member

It's assigned to the 1.7 milestone ;)

Member

georgehrke commented Aug 10, 2017

It's assigned to the 1.7 milestone ;)

@nloomans

This comment has been minimized.

Show comment
Hide comment
@nloomans

nloomans 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!

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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment