Merge branch 'MDL-46240-master' of git://github.com/danpoltawski/moodle

This commit is contained in:
Sam Hemelryk 2014-07-08 10:34:28 +12:00
commit a5dcdd4bd9
4 changed files with 7 additions and 4 deletions

View File

@ -55,7 +55,8 @@ Y.namespace('M.atto_collapse').Button = Y.Base.create('button', Y.M.editor_atto.
}
var button = this.addButton({
icon: M.util.image_url('icon', PLUGINNAME),
icon: 'icon',
iconComponent: PLUGINNAME,
callback: this._toggle
});

View File

@ -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('<div class="toolbarbreak"></div>',"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"]});
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:"icon",iconComponent: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('<div class="toolbarbreak"></div>',"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"]});

View File

@ -51,7 +51,8 @@ Y.namespace('M.atto_collapse').Button = Y.Base.create('button', Y.M.editor_atto.
}
var button = this.addButton({
icon: M.util.image_url('icon', PLUGINNAME),
icon: 'icon',
iconComponent: PLUGINNAME,
callback: this._toggle
});

View File

@ -53,7 +53,8 @@ Y.namespace('M.atto_collapse').Button = Y.Base.create('button', Y.M.editor_atto.
}
var button = this.addButton({
icon: M.util.image_url('icon', PLUGINNAME),
icon: 'icon',
iconComponent: PLUGINNAME,
callback: this._toggle
});