diff --git a/lib/editor/atto/plugins/collapse/yui/build/moodle-atto_collapse-button/moodle-atto_collapse-button-debug.js b/lib/editor/atto/plugins/collapse/yui/build/moodle-atto_collapse-button/moodle-atto_collapse-button-debug.js index b91ba66c443..c3740bfe3b8 100644 --- a/lib/editor/atto/plugins/collapse/yui/build/moodle-atto_collapse-button/moodle-atto_collapse-button-debug.js +++ b/lib/editor/atto/plugins/collapse/yui/build/moodle-atto_collapse-button/moodle-atto_collapse-button-debug.js @@ -81,8 +81,10 @@ Y.namespace('M.atto_collapse').Button = Y.Base.create('button', Y.M.editor_atto. var button = this.buttons[COLLAPSE]; if (button.getData(COLLAPSED)) { + this.highlightButtons(COLLAPSE); this._setVisibility(button, true); } else { + this.unHighlightButtons(COLLAPSE); this._setVisibility(button); } diff --git a/lib/editor/atto/plugins/collapse/yui/build/moodle-atto_collapse-button/moodle-atto_collapse-button-min.js b/lib/editor/atto/plugins/collapse/yui/build/moodle-atto_collapse-button/moodle-atto_collapse-button-min.js index 0c5ced78db6..509893951f3 100644 --- a/lib/editor/atto/plugins/collapse/yui/build/moodle-atto_collapse-button/moodle-atto_collapse-button-min.js +++ b/lib/editor/atto/plugins/collapse/yui/build/moodle-atto_collapse-button/moodle-atto_collapse-button-min.js @@ -1 +1 @@ -YUI.add("moodle-atto_collapse-button",function(e,t){var n="atto_collapse",r="showgroups",i="collapse",s="collapsed",o=".atto_group";e.namespace("M.atto_collapse").Button=e.Base.create("button",e.M.editor_atto.EditorPlugin,[],{initializer:function(){var t=e.Object.size(this.get("host").get("plugins"));if(t<=1+parseInt(this.get(r),10))return;if(this.toolbar.all(o).size()>this.get(r))return;var i=this.addButton({icon:M.util.image_url("icon",n),callback:this._toggle});this.get("host").on("pluginsloaded",function(e,t){this._setVisibility(t);var n=this.toolbar.all(o).item(this.get(r));n.insert('
',"before")},this,i)},_toggle:function(e){e.preventDefault();var t=this.buttons[i];t.getData(s)?this._setVisibility(t,!0):this._setVisibility(t),this.buttons[this.name].focus()},_setVisibility:function(e,t){var i=this.toolbar.all(o).slice(this.get(r));t?(e.set("title",M.util.get_string("showfewer",n)),i.show(),e.setData(s,!1)):(e.set("title",M.util.get_string("showmore",n)),i.hide(),e.setData(s,!0))}},{ATTRS:{showgroups:{value:3}}})},"@VERSION@",{requires:["moodle-editor_atto-plugin"]}); +YUI.add("moodle-atto_collapse-button",function(e,t){var n="atto_collapse",r="showgroups",i="collapse",s="collapsed",o=".atto_group";e.namespace("M.atto_collapse").Button=e.Base.create("button",e.M.editor_atto.EditorPlugin,[],{initializer:function(){var t=e.Object.size(this.get("host").get("plugins"));if(t<=1+parseInt(this.get(r),10))return;if(this.toolbar.all(o).size()>this.get(r))return;var i=this.addButton({icon:M.util.image_url("icon",n),callback:this._toggle});this.get("host").on("pluginsloaded",function(e,t){this._setVisibility(t);var n=this.toolbar.all(o).item(this.get(r));n.insert('',"before")},this,i)},_toggle:function(e){e.preventDefault();var t=this.buttons[i];t.getData(s)?(this.highlightButtons(i),this._setVisibility(t,!0)):(this.unHighlightButtons(i),this._setVisibility(t)),this.buttons[this.name].focus()},_setVisibility:function(e,t){var i=this.toolbar.all(o).slice(this.get(r));t?(e.set("title",M.util.get_string("showfewer",n)),i.show(),e.setData(s,!1)):(e.set("title",M.util.get_string("showmore",n)),i.hide(),e.setData(s,!0))}},{ATTRS:{showgroups:{value:3}}})},"@VERSION@",{requires:["moodle-editor_atto-plugin"]}); diff --git a/lib/editor/atto/plugins/collapse/yui/build/moodle-atto_collapse-button/moodle-atto_collapse-button.js b/lib/editor/atto/plugins/collapse/yui/build/moodle-atto_collapse-button/moodle-atto_collapse-button.js index 6911aa83ab6..ee97f234f96 100644 --- a/lib/editor/atto/plugins/collapse/yui/build/moodle-atto_collapse-button/moodle-atto_collapse-button.js +++ b/lib/editor/atto/plugins/collapse/yui/build/moodle-atto_collapse-button/moodle-atto_collapse-button.js @@ -77,8 +77,10 @@ Y.namespace('M.atto_collapse').Button = Y.Base.create('button', Y.M.editor_atto. var button = this.buttons[COLLAPSE]; if (button.getData(COLLAPSED)) { + this.highlightButtons(COLLAPSE); this._setVisibility(button, true); } else { + this.unHighlightButtons(COLLAPSE); this._setVisibility(button); } diff --git a/lib/editor/atto/plugins/collapse/yui/src/button/js/button.js b/lib/editor/atto/plugins/collapse/yui/src/button/js/button.js index 6d0d4276bbf..0576996bf79 100644 --- a/lib/editor/atto/plugins/collapse/yui/src/button/js/button.js +++ b/lib/editor/atto/plugins/collapse/yui/src/button/js/button.js @@ -79,8 +79,10 @@ Y.namespace('M.atto_collapse').Button = Y.Base.create('button', Y.M.editor_atto. var button = this.buttons[COLLAPSE]; if (button.getData(COLLAPSED)) { + this.highlightButtons(COLLAPSE); this._setVisibility(button, true); } else { + this.unHighlightButtons(COLLAPSE); this._setVisibility(button); } diff --git a/lib/editor/atto/plugins/html/yui/build/moodle-atto_html-button/moodle-atto_html-button-debug.js b/lib/editor/atto/plugins/html/yui/build/moodle-atto_html-button/moodle-atto_html-button-debug.js index 32233dad876..913233edd9a 100644 --- a/lib/editor/atto/plugins/html/yui/build/moodle-atto_html-button/moodle-atto_html-button-debug.js +++ b/lib/editor/atto/plugins/html/yui/build/moodle-atto_html-button/moodle-atto_html-button-debug.js @@ -66,6 +66,9 @@ Y.namespace('M.atto_html').Button = Y.Base.create('button', Y.M.editor_atto.Edit _showHTML: function() { var host = this.get('host'); if (!this.get('isHTML')) { + // Unhighlight icon. + this.unHighlightButtons('html'); + // Enable all plugins. host.enablePlugins(); @@ -82,6 +85,9 @@ Y.namespace('M.atto_html').Button = Y.Base.create('button', Y.M.editor_atto.Edit // And re-mark everything as updated. this.markUpdated(); } else { + // Highlight icon. + this.highlightButtons('html'); + // Disable all plugins. host.disablePlugins(); diff --git a/lib/editor/atto/plugins/html/yui/build/moodle-atto_html-button/moodle-atto_html-button-min.js b/lib/editor/atto/plugins/html/yui/build/moodle-atto_html-button/moodle-atto_html-button-min.js index d974624e214..7c477c47c49 100644 --- a/lib/editor/atto/plugins/html/yui/build/moodle-atto_html-button/moodle-atto_html-button-min.js +++ b/lib/editor/atto/plugins/html/yui/build/moodle-atto_html-button/moodle-atto_html-button-min.js @@ -1 +1 @@ -YUI.add("moodle-atto_html-button",function(e,t){e.namespace("M.atto_html").Button=e.Base.create("button",e.M.editor_atto.EditorPlugin,[],{initializer:function(){this.addButton({icon:"e/source_code",callback:this._toggleHTML})},_toggleHTML:function(){this.set("isHTML",!this.get("isHTML")),this._showHTML()},_showHTML:function(){var e=this.get("host");this.get("isHTML")?(e.disablePlugins(),e.enablePlugins(this.name),e.updateOriginal(),this.editor.hide(),e.textarea.show(),e.textarea.focus()):(e.enablePlugins(),e.updateFromTextArea(),e.textarea.hide(),this.editor.show(),e.focus(),this.markUpdated())}},{ATTRS:{isHTML:{value:!1}}})},"@VERSION@",{requires:["moodle-editor_atto-plugin","event-valuechange"]}); +YUI.add("moodle-atto_html-button",function(e,t){e.namespace("M.atto_html").Button=e.Base.create("button",e.M.editor_atto.EditorPlugin,[],{initializer:function(){this.addButton({icon:"e/source_code",callback:this._toggleHTML})},_toggleHTML:function(){this.set("isHTML",!this.get("isHTML")),this._showHTML()},_showHTML:function(){var e=this.get("host");this.get("isHTML")?(this.highlightButtons("html"),e.disablePlugins(),e.enablePlugins(this.name),e.updateOriginal(),this.editor.hide(),e.textarea.show(),e.textarea.focus()):(this.unHighlightButtons("html"),e.enablePlugins(),e.updateFromTextArea(),e.textarea.hide(),this.editor.show(),e.focus(),this.markUpdated())}},{ATTRS:{isHTML:{value:!1}}})},"@VERSION@",{requires:["moodle-editor_atto-plugin","event-valuechange"]}); diff --git a/lib/editor/atto/plugins/html/yui/build/moodle-atto_html-button/moodle-atto_html-button.js b/lib/editor/atto/plugins/html/yui/build/moodle-atto_html-button/moodle-atto_html-button.js index 32233dad876..913233edd9a 100644 --- a/lib/editor/atto/plugins/html/yui/build/moodle-atto_html-button/moodle-atto_html-button.js +++ b/lib/editor/atto/plugins/html/yui/build/moodle-atto_html-button/moodle-atto_html-button.js @@ -66,6 +66,9 @@ Y.namespace('M.atto_html').Button = Y.Base.create('button', Y.M.editor_atto.Edit _showHTML: function() { var host = this.get('host'); if (!this.get('isHTML')) { + // Unhighlight icon. + this.unHighlightButtons('html'); + // Enable all plugins. host.enablePlugins(); @@ -82,6 +85,9 @@ Y.namespace('M.atto_html').Button = Y.Base.create('button', Y.M.editor_atto.Edit // And re-mark everything as updated. this.markUpdated(); } else { + // Highlight icon. + this.highlightButtons('html'); + // Disable all plugins. host.disablePlugins(); diff --git a/lib/editor/atto/plugins/html/yui/src/button/js/button.js b/lib/editor/atto/plugins/html/yui/src/button/js/button.js index b4b813273dc..7df91aeff09 100644 --- a/lib/editor/atto/plugins/html/yui/src/button/js/button.js +++ b/lib/editor/atto/plugins/html/yui/src/button/js/button.js @@ -64,6 +64,9 @@ Y.namespace('M.atto_html').Button = Y.Base.create('button', Y.M.editor_atto.Edit _showHTML: function() { var host = this.get('host'); if (!this.get('isHTML')) { + // Unhighlight icon. + this.unHighlightButtons('html'); + // Enable all plugins. host.enablePlugins(); @@ -80,6 +83,9 @@ Y.namespace('M.atto_html').Button = Y.Base.create('button', Y.M.editor_atto.Edit // And re-mark everything as updated. this.markUpdated(); } else { + // Highlight icon. + this.highlightButtons('html'); + // Disable all plugins. host.disablePlugins();