diff --git a/infcloud_config/config.js b/infcloud_config/config.js index 0d1c298..5fcd359 100644 --- a/infcloud_config/config.js +++ b/infcloud_config/config.js @@ -28,7 +28,8 @@ var globalSearchTransformAlphabet = 'AÁÀÂàáâBCÇcçDEÉÈÊeéèêFGHIÍÌ // Configuración de calendario var globalCalendarSelected = ''; var globalTodoCalendarSelected = ''; -var globalActiveView = 'multiWeek'; // Vista por defecto: semana múltiple +var globalActiveView = 'agendaWeek'; // Vista por defecto: semana +var globalDefaultEventDuration = 60; // Eventos nuevos duran 1 hora var globalOpenFormMode = 'double'; var globalTodoListFilterSelected = ['filterAction', 'filterProgress', 'filterCompleted', 'filterCanceled']; var globalActiveApp = null; @@ -40,7 +41,7 @@ var globalDisplayHiddenEvents = false; // Configuraciones adicionales de usuario que se recordarán var globalUserPreferences = { - defaultView: 'multiWeek', // Vista preferida del usuario + defaultView: 'agendaWeek', // Vista preferida del usuario showWeekends: true, // Mostrar fines de semana firstDayOfWeek: 1, // Lunes = 1, Domingo = 0 workingHours: {start: 8, end: 18}, // Horario laboral @@ -95,7 +96,7 @@ var globalUseCrossOrigin = false; // Variables adicionales requeridas var globalContactDataMinVisiblePercentage = 0.2; -var globalEditorFadeAnimation = 666; +var globalEditorFadeAnimation = 0; var globalEventStartPastLimit = 3; var globalEventStartFutureLimit = 3; var globalTodoStartPastLimit = 3; @@ -108,7 +109,7 @@ var globalHideInfoMessageAfter = 3000; // Tiempo en millisegundos para ocultar m var globalDefaultActiveApp = null; var globalSubscribedCalendars = {}; var globalCalendarStartOfBusiness = 8; -var globalCalendarEndOfBusiness = 17; +var globalCalendarEndOfBusiness = 19; var globalAMPMFormat = false; // Persistencia de configuraciones de usuario diff --git a/infcloud_config/config.js.template b/infcloud_config/config.js.template index 7ef3214..6f00645 100644 --- a/infcloud_config/config.js.template +++ b/infcloud_config/config.js.template @@ -28,7 +28,8 @@ var globalSearchTransformAlphabet = 'AÁÀÂàáâBCÇcçDEÉÈÊeéèêFGHIÍÌ // Configuración de calendario var globalCalendarSelected = ''; var globalTodoCalendarSelected = ''; -var globalActiveView = 'multiWeek'; // Vista por defecto: semana múltiple +var globalActiveView = 'agendaWeek'; // Vista por defecto: semana +var globalDefaultEventDuration = 60; // Eventos nuevos duran 1 hora var globalOpenFormMode = 'double'; var globalTodoListFilterSelected = ['filterAction', 'filterProgress', 'filterCompleted', 'filterCanceled']; var globalActiveApp = null; @@ -40,7 +41,7 @@ var globalDisplayHiddenEvents = false; // Configuraciones adicionales de usuario que se recordarán var globalUserPreferences = { - defaultView: 'multiWeek', // Vista preferida del usuario + defaultView: 'agendaWeek', // Vista preferida del usuario showWeekends: true, // Mostrar fines de semana firstDayOfWeek: 1, // Lunes = 1, Domingo = 0 workingHours: {start: 8, end: 18}, // Horario laboral @@ -95,7 +96,7 @@ var globalUseCrossOrigin = false; // Variables adicionales requeridas var globalContactDataMinVisiblePercentage = 0.2; -var globalEditorFadeAnimation = 666; +var globalEditorFadeAnimation = 0; var globalEventStartPastLimit = 3; var globalEventStartFutureLimit = 3; var globalTodoStartPastLimit = 3; diff --git a/infcloud_config/main.js b/infcloud_config/main.js index 23ebfab..349d547 100644 --- a/infcloud_config/main.js +++ b/infcloud_config/main.js @@ -17,7 +17,73 @@ GNU Affero General Public License for more details. You should have received a copy of the GNU Affero General Public License along with this program. If not, see . -*/ + */ + +// Disable jQuery fade animations to make UI snappier +(function (win) { + if (!win || !win.jQuery) { + return; + } + var $ = win.jQuery; + if ($.fn._noAnimationPatch) { + return; + } + function getCallback(args) { + for (var i = args.length - 1; i >= 0; i--) { + if (typeof args[i] === 'function') { + return args[i]; + } + } + return null; + } + function immediate(action) { + return function () { + var callback = getCallback(arguments); + return this.each(function () { + var el = $(this); + if (action === 'show') { + el.show().css('opacity', 1); + } else if (action === 'hide') { + el.hide().css('opacity', 0); + } + if (callback) { + callback.call(this); + } + }); + }; + } + $.fn.fadeIn = immediate('show'); + $.fn.fadeOut = immediate('hide'); + $.fn.fadeTo = function () { + var callback = getCallback(arguments); + var target = typeof arguments[1] === 'number' ? arguments[1] : 1; + return this.each(function () { + var el = $(this); + el.css('opacity', target); + if (target === 0) { + el.hide(); + } else { + el.show(); + } + if (callback) { + callback.call(this); + } + }); + }; + $.fn.fadeToggle = function () { + var callback = getCallback(arguments); + return this.each(function () { + var el = $(this); + var hidden = !el.is(':visible') || el.css('opacity') === '0'; + if (hidden) { + el.fadeIn(callback); + } else { + el.fadeOut(callback); + } + }); + }; + $.fn._noAnimationPatch = true; +})(window); var globalSettings={ version: {value: (typeof globalSettingsVersion!='undefined' && globalSettingsVersion!=null) ? globalSettingsVersion : 1, locked:false},