Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Max 14 posts 44 karma points
    Feb 21, 2014 @ 14:17
    Max
    0

    Can't make it works

    Hi there!

    It's good to have independent Color picker for v.7 as True Color picker doesn't work here, but what did I do wrong with instalaltion:

    - I used "Install local package";
    - Restarted App pool and clear cache;
    - Got new "Spectrum color picker" Data type;
    - Created generic property;
    - have this then: http://screencast.com/t/Z4n2xdbaDTZj
    - and these js errors: http://screencast.com/t/TGvDkfsnXJ4

  • Tom 116 posts 442 karma points
    Mar 06, 2014 @ 13:10
    Tom
    0

    hi, max

    did you get it to work?

  • Max 14 posts 44 karma points
    Mar 06, 2014 @ 13:35
    Max
    0

    Hi Tom!

    Yes, it works now! I don't know what it was, but when I start new Umbraco 7 installation (before, it was the same, but for "playing") it works just fine!
    Thanks! 

  • Max 14 posts 44 karma points
    Mar 31, 2014 @ 07:25
    Max
    0

    Hi Tom!
    I have experienced this issue/error again with angular js error: http://screencast.com/t/UHq02mbhp

    Earlier, when I said it works - I worked at localhost, but now, when I move website to live server, it does not :(

    P.S.: I cleared cache twice, but it's not helped

  • Tom 116 posts 442 karma points
    Mar 31, 2014 @ 08:34
    Tom
    0

    when clearing the cache, did you change the web.config to do it?

  • Max 14 posts 44 karma points
    Mar 31, 2014 @ 08:57
    Max
    0

    I'm not sure, I understood about web.config...

    I have captured video to show you what I do: http://screencast.com/t/k9zy4gPO8

    As you can see, plugin works with debug=true, but does not with false.

    And - what is MOST worse for me - I need to deliver own Umbraco package (wit hincluded datatypes, doctypes, etc) to end-customer and when he gets it, he just install it for clean Umbraco. Customer doesn't have access to web.config or else resources. In "ideal way", he just install it and get ready solution :(

    But, for now, when I install package to clean Umbraco (as you see from video), color picker doesn't work (else is fine)

  • Robert Foster 416 posts 1572 karma points MVP admin c-trib
    Apr 03, 2014 @ 03:37
    Robert Foster
    100

    Hi, firstly sorry for being AWOL - very busy period the last couple of weeks.  One thing that may help when adding this and other AngularJS based plugins would be to add debug="true" to your web.config file like so:

    <compilation defaultLanguage="c#" debug="true" batch="false" targetFramework="4.5">

    That seems to solve the problem with Caching on the server side.  Hopefully Umbraco will resolve this type of issue with the next version or two.

  • Robert Foster 416 posts 1572 karma points MVP admin c-trib
    Apr 03, 2014 @ 03:43
    Robert Foster
    0

    Just took a look at your video - seems you've used the same technique to fix this.  However, you may need to leave debug=true set - I had turned it on, tried it and noted it works in my browsers, then turned it off thinking that it was fixed.  Client rings up saying it still isn't working, turn it back on again and then it works for them.

    My guess is that turning debug=true on is changing the behaviour of umbraco (or rather ASP.Net) in the way it sends it's headers/cookies to the client which is effectively having the client cache things differently.  Or, alternatively, the server is caching the files it serves, but debug=true is effectively bypassing the cache.  Setting debug=false may be telling the server it can resume using it's cache, but that cache isn't being updated and is stale.  I like to think that's the more likely scenario.

  • Max 14 posts 44 karma points
    Apr 03, 2014 @ 07:04
    Max
    0

    Hi Robert!

    Thanks for investigating... Let's hope it could be fixed "automatically" for next version(s) of Umbraco :)

  • Robert Foster 416 posts 1572 karma points MVP admin c-trib
    Apr 03, 2014 @ 07:15
    Robert Foster
    0

    Thanks Max, let me know if anything else breaks (and feel free to mark the appropriate post as the solution for others that may experience the same problem).

  • Jasper van der Sterren 13 posts 33 karma points
    Oct 17, 2014 @ 13:22
    Jasper van der Sterren
    0

    Hi,

    I'm having the same problem with the Color Picker not working when debug=false. The issue doesn't seem to be resolved yet in Umbraco v7.1.8. We are deploying a website to a production server and having debug=true is unacceptable. Did anybody find some other workaround for now? I can't imagine anyone using this in production with debug mode on.

    Regards, Jasper.

  • Nikki Strømsnes 16 posts 58 karma points
    Oct 30, 2014 @ 00:14
    Nikki Strømsnes
    0

    Hi,

    I am experiencing the same problem. The color picker works fine in Windows, but not on Mac, for some reason. Settung debug to true does not solve it. What to do?

  • Simon 692 posts 1067 karma points
    Jan 12, 2015 @ 22:38
    Simon
    0

    Hi,

    Once you add a new data type and you allow user to choose a color using the spectrum color picker, how can I get the hexa decimal value selected in Content in a razor view to use it as a background-color or a color to an element?

    Thank you.

    Regards

  • Dennis Aaen 4448 posts 17912 karma points admin hq c-trib
    Jan 12, 2015 @ 22:56
    Dennis Aaen
    0

    Hi Simon,

    When you have add a new data type and on your doucment type add a property, using the Spectrum Colour Picker as the property editor.

    The way that you can get the value that you set on the page, is by using this line:

    @CurrentPage.PropertyAlias

    If you give you property on your document type an alias of PickColor then it will be @CurrentPage.PickColor.

    Then you will get something like this out #783232, that you can use as a background-color.

    Hope this helps,

    /Dennis

  • Robert Foster 416 posts 1572 karma points MVP admin c-trib
    Jan 12, 2015 @ 23:06
    Robert Foster
    0

    Hey Simon,

    As Dennis mentioned, use the standard Umbraco MVC @CurrentPage.PropertyAlias... to use a picked colour as the background of an element I normally inject the value into the style attribute similar to the following (where PageColor is my ColorPicker property):

    <body style="background-color: @CurrentPage.PageColor">
    ..
    </body>

     

  • Simon 692 posts 1067 karma points
    Jan 13, 2015 @ 08:52
    Simon
    0

    Hi,

    I have used that approach but I am getting nothing.

    Any help?

  • Jan Skovgaard 11257 posts 23497 karma points MVP 7x admin c-trib
    Jan 13, 2015 @ 08:55
    Jan Skovgaard
    0

    Hi Simon

    Could you perhaps share some of your code so we can see your context? And perhaps some screendumps of your setup of the spectrum color picker?

    /Jan

  • Simon 692 posts 1067 karma points
    Jan 13, 2015 @ 09:06
    Simon
    0

     

     

     

     

     

     

  • Dennis Aaen 4448 posts 17912 karma points admin hq c-trib
    Jan 13, 2015 @ 09:12
    Dennis Aaen
    0

    H Simon,

    To me it looks that you are doing it right. But please make sure that the page that you´re viewing in the browser has a value set on the serviceColour.

    @CurrentPage is refers to the page that you are visit in the browser.

    /Dennis

  • Simon 692 posts 1067 karma points
    Jan 13, 2015 @ 09:19
    Simon
    0

    Ok It worked.

    Thanks Denis.

Please Sign in or register to post replies

Write your reply to:

Draft