���ѧۧݧ�ӧ�� �ާ֧ߧ֧էا֧� - ���֧էѧܧ�ڧ��ӧѧ�� - /home3/cpr76684/public_html/subscript.tar
���ѧ٧ѧ�
tests/behat/subscript.feature 0000644 00000002702 15152426773 0012401 0 ustar 00 @editor @editor_atto @atto @atto_subscript @_bug_phantomjs Feature: Atto subscript button To format text in Atto, I need to use the subscript 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 "Submarine" And I select the text in the "Description" Atto editor And I click on "Show more buttons" "button" When I click on "Subscript" "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 "<sub>Submarine</sub>" @javascript Scenario: Subscript some text in enclosed in superscript Given I log in as "admin" And I open my profile in edit mode And I set the field "Description" to "<sup>Submarine</sup>" And I select the text in the "Description" Atto editor And I click on "Show more buttons" "button" When I click on "Subscript" "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 "<sub>Submarine</sub>" version.php 0000644 00000002257 15152426773 0006764 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_subscript * @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_subscript'; // Full name of the plugin (used for diagnostics). classes/privacy/provider.php 0000644 00000003007 15152426773 0012235 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_subscript * @copyright 2018 Andrew Nicols <andrew@nicols.co.uk> * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ namespace atto_subscript\privacy; defined('MOODLE_INTERNAL') || die(); /** * Privacy Subsystem for atto_subscript 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_subscript-button/moodle-atto_subscript-button.js 0000644 00000005323 15152426773 0022514 0 ustar 00 YUI.add('moodle-atto_subscript-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_subscript * @copyright 2014 Rosiana Wijaya <rwijaya@moodle.com> * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ /** * @module moodle-atto_subscript-button */ /** * Atto text editor subscript plugin. * * @namespace M.atto_subscript * @class button * @extends M.editor_atto.EditorPlugin */ Y.namespace('M.atto_subscript').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: 'subscript', callback: this.toggleSubscript, icon: 'e/subscript', inlineFormat: true, // Watch the following tags and add/remove highlighting as appropriate: tags: 'sub' }); this._subscriptApplier = window.rangy.createClassApplier("editor-subscript"); this._superscriptApplier = window.rangy.createClassApplier("editor-superscript"); }, /** * Toggle subscripts in selection * * @method toggleSubscript */ toggleSubscript: function() { // Replace all the sub and sup tags. this.get('host').changeToCSS('sup', 'editor-superscript'); this.get('host').changeToCSS('sub', 'editor-subscript'); // Remove all superscripts inselection and toggle subscript. this._superscriptApplier.undoToSelection(); this._subscriptApplier.toggleSelection(); // Replace CSS classes with tags. this.get('host').changeToTags('editor-subscript', 'sub'); this.get('host').changeToTags('editor-superscript', 'sup'); } }); }, '@VERSION@', {"requires": ["moodle-editor_atto-plugin"]}); yui/build/moodle-atto_subscript-button/moodle-atto_subscript-button-min.js 0000644 00000001566 15152426773 0023302 0 ustar 00 YUI.add("moodle-atto_subscript-button",function(t,s){t.namespace("M.atto_subscript").Button=t.Base.create("button",t.M.editor_atto.EditorPlugin,[],{_subscriptApplier:null,_superscriptApplier:null,initializer:function(){this.addButton({buttonName:"subscript",callback:this.toggleSubscript,icon:"e/subscript",inlineFormat:!0,tags:"sub"}),this._subscriptApplier=window.rangy.createClassApplier("editor-subscript"),this._superscriptApplier=window.rangy.createClassApplier("editor-superscript")},toggleSubscript:function(){this.get("host").changeToCSS("sup","editor-superscript"),this.get("host").changeToCSS("sub","editor-subscript"),this._superscriptApplier.undoToSelection(),this._subscriptApplier.toggleSelection(),this.get("host").changeToTags("editor-subscript","sub"),this.get("host").changeToTags("editor-superscript","sup")}})},"@VERSION@",{requires:["moodle-editor_atto-plugin"]}); yui/build/moodle-atto_subscript-button/moodle-atto_subscript-button-debug.js 0000644 00000005323 15152426773 0023600 0 ustar 00 YUI.add('moodle-atto_subscript-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_subscript * @copyright 2014 Rosiana Wijaya <rwijaya@moodle.com> * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ /** * @module moodle-atto_subscript-button */ /** * Atto text editor subscript plugin. * * @namespace M.atto_subscript * @class button * @extends M.editor_atto.EditorPlugin */ Y.namespace('M.atto_subscript').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: 'subscript', callback: this.toggleSubscript, icon: 'e/subscript', inlineFormat: true, // Watch the following tags and add/remove highlighting as appropriate: tags: 'sub' }); this._subscriptApplier = window.rangy.createClassApplier("editor-subscript"); this._superscriptApplier = window.rangy.createClassApplier("editor-superscript"); }, /** * Toggle subscripts in selection * * @method toggleSubscript */ toggleSubscript: function() { // Replace all the sub and sup tags. this.get('host').changeToCSS('sup', 'editor-superscript'); this.get('host').changeToCSS('sub', 'editor-subscript'); // Remove all superscripts inselection and toggle subscript. this._superscriptApplier.undoToSelection(); this._subscriptApplier.toggleSelection(); // Replace CSS classes with tags. this.get('host').changeToTags('editor-subscript', 'sub'); this.get('host').changeToTags('editor-superscript', 'sup'); } }); }, '@VERSION@', {"requires": ["moodle-editor_atto-plugin"]}); yui/src/button/meta/button.json 0000644 00000000170 15152426773 0012622 0 ustar 00 { "moodle-atto_subscript-button": { "requires": [ "moodle-editor_atto-plugin" ] } } yui/src/button/build.json 0000644 00000000275 15152426773 0011466 0 ustar 00 { "name": "moodle-atto_subscript-button", "builds": { "moodle-atto_subscript-button": { "jsfiles": [ "button.js" ] } } } yui/src/button/js/button.js 0000644 00000005125 15152426773 0011760 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_subscript * @copyright 2014 Rosiana Wijaya <rwijaya@moodle.com> * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ /** * @module moodle-atto_subscript-button */ /** * Atto text editor subscript plugin. * * @namespace M.atto_subscript * @class button * @extends M.editor_atto.EditorPlugin */ Y.namespace('M.atto_subscript').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: 'subscript', callback: this.toggleSubscript, icon: 'e/subscript', inlineFormat: true, // Watch the following tags and add/remove highlighting as appropriate: tags: 'sub' }); this._subscriptApplier = window.rangy.createClassApplier("editor-subscript"); this._superscriptApplier = window.rangy.createClassApplier("editor-superscript"); }, /** * Toggle subscripts in selection * * @method toggleSubscript */ toggleSubscript: function() { // Replace all the sub and sup tags. this.get('host').changeToCSS('sup', 'editor-superscript'); this.get('host').changeToCSS('sub', 'editor-subscript'); // Remove all superscripts inselection and toggle subscript. this._superscriptApplier.undoToSelection(); this._subscriptApplier.toggleSelection(); // Replace CSS classes with tags. this.get('host').changeToTags('editor-subscript', 'sub'); this.get('host').changeToTags('editor-superscript', 'sup'); } }); lang/en/atto_subscript.php 0000644 00000002032 15152426773 0011656 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_subscript', language 'en'. * * @package atto_subscript * @copyright 2014 Rossiani Wijaya <rwijaya@moodle.com> * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ $string['pluginname'] = 'Subscript'; $string['privacy:metadata'] = 'The atto_subscript plugin does not store any personal data.';
| ver. 1.4 |
Github
|
.
| PHP 7.4.33 | ���֧ߧ֧�ѧ�ڧ� ����ѧߧڧ��: 0 |
proxy
|
phpinfo
|
���ѧ����ۧܧ�