Trying to get the 'Add Image / File / Link' buttons to work on a single page

Permalink
Hi everyone,

I'm trying to add a new page into the dashboard. It's a form to add and edit job vacancies which will be displayed on the site. So far, all is going well - I'm using Zend form to build the form and I've included a TinyMce instance to edit the Job Description.

Now I'm trying to add in the custom TinyMce buttons to add images, files and links and I've hit 2 problems, one minor, one major. The minor one, is that I'd like the buttons to appear directly above the TinyMce instance, not at the top of the page. Is this possible?
The major problem is that the buttons don't work! Nothing happens when you click on them (except the Insert Link to Page, which opens a broken version of the sitemap page). I've basically added the javascript from the editor_init.php file after my editor config.

Any help would be much appreciated! I've included a screenshot of my page below - if you need anything else, please let me know...

Thanks,

Jon

1 Attachment

jbx
 
jbx replied on at Permalink Reply
jbx
Simply moved the Loader::element('editor_controls'); line to the right place!

Just the major issue now!
:S
ryan replied on at Permalink Reply
ryan
Make sure that the page is loading ccm.filemanager.js That's the javascript that has the jquery listener that'll open the filemanager dialog.

Should get you a little farther along...
jbx replied on at Permalink Reply
jbx
Here's the list of includes I have:
<link rel="stylesheet" type="text/css" href="/concrete/css/ccm.base.css" />
<script type="text/javascript" src="/concrete/js/jquery.js"></script>
<script type="text/javascript" src="/concrete/js/ccm.dialog.js"></script>
<script type="text/javascript" src="/concrete/js/ccm.base.js"></script>
<script type="text/javascript" src="/index.php/tools/required/i18n_js"></script>
<script type="text/javascript" src="/concrete/js/jquery.rating.js"></script>
<script type="text/javascript" src="/concrete/js/jquery.form.js"></script>
<script type="text/javascript" src="/concrete/js/ccm.ui.js"></script>
<script type="text/javascript" src="/concrete/js/ccm.filemanager.js"></script>
<script type="text/javascript" src="/concrete/js/ccm.themes.js"></script>
<script type="text/javascript" src="/concrete/js/jquery.ui.js"></script>
<script type="text/javascript" src="/concrete/js/jquery.colorpicker.js"></script>
<script type="text/javascript" src="/concrete/js/ccm.popup_login.js"></script>
<link rel="stylesheet" type="text/css" href="/concrete/css/ccm.dashboard.css" />
<link rel="stylesheet" type="text/css" href="/concrete/css/ccm.colorpicker.css" />

The last 2 I added in manually. Will it make a difference that the tiny_mce.js is being added AFTER filemanager?
jbx replied on at Permalink Reply
jbx
Still don't seem to be able to get any further with this one and it's driving me mad!! :S
ryan replied on at Permalink Reply
ryan
If you could attach the single page I may be able to figure out what the problem is.

Ryan
jbx replied on at Permalink Reply 1 Attachment
jbx
If you need any other files or access to my installation, then let me know and I'll sort it out for you. Thanks for taking the time to look into this, it's the one bit I'm stuck on!
ryan replied on at Permalink Reply
ryan
Looks like all your js is pulled in through the controller - right?
jbx replied on at Permalink Reply 1 Attachment
jbx
yeah, it's in the conroller. Model included too in case it's of use...
ryan replied on at Permalink Reply
ryan
Add this to the bottom of the page. This activates the jquery event (click) listeners for the classes .ccm-file-manager-launch
and
.dialog-launch

<script>
ccm_activateFileSelectors();
ccm_activateFileManager('DASHBOARD');
</script>


both of those functions are defined in ccm.filemanager.js
jbx replied on at Permalink Reply
jbx
Thanks Ryan.

Unfortunately for me, my client has now insisted that this particular page is useable in IE6!!!

So I'm gonna have to find another way around it anyways :(

Programming would be so much easier without clients sometimes! ;)
ryan replied on at Permalink Reply
ryan
Oh, man I feel bad for ya.
If they're on ie6, you'd be best to pull it out of the dashboard. Concrete5 dashboard & edit-mode is no place for that browser..
jbx replied on at Permalink Reply
jbx
I did get my module to work with ie6 in the dashboard, however, I did have to disable the filemanager bar above tiny and also replace the nice edit delete buttons with image versions of them, rather than css styled versions. ie really winds me up. Actually - what winds me up is that browser vendors are allowed to create their own versions of an HTML rendering engine! Personally, I reckon their should only be one rendering engine for all browsers, developed jointly by W3C and the various vendors. Then, if MS and Mozilla etc want to differentiate their browsers, they can do so on other points, but at least we can guarantee that all sites would be rendered the same! (end rant...) :)
DavidMIRV replied on at Permalink Reply
DavidMIRV
I just did a C5 custom package for a client that implements Tiny_mce in its own dialog window. It took alot of trickery but you can definatly do it and get those menu items where you want them also(it's just an element btw)

Are you still having trouble with this , if so where are you at? I can be more readily reached via the Concrete5 irc channel on the EFNET irc network if you still need some help with this...


David
DueSoft replied on at Permalink Reply
DueSoft
Hi David,
I would be very interesed to see how you implemented it. Can you post it?