bmbrands / moodle-theme_elegance

This is the new official elegance repository
http://basbrands.nl
23 stars 12 forks source link

"eye" icon on course activities fails with javascript error #38

Closed thepurpleblob closed 10 years ago

thepurpleblob commented 10 years ago

With latest version of Elegance and latest weekly of 2.7.

Put course into editing mode, click edit drop-down next to any activity and click the hide/show eye icon. The icon doesn't do anything and the console shows a javascript error...

I have confirmed that it works properly in the clean theme.

Uncaught TypeError: Cannot read property 'setAttrs' of null yui_combo.php?3.15.0/datatype-xml-parse/datatype-xml-parse-min.js&3.15.0/io-xdr/io-xdr-min.js&3.15.…:52 e.extend.handle_resource_dim yui_combo.php?3.15.0/datatype-xml-parse/datatype-xml-parse-min.js&3.15.0/io-xdr/io-xdr-min.js&3.15.…:52 e.extend.change_visibility yui_combo.php?3.15.0/datatype-xml-parse/datatype-xml-parse-min.js&3.15.0/io-xdr/io-xdr-min.js&3.15.…:52 e.extend.handle_data_action yui_combo.php?3.15.0/datatype-xml-parse/datatype-xml-parse-min.js&3.15.0/io-xdr/io-xdr-min.js&3.15.…:52 f.notifySub yui_combo.php?rollup/3.15.0_1/yui-moodlesimple-min.js&rollup/1405415231/mcore-min.js:149 e.Subscriber.notify yui_combo.php?rollup/3.15.0_1/yui-moodlesimple-min.js&rollup/1405415231/mcore-min.js:39 e.CustomEvent._notify yui_combo.php?rollup/3.15.0_1/yui-moodlesimple-min.js&rollup/1405415231/mcore-min.js:38 e.CustomEvent._procSubs yui_combo.php?rollup/3.15.0_1/yui-moodlesimple-min.js&rollup/1405415231/mcore-min.js:38 e.CustomEvent.fireSimple yui_combo.php?rollup/3.15.0_1/yui-moodlesimple-min.js&rollup/1405415231/mcore-min.js:38 e.CustomEvent._fire yui_combo.php?rollup/3.15.0_1/yui-moodlesimple-min.js&rollup/1405415231/mcore-min.js:38 e.CustomEvent.fire yui_combo.php?rollup/3.15.0_1/yui-moodlesimple-min.js&rollup/1405415231/mcore-min.js:38 a.fn yui_combo.php?rollup/3.15.0_1/yui-moodlesimple-min.js&rollup/1405415231/mcore-min.js:114

thedannywahl commented 10 years ago

Doors it happen on theme_bootstrap?

thepurpleblob commented 10 years ago

It works fine in bootstrap.

thepurpleblob commented 10 years ago

Doesn't work for topics either. This is worse because there isn't any other option for changing it for topics. The only workaround is to copy the eye url into the browser's address bar

thepurpleblob commented 10 years ago

Turns out this only happens when the theme "Use icon font" option is enabled.

With that switch off (default) it's all ok. I didn't realise I'd turned that on - I'm not even sure what it does ;-)

thedannywahl commented 10 years ago

thanks for the update, that's really helpful!

On Wed, Jul 23, 2014 at 7:00 PM, Howard Miller notifications@github.com wrote:

Turns out this only happens when the theme "Use icon font" option is enabled.

With that switch off (default) it's all ok. I didn't realise I'd turned that on - I'm not even sure what it does ;-)

— Reply to this email directly or view it on GitHub https://github.com/thedannywahl/moodle-theme_elegance/issues/38#issuecomment-49859619 .

Danny Wahl iyWare.com

davidscotson commented 10 years ago

The ajax call expects to find an img tag and fails if it doesn't find it. If you replace the icons with a font then you can output a display:none img next to the eye icon so that the ajax succeeds. There's some code to do this in one of the older bootstrap themes with font-awesome.

thedannywahl commented 10 years ago

for now you can disable "theme_elegance | fonticons" which is disabled by default to fix the "eye" icon until I can push a final fix.