")},s=function(e,t){M.atto_title.change_title(e,t,"")},o=function(e,t){M.atto_title.change_title(e,t,"")},u="
"+M.util.get_string("h3","atto_title")+"
",a=""+M.util.get_string("h4","atto_title")+"
",f=""+M.util.get_string("h5","atto_title")+"
",l=""+M.util.get_string("pre","atto_title")+"",c=" "+M.util.get_string("blockquote","atto_title")+"
",h=""+M.util.get_string("p","atto_title")+"
";M.editor_atto.add_toolbar_menu(e.elementid,"title",e.icon,[{text:u,handler:t},{text:a,handler:n},{text:f,handler:r},{text:l,handler:i},{text:c,handler:s},{text:h,handler:o}])},change_title:function(e,t,n){e.preventDefault(),M.editor_atto.is_active(t)||M.editor_atto.focus(t),document.execCommand("formatBlock",!1,n)}}},"@VERSION@",{requires:["node"]});
+YUI.add("moodle-atto_title-button",function(e,t){M.atto_title=M.atto_title||{init:function(e){var t=function(e,t){M.atto_title.change_title(e,t,"")},n=function(e,t){M.atto_title.change_title(e,t,"")},r=function(e,t){M.atto_title.change_title(e,t,"")},i=function(e,t){M.atto_title.change_title(e,t,"")},s=function(e,t){M.atto_title.change_title(e,t,"")},o=function(e,t){M.atto_title.change_title(e,t,"")},u="
"+M.util.get_string("h3","atto_title")+"
",a=""+M.util.get_string("h4","atto_title")+"
",f=""+M.util.get_string("h5","atto_title")+"
",l=""+M.util.get_string("pre","atto_title")+"",c=" "+M.util.get_string("blockquote","atto_title")+"
",h=""+M.util.get_string("p","atto_title")+"
";M.editor_atto.add_toolbar_menu(e.elementid,"title",e.icon,e.group,[{text:u,handler:t},{text:a,handler:n},{text:f,handler:r},{text:l,handler:i},{text:c,handler:s},{text:h,handler:o}])},change_title:function(e,t,n){e.preventDefault(),M.editor_atto.is_active(t)||M.editor_atto.focus(t),document.execCommand("formatBlock",!1,n)}}},"@VERSION@",{requires:["node"]});
diff --git a/lib/editor/atto/plugins/title/yui/build/moodle-atto_title-button/moodle-atto_title-button.js b/lib/editor/atto/plugins/title/yui/build/moodle-atto_title-button/moodle-atto_title-button.js
index 641b0e5e92f..1908ff6bb6c 100644
--- a/lib/editor/atto/plugins/title/yui/build/moodle-atto_title-button/moodle-atto_title-button.js
+++ b/lib/editor/atto/plugins/title/yui/build/moodle-atto_title-button/moodle-atto_title-button.js
@@ -53,6 +53,7 @@ M.atto_title = M.atto_title || {
M.editor_atto.add_toolbar_menu(params.elementid,
'title',
params.icon,
+ params.group,
[
{'text' : h3, 'handler' : click_h3},
{'text' : h4, 'handler' : click_h4},
diff --git a/lib/editor/atto/plugins/title/yui/src/button/js/button.js b/lib/editor/atto/plugins/title/yui/src/button/js/button.js
index d6241e496b0..151311a591b 100644
--- a/lib/editor/atto/plugins/title/yui/src/button/js/button.js
+++ b/lib/editor/atto/plugins/title/yui/src/button/js/button.js
@@ -51,6 +51,7 @@ M.atto_title = M.atto_title || {
M.editor_atto.add_toolbar_menu(params.elementid,
'title',
params.icon,
+ params.group,
[
{'text' : h3, 'handler' : click_h3},
{'text' : h4, 'handler' : click_h4},
diff --git a/lib/editor/atto/plugins/underline/lib.php b/lib/editor/atto/plugins/underline/lib.php
index bde1f90be8a..946145df476 100644
--- a/lib/editor/atto/plugins/underline/lib.php
+++ b/lib/editor/atto/plugins/underline/lib.php
@@ -31,21 +31,21 @@ defined('MOODLE_INTERNAL') || die();
function atto_underline_init_editor($elementid) {
global $PAGE, $OUTPUT;
- $icon = $OUTPUT->pix_icon('underline',
+ $icon = $OUTPUT->pix_icon('e/underline',
get_string('underline', 'atto_underline'),
- 'atto_underline',
+ 'moodle',
array('class'=>'icon'));
$PAGE->requires->yui_module('moodle-atto_underline-button',
'M.atto_underline.init',
- array(array('elementid'=>$elementid, 'icon'=>$icon)),
+ array(array('elementid'=>$elementid, 'icon'=>$icon, 'group'=>'style')),
true);
}
/**
* Return the order this plugin should be displayed in the toolbar
- * @return int
+ * @return int the absolute position within the toolbar
*/
function atto_underline_sort_order() {
return 2;
diff --git a/lib/editor/atto/plugins/underline/pix/underline.png b/lib/editor/atto/plugins/underline/pix/underline.png
deleted file mode 100644
index 329e4970db0..00000000000
Binary files a/lib/editor/atto/plugins/underline/pix/underline.png and /dev/null differ
diff --git a/lib/editor/atto/plugins/underline/pix/underline.svg b/lib/editor/atto/plugins/underline/pix/underline.svg
deleted file mode 100644
index 1d1feb4d523..00000000000
--- a/lib/editor/atto/plugins/underline/pix/underline.svg
+++ /dev/null
@@ -1,73 +0,0 @@
-
-
-
-
diff --git a/lib/editor/atto/plugins/underline/yui/build/moodle-atto_underline-button/moodle-atto_underline-button-debug.js b/lib/editor/atto/plugins/underline/yui/build/moodle-atto_underline-button/moodle-atto_underline-button-debug.js
index caa347e4017..218a6705384 100644
--- a/lib/editor/atto/plugins/underline/yui/build/moodle-atto_underline-button/moodle-atto_underline-button-debug.js
+++ b/lib/editor/atto/plugins/underline/yui/build/moodle-atto_underline-button/moodle-atto_underline-button-debug.js
@@ -32,7 +32,7 @@ M.atto_underline = M.atto_underline || {
document.execCommand('underline', false, null);
};
- M.editor_atto.add_toolbar_button(params.elementid, 'underline', params.icon, click);
+ M.editor_atto.add_toolbar_button(params.elementid, 'underline', params.icon, params.group, click);
}
};
diff --git a/lib/editor/atto/plugins/underline/yui/build/moodle-atto_underline-button/moodle-atto_underline-button-min.js b/lib/editor/atto/plugins/underline/yui/build/moodle-atto_underline-button/moodle-atto_underline-button-min.js
index 6954ce22235..86d3a2f098e 100644
--- a/lib/editor/atto/plugins/underline/yui/build/moodle-atto_underline-button/moodle-atto_underline-button-min.js
+++ b/lib/editor/atto/plugins/underline/yui/build/moodle-atto_underline-button/moodle-atto_underline-button-min.js
@@ -1 +1 @@
-YUI.add("moodle-atto_underline-button",function(e,t){M.atto_underline=M.atto_underline||{init:function(e){var t=function(e,t){e.preventDefault(),M.editor_atto.is_active(t)||M.editor_atto.focus(t),document.execCommand("underline",!1,null)};M.editor_atto.add_toolbar_button(e.elementid,"underline",e.icon,t)}}},"@VERSION@",{requires:["node"]});
+YUI.add("moodle-atto_underline-button",function(e,t){M.atto_underline=M.atto_underline||{init:function(e){var t=function(e,t){e.preventDefault(),M.editor_atto.is_active(t)||M.editor_atto.focus(t),document.execCommand("underline",!1,null)};M.editor_atto.add_toolbar_button(e.elementid,"underline",e.icon,e.group,t)}}},"@VERSION@",{requires:["node"]});
diff --git a/lib/editor/atto/plugins/underline/yui/build/moodle-atto_underline-button/moodle-atto_underline-button.js b/lib/editor/atto/plugins/underline/yui/build/moodle-atto_underline-button/moodle-atto_underline-button.js
index caa347e4017..218a6705384 100644
--- a/lib/editor/atto/plugins/underline/yui/build/moodle-atto_underline-button/moodle-atto_underline-button.js
+++ b/lib/editor/atto/plugins/underline/yui/build/moodle-atto_underline-button/moodle-atto_underline-button.js
@@ -32,7 +32,7 @@ M.atto_underline = M.atto_underline || {
document.execCommand('underline', false, null);
};
- M.editor_atto.add_toolbar_button(params.elementid, 'underline', params.icon, click);
+ M.editor_atto.add_toolbar_button(params.elementid, 'underline', params.icon, params.group, click);
}
};
diff --git a/lib/editor/atto/plugins/underline/yui/src/button/js/button.js b/lib/editor/atto/plugins/underline/yui/src/button/js/button.js
index f4ac98f8806..973461022af 100644
--- a/lib/editor/atto/plugins/underline/yui/src/button/js/button.js
+++ b/lib/editor/atto/plugins/underline/yui/src/button/js/button.js
@@ -30,6 +30,6 @@ M.atto_underline = M.atto_underline || {
document.execCommand('underline', false, null);
};
- M.editor_atto.add_toolbar_button(params.elementid, 'underline', params.icon, click);
+ M.editor_atto.add_toolbar_button(params.elementid, 'underline', params.icon, params.group, click);
}
};
diff --git a/lib/editor/atto/plugins/unlink/lib.php b/lib/editor/atto/plugins/unlink/lib.php
index eef044961ac..b1023b046c5 100644
--- a/lib/editor/atto/plugins/unlink/lib.php
+++ b/lib/editor/atto/plugins/unlink/lib.php
@@ -29,21 +29,21 @@
function atto_unlink_init_editor($elementid) {
global $PAGE, $OUTPUT;
- $icon = $OUTPUT->pix_icon('unlink',
+ $icon = $OUTPUT->pix_icon('e/remove_link',
get_string('unlink', 'atto_unlink'),
- 'atto_unlink',
+ 'moodle',
array('class'=>'icon'));
$PAGE->requires->yui_module('moodle-atto_unlink-button',
'M.atto_unlink.init',
- array(array('elementid'=>$elementid, 'icon'=>$icon)),
+ array(array('elementid'=>$elementid, 'icon'=>$icon, 'group'=>'link')),
true);
}
/**
* Return the order this plugin should be displayed in the toolbar
- * @return int
+ * @return int the absolute position within the toolbar
*/
function atto_unlink_sort_order() {
return 12;
diff --git a/lib/editor/atto/plugins/unlink/pix/unlink.png b/lib/editor/atto/plugins/unlink/pix/unlink.png
deleted file mode 100644
index 1dbbb9ccd0c..00000000000
Binary files a/lib/editor/atto/plugins/unlink/pix/unlink.png and /dev/null differ
diff --git a/lib/editor/atto/plugins/unlink/pix/unlink.svg b/lib/editor/atto/plugins/unlink/pix/unlink.svg
deleted file mode 100644
index 79126bcda80..00000000000
--- a/lib/editor/atto/plugins/unlink/pix/unlink.svg
+++ /dev/null
@@ -1,92 +0,0 @@
-
-
-
-
diff --git a/lib/editor/atto/plugins/unlink/yui/build/moodle-atto_unlink-button/moodle-atto_unlink-button-debug.js b/lib/editor/atto/plugins/unlink/yui/build/moodle-atto_unlink-button/moodle-atto_unlink-button-debug.js
index 365a993c350..89959a891b3 100644
--- a/lib/editor/atto/plugins/unlink/yui/build/moodle-atto_unlink-button/moodle-atto_unlink-button-debug.js
+++ b/lib/editor/atto/plugins/unlink/yui/build/moodle-atto_unlink-button/moodle-atto_unlink-button-debug.js
@@ -32,7 +32,7 @@ M.atto_unlink = M.atto_unlink || {
document.execCommand('unlink', false, null);
};
- M.editor_atto.add_toolbar_button(params.elementid, 'unlink', params.icon, click);
+ M.editor_atto.add_toolbar_button(params.elementid, 'unlink', params.icon, params.group, click);
}
};
diff --git a/lib/editor/atto/plugins/unlink/yui/build/moodle-atto_unlink-button/moodle-atto_unlink-button-min.js b/lib/editor/atto/plugins/unlink/yui/build/moodle-atto_unlink-button/moodle-atto_unlink-button-min.js
index 4f412d02606..c306b0a19ea 100644
--- a/lib/editor/atto/plugins/unlink/yui/build/moodle-atto_unlink-button/moodle-atto_unlink-button-min.js
+++ b/lib/editor/atto/plugins/unlink/yui/build/moodle-atto_unlink-button/moodle-atto_unlink-button-min.js
@@ -1 +1 @@
-YUI.add("moodle-atto_unlink-button",function(e,t){M.atto_unlink=M.atto_unlink||{init:function(e){var t=function(e,t){e.preventDefault(),M.editor_atto.is_active(t)||M.editor_atto.focus(t),document.execCommand("unlink",!1,null)};M.editor_atto.add_toolbar_button(e.elementid,"unlink",e.icon,t)}}},"@VERSION@",{requires:["node"]});
+YUI.add("moodle-atto_unlink-button",function(e,t){M.atto_unlink=M.atto_unlink||{init:function(e){var t=function(e,t){e.preventDefault(),M.editor_atto.is_active(t)||M.editor_atto.focus(t),document.execCommand("unlink",!1,null)};M.editor_atto.add_toolbar_button(e.elementid,"unlink",e.icon,e.group,t)}}},"@VERSION@",{requires:["node"]});
diff --git a/lib/editor/atto/plugins/unlink/yui/build/moodle-atto_unlink-button/moodle-atto_unlink-button.js b/lib/editor/atto/plugins/unlink/yui/build/moodle-atto_unlink-button/moodle-atto_unlink-button.js
index 365a993c350..89959a891b3 100644
--- a/lib/editor/atto/plugins/unlink/yui/build/moodle-atto_unlink-button/moodle-atto_unlink-button.js
+++ b/lib/editor/atto/plugins/unlink/yui/build/moodle-atto_unlink-button/moodle-atto_unlink-button.js
@@ -32,7 +32,7 @@ M.atto_unlink = M.atto_unlink || {
document.execCommand('unlink', false, null);
};
- M.editor_atto.add_toolbar_button(params.elementid, 'unlink', params.icon, click);
+ M.editor_atto.add_toolbar_button(params.elementid, 'unlink', params.icon, params.group, click);
}
};
diff --git a/lib/editor/atto/plugins/unlink/yui/src/button/js/button.js b/lib/editor/atto/plugins/unlink/yui/src/button/js/button.js
index fd19d81ea2a..73923fba978 100644
--- a/lib/editor/atto/plugins/unlink/yui/src/button/js/button.js
+++ b/lib/editor/atto/plugins/unlink/yui/src/button/js/button.js
@@ -30,6 +30,6 @@ M.atto_unlink = M.atto_unlink || {
document.execCommand('unlink', false, null);
};
- M.editor_atto.add_toolbar_button(params.elementid, 'unlink', params.icon, click);
+ M.editor_atto.add_toolbar_button(params.elementid, 'unlink', params.icon, params.group, click);
}
};
diff --git a/lib/editor/atto/plugins/unorderedlist/lib.php b/lib/editor/atto/plugins/unorderedlist/lib.php
index 6224f905bab..b70903eb262 100644
--- a/lib/editor/atto/plugins/unorderedlist/lib.php
+++ b/lib/editor/atto/plugins/unorderedlist/lib.php
@@ -29,21 +29,21 @@
function atto_unorderedlist_init_editor($elementid) {
global $PAGE, $OUTPUT;
- $icon = $OUTPUT->pix_icon('unorderedlist',
+ $icon = $OUTPUT->pix_icon('e/bullet_list',
get_string('unorderedlist', 'atto_unorderedlist'),
- 'atto_unorderedlist',
+ 'moodle',
array('class'=>'icon'));
$PAGE->requires->yui_module('moodle-atto_unorderedlist-button',
'M.atto_unorderedlist.init',
- array(array('elementid'=>$elementid, 'icon'=>$icon)),
+ array(array('elementid'=>$elementid, 'icon'=>$icon, 'group'=>'list')),
true);
}
/**
* Return the order this plugin should be displayed in the toolbar
- * @return int
+ * @return int the absolute position within the toolbar
*/
function atto_unorderedlist_sort_order() {
return 7;
diff --git a/lib/editor/atto/plugins/unorderedlist/pix/unorderedlist.png b/lib/editor/atto/plugins/unorderedlist/pix/unorderedlist.png
deleted file mode 100644
index 95b9d12d548..00000000000
Binary files a/lib/editor/atto/plugins/unorderedlist/pix/unorderedlist.png and /dev/null differ
diff --git a/lib/editor/atto/plugins/unorderedlist/pix/unorderedlist.svg b/lib/editor/atto/plugins/unorderedlist/pix/unorderedlist.svg
deleted file mode 100644
index 8cf123137e3..00000000000
--- a/lib/editor/atto/plugins/unorderedlist/pix/unorderedlist.svg
+++ /dev/null
@@ -1,111 +0,0 @@
-
-
-
-
diff --git a/lib/editor/atto/plugins/unorderedlist/yui/build/moodle-atto_unorderedlist-button/moodle-atto_unorderedlist-button-debug.js b/lib/editor/atto/plugins/unorderedlist/yui/build/moodle-atto_unorderedlist-button/moodle-atto_unorderedlist-button-debug.js
index 4915b2e40d7..e430b83d2fc 100644
--- a/lib/editor/atto/plugins/unorderedlist/yui/build/moodle-atto_unorderedlist-button/moodle-atto_unorderedlist-button-debug.js
+++ b/lib/editor/atto/plugins/unorderedlist/yui/build/moodle-atto_unorderedlist-button/moodle-atto_unorderedlist-button-debug.js
@@ -32,7 +32,7 @@ M.atto_unorderedlist = M.atto_unorderedlist || {
document.execCommand('insertUnorderedList', false, null);
};
- M.editor_atto.add_toolbar_button(params.elementid, 'unorderedlist', params.icon, click);
+ M.editor_atto.add_toolbar_button(params.elementid, 'unorderedlist', params.icon, params.group, click);
}
};
diff --git a/lib/editor/atto/plugins/unorderedlist/yui/build/moodle-atto_unorderedlist-button/moodle-atto_unorderedlist-button-min.js b/lib/editor/atto/plugins/unorderedlist/yui/build/moodle-atto_unorderedlist-button/moodle-atto_unorderedlist-button-min.js
index 5694eae1bf4..dc606fc7f52 100644
--- a/lib/editor/atto/plugins/unorderedlist/yui/build/moodle-atto_unorderedlist-button/moodle-atto_unorderedlist-button-min.js
+++ b/lib/editor/atto/plugins/unorderedlist/yui/build/moodle-atto_unorderedlist-button/moodle-atto_unorderedlist-button-min.js
@@ -1 +1 @@
-YUI.add("moodle-atto_unorderedlist-button",function(e,t){M.atto_unorderedlist=M.atto_unorderedlist||{init:function(e){var t=function(e,t){e.preventDefault(),M.editor_atto.is_active(t)||M.editor_atto.focus(t),document.execCommand("insertUnorderedList",!1,null)};M.editor_atto.add_toolbar_button(e.elementid,"unorderedlist",e.icon,t)}}},"@VERSION@",{requires:["node"]});
+YUI.add("moodle-atto_unorderedlist-button",function(e,t){M.atto_unorderedlist=M.atto_unorderedlist||{init:function(e){var t=function(e,t){e.preventDefault(),M.editor_atto.is_active(t)||M.editor_atto.focus(t),document.execCommand("insertUnorderedList",!1,null)};M.editor_atto.add_toolbar_button(e.elementid,"unorderedlist",e.icon,e.group,t)}}},"@VERSION@",{requires:["node"]});
diff --git a/lib/editor/atto/plugins/unorderedlist/yui/build/moodle-atto_unorderedlist-button/moodle-atto_unorderedlist-button.js b/lib/editor/atto/plugins/unorderedlist/yui/build/moodle-atto_unorderedlist-button/moodle-atto_unorderedlist-button.js
index 4915b2e40d7..e430b83d2fc 100644
--- a/lib/editor/atto/plugins/unorderedlist/yui/build/moodle-atto_unorderedlist-button/moodle-atto_unorderedlist-button.js
+++ b/lib/editor/atto/plugins/unorderedlist/yui/build/moodle-atto_unorderedlist-button/moodle-atto_unorderedlist-button.js
@@ -32,7 +32,7 @@ M.atto_unorderedlist = M.atto_unorderedlist || {
document.execCommand('insertUnorderedList', false, null);
};
- M.editor_atto.add_toolbar_button(params.elementid, 'unorderedlist', params.icon, click);
+ M.editor_atto.add_toolbar_button(params.elementid, 'unorderedlist', params.icon, params.group, click);
}
};
diff --git a/lib/editor/atto/plugins/unorderedlist/yui/src/button/js/button.js b/lib/editor/atto/plugins/unorderedlist/yui/src/button/js/button.js
index e86e3e9f84f..6e1d30cf283 100644
--- a/lib/editor/atto/plugins/unorderedlist/yui/src/button/js/button.js
+++ b/lib/editor/atto/plugins/unorderedlist/yui/src/button/js/button.js
@@ -30,6 +30,6 @@ M.atto_unorderedlist = M.atto_unorderedlist || {
document.execCommand('insertUnorderedList', false, null);
};
- M.editor_atto.add_toolbar_button(params.elementid, 'unorderedlist', params.icon, click);
+ M.editor_atto.add_toolbar_button(params.elementid, 'unorderedlist', params.icon, params.group, click);
}
};
diff --git a/lib/editor/atto/styles.css b/lib/editor/atto/styles.css
index e794e853fe6..a633da9a542 100644
--- a/lib/editor/atto/styles.css
+++ b/lib/editor/atto/styles.css
@@ -11,20 +11,25 @@ div.editor_atto {
div.editor_atto_toolbar {
display: block;
background: #F2F2F2;
- min-height: 36px;
+ min-height: 42px;
border-top: 1px solid #BBB;
border-left: 1px solid #BBB;
border-right: 1px solid #BBB;
+ padding: 0 0 9px 0;
}
div.editor_atto_toolbar button {
- margin-top: 5px;
- margin-bottom: 0px;
- padding: 3px;
+ padding: 5px 9px 4px 9px;
background: none;
- border: none;
+ border: 0px;
+ margin: 0;
+ border-radius: 0;
}
+div.editor_atto_toolbar button + button {
+ border-left: 1px solid #CCC;
+}
+
div.editor_atto_toolbar button[disabled] {
opacity: .45;
}
@@ -33,30 +38,20 @@ div.editor_atto_toolbar button img {
padding: 1px;
}
-div.editor_atto_toolbar button.atto_strike_button,
-div.editor_atto_toolbar button.atto_unorderedlist_button,
-div.editor_atto_toolbar button.atto_clear_button,
-div.editor_atto_toolbar button.atto_indent_button {
- margin-right: 1em;
-}
-body.dir-rtl div.editor_atto_toolbar button.atto_strike_button,
-body.dir-rtl div.editor_atto_toolbar button.atto_unorderedlist_button,
-body.dir-rtl div.editor_atto_toolbar button.atto_clear_button,
-body.dir-rtl div.editor_atto_toolbar button.atto_indent_button {
- margin-right: 0px;
- margin-left: 1em;
-}
-.atto_hasmenu .icon {
- width: 32px;
+div.editor_atto_toolbar div.atto_group {
+ display: inline-block;
+ border: 1px solid #CCC;
+ border-bottom: 1px solid #B3B3B3;
+ border-radius: 4px;
+ margin: 9px 0px 0px 9px;
+ background: #FFF;
}
.editor_atto img {
resize: both; overflow: auto;
}
-.atto_menuentry {
- clear: left;
-}
+
.atto_menuentry img {
width: 16px;
height: 16px;
@@ -74,6 +69,7 @@ body.dir-rtl div.editor_atto_toolbar button.atto_indent_button {
.atto_menuentry {
border-bottom: 1px solid #eee;
padding: 2px;
+ clear: left;
}
.atto_menuentry h1,
@@ -88,3 +84,16 @@ body.dir-rtl div.editor_atto_toolbar button.atto_indent_button {
margin: 5px;
}
+/* RTL Rules */
+body.dir-rtl div.editor_atto_toolbar button + button {
+ border-left: 0;
+ border-right: 1px solid #CCC;
+}
+
+body.dir-rtl div.editor_atto_toolbar img.icon {
+ padding: 0;
+}
+
+body.dir-rtl div.editor_atto_toolbar div.atto_group {
+ margin: 9px 9px 0px 0px;
+}
diff --git a/lib/editor/atto/yui/build/moodle-editor_atto-editor/moodle-editor_atto-editor-debug.js b/lib/editor/atto/yui/build/moodle-editor_atto-editor/moodle-editor_atto-editor-debug.js
index 495df236b09..2ebeb90b866 100644
--- a/lib/editor/atto/yui/build/moodle-editor_atto-editor/moodle-editor_atto-editor-debug.js
+++ b/lib/editor/atto/yui/build/moodle-editor_atto-editor/moodle-editor_atto-editor-debug.js
@@ -154,17 +154,23 @@ M.editor_atto = M.editor_atto || {
* @param string elementid - the id of the textarea we created this editor from.
* @param string plugin - the plugin defining the button
* @param string icon - the html used for the content of the button
+ * @param string groupname - the group the button should be appended to.
* @handler function handler- A function to call when the button is clicked.
*/
- add_toolbar_menu : function(elementid, plugin, icon, entries) {
- var toolbar = Y.one('#' + elementid + '_toolbar');
+ add_toolbar_menu : function(elementid, plugin, icon, groupname, entries) {
+ var toolbar = Y.one('#' + elementid + '_toolbar'),
+ group = Y.one('#' + elementid + '_toolbar .atto_group.' + groupname + '_group');
+ if (!group) {
+ group = Y.Node.create('');
+ toolbar.append(group);
+ }
var button = Y.Node.create('');
- toolbar.append(button);
+ group.append(button);
// Save the name of the plugin.
M.editor_atto.widgets[plugin] = plugin;
@@ -215,12 +221,18 @@ M.editor_atto = M.editor_atto || {
/**
* Add a button to the toolbar belonging to the editor for element with id "elementid".
* @param string elementid - the id of the textarea we created this editor from.
- * @param string plugin - the plugin defining the button
- * @param string icon - the html used for the content of the button
+ * @param string plugin - the plugin defining the button.
+ * @param string icon - the html used for the content of the button.
+ * @param string groupname - the group the button should be appended to.
* @handler function handler- A function to call when the button is clicked.
*/
- add_toolbar_button : function(elementid, plugin, icon, handler) {
- var toolbar = Y.one('#' + elementid + '_toolbar');
+ add_toolbar_button : function(elementid, plugin, icon, groupname, handler) {
+ var toolbar = Y.one('#' + elementid + '_toolbar'),
+ group = Y.one('#' + elementid + '_toolbar .atto_group.' + groupname + '_group');
+ if (!group) {
+ group = Y.Node.create('');
+ toolbar.append(group);
+ }
var button = Y.Node.create('