From 4ef7afca9efaa31fe13f4f5aa940286c24833166 Mon Sep 17 00:00:00 2001 From: Nathan Gray Date: Mon, 25 Apr 2016 22:09:57 +0000 Subject: [PATCH] Hide granularity change so you don't have to see it --- calendar/js/app.js | 1 + calendar/js/et2_widget_timegrid.js | 4 ++-- calendar/js/et2_widget_view.js | 2 +- calendar/templates/default/app.css | 4 ++++ calendar/templates/pixelegg/app.css | 7 ++++++- 5 files changed, 14 insertions(+), 4 deletions(-) diff --git a/calendar/js/app.js b/calendar/js/app.js index aa1be64815..272afb8bc3 100644 --- a/calendar/js/app.js +++ b/calendar/js/app.js @@ -2075,6 +2075,7 @@ app.classes.calendar = (function(){ "use strict"; return AppJS.extend( } if(widget.set_granularity) { + if(widget.loader) widget.loader.show(); widget.set_granularity(view.granularity(state.state)); } if(widget.id == value[row_index].id && diff --git a/calendar/js/et2_widget_timegrid.js b/calendar/js/et2_widget_timegrid.js index 8d18f47a3f..0f6aae5823 100644 --- a/calendar/js/et2_widget_timegrid.js +++ b/calendar/js/et2_widget_timegrid.js @@ -562,7 +562,7 @@ var et2_calendar_timegrid = (function(){ "use strict"; return et2_calendar_view. this.widget.change(); } // Hide loader - window.setTimeout(jQuery.proxy(function() {this.loader.hide();},this.widget),100); + window.setTimeout(jQuery.proxy(function() {this.loader.hide();},this.widget),200); },{widget:this,"trigger":trigger}),ET2_GRID_INVALIDATE_TIMEOUT); }, @@ -1388,7 +1388,7 @@ var et2_calendar_timegrid = (function(){ "use strict"; return et2_calendar_view. // None of the above changed anything, hide the loader if(!this.update_timer) { - window.setTimeout(jQuery.proxy(function() {this.loader.hide();},this),100); + window.setTimeout(jQuery.proxy(function() {this.loader.hide();},this),200); } }, diff --git a/calendar/js/et2_widget_view.js b/calendar/js/et2_widget_view.js index ec779a86ce..7eb959466a 100644 --- a/calendar/js/et2_widget_view.js +++ b/calendar/js/et2_widget_view.js @@ -294,7 +294,7 @@ var et2_calendar_view = (function(){ "use strict"; return et2_valueWidget.extend // None of the above changed anything, hide the loader if(!this.update_timer) { - window.setTimeout(jQuery.proxy(function() {this.loader.hide();},this),100); + window.setTimeout(jQuery.proxy(function() {this.loader.hide();},this),200); } }, diff --git a/calendar/templates/default/app.css b/calendar/templates/default/app.css index 095b74a514..6771fc50a0 100644 --- a/calendar/templates/default/app.css +++ b/calendar/templates/default/app.css @@ -275,6 +275,10 @@ e.g. the div with class calendar_calTimeGrid is generated by the timeGridWidget right: 0px; position: absolute; } +.calendar_calTimeGrid .loading::before ,.calendar_plannerWidget .loading::before { + opacity: 1; + background-color: #E6E6E6; +} /* Timegrid that has hit a minimum size */ .calendar_calTimeGridFixed .calendar_calTimeGridScroll { overflow: hidden; diff --git a/calendar/templates/pixelegg/app.css b/calendar/templates/pixelegg/app.css index 4df77ac626..a2ff9a1672 100755 --- a/calendar/templates/pixelegg/app.css +++ b/calendar/templates/pixelegg/app.css @@ -11,7 +11,7 @@ * @package calendar * @version $Id$ */ -/* $Id: app.css 55784 2016-04-20 15:07:01Z nathangray $ */ +/* $Id: app.css 55805 2016-04-21 20:30:48Z nathangray $ */ /*Media print classes*/ @media print { #calendar-view.et2_container, @@ -280,6 +280,11 @@ e.g. the div with class calendar_calTimeGrid is generated by the timeGridWidget right: 0px; position: absolute; } +.calendar_calTimeGrid .loading::before, +.calendar_plannerWidget .loading::before { + opacity: 1; + background-color: #E6E6E6; +} /* Timegrid that has hit a minimum size */ .calendar_calTimeGridFixed .calendar_calTimeGridScroll { overflow: hidden;