How to disable editing mode in Decaf theme - missing edit icons!

How to disable editing mode in Decaf theme - missing edit icons!

by Mindy Workman -
Number of replies: 16

Edit:

This discussion has been split from http://moodle.org/mod/forum/discuss.php?d=168317 - How to remove Main Menu and/or item in it?

I tried this, but it isn't working. As administrator, I turned on Editing, but the only small icons are for the entire Main Menu block, not the individual resource I want to delete (In this case, a glossary)

(Edited by Mary Evans - original submission Monday, 13 August 2012, 4:50 PM)

(Edited by Mary Evans - original submission Monday, 13 August 2012, 11:05 PM)

Average of ratings: -
In reply to Mindy Workman

Re: how to remove main-menu and/or item in it?

by Mary Evans -
Picture of Core developers Picture of Documentation writers Picture of Peer reviewers Picture of Plugin developers Picture of Testers

Hi Mindy,

Which version of Moodle and which theme are you using?

This sounds like it could be a bug, on the other hand it may be the fact that the editing icons are hidden with the 'auto-hide' script which seems to be the latest widget in Moodle.

Mary

In reply to Mary Evans

Re: how to remove main-menu and/or item in it?

by Mindy Workman -

I am using version 2.3.1 using the Decaf theme.

In reply to Mindy Workman

Re: how to remove main-menu and/or item in it?

by Mindy Workman -
In reply to Mindy Workman

Re: how to remove main-menu and/or item in it?

by Mary Cooch -
Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Testers Picture of Translators

Can you swap to a different theme such as standard?

In reply to Mary Cooch

Re: how to remove main-menu and/or item in it?

by Mindy Workman -

Mary, that worked! Thank you! The editing icons were visible once I switched to the Standard theme, so I was able to delete the resource.

So, that means the issue is in the Decaf theme, but how do I fix it? Any ideas?

In reply to Mindy Workman

Re: how to remove main-menu and/or item in it?

by Mary Cooch -
Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Testers Picture of Translators

ah - that's a Mary Evans question!wink

In reply to Mindy Workman

Re: how to remove main-menu and/or item in it?

by Mary Evans -
Picture of Core developers Picture of Documentation writers Picture of Peer reviewers Picture of Plugin developers Picture of Testers

Its AJAX auto-hide the Edit Icons are hidden until you run your mouse over them. It is an option in the Decaf theme.  Better to turn it off.

In reply to Mary Evans

Re: how to remove main-menu and/or item in it?

by Mindy Workman -

Even when I run my mouse over where the edit icons should be, there is nothing there.

In reply to Mindy Workman

Re: how to remove main-menu and/or item in it?

by Mindy Workman -

Mary (&Mary),

I realized that there is an updated version of the Decaf theme, so I upgraded on my sandbox server, tested it (the problem does not show itself) and upgraded our live site.

Then the problem appears again. I went back to look at my sandbox site, and the problem is there, too, but was not originally.... I am at a loss (and it has been a long day!)


~Mindy

In reply to Mindy Workman

Re: how to remove main-menu and/or item in it?

by Mary Evans -
Picture of Core developers Picture of Documentation writers Picture of Peer reviewers Picture of Plugin developers Picture of Testers

Before you do anything else try Purging all caches in Site Administration > Development > Purge all caches

You may want to do this twice to make sure all the cache has been deleted.

Next open the Decaf settings page... Settings > Site Administration > Appearance > Themes ->> find link to the Decaf theme settings page in that list. When you find it CLICK IT.

In the page that opens up look for a Yes/No setting relating to Editing. It is suposed to be set to "No" by default but I am not sure what No means in this context.  If you have changed this once before then odds on it's still in the database. So you need to reset it and SAVE changes.

Test to see that the editing is back. You may need to Purge all caches again.

In reply to Mindy Workman

Re: how to remove main-menu and/or item in it?

by Mary Evans -
Picture of Core developers Picture of Documentation writers Picture of Peer reviewers Picture of Plugin developers Picture of Testers

Well I was half right.

It's NOT persitant editing you need to worry about it is the EDIT Button which does away with the Edit Icons in the Decaf theme. See image below...

Decaf - edit buttons

In reply to Mary Evans

Re: how to remove main-menu and/or item in it?

by Paul Nicholls -

I've just had a quick look, and interestingly this is a case of needing to turn the Edit Buttons option in Decaf on in order to be able to edit it.  That's obviously a bug - I'm looking into it now.

(By the way, I don't think I ever released a version of Decaf with the autohide - though I did tinker with it privately.  I opted to go for the edit buttons instead, as I thought it was a cleaner and more usable approach.)

-Paul

In reply to Paul Nicholls

Re: how to remove main-menu and/or item in it?

by Mary Evans -
Picture of Core developers Picture of Documentation writers Picture of Peer reviewers Picture of Plugin developers Picture of Testers

Hi Paul,

I was not sure what it was but the Auto-Hide was just a thought. Looking thru the setting.php soon told me it was the edit buttons.

I have just fixed this by...

  1. renaming YUI directory to javascript
  2. placing editbuttons.js and awesomebar.js files in the javascript directory and deleting the two (now empty) sub-directories for awsomebar & editbuttons.
  3. adding $THEME->javascripts = array('awesomebar', 'editbuttons'); to decaf/config.php

All is workin OK even the little 'green' EDIT boxes have appeared! smile

I only noticed the YUI directory as I have just recently had to fix SPLASH theme which was lacking the correct javascript directory for the colorswitcher.js

Cheers

Mary

In reply to Paul Nicholls

Re: how to remove main-menu and/or item in it?

by Mary Evans -
Picture of Core developers Picture of Documentation writers Picture of Peer reviewers Picture of Plugin developers Picture of Testers

 

Hi Paul,

Just tweaking the CSS for the edit buttons in the sideblocks. Adding this CSS takes away the 1em margin top/bottom on the button and brings them all nicely lined up on the left below the item they are editing. The 1em margin is inherited from Canvas theme.

.block_with_controls .column.c1 .buttons {margin: 0; text-align: left;}

Decaf - edit buttons

Cheers

Mary

In reply to Mary Evans

Re: how to remove main-menu and/or item in it?

by Paul Nicholls -

Hi Mary,

I was just finishing off my own fix for this issue when I saw your post here.  I've adjusted the margin, but not completely eliminated it, as I think it's good to have a little space - but I have left-aligned the edit buttons.  There's a new version now available in the plugins database which includes the fix (which both makes the icons visible when Edit Buttons are turned off, and tidies things up when Edit Buttons are turned on).

As for your post about changing the name of the folder containing the javascript files, that shouldn't be necessary - or are you using a bleeding-edge copy of 2.4dev which has changed something which otherwise breaks it?  I'm on an up-to-date MOODLE_23_STABLE here, and it works fine with the folder called "yui"; without having tried your changes, it sounds to me as though they might force the Edit Buttons to be present whether or not they were enabled in the Decaf settings - they should only be there if the "Use Edit Buttons" setting is set to "Yes".

-Paul

In reply to Paul Nicholls

Re: how to remove main-menu and/or item in it?

by Mary Evans -
Picture of Core developers Picture of Documentation writers Picture of Peer reviewers Picture of Plugin developers Picture of Testers

Hi Paul,

I'll checkout Decaf later. Thanks for updating it.

As for 'bleeding-edge' Moodle 24DEV, although I do have the uptodate Moodle 2.4 Alpha running on my Localhost server, I was actually testing Decaf on Moodle 2.3.1+

$version  = 2012062501.07;
$release  = '2.3.1+ (Build: 20120802)';
$branch   = '23';
$maturity = MATURITY_STABLE;

OK...here is what happened...

Before the changes:

Setting = YES

  • NO edit button on ANY section or block
  • Main Menu lost ALL editing icons for Activity & Resource items
    although normal Editing icons were visible for Main menu itself and other sections and blocks

After the changes:

Setting = YES

  • Edit button appeared on ALL sections and blocks including main menu Activity & Resource items

Setting = NO

  • Everything back to what it looked like when setting was YES prior to changes being made (which is strange to say the least!)

I'll take your latest version of Decaf for a test drive later today if I have time.

Cheers

Mary