Best practice forum (Archived)

Show and Hide Editing Tools in 2.5

 
Daniel Bond
Show and Hide Editing Tools in 2.5
بواسطة Friday, 15 November 2013, 7:45 AM - Daniel Bond
مجموعة Most helpful contributor 2023

Love the new feature where the TinyMCE editing tools can be hidden, however when the editing box has been in a Web 2.0 style popup window then it appears multiple "Hide / Show" tabs are spawned. Maybe it's just a theme issue (we are just using the Custom Totara theme for testing purposes currently) but every time a new "popup" is launched which contains a TinyMCE editing panel, a new tab seems to appear.

All of the extra tabs disappear when navigating between pages, but when creating appraisal content it's all AJAX and therefore there's not page navigation action when creating new content/pages/switching between existing stages. As soon as a new stage is created, or you go to a different part of the appraisal (General, Assignments, Messages) then you are navigating to a new page and the tabs disappear.


me
Re: Show and Hide Editing Tools in 2.5
بواسطة Sunday, 17 November 2013, 7:57 PM - George Angus
مجموعة Totara

Hi Dan,

Thanks for bringing this to our attention, its a bug and Ive put in a bug report, someone will be in touch shortly.

regards,

George.

 

 

Daniel Bond
Re: Show and Hide Editing Tools in 2.5
بواسطة Tuesday, 11 February 2014, 3:30 AM - Daniel Bond
مجموعة Most helpful contributor 2023

Has anything further happened with this, I'm on 2.5.6 currently and the problem still seems to exist. Obviously not a high priority fix, more irritating than actually impairing functionality, but I wanted to make sure it wasn't just me still experiencing it.

Dan

لقد تمت إزالة مشاركة المنتدى هذه
Tuesday, 11 February 2014, 1:27 PM
تمت إزالة محتوى هذه المشاركة في المنتدى ولم يعد من الممكن الوصول إليها
David Curry (Core Developer)
Re: Show and Hide Editing Tools in 2.5
بواسطة Thursday, 13 February 2014, 12:52 PM - David Curry (Core Developer)
مجموعة Totara

Hey Guys,

Sorry this is taking so long, the original developer assigned to this got re-assigned to feature development a while back. I don't have the solution yet but I thought I should let you know that I've picked it up and someone is actually looking into it.

"Each time you edit an appraisal item a new tab appears" - Have you noticed this anywhere apart from editing/creating fixed text questions? That is the only place I've managed to replicate the issue.

Cheers,
David

Daniel Bond
Re: Show and Hide Editing Tools in 2.5
بواسطة Friday, 14 February 2014, 1:38 AM - Daniel Bond
مجموعة Most helpful contributor 2023

I've only seen it happen in Appraisals, which I suspect is related to the fact that editing appraisal content is all via AJAX where as almost everywhere else seems to involve actual page navigations (which seem to "reset" the tabs).

Thanks for looking at this, nice to be kept up to date with progress, always appreciated.

Dan

لقد تمت إزالة مشاركة المنتدى هذه
Wednesday, 26 February 2014, 4:58 PM
تمت إزالة محتوى هذه المشاركة في المنتدى ولم يعد من الممكن الوصول إليها
David Curry (Core Developer)
Re: Show and Hide Editing Tools in 2.5
بواسطة Monday, 3 March 2014, 1:12 PM - David Curry (Core Developer)
مجموعة Totara

Hey Guys,

Thought I'd chuck an update on here. We do have a fix for this in review now, but I think it might take a while to get included in a point release. Since we ended up having to put the fix directly in the tinymce code, which is core moodle, and we would like to upstream it to reduce the risk of merge conflicts later on. However while it took a while to hunt down the issue and get a patch in it is a rather small code change, so if you want to make the change as a local customisation now rather than wait for it to be included in a point release it should be relatively easy. I've uploaded the whole diff file of the patchset but these are the changes:

 16          var editors_initialised = this.editors_initialised(), self = this, editor;
 17 +        // If the editor exists don't initialise it.
 18 +        if (tinymce.activeEditor != null) {
 19 +            return;
 20 +        }

There are potentially three files where this change should be made:

  • lib/editor/tinymce/yui/build/moodle-editor_tinymce-collapse/moodle-editor_tinymce-collapse-debug.js
  • lib/editor/tinymce/yui/build/moodle-editor_tinymce-collapse/moodle-editor_tinymce-collapse-min.js
  • lib/editor/tinymce/yui/build/moodle-editor_tinymce-collapse/moodle-editor_tinymce-collapse.js

I am not sure you would need the debug one but it couldn't hurt to apply the change there as well. Also I found the easiest way to change the min file was to change the collapse.js and then run the file through a minify tool (like this one http://jscompress.com/), but you could also just copy it from the patchfile. Let me know if you have any issues with it.

Cheers,
David

? ?
Re: Show and Hide Editing Tools in 2.5
بواسطة Monday, 17 March 2014, 9:17 PM - ? ?
 

A fix for this issue was included in today's (18 March 2014) release of Totara 2.5.10