Optimization when block not relevant
This commit is contained in:
parent
6a5de18359
commit
a669e34796
|
@ -43,9 +43,10 @@ let strings = load_strings({
|
|||
* @param {Object} arg Arguments passed
|
||||
*/
|
||||
export function init(type="myreport",arg) {
|
||||
// Make sure on window resize, the line wrappers are repositioned, to fix scrolling issues
|
||||
window.addEventListener('resize',fixLineWrappers);
|
||||
let app = new Vue({
|
||||
// Save time by only starting up the Vue app if the required block element is present
|
||||
const blockelement = document.getElementById('block_mytreestudyplan');
|
||||
if(blockelement){
|
||||
const app = new Vue({
|
||||
el: '#block_mytreestudyplan',
|
||||
data: {
|
||||
"studyplans": [],
|
||||
|
@ -100,7 +101,7 @@ let strings = load_strings({
|
|||
|
||||
},
|
||||
});
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
$plugin->component = 'block_mytreestudyplan'; // Recommended since 2.0.2 (MDL-26035). Required since 3.0 (MDL-48494)
|
||||
$plugin->version = 2023081600; // YYYYMMDDHH (year, month, day, iteration)
|
||||
$plugin->version = 2023081800; // YYYYMMDDHH (year, month, day, iteration)
|
||||
$plugin->requires = 2021051700; // YYYYMMDDHH (This is the release version for Moodle 3.11)
|
||||
|
||||
$plugin->dependencies = [
|
||||
|
|
Loading…
Reference in New Issue
Block a user