Code Monkey home page Code Monkey logo

Comments (12)

nloomans avatar nloomans commented on August 26, 2024 19

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!

from calendar.

georgehrke avatar georgehrke commented on August 26, 2024 3

It's assigned to the 1.7 milestone ;)

from calendar.

georgehrke avatar georgehrke commented on August 26, 2024 1

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

from calendar.

georgehrke avatar georgehrke commented on August 26, 2024

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

from calendar.

georgehrke avatar georgehrke commented on August 26, 2024

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

from calendar.

georgehrke avatar georgehrke commented on August 26, 2024

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

from calendar.

eppfel avatar eppfel commented on August 26, 2024

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

from calendar.

eppfel avatar eppfel commented on August 26, 2024

Ah, ok. Thanks for the clarification. 😊

from calendar.

ximex avatar ximex commented on August 26, 2024

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

from calendar.

biva avatar biva commented on August 26, 2024

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

from calendar.

readonly24 avatar readonly24 commented on August 26, 2024

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?

from calendar.

georgehrke avatar georgehrke commented on August 26, 2024

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.

from calendar.

Related Issues (20)

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.