├── lang └── en │ └── tepuycomponents_jscsscontrols.php ├── db ├── upgrade.php └── hooks.php ├── version.php ├── classes ├── privacy │ └── provider.php └── local │ └── hooks │ └── output │ └── before_http_headers.php ├── lib.php ├── amd ├── build │ ├── main.min.js │ └── main.min.js.map └── src │ └── main.js └── styles.css /lang/en/tepuycomponents_jscsscontrols.php: -------------------------------------------------------------------------------- 1 | . 16 | 17 | /** 18 | * Strings for component 'tepuycomponents_jscsscontrols', language 'en'. 19 | * 20 | * @package tepuycomponents_jscsscontrols 21 | * @copyright 2021 David Herney - https://bambuco.co 22 | * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later 23 | */ 24 | 25 | $string['pluginname'] = 'JS and CSS controls'; 26 | $string['privacy:metadata'] = 'The JS and CSS controls plugin does not store any personal data.'; 27 | -------------------------------------------------------------------------------- /db/upgrade.php: -------------------------------------------------------------------------------- 1 | . 16 | 17 | /** 18 | * Upgrade code. 19 | * 20 | * @package tepuycomponents_jscsscontrols 21 | * @copyright 2021 David Herney - https://bambuco.co 22 | * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later 23 | */ 24 | 25 | defined('MOODLE_INTERNAL') || die; 26 | 27 | /** 28 | * Upgrade code. 29 | * 30 | * @param int $oldversion the version we are upgrading from 31 | * @return bool always true 32 | */ 33 | function xmldb_tepuycomponents_jscsscontrols_upgrade($oldversion) { 34 | global $DB; 35 | 36 | return true; 37 | } 38 | -------------------------------------------------------------------------------- /db/hooks.php: -------------------------------------------------------------------------------- 1 | . 16 | 17 | /** 18 | * Hook callbacks for JS and CSS controls 19 | * 20 | * @package tepuycomponents_jscsscontrols 21 | * @copyright 2025 David Herney @ BambuCo 22 | * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later 23 | */ 24 | 25 | defined('MOODLE_INTERNAL') || die(); 26 | 27 | $callbacks = [ 28 | 29 | [ 30 | 'hook' => core\hook\output\before_http_headers::class, 31 | 'callback' => 'tepuycomponents_jscsscontrols\local\hooks\output\before_http_headers::callback', 32 | 'priority' => 0, 33 | ], 34 | ]; 35 | -------------------------------------------------------------------------------- /version.php: -------------------------------------------------------------------------------- 1 | . 16 | 17 | /** 18 | * This file contains the version information for the component "JS and CSS controls". 19 | * 20 | * @package tepuycomponents_jscsscontrols 21 | * @copyright 2021 David Herney - https://bambuco.co 22 | * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later 23 | */ 24 | 25 | defined('MOODLE_INTERNAL') || die('Direct access to this script is forbidden.'); 26 | 27 | $plugin->version = 2021092400.04; // The current module version (Date: YYYYMMDDXX). 28 | $plugin->requires = 2020061503; // Requires this Moodle version (3.9). 29 | $plugin->component = 'tepuycomponents_jscsscontrols'; 30 | -------------------------------------------------------------------------------- /classes/privacy/provider.php: -------------------------------------------------------------------------------- 1 | . 16 | 17 | /** 18 | * Privacy Subsystem implementation for tepuycomponents_jscsscontrols. 19 | * 20 | * @package tepuycomponents_jscsscontrols 21 | * @copyright 2021 David Herney - https://bambuco.co 22 | * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later 23 | */ 24 | 25 | namespace tepuycomponents_jscsscontrols\privacy; 26 | 27 | defined('MOODLE_INTERNAL') || die(); 28 | 29 | /** 30 | * Privacy Subsystem for tepuycomponents_jscsscontrols implementing null_provider. 31 | * 32 | * @copyright 2021 David Herney - https://bambuco.co 33 | * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later 34 | */ 35 | class provider implements \core_privacy\local\metadata\null_provider { 36 | 37 | /** 38 | * Get the language string identifier with the component's language 39 | * file to explain why this plugin stores no data. 40 | * 41 | * @return string 42 | */ 43 | public static function get_reason() : string { 44 | return 'privacy:metadata'; 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /lib.php: -------------------------------------------------------------------------------- 1 | . 17 | 18 | /** 19 | * Tepuy component logic. 20 | * 21 | * @package tepuycomponents_jscsscontrols 22 | * @copyright 2021 David Herney - https://bambuco.co 23 | * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later 24 | */ 25 | 26 | defined('MOODLE_INTERNAL') || die(); 27 | 28 | /** 29 | * Tweak to allow JS injection from a local plugin https://docs.moodle.org/dev/Local_plugins. 30 | * 31 | * @throws coding_exception 32 | * @throws dml_exception 33 | */ 34 | function tepuycomponents_jscsscontrols_before_http_headers() { 35 | // This is an implementation of a legacy callback that will only be called in older Moodle versions. 36 | // It will not be called in Moodle versions that contain the hook core\hook\output\before_http_headers, 37 | // instead, the callback tepuycomponents_jscsscontrols\local\hooks\output\before_http_headers::callback will be executed. 38 | 39 | global $COURSE, $PAGE; 40 | 41 | // $PAGE->requires->css('/local/tepuy/components/jscsscontrols/styles.css'); 42 | 43 | $PAGE->requires->js_call_amd('tepuycomponents_jscsscontrols/main', 'init', array($COURSE->id)); 44 | 45 | // // TODO Using mustache template instead. 46 | // $PAGE->requires->strings_for_js([ 47 | // 'js:header', 48 | // 'js:error_parsing', 49 | // 'js:command_placeholder', 50 | // ], 'local_commander'); 51 | } 52 | -------------------------------------------------------------------------------- /classes/local/hooks/output/before_http_headers.php: -------------------------------------------------------------------------------- 1 | . 16 | 17 | namespace tepuycomponents_jscsscontrols\local\hooks\output; 18 | 19 | /** 20 | * Hook callbacks for tepuycomponents_jscsscontrols 21 | * 22 | * @package tepuycomponents_jscsscontrols 23 | * @copyright 2025 David Herney @ BambuCo 24 | * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later 25 | */ 26 | class before_http_headers { 27 | 28 | /** 29 | * Tweak to allow JS injection from a local plugin https://docs.moodle.org/dev/Local_plugins. 30 | * 31 | * @throws coding_exception 32 | * @throws dml_exception 33 | * 34 | * @param \core\hook\output\before_http_headers $hook 35 | */ 36 | public static function callback(\core\hook\output\before_http_headers $hook): void { 37 | global $CFG; 38 | if (during_initial_install() || isset($CFG->upgraderunning) || !get_config('tepuycomponents_jscsscontrols', 'version')) { 39 | // Do nothing during installation or upgrade. 40 | return; 41 | } 42 | 43 | $renderer = $hook->renderer; 44 | 45 | global $COURSE, $PAGE; 46 | 47 | // $PAGE->requires->css('/local/tepuy/components/jscsscontrols/styles.css'); 48 | 49 | $PAGE->requires->js_call_amd('tepuycomponents_jscsscontrols/main', 'init', array($COURSE->id)); 50 | 51 | // // TODO Using mustache template instead. 52 | // $PAGE->requires->strings_for_js([ 53 | // 'js:header', 54 | // 'js:error_parsing', 55 | // 'js:command_placeholder', 56 | // ], 'local_commander'); 57 | } 58 | } 59 | -------------------------------------------------------------------------------- /amd/build/main.min.js: -------------------------------------------------------------------------------- 1 | define("tepuycomponents_jscsscontrols/main",["jquery","core/modal","core/modal_events"],(function($,Modal,ModalEvents){return{init:function(courseid){$(".banner-top").parents(".no-overflow").removeClass("no-overflow");$(".tepuy-menucontroler").on("mouseover touchstart",(function(){var $this=$(this),$parents=$this.parents(".box_resources");if(0!=$parents.length){var $parent=$($parents[0]);$parent.find(".selected").removeClass("selected"),$parent.find("[data-rel]").hide(),$parent.find('[data-rel="'+$this.attr("data-type")+'"]').show(),$this.addClass("selected")}})),$(".tepuy-menucontroler").on("touchend",(function(){var $node=$('[data-rel="'+$(this).attr("data-type")+'"]');$("html, body").animate({scrollTop:$node.offset().top},500)})),$(".attachedimages").length>0&&$("article.forum-post-container .forumpost").each((function(){var $attachedimages=$(this).find(".attachedimages");if($attachedimages.length>0){var $sliderimages=$('
');$sliderimages.insertBefore($attachedimages[0]),$attachedimages.find("img").each((function(){var $this=$(this);$sliderimages.append($this)}))}})),$(".tepuy-sliderimages").each((function(){var $this=$(this);console.log($this),$this.find("br").remove(),$this.find("img").first().addClass("active");var fnnextimage=function(){var $active=$this.find("img.active"),$next=$active.next("img");$active.removeClass("active"),$next.length>0?$next.addClass("active"):$this.find("img").first().addClass("active")};if($this.find("img").length>1){$this.find("img").on("click",fnnextimage);var $controlbefore=$('
<
');$controlbefore.on("click",(function(){var $active=$this.find("img.active"),$next=$active.prev("img");$active.removeClass("active"),$next.length>0?$next.addClass("active"):$this.find("img").last().addClass("active")})),$this.append($controlbefore);var $controlafter=$('
>
');$controlafter.on("click",fnnextimage),$this.append($controlafter)}else 0==$this.find("img").length&&$this.hide()})),$(".completiontag.complete").parents(".completion-parent").addClass("complete"),$(".completiontag.incomplete").parents(".completion-parent").addClass("incomplete"),$("[tepuy-toggle]").on("click",(function(){var $this=$(this),cssclass=$this.attr("tepuy-toggle"),target=$this.attr("tepuy-target");$(target).toggleClass(cssclass)})),$(".tepuy-accordion").each((function(){var $this=$(this);$this.find("> div").addClass("closed"),$this.find("> div > h3").each((function(){var $header=$(this),$parent=$header.parent(),$body=$parent.find("> div");$header.on("click",(function(){var opened=!1;$parent.hasClass("opened")&&(opened=!0),$this.find("> div.opened > div").hide(400),$this.find("> div.opened").removeClass("opened").addClass("closed"),opened?($parent.removeClass("opened").addClass("closed"),$body.hide(400)):($parent.removeClass("closed").addClass("opened"),$body.show(400))}))}))})),$(".tepuy-transition").on("click",(function(event){event.preventDefault();var $this=$(this),$show=$($this.attr("data-show")),$hide=$($this.attr("data-hide")),transition=$this.attr("data-transition"),duration=$this.attr("data-duration")?parseInt($this.attr("data-duration")):400;transition?$hide.hide(duration,transition,(function(){$show.show(duration,transition)})):($hide.hide(),$show.show())})),$(".tepuy-wf").each((function(){var $this=$(this);if(!($this.parents(".editor_atto_wrap").length>0)){$this.wrapInner("
");var style="";$this.attr("data-property-width")&&(style+="width:"+$this.attr("data-property-width")+";"),$this.attr("data-property-height")&&(style+="height:"+$this.attr("data-property-height")+";");var $close=$('
X
');$close.on("click",(function(){$this.hide({effect:"slide",direction:"down"})})),""!=style&&$this.attr("style",style),$this.append($close),$this.hide()}})),$(".tepuy-wf-controller").on("click",(function(){var $this=$(this),w=$this.attr("data-property-width"),h=$this.attr("data-property-height");if(!($this.parents(".editor_atto_wrap").length>0)){var $floatwindow=$($this.attr("data-content"));w&&$floatwindow.css("width",w),h&&$floatwindow.css("height",h),$floatwindow.show({effect:"slide",direction:"down"})}})),$(".tepuy-w").each((function(){var $this=$(this);if(!($this.parents('[data-fieldtype="editor"]')&&$this.parents('[data-fieldtype="editor"]').length>0)){if($this.wrapInner("
"),$this.attr("data-tepuy-showentry")||$this.attr("data-tepuy-showconcept")){var searchparams={};$this.attr("data-tepuy-showentry")?searchparams.eid=$this.attr("data-tepuy-showentry"):$this.attr("data-tepuy-showconcept")&&courseid&&(searchparams.concept=$this.attr("data-tepuy-showconcept"),searchparams.courseid=courseid),searchparams.inpopup=!0;var searchparamsstring=$.param(searchparams),url=M.cfg.wwwroot+"/mod/glossary/showentry.php?"+searchparamsstring;($iframe=$('')).attr("src",url),$iframe.on("load",(function(){$iframe.contents().find("a:not([target])").attr("target","_top")})),$this.find(".tepuy-body").append($iframe),$this.attr("title",$this.find("a.autolink").html())}else if($this.attr("data-tepuy-innerentry")){if($this.find("a.glossary.autolink").length>0){url=$this.find("a.glossary.autolink").attr("href")+"&inpopup=true";($iframe=$('')).attr("src",url),$iframe.on("load",(function(){$iframe.contents().find("a:not([target])").attr("target","_top")})),$this.find(".tepuy-body").append($iframe),$this.attr("title",$this.find("a.glossary.autolink").attr("title"))}}else if($this.attr("data-tepuy-innerautolink")&&$this.find("a.autolink").length>0){var $iframe;url=$this.find("a.autolink").attr("href")+"&inpopup=true";$this.find("a.autolink").hide(),($iframe=$('')).attr("src",url),$iframe.on("load",(function(){$iframe.contents().find("a:not([target])").attr("target","_top")})),$this.find(".tepuy-body").append($iframe),$this.attr("title",$this.find("a.autolink").html())}$this.hide()}})),$(".tepuy-w-controller").on("click",(function(e){e.preventDefault();var $this=$(this);if(!($this.parents('[data-fieldtype="editor"]')&&$this.parents('[data-fieldtype="editor"]').length>0)){var dialogue=$this.data("dialogue");if(dialogue)dialogue.show();else{var w=$this.attr("data-property-width"),h=$this.attr("data-property-height"),$floatwindow=$($this.attr("data-content")+" .tepuy-body"),properties={};if(w){if(w.indexOf("%")>=0){var window_w=$(window).width(),tmp_w=Number(w.replace("%",""));!isNaN(tmp_w)&&tmp_w>0&&(w=tmp_w*window_w/100)}isNaN(w)||(w+="px"),properties.width=w}if(h){if(h.indexOf("%")>=0){var window_h=$(window).height(),tmp_h=Number(h.replace("%",""));!isNaN(tmp_h)&&tmp_h>0&&(h=tmp_h*window_h/100)}isNaN(h)||(h+="px"),properties.height=h}Modal.create({body:$floatwindow,title:$this.attr("title")||$this.text()}).then((function(modal){modal.getRoot().on(ModalEvents.hidden,(function(){$floatwindow.contents().find("video, audio").each((function(){this.pause()}))}));var $style="";return properties.width&&($style+="width: "+properties.width+"; "),properties.height&&($style+="height: "+properties.height+"; "),modal.getRoot().find("> .modal-dialog").attr("style",$style).addClass("tepuy-modal-dialog"),modal.show(),$this.data("dialogue",modal),modal}))}}})),$(".tepuy-openinmodal").each((function(){var $this=$(this);$this.parents('[data-fieldtype="editor"]')&&$this.parents('[data-fieldtype="editor"]').length>0||($this.find("a").each((function(){this.removeAttribute("onclick")})),$this.find("a").on("click",(function(event){event.preventDefault();var $link=$(this),dialogue=$link.data("dialogue");if(dialogue)dialogue.show();else{var w=$this.attr("data-property-width"),h=$this.attr("data-property-height"),url=$link.attr("href")+"&inpopup=true",$iframe=$('');$iframe.attr("src",url),$iframe.on("load",(function(){$iframe.contents().find("a:not([target])").attr("target","_top")}));var el=$.fn.hide;$.fn.hide=function(){return this.trigger("hide"),el.apply(this,arguments)},$("
").append($iframe);var properties={width:"95vw",height:"95vh"};if(w){if(w.indexOf("%")>=0){var window_w=$(window).width(),tmp_w=Number(w.replace("%",""));!isNaN(tmp_w)&&tmp_w>0&&(w=tmp_w*window_w/100)}isNaN(w)||(w+="px"),properties.width=w}if(h){if(h.indexOf("%")>=0){var window_h=$(window).height(),tmp_h=Number(h.replace("%",""));!isNaN(tmp_h)&&tmp_h>0&&(h=tmp_h*window_h/100)}isNaN(h)||(h+="px"),properties.height=h}Modal.create({body:$iframe,title:$link.attr("title")||$link.text()}).then((function(modal){return modal.getRoot().on(ModalEvents.hidden,(function(){$iframe.contents().find("video, audio").each((function(){this.pause()}))})),modal.getRoot().find("> .modal-dialog").attr("style","width: "+properties.width+"; height: "+properties.height+";").addClass("tepuy-modal-dialog"),modal.show(),$link.data("dialogue",modal),modal}))}})))})),$(".tepuy-mouse-over").on("mouseover",(function(){var $this=$(this);$($this.data("ref")).show(200,"swing")})),$(".tepuy-mouse-over").on("mouseout",(function(){var $this=$(this);$($this.data("ref")).hide(200,"swing")})),$("img[tepuy-over]").on("mouseover",(function(){var $this=$(this);$this.attr("original-src",$this.attr("src")),$this.attr("src",$this.attr("tepuy-over"))})),$("img[tepuy-over]").on("mouseout",(function(){var $this=$(this);$this.attr("src",$this.attr("original-src"))}))}}})); 2 | 3 | //# sourceMappingURL=main.min.js.map -------------------------------------------------------------------------------- /styles.css: -------------------------------------------------------------------------------- 1 | /********************************************************************************/ 2 | /* Float window 3 | /********************************************************************************/ 4 | .tepuy-wf { 5 | position: absolute; 6 | padding: 10px 35px 10px 10px; 7 | background-color: #eaeaea; 8 | border-radius: 10px; 9 | box-shadow: 0 0 10px #bbb; 10 | z-index: 2; 11 | } 12 | 13 | .tepuy-wf.tepuy-autox { 14 | left: 10px; 15 | right: 10px; 16 | overflow: auto; 17 | } 18 | 19 | .tepuy-wf.tepuy-autoy { 20 | top: 10px; 21 | bottom: 10px; 22 | overflow: auto; 23 | } 24 | 25 | .moodle-dialogue-bd .tepuy-body { 26 | overflow: auto; 27 | } 28 | 29 | .tepuy-wf .tepuy-body { 30 | left: unset; 31 | right: unset; 32 | top: unset; 33 | bottom: unset; 34 | position: relative; 35 | } 36 | 37 | .tepuy-wf.tepuy-autox .tepuy-body, 38 | .tepuy-wf.tepuy-autoy .tepuy-body { 39 | overflow: auto; 40 | top: 20px; 41 | left: 10px; 42 | right: 10px; 43 | bottom: 10px; 44 | position: absolute; 45 | } 46 | 47 | .tepuy-wf .tepuy-close { 48 | position: absolute; 49 | background-color: #5a9faf; 50 | border-radius: 5px; 51 | border: 2px solid #666; 52 | line-height: 24px; 53 | font-size: 16px; 54 | text-align: center; 55 | font-weight: bold; 56 | width: 25px; 57 | height: 25px; 58 | top: 0; 59 | right: 0; 60 | color: #fff; 61 | cursor: pointer; 62 | } 63 | 64 | .tepuy-wf .tepuy-close:hover { 65 | background-color: #fbdb9b; 66 | color: #666; 67 | } 68 | 69 | .tepuy-wf-box { 70 | position: relative; 71 | display: flex; 72 | flex-wrap: wrap; 73 | justify-content: center; 74 | } 75 | 76 | .moodle-dialogue-bd .tepuy-body .row { 77 | margin-left: 0; 78 | margin-right: 0; 79 | } 80 | 81 | /********************************************************************************/ 82 | /* Modal window 83 | /********************************************************************************/ 84 | .tepuy-body-w { 85 | padding: 20px; 86 | margin-top: 20px; 87 | } 88 | 89 | /********************************************************************************/ 90 | /* Moodle pages in float window 91 | /********************************************************************************/ 92 | .tepuy-body { 93 | position: absolute; 94 | left: 3px; 95 | right: 3px; 96 | bottom: 3px; 97 | top: 3px; 98 | } 99 | 100 | .tepuy-body iframe { 101 | position: absolute; 102 | top: 0; 103 | bottom: 0; 104 | left: 0; 105 | right: 0; 106 | width: 100%; 107 | height: 100%; 108 | border: none; 109 | } 110 | 111 | .tepuy-openinmodal-container { 112 | width: 100%; 113 | height: calc(100% - 10px); 114 | border: none; 115 | } 116 | 117 | .pagelayout-popup #page { 118 | margin: 0; 119 | } 120 | 121 | .modal.show .modal-dialog.tepuy-modal-dialog { 122 | max-width: unset; 123 | } 124 | 125 | .modal.show .modal-dialog.tepuy-modal-dialog .modal-body { 126 | padding: 0; 127 | } 128 | 129 | /********************************************************************************/ 130 | /* Tepuy transitions / visual effects. 131 | /********************************************************************************/ 132 | .tepuy-tr-blur, 133 | .tepuy-tr-borroso { 134 | transition: .3s ease-in-out; 135 | } 136 | 137 | .tepuy-tr-blur:hover, 138 | .tepuy-tr-borroso:hover { 139 | filter: blur(1px); 140 | transition: .3s ease-in-out; 141 | } 142 | 143 | .tepuy-tr-transparent, 144 | .tepuy-tr-transparente { 145 | transition: .3s ease-in-out; 146 | } 147 | 148 | .tepuy-tr-transparent:hover, 149 | .tepuy-tr-transparente:hover { 150 | transition: .3s ease-in-out; 151 | opacity: .5; 152 | } 153 | 154 | .tepuy-tr-gray, 155 | .tepuy-tr-gris { 156 | transition: .3s ease-in-out; 157 | filter: grayscale(0); 158 | } 159 | 160 | .tepuy-tr-gray:hover, 161 | .tepuy-tr-gris:hover { 162 | transition: .3s ease-in-out; 163 | filter: grayscale(1); 164 | } 165 | 166 | .tepuy-tr-sepia { 167 | transition: .3s ease-in-out; 168 | filter: sepia(0); 169 | } 170 | 171 | .tepuy-tr-sepia:hover { 172 | transition: .3s ease-in-out; 173 | filter: sepia(1); 174 | } 175 | 176 | .tepuy-tr-shadow, 177 | .tepuy-tr-sombra { 178 | transition: .3s ease-in-out; 179 | box-shadow: none; 180 | } 181 | 182 | .tepuy-tr-shadow:hover, 183 | .tepuy-tr-sombra:hover { 184 | transition: .3s ease-in-out; 185 | box-shadow: 0 0 10px #888; 186 | } 187 | 188 | .tepuy-tr-zoomin, 189 | .tepuy-tr-mas { 190 | transition: .3s ease-in-out; 191 | } 192 | 193 | .tepuy-tr-zoomin:hover, 194 | .tepuy-tr-mas:hover { 195 | transform: scale(1.05); 196 | transition: .3s ease-in-out; 197 | } 198 | 199 | .tepuy-tr-zoomout, 200 | .tepuy-tr-menos { 201 | transition: .3s ease-in-out; 202 | } 203 | 204 | .tepuy-tr-zoomout:hover, 205 | .tepuy-tr-menos:hover { 206 | transform: scale(0.95); 207 | transition: .3s ease-in-out; 208 | } 209 | 210 | /********************************************************************************/ 211 | /* Tepuy special course styles. 212 | /********************************************************************************/ 213 | .tepuy-c-resources-list > .inplaceeditable.inplaceeditable-text, 214 | .tepuy-c-resources-list > a, 215 | .tepuy-c-resources-list .completiontag { 216 | display: block; 217 | position: relative; 218 | } 219 | 220 | .tepuy-c-resources-list > .inplaceeditable.inplaceeditable-text, 221 | .tepuy-c-resources-list > a { 222 | padding-left: 25px; 223 | } 224 | 225 | .tepuy-c-resources-list .completiontag .btn.btn-link { 226 | padding: 0; 227 | } 228 | 229 | .tepuy-c-resources-list .autocompletion, 230 | .tepuy-c-resources-list .togglecompletion { 231 | display: inline-block; 232 | } 233 | 234 | .tepuy-c-resourcebutton { 235 | width: 207px; 236 | background: linear-gradient(to bottom, #fff 0%, #868686 50%, #868686 100%); 237 | border-radius: 10px; 238 | color: #fff; 239 | margin: 10px 0; 240 | text-align: center; 241 | text-transform: uppercase; 242 | font-weight: bold; 243 | position: relative; 244 | font-size: 15px; 245 | } 246 | 247 | .tepuy-c-resourcebutton a, 248 | .tepuy-c-resourcebutton a:hover, 249 | .tepuy-c-resourcebutton a:focus { 250 | color: #fff; 251 | text-decoration: none; 252 | } 253 | 254 | .tepuy-c-resourcebutton .tepuy-c-rb-name { 255 | position: relative; 256 | -webkit-transition-duration: 0.3s; 257 | transition-duration: 0.3s; 258 | -webkit-transition-timing-function: ease-out; 259 | transition-timing-function: ease-out; 260 | } 261 | 262 | .tepuy-c-resourcebutton .tepuy-c-rb-name:hover, 263 | .tepuy-c-resourcebutton .tepuy-c-rb-name:focus, 264 | .tepuy-c-resourcebutton .tepuy-c-rb-name:active { 265 | -webkit-transform: translateY(8px); 266 | transform: translateY(8px); 267 | } 268 | 269 | .tepuy-c-resourcebutton .tepuy-c-rb-name a:before { 270 | font-family: 'FontAwesome'; 271 | position: absolute; 272 | color: #fff; 273 | left: 5px; 274 | top: calc(50% - 10px); 275 | font-size: 45px; 276 | line-height: 20px; 277 | } 278 | 279 | .tepuy-c-resourcebutton.tepuy-c-rb-forum .tepuy-c-rb-name a:before { 280 | content: ""; 281 | } 282 | 283 | .tepuy-c-resourcebutton.tepuy-c-rb-assign .tepuy-c-rb-name a:before { 284 | content: ""; 285 | } 286 | 287 | .tepuy-c-resourcebutton.tepuy-c-rb-content .tepuy-c-rb-name a:before { 288 | content: ""; 289 | } 290 | 291 | .tepuy-c-resourcebutton.tepuy-c-rb-db .tepuy-c-rb-name a:before { 292 | content: ""; 293 | } 294 | 295 | .tepuy-c-resourcebutton.tepuy-c-rb-work .tepuy-c-rb-name a:before { 296 | content: ""; 297 | } 298 | 299 | .tepuy-c-resourcebutton.tepuy-c-rb-survey .tepuy-c-rb-name a:before { 300 | content: ""; 301 | } 302 | 303 | .tepuy-c-resourcebutton.tepuy-c-rb-glossary .tepuy-c-rb-name a:before { 304 | content: ""; 305 | } 306 | 307 | .tepuy-c-resourcebutton.tepuy-c-rb-chat .tepuy-c-rb-name a:before { 308 | content: ""; 309 | } 310 | 311 | .tepuy-c-resourcebutton.tepuy-c-rb-wiki .tepuy-c-rb-name a:before { 312 | content: "✍"; 313 | } 314 | 315 | .tepuy-c-resourcebutton.tepuy-c-rb-grade .tepuy-c-rb-name a:before { 316 | content: "✔"; 317 | } 318 | 319 | .tepuy-c-resourcebutton.tepuy-c-rb-scorm .tepuy-c-rb-name a:before { 320 | content: ""; 321 | } 322 | 323 | .tepuy-c-resourcebutton .tepuy-c-rb-name a { 324 | padding: 5px 5px 5px 60px; 325 | background-color: #444; 326 | border-radius: 10px; 327 | text-align: left; 328 | font-size: 13px; 329 | min-height: 60px; 330 | display: flex; 331 | align-items: center; 332 | position: relative; 333 | } 334 | 335 | .tepuy-c-resourcebutton.active .tepuy-c-rb-name a, 336 | .tepuy-c-resourcebutton.complete .tepuy-c-rb-name a, 337 | .tepuy-c-resourcebutton .tepuy-c-rb-name a:hover { 338 | background-color: #001a7b; 339 | } 340 | 341 | .tepuy-c-resourcebutton img.activityicon, 342 | .tepuy-c-resourcebutton .autocompletion, 343 | .tepuy-c-resourcebutton .togglecompletion { 344 | display: none; 345 | } 346 | 347 | .tepuy-c-resourcebutton .tepuy-c-rb-type { 348 | padding: 5px; 349 | } 350 | 351 | .tepuy-c-resourcebutton.complete:after { 352 | content: ""; 353 | font-family: 'FontAwesome'; 354 | font-size: 50px; 355 | color: #64aa23; 356 | position: absolute; 357 | width: 50px; 358 | height: 50px; 359 | right: -50px; 360 | top: calc(50% - 25px); 361 | } 362 | 363 | .tepuy-c-resourcebutton.active, 364 | .tepuy-c-resourcebutton.complete { 365 | background: linear-gradient(to bottom, #fff 0%, #64aa23 50%, #64aa23 100%); 366 | } 367 | 368 | .tepuy-c-resourcebutton .iconwithhelp { 369 | position: absolute; 370 | right: 0; 371 | bottom: calc(50% - 10px); 372 | z-index: 2; 373 | } 374 | 375 | .tepuy-c-resourcebutton .activityinsummarytpl .activity-basis { 376 | display: block; 377 | } 378 | 379 | /********************************************************************************/ 380 | /* Tepuy images slider. 381 | /********************************************************************************/ 382 | .tepuy-sliderimages { 383 | width: 100%; 384 | max-height: 500px; 385 | text-align: center; 386 | position: relative; 387 | margin-bottom: 20px; 388 | } 389 | 390 | .tepuy-sliderimages img { 391 | display: none; 392 | max-width: 100%; 393 | max-height: 490px; 394 | cursor: pointer; 395 | } 396 | 397 | .tepuy-sliderimages img.active { 398 | display: unset; 399 | } 400 | 401 | .tepuy-sliderimages .slide-control { 402 | position: absolute; 403 | left: 0; 404 | top: 50%; 405 | font-size: 50px; 406 | font-weight: bold; 407 | cursor: pointer; 408 | color: #f89708; 409 | opacity: 0.3; 410 | } 411 | 412 | .tepuy-sliderimages .slide-control[data-action="after"] { 413 | left: unset; 414 | right: 0; 415 | } 416 | 417 | .tepuy-sliderimages .slide-control:hover { 418 | color: #364568; 419 | } 420 | 421 | .tepuy-sliderimages:hover .slide-control { 422 | opacity: 1; 423 | } 424 | 425 | .forumpost .posting.fullpost .attachedimages img { 426 | margin: 0; 427 | border: 0; 428 | padding: 0; 429 | } 430 | 431 | /********************************************************************************/ 432 | /* Tepuy toggle CSS class. 433 | /********************************************************************************/ 434 | [tepuy-toggle] { 435 | cursor: pointer; 436 | } 437 | 438 | /********************************************************************************/ 439 | /* Tepuy acordion 440 | *********************************************************************************/ 441 | .tepuy-accordion > div.closed { 442 | margin-bottom: 10px; 443 | } 444 | 445 | .tepuy-accordion > div > h3 { 446 | background-color: #73caef; 447 | color: #001a7b; 448 | border: 2px solid #ccc; 449 | padding: 10px 10px 10px 50px; 450 | position: relative; 451 | font-size: 14px; 452 | font-weight: bold; 453 | margin: 0; 454 | border-radius: 3px; 455 | cursor: pointer; 456 | } 457 | 458 | .tepuy-accordion > div > h3:hover { 459 | opacity: 0.9; 460 | } 461 | 462 | .tepuy-accordion > div > h3:before { 463 | content: "+"; 464 | position: absolute; 465 | left: 10px; 466 | color: #001a7b; 467 | } 468 | 469 | .tepuy-accordion > div.opened > h3:before { 470 | content: "-"; 471 | } 472 | 473 | .tepuy-accordion > div > div { 474 | border: 1px solid #ccc; 475 | background-color: #eee; 476 | border-radius: 3px; 477 | padding: 10px 20px; 478 | display: none; 479 | margin-bottom: 3px; 480 | } 481 | 482 | /********************************************************************************/ 483 | /* Tepuy show and hide in over 484 | *********************************************************************************/ 485 | .tepuy-mouse-over { 486 | cursor: default; 487 | } 488 | -------------------------------------------------------------------------------- /amd/src/main.js: -------------------------------------------------------------------------------- 1 | // This file is part of Moodle - http://moodle.org/ 2 | // 3 | // Moodle is free software: you can redistribute it and/or modify 4 | // it under the terms of the GNU General Public License as published by 5 | // the Free Software Foundation, either version 3 of the License, or 6 | // (at your option) any later version. 7 | // 8 | // Moodle is distributed in the hope that it will be useful, 9 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 | // GNU General Public License for more details. 12 | // 13 | // You should have received a copy of the GNU General Public License 14 | // along with Moodle. If not, see . 15 | 16 | define(['jquery', 'core/modal', 'core/modal_events'], function($, Modal, ModalEvents) { 17 | 'use strict'; 18 | 19 | return { 20 | init: function(courseid) { 21 | 22 | $('.banner-top').parents('.no-overflow').removeClass('no-overflow'); 23 | 24 | var fn_effect = function () { 25 | var $this = $(this); 26 | var $parents = $this.parents('.box_resources'); 27 | 28 | if ($parents.length == 0) { 29 | return; 30 | } 31 | 32 | var $parent = $($parents[0]); 33 | 34 | $parent.find('.selected').removeClass('selected'); 35 | $parent.find('[data-rel]').hide(); 36 | $parent.find('[data-rel="' + $this.attr('data-type') + '"]').show(); 37 | $this.addClass('selected'); 38 | 39 | }; 40 | 41 | $('.tepuy-menucontroler').on('mouseover touchstart', fn_effect); 42 | 43 | $('.tepuy-menucontroler').on('touchend', function() { 44 | var $node = $('[data-rel="' + $(this).attr('data-type') + '"]'); 45 | $("html, body").animate({ scrollTop: $node.offset().top }, 500); 46 | }); 47 | 48 | if ($('.attachedimages').length > 0) { 49 | 50 | $('article.forum-post-container .forumpost').each(function() { 51 | var $this = $(this); 52 | var $attachedimages = $this.find('.attachedimages'); 53 | 54 | if ($attachedimages.length > 0) { 55 | 56 | var $sliderimages = $('
'); 57 | $sliderimages.insertBefore($attachedimages[0]); 58 | 59 | $attachedimages.find('img').each(function() { 60 | var $this = $(this); 61 | $sliderimages.append($this); 62 | }); 63 | } 64 | }); 65 | } 66 | 67 | $('.tepuy-sliderimages').each(function() { 68 | var $this = $(this); 69 | console.log($this); 70 | $this.find('br').remove(); 71 | $this.find('img').first().addClass('active'); 72 | 73 | var fnnextimage = function () { 74 | var $active = $this.find('img.active'); 75 | var $next = $active.next('img'); 76 | 77 | $active.removeClass('active'); 78 | 79 | if ($next.length > 0) { 80 | $next.addClass('active'); 81 | } else { 82 | $this.find('img').first().addClass('active'); 83 | } 84 | }; 85 | 86 | var fnprevimage = function () { 87 | var $active = $this.find('img.active'); 88 | var $next = $active.prev('img'); 89 | 90 | $active.removeClass('active'); 91 | 92 | if ($next.length > 0) { 93 | $next.addClass('active'); 94 | } else { 95 | $this.find('img').last().addClass('active'); 96 | } 97 | }; 98 | 99 | if ($this.find('img').length > 1) { 100 | $this.find('img').on('click', fnnextimage); 101 | 102 | var $controlbefore = $('
<
'); 103 | $controlbefore.on('click', fnprevimage); 104 | $this.append($controlbefore); 105 | 106 | var $controlafter = $('
>
'); 107 | $controlafter.on('click', fnnextimage); 108 | $this.append($controlafter); 109 | 110 | } else if ($this.find('img').length == 0) { 111 | $this.hide(); 112 | } 113 | }); 114 | 115 | $('.completiontag.complete').parents('.completion-parent').addClass('complete'); 116 | 117 | $('.completiontag.incomplete').parents('.completion-parent').addClass('incomplete'); 118 | 119 | $('[tepuy-toggle]').on('click', function() { 120 | var $this = $(this); 121 | var cssclass = $this.attr('tepuy-toggle'); 122 | var target = $this.attr('tepuy-target'); 123 | 124 | $(target).toggleClass(cssclass); 125 | }); 126 | 127 | 128 | $('.tepuy-accordion').each(function() { 129 | var $this = $(this); 130 | 131 | $this.find('> div').addClass('closed'); 132 | 133 | $this.find('> div > h3').each(function() { 134 | var $header = $(this); 135 | var $parent = $header.parent(); 136 | var $body = $parent.find('> div'); 137 | 138 | $header.on('click', function() { 139 | 140 | var opened = false; 141 | if ($parent.hasClass('opened')) { 142 | opened = true; 143 | } 144 | 145 | $this.find('> div.opened > div').hide(400); 146 | $this.find('> div.opened').removeClass('opened').addClass('closed'); 147 | 148 | if (opened) { 149 | $parent.removeClass('opened').addClass('closed'); 150 | $body.hide(400); 151 | } else { 152 | $parent.removeClass('closed').addClass('opened'); 153 | $body.show(400); 154 | } 155 | }); 156 | 157 | }); 158 | 159 | }); 160 | 161 | 162 | $('.tepuy-transition').on('click', function(event) { 163 | event.preventDefault(); 164 | 165 | var $this = $(this); 166 | var $show = $($this.attr('data-show')); 167 | var $hide = $($this.attr('data-hide')); 168 | var transition = $this.attr('data-transition'); 169 | var duration = $this.attr('data-duration') ? parseInt($this.attr('data-duration')) : 400; 170 | 171 | // Available transitions: swing and linear 172 | if (transition) { 173 | $hide.hide(duration, transition, function() { 174 | $show.show(duration, transition); 175 | }); 176 | } else { 177 | $hide.hide(); 178 | $show.show(); 179 | } 180 | }); 181 | 182 | // ============================================================================================== 183 | // Float Window 184 | // ============================================================================================== 185 | $('.tepuy-wf').each(function() { 186 | var $this = $(this); 187 | 188 | if ($this.parents('.editor_atto_wrap').length > 0) { 189 | return; 190 | } 191 | 192 | $this.wrapInner("
"); 193 | 194 | var style = ''; 195 | if ($this.attr('data-property-width')) { 196 | style += 'width:' + $this.attr('data-property-width') + ';'; 197 | } 198 | 199 | if ($this.attr('data-property-height')) { 200 | style += 'height:' + $this.attr('data-property-height') + ';'; 201 | } 202 | 203 | var $close = $('
X
'); 204 | $close.on('click', function() { 205 | $this.hide({ effect: 'slide', direction: 'down' }); 206 | }); 207 | 208 | if (style != '') { 209 | $this.attr('style', style); 210 | } 211 | 212 | $this.append($close); 213 | $this.hide(); 214 | }); 215 | 216 | $('.tepuy-wf-controller').on('click', function(){ 217 | var $this = $(this); 218 | var w = $this.attr('data-property-width'); 219 | var h = $this.attr('data-property-height'); 220 | 221 | if ($this.parents('.editor_atto_wrap').length > 0) { 222 | return; 223 | } 224 | 225 | var $floatwindow = $($this.attr('data-content')); 226 | 227 | if (w) { 228 | $floatwindow.css('width', w); 229 | } 230 | 231 | if (h) { 232 | $floatwindow.css('height', h); 233 | } 234 | 235 | $floatwindow.show({ effect: 'slide', direction: 'down' }); 236 | }); 237 | 238 | // ============================================================================================== 239 | // Modal Window 240 | // ============================================================================================== 241 | $('.tepuy-w').each(function() { 242 | var $this = $(this); 243 | 244 | if ($this.parents('[data-fieldtype="editor"]') && $this.parents('[data-fieldtype="editor"]').length > 0) { 245 | return; 246 | } 247 | 248 | $this.wrapInner("
"); 249 | 250 | if ($this.attr('data-tepuy-showentry') || $this.attr('data-tepuy-showconcept')) { 251 | 252 | var searchparams = {}; 253 | 254 | if ($this.attr('data-tepuy-showentry')) { 255 | searchparams.eid = $this.attr('data-tepuy-showentry'); 256 | } else if ($this.attr('data-tepuy-showconcept') && courseid) { 257 | searchparams.concept = $this.attr('data-tepuy-showconcept'); 258 | searchparams.courseid = courseid; 259 | } 260 | 261 | searchparams.inpopup = true; 262 | 263 | var searchparamsstring = $.param(searchparams); 264 | 265 | var url = M.cfg.wwwroot + '/mod/glossary/showentry.php?' + searchparamsstring; 266 | var $iframe = $(''); 267 | $iframe.attr('src', url); 268 | $iframe.on('load', function() { 269 | $iframe.contents().find('a:not([target])').attr('target', '_top'); 270 | }); 271 | 272 | $this.find('.tepuy-body').append($iframe); 273 | $this.attr('title', $this.find('a.autolink').html()); 274 | 275 | } else if ($this.attr('data-tepuy-innerentry')) { 276 | 277 | if ($this.find('a.glossary.autolink').length > 0) { 278 | var url = $this.find('a.glossary.autolink').attr('href') + '&inpopup=true'; 279 | var $iframe = $(''); 280 | $iframe.attr('src', url); 281 | $iframe.on('load', function() { 282 | $iframe.contents().find('a:not([target])').attr('target', '_top'); 283 | }); 284 | 285 | $this.find('.tepuy-body').append($iframe); 286 | 287 | $this.attr('title', $this.find('a.glossary.autolink').attr('title')); 288 | } 289 | } else if ($this.attr('data-tepuy-innerautolink')) { 290 | 291 | if ($this.find('a.autolink').length > 0) { 292 | var url = $this.find('a.autolink').attr('href') + '&inpopup=true'; 293 | $this.find('a.autolink').hide(); 294 | 295 | var $iframe = $(''); 296 | $iframe.attr('src', url); 297 | $iframe.on('load', function() { 298 | $iframe.contents().find('a:not([target])').attr('target', '_top'); 299 | }); 300 | 301 | $this.find('.tepuy-body').append($iframe); 302 | $this.attr('title', $this.find('a.autolink').html()); 303 | } 304 | } 305 | 306 | $this.hide(); 307 | }); 308 | 309 | $('.tepuy-w-controller').on('click', function(e){ 310 | e.preventDefault(); 311 | 312 | var $this = $(this); 313 | 314 | if ($this.parents('[data-fieldtype="editor"]') && $this.parents('[data-fieldtype="editor"]').length > 0) { 315 | return; 316 | } 317 | 318 | var dialogue = $this.data('dialogue'); 319 | 320 | if (!dialogue) { 321 | 322 | var w = $this.attr('data-property-width'); 323 | var h = $this.attr('data-property-height'); 324 | 325 | var $floatwindow = $($this.attr('data-content') + ' .tepuy-body'); 326 | 327 | var properties = {}; 328 | 329 | if (w) { 330 | if (w.indexOf('%') >= 0) { 331 | var window_w = $(window).width(); 332 | var tmp_w = Number(w.replace('%', '')); 333 | if (!isNaN(tmp_w) && tmp_w > 0) { 334 | w = tmp_w * window_w / 100; 335 | } 336 | } 337 | 338 | if (!isNaN(w)) { 339 | w += 'px'; 340 | } 341 | 342 | properties.width = w; 343 | } 344 | 345 | if (h) { 346 | if (h.indexOf('%') >= 0) { 347 | var window_h = $(window).height(); 348 | var tmp_h = Number(h.replace('%', '')); 349 | if (!isNaN(tmp_h) && tmp_h > 0) { 350 | h = tmp_h * window_h / 100; 351 | } 352 | } 353 | 354 | if (!isNaN(h)) { 355 | h += 'px'; 356 | } 357 | 358 | properties.height = h; 359 | } 360 | 361 | Modal.create({ 362 | body: $floatwindow, 363 | title: $this.attr('title') || $this.text(), 364 | }) 365 | .then(function(modal) { 366 | 367 | // When the dialog is closed, pause video and audio. 368 | modal.getRoot().on(ModalEvents.hidden, function() { 369 | $floatwindow.contents().find('video, audio').each(function(){ 370 | this.pause(); 371 | }); 372 | }); 373 | 374 | var $style = ''; 375 | if (properties.width) { 376 | $style += 'width: ' + properties.width + '; '; 377 | } 378 | if (properties.height) { 379 | $style += 'height: ' + properties.height + '; '; 380 | } 381 | modal.getRoot().find('> .modal-dialog').attr('style', $style).addClass('tepuy-modal-dialog'); 382 | modal.show(); 383 | $this.data('dialogue', modal); 384 | 385 | return modal; 386 | }); 387 | 388 | } else { 389 | dialogue.show(); 390 | } 391 | }); 392 | 393 | // ============================================================================================== 394 | // Open resources into modal 395 | // ============================================================================================== 396 | $('.tepuy-openinmodal').each(function() { 397 | var $this = $(this); 398 | 399 | if ($this.parents('[data-fieldtype="editor"]') && $this.parents('[data-fieldtype="editor"]').length > 0) { 400 | return; 401 | } 402 | 403 | $this.find('a').each( function() { 404 | this.removeAttribute('onclick'); 405 | }); 406 | 407 | $this.find('a').on('click', function(event) { 408 | event.preventDefault(); 409 | 410 | var $link = $(this); 411 | 412 | var dialogue = $link.data('dialogue'); 413 | 414 | if (!dialogue) { 415 | 416 | var w = $this.attr('data-property-width'); 417 | var h = $this.attr('data-property-height'); 418 | 419 | var url = $link.attr('href') + '&inpopup=true'; 420 | var $iframe = $(''); 421 | $iframe.attr('src', url); 422 | $iframe.on('load', function() { 423 | $iframe.contents().find('a:not([target])').attr('target', '_top'); 424 | }); 425 | 426 | var el = $.fn['hide']; 427 | $.fn['hide'] = function () { 428 | this.trigger('hide'); 429 | return el.apply(this, arguments); 430 | }; 431 | 432 | var $floatwindow = $('
'); 433 | 434 | $floatwindow.append($iframe); 435 | 436 | var properties = { 437 | width: '95vw', 438 | height: '95vh', 439 | }; 440 | 441 | if (w) { 442 | if (w.indexOf('%') >= 0) { 443 | var window_w = $(window).width(); 444 | var tmp_w = Number(w.replace('%', '')); 445 | if (!isNaN(tmp_w) && tmp_w > 0) { 446 | w = tmp_w * window_w / 100; 447 | } 448 | } 449 | 450 | if (!isNaN(w)) { 451 | w += 'px'; 452 | } 453 | 454 | properties.width = w; 455 | } 456 | 457 | if (h) { 458 | if (h.indexOf('%') >= 0) { 459 | var window_h = $(window).height(); 460 | var tmp_h = Number(h.replace('%', '')); 461 | if (!isNaN(tmp_h) && tmp_h > 0) { 462 | h = tmp_h * window_h / 100; 463 | } 464 | } 465 | 466 | if (!isNaN(h)) { 467 | h += 'px'; 468 | } 469 | 470 | properties.height = h; 471 | } 472 | 473 | Modal.create({ 474 | body: $iframe, 475 | title: $link.attr('title') || $link.text(), 476 | }) 477 | .then(function(modal) { 478 | 479 | // When the dialog is closed, pause video and audio. 480 | modal.getRoot().on(ModalEvents.hidden, function() { 481 | $iframe.contents().find('video, audio').each(function(){ 482 | this.pause(); 483 | }); 484 | }); 485 | 486 | modal.getRoot().find('> .modal-dialog').attr('style', 'width: ' + properties.width + 487 | '; height: ' + properties.height + ';') 488 | .addClass('tepuy-modal-dialog'); 489 | modal.show(); 490 | $link.data('dialogue', modal); 491 | 492 | return modal; 493 | }); 494 | 495 | } else { 496 | dialogue.show(); 497 | } 498 | 499 | }); 500 | 501 | }); 502 | 503 | // ============================================================================================== 504 | // Mouseover 505 | // ============================================================================================== 506 | $('.tepuy-mouse-over').on('mouseover', function(){ 507 | var $this = $(this); 508 | var $popup = $($this.data('ref')); 509 | $popup.show(200, 'swing'); 510 | }); 511 | 512 | $('.tepuy-mouse-over').on('mouseout', function(){ 513 | var $this = $(this); 514 | var $popup = $($this.data('ref')); 515 | $popup.hide(200, 'swing'); 516 | }); 517 | 518 | // ============================================================================================== 519 | // Mouseover image 520 | // ============================================================================================== 521 | $('img[tepuy-over]').on('mouseover', function(){ 522 | var $this = $(this); 523 | $this.attr('original-src', $this.attr('src')); 524 | $this.attr('src', $this.attr('tepuy-over')); 525 | }); 526 | 527 | $('img[tepuy-over]').on('mouseout', function(){ 528 | var $this = $(this); 529 | $this.attr('src', $this.attr('original-src')); 530 | }); 531 | } 532 | }; 533 | }); 534 | -------------------------------------------------------------------------------- /amd/build/main.min.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"main.min.js","sources":["../src/main.js"],"sourcesContent":["// This file is part of Moodle - http://moodle.org/\n//\n// Moodle is free software: you can redistribute it and/or modify\n// it under the terms of the GNU General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n//\n// Moodle is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU General Public License for more details.\n//\n// You should have received a copy of the GNU General Public License\n// along with Moodle. If not, see .\n\ndefine(['jquery', 'core/modal', 'core/modal_events'], function($, Modal, ModalEvents) {\n 'use strict';\n\n return {\n init: function(courseid) {\n\n $('.banner-top').parents('.no-overflow').removeClass('no-overflow');\n\n var fn_effect = function () {\n var $this = $(this);\n var $parents = $this.parents('.box_resources');\n\n if ($parents.length == 0) {\n return;\n }\n\n var $parent = $($parents[0]);\n\n $parent.find('.selected').removeClass('selected');\n $parent.find('[data-rel]').hide();\n $parent.find('[data-rel=\"' + $this.attr('data-type') + '\"]').show();\n $this.addClass('selected');\n\n };\n\n $('.tepuy-menucontroler').on('mouseover touchstart', fn_effect);\n\n $('.tepuy-menucontroler').on('touchend', function() {\n var $node = $('[data-rel=\"' + $(this).attr('data-type') + '\"]');\n $(\"html, body\").animate({ scrollTop: $node.offset().top }, 500);\n });\n\n if ($('.attachedimages').length > 0) {\n\n $('article.forum-post-container .forumpost').each(function() {\n var $this = $(this);\n var $attachedimages = $this.find('.attachedimages');\n\n if ($attachedimages.length > 0) {\n\n var $sliderimages = $('
');\n $sliderimages.insertBefore($attachedimages[0]);\n\n $attachedimages.find('img').each(function() {\n var $this = $(this);\n $sliderimages.append($this);\n });\n }\n });\n }\n\n $('.tepuy-sliderimages').each(function() {\n var $this = $(this);\n console.log($this);\n $this.find('br').remove();\n $this.find('img').first().addClass('active');\n\n var fnnextimage = function () {\n var $active = $this.find('img.active');\n var $next = $active.next('img');\n\n $active.removeClass('active');\n\n if ($next.length > 0) {\n $next.addClass('active');\n } else {\n $this.find('img').first().addClass('active');\n }\n };\n\n var fnprevimage = function () {\n var $active = $this.find('img.active');\n var $next = $active.prev('img');\n\n $active.removeClass('active');\n\n if ($next.length > 0) {\n $next.addClass('active');\n } else {\n $this.find('img').last().addClass('active');\n }\n };\n\n if ($this.find('img').length > 1) {\n $this.find('img').on('click', fnnextimage);\n\n var $controlbefore = $('
<
');\n $controlbefore.on('click', fnprevimage);\n $this.append($controlbefore);\n\n var $controlafter = $('
>
');\n $controlafter.on('click', fnnextimage);\n $this.append($controlafter);\n\n } else if ($this.find('img').length == 0) {\n $this.hide();\n }\n });\n\n $('.completiontag.complete').parents('.completion-parent').addClass('complete');\n\n $('.completiontag.incomplete').parents('.completion-parent').addClass('incomplete');\n\n $('[tepuy-toggle]').on('click', function() {\n var $this = $(this);\n var cssclass = $this.attr('tepuy-toggle');\n var target = $this.attr('tepuy-target');\n\n $(target).toggleClass(cssclass);\n });\n\n\n $('.tepuy-accordion').each(function() {\n var $this = $(this);\n\n $this.find('> div').addClass('closed');\n\n $this.find('> div > h3').each(function() {\n var $header = $(this);\n var $parent = $header.parent();\n var $body = $parent.find('> div');\n\n $header.on('click', function() {\n\n var opened = false;\n if ($parent.hasClass('opened')) {\n opened = true;\n }\n\n $this.find('> div.opened > div').hide(400);\n $this.find('> div.opened').removeClass('opened').addClass('closed');\n\n if (opened) {\n $parent.removeClass('opened').addClass('closed');\n $body.hide(400);\n } else {\n $parent.removeClass('closed').addClass('opened');\n $body.show(400);\n }\n });\n\n });\n\n });\n\n\n $('.tepuy-transition').on('click', function(event) {\n event.preventDefault();\n\n var $this = $(this);\n var $show = $($this.attr('data-show'));\n var $hide = $($this.attr('data-hide'));\n var transition = $this.attr('data-transition');\n var duration = $this.attr('data-duration') ? parseInt($this.attr('data-duration')) : 400;\n\n // Available transitions: swing and linear\n if (transition) {\n $hide.hide(duration, transition, function() {\n $show.show(duration, transition);\n });\n } else {\n $hide.hide();\n $show.show();\n }\n });\n\n // ==============================================================================================\n // Float Window\n // ==============================================================================================\n $('.tepuy-wf').each(function() {\n var $this = $(this);\n\n if ($this.parents('.editor_atto_wrap').length > 0) {\n return;\n }\n\n $this.wrapInner(\"
\");\n\n var style = '';\n if ($this.attr('data-property-width')) {\n style += 'width:' + $this.attr('data-property-width') + ';';\n }\n\n if ($this.attr('data-property-height')) {\n style += 'height:' + $this.attr('data-property-height') + ';';\n }\n\n var $close = $('
X
');\n $close.on('click', function() {\n $this.hide({ effect: 'slide', direction: 'down' });\n });\n\n if (style != '') {\n $this.attr('style', style);\n }\n\n $this.append($close);\n $this.hide();\n });\n\n $('.tepuy-wf-controller').on('click', function(){\n var $this = $(this);\n var w = $this.attr('data-property-width');\n var h = $this.attr('data-property-height');\n\n if ($this.parents('.editor_atto_wrap').length > 0) {\n return;\n }\n\n var $floatwindow = $($this.attr('data-content'));\n\n if (w) {\n $floatwindow.css('width', w);\n }\n\n if (h) {\n $floatwindow.css('height', h);\n }\n\n $floatwindow.show({ effect: 'slide', direction: 'down' });\n });\n\n // ==============================================================================================\n // Modal Window\n // ==============================================================================================\n $('.tepuy-w').each(function() {\n var $this = $(this);\n\n if ($this.parents('[data-fieldtype=\"editor\"]') && $this.parents('[data-fieldtype=\"editor\"]').length > 0) {\n return;\n }\n\n $this.wrapInner(\"
\");\n\n if ($this.attr('data-tepuy-showentry') || $this.attr('data-tepuy-showconcept')) {\n\n var searchparams = {};\n\n if ($this.attr('data-tepuy-showentry')) {\n searchparams.eid = $this.attr('data-tepuy-showentry');\n } else if ($this.attr('data-tepuy-showconcept') && courseid) {\n searchparams.concept = $this.attr('data-tepuy-showconcept');\n searchparams.courseid = courseid;\n }\n\n searchparams.inpopup = true;\n\n var searchparamsstring = $.param(searchparams);\n\n var url = M.cfg.wwwroot + '/mod/glossary/showentry.php?' + searchparamsstring;\n var $iframe = $('');\n $iframe.attr('src', url);\n $iframe.on('load', function() {\n $iframe.contents().find('a:not([target])').attr('target', '_top');\n });\n\n $this.find('.tepuy-body').append($iframe);\n $this.attr('title', $this.find('a.autolink').html());\n\n } else if ($this.attr('data-tepuy-innerentry')) {\n\n if ($this.find('a.glossary.autolink').length > 0) {\n var url = $this.find('a.glossary.autolink').attr('href') + '&inpopup=true';\n var $iframe = $('');\n $iframe.attr('src', url);\n $iframe.on('load', function() {\n $iframe.contents().find('a:not([target])').attr('target', '_top');\n });\n\n $this.find('.tepuy-body').append($iframe);\n\n $this.attr('title', $this.find('a.glossary.autolink').attr('title'));\n }\n } else if ($this.attr('data-tepuy-innerautolink')) {\n\n if ($this.find('a.autolink').length > 0) {\n var url = $this.find('a.autolink').attr('href') + '&inpopup=true';\n $this.find('a.autolink').hide();\n\n var $iframe = $('');\n $iframe.attr('src', url);\n $iframe.on('load', function() {\n $iframe.contents().find('a:not([target])').attr('target', '_top');\n });\n\n $this.find('.tepuy-body').append($iframe);\n $this.attr('title', $this.find('a.autolink').html());\n }\n }\n\n $this.hide();\n });\n\n $('.tepuy-w-controller').on('click', function(e){\n e.preventDefault();\n\n var $this = $(this);\n\n if ($this.parents('[data-fieldtype=\"editor\"]') && $this.parents('[data-fieldtype=\"editor\"]').length > 0) {\n return;\n }\n\n var dialogue = $this.data('dialogue');\n\n if (!dialogue) {\n\n var w = $this.attr('data-property-width');\n var h = $this.attr('data-property-height');\n\n var $floatwindow = $($this.attr('data-content') + ' .tepuy-body');\n\n var properties = {};\n\n if (w) {\n if (w.indexOf('%') >= 0) {\n var window_w = $(window).width();\n var tmp_w = Number(w.replace('%', ''));\n if (!isNaN(tmp_w) && tmp_w > 0) {\n w = tmp_w * window_w / 100;\n }\n }\n\n if (!isNaN(w)) {\n w += 'px';\n }\n\n properties.width = w;\n }\n\n if (h) {\n if (h.indexOf('%') >= 0) {\n var window_h = $(window).height();\n var tmp_h = Number(h.replace('%', ''));\n if (!isNaN(tmp_h) && tmp_h > 0) {\n h = tmp_h * window_h / 100;\n }\n }\n\n if (!isNaN(h)) {\n h += 'px';\n }\n\n properties.height = h;\n }\n\n Modal.create({\n body: $floatwindow,\n title: $this.attr('title') || $this.text(),\n })\n .then(function(modal) {\n\n // When the dialog is closed, pause video and audio.\n modal.getRoot().on(ModalEvents.hidden, function() {\n $floatwindow.contents().find('video, audio').each(function(){\n this.pause();\n });\n });\n\n var $style = '';\n if (properties.width) {\n $style += 'width: ' + properties.width + '; ';\n }\n if (properties.height) {\n $style += 'height: ' + properties.height + '; ';\n }\n modal.getRoot().find('> .modal-dialog').attr('style', $style).addClass('tepuy-modal-dialog');\n modal.show();\n $this.data('dialogue', modal);\n\n return modal;\n });\n\n } else {\n dialogue.show();\n }\n });\n\n // ==============================================================================================\n // Open resources into modal\n // ==============================================================================================\n $('.tepuy-openinmodal').each(function() {\n var $this = $(this);\n\n if ($this.parents('[data-fieldtype=\"editor\"]') && $this.parents('[data-fieldtype=\"editor\"]').length > 0) {\n return;\n }\n\n $this.find('a').each( function() {\n this.removeAttribute('onclick');\n });\n\n $this.find('a').on('click', function(event) {\n event.preventDefault();\n\n var $link = $(this);\n\n var dialogue = $link.data('dialogue');\n\n if (!dialogue) {\n\n var w = $this.attr('data-property-width');\n var h = $this.attr('data-property-height');\n\n var url = $link.attr('href') + '&inpopup=true';\n var $iframe = $('');\n $iframe.attr('src', url);\n $iframe.on('load', function() {\n $iframe.contents().find('a:not([target])').attr('target', '_top');\n });\n\n var el = $.fn['hide'];\n $.fn['hide'] = function () {\n this.trigger('hide');\n return el.apply(this, arguments);\n };\n\n var $floatwindow = $('
');\n\n $floatwindow.append($iframe);\n\n var properties = {\n width: '95vw',\n height: '95vh',\n };\n\n if (w) {\n if (w.indexOf('%') >= 0) {\n var window_w = $(window).width();\n var tmp_w = Number(w.replace('%', ''));\n if (!isNaN(tmp_w) && tmp_w > 0) {\n w = tmp_w * window_w / 100;\n }\n }\n\n if (!isNaN(w)) {\n w += 'px';\n }\n\n properties.width = w;\n }\n\n if (h) {\n if (h.indexOf('%') >= 0) {\n var window_h = $(window).height();\n var tmp_h = Number(h.replace('%', ''));\n if (!isNaN(tmp_h) && tmp_h > 0) {\n h = tmp_h * window_h / 100;\n }\n }\n\n if (!isNaN(h)) {\n h += 'px';\n }\n\n properties.height = h;\n }\n\n Modal.create({\n body: $iframe,\n title: $link.attr('title') || $link.text(),\n })\n .then(function(modal) {\n\n // When the dialog is closed, pause video and audio.\n modal.getRoot().on(ModalEvents.hidden, function() {\n $iframe.contents().find('video, audio').each(function(){\n this.pause();\n });\n });\n\n modal.getRoot().find('> .modal-dialog').attr('style', 'width: ' + properties.width +\n '; height: ' + properties.height + ';')\n .addClass('tepuy-modal-dialog');\n modal.show();\n $link.data('dialogue', modal);\n\n return modal;\n });\n\n } else {\n dialogue.show();\n }\n\n });\n\n });\n\n // ==============================================================================================\n // Mouseover\n // ==============================================================================================\n $('.tepuy-mouse-over').on('mouseover', function(){\n var $this = $(this);\n var $popup = $($this.data('ref'));\n $popup.show(200, 'swing');\n });\n\n $('.tepuy-mouse-over').on('mouseout', function(){\n var $this = $(this);\n var $popup = $($this.data('ref'));\n $popup.hide(200, 'swing');\n });\n\n // ==============================================================================================\n // Mouseover image\n // ==============================================================================================\n $('img[tepuy-over]').on('mouseover', function(){\n var $this = $(this);\n $this.attr('original-src', $this.attr('src'));\n $this.attr('src', $this.attr('tepuy-over'));\n });\n\n $('img[tepuy-over]').on('mouseout', function(){\n var $this = $(this);\n $this.attr('src', $this.attr('original-src'));\n });\n }\n };\n});\n"],"names":["define","$","Modal","ModalEvents","init","courseid","parents","removeClass","on","$this","this","$parents","length","$parent","find","hide","attr","show","addClass","$node","animate","scrollTop","offset","top","each","$attachedimages","$sliderimages","insertBefore","append","console","log","remove","first","fnnextimage","$active","$next","next","$controlbefore","prev","last","$controlafter","cssclass","target","toggleClass","$header","parent","$body","opened","hasClass","event","preventDefault","$show","$hide","transition","duration","parseInt","wrapInner","style","$close","effect","direction","w","h","$floatwindow","css","searchparams","eid","concept","inpopup","searchparamsstring","param","url","M","cfg","wwwroot","$iframe","contents","html","e","dialogue","data","properties","indexOf","window_w","window","width","tmp_w","Number","replace","isNaN","window_h","height","tmp_h","create","body","title","text","then","modal","getRoot","hidden","pause","$style","removeAttribute","$link","el","fn","trigger","apply","arguments"],"mappings":"AAeAA,4CAAO,CAAC,SAAU,aAAc,sBAAsB,SAASC,EAAGC,MAAOC,mBAG9D,CACHC,KAAM,SAASC,UAEXJ,EAAE,eAAeK,QAAQ,gBAAgBC,YAAY,eAmBrDN,EAAE,wBAAwBO,GAAG,wBAjBb,eACRC,MAAQR,EAAES,MACVC,SAAWF,MAAMH,QAAQ,qBAEN,GAAnBK,SAASC,YAITC,QAAUZ,EAAEU,SAAS,IAEzBE,QAAQC,KAAK,aAAaP,YAAY,YACtCM,QAAQC,KAAK,cAAcC,OAC3BF,QAAQC,KAAK,cAAgBL,MAAMO,KAAK,aAAe,MAAMC,OAC7DR,MAAMS,SAAS,gBAMnBjB,EAAE,wBAAwBO,GAAG,YAAY,eACjCW,MAAQlB,EAAE,cAAgBA,EAAES,MAAMM,KAAK,aAAe,MAC1Df,EAAE,cAAcmB,QAAQ,CAAEC,UAAWF,MAAMG,SAASC,KAAO,QAG3DtB,EAAE,mBAAmBW,OAAS,GAE9BX,EAAE,2CAA2CuB,MAAK,eAE1CC,gBADQxB,EAAES,MACcI,KAAK,sBAE7BW,gBAAgBb,OAAS,EAAG,KAExBc,cAAgBzB,EAAE,0CACtByB,cAAcC,aAAaF,gBAAgB,IAE3CA,gB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