diff --git a/CHANGES.txt b/CHANGES.txt index b643a5e..dcf375a 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,5 +1,8 @@ Change List ========= +Version 1.4.15(Build 2022062700) +- Removed JQuery UI because it breaks drawers in Moodle 4 + Version 1.4.14(Build 2022032400) - Added course custom variables to variables to use in filter diff --git a/classes/template_script_generator.php b/classes/template_script_generator.php index e8bff9f..6d2405e 100644 --- a/classes/template_script_generator.php +++ b/classes/template_script_generator.php @@ -168,8 +168,6 @@ public function get_template_script() { } else { array_unshift($requires, "'" . 'jquery' . "'"); array_unshift($params, '$'); - array_unshift($requires, "'" . 'jqueryui' . "'"); - array_unshift($params, 'jqui'); } //Assemble the final javascript to pass to browser diff --git a/presets/accordian.txt b/presets/accordian.txt index 2c95c1d..1b0f40c 100644 --- a/presets/accordian.txt +++ b/presets/accordian.txt @@ -1 +1 @@ -{"key":"accordian","name":"accordian","version":"1.0.0","instructions":"","requirecss":"//cdnjs.cloudflare.com/ajax/libs/jqueryui/1.12.1/jquery-ui.min.css","requirejs":"","shim":"","defaults":"","amd":"1","body":"
","bodyend":"
","script":" $(function() {\n $( \"#\" + @@AUTOID@@).accordion({\n header: \"h3\",\n heightStyle: \"content\"\n })\n});","style":"","dataset":"","datasetvars":"","alternate":"","alternateend":""} \ No newline at end of file +{"key":"accordian","name":"accordian","instructions":"Between the accordian tags enter as many accordian item tags as you need","requirecss":"//cdnjs.cloudflare.com/ajax/libs/jqueryui/1.12.1/jquery-ui.min.css","requirejs":"//cdnjs.cloudflare.com/ajax/libs/jqueryui/1.12.1/jquery-ui.min.js","shim":"","defaults":"","amd":"1","body":"
","bodyend":"
","script":" $(function() {\n $( \"#\" + @@AUTOID@@).accordion({\n header: \"h3\",\n heightStyle: \"content\"\n })\n});","style":"","dataset":"","datasetvars":"","alternate":"","alternateend":"","version":"1.0.1"} \ No newline at end of file diff --git a/presets/tabs.txt b/presets/tabs.txt index a29f4dc..9264689 100755 --- a/presets/tabs.txt +++ b/presets/tabs.txt @@ -1 +1 @@ -{"key":"tabs","name":"Tabs","instructions":"Tabs separate content by heading and are an efficient way to organize data and avoid lots of scrolling. These tabs are Jquery-UI tabs. Add tabs, and between the Generico tab tags nest as many Generico tabitems as you need. You can not put bullet points inside tabs. ","requirecss":"//cdnjs.cloudflare.com/ajax/libs/jqueryui/1.12.1/jquery-ui.min.css","requirejs":"","shim":"","defaults":"","amd":"1","body":"
","bodyend":"
","script":"var theul = $(\"#\" + @@AUTOID@@ + \" ul\");\n//because users may copy/paste/massage the tab items, we get html junk\n//so move any span nested tab items to directly under tabs\n$(\".filter_generico_tabitem\", $(\"#\" + @@AUTOID@@)).each(function () {\n $(this).unwrap('span');\n});\n\n//create li items for each tab item, ignore the (important) ul element and remove html junk\n$(\"#\" + @@AUTOID@@).children().each(function () {\n if($(this).is(\".filter_generico_tabitem\")){\n theul.append(\"
  • \"+this.title+\"
  • \");\n //end of if is tabitem\n}else if(!$(this).is('ul')){\n this.remove();\n}\n});\n\n//finally create the tabs\n$( \"#\" + @@AUTOID@@).tabs();","style":"","dataset":"","datasetvars":"","alternate":"","alternateend":"","version":"1.0.1"} \ No newline at end of file +{"key":"tabs","name":"Tabs","instructions":"Tabs separate content by heading and are an efficient way to organize data and avoid lots of scrolling. Between the Generico tab tags nest as many Generico tabitem tags as you need. ","requirecss":"//cdnjs.cloudflare.com/ajax/libs/jqueryui/1.12.1/jquery-ui.min.css","requirejs":"//cdnjs.cloudflare.com/ajax/libs/jqueryui/1.12.1/jquery-ui.min.js","shim":"","defaults":"","amd":"1","body":"
    \n
    \n","bodyend":"
    \n
    ","script":"var theul = $(\"#\" + @@AUTOID@@ + \" ul.filter_generico_tabs\");\n//because users may copy/paste/massage the tab items, we get html junk\n//so move any span nested tab items to directly under tabs\n$(\".filter_generico_tabitem\", $(\"#\" + @@AUTOID@@)).each(function () {\n $(this).unwrap('span');\n});\n\n//create li items for each tab item, ignore the (important) ul element and remove html junk\n$(\"#\" + @@AUTOID@@ + \" .filter_generico_tabs_container\").children().each(function () {\n if($(this).is(\".filter_generico_tabitem\")){\n theul.append(\"
  • \"+this.title+\"
  • \");\n //$(this).appendTo('#' + @@AUTOID@@); \n //end of if is tabitem\n}else if(!$(this).is('ul.filter_generico_tabs')){\n this.remove();\n}\n});\n\n//finally create the tabs\n$( \"#\" + @@AUTOID@@ + \" .filter_generico_tabs_container\").tabs();","style":"","dataset":"","datasetvars":"","alternate":"","alternateend":"","version":"1.0.3"} \ No newline at end of file diff --git a/version.php b/version.php index ab53a1c..bb43e8b 100644 --- a/version.php +++ b/version.php @@ -25,8 +25,8 @@ defined('MOODLE_INTERNAL') || die(); -$plugin->version = 2022032400; // The current plugin version (Date: YYYYMMDDXX) +$plugin->version = 2022062700; // The current plugin version (Date: YYYYMMDDXX) $plugin->requires = 2011070100; // Requires this Moodle version $plugin->component = 'filter_generico'; // Full name of the plugin (used for diagnostics) $plugin->maturity = MATURITY_STABLE; -$plugin->release = 'Version 1.4.14(Build 2022032400)'; +$plugin->release = 'Version 1.4.15(Build 2022062700)';