File modules/cms/ui/themes/default/script/plugin/jquery-plugin-orButton.js

Last commit: Wed Mar 31 01:52:57 2021 +0200	Jan Dankert	New: Replace JQuery with OQuery, a selfmade light JQuery replacement.
1 import $ from "../jquery-global.js"; 2 3 /** 4 * JQuery-Plugin, enable opening an area. 5 */ 6 export default function( options ) 7 { 8 // Create some defaults, extending them with any options that were provided 9 let settings = $.extend( { 10 'selectorForClose': '.or-view' 11 }, options); 12 13 let button = this; 14 15 $( settings.selectorForClose ).click( function() { 16 // Closing all dropdowns on any click. 17 //$(button).removeClass('button--is-active'); 18 }); 19 20 return $(this) 21 .addClass('button--is-watched') 22 .click( function() { 23 $(this).toggleClass('button--is-active'); 24 } ) ; 25 26 }; 27 28 29
Download modules/cms/ui/themes/default/script/plugin/jquery-plugin-orButton.js
History Wed, 31 Mar 2021 01:52:57 +0200 Jan Dankert New: Replace JQuery with OQuery, a selfmade light JQuery replacement. Sat, 27 Mar 2021 05:14:11 +0100 Jan Dankert Refactoring: Converting all script files to ES6 modules (work in progress); removed jquery-ui (drag and drop will be replaced by HTML5, sortable by a small lib) Sat, 6 Mar 2021 15:38:14 +0100 Jan Dankert New: Submenus in Lists.