Add Expand (fullscreen) / Compress box-widget
See original GitHub issueHi,
I added this widget to my website and it works great, I think this could be a nice small addition to the project 😉
I’m not doing a pull request since my way of doing it may not be the best.
boxWidgetOptions: {
boxWidgetIcons: {
//The icon that triggers the collapse event
collapse: 'fa fa-minus',
//The icon that trigger the opening event
open: 'fa fa-plus',
//The icon that triggers the removing event
remove: 'fa fa-times',
//The icon that triggers the maximize event
maximize: 'fa fa-expand'
},
boxWidgetSelectors: {
//Remove button selector
remove: '[data-widget="remove"]',
//Collapse button selector
collapse: '[data-widget="collapse"]',
//Expand button selector
maximize: '[data-widget="maximize"]'
}
},
//Listen for maximize event triggers
$(o.boxWidgetOptions.boxWidgetSelectors.maximize).click(function (e) {
e.preventDefault();
_this.maximize($(this));
});
maximize: function (element) {
function maximizer(n) {
if (n) {
var t = $(window).height(),
i = n.find(".box-header").height();
n.find(".box-body").height(t - i)
}
}
var t = element.parents(".box").first(),
i = element.find("i").first(),
r = "fa-compress",
u = "fa-expand";
t.hasClass("maximized") ? (i && i.addClass(u).removeClass(r), t.removeClass("maximized"), t.find(".box-body").css("height", "auto")) : (i && i.addClass(r).removeClass(u), t.addClass("maximized"), maximizer(t))
}
.maximized {
z-index: 9999;
width: 100%;
height: 100%;
position: fixed;
top: 0;
left: 0;
}
Issue Analytics
- State:
- Created 8 years ago
- Comments:15 (3 by maintainers)
Top Results From Across the Web
How to Enable Expanded Widgets Full-Screen View in ...
Microsoft has introduced a Full-Screen ( Expanded ) Widgets panel in Windows 11 build 25201. The purpose of making this change is to...
Read more >Card Widget Plugin | AdminLTE 3 Documentation
The card widget plugin provides the functionality for collapsing, expanding and removing a card. Usage. This plugin can be activated as a jQuery...
Read more >Flutter Sized Box & Fitted Box Widget with Example - Developine
Hello there! Let us first explore Flutter Sized Box Widget. Sized Box Widget Explained. In many cases you know exactly how much space...
Read more >Expand and Collapse Widgets Board View in Windows 11
Click/tap on the Expand button at the top right to expand the widgets board to full screen. Click/tap on the Collapse button at...
Read more >Sitefinity How-tos for UTMB websites
See the various layout templates for the Feature Box widget component. Create a Feature Collection. How to. Expand All Collapse All. Create a...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
👍
Thanks for sharing
I‘ll create soon the v3.0.0-beta.1 release and publish it on npmjs and packagist.