[ Index ] |
PHP Cross Reference of Unnamed Project |
[Summary view] [Print] [Text view]
1 {{! 2 This file is part of Moodle - http://moodle.org/ 3 4 Moodle is free software: you can redistribute it and/or modify 5 it under the terms of the GNU General Public License as published by 6 the Free Software Foundation, either version 3 of the License, or 7 (at your option) any later version. 8 9 Moodle is distributed in the hope that it will be useful, 10 but WITHOUT ANY WARRANTY; without even the implied warranty of 11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 GNU General Public License for more details. 13 14 You should have received a copy of the GNU General Public License 15 along with Moodle. If not, see <http://www.gnu.org/licenses/>. 16 }} 17 {{! 18 @template core/inplace_editable 19 20 Displays the value that can be edited inline. 21 22 Classes required for JS: 23 * none 24 25 Data attributes required for JS: 26 * data-inplaceeditable 27 * data-inplaceeditablelink 28 * data-component 29 * data-itemtype 30 * data-itemid 31 * data-value 32 * data-editlabel 33 * data-type 34 * data-options 35 36 Context variables required for this template: 37 * none 38 39 Example context (json): 40 { 41 "displayvalue" : "<a href=\"#\">Moodle</a>", 42 "value" : "Moodle", 43 "itemid" : "1", 44 "component" : "core_unknown", 45 "itemtype" : "unknown", 46 "edithint" : "Edit this", 47 "editlabel" : "New name for this", 48 "type" : "text", 49 "options" : "", 50 "linkeverything": 0 51 } 52 }} 53 {{#component}} 54 <span class="inplaceeditable inplaceeditable-{{type}}" data-inplaceeditable="1" data-component="{{component}}" data-itemtype="{{itemtype}}" data-itemid="{{itemid}}" 55 data-value="{{value}}" data-editlabel="{{editlabel}}" data-type="{{type}}" data-options="{{options}}"> 56 {{^ linkeverything }}{{{displayvalue}}}{{/ linkeverything }} 57 <a href="#" class="quickeditlink" data-inplaceeditablelink="1" title="{{edithint}}"> 58 {{# linkeverything }}{{{displayvalue}}}{{/ linkeverything }} 59 <span class="quickediticon visibleifjs">{{#pix}}t/editstring,core,{{edithint}}{{/pix}}</span> 60 </a> 61 </span> 62 {{#js}} 63 require(['core/inplace_editable']); 64 {{/js}} 65 {{/component}} 66 {{^component}} 67 {{{displayvalue}}} 68 {{/component}} 69
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
Generated: Thu Aug 11 10:00:09 2016 | Cross-referenced by PHPXref 0.7.1 |