5099 Posts in 1519 Topics by 1116 members
| Go to End | ||
| Author | Topic: | 5981 Views |
-
Re: Color-picker?

14 April 2010 at 5:37pm
Hi
That's odd. I can confirm that it works in popups, both locally and on live environments.
I guess it's a good idea to try to narrow this down.
Do you run the same version of SilverStripe in both environments?
Do you get any errors in Firebug when you try to open a colorpicker on the live server?
Any files missing (look at the "Net" tab in Firebug)?
Does the same issue occur in every browser? -
Re: Color-picker?

15 April 2010 at 5:53am
Hi Banal,
Yeah I've found it odd too. In answer to your questions yes I am running the same version of SS in both enviroments and it's not working in any browsers I have tested it in.
Thanks for pointing me to the Net tab in firebug - I am actually getting 3 errors coming up - all of which seem to suggest that jquery is not being loaded.
the 3 errors are:
jQuery is not defined
[Break on this error] })(jQuery); dataob...9901105 (line 46)jQuery is not defined
[Break on this error] })(jQuery) colorp...9900943 (line 450)jQuery is not defined
[Break on this error] $j = jQuery.noConflict(); colorf...9900943 (line 1)The question now is why? (I say rubbing my chin)
-
Re: Color-picker?

15 April 2010 at 8:27am
Hm that error can occur if jQuery is being included multiple times.. but that would produce the same error on the local installation as well. Maybe try to re-upload the jsparty directory and make sure it has the appropriate permissions (files must be globally readable)
-
Re: Color-picker?

15 April 2010 at 8:41am
Hi Banal
Yeah tried re-uploading the jsparty directory earlier but didn't really think it was going to be that as the colour picker is working in the CMS (not within popup). Just changed the readable permissions for jsparty to fully readable (777) and still no joy! As you can see in the attachments the local enviroment is making 4 requests while the live enviroment is only making 3. The missing request happens to be the jquery.js
Thanks for your help by the way
-
Re: Color-picker?

15 April 2010 at 8:53am
Hm. Never saw anything like that. So there's not even an attempt to load jQuery? Did you empty the browser cache before monitoring the Net-Tab?
Try to delete the base.js, cmsmain.js and leftandmain.js files in the assets folder too. They are automatically generated, so deleting them is not a problem. If that doesn't help, try a flush on the admin.. eg. yourdomain.com/admin?flush=1Other than that, there's not much advise I can give. I suspect it could be the auto-generated files though.
-
Re: Color-picker?

15 April 2010 at 9:12am
nope sorry none of those worked. God Knows what's causing it.
Although I've just found a pretty ugly hack to get it working. Thanks to all your help!
I've just added : <script type="text/javascript" src="mysite/javascript/lib/jquery.js"></script>
into /dataobject_manager/templates/DataObjectManager_popup.ssIt's messy - but it works for now!
Thanks once again!
-
Re: Color-picker?

5 July 2011 at 12:37am
Hi there,
I've been having a bit of trouble with the ColorPicker Module. Firstly though; it's a great piece of code that works really well.
However, I can't get it to display on my templates. The code I'm using is the following:
class ArticlePage extends Page {
...
static $db = array(
'Date' => 'Date',
'Author' => 'Text',
'BarColour' => 'Text'
);
...
$fields->addFieldToTab('Root.Content.Main', new ColorField('BarColour', 'Bar Colour'));
...
}and the template:
<div class="primary" role="main">
<div class="content">
<div class="article-content">
<h1>$Title</h1>
<!-- ADDED FOR TESTING PURPOSES ^_^ -->
<p>BG: $BarColour</p>
$Content
</div><!-- /.article-content -->
</div><!-- /.content -->
</div><!-- /.primary -->I'm sure it's something simple! But please help if you can.
Cheers,
Steve
| 5981 Views | ||
| Go to Top |



