Proyectos de Subversion Moodle

Rev

Autoría | Ultima modificación | Ver Log |

{{!
    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/>.
}}
{{!
    @template tiny_equation/modal

    Modal to manage an Equation within the Tiny Editor.

    Classes required for JS:
    * none

    Data attributes required for JS:
    * none

    Context variables required for this template:

    Example context (json):
    {
        "elementid": "exampleId:1",
        "elementidescaped": "exampleId\\:1",
        "texdocsurl": "http://abc.com",
        "equation": "\\Downarrow ",
        "delimiters": {
            "start": "",
            "end": ""
        },
        "libraries": {
            "group1": [
                "\\Downarrow "
            ]
        }
    }
}}
{{< core/modal }}

    {{$title}}
        {{#str}} modaltitle, tiny_equation {{/str}}
    {{/title}}

    {{$body}}
        <form class="mform" id="{{uniqid}}">
            {{> tiny_equation/modal_library }}
            <label for="{{elementid}}_tiny_equation_equation">{{#str}} editequation, tiny_equation, {{texdocsurl}} {{/str}}</label>
            <textarea class="fullwidth text-ltr tiny_equation_equation w-100" id="{{elementid}}_tiny_equation_equation" rows="8">{{equation}}</textarea>
            <label for="{{elementid}}_tiny_equation_preview">{{#str}} preview, tiny_equation {{/str}}</label>
            <div aria-describedby="{{elementid}}_cursorinfo" class="border rounded bg-light p-1 fullwidth tiny_equation_preview" id="{{elementid}}__tiny_equation_preview"></div>
            <div id="{{elementid}}_cursorinfo">{{#str}} cursorinfo, tiny_equation {{/str}}</div>
        </form>
    {{/body}}

    {{$footer}}
        <button type="button" class="btn btn-primary" data-action="save">{{#str}} saveequation, tiny_equation{{/str}}</button>
    {{/footer}}

{{/ core/modal }}