From ff4e1a6cf5341a8014fd983b3bac7abee8de22aa Mon Sep 17 00:00:00 2001 From: Pablo Ogando Ferreira Date: Mon, 14 Oct 2024 13:32:28 +0200 Subject: [PATCH] Allow clipboard write on iframe --- version.php | 2 +- ...moodle-atto_pumukitmedia-button-coverage.js | 13 ++++++++----- .../moodle-atto_pumukitmedia-button-debug.js | 18 +++++++++--------- .../moodle-atto_pumukitmedia-button-min.js | 4 ++-- .../moodle-atto_pumukitmedia-button.js | 14 +++++++------- yui/src/button/js/button.js | 14 +++++++------- 6 files changed, 34 insertions(+), 31 deletions(-) diff --git a/version.php b/version.php index 3e0de33..2d3666b 100644 --- a/version.php +++ b/version.php @@ -25,7 +25,7 @@ defined('MOODLE_INTERNAL') || exit(); -$plugin->version = 2023024601; +$plugin->version = 2024101400; $plugin->requires = 2016112900; $plugin->maturity = MATURITY_STABLE; $plugin->component = 'atto_pumukitmedia'; diff --git a/yui/build/moodle-atto_pumukitmedia-button/moodle-atto_pumukitmedia-button-coverage.js b/yui/build/moodle-atto_pumukitmedia-button/moodle-atto_pumukitmedia-button-coverage.js index a5e1689..b56463c 100644 --- a/yui/build/moodle-atto_pumukitmedia-button/moodle-atto_pumukitmedia-button-coverage.js +++ b/yui/build/moodle-atto_pumukitmedia-button/moodle-atto_pumukitmedia-button-coverage.js @@ -1,6 +1,9 @@ -if (typeof __coverage__ === 'undefined') { __coverage__ = {}; } -if (!__coverage__['build/moodle-atto_pumukitmedia-button/moodle-atto_pumukitmedia-button.js']) { - __coverage__['build/moodle-atto_pumukitmedia-button/moodle-atto_pumukitmedia-button.js'] = {"path":"build/moodle-atto_pumukitmedia-button/moodle-atto_pumukitmedia-button.js","s":{"1":0,"2":0,"3":0,"4":0,"5":0,"6":0,"7":0,"8":0,"9":0,"10":0,"11":0,"12":0,"13":0,"14":0,"15":0,"16":0,"17":0,"18":0,"19":0,"20":0,"21":0,"22":0,"23":0,"24":0,"25":0,"26":0,"27":0,"28":0,"29":0,"30":0,"31":0,"32":0,"33":0,"34":0,"35":0,"36":0,"37":0,"38":0,"39":0,"40":0,"41":0,"42":0,"43":0,"44":0,"45":0,"46":0,"47":0,"48":0,"49":0,"50":0,"51":0,"52":0,"53":0,"54":0,"55":0,"56":0,"57":0,"58":0,"59":0,"60":0,"61":0,"62":0,"63":0,"64":0,"65":0,"66":0,"67":0,"68":0,"69":0,"70":0,"71":0,"72":0,"73":0,"74":0,"75":0,"76":0,"77":0,"78":0,"79":0,"80":0,"81":0,"82":0,"83":0,"84":0,"85":0,"86":0,"87":0,"88":0,"89":0,"90":0,"91":0,"92":0,"93":0,"94":0,"95":0,"96":0,"97":0,"98":0,"99":0,"100":0,"101":0,"102":0,"103":0,"104":0},"b":{"1":[0,0],"2":[0,0],"3":[0,0],"4":[0,0],"5":[0,0],"6":[0,0],"7":[0,0],"8":[0,0],"9":[0,0],"10":[0,0],"11":[0,0],"12":[0,0],"13":[0,0,0],"14":[0,0],"15":[0,0,0],"16":[0,0],"17":[0,0]},"f":{"1":0,"2":0,"3":0,"4":0,"5":0,"6":0,"7":0,"8":0},"fnMap":{"1":{"name":"(anonymous_1)","line":1,"loc":{"start":{"line":1,"column":43},"end":{"line":1,"column":62}}},"2":{"name":"(anonymous_2)","line":122,"loc":{"start":{"line":122,"column":17},"end":{"line":122,"column":28}}},"3":{"name":"(anonymous_3)","line":160,"loc":{"start":{"line":160,"column":27},"end":{"line":160,"column":37}}},"4":{"name":"(anonymous_4)","line":170,"loc":{"start":{"line":170,"column":22},"end":{"line":170,"column":47}}},"5":{"name":"(anonymous_5)","line":215,"loc":{"start":{"line":215,"column":21},"end":{"line":215,"column":43}}},"6":{"name":"(anonymous_6)","line":291,"loc":{"start":{"line":291,"column":16},"end":{"line":291,"column":27}}},"7":{"name":"(anonymous_7)","line":309,"loc":{"start":{"line":309,"column":22},"end":{"line":309,"column":33}}},"8":{"name":"(anonymous_8)","line":352,"loc":{"start":{"line":352,"column":25},"end":{"line":352,"column":35}}}},"statementMap":{"1":{"start":{"line":1,"column":0},"end":{"line":398,"column":61}},"2":{"start":{"line":31,"column":0},"end":{"line":31,"column":40}},"3":{"start":{"line":32,"column":0},"end":{"line":32,"column":42}},"4":{"start":{"line":33,"column":0},"end":{"line":33,"column":34}},"5":{"start":{"line":35,"column":0},"end":{"line":42,"column":6}},"6":{"start":{"line":44,"column":0},"end":{"line":44,"column":63}},"7":{"start":{"line":45,"column":0},"end":{"line":45,"column":59}},"8":{"start":{"line":47,"column":0},"end":{"line":51,"column":26}},"9":{"start":{"line":53,"column":0},"end":{"line":58,"column":13}},"10":{"start":{"line":60,"column":0},"end":{"line":60,"column":34}},"11":{"start":{"line":61,"column":0},"end":{"line":61,"column":62}},"12":{"start":{"line":63,"column":0},"end":{"line":68,"column":12}},"13":{"start":{"line":70,"column":0},"end":{"line":75,"column":13}},"14":{"start":{"line":77,"column":0},"end":{"line":82,"column":16}},"15":{"start":{"line":84,"column":0},"end":{"line":89,"column":13}},"16":{"start":{"line":91,"column":0},"end":{"line":96,"column":12}},"17":{"start":{"line":98,"column":0},"end":{"line":103,"column":13}},"18":{"start":{"line":105,"column":0},"end":{"line":110,"column":12}},"19":{"start":{"line":112,"column":0},"end":{"line":116,"column":13}},"20":{"start":{"line":118,"column":0},"end":{"line":395,"column":3}},"21":{"start":{"line":125,"column":8},"end":{"line":127,"column":9}},"22":{"start":{"line":126,"column":12},"end":{"line":126,"column":19}},"23":{"start":{"line":129,"column":8},"end":{"line":136,"column":11}},"24":{"start":{"line":139,"column":8},"end":{"line":139,"column":43}},"25":{"start":{"line":140,"column":8},"end":{"line":150,"column":9}},"26":{"start":{"line":141,"column":12},"end":{"line":141,"column":58}},"27":{"start":{"line":142,"column":12},"end":{"line":142,"column":27}},"28":{"start":{"line":143,"column":12},"end":{"line":143,"column":42}},"29":{"start":{"line":144,"column":12},"end":{"line":147,"column":47}},"30":{"start":{"line":148,"column":12},"end":{"line":148,"column":65}},"31":{"start":{"line":149,"column":12},"end":{"line":149,"column":73}},"32":{"start":{"line":161,"column":8},"end":{"line":161,"column":72}},"33":{"start":{"line":171,"column":8},"end":{"line":171,"column":27}},"34":{"start":{"line":172,"column":8},"end":{"line":172,"column":22}},"35":{"start":{"line":174,"column":8},"end":{"line":174,"column":67}},"36":{"start":{"line":175,"column":8},"end":{"line":175,"column":69}},"37":{"start":{"line":177,"column":8},"end":{"line":182,"column":11}},"38":{"start":{"line":185,"column":8},"end":{"line":188,"column":9}},"39":{"start":{"line":186,"column":12},"end":{"line":186,"column":45}},"40":{"start":{"line":187,"column":12},"end":{"line":187,"column":46}},"41":{"start":{"line":191,"column":8},"end":{"line":191,"column":59}},"42":{"start":{"line":193,"column":8},"end":{"line":193,"column":56}},"43":{"start":{"line":194,"column":8},"end":{"line":194,"column":39}},"44":{"start":{"line":196,"column":8},"end":{"line":196,"column":49}},"45":{"start":{"line":197,"column":8},"end":{"line":197,"column":24}},"46":{"start":{"line":198,"column":8},"end":{"line":198,"column":27}},"47":{"start":{"line":201,"column":8},"end":{"line":201,"column":73}},"48":{"start":{"line":202,"column":8},"end":{"line":204,"column":9}},"49":{"start":{"line":203,"column":12},"end":{"line":203,"column":78}},"50":{"start":{"line":217,"column":9},"end":{"line":217,"column":40}},"51":{"start":{"line":218,"column":9},"end":{"line":218,"column":59}},"52":{"start":{"line":220,"column":9},"end":{"line":223,"column":10}},"53":{"start":{"line":221,"column":13},"end":{"line":221,"column":72}},"54":{"start":{"line":222,"column":13},"end":{"line":222,"column":93}},"55":{"start":{"line":225,"column":9},"end":{"line":225,"column":62}},"56":{"start":{"line":226,"column":9},"end":{"line":226,"column":86}},"57":{"start":{"line":228,"column":9},"end":{"line":231,"column":10}},"58":{"start":{"line":229,"column":13},"end":{"line":229,"column":67}},"59":{"start":{"line":230,"column":13},"end":{"line":230,"column":92}},"60":{"start":{"line":233,"column":9},"end":{"line":236,"column":10}},"61":{"start":{"line":234,"column":13},"end":{"line":234,"column":71}},"62":{"start":{"line":235,"column":13},"end":{"line":235,"column":89}},"63":{"start":{"line":238,"column":9},"end":{"line":238,"column":53}},"64":{"start":{"line":239,"column":9},"end":{"line":244,"column":23}},"65":{"start":{"line":246,"column":9},"end":{"line":246,"column":69}},"66":{"start":{"line":248,"column":8},"end":{"line":269,"column":16}},"67":{"start":{"line":271,"column":8},"end":{"line":278,"column":9}},"68":{"start":{"line":272,"column":12},"end":{"line":272,"column":63}},"69":{"start":{"line":273,"column":12},"end":{"line":273,"column":53}},"70":{"start":{"line":274,"column":12},"end":{"line":274,"column":53}},"71":{"start":{"line":275,"column":12},"end":{"line":275,"column":57}},"72":{"start":{"line":276,"column":12},"end":{"line":276,"column":55}},"73":{"start":{"line":277,"column":12},"end":{"line":277,"column":56}},"74":{"start":{"line":280,"column":8},"end":{"line":280,"column":29}},"75":{"start":{"line":283,"column":8},"end":{"line":283,"column":23}},"76":{"start":{"line":292,"column":8},"end":{"line":292,"column":27}},"77":{"start":{"line":293,"column":8},"end":{"line":295,"column":18}},"78":{"start":{"line":297,"column":8},"end":{"line":297,"column":68}},"79":{"start":{"line":300,"column":8},"end":{"line":302,"column":9}},"80":{"start":{"line":301,"column":12},"end":{"line":301,"column":19}},"81":{"start":{"line":304,"column":8},"end":{"line":304,"column":28}},"82":{"start":{"line":305,"column":8},"end":{"line":305,"column":79}},"83":{"start":{"line":306,"column":8},"end":{"line":306,"column":27}},"84":{"start":{"line":311,"column":8},"end":{"line":313,"column":9}},"85":{"start":{"line":312,"column":12},"end":{"line":312,"column":60}},"86":{"start":{"line":315,"column":8},"end":{"line":317,"column":9}},"87":{"start":{"line":316,"column":12},"end":{"line":316,"column":19}},"88":{"start":{"line":319,"column":8},"end":{"line":319,"column":27}},"89":{"start":{"line":320,"column":8},"end":{"line":322,"column":18}},"90":{"start":{"line":324,"column":8},"end":{"line":324,"column":35}},"91":{"start":{"line":327,"column":8},"end":{"line":329,"column":9}},"92":{"start":{"line":328,"column":12},"end":{"line":328,"column":19}},"93":{"start":{"line":331,"column":8},"end":{"line":331,"column":72}},"94":{"start":{"line":333,"column":8},"end":{"line":333,"column":28}},"95":{"start":{"line":335,"column":8},"end":{"line":335,"column":92}},"96":{"start":{"line":336,"column":8},"end":{"line":340,"column":9}},"97":{"start":{"line":337,"column":12},"end":{"line":337,"column":105}},"98":{"start":{"line":338,"column":15},"end":{"line":340,"column":9}},"99":{"start":{"line":339,"column":12},"end":{"line":339,"column":29}},"100":{"start":{"line":342,"column":8},"end":{"line":347,"column":21}},"101":{"start":{"line":348,"column":8},"end":{"line":348,"column":59}},"102":{"start":{"line":349,"column":8},"end":{"line":349,"column":27}},"103":{"start":{"line":353,"column":8},"end":{"line":353,"column":83}},"104":{"start":{"line":354,"column":8},"end":{"line":354,"column":58}}},"branchMap":{"1":{"line":125,"type":"if","locations":[{"start":{"line":125,"column":8},"end":{"line":125,"column":8}},{"start":{"line":125,"column":8},"end":{"line":125,"column":8}}]},"2":{"line":125,"type":"binary-expr","locations":[{"start":{"line":125,"column":12},"end":{"line":125,"column":32}},{"start":{"line":125,"column":36},"end":{"line":125,"column":59}}]},"3":{"line":140,"type":"if","locations":[{"start":{"line":140,"column":8},"end":{"line":140,"column":8}},{"start":{"line":140,"column":8},"end":{"line":140,"column":8}}]},"4":{"line":185,"type":"if","locations":[{"start":{"line":185,"column":8},"end":{"line":185,"column":8}},{"start":{"line":185,"column":8},"end":{"line":185,"column":8}}]},"5":{"line":202,"type":"if","locations":[{"start":{"line":202,"column":8},"end":{"line":202,"column":8}},{"start":{"line":202,"column":8},"end":{"line":202,"column":8}}]},"6":{"line":220,"type":"if","locations":[{"start":{"line":220,"column":9},"end":{"line":220,"column":9}},{"start":{"line":220,"column":9},"end":{"line":220,"column":9}}]},"7":{"line":228,"type":"if","locations":[{"start":{"line":228,"column":9},"end":{"line":228,"column":9}},{"start":{"line":228,"column":9},"end":{"line":228,"column":9}}]},"8":{"line":233,"type":"if","locations":[{"start":{"line":233,"column":9},"end":{"line":233,"column":9}},{"start":{"line":233,"column":9},"end":{"line":233,"column":9}}]},"9":{"line":271,"type":"if","locations":[{"start":{"line":271,"column":8},"end":{"line":271,"column":8}},{"start":{"line":271,"column":8},"end":{"line":271,"column":8}}]},"10":{"line":300,"type":"if","locations":[{"start":{"line":300,"column":8},"end":{"line":300,"column":8}},{"start":{"line":300,"column":8},"end":{"line":300,"column":8}}]},"11":{"line":311,"type":"if","locations":[{"start":{"line":311,"column":8},"end":{"line":311,"column":8}},{"start":{"line":311,"column":8},"end":{"line":311,"column":8}}]},"12":{"line":315,"type":"if","locations":[{"start":{"line":315,"column":8},"end":{"line":315,"column":8}},{"start":{"line":315,"column":8},"end":{"line":315,"column":8}}]},"13":{"line":315,"type":"binary-expr","locations":[{"start":{"line":315,"column":12},"end":{"line":315,"column":24}},{"start":{"line":315,"column":28},"end":{"line":315,"column":44}},{"start":{"line":315,"column":48},"end":{"line":315,"column":59}}]},"14":{"line":327,"type":"if","locations":[{"start":{"line":327,"column":8},"end":{"line":327,"column":8}},{"start":{"line":327,"column":8},"end":{"line":327,"column":8}}]},"15":{"line":327,"type":"binary-expr","locations":[{"start":{"line":327,"column":12},"end":{"line":327,"column":24}},{"start":{"line":327,"column":28},"end":{"line":327,"column":44}},{"start":{"line":327,"column":48},"end":{"line":327,"column":59}}]},"16":{"line":336,"type":"if","locations":[{"start":{"line":336,"column":8},"end":{"line":336,"column":8}},{"start":{"line":336,"column":8},"end":{"line":336,"column":8}}]},"17":{"line":338,"type":"if","locations":[{"start":{"line":338,"column":15},"end":{"line":338,"column":15}},{"start":{"line":338,"column":15},"end":{"line":338,"column":15}}]}},"code":["(function () { YUI.add('moodle-atto_pumukitmedia-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 .","","/**"," * Atto pumukitmedia selection tool."," *"," * @package atto_pumukitmedia"," * @copyright Teltek Video Research"," * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later"," *"," * @module moodle-atto_pumukitmedia_alignment-button"," * @namespace M.atto_pumukitmedia"," * @class Button"," * @extends M.editor_atto.EditorPlugin"," */","","var COMPONENTNAME = 'atto_pumukitmedia';","var FLAVORCONTROL = 'pumukitmedia_flavor';","var LOGNAME = 'atto_pumukitmedia';","","var CSS = {"," INPUTSUBMIT: 'atto_media_urlentrysubmit',"," INPUTCANCEL: 'atto_media_urlentrycancel',"," FLAVORCONTROL: 'flavorcontrol'"," },"," SELECTORS = {"," FLAVORCONTROL: '.flavorcontrol'"," };","","var TEMPLATE = '\";"," TARGET_TEMPLATE_CONTENT = TARGET_TEMPLATE_CONTENT + '' +"," '
' +"," '' +"," '
';",""," TARGET_TEMPLATE = TARGET_TEMPLATE + TARGET_TEMPLATE_CONTENT;",""," var template = Y.Handlebars.compile(TARGET_TEMPLATE),"," content = Y.Node.create(template({"," elementid: this.get('host').get('elementid'),"," CSS: CSS,"," FLAVORCONTROL: FLAVORCONTROL,"," PUMUKITURL: this.get('pumukitmediaurl'),"," HASH: this.get('hash'),"," USERNAME: this.get('username'),"," EMAIL: this.get('email'),"," CAPABILITY: this.get('capability'),"," PASSWORD: this.get('password'),"," DATE: this.get('date'),"," DEBUG: this.get('enabledebugmode'),"," component: COMPONENTNAME,"," defaultflavor: this.get('defaultflavor'),"," clickedicon: clickedicon,"," button_upload: M.util.get_string('button_upload', COMPONENTNAME),"," button_pr: M.util.get_string('button_pr', COMPONENTNAME),"," button_myvideos: M.util.get_string('button_myvideos', COMPONENTNAME),"," button_playlists: M.util.get_string('button_playlists', COMPONENTNAME),"," button_sharevideos: M.util.get_string('button_sharevideos', COMPONENTNAME)"," }));",""," if(this.get('enabledebugmode') == 1) {"," console.log('URL: ' + this.get('pumukitmediaurl'));"," console.log('Date: ' + this.get('date'));"," console.log('Hash: ' + this.get('hash'));"," console.log('User: ' + this.get('username'));"," console.log('Email: ' + this.get('email'));"," console.log('Pwd: ' + this.get('password'));"," }",""," this._form = content;"," //this._form.one('.' + CSS.INPUTSUBMIT).on('click', this._doInsert, this);",""," return content;"," },",""," /**"," * Inserts the users input onto the page"," * @method _getDialogueContent"," * @private"," */"," _doInsert : function(e){"," e.preventDefault();"," this.getDialogue({"," focusAfterHide: null"," }).hide();",""," var flavorcontrol = this._form.one(SELECTORS.FLAVORCONTROL);",""," // If no file is there to insert, don't do it."," if (!flavorcontrol.get('value')){"," return;"," }",""," this.editor.focus();"," this.get('host').insertContentAtFocusPoint(flavorcontrol.get('value'));"," this.markUpdated();"," },",""," _receiveMessage : function(e){"," // window.addEventListener('message', function(e){"," if(e.data === 'enableMoodlePRAdd?'){"," e.source.postMessage({'moodlepradd':'OK'}, '*');"," }"," // });"," if (!e.data.mmId && !e.data.playlist && !e.data.url) {"," return;"," }",""," e.preventDefault();"," this.getDialogue({"," focusAfterHide: null"," }).hide();",""," this._closeSharedWindow(e);",""," // If no file is there to insert, don't do it."," if (!e.data.mmId && !e.data.playlist && !e.data.url){"," return;"," }",""," window.removeEventListener('message', this._receiveMessageBind);",""," this.editor.focus();",""," var url = this.get('pumukitmediaurl') + '/openedx/openedx/embed/?id=' + e.data.mmId;"," if(e.data.playlist) {"," url = this.get('pumukitmediaurl') + '/openedx/openedx/playlist/embed/?id=' + e.data.playlist;"," } else if(e.data.url){"," url = e.data.url;"," }",""," var iframe ="," '
' +"," '' +"," 'Video' +"," '
';"," this.get('host').insertContentAtFocusPoint(iframe);"," this.markUpdated();"," },",""," _closeSharedWindow : function(){"," var sharedWindow = document.getElementById('pumukitmedia_iframe_recorder');"," sharedWindow.parentNode.removeChild(sharedWindow);"," }","}, {"," ATTRS: {"," pumukitmediaurl: {"," value: ''"," },"," hash: {"," value: ''"," },"," username: {"," value: ''"," },"," email: {"," value: ''"," },"," dialogtitle: {"," value: ''"," },"," showpr: {"," value: ''"," },"," showplaylist: {"," value: ''"," },"," showsharedvideos: {"," value: ''"," },"," capability: {"," value: ''"," },"," password: {"," value: ''"," },"," date: {"," value: ''"," },"," enabledebugmode: {"," value: ''"," }"," }","});","","","}, '@VERSION@', {\"requires\": [\"moodle-editor_atto-plugin\"]});","","}());"]}; + +var __cov_tXSAt56$IU$diw8qGC09QQ = (Function('return this'))(); +if (!__cov_tXSAt56$IU$diw8qGC09QQ.__coverage__) { __cov_tXSAt56$IU$diw8qGC09QQ.__coverage__ = {}; } +__cov_tXSAt56$IU$diw8qGC09QQ = __cov_tXSAt56$IU$diw8qGC09QQ.__coverage__; +if (!(__cov_tXSAt56$IU$diw8qGC09QQ['build/moodle-atto_pumukitmedia-button/moodle-atto_pumukitmedia-button.js'])) { + __cov_tXSAt56$IU$diw8qGC09QQ['build/moodle-atto_pumukitmedia-button/moodle-atto_pumukitmedia-button.js'] = {"path":"build/moodle-atto_pumukitmedia-button/moodle-atto_pumukitmedia-button.js","s":{"1":0,"2":0,"3":0,"4":0,"5":0,"6":0,"7":0,"8":0,"9":0,"10":0,"11":0,"12":0,"13":0,"14":0,"15":0,"16":0,"17":0,"18":0,"19":0,"20":0,"21":0,"22":0,"23":0,"24":0,"25":0,"26":0,"27":0,"28":0,"29":0,"30":0,"31":0,"32":0,"33":0,"34":0,"35":0,"36":0,"37":0,"38":0,"39":0,"40":0,"41":0,"42":0,"43":0,"44":0,"45":0,"46":0,"47":0,"48":0,"49":0,"50":0,"51":0,"52":0,"53":0,"54":0,"55":0,"56":0,"57":0,"58":0,"59":0,"60":0,"61":0,"62":0,"63":0,"64":0,"65":0,"66":0,"67":0,"68":0,"69":0,"70":0,"71":0,"72":0,"73":0,"74":0,"75":0,"76":0,"77":0,"78":0,"79":0,"80":0,"81":0,"82":0,"83":0,"84":0,"85":0,"86":0,"87":0,"88":0,"89":0,"90":0,"91":0,"92":0,"93":0,"94":0,"95":0,"96":0,"97":0,"98":0,"99":0,"100":0,"101":0,"102":0,"103":0,"104":0},"b":{"1":[0,0],"2":[0,0],"3":[0,0],"4":[0,0],"5":[0,0],"6":[0,0],"7":[0,0],"8":[0,0],"9":[0,0],"10":[0,0],"11":[0,0],"12":[0,0],"13":[0,0,0],"14":[0,0],"15":[0,0,0],"16":[0,0],"17":[0,0]},"f":{"1":0,"2":0,"3":0,"4":0,"5":0,"6":0,"7":0,"8":0},"fnMap":{"1":{"name":"(anonymous_1)","line":1,"loc":{"start":{"line":1,"column":43},"end":{"line":1,"column":62}}},"2":{"name":"(anonymous_2)","line":122,"loc":{"start":{"line":122,"column":17},"end":{"line":122,"column":28}}},"3":{"name":"(anonymous_3)","line":160,"loc":{"start":{"line":160,"column":27},"end":{"line":160,"column":37}}},"4":{"name":"(anonymous_4)","line":170,"loc":{"start":{"line":170,"column":22},"end":{"line":170,"column":47}}},"5":{"name":"(anonymous_5)","line":215,"loc":{"start":{"line":215,"column":21},"end":{"line":215,"column":43}}},"6":{"name":"(anonymous_6)","line":291,"loc":{"start":{"line":291,"column":16},"end":{"line":291,"column":27}}},"7":{"name":"(anonymous_7)","line":309,"loc":{"start":{"line":309,"column":22},"end":{"line":309,"column":33}}},"8":{"name":"(anonymous_8)","line":352,"loc":{"start":{"line":352,"column":25},"end":{"line":352,"column":35}}}},"statementMap":{"1":{"start":{"line":1,"column":0},"end":{"line":398,"column":61}},"2":{"start":{"line":31,"column":0},"end":{"line":31,"column":40}},"3":{"start":{"line":32,"column":0},"end":{"line":32,"column":42}},"4":{"start":{"line":33,"column":0},"end":{"line":33,"column":34}},"5":{"start":{"line":35,"column":0},"end":{"line":42,"column":6}},"6":{"start":{"line":44,"column":0},"end":{"line":44,"column":63}},"7":{"start":{"line":45,"column":0},"end":{"line":45,"column":59}},"8":{"start":{"line":47,"column":0},"end":{"line":51,"column":26}},"9":{"start":{"line":53,"column":0},"end":{"line":58,"column":13}},"10":{"start":{"line":60,"column":0},"end":{"line":60,"column":34}},"11":{"start":{"line":61,"column":0},"end":{"line":61,"column":62}},"12":{"start":{"line":63,"column":0},"end":{"line":68,"column":12}},"13":{"start":{"line":70,"column":0},"end":{"line":75,"column":13}},"14":{"start":{"line":77,"column":0},"end":{"line":82,"column":16}},"15":{"start":{"line":84,"column":0},"end":{"line":89,"column":13}},"16":{"start":{"line":91,"column":0},"end":{"line":96,"column":12}},"17":{"start":{"line":98,"column":0},"end":{"line":103,"column":13}},"18":{"start":{"line":105,"column":0},"end":{"line":110,"column":12}},"19":{"start":{"line":112,"column":0},"end":{"line":116,"column":13}},"20":{"start":{"line":118,"column":0},"end":{"line":395,"column":3}},"21":{"start":{"line":125,"column":8},"end":{"line":127,"column":9}},"22":{"start":{"line":126,"column":12},"end":{"line":126,"column":19}},"23":{"start":{"line":129,"column":8},"end":{"line":136,"column":11}},"24":{"start":{"line":139,"column":8},"end":{"line":139,"column":43}},"25":{"start":{"line":140,"column":8},"end":{"line":150,"column":9}},"26":{"start":{"line":141,"column":12},"end":{"line":141,"column":58}},"27":{"start":{"line":142,"column":12},"end":{"line":142,"column":27}},"28":{"start":{"line":143,"column":12},"end":{"line":143,"column":42}},"29":{"start":{"line":144,"column":12},"end":{"line":147,"column":47}},"30":{"start":{"line":148,"column":12},"end":{"line":148,"column":82}},"31":{"start":{"line":149,"column":12},"end":{"line":149,"column":73}},"32":{"start":{"line":161,"column":8},"end":{"line":161,"column":72}},"33":{"start":{"line":171,"column":8},"end":{"line":171,"column":27}},"34":{"start":{"line":172,"column":8},"end":{"line":172,"column":22}},"35":{"start":{"line":174,"column":8},"end":{"line":174,"column":67}},"36":{"start":{"line":175,"column":8},"end":{"line":175,"column":69}},"37":{"start":{"line":177,"column":8},"end":{"line":182,"column":11}},"38":{"start":{"line":185,"column":8},"end":{"line":188,"column":9}},"39":{"start":{"line":186,"column":12},"end":{"line":186,"column":45}},"40":{"start":{"line":187,"column":12},"end":{"line":187,"column":46}},"41":{"start":{"line":191,"column":8},"end":{"line":191,"column":59}},"42":{"start":{"line":193,"column":8},"end":{"line":193,"column":56}},"43":{"start":{"line":194,"column":8},"end":{"line":194,"column":39}},"44":{"start":{"line":196,"column":8},"end":{"line":196,"column":49}},"45":{"start":{"line":197,"column":8},"end":{"line":197,"column":24}},"46":{"start":{"line":198,"column":8},"end":{"line":198,"column":27}},"47":{"start":{"line":201,"column":8},"end":{"line":201,"column":73}},"48":{"start":{"line":202,"column":8},"end":{"line":204,"column":9}},"49":{"start":{"line":203,"column":12},"end":{"line":203,"column":78}},"50":{"start":{"line":217,"column":9},"end":{"line":217,"column":40}},"51":{"start":{"line":218,"column":9},"end":{"line":218,"column":59}},"52":{"start":{"line":220,"column":9},"end":{"line":223,"column":10}},"53":{"start":{"line":221,"column":13},"end":{"line":221,"column":72}},"54":{"start":{"line":222,"column":13},"end":{"line":222,"column":93}},"55":{"start":{"line":225,"column":9},"end":{"line":225,"column":62}},"56":{"start":{"line":226,"column":9},"end":{"line":226,"column":86}},"57":{"start":{"line":228,"column":9},"end":{"line":231,"column":10}},"58":{"start":{"line":229,"column":13},"end":{"line":229,"column":67}},"59":{"start":{"line":230,"column":13},"end":{"line":230,"column":92}},"60":{"start":{"line":233,"column":9},"end":{"line":236,"column":10}},"61":{"start":{"line":234,"column":13},"end":{"line":234,"column":71}},"62":{"start":{"line":235,"column":13},"end":{"line":235,"column":89}},"63":{"start":{"line":238,"column":9},"end":{"line":238,"column":53}},"64":{"start":{"line":239,"column":9},"end":{"line":244,"column":23}},"65":{"start":{"line":246,"column":9},"end":{"line":246,"column":69}},"66":{"start":{"line":248,"column":8},"end":{"line":269,"column":16}},"67":{"start":{"line":271,"column":8},"end":{"line":278,"column":9}},"68":{"start":{"line":272,"column":12},"end":{"line":272,"column":63}},"69":{"start":{"line":273,"column":12},"end":{"line":273,"column":53}},"70":{"start":{"line":274,"column":12},"end":{"line":274,"column":53}},"71":{"start":{"line":275,"column":12},"end":{"line":275,"column":57}},"72":{"start":{"line":276,"column":12},"end":{"line":276,"column":55}},"73":{"start":{"line":277,"column":12},"end":{"line":277,"column":56}},"74":{"start":{"line":280,"column":8},"end":{"line":280,"column":29}},"75":{"start":{"line":283,"column":8},"end":{"line":283,"column":23}},"76":{"start":{"line":292,"column":8},"end":{"line":292,"column":27}},"77":{"start":{"line":293,"column":8},"end":{"line":295,"column":18}},"78":{"start":{"line":297,"column":8},"end":{"line":297,"column":68}},"79":{"start":{"line":300,"column":8},"end":{"line":302,"column":9}},"80":{"start":{"line":301,"column":12},"end":{"line":301,"column":19}},"81":{"start":{"line":304,"column":8},"end":{"line":304,"column":28}},"82":{"start":{"line":305,"column":8},"end":{"line":305,"column":79}},"83":{"start":{"line":306,"column":8},"end":{"line":306,"column":27}},"84":{"start":{"line":311,"column":8},"end":{"line":313,"column":9}},"85":{"start":{"line":312,"column":12},"end":{"line":312,"column":60}},"86":{"start":{"line":315,"column":8},"end":{"line":317,"column":9}},"87":{"start":{"line":316,"column":12},"end":{"line":316,"column":19}},"88":{"start":{"line":319,"column":8},"end":{"line":319,"column":27}},"89":{"start":{"line":320,"column":8},"end":{"line":322,"column":18}},"90":{"start":{"line":324,"column":8},"end":{"line":324,"column":35}},"91":{"start":{"line":327,"column":8},"end":{"line":329,"column":9}},"92":{"start":{"line":328,"column":12},"end":{"line":328,"column":19}},"93":{"start":{"line":331,"column":8},"end":{"line":331,"column":72}},"94":{"start":{"line":333,"column":8},"end":{"line":333,"column":28}},"95":{"start":{"line":335,"column":8},"end":{"line":335,"column":88}},"96":{"start":{"line":336,"column":8},"end":{"line":340,"column":9}},"97":{"start":{"line":337,"column":12},"end":{"line":337,"column":101}},"98":{"start":{"line":338,"column":15},"end":{"line":340,"column":9}},"99":{"start":{"line":339,"column":12},"end":{"line":339,"column":29}},"100":{"start":{"line":342,"column":8},"end":{"line":347,"column":21}},"101":{"start":{"line":348,"column":8},"end":{"line":348,"column":59}},"102":{"start":{"line":349,"column":8},"end":{"line":349,"column":27}},"103":{"start":{"line":353,"column":8},"end":{"line":353,"column":83}},"104":{"start":{"line":354,"column":8},"end":{"line":354,"column":58}}},"branchMap":{"1":{"line":125,"type":"if","locations":[{"start":{"line":125,"column":8},"end":{"line":125,"column":8}},{"start":{"line":125,"column":8},"end":{"line":125,"column":8}}]},"2":{"line":125,"type":"binary-expr","locations":[{"start":{"line":125,"column":12},"end":{"line":125,"column":32}},{"start":{"line":125,"column":36},"end":{"line":125,"column":59}}]},"3":{"line":140,"type":"if","locations":[{"start":{"line":140,"column":8},"end":{"line":140,"column":8}},{"start":{"line":140,"column":8},"end":{"line":140,"column":8}}]},"4":{"line":185,"type":"if","locations":[{"start":{"line":185,"column":8},"end":{"line":185,"column":8}},{"start":{"line":185,"column":8},"end":{"line":185,"column":8}}]},"5":{"line":202,"type":"if","locations":[{"start":{"line":202,"column":8},"end":{"line":202,"column":8}},{"start":{"line":202,"column":8},"end":{"line":202,"column":8}}]},"6":{"line":220,"type":"if","locations":[{"start":{"line":220,"column":9},"end":{"line":220,"column":9}},{"start":{"line":220,"column":9},"end":{"line":220,"column":9}}]},"7":{"line":228,"type":"if","locations":[{"start":{"line":228,"column":9},"end":{"line":228,"column":9}},{"start":{"line":228,"column":9},"end":{"line":228,"column":9}}]},"8":{"line":233,"type":"if","locations":[{"start":{"line":233,"column":9},"end":{"line":233,"column":9}},{"start":{"line":233,"column":9},"end":{"line":233,"column":9}}]},"9":{"line":271,"type":"if","locations":[{"start":{"line":271,"column":8},"end":{"line":271,"column":8}},{"start":{"line":271,"column":8},"end":{"line":271,"column":8}}]},"10":{"line":300,"type":"if","locations":[{"start":{"line":300,"column":8},"end":{"line":300,"column":8}},{"start":{"line":300,"column":8},"end":{"line":300,"column":8}}]},"11":{"line":311,"type":"if","locations":[{"start":{"line":311,"column":8},"end":{"line":311,"column":8}},{"start":{"line":311,"column":8},"end":{"line":311,"column":8}}]},"12":{"line":315,"type":"if","locations":[{"start":{"line":315,"column":8},"end":{"line":315,"column":8}},{"start":{"line":315,"column":8},"end":{"line":315,"column":8}}]},"13":{"line":315,"type":"binary-expr","locations":[{"start":{"line":315,"column":12},"end":{"line":315,"column":24}},{"start":{"line":315,"column":28},"end":{"line":315,"column":44}},{"start":{"line":315,"column":48},"end":{"line":315,"column":59}}]},"14":{"line":327,"type":"if","locations":[{"start":{"line":327,"column":8},"end":{"line":327,"column":8}},{"start":{"line":327,"column":8},"end":{"line":327,"column":8}}]},"15":{"line":327,"type":"binary-expr","locations":[{"start":{"line":327,"column":12},"end":{"line":327,"column":24}},{"start":{"line":327,"column":28},"end":{"line":327,"column":44}},{"start":{"line":327,"column":48},"end":{"line":327,"column":59}}]},"16":{"line":336,"type":"if","locations":[{"start":{"line":336,"column":8},"end":{"line":336,"column":8}},{"start":{"line":336,"column":8},"end":{"line":336,"column":8}}]},"17":{"line":338,"type":"if","locations":[{"start":{"line":338,"column":15},"end":{"line":338,"column":15}},{"start":{"line":338,"column":15},"end":{"line":338,"column":15}}]}},"code":["(function () { YUI.add('moodle-atto_pumukitmedia-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 .","","/**"," * Atto pumukitmedia selection tool."," *"," * @package atto_pumukitmedia"," * @copyright Teltek Video Research"," * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later"," *"," * @module moodle-atto_pumukitmedia_alignment-button"," * @namespace M.atto_pumukitmedia"," * @class Button"," * @extends M.editor_atto.EditorPlugin"," */","","var COMPONENTNAME = 'atto_pumukitmedia';","var FLAVORCONTROL = 'pumukitmedia_flavor';","var LOGNAME = 'atto_pumukitmedia';","","var CSS = {"," INPUTSUBMIT: 'atto_media_urlentrysubmit',"," INPUTCANCEL: 'atto_media_urlentrycancel',"," FLAVORCONTROL: 'flavorcontrol'"," },"," SELECTORS = {"," FLAVORCONTROL: '.flavorcontrol'"," };","","var TEMPLATE = '
    ';","var TEMPLATE_TABCONTENT = '
    ';","","var ITEM_UPLOAD = '
  • ' +"," '' +"," '{{button_upload}}' +"," '' +"," '
  • ';","","var TABCONTENT_UPLOAD ="," '
    ' +"," '' +"," '
    ';","","TEMPLATE = TEMPLATE + ITEM_UPLOAD;","TEMPLATE_TABCONTENT = TEMPLATE_TABCONTENT + TABCONTENT_UPLOAD;","","var ITEM_PERSONAL_RECORDER ="," '
  • ' +"," '' +"," '{{button_pr}}' +"," '' +"," '
  • ';","","var TABCONTENT_PERSONALRECORDER ="," '
    ' +"," '' +"," '
    ';","","var TEMPLATE_MANAGER ="," '
  • ' +"," '' +"," '{{button_myvideos}}' +"," '' +"," '
  • ';","","var TABCONTENT_MANAGERSERIES ="," '
    ' +"," '' +"," '
    ';","","var TEMPLATE_PLAYLIST ="," '
  • ' +"," '' +"," '{{button_playlists}}' +"," '' +"," '
  • ';","","var TABCONTENT_MANAGERPLAYLIST ="," '
    ' +"," '' +"," '
    ';","","var TEMPLATE_SHAREDVIDEOS ="," '
  • ' +"," '' +"," '{{button_sharevideos}}' +"," '' +"," '
  • ';","","var TABCONTENT_SHAREDVIDEOS ="," '
    ' +"," '' +"," '
    ';","","Y.namespace('M.atto_pumukitmedia').Button = Y.Base.create('button', Y.M.editor_atto.EditorPlugin, [], {",""," _receiveMessageBind: null,",""," initializer: function() {",""," // If we don't have the capability to view then give up."," if (this.get('disabled') || !this.get('capability')){"," return;"," }",""," this.addButton({"," icon: 'e/insert_edit_video',"," //icon: 'icon',"," //iconComponent: 'atto_pumukitmedia',"," buttonName: 'pumukitmedia',"," callback: this._displayDialogue,"," callbackArgs: 'iconone'"," });",""," // Force SSO"," var id = \"pumukitmedia_iframe_sso\";"," if (!document.getElementById(id)) {"," var iframe = document.createElement('iframe');"," iframe.id = id;"," iframe.style.display = \"none\";"," iframe.src = this.get('pumukitmediaurl') + \"/openedx/sso/manager?hash=\" +"," this.get('hash') + \"&username=\" +"," this.get('username') + \"&email=\"+"," this.get('email') + \"&lang=en\";"," iframe.allow = \"microphone; camera; display-capture; clipboard-write\";"," document.getElementsByTagName('body')[0].appendChild(iframe);"," }"," },",""," /**"," * Get the id of the flavor control where we store the ice cream flavor"," *"," * @method _getFlavorControlName"," * @return {String} the name/id of the flavor form field"," * @private"," */"," _getFlavorControlName: function(){"," return(this.get('host').get('elementid') + '_' + FLAVORCONTROL);"," },",""," /**"," * Display the pumukitmedia Dialogue"," *"," * @method _displayDialogue"," * @private"," */"," _displayDialogue: function(e, clickedicon) {"," e.preventDefault();"," var width=900;",""," this._receiveMessageBind = this._receiveMessage.bind(this);"," window.addEventListener('message', this._receiveMessageBind);",""," var dialogue = this.getDialogue({"," headerContent: this.get('dialogtitle'),"," //width: width + 'px',"," widht: '70%', //rr width"," focusAfterHide: clickedicon"," });"," //dialog doesn't detect changes in width without this"," //if you reuse the dialog, this seems necessary"," if(dialogue.width !== width + 'px'){"," dialogue.set('width',width+'px');"," dialogue.set('max-width','550px');"," }",""," //append buttons to iframe"," var buttonform = this._getFormContent(clickedicon);",""," var bodycontent = Y.Node.create('
    ');"," bodycontent.append(buttonform);",""," dialogue.set('bodyContent', bodycontent);"," dialogue.show();"," this.markUpdated();",""," // Add listen event to close on."," var clickButton = document.getElementsByClassName('closebutton');"," if (clickButton[0]) {"," clickButton[0].addEventListener('click', this._closeSharedWindow);"," }"," },",""," /**"," * Return the dialogue content for the tool, attaching any required"," * events."," *"," * @method _getDialogueContent"," * @return {Node} The content to place in the dialogue."," * @private"," */"," _getFormContent: function(clickedicon) {",""," var TARGET_TEMPLATE = TEMPLATE;"," var TARGET_TEMPLATE_CONTENT = TEMPLATE_TABCONTENT;",""," if(this.get('showpr') !== \"0\") {"," TARGET_TEMPLATE = TARGET_TEMPLATE + ITEM_PERSONAL_RECORDER;"," TARGET_TEMPLATE_CONTENT = TARGET_TEMPLATE_CONTENT + TABCONTENT_PERSONALRECORDER;"," }",""," TARGET_TEMPLATE = TARGET_TEMPLATE + TEMPLATE_MANAGER;"," TARGET_TEMPLATE_CONTENT = TARGET_TEMPLATE_CONTENT + TABCONTENT_MANAGERSERIES;",""," if (this.get('showplaylist') !== \"0\") {"," TARGET_TEMPLATE = TARGET_TEMPLATE + TEMPLATE_PLAYLIST;"," TARGET_TEMPLATE_CONTENT = TARGET_TEMPLATE_CONTENT + TABCONTENT_MANAGERPLAYLIST;"," }",""," if(this.get('showsharedvideos') !== \"0\") {"," TARGET_TEMPLATE = TARGET_TEMPLATE + TEMPLATE_SHAREDVIDEOS;"," TARGET_TEMPLATE_CONTENT = TARGET_TEMPLATE_CONTENT + TABCONTENT_SHAREDVIDEOS;"," }",""," TARGET_TEMPLATE = TARGET_TEMPLATE + \"
\";"," TARGET_TEMPLATE_CONTENT = TARGET_TEMPLATE_CONTENT + '' +"," '
' +"," '' +"," '
';",""," TARGET_TEMPLATE = TARGET_TEMPLATE + TARGET_TEMPLATE_CONTENT;",""," var template = Y.Handlebars.compile(TARGET_TEMPLATE),"," content = Y.Node.create(template({"," elementid: this.get('host').get('elementid'),"," CSS: CSS,"," FLAVORCONTROL: FLAVORCONTROL,"," PUMUKITURL: this.get('pumukitmediaurl'),"," HASH: this.get('hash'),"," USERNAME: this.get('username'),"," EMAIL: this.get('email'),"," CAPABILITY: this.get('capability'),"," PASSWORD: this.get('password'),"," DATE: this.get('date'),"," DEBUG: this.get('enabledebugmode'),"," component: COMPONENTNAME,"," defaultflavor: this.get('defaultflavor'),"," clickedicon: clickedicon,"," button_upload: M.util.get_string('button_upload', COMPONENTNAME),"," button_pr: M.util.get_string('button_pr', COMPONENTNAME),"," button_myvideos: M.util.get_string('button_myvideos', COMPONENTNAME),"," button_playlists: M.util.get_string('button_playlists', COMPONENTNAME),"," button_sharevideos: M.util.get_string('button_sharevideos', COMPONENTNAME)"," }));",""," if(this.get('enabledebugmode') == 1) {"," console.log('URL: ' + this.get('pumukitmediaurl'));"," console.log('Date: ' + this.get('date'));"," console.log('Hash: ' + this.get('hash'));"," console.log('User: ' + this.get('username'));"," console.log('Email: ' + this.get('email'));"," console.log('Pwd: ' + this.get('password'));"," }",""," this._form = content;"," //this._form.one('.' + CSS.INPUTSUBMIT).on('click', this._doInsert, this);",""," return content;"," },",""," /**"," * Inserts the users input onto the page"," * @method _getDialogueContent"," * @private"," */"," _doInsert : function(e){"," e.preventDefault();"," this.getDialogue({"," focusAfterHide: null"," }).hide();",""," var flavorcontrol = this._form.one(SELECTORS.FLAVORCONTROL);",""," // If no file is there to insert, don't do it."," if (!flavorcontrol.get('value')){"," return;"," }",""," this.editor.focus();"," this.get('host').insertContentAtFocusPoint(flavorcontrol.get('value'));"," this.markUpdated();"," },",""," _receiveMessage : function(e){"," // window.addEventListener('message', function(e){"," if(e.data === 'enableMoodlePRAdd?'){"," e.source.postMessage({'moodlepradd':'OK'}, '*');"," }"," // });"," if (!e.data.mmId && !e.data.playlist && !e.data.url) {"," return;"," }",""," e.preventDefault();"," this.getDialogue({"," focusAfterHide: null"," }).hide();",""," this._closeSharedWindow(e);",""," // If no file is there to insert, don't do it."," if (!e.data.mmId && !e.data.playlist && !e.data.url){"," return;"," }",""," window.removeEventListener('message', this._receiveMessageBind);",""," this.editor.focus();",""," var url = this.get('pumukitmediaurl') + '/openedx/openedx/embed/' + e.data.mmId;"," if(e.data.playlist) {"," url = this.get('pumukitmediaurl') + '/openedx/openedx/playlist/embed/' + e.data.playlist;"," } else if(e.data.url){"," url = e.data.url;"," }",""," var iframe ="," '
' +"," '' +"," 'Video' +"," '
';"," this.get('host').insertContentAtFocusPoint(iframe);"," this.markUpdated();"," },",""," _closeSharedWindow : function(){"," var sharedWindow = document.getElementById('pumukitmedia_iframe_recorder');"," sharedWindow.parentNode.removeChild(sharedWindow);"," }","}, {"," ATTRS: {"," pumukitmediaurl: {"," value: ''"," },"," hash: {"," value: ''"," },"," username: {"," value: ''"," },"," email: {"," value: ''"," },"," dialogtitle: {"," value: ''"," },"," showpr: {"," value: ''"," },"," showplaylist: {"," value: ''"," },"," showsharedvideos: {"," value: ''"," },"," capability: {"," value: ''"," },"," password: {"," value: ''"," },"," date: {"," value: ''"," },"," enabledebugmode: {"," value: ''"," }"," }","});","","","}, '@VERSION@', {\"requires\": [\"moodle-editor_atto-plugin\"]});","","}());"]}; } -var __cov_tXSAt56$IU$diw8qGC09QQ = __coverage__['build/moodle-atto_pumukitmedia-button/moodle-atto_pumukitmedia-button.js']; -__cov_tXSAt56$IU$diw8qGC09QQ.s['1']++;YUI.add('moodle-atto_pumukitmedia-button',function(Y,NAME){__cov_tXSAt56$IU$diw8qGC09QQ.f['1']++;__cov_tXSAt56$IU$diw8qGC09QQ.s['2']++;var COMPONENTNAME='atto_pumukitmedia';__cov_tXSAt56$IU$diw8qGC09QQ.s['3']++;var FLAVORCONTROL='pumukitmedia_flavor';__cov_tXSAt56$IU$diw8qGC09QQ.s['4']++;var LOGNAME='atto_pumukitmedia';__cov_tXSAt56$IU$diw8qGC09QQ.s['5']++;var CSS={INPUTSUBMIT:'atto_media_urlentrysubmit',INPUTCANCEL:'atto_media_urlentrycancel',FLAVORCONTROL:'flavorcontrol'},SELECTORS={FLAVORCONTROL:'.flavorcontrol'};__cov_tXSAt56$IU$diw8qGC09QQ.s['6']++;var TEMPLATE='';__cov_tXSAt56$IU$diw8qGC09QQ.s['64']++;TARGET_TEMPLATE_CONTENT=TARGET_TEMPLATE_CONTENT+''+'
'+''+'
';__cov_tXSAt56$IU$diw8qGC09QQ.s['65']++;TARGET_TEMPLATE=TARGET_TEMPLATE+TARGET_TEMPLATE_CONTENT;__cov_tXSAt56$IU$diw8qGC09QQ.s['66']++;var template=Y.Handlebars.compile(TARGET_TEMPLATE),content=Y.Node.create(template({elementid:this.get('host').get('elementid'),CSS:CSS,FLAVORCONTROL:FLAVORCONTROL,PUMUKITURL:this.get('pumukitmediaurl'),HASH:this.get('hash'),USERNAME:this.get('username'),EMAIL:this.get('email'),CAPABILITY:this.get('capability'),PASSWORD:this.get('password'),DATE:this.get('date'),DEBUG:this.get('enabledebugmode'),component:COMPONENTNAME,defaultflavor:this.get('defaultflavor'),clickedicon:clickedicon,button_upload:M.util.get_string('button_upload',COMPONENTNAME),button_pr:M.util.get_string('button_pr',COMPONENTNAME),button_myvideos:M.util.get_string('button_myvideos',COMPONENTNAME),button_playlists:M.util.get_string('button_playlists',COMPONENTNAME),button_sharevideos:M.util.get_string('button_sharevideos',COMPONENTNAME)}));__cov_tXSAt56$IU$diw8qGC09QQ.s['67']++;if(this.get('enabledebugmode')==1){__cov_tXSAt56$IU$diw8qGC09QQ.b['9'][0]++;__cov_tXSAt56$IU$diw8qGC09QQ.s['68']++;console.log('URL: '+this.get('pumukitmediaurl'));__cov_tXSAt56$IU$diw8qGC09QQ.s['69']++;console.log('Date: '+this.get('date'));__cov_tXSAt56$IU$diw8qGC09QQ.s['70']++;console.log('Hash: '+this.get('hash'));__cov_tXSAt56$IU$diw8qGC09QQ.s['71']++;console.log('User: '+this.get('username'));__cov_tXSAt56$IU$diw8qGC09QQ.s['72']++;console.log('Email: '+this.get('email'));__cov_tXSAt56$IU$diw8qGC09QQ.s['73']++;console.log('Pwd: '+this.get('password'));}else{__cov_tXSAt56$IU$diw8qGC09QQ.b['9'][1]++;}__cov_tXSAt56$IU$diw8qGC09QQ.s['74']++;this._form=content;__cov_tXSAt56$IU$diw8qGC09QQ.s['75']++;return content;},_doInsert:function(e){__cov_tXSAt56$IU$diw8qGC09QQ.f['6']++;__cov_tXSAt56$IU$diw8qGC09QQ.s['76']++;e.preventDefault();__cov_tXSAt56$IU$diw8qGC09QQ.s['77']++;this.getDialogue({focusAfterHide:null}).hide();__cov_tXSAt56$IU$diw8qGC09QQ.s['78']++;var flavorcontrol=this._form.one(SELECTORS.FLAVORCONTROL);__cov_tXSAt56$IU$diw8qGC09QQ.s['79']++;if(!flavorcontrol.get('value')){__cov_tXSAt56$IU$diw8qGC09QQ.b['10'][0]++;__cov_tXSAt56$IU$diw8qGC09QQ.s['80']++;return;}else{__cov_tXSAt56$IU$diw8qGC09QQ.b['10'][1]++;}__cov_tXSAt56$IU$diw8qGC09QQ.s['81']++;this.editor.focus();__cov_tXSAt56$IU$diw8qGC09QQ.s['82']++;this.get('host').insertContentAtFocusPoint(flavorcontrol.get('value'));__cov_tXSAt56$IU$diw8qGC09QQ.s['83']++;this.markUpdated();},_receiveMessage:function(e){__cov_tXSAt56$IU$diw8qGC09QQ.f['7']++;__cov_tXSAt56$IU$diw8qGC09QQ.s['84']++;if(e.data==='enableMoodlePRAdd?'){__cov_tXSAt56$IU$diw8qGC09QQ.b['11'][0]++;__cov_tXSAt56$IU$diw8qGC09QQ.s['85']++;e.source.postMessage({'moodlepradd':'OK'},'*');}else{__cov_tXSAt56$IU$diw8qGC09QQ.b['11'][1]++;}__cov_tXSAt56$IU$diw8qGC09QQ.s['86']++;if((__cov_tXSAt56$IU$diw8qGC09QQ.b['13'][0]++,!e.data.mmId)&&(__cov_tXSAt56$IU$diw8qGC09QQ.b['13'][1]++,!e.data.playlist)&&(__cov_tXSAt56$IU$diw8qGC09QQ.b['13'][2]++,!e.data.url)){__cov_tXSAt56$IU$diw8qGC09QQ.b['12'][0]++;__cov_tXSAt56$IU$diw8qGC09QQ.s['87']++;return;}else{__cov_tXSAt56$IU$diw8qGC09QQ.b['12'][1]++;}__cov_tXSAt56$IU$diw8qGC09QQ.s['88']++;e.preventDefault();__cov_tXSAt56$IU$diw8qGC09QQ.s['89']++;this.getDialogue({focusAfterHide:null}).hide();__cov_tXSAt56$IU$diw8qGC09QQ.s['90']++;this._closeSharedWindow(e);__cov_tXSAt56$IU$diw8qGC09QQ.s['91']++;if((__cov_tXSAt56$IU$diw8qGC09QQ.b['15'][0]++,!e.data.mmId)&&(__cov_tXSAt56$IU$diw8qGC09QQ.b['15'][1]++,!e.data.playlist)&&(__cov_tXSAt56$IU$diw8qGC09QQ.b['15'][2]++,!e.data.url)){__cov_tXSAt56$IU$diw8qGC09QQ.b['14'][0]++;__cov_tXSAt56$IU$diw8qGC09QQ.s['92']++;return;}else{__cov_tXSAt56$IU$diw8qGC09QQ.b['14'][1]++;}__cov_tXSAt56$IU$diw8qGC09QQ.s['93']++;window.removeEventListener('message',this._receiveMessageBind);__cov_tXSAt56$IU$diw8qGC09QQ.s['94']++;this.editor.focus();__cov_tXSAt56$IU$diw8qGC09QQ.s['95']++;var url=this.get('pumukitmediaurl')+'/openedx/openedx/embed/?id='+e.data.mmId;__cov_tXSAt56$IU$diw8qGC09QQ.s['96']++;if(e.data.playlist){__cov_tXSAt56$IU$diw8qGC09QQ.b['16'][0]++;__cov_tXSAt56$IU$diw8qGC09QQ.s['97']++;url=this.get('pumukitmediaurl')+'/openedx/openedx/playlist/embed/?id='+e.data.playlist;}else{__cov_tXSAt56$IU$diw8qGC09QQ.b['16'][1]++;__cov_tXSAt56$IU$diw8qGC09QQ.s['98']++;if(e.data.url){__cov_tXSAt56$IU$diw8qGC09QQ.b['17'][0]++;__cov_tXSAt56$IU$diw8qGC09QQ.s['99']++;url=e.data.url;}else{__cov_tXSAt56$IU$diw8qGC09QQ.b['17'][1]++;}}__cov_tXSAt56$IU$diw8qGC09QQ.s['100']++;var iframe='
'+''+'Video'+'
';__cov_tXSAt56$IU$diw8qGC09QQ.s['101']++;this.get('host').insertContentAtFocusPoint(iframe);__cov_tXSAt56$IU$diw8qGC09QQ.s['102']++;this.markUpdated();},_closeSharedWindow:function(){__cov_tXSAt56$IU$diw8qGC09QQ.f['8']++;__cov_tXSAt56$IU$diw8qGC09QQ.s['103']++;var sharedWindow=document.getElementById('pumukitmedia_iframe_recorder');__cov_tXSAt56$IU$diw8qGC09QQ.s['104']++;sharedWindow.parentNode.removeChild(sharedWindow);}},{ATTRS:{pumukitmediaurl:{value:''},hash:{value:''},username:{value:''},email:{value:''},dialogtitle:{value:''},showpr:{value:''},showplaylist:{value:''},showsharedvideos:{value:''},capability:{value:''},password:{value:''},date:{value:''},enabledebugmode:{value:''}}});},'@VERSION@',{'requires':['moodle-editor_atto-plugin']}); +__cov_tXSAt56$IU$diw8qGC09QQ = __cov_tXSAt56$IU$diw8qGC09QQ['build/moodle-atto_pumukitmedia-button/moodle-atto_pumukitmedia-button.js']; +__cov_tXSAt56$IU$diw8qGC09QQ.s['1']++;YUI.add('moodle-atto_pumukitmedia-button',function(Y,NAME){__cov_tXSAt56$IU$diw8qGC09QQ.f['1']++;__cov_tXSAt56$IU$diw8qGC09QQ.s['2']++;var COMPONENTNAME='atto_pumukitmedia';__cov_tXSAt56$IU$diw8qGC09QQ.s['3']++;var FLAVORCONTROL='pumukitmedia_flavor';__cov_tXSAt56$IU$diw8qGC09QQ.s['4']++;var LOGNAME='atto_pumukitmedia';__cov_tXSAt56$IU$diw8qGC09QQ.s['5']++;var CSS={INPUTSUBMIT:'atto_media_urlentrysubmit',INPUTCANCEL:'atto_media_urlentrycancel',FLAVORCONTROL:'flavorcontrol'},SELECTORS={FLAVORCONTROL:'.flavorcontrol'};__cov_tXSAt56$IU$diw8qGC09QQ.s['6']++;var TEMPLATE='';__cov_tXSAt56$IU$diw8qGC09QQ.s['64']++;TARGET_TEMPLATE_CONTENT=TARGET_TEMPLATE_CONTENT+''+'
'+''+'
';__cov_tXSAt56$IU$diw8qGC09QQ.s['65']++;TARGET_TEMPLATE=TARGET_TEMPLATE+TARGET_TEMPLATE_CONTENT;__cov_tXSAt56$IU$diw8qGC09QQ.s['66']++;var template=Y.Handlebars.compile(TARGET_TEMPLATE),content=Y.Node.create(template({elementid:this.get('host').get('elementid'),CSS:CSS,FLAVORCONTROL:FLAVORCONTROL,PUMUKITURL:this.get('pumukitmediaurl'),HASH:this.get('hash'),USERNAME:this.get('username'),EMAIL:this.get('email'),CAPABILITY:this.get('capability'),PASSWORD:this.get('password'),DATE:this.get('date'),DEBUG:this.get('enabledebugmode'),component:COMPONENTNAME,defaultflavor:this.get('defaultflavor'),clickedicon:clickedicon,button_upload:M.util.get_string('button_upload',COMPONENTNAME),button_pr:M.util.get_string('button_pr',COMPONENTNAME),button_myvideos:M.util.get_string('button_myvideos',COMPONENTNAME),button_playlists:M.util.get_string('button_playlists',COMPONENTNAME),button_sharevideos:M.util.get_string('button_sharevideos',COMPONENTNAME)}));__cov_tXSAt56$IU$diw8qGC09QQ.s['67']++;if(this.get('enabledebugmode')==1){__cov_tXSAt56$IU$diw8qGC09QQ.b['9'][0]++;__cov_tXSAt56$IU$diw8qGC09QQ.s['68']++;console.log('URL: '+this.get('pumukitmediaurl'));__cov_tXSAt56$IU$diw8qGC09QQ.s['69']++;console.log('Date: '+this.get('date'));__cov_tXSAt56$IU$diw8qGC09QQ.s['70']++;console.log('Hash: '+this.get('hash'));__cov_tXSAt56$IU$diw8qGC09QQ.s['71']++;console.log('User: '+this.get('username'));__cov_tXSAt56$IU$diw8qGC09QQ.s['72']++;console.log('Email: '+this.get('email'));__cov_tXSAt56$IU$diw8qGC09QQ.s['73']++;console.log('Pwd: '+this.get('password'));}else{__cov_tXSAt56$IU$diw8qGC09QQ.b['9'][1]++;}__cov_tXSAt56$IU$diw8qGC09QQ.s['74']++;this._form=content;__cov_tXSAt56$IU$diw8qGC09QQ.s['75']++;return content;},_doInsert:function(e){__cov_tXSAt56$IU$diw8qGC09QQ.f['6']++;__cov_tXSAt56$IU$diw8qGC09QQ.s['76']++;e.preventDefault();__cov_tXSAt56$IU$diw8qGC09QQ.s['77']++;this.getDialogue({focusAfterHide:null}).hide();__cov_tXSAt56$IU$diw8qGC09QQ.s['78']++;var flavorcontrol=this._form.one(SELECTORS.FLAVORCONTROL);__cov_tXSAt56$IU$diw8qGC09QQ.s['79']++;if(!flavorcontrol.get('value')){__cov_tXSAt56$IU$diw8qGC09QQ.b['10'][0]++;__cov_tXSAt56$IU$diw8qGC09QQ.s['80']++;return;}else{__cov_tXSAt56$IU$diw8qGC09QQ.b['10'][1]++;}__cov_tXSAt56$IU$diw8qGC09QQ.s['81']++;this.editor.focus();__cov_tXSAt56$IU$diw8qGC09QQ.s['82']++;this.get('host').insertContentAtFocusPoint(flavorcontrol.get('value'));__cov_tXSAt56$IU$diw8qGC09QQ.s['83']++;this.markUpdated();},_receiveMessage:function(e){__cov_tXSAt56$IU$diw8qGC09QQ.f['7']++;__cov_tXSAt56$IU$diw8qGC09QQ.s['84']++;if(e.data==='enableMoodlePRAdd?'){__cov_tXSAt56$IU$diw8qGC09QQ.b['11'][0]++;__cov_tXSAt56$IU$diw8qGC09QQ.s['85']++;e.source.postMessage({'moodlepradd':'OK'},'*');}else{__cov_tXSAt56$IU$diw8qGC09QQ.b['11'][1]++;}__cov_tXSAt56$IU$diw8qGC09QQ.s['86']++;if((__cov_tXSAt56$IU$diw8qGC09QQ.b['13'][0]++,!e.data.mmId)&&(__cov_tXSAt56$IU$diw8qGC09QQ.b['13'][1]++,!e.data.playlist)&&(__cov_tXSAt56$IU$diw8qGC09QQ.b['13'][2]++,!e.data.url)){__cov_tXSAt56$IU$diw8qGC09QQ.b['12'][0]++;__cov_tXSAt56$IU$diw8qGC09QQ.s['87']++;return;}else{__cov_tXSAt56$IU$diw8qGC09QQ.b['12'][1]++;}__cov_tXSAt56$IU$diw8qGC09QQ.s['88']++;e.preventDefault();__cov_tXSAt56$IU$diw8qGC09QQ.s['89']++;this.getDialogue({focusAfterHide:null}).hide();__cov_tXSAt56$IU$diw8qGC09QQ.s['90']++;this._closeSharedWindow(e);__cov_tXSAt56$IU$diw8qGC09QQ.s['91']++;if((__cov_tXSAt56$IU$diw8qGC09QQ.b['15'][0]++,!e.data.mmId)&&(__cov_tXSAt56$IU$diw8qGC09QQ.b['15'][1]++,!e.data.playlist)&&(__cov_tXSAt56$IU$diw8qGC09QQ.b['15'][2]++,!e.data.url)){__cov_tXSAt56$IU$diw8qGC09QQ.b['14'][0]++;__cov_tXSAt56$IU$diw8qGC09QQ.s['92']++;return;}else{__cov_tXSAt56$IU$diw8qGC09QQ.b['14'][1]++;}__cov_tXSAt56$IU$diw8qGC09QQ.s['93']++;window.removeEventListener('message',this._receiveMessageBind);__cov_tXSAt56$IU$diw8qGC09QQ.s['94']++;this.editor.focus();__cov_tXSAt56$IU$diw8qGC09QQ.s['95']++;var url=this.get('pumukitmediaurl')+'/openedx/openedx/embed/'+e.data.mmId;__cov_tXSAt56$IU$diw8qGC09QQ.s['96']++;if(e.data.playlist){__cov_tXSAt56$IU$diw8qGC09QQ.b['16'][0]++;__cov_tXSAt56$IU$diw8qGC09QQ.s['97']++;url=this.get('pumukitmediaurl')+'/openedx/openedx/playlist/embed/'+e.data.playlist;}else{__cov_tXSAt56$IU$diw8qGC09QQ.b['16'][1]++;__cov_tXSAt56$IU$diw8qGC09QQ.s['98']++;if(e.data.url){__cov_tXSAt56$IU$diw8qGC09QQ.b['17'][0]++;__cov_tXSAt56$IU$diw8qGC09QQ.s['99']++;url=e.data.url;}else{__cov_tXSAt56$IU$diw8qGC09QQ.b['17'][1]++;}}__cov_tXSAt56$IU$diw8qGC09QQ.s['100']++;var iframe='
'+''+'Video'+'
';__cov_tXSAt56$IU$diw8qGC09QQ.s['101']++;this.get('host').insertContentAtFocusPoint(iframe);__cov_tXSAt56$IU$diw8qGC09QQ.s['102']++;this.markUpdated();},_closeSharedWindow:function(){__cov_tXSAt56$IU$diw8qGC09QQ.f['8']++;__cov_tXSAt56$IU$diw8qGC09QQ.s['103']++;var sharedWindow=document.getElementById('pumukitmedia_iframe_recorder');__cov_tXSAt56$IU$diw8qGC09QQ.s['104']++;sharedWindow.parentNode.removeChild(sharedWindow);}},{ATTRS:{pumukitmediaurl:{value:''},hash:{value:''},username:{value:''},email:{value:''},dialogtitle:{value:''},showpr:{value:''},showplaylist:{value:''},showsharedvideos:{value:''},capability:{value:''},password:{value:''},date:{value:''},enabledebugmode:{value:''}}});},'@VERSION@',{'requires':['moodle-editor_atto-plugin']}); diff --git a/yui/build/moodle-atto_pumukitmedia-button/moodle-atto_pumukitmedia-button-debug.js b/yui/build/moodle-atto_pumukitmedia-button/moodle-atto_pumukitmedia-button-debug.js index cf3ce1c..6ee2802 100644 --- a/yui/build/moodle-atto_pumukitmedia-button/moodle-atto_pumukitmedia-button-debug.js +++ b/yui/build/moodle-atto_pumukitmedia-button/moodle-atto_pumukitmedia-button-debug.js @@ -54,7 +54,7 @@ var TABCONTENT_UPLOAD = '
' + '' + + ' allowfullscreen allow="microphone; camera; display-capture; clipboard-write">' + '
'; TEMPLATE = TEMPLATE + ITEM_UPLOAD; @@ -71,7 +71,7 @@ var TABCONTENT_PERSONALRECORDER = '
' + '' + + ' allowfullscreen allow="microphone; camera; display-capture; clipboard-write">' + '
'; var TEMPLATE_MANAGER = @@ -85,7 +85,7 @@ var TABCONTENT_MANAGERSERIES = '
' + '' + + ' allowfullscreen allow="microphone; camera; display-capture; clipboard-write">' + '
'; var TEMPLATE_PLAYLIST = @@ -99,7 +99,7 @@ var TABCONTENT_MANAGERPLAYLIST = '
' + '' + + ' allowfullscreen allow="microphone; camera; display-capture; clipboard-write">' + '
'; var TEMPLATE_SHAREDVIDEOS = @@ -112,7 +112,7 @@ var TEMPLATE_SHAREDVIDEOS = var TABCONTENT_SHAREDVIDEOS = '
' + '' + + ' allowfullscreen allow="microphone; camera; display-capture; clipboard-write">' + '
'; Y.namespace('M.atto_pumukitmedia').Button = Y.Base.create('button', Y.M.editor_atto.EditorPlugin, [], { @@ -145,7 +145,7 @@ Y.namespace('M.atto_pumukitmedia').Button = Y.Base.create('button', Y.M.editor_a this.get('hash') + "&username=" + this.get('username') + "&email="+ this.get('email') + "&lang=en"; - iframe.allow = "microphone; camera; display-capture"; + iframe.allow = "microphone; camera; display-capture; clipboard-write"; document.getElementsByTagName('body')[0].appendChild(iframe); } }, @@ -334,9 +334,9 @@ Y.namespace('M.atto_pumukitmedia').Button = Y.Base.create('button', Y.M.editor_a this.editor.focus(); - var url = this.get('pumukitmediaurl') + '/openedx/openedx/embed/?id=' + e.data.mmId; + var url = this.get('pumukitmediaurl') + '/openedx/openedx/embed/' + e.data.mmId; if(e.data.playlist) { - url = this.get('pumukitmediaurl') + '/openedx/openedx/playlist/embed/?id=' + e.data.playlist; + url = this.get('pumukitmediaurl') + '/openedx/openedx/playlist/embed/' + e.data.playlist; } else if(e.data.url){ url = e.data.url; } @@ -344,7 +344,7 @@ Y.namespace('M.atto_pumukitmedia').Button = Y.Base.create('button', Y.M.editor_a var iframe = '
' + '' + + '" allowfullscreen allow="microphone; camera; display-capture; clipboard-write">' + 'Video' + '
'; this.get('host').insertContentAtFocusPoint(iframe); diff --git a/yui/build/moodle-atto_pumukitmedia-button/moodle-atto_pumukitmedia-button-min.js b/yui/build/moodle-atto_pumukitmedia-button/moodle-atto_pumukitmedia-button-min.js index 494ed2f..1c7e2ec 100644 --- a/yui/build/moodle-atto_pumukitmedia-button/moodle-atto_pumukitmedia-button-min.js +++ b/yui/build/moodle-atto_pumukitmedia-button/moodle-atto_pumukitmedia-button-min.js @@ -1,2 +1,2 @@ -YUI.add("moodle-atto_pumukitmedia-button",function(e,t){var n="atto_pumukitmedia",r="pumukitmedia_flavor",i="atto_pumukitmedia",s={INPUTSUBMIT:"atto_media_urlentrysubmit",INPUTCANCEL:"atto_media_urlentrycancel",FLAVORCONTROL:"flavorcontrol"},o={FLAVORCONTROL:".flavorcontrol"},u='",o=o+""+'
'+''+"
",i+=o;var f=e.Handlebars.compile(i),l=e.Node.create(f({elementid:this.get("host").get("elementid"),CSS:s,FLAVORCONTROL:r,PUMUKITURL:this.get("pumukitmediaurl"),HASH:this.get("hash"),USERNAME:this.get("username"),EMAIL:this.get("email"),CAPABILITY:this.get("capability"),PASSWORD:this.get("password"),DATE:this.get("date"),DEBUG:this.get("enabledebugmode"),component:n,defaultflavor:this.get("defaultflavor"),clickedicon:t,button_upload:M.util.get_string("button_upload",n),button_pr:M.util.get_string("button_pr",n),button_myvideos:M.util.get_string("button_myvideos",n),button_playlists:M.util.get_string("button_playlists",n),button_sharevideos:M.util.get_string("button_sharevideos",n)}));return this.get("enabledebugmode")==1&&(console.log("URL: "+this.get("pumukitmediaurl")),console.log("Date: "+this.get("date")),console.log("Hash: "+this.get("hash")),console.log("User: "+this.get("username")),console.log("Email: "+this.get("email")),console.log("Pwd: "+this.get("password"))),this._form=l,l},_doInsert:function(e){e.preventDefault(),this.getDialogue({focusAfterHide:null}).hide();var t=this._form.one(o.FLAVORCONTROL);if(!t.get("value"))return;this.editor.focus(),this.get("host").insertContentAtFocusPoint(t.get("value")),this.markUpdated()},_receiveMessage:function(e){e.data==="enableMoodlePRAdd?"&&e.source.postMessage({moodlepradd:"OK"},"*");if(!e.data.mmId&&!e.data.playlist&&!e.data.url)return;e.preventDefault(),this.getDialogue({focusAfterHide:null}).hide(),this._closeSharedWindow(e);if(!e.data.mmId&&!e.data.playlist&&!e.data.url)return;window.removeEventListener("message",this._receiveMessageBind),this.editor.focus();var t=this.get("pumukitmediaurl")+"/openedx/openedx/embed/"+e.data.mmId;e.data.playlist?t=this.get("pumukitmediaurl")+"/openedx/openedx/playlist/embed/"+ -e.data.playlist:e.data.url&&(t=e.data.url);var n='
'+'Video'+"
";this.get("host").insertContentAtFocusPoint(n),this.markUpdated()},_closeSharedWindow:function(){var e=document.getElementById("pumukitmedia_iframe_recorder");e.parentNode.removeChild(e)}},{ATTRS:{pumukitmediaurl:{value:""},hash:{value:""},username:{value:""},email:{value:""},dialogtitle:{value:""},showpr:{value:""},showplaylist:{value:""},showsharedvideos:{value:""},capability:{value:""},password:{value:""},date:{value:""},enabledebugmode:{value:""}}})},"@VERSION@",{requires:["moodle-editor_atto-plugin"]}); +YUI.add("moodle-atto_pumukitmedia-button",function(i,e){var l="atto_pumukitmedia",s="pumukitmedia_flavor",o={INPUTSUBMIT:"atto_media_urlentrysubmit",INPUTCANCEL:"atto_media_urlentrycancel",FLAVORCONTROL:"flavorcontrol"},t=".flavorcontrol",n='"+(a+='
')),t=i.Node.create(a({elementid:this.get("host").get("elementid"),CSS:o,FLAVORCONTROL:s,PUMUKITURL:this.get("pumukitmediaurl"),HASH:this.get("hash"),USERNAME:this.get("username"),EMAIL:this.get("email"),CAPABILITY:this.get("capability"),PASSWORD:this.get("password"),DATE:this.get("date"),DEBUG:this.get("enabledebugmode"),component:l,defaultflavor:this.get("defaultflavor"),clickedicon:e,button_upload:M.util.get_string("button_upload",l),button_pr:M.util.get_string("button_pr",l),button_myvideos:M.util.get_string("button_myvideos",l),button_playlists:M.util.get_string("button_playlists",l),button_sharevideos:M.util.get_string("button_sharevideos",l)})),1==this.get("enabledebugmode")&&(console.log("URL: "+this.get("pumukitmediaurl")),console.log("Date: "+this.get("date")),console.log("Hash: "+this.get("hash")),console.log("User: "+this.get("username")),console.log("Email: "+this.get("email")),console.log("Pwd: "+this.get("password"))),this._form=t},_doInsert:function(e){e.preventDefault(),this.getDialogue({focusAfterHide:null}).hide();e=this._form.one(t);e.get("value")&&(this.editor.focus(),this.get("host").insertContentAtFocusPoint(e.get("value")),this.markUpdated())},_receiveMessage:function(e){var t;"enableMoodlePRAdd?"===e.data&&e.source.postMessage({moodlepradd:"OK"},"*"),(e.data.mmId||e.data.playlist||e.data.url)&&(e.preventDefault(),this.getDialogue({focusAfterHide:null}).hide(),this._closeSharedWindow(e),e.data.mmId||e.data.playlist||e.data.url)&&(window.removeEventListener("message",this._receiveMessageBind),this.editor.focus(),t=this.get("pumukitmediaurl")+"/openedx/openedx/embed/"+e.data.mmId,e.data.playlist?t=this.get("pumukitmediaurl")+"/openedx/openedx/playlist/embed/"+e.data.playlist:e.data.url&&(t=e.data.url), +e='
Video
',this.get("host").insertContentAtFocusPoint(e),this.markUpdated())},_closeSharedWindow:function(){var e=document.getElementById("pumukitmedia_iframe_recorder");e.parentNode.removeChild(e)}},{ATTRS:{pumukitmediaurl:{value:""},hash:{value:""},username:{value:""},email:{value:""},dialogtitle:{value:""},showpr:{value:""},showplaylist:{value:""},showsharedvideos:{value:""},capability:{value:""},password:{value:""},date:{value:""},enabledebugmode:{value:""}}})},"@VERSION@",{requires:["moodle-editor_atto-plugin"]}); \ No newline at end of file diff --git a/yui/build/moodle-atto_pumukitmedia-button/moodle-atto_pumukitmedia-button.js b/yui/build/moodle-atto_pumukitmedia-button/moodle-atto_pumukitmedia-button.js index 09b2676..39c85a6 100644 --- a/yui/build/moodle-atto_pumukitmedia-button/moodle-atto_pumukitmedia-button.js +++ b/yui/build/moodle-atto_pumukitmedia-button/moodle-atto_pumukitmedia-button.js @@ -54,7 +54,7 @@ var TABCONTENT_UPLOAD = '
' + '' + + ' allowfullscreen allow="microphone; camera; display-capture; clipboard-write">' + '
'; TEMPLATE = TEMPLATE + ITEM_UPLOAD; @@ -71,7 +71,7 @@ var TABCONTENT_PERSONALRECORDER = '
' + '' + + ' allowfullscreen allow="microphone; camera; display-capture; clipboard-write">' + '
'; var TEMPLATE_MANAGER = @@ -85,7 +85,7 @@ var TABCONTENT_MANAGERSERIES = '
' + '' + + ' allowfullscreen allow="microphone; camera; display-capture; clipboard-write">' + '
'; var TEMPLATE_PLAYLIST = @@ -99,7 +99,7 @@ var TABCONTENT_MANAGERPLAYLIST = '
' + '' + + ' allowfullscreen allow="microphone; camera; display-capture; clipboard-write">' + '
'; var TEMPLATE_SHAREDVIDEOS = @@ -112,7 +112,7 @@ var TEMPLATE_SHAREDVIDEOS = var TABCONTENT_SHAREDVIDEOS = '
' + '' + + ' allowfullscreen allow="microphone; camera; display-capture; clipboard-write">' + '
'; Y.namespace('M.atto_pumukitmedia').Button = Y.Base.create('button', Y.M.editor_atto.EditorPlugin, [], { @@ -145,7 +145,7 @@ Y.namespace('M.atto_pumukitmedia').Button = Y.Base.create('button', Y.M.editor_a this.get('hash') + "&username=" + this.get('username') + "&email="+ this.get('email') + "&lang=en"; - iframe.allow = "microphone; camera; display-capture"; + iframe.allow = "microphone; camera; display-capture; clipboard-write"; document.getElementsByTagName('body')[0].appendChild(iframe); } }, @@ -342,7 +342,7 @@ Y.namespace('M.atto_pumukitmedia').Button = Y.Base.create('button', Y.M.editor_a var iframe = '
' + '' + + '" allowfullscreen allow="microphone; camera; display-capture; clipboard-write">' + 'Video' + '
'; this.get('host').insertContentAtFocusPoint(iframe); diff --git a/yui/src/button/js/button.js b/yui/src/button/js/button.js index ea9adcc..61ed7fa 100644 --- a/yui/src/button/js/button.js +++ b/yui/src/button/js/button.js @@ -52,7 +52,7 @@ var TABCONTENT_UPLOAD = '
' + '' + + ' allowfullscreen allow="microphone; camera; display-capture; clipboard-write">' + '
'; TEMPLATE = TEMPLATE + ITEM_UPLOAD; @@ -69,7 +69,7 @@ var TABCONTENT_PERSONALRECORDER = '
' + '' + + ' allowfullscreen allow="microphone; camera; display-capture; clipboard-write">' + '
'; var TEMPLATE_MANAGER = @@ -83,7 +83,7 @@ var TABCONTENT_MANAGERSERIES = '
' + '' + + ' allowfullscreen allow="microphone; camera; display-capture; clipboard-write">' + '
'; var TEMPLATE_PLAYLIST = @@ -97,7 +97,7 @@ var TABCONTENT_MANAGERPLAYLIST = '
' + '' + + ' allowfullscreen allow="microphone; camera; display-capture; clipboard-write">' + '
'; var TEMPLATE_SHAREDVIDEOS = @@ -110,7 +110,7 @@ var TEMPLATE_SHAREDVIDEOS = var TABCONTENT_SHAREDVIDEOS = '
' + '' + + ' allowfullscreen allow="microphone; camera; display-capture; clipboard-write">' + '
'; Y.namespace('M.atto_pumukitmedia').Button = Y.Base.create('button', Y.M.editor_atto.EditorPlugin, [], { @@ -143,7 +143,7 @@ Y.namespace('M.atto_pumukitmedia').Button = Y.Base.create('button', Y.M.editor_a this.get('hash') + "&username=" + this.get('username') + "&email="+ this.get('email') + "&lang=en"; - iframe.allow = "microphone; camera; display-capture"; + iframe.allow = "microphone; camera; display-capture; clipboard-write"; document.getElementsByTagName('body')[0].appendChild(iframe); } }, @@ -342,7 +342,7 @@ Y.namespace('M.atto_pumukitmedia').Button = Y.Base.create('button', Y.M.editor_a var iframe = '
' + '' + + '" allowfullscreen allow="microphone; camera; display-capture; clipboard-write">' + 'Video' + '
'; this.get('host').insertContentAtFocusPoint(iframe);