MDL-45403 editor_atto: Change default for tagMarchRequiresAll to true
authorFrederic Massart <fred@moodle.com>
Mon, 5 May 2014 04:28:33 +0000 (12:28 +0800)
committerFrederic Massart <fred@moodle.com>
Mon, 5 May 2014 09:47:54 +0000 (17:47 +0800)
lib/editor/atto/plugins/link/yui/build/moodle-atto_link-button/moodle-atto_link-button-debug.js
lib/editor/atto/plugins/link/yui/build/moodle-atto_link-button/moodle-atto_link-button-min.js
lib/editor/atto/plugins/link/yui/build/moodle-atto_link-button/moodle-atto_link-button.js
lib/editor/atto/plugins/link/yui/src/button/js/button.js
lib/editor/atto/yui/build/moodle-editor_atto-plugin/moodle-editor_atto-plugin-debug.js
lib/editor/atto/yui/build/moodle-editor_atto-plugin/moodle-editor_atto-plugin-min.js
lib/editor/atto/yui/build/moodle-editor_atto-plugin/moodle-editor_atto-plugin.js
lib/editor/atto/yui/src/editor/js/editor-plugin-buttons.js

index bd541a3..a995bf2 100644 (file)
Binary files a/lib/editor/atto/plugins/link/yui/build/moodle-atto_link-button/moodle-atto_link-button-debug.js and b/lib/editor/atto/plugins/link/yui/build/moodle-atto_link-button/moodle-atto_link-button-debug.js differ
index bc5047e..14062ce 100644 (file)
Binary files a/lib/editor/atto/plugins/link/yui/build/moodle-atto_link-button/moodle-atto_link-button-min.js and b/lib/editor/atto/plugins/link/yui/build/moodle-atto_link-button/moodle-atto_link-button-min.js differ
index bd541a3..a995bf2 100644 (file)
Binary files a/lib/editor/atto/plugins/link/yui/build/moodle-atto_link-button/moodle-atto_link-button.js and b/lib/editor/atto/plugins/link/yui/build/moodle-atto_link-button/moodle-atto_link-button.js differ
index 7b12e8e..85fbbaf 100644 (file)
@@ -79,7 +79,8 @@ Y.namespace('M.atto_link').Button = Y.Base.create('button', Y.M.editor_atto.Edit
         this.addButton({
             icon: 'e/insert_edit_link',
             callback: this._displayDialogue,
-            tags: 'a'
+            tags: 'a',
+            tagMatchRequiresAll: false
         });
 
         // And then the unlink button.
@@ -90,7 +91,8 @@ Y.namespace('M.atto_link').Button = Y.Base.create('button', Y.M.editor_atto.Edit
             title: 'unlink',
 
             // Watch the following tags and add/remove highlighting as appropriate:
-            tags: 'a'
+            tags: 'a',
+            tagMatchRequiresAll: false
         });
     },
 
index cccc699..72171dd 100644 (file)
Binary files a/lib/editor/atto/yui/build/moodle-editor_atto-plugin/moodle-editor_atto-plugin-debug.js and b/lib/editor/atto/yui/build/moodle-editor_atto-plugin/moodle-editor_atto-plugin-debug.js differ
index e933bc6..0229028 100644 (file)
Binary files a/lib/editor/atto/yui/build/moodle-editor_atto-plugin/moodle-editor_atto-plugin-min.js and b/lib/editor/atto/yui/build/moodle-editor_atto-plugin/moodle-editor_atto-plugin-min.js differ
index c18a275..07f3f1a 100644 (file)
Binary files a/lib/editor/atto/yui/build/moodle-editor_atto-plugin/moodle-editor_atto-plugin.js and b/lib/editor/atto/yui/build/moodle-editor_atto-plugin/moodle-editor_atto-plugin.js differ
index 843aa54..fb2a931 100644 (file)
@@ -167,9 +167,9 @@ EditorPluginButtons.prototype = {
      * If multiple key bindings are supplied to config.keys, then only the first is used.
      * If set to false, then no description is added to the title.
      * @param {string} [config.tags] The tags that trigger this button to be highlighted.
-     * @param {boolean} [config.tagMatchRequiresAll=false] Working in combination with the tags parameter, highlight
-     * this button when any match is good enough.
-     *
+     * @param {boolean} [config.tagMatchRequiresAll=true] Working in combination with the tags parameter, when true
+     * every tag of the selection has to match. When false, only one match is needed. Only set this to false when
+     * necessary as it is much less efficient.
      * See {{#crossLink "M.editor_atto.EditorSelection/selectionFilterMatches:method"}}{{/crossLink}} for more information.
      * @param {string} [config.title=this.name] The string identifier in the plugin's language file.
      * @param {string} [config.buttonName=this.name] The name of the button. This is used in the buttons object, and if
@@ -250,7 +250,7 @@ EditorPluginButtons.prototype = {
 
         // Handle highlighting of the button.
         if (config.tags) {
-            var tagMatchRequiresAll = false;
+            var tagMatchRequiresAll = true;
             if (typeof config.tagMatchRequiresAll === 'boolean') {
                 tagMatchRequiresAll = config.tagMatchRequiresAll;
             }