���ѧۧݧ�ӧ�� �ާ֧ߧ֧էا֧� - ���֧էѧܧ�ڧ��ӧѧ�� - /home3/cpr76684/public_html/superscript.tar
���ѧ٧ѧ�
tests/behat/superscript.feature 0000644 00000002725 15152273053 0012742 0 ustar 00 @editor @editor_atto @atto @atto_superscript @_bug_phantomjs Feature: Atto superscript button To format text in Atto, I need to use the superscript button. @javascript Scenario: Subscript some text Given I log in as "admin" And I open my profile in edit mode And I set the field "Description" to "Helicopter" And I select the text in the "Description" Atto editor And I click on "Show more buttons" "button" When I click on "Superscript" "button" And I press "Update profile" And I follow "Preferences" in the user menu And I follow "Editor preferences" And I set the field "Text editor" to "Plain text area" And I press "Save changes" And I click on "Edit profile" "link" in the "region-main" "region" Then I should see "<sup>Helicopter</sup>" @javascript Scenario: Superscript some text that is enclosed in subscript Given I log in as "admin" And I open my profile in edit mode And I set the field "Description" to "<sub>Helicopter</sub>" And I select the text in the "Description" Atto editor And I click on "Show more buttons" "button" When I click on "Superscript" "button" And I press "Update profile" And I follow "Preferences" in the user menu And I follow "Editor preferences" And I set the field "Text editor" to "Plain text area" And I press "Save changes" And I click on "Edit profile" "link" in the "region-main" "region" Then I should see "<sup>Helicopter</sup>" version.php 0000644 00000002263 15152273053 0006750 0 ustar 00 <?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_superscript * @copyright 2014 Rossiani Wijaya <rwijaya@moodle.com> * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ defined('MOODLE_INTERNAL') || die(); $plugin->version = 2022112800; // The current plugin version (Date: YYYYMMDDXX). $plugin->requires = 2022111800; // Requires this Moodle version. $plugin->component = 'atto_superscript'; // Full name of the plugin (used for diagnostics). classes/privacy/provider.php 0000644 00000003015 15152273053 0012223 0 ustar 00 <?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/>. /** * Privacy Subsystem implementation for block_activity_modules. * * @package atto_superscript * @copyright 2018 Andrew Nicols <andrew@nicols.co.uk> * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ namespace atto_superscript\privacy; defined('MOODLE_INTERNAL') || die(); /** * Privacy Subsystem for atto_superscript implementing null_provider. * * @copyright 2018 Andrew Nicols <andrew@nicols.co.uk> * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ class provider implements \core_privacy\local\metadata\null_provider { /** * Get the language string identifier with the component's language * file to explain why this plugin stores no data. * * @return string */ public static function get_reason() : string { return 'privacy:metadata'; } } yui/build/moodle-atto_superscript-button/moodle-atto_superscript-button-debug.js 0000644 00000005357 15152273053 0024510 0 ustar 00 YUI.add('moodle-atto_superscript-button', function (Y, NAME) { // 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_superscript * @copyright 2014 Rosiana Wijaya <rwijaya@moodle.com> * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ /** * @module moodle-atto_superscript-button */ /** * Atto text editor superscript plugin. * * @namespace M.atto_superscript * @class button * @extends M.editor_atto.EditorPlugin */ Y.namespace('M.atto_superscript').Button = Y.Base.create('button', Y.M.editor_atto.EditorPlugin, [], { /** * A rangy object to alter CSS classes. * * @property _subscriptApplier * @type Object * @private */ _subscriptApplier: null, /** * A rangy object to alter CSS classes. * * @property _superscriptApplier * @type Object * @private */ _superscriptApplier: null, initializer: function() { this.addButton({ buttonName: 'superscript', callback: this.toggleSuperscript, icon: 'e/superscript', inlineFormat: true, // Watch the following tags and add/remove highlighting as appropriate: tags: 'sup' }); this._subscriptApplier = window.rangy.createClassApplier("editor-subscript"); this._superscriptApplier = window.rangy.createClassApplier("editor-superscript"); }, /** * Toggle superscripts in selection * * @method toggleSuperscript */ toggleSuperscript: function() { // Replace all the sub and sup tags. this.get('host').changeToCSS('sub', 'editor-subscript'); this.get('host').changeToCSS('sup', 'editor-superscript'); // Remove all subscripts inselection and toggle superscript. this._superscriptApplier.toggleSelection(); this._subscriptApplier.undoToSelection(); // Replace CSS classes with tags. this.get('host').changeToTags('editor-superscript', 'sup'); this.get('host').changeToTags('editor-subscript', 'sub'); } }); }, '@VERSION@', {"requires": ["moodle-editor_atto-plugin"]}); yui/build/moodle-atto_superscript-button/moodle-atto_superscript-button-min.js 0000644 00000001602 15152273053 0024172 0 ustar 00 YUI.add("moodle-atto_superscript-button",function(t,s){t.namespace("M.atto_superscript").Button=t.Base.create("button",t.M.editor_atto.EditorPlugin,[],{_subscriptApplier:null,_superscriptApplier:null,initializer:function(){this.addButton({buttonName:"superscript",callback:this.toggleSuperscript,icon:"e/superscript",inlineFormat:!0,tags:"sup"}),this._subscriptApplier=window.rangy.createClassApplier("editor-subscript"),this._superscriptApplier=window.rangy.createClassApplier("editor-superscript")},toggleSuperscript:function(){this.get("host").changeToCSS("sub","editor-subscript"),this.get("host").changeToCSS("sup","editor-superscript"),this._superscriptApplier.toggleSelection(),this._subscriptApplier.undoToSelection(),this.get("host").changeToTags("editor-superscript","sup"),this.get("host").changeToTags("editor-subscript","sub")}})},"@VERSION@",{requires:["moodle-editor_atto-plugin"]}); yui/build/moodle-atto_superscript-button/moodle-atto_superscript-button.js 0000644 00000005357 15152273054 0023425 0 ustar 00 YUI.add('moodle-atto_superscript-button', function (Y, NAME) { // 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_superscript * @copyright 2014 Rosiana Wijaya <rwijaya@moodle.com> * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ /** * @module moodle-atto_superscript-button */ /** * Atto text editor superscript plugin. * * @namespace M.atto_superscript * @class button * @extends M.editor_atto.EditorPlugin */ Y.namespace('M.atto_superscript').Button = Y.Base.create('button', Y.M.editor_atto.EditorPlugin, [], { /** * A rangy object to alter CSS classes. * * @property _subscriptApplier * @type Object * @private */ _subscriptApplier: null, /** * A rangy object to alter CSS classes. * * @property _superscriptApplier * @type Object * @private */ _superscriptApplier: null, initializer: function() { this.addButton({ buttonName: 'superscript', callback: this.toggleSuperscript, icon: 'e/superscript', inlineFormat: true, // Watch the following tags and add/remove highlighting as appropriate: tags: 'sup' }); this._subscriptApplier = window.rangy.createClassApplier("editor-subscript"); this._superscriptApplier = window.rangy.createClassApplier("editor-superscript"); }, /** * Toggle superscripts in selection * * @method toggleSuperscript */ toggleSuperscript: function() { // Replace all the sub and sup tags. this.get('host').changeToCSS('sub', 'editor-subscript'); this.get('host').changeToCSS('sup', 'editor-superscript'); // Remove all subscripts inselection and toggle superscript. this._superscriptApplier.toggleSelection(); this._subscriptApplier.undoToSelection(); // Replace CSS classes with tags. this.get('host').changeToTags('editor-superscript', 'sup'); this.get('host').changeToTags('editor-subscript', 'sub'); } }); }, '@VERSION@', {"requires": ["moodle-editor_atto-plugin"]}); yui/src/button/meta/button.json 0000644 00000000172 15152273054 0012614 0 ustar 00 { "moodle-atto_superscript-button": { "requires": [ "moodle-editor_atto-plugin" ] } } yui/src/button/build.json 0000644 00000000301 15152273054 0011444 0 ustar 00 { "name": "moodle-atto_superscript-button", "builds": { "moodle-atto_superscript-button": { "jsfiles": [ "button.js" ] } } } yui/src/button/js/button.js 0000644 00000005157 15152273054 0011755 0 ustar 00 // 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_superscript * @copyright 2014 Rosiana Wijaya <rwijaya@moodle.com> * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ /** * @module moodle-atto_superscript-button */ /** * Atto text editor superscript plugin. * * @namespace M.atto_superscript * @class button * @extends M.editor_atto.EditorPlugin */ Y.namespace('M.atto_superscript').Button = Y.Base.create('button', Y.M.editor_atto.EditorPlugin, [], { /** * A rangy object to alter CSS classes. * * @property _subscriptApplier * @type Object * @private */ _subscriptApplier: null, /** * A rangy object to alter CSS classes. * * @property _superscriptApplier * @type Object * @private */ _superscriptApplier: null, initializer: function() { this.addButton({ buttonName: 'superscript', callback: this.toggleSuperscript, icon: 'e/superscript', inlineFormat: true, // Watch the following tags and add/remove highlighting as appropriate: tags: 'sup' }); this._subscriptApplier = window.rangy.createClassApplier("editor-subscript"); this._superscriptApplier = window.rangy.createClassApplier("editor-superscript"); }, /** * Toggle superscripts in selection * * @method toggleSuperscript */ toggleSuperscript: function() { // Replace all the sub and sup tags. this.get('host').changeToCSS('sub', 'editor-subscript'); this.get('host').changeToCSS('sup', 'editor-superscript'); // Remove all subscripts inselection and toggle superscript. this._superscriptApplier.toggleSelection(); this._subscriptApplier.undoToSelection(); // Replace CSS classes with tags. this.get('host').changeToTags('editor-superscript', 'sup'); this.get('host').changeToTags('editor-subscript', 'sub'); } }); lang/en/atto_superscript.php 0000644 00000002042 15152273054 0012214 0 ustar 00 <?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_superscript', language 'en'. * * @package atto_superscript * @copyright 2014 Rossiani Wijaya <rwijaya@moodle.com> * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ $string['pluginname'] = 'Superscript'; $string['privacy:metadata'] = 'The atto_superscript plugin does not store any personal data.';
| ver. 1.4 |
Github
|
.
| PHP 7.4.33 | ���֧ߧ֧�ѧ�ڧ� ����ѧߧڧ��: 0 |
proxy
|
phpinfo
|
���ѧ����ۧܧ�