Author: nathangray
New Revision: 54975
URL: http://svn.stylite.de/viewvc/egroupware?rev=54975&view=rev
Log:
Fix resize issues with etemplate2 / calendar
Modified:
trunk/calendar/js/app.js
trunk/calendar/js/et2_widget_timegrid.js
trunk/etemplate/js/etemplate2.js
— trunk/calendar/js/app.js (original)
+++ trunk/calendar/js/app.js Wed Feb 10 17:50:42 2016
@@ -3219,23 +3219,27 @@
var preferred_width = $j(’#calendar-sidebox_date .ui-datepicker-inline’).outerWidth();
var font_ratio = 12 / parseFloat($j(’#calendar-sidebox_date .ui-datepicker-inline’).css(‘font-size’));
$j(window).on(‘resize.calendar’+date_widget.dom_id, function() {
-
var percent = 1+(($j(date_widget.getDOMNode()).width() - preferred_width) / preferred_width);
-
percent *= font_ratio;
-
$j('#calendar-sidebox_date .ui-datepicker-inline')
-
.css('font-size',(percent*100)+'%');
-
-
// Position go and today
-
var buttons = $j('#calendar-sidebox_date .ui-datepicker-header a span');
-
if(today.length && go_button.length)
-
{
-
go_button.position({my: 'left+15px center', at: 'right center-1',of: $j('#calendar-sidebox_date .ui-datepicker-year')});
-
today.css({
-
'left': (buttons.first().offset().left + buttons.last().offset().left)/2 - Math.ceil(today.outerWidth(true)/2),
-
'top': go_button.css('top')
-
});
-
try {
-
var percent = 1+(($j(date_widget.getDOMNode()).width() - preferred_width) / preferred_width);
-
percent *= font_ratio;
-
$j('#calendar-sidebox_date .ui-datepicker-inline')
-
.css('font-size',(percent*100)+'%');
-
-
// Position go and today
-
var buttons = $j('#calendar-sidebox_date .ui-datepicker-header a span');
-
if(today.length && go_button.length)
-
{
-
go_button.position({my: 'left+15px center', at: 'right center-1',of: $j('#calendar-sidebox_date .ui-datepicker-year')});
-
today.css({
-
'left': (buttons.first().offset().left + buttons.last().offset().left)/2 - Math.ceil(today.outerWidth(true)/2),
-
'top': go_button.css('top')
-
});
-
}
-
} catch (e){
-
// Resize didn't work
}
}).trigger('resize');
— trunk/calendar/js/et2_widget_timegrid.js (original)
+++ trunk/calendar/js/et2_widget_timegrid.js Wed Feb 10 17:50:42 2016
@@ -1706,9 +1706,6 @@
return;
}
-
// Set the max width to avoid animations screwing up the width
-
this.div.css('max-width',$j(this.getInstanceManager().DOMContainer).width());
-
/*
We expect the timegrid to be in a table with 0 or more other timegrids,
1 per row. We want each timegrid to be as large as possible, but space
@@ -1775,7 +1772,7 @@
}
// Try to resize width, though animations cause problems
— trunk/etemplate/js/etemplate2.js (original)
+++ trunk/etemplate/js/etemplate2.js Wed Feb 10 17:50:42 2016
@@ -148,19 +148,18 @@
var appHeader = $j(’#divAppboxHeader’);
//Calculate the excess height
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=272487151&iu=/4140
eGroupWare-cvs mailing list
eGroupWare-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/egroupware-cvs