Skip to content

Commit

Permalink
removed jquery ui from Generico
Browse files Browse the repository at this point in the history
  • Loading branch information
justinhunt committed Jun 27, 2022
1 parent ee3e86b commit 1518648
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 6 deletions.
3 changes: 3 additions & 0 deletions CHANGES.txt
Original file line number Diff line number Diff line change
@@ -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

Expand Down
2 changes: 0 additions & 2 deletions classes/template_script_generator.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion presets/accordian.txt
Original file line number Diff line number Diff line change
@@ -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":"<div id=\"@@AUTOID@@\">","bodyend":"</div>","script":" $(function() {\n $( \"#\" + @@AUTOID@@).accordion({\n header: \"h3\",\n heightStyle: \"content\"\n })\n});","style":"","dataset":"","datasetvars":"","alternate":"","alternateend":""}
{"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":"<div id=\"@@AUTOID@@\">","bodyend":"</div>","script":" $(function() {\n $( \"#\" + @@AUTOID@@).accordion({\n header: \"h3\",\n heightStyle: \"content\"\n })\n});","style":"","dataset":"","datasetvars":"","alternate":"","alternateend":"","version":"1.0.1"}
2 changes: 1 addition & 1 deletion presets/tabs.txt
Original file line number Diff line number Diff line change
@@ -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":"<div id=\"@@AUTOID@@\"><ul></ul>","bodyend":"</div>","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(\"<li><a href='#\" + this.id + \"'><span>\"+this.title+\"</span></a></li>\");\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"}
{"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":"<div id=\"@@AUTOID@@\">\n<div class=\"filter_generico_tabs_container\">\n<ul class=\"filter_generico_tabs\"></ul>","bodyend":"</div>\n</div>","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(\"<li><a href='#\" + this.id + \"'><span>\"+this.title+\"</span></a></li>\");\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"}
4 changes: 2 additions & 2 deletions version.php
Original file line number Diff line number Diff line change
Expand Up @@ -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)';

0 comments on commit 1518648

Please sign in to comment.