dev:chanages in mynotes
Showing
3 changed files
with
19 additions
and
0 deletions
amd/build/script.min.js
0 → 100644
1 | define(["jquery"],function(n){return{init:function(){var i=n(location).attr("href");n("document").ready(function(){i.includes("/mod/hvp/view.php")&&console.log("this is inside hvp")})}}}); | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
amd/src/script.js
0 → 100644
1 | define(['jquery'], function($) { | ||
2 | |||
3 | return { | ||
4 | init: function() { | ||
5 | var url= $(location).attr('href'); | ||
6 | |||
7 | $('document').ready(function(){ | ||
8 | |||
9 | if(url.includes('/mod/hvp/view.php')){ | ||
10 | |||
11 | console.log("this is inside hvp"); | ||
12 | |||
13 | } | ||
14 | }); | ||
15 | } | ||
16 | }; | ||
17 | }); | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
... | @@ -121,6 +121,7 @@ class block_mynotes extends block_base { | ... | @@ -121,6 +121,7 @@ class block_mynotes extends block_base { |
121 | ), | 121 | ), |
122 | ); | 122 | ); |
123 | // $PAGE->requires->string_for_js('charactersleft', 'block_mynotes'); | 123 | // $PAGE->requires->string_for_js('charactersleft', 'block_mynotes'); |
124 | $PAGE->requires->js_call_amd('block_mynotes/script', 'init'); | ||
124 | $PAGE->requires->string_for_js('notmorethan', 'block_mynotes'); | 125 | $PAGE->requires->string_for_js('notmorethan', 'block_mynotes'); |
125 | $PAGE->requires->string_for_js('mynotes', 'block_mynotes'); | 126 | $PAGE->requires->string_for_js('mynotes', 'block_mynotes'); |
126 | $PAGE->requires->string_for_js('showmynotes', 'block_mynotes'); | 127 | $PAGE->requires->string_for_js('showmynotes', 'block_mynotes'); | ... | ... |
-
Please register or sign in to post a comment