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

Richer Calendar colors options #135

Open
elioqoshi opened this issue Feb 8, 2016 · 15 comments
Open

Richer Calendar colors options #135

elioqoshi opened this issue Feb 8, 2016 · 15 comments

Comments

@elioqoshi
Copy link

The owncloud calendar app currently offers 33 colors to assign to calendars. I have linked Thunderbird's lightning calendar addon via CalDav with owncloud and I'm able to choose any color from the RGB spectrum for calendars in Thunderbird, while my choice is limited to 33 colors in owncloud.

This might not be something major, but sometimes it's useful to have a specific color code for a calendar (I separate my calendars by organizations for example).

Does this make sense?

@georgehrke
Copy link
Contributor

Let's use an html5 color input.
Webkit Nightly builds already supports it, so Safari will probably support it somewhat soon as well

http://caniuse.com/#feat=input-color

@georgehrke
Copy link
Contributor

Still no support for input color in safari 9.1 😞

@georgehrke
Copy link
Contributor

Putting on hold till Safari supports input color

@georgehrke georgehrke removed this from the 1.2-next milestone Apr 11, 2016
@georgehrke
Copy link
Contributor

Let's just check if input color is supported and only show the advanced input otherwise.

@georgehrke georgehrke added this to the 1.3-next milestone May 10, 2016
@georgehrke georgehrke modified the milestones: 1.3-current, 1.4-next (ownCloud 9.1) Jul 6, 2016
@georgehrke georgehrke modified the milestones: 1.6, 1.4-current Aug 14, 2016
@laspic
Copy link

laspic commented Sep 2, 2016

Hello. I'm following this issue with a lot of interest. I'm also annoyed by the lack of available colors, so I'm very impatient to be able to add one with a specific color code.
Meanwhile, may I ask something ? Why here elioqoshi says that "owncloud calendar app currently offers 33 colors to assign to calendars" ? Personally, I can only choose between 9 colors. Have I misunderstood something ?
(OC 9.1 ; Calendar app 1.3.3)

@tcitworld
Copy link
Member

There's now a random color button. #701

@laspic
Copy link

laspic commented Sep 3, 2016

I've seen that. Nice improvement, even if it doesn't match with my needs (in particularly, I've never managed with it to get a gray and, from what i can see, the "random" always choose a new color in the same pastel palette). So, it's still easier for me to personalize color agenda via PhpMyAdmin.
What about these 33 colors ?

@d-tamm
Copy link

d-tamm commented Oct 15, 2016

For me, the random button just goes through the preselected standard colors, it does not add more colors. I think the 33 colors refer to an earlier version of owncloud. In the current version 9.0.5, I get 8 (not 9) colors in the color picker. Btw, great workaround to go in via phpMyAdmin and adjust colors there :)

felixheidecke pushed a commit that referenced this issue Oct 21, 2016
@protist
Copy link

protist commented Dec 2, 2016

There used to be a workaround a few versions ago. Users could edit /var/www/owncloud/apps/calendar/lib/calendar.php manually, but this file seems to have disappeared. Does anyone know where this file is now? I still have leftover custom colours, but I can't find them anywhere.

@EtlamGit
Copy link
Contributor

EtlamGit commented Dec 11, 2016

You have to put them to ./apps/calendar/js/public/app.js somewhere around line 5875.
About half a year ago it was also possible to do this via a theme. But it seems to be not supported anymore.

Also here the random button just jumps randomly in these 8 colors. So quite useless in my point of view.

Defining more colors like in PullRequest #60 was not accepted, so it would be very nice to have some kind of arbitrary color picker. For me it would be sufficient, if I could define my own set of colors via a (company) theme again.

@protist
Copy link

protist commented Dec 12, 2016

Thanks @EtlamGit. I found the line, and modified it as below

--- /var/www/owncloud/apps/calendar/js/public/app.js.factory_default	2016-12-12 19:52:38.109146413 +1100
+++ /var/www/owncloud/apps/calendar/js/public/app.js	2016-12-12 20:03:00.848151134 +1100
@@ -5871,7 +5871,7 @@
 			self.colors.push(self.rgbToHex(self._hslToRgb(hsl)));
 		});
 	} else {
-		this.colors = ['#31CC7C', '#317CCC', '#FF7A66', '#F1DB50', '#7C31CC', '#CC317C', '#3A3B3D', '#CACBCD'];
+                this.colors = ['#377EB8', '#4DAF4A', '#E41A1C', '#FF7F00', '#984EA3', '#17E3DD', '#999999', '#555555'];
 	}
 });

However, after restarting apache2, and even restarting for good measure, the colour picker looked the same as before.

I also agree that a arbitrary colour picker would be very useful.

@EtlamGit
Copy link
Contributor

I always fall into that trap also... This is caused by the fact, that scripts (.js) and style (.css) are cached in your browser, but the content (*.html, *.php) not. Just press CTRL-F5 to force a complete reload.
Restarting apache is not necessary. You could also change this code while being logged into your cloud.

@protist
Copy link

protist commented Dec 12, 2016

In the past I've held Shift and clicked the refresh button. However, I tried both of these, and the colour picker still didn't change. Searching the web suggested that both of these should do the same thing.

@EtlamGit
Copy link
Contributor

Yes, you are right. My solution is working only with the 9.0.x branch. The latest 9.1.x branch is using HSL defined default colors. So you have to do a two-step to get 'your' colors:

  • a little above the line I mentioned earlier is the declaration var hashValues [...]. Remove all colors there (and revert your previous changes 6 lines below also.)
  • insert your colors near line 5743 where you find another this.colors

@protist
Copy link

protist commented Jan 4, 2017

@EtlamGit Apologies for the delay in replying. Hope you had a good holiday too! 😁 Thank you very much for your response; it works perfectly for me. Cheers.

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

No branches or pull requests

7 participants