diff --git a/version.php b/version.php
index a152476..dd506e2 100644
--- a/version.php
+++ b/version.php
@@ -25,11 +25,11 @@
defined('MOODLE_INTERNAL') || exit();
-$plugin->version = 2024111400;
+$plugin->version = 2024111401;
$plugin->requires = 2016112900;
$plugin->maturity = MATURITY_STABLE;
$plugin->component = 'atto_pumukitmedia';
$plugin->dependencies = [
'filter_pumukitmedia' => 2022021801
];
-$plugin->release = '1.2.0';
+$plugin->release = '1.3.0';
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..1df5970 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 = '
';","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\";"," 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/?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":353,"loc":{"start":{"line":353,"column":25},"end":{"line":353,"column":35}}}},"statementMap":{"1":{"start":{"line":1,"column":0},"end":{"line":399,"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":396,"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":348,"column":8},"end":{"line":348,"column":104}},"101":{"start":{"line":349,"column":8},"end":{"line":349,"column":59}},"102":{"start":{"line":350,"column":8},"end":{"line":350,"column":27}},"103":{"start":{"line":354,"column":8},"end":{"line":354,"column":83}},"104":{"start":{"line":355,"column":8},"end":{"line":355,"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' +"," // '
';"," var iframe = '' + url + '';"," 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['7']++;var TEMPLATE_TABCONTENT='';__cov_tXSAt56$IU$diw8qGC09QQ.s['8']++;var ITEM_UPLOAD='
- '+''+'{{button_upload}}'+''+'
';__cov_tXSAt56$IU$diw8qGC09QQ.s['9']++;var TABCONTENT_UPLOAD='
'+''+'
';__cov_tXSAt56$IU$diw8qGC09QQ.s['10']++;TEMPLATE=TEMPLATE+ITEM_UPLOAD;__cov_tXSAt56$IU$diw8qGC09QQ.s['11']++;TEMPLATE_TABCONTENT=TEMPLATE_TABCONTENT+TABCONTENT_UPLOAD;__cov_tXSAt56$IU$diw8qGC09QQ.s['12']++;var ITEM_PERSONAL_RECORDER='
- '+''+'{{button_pr}}'+''+'
';__cov_tXSAt56$IU$diw8qGC09QQ.s['13']++;var TABCONTENT_PERSONALRECORDER='
'+''+'
';__cov_tXSAt56$IU$diw8qGC09QQ.s['14']++;var TEMPLATE_MANAGER='
- '+''+'{{button_myvideos}}'+''+'
';__cov_tXSAt56$IU$diw8qGC09QQ.s['15']++;var TABCONTENT_MANAGERSERIES='
'+''+'
';__cov_tXSAt56$IU$diw8qGC09QQ.s['16']++;var TEMPLATE_PLAYLIST='
- '+''+'{{button_playlists}}'+''+'
';__cov_tXSAt56$IU$diw8qGC09QQ.s['17']++;var TABCONTENT_MANAGERPLAYLIST='
'+''+'
';__cov_tXSAt56$IU$diw8qGC09QQ.s['18']++;var TEMPLATE_SHAREDVIDEOS='
- '+''+'{{button_sharevideos}}'+''+'
';__cov_tXSAt56$IU$diw8qGC09QQ.s['19']++;var TABCONTENT_SHAREDVIDEOS='
'+''+'
';__cov_tXSAt56$IU$diw8qGC09QQ.s['20']++;Y.namespace('M.atto_pumukitmedia').Button=Y.Base.create('button',Y.M.editor_atto.EditorPlugin,[],{_receiveMessageBind:null,initializer:function(){__cov_tXSAt56$IU$diw8qGC09QQ.f['2']++;__cov_tXSAt56$IU$diw8qGC09QQ.s['21']++;if((__cov_tXSAt56$IU$diw8qGC09QQ.b['2'][0]++,this.get('disabled'))||(__cov_tXSAt56$IU$diw8qGC09QQ.b['2'][1]++,!this.get('capability'))){__cov_tXSAt56$IU$diw8qGC09QQ.b['1'][0]++;__cov_tXSAt56$IU$diw8qGC09QQ.s['22']++;return;}else{__cov_tXSAt56$IU$diw8qGC09QQ.b['1'][1]++;}__cov_tXSAt56$IU$diw8qGC09QQ.s['23']++;this.addButton({icon:'e/insert_edit_video',buttonName:'pumukitmedia',callback:this._displayDialogue,callbackArgs:'iconone'});__cov_tXSAt56$IU$diw8qGC09QQ.s['24']++;var id='pumukitmedia_iframe_sso';__cov_tXSAt56$IU$diw8qGC09QQ.s['25']++;if(!document.getElementById(id)){__cov_tXSAt56$IU$diw8qGC09QQ.b['3'][0]++;__cov_tXSAt56$IU$diw8qGC09QQ.s['26']++;var iframe=document.createElement('iframe');__cov_tXSAt56$IU$diw8qGC09QQ.s['27']++;iframe.id=id;__cov_tXSAt56$IU$diw8qGC09QQ.s['28']++;iframe.style.display='none';__cov_tXSAt56$IU$diw8qGC09QQ.s['29']++;iframe.src=this.get('pumukitmediaurl')+'/openedx/sso/manager?hash='+this.get('hash')+'&username='+this.get('username')+'&email='+this.get('email')+'&lang=en';__cov_tXSAt56$IU$diw8qGC09QQ.s['30']++;iframe.allow='microphone; camera; display-capture';__cov_tXSAt56$IU$diw8qGC09QQ.s['31']++;document.getElementsByTagName('body')[0].appendChild(iframe);}else{__cov_tXSAt56$IU$diw8qGC09QQ.b['3'][1]++;}},_getFlavorControlName:function(){__cov_tXSAt56$IU$diw8qGC09QQ.f['3']++;__cov_tXSAt56$IU$diw8qGC09QQ.s['32']++;return this.get('host').get('elementid')+'_'+FLAVORCONTROL;},_displayDialogue:function(e,clickedicon){__cov_tXSAt56$IU$diw8qGC09QQ.f['4']++;__cov_tXSAt56$IU$diw8qGC09QQ.s['33']++;e.preventDefault();__cov_tXSAt56$IU$diw8qGC09QQ.s['34']++;var width=900;__cov_tXSAt56$IU$diw8qGC09QQ.s['35']++;this._receiveMessageBind=this._receiveMessage.bind(this);__cov_tXSAt56$IU$diw8qGC09QQ.s['36']++;window.addEventListener('message',this._receiveMessageBind);__cov_tXSAt56$IU$diw8qGC09QQ.s['37']++;var dialogue=this.getDialogue({headerContent:this.get('dialogtitle'),widht:'70%',focusAfterHide:clickedicon});__cov_tXSAt56$IU$diw8qGC09QQ.s['38']++;if(dialogue.width!==width+'px'){__cov_tXSAt56$IU$diw8qGC09QQ.b['4'][0]++;__cov_tXSAt56$IU$diw8qGC09QQ.s['39']++;dialogue.set('width',width+'px');__cov_tXSAt56$IU$diw8qGC09QQ.s['40']++;dialogue.set('max-width','550px');}else{__cov_tXSAt56$IU$diw8qGC09QQ.b['4'][1]++;}__cov_tXSAt56$IU$diw8qGC09QQ.s['41']++;var buttonform=this._getFormContent(clickedicon);__cov_tXSAt56$IU$diw8qGC09QQ.s['42']++;var bodycontent=Y.Node.create('
');__cov_tXSAt56$IU$diw8qGC09QQ.s['43']++;bodycontent.append(buttonform);__cov_tXSAt56$IU$diw8qGC09QQ.s['44']++;dialogue.set('bodyContent',bodycontent);__cov_tXSAt56$IU$diw8qGC09QQ.s['45']++;dialogue.show();__cov_tXSAt56$IU$diw8qGC09QQ.s['46']++;this.markUpdated();__cov_tXSAt56$IU$diw8qGC09QQ.s['47']++;var clickButton=document.getElementsByClassName('closebutton');__cov_tXSAt56$IU$diw8qGC09QQ.s['48']++;if(clickButton[0]){__cov_tXSAt56$IU$diw8qGC09QQ.b['5'][0]++;__cov_tXSAt56$IU$diw8qGC09QQ.s['49']++;clickButton[0].addEventListener('click',this._closeSharedWindow);}else{__cov_tXSAt56$IU$diw8qGC09QQ.b['5'][1]++;}},_getFormContent:function(clickedicon){__cov_tXSAt56$IU$diw8qGC09QQ.f['5']++;__cov_tXSAt56$IU$diw8qGC09QQ.s['50']++;var TARGET_TEMPLATE=TEMPLATE;__cov_tXSAt56$IU$diw8qGC09QQ.s['51']++;var TARGET_TEMPLATE_CONTENT=TEMPLATE_TABCONTENT;__cov_tXSAt56$IU$diw8qGC09QQ.s['52']++;if(this.get('showpr')!=='0'){__cov_tXSAt56$IU$diw8qGC09QQ.b['6'][0]++;__cov_tXSAt56$IU$diw8qGC09QQ.s['53']++;TARGET_TEMPLATE=TARGET_TEMPLATE+ITEM_PERSONAL_RECORDER;__cov_tXSAt56$IU$diw8qGC09QQ.s['54']++;TARGET_TEMPLATE_CONTENT=TARGET_TEMPLATE_CONTENT+TABCONTENT_PERSONALRECORDER;}else{__cov_tXSAt56$IU$diw8qGC09QQ.b['6'][1]++;}__cov_tXSAt56$IU$diw8qGC09QQ.s['55']++;TARGET_TEMPLATE=TARGET_TEMPLATE+TEMPLATE_MANAGER;__cov_tXSAt56$IU$diw8qGC09QQ.s['56']++;TARGET_TEMPLATE_CONTENT=TARGET_TEMPLATE_CONTENT+TABCONTENT_MANAGERSERIES;__cov_tXSAt56$IU$diw8qGC09QQ.s['57']++;if(this.get('showplaylist')!=='0'){__cov_tXSAt56$IU$diw8qGC09QQ.b['7'][0]++;__cov_tXSAt56$IU$diw8qGC09QQ.s['58']++;TARGET_TEMPLATE=TARGET_TEMPLATE+TEMPLATE_PLAYLIST;__cov_tXSAt56$IU$diw8qGC09QQ.s['59']++;TARGET_TEMPLATE_CONTENT=TARGET_TEMPLATE_CONTENT+TABCONTENT_MANAGERPLAYLIST;}else{__cov_tXSAt56$IU$diw8qGC09QQ.b['7'][1]++;}__cov_tXSAt56$IU$diw8qGC09QQ.s['60']++;if(this.get('showsharedvideos')!=='0'){__cov_tXSAt56$IU$diw8qGC09QQ.b['8'][0]++;__cov_tXSAt56$IU$diw8qGC09QQ.s['61']++;TARGET_TEMPLATE=TARGET_TEMPLATE+TEMPLATE_SHAREDVIDEOS;__cov_tXSAt56$IU$diw8qGC09QQ.s['62']++;TARGET_TEMPLATE_CONTENT=TARGET_TEMPLATE_CONTENT+TABCONTENT_SHAREDVIDEOS;}else{__cov_tXSAt56$IU$diw8qGC09QQ.b['8'][1]++;}__cov_tXSAt56$IU$diw8qGC09QQ.s['63']++;TARGET_TEMPLATE=TARGET_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['7']++;var TEMPLATE_TABCONTENT='';__cov_tXSAt56$IU$diw8qGC09QQ.s['8']++;var ITEM_UPLOAD='
- '+''+'{{button_upload}}'+''+'
';__cov_tXSAt56$IU$diw8qGC09QQ.s['9']++;var TABCONTENT_UPLOAD='
'+''+'
';__cov_tXSAt56$IU$diw8qGC09QQ.s['10']++;TEMPLATE=TEMPLATE+ITEM_UPLOAD;__cov_tXSAt56$IU$diw8qGC09QQ.s['11']++;TEMPLATE_TABCONTENT=TEMPLATE_TABCONTENT+TABCONTENT_UPLOAD;__cov_tXSAt56$IU$diw8qGC09QQ.s['12']++;var ITEM_PERSONAL_RECORDER='
- '+''+'{{button_pr}}'+''+'
';__cov_tXSAt56$IU$diw8qGC09QQ.s['13']++;var TABCONTENT_PERSONALRECORDER='
'+''+'
';__cov_tXSAt56$IU$diw8qGC09QQ.s['14']++;var TEMPLATE_MANAGER='
- '+''+'{{button_myvideos}}'+''+'
';__cov_tXSAt56$IU$diw8qGC09QQ.s['15']++;var TABCONTENT_MANAGERSERIES='
'+''+'
';__cov_tXSAt56$IU$diw8qGC09QQ.s['16']++;var TEMPLATE_PLAYLIST='
- '+''+'{{button_playlists}}'+''+'
';__cov_tXSAt56$IU$diw8qGC09QQ.s['17']++;var TABCONTENT_MANAGERPLAYLIST='
'+''+'
';__cov_tXSAt56$IU$diw8qGC09QQ.s['18']++;var TEMPLATE_SHAREDVIDEOS='
- '+''+'{{button_sharevideos}}'+''+'
';__cov_tXSAt56$IU$diw8qGC09QQ.s['19']++;var TABCONTENT_SHAREDVIDEOS='
'+''+'
';__cov_tXSAt56$IU$diw8qGC09QQ.s['20']++;Y.namespace('M.atto_pumukitmedia').Button=Y.Base.create('button',Y.M.editor_atto.EditorPlugin,[],{_receiveMessageBind:null,initializer:function(){__cov_tXSAt56$IU$diw8qGC09QQ.f['2']++;__cov_tXSAt56$IU$diw8qGC09QQ.s['21']++;if((__cov_tXSAt56$IU$diw8qGC09QQ.b['2'][0]++,this.get('disabled'))||(__cov_tXSAt56$IU$diw8qGC09QQ.b['2'][1]++,!this.get('capability'))){__cov_tXSAt56$IU$diw8qGC09QQ.b['1'][0]++;__cov_tXSAt56$IU$diw8qGC09QQ.s['22']++;return;}else{__cov_tXSAt56$IU$diw8qGC09QQ.b['1'][1]++;}__cov_tXSAt56$IU$diw8qGC09QQ.s['23']++;this.addButton({icon:'e/insert_edit_video',buttonName:'pumukitmedia',callback:this._displayDialogue,callbackArgs:'iconone'});__cov_tXSAt56$IU$diw8qGC09QQ.s['24']++;var id='pumukitmedia_iframe_sso';__cov_tXSAt56$IU$diw8qGC09QQ.s['25']++;if(!document.getElementById(id)){__cov_tXSAt56$IU$diw8qGC09QQ.b['3'][0]++;__cov_tXSAt56$IU$diw8qGC09QQ.s['26']++;var iframe=document.createElement('iframe');__cov_tXSAt56$IU$diw8qGC09QQ.s['27']++;iframe.id=id;__cov_tXSAt56$IU$diw8qGC09QQ.s['28']++;iframe.style.display='none';__cov_tXSAt56$IU$diw8qGC09QQ.s['29']++;iframe.src=this.get('pumukitmediaurl')+'/openedx/sso/manager?hash='+this.get('hash')+'&username='+this.get('username')+'&email='+this.get('email')+'&lang=en';__cov_tXSAt56$IU$diw8qGC09QQ.s['30']++;iframe.allow='microphone; camera; display-capture; clipboard-write';__cov_tXSAt56$IU$diw8qGC09QQ.s['31']++;document.getElementsByTagName('body')[0].appendChild(iframe);}else{__cov_tXSAt56$IU$diw8qGC09QQ.b['3'][1]++;}},_getFlavorControlName:function(){__cov_tXSAt56$IU$diw8qGC09QQ.f['3']++;__cov_tXSAt56$IU$diw8qGC09QQ.s['32']++;return this.get('host').get('elementid')+'_'+FLAVORCONTROL;},_displayDialogue:function(e,clickedicon){__cov_tXSAt56$IU$diw8qGC09QQ.f['4']++;__cov_tXSAt56$IU$diw8qGC09QQ.s['33']++;e.preventDefault();__cov_tXSAt56$IU$diw8qGC09QQ.s['34']++;var width=900;__cov_tXSAt56$IU$diw8qGC09QQ.s['35']++;this._receiveMessageBind=this._receiveMessage.bind(this);__cov_tXSAt56$IU$diw8qGC09QQ.s['36']++;window.addEventListener('message',this._receiveMessageBind);__cov_tXSAt56$IU$diw8qGC09QQ.s['37']++;var dialogue=this.getDialogue({headerContent:this.get('dialogtitle'),widht:'70%',focusAfterHide:clickedicon});__cov_tXSAt56$IU$diw8qGC09QQ.s['38']++;if(dialogue.width!==width+'px'){__cov_tXSAt56$IU$diw8qGC09QQ.b['4'][0]++;__cov_tXSAt56$IU$diw8qGC09QQ.s['39']++;dialogue.set('width',width+'px');__cov_tXSAt56$IU$diw8qGC09QQ.s['40']++;dialogue.set('max-width','550px');}else{__cov_tXSAt56$IU$diw8qGC09QQ.b['4'][1]++;}__cov_tXSAt56$IU$diw8qGC09QQ.s['41']++;var buttonform=this._getFormContent(clickedicon);__cov_tXSAt56$IU$diw8qGC09QQ.s['42']++;var bodycontent=Y.Node.create('
');__cov_tXSAt56$IU$diw8qGC09QQ.s['43']++;bodycontent.append(buttonform);__cov_tXSAt56$IU$diw8qGC09QQ.s['44']++;dialogue.set('bodyContent',bodycontent);__cov_tXSAt56$IU$diw8qGC09QQ.s['45']++;dialogue.show();__cov_tXSAt56$IU$diw8qGC09QQ.s['46']++;this.markUpdated();__cov_tXSAt56$IU$diw8qGC09QQ.s['47']++;var clickButton=document.getElementsByClassName('closebutton');__cov_tXSAt56$IU$diw8qGC09QQ.s['48']++;if(clickButton[0]){__cov_tXSAt56$IU$diw8qGC09QQ.b['5'][0]++;__cov_tXSAt56$IU$diw8qGC09QQ.s['49']++;clickButton[0].addEventListener('click',this._closeSharedWindow);}else{__cov_tXSAt56$IU$diw8qGC09QQ.b['5'][1]++;}},_getFormContent:function(clickedicon){__cov_tXSAt56$IU$diw8qGC09QQ.f['5']++;__cov_tXSAt56$IU$diw8qGC09QQ.s['50']++;var TARGET_TEMPLATE=TEMPLATE;__cov_tXSAt56$IU$diw8qGC09QQ.s['51']++;var TARGET_TEMPLATE_CONTENT=TEMPLATE_TABCONTENT;__cov_tXSAt56$IU$diw8qGC09QQ.s['52']++;if(this.get('showpr')!=='0'){__cov_tXSAt56$IU$diw8qGC09QQ.b['6'][0]++;__cov_tXSAt56$IU$diw8qGC09QQ.s['53']++;TARGET_TEMPLATE=TARGET_TEMPLATE+ITEM_PERSONAL_RECORDER;__cov_tXSAt56$IU$diw8qGC09QQ.s['54']++;TARGET_TEMPLATE_CONTENT=TARGET_TEMPLATE_CONTENT+TABCONTENT_PERSONALRECORDER;}else{__cov_tXSAt56$IU$diw8qGC09QQ.b['6'][1]++;}__cov_tXSAt56$IU$diw8qGC09QQ.s['55']++;TARGET_TEMPLATE=TARGET_TEMPLATE+TEMPLATE_MANAGER;__cov_tXSAt56$IU$diw8qGC09QQ.s['56']++;TARGET_TEMPLATE_CONTENT=TARGET_TEMPLATE_CONTENT+TABCONTENT_MANAGERSERIES;__cov_tXSAt56$IU$diw8qGC09QQ.s['57']++;if(this.get('showplaylist')!=='0'){__cov_tXSAt56$IU$diw8qGC09QQ.b['7'][0]++;__cov_tXSAt56$IU$diw8qGC09QQ.s['58']++;TARGET_TEMPLATE=TARGET_TEMPLATE+TEMPLATE_PLAYLIST;__cov_tXSAt56$IU$diw8qGC09QQ.s['59']++;TARGET_TEMPLATE_CONTENT=TARGET_TEMPLATE_CONTENT+TABCONTENT_MANAGERPLAYLIST;}else{__cov_tXSAt56$IU$diw8qGC09QQ.b['7'][1]++;}__cov_tXSAt56$IU$diw8qGC09QQ.s['60']++;if(this.get('showsharedvideos')!=='0'){__cov_tXSAt56$IU$diw8qGC09QQ.b['8'][0]++;__cov_tXSAt56$IU$diw8qGC09QQ.s['61']++;TARGET_TEMPLATE=TARGET_TEMPLATE+TEMPLATE_SHAREDVIDEOS;__cov_tXSAt56$IU$diw8qGC09QQ.s['62']++;TARGET_TEMPLATE_CONTENT=TARGET_TEMPLATE_CONTENT+TABCONTENT_SHAREDVIDEOS;}else{__cov_tXSAt56$IU$diw8qGC09QQ.b['8'][1]++;}__cov_tXSAt56$IU$diw8qGC09QQ.s['63']++;TARGET_TEMPLATE=TARGET_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=''+url+'';__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 3c0e06b..483dc6c 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,13 +334,19 @@ 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;
}
+ // var iframe =
+ // '' +
+ // '' +
+ // 'Video' +
+ // '
';
var iframe = '' + url + '';
this.get('host').insertContentAtFocusPoint(iframe);
this.markUpdated();
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 1e14dbd..a7259f6 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='',a='',f='
- {{button_upload}}
',l='
';u+=f,a+=l;var c='
- {{button_pr}}
',h='
',p='
- {{button_myvideos}}
',d='
',v='
- {{button_playlists}}
',m='
',g='
- {{button_sharevideos}}
',y='
';e.namespace("M.atto_pumukitmedia").Button=e.Base.create("button",e.M.editor_atto.EditorPlugin,[],{_receiveMessageBind:null,initializer:function(){if(this.get("disabled")||!this.get("capability"))return;this.addButton({icon:"e/insert_edit_video",buttonName:"pumukitmedia",callback:this._displayDialogue,callbackArgs:"iconone"});var e="pumukitmedia_iframe_sso";if(!document.getElementById(e)){var t=document.createElement("iframe");t.id=e,t.style.display="none",t.src=this.get("pumukitmediaurl")+"/openedx/sso/manager?hash="+this.get("hash")+"&username="+this.get("username")+"&email="+this.get("email")+"&lang=en",t.allow="microphone; camera; display-capture",document.getElementsByTagName("body")[0].appendChild(t)}},_getFlavorControlName:function(){return this.get("host").get("elementid")+"_"+r},_displayDialogue:function(t,n){t.preventDefault();var r=900;this._receiveMessageBind=this._receiveMessage.bind(this),window.addEventListener("message",this._receiveMessageBind);var i=this.getDialogue({headerContent:this.get("dialogtitle"),widht:"70%",focusAfterHide:n});i.width!==r+"px"&&(i.set("width",r+"px"),i.set("max-width","550px"));var s=this._getFormContent(n),o=e.Node.create("
");o.append(s),i.set("bodyContent",o),i.show(),this.markUpdated();var u=document.getElementsByClassName("closebutton");u[0]&&u[0].addEventListener("click",this._closeSharedWindow)},_getFormContent:function(t){var i=u,o=a;this.get("showpr")!=="0"&&(i+=c,o+=h),i+=p,o+=d,this.get("showplaylist")!=="0"&&(i+=v,o+=m),this.get("showsharedvideos")!=="0"&&(i+=g,o+=y),i+="",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=''+t+'';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='',d='';n+='
- {{button_upload}}
',d+='
',i.namespace("M.atto_pumukitmedia").Button=i.Base.create("button",i.M.editor_atto.EditorPlugin,[],{_receiveMessageBind:null,initializer:function(){var e,t;this.get("disabled")||!this.get("capability")||(this.addButton({icon:"e/insert_edit_video",buttonName:"pumukitmedia",callback:this._displayDialogue,callbackArgs:"iconone"}),e="pumukitmedia_iframe_sso",document.getElementById(e))||((t=document.createElement("iframe")).id=e,t.style.display="none",t.src=this.get("pumukitmediaurl")+"/openedx/sso/manager?hash="+this.get("hash")+"&username="+this.get("username")+"&email="+this.get("email")+"&lang=en",t.allow="microphone; camera; display-capture; clipboard-write",document.getElementsByTagName("body")[0].appendChild(t))},_getFlavorControlName:function(){return this.get("host").get("elementid")+"_"+s},_displayDialogue:function(e,t){var a;e.preventDefault(),this._receiveMessageBind=this._receiveMessage.bind(this),window.addEventListener("message",this._receiveMessageBind),"900px"!==(e=this.getDialogue({headerContent:this.get("dialogtitle"),widht:"70%",focusAfterHide:t})).width&&(e.set("width","900px"),e.set("max-width","550px")),t=this._getFormContent(t),(a=i.Node.create("
")).append(t),e.set("bodyContent",a),e.show(),this.markUpdated(),(t=document.getElementsByClassName("closebutton"))[0]&&t[0].addEventListener("click",this._closeSharedWindow)},_getFormContent:function(e){var t=n,a=d;return"0"!==this.get("showpr")&&(t+='
- {{button_pr}}
',a+='
'),t+='
- {{button_myvideos}}
',a+='
',"0"!==this.get("showplaylist")&&(t+='
- {{button_playlists}}
',a+='
'),"0"!==this.get("showsharedvideos")&&(t+='
- {{button_sharevideos}}
',a+='
'),a=i.Handlebars.compile(t=t+""+(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=''+t+"",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 23d9482..01e8bff 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);
}
},
@@ -339,6 +339,12 @@ Y.namespace('M.atto_pumukitmedia').Button = Y.Base.create('button', Y.M.editor_a
url = e.data.url;
}
+ // var iframe =
+ // '' +
+ // '' +
+ // 'Video' +
+ // '
';
var iframe = '' + url + '';
this.get('host').insertContentAtFocusPoint(iframe);
this.markUpdated();
diff --git a/yui/src/button/js/button.js b/yui/src/button/js/button.js
index f13a141..d1081d7 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' +
// '
';
var iframe = '' + url + '';