Commit 49a510ef authored by Andrew Nicols's avatar Andrew Nicols
Browse files

MDL-44241 atto_unlink: Merge into atto_link

parent 1a727e12
......@@ -936,7 +936,7 @@ class core_plugin_manager {
'equation', 'fontcolor', 'html', 'image', 'indent', 'italic',
'link', 'managefiles', 'media', 'noautolink', 'orderedlist',
'rtl', 'strike', 'subscript', 'superscript', 'table', 'title',
'underline', 'undo', 'unlink', 'unorderedlist'
'underline', 'undo', 'unorderedlist'
),
'assignment' => array(
......
......@@ -27,3 +27,4 @@ $string['createlink'] = 'Create link';
$string['enterurl'] = 'Enter a URL';
$string['openinnewwindow'] = 'Open in new window';
$string['pluginname'] = 'Link';
$string['unlink'] = 'Unlink';
......@@ -32,6 +32,7 @@ function atto_link_strings_for_js() {
global $PAGE;
$PAGE->requires->strings_for_js(array('createlink',
'unlink',
'enterurl',
'browserepositories',
'openinnewwindow'),
......
File suppressed by a .gitattributes entry or the file's encoding is unsupported.
File suppressed by a .gitattributes entry or the file's encoding is unsupported.
File suppressed by a .gitattributes entry or the file's encoding is unsupported.
......@@ -75,11 +75,22 @@ Y.namespace('M.atto_link').Button = Y.Base.create('button', Y.M.editor_atto.Edit
_content: null,
initializer: function() {
// Add the link button first.
this.addButton({
icon: 'e/insert_edit_link',
callback: this._displayDialogue,
tags: 'a'
});
// And then the unlink button.
this.addBasicButton({
exec: 'unlink',
icon: 'e/remove_link',
title: 'unlink',
// Watch the following tags and add/remove highlighting as appropriate:
tags: 'a'
});
},
/**
......
<?php
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Moodle is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
/**
* Strings for component 'atto_unlink', language 'en'.
*
* @package atto_unlink
* @copyright 2013 Damyon Wiese <damyon@moodle.com>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
$string['pluginname'] = 'Unlink';
<?php
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Moodle is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
/**
* Atto text editor integration version file.
*
* @package atto_unlink
* @copyright 2013 Damyon Wiese <damyon@moodle.com>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
defined('MOODLE_INTERNAL') || die();
$plugin->version = 2014012800; // The current plugin version (Date: YYYYMMDDXX).
$plugin->requires = 2013110500; // Requires this Moodle version.
$plugin->component = 'atto_unlink'; // Full name of the plugin (used for diagnostics).
File suppressed by a .gitattributes entry or the file's encoding is unsupported.
File suppressed by a .gitattributes entry or the file's encoding is unsupported.
File suppressed by a .gitattributes entry or the file's encoding is unsupported.
{
"name": "moodle-atto_unlink-button",
"builds": {
"moodle-atto_unlink-button": {
"jsfiles": [
"button.js"
]
}
}
}
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Moodle is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
/*
* @package atto_unlink
* @copyright 2013 Damyon Wiese <damyon@moodle.com>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
/**
* @module moodle-atto_unlink-button
*/
/**
* Atto text editor unlink plugin.
*
* @namespace M.atto_unlink
* @class button
* @extends M.editor_atto.EditorPlugin
*/
Y.namespace('M.atto_unlink').Button = Y.Base.create('button', Y.M.editor_atto.EditorPlugin, [], {
initializer: function() {
this.addBasicButton({
exec: 'unlink',
icon: 'e/remove_link',
// Watch the following tags and add/remove highlighting as appropriate:
tags: 'a'
});
}
});
{
"moodle-atto_unlink-button": {
"requires": [
"moodle-editor_atto-plugin"
]
}
}
......@@ -35,7 +35,7 @@ if ($ADMIN->fulltree) {
$default = 'collapse = collapse
style1 = title, bold, italic
list = unorderedlist, orderedlist
links = link, unlink, noautolink
links = link, noautolink
files = image, media, managefiles
style2 = underline, strike, subscript, superscript
align = align
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment