Version 4.2.0

This commit is contained in:
Neo committed 2025-12-19 05:44:59 -08:00
1 parent 0dc2aee5ed
commit 96997ddd8e
2074 files changed
+125454 -55780

No files matched your search

+382 -16
View File
@@ -1,8 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<javascript app="calendar">
<file javascript_app="calendar" javascript_location="front" javascript_path="controllers/browse" javascript_name="ips.browse.main.js" javascript_type="controller" javascript_version="101099" javascript_position="1000050"><![CDATA[/**
* IPS Community Suite 4
* (c) 2013 Invision Power Services - http://www.invisionpower.com
<file javascript_app="calendar" javascript_location="front" javascript_path="controllers/browse" javascript_name="ips.browse.main.js" javascript_type="controller" javascript_version="102002" javascript_position="1000050"><![CDATA[/**
* Invision Community
* (c) Invision Power Services, Inc. - https://www.invisioncommunity.com
*
* ips.browse.main.js - Calendar main browsing controller
*
@@ -112,9 +112,9 @@
}
});
}(jQuery, _));]]></file>
<file javascript_app="calendar" javascript_location="front" javascript_path="controllers/browse" javascript_name="ips.browse.monthView.js" javascript_type="controller" javascript_version="101099" javascript_position="1000050"><![CDATA[/**
* IPS Community Suite 4
* (c) 2013 Invision Power Services - http://www.invisionpower.com
<file javascript_app="calendar" javascript_location="front" javascript_path="controllers/browse" javascript_name="ips.browse.monthView.js" javascript_type="controller" javascript_version="102002" javascript_position="1000050"><![CDATA[/**
* Invision Community
* (c) Invision Power Services, Inc. - https://www.invisioncommunity.com
*
* ips.browse.monthView.js - Month view controller
*
@@ -254,9 +254,9 @@
}
});
}(jQuery, _));]]></file>
<file javascript_app="calendar" javascript_location="front" javascript_path="controllers/submit" javascript_name="ips.submit.dates.js" javascript_type="controller" javascript_version="101099" javascript_position="1000100"><![CDATA[/**
* IPS Community Suite 4
* (c) 2013 Invision Power Services - http://www.invisionpower.com
<file javascript_app="calendar" javascript_location="front" javascript_path="controllers/submit" javascript_name="ips.submit.dates.js" javascript_type="controller" javascript_version="102002" javascript_position="1000100"><![CDATA[/**
* Invision Community
* (c) Invision Power Services, Inc. - https://www.invisioncommunity.com
*
* ips.submit.dates.js - Helper for date selection enhancements
*
@@ -268,6 +268,8 @@
ips.controller.register('calendar.front.submit.dates', {
initialize: function () {
this._hasFocusedEventEnd = false;
this.on( 'click', '[data-action="updateTimezone"]', this.updateTimezone );
// Monitor focus in recurring event input fields and select appropriate radio button
@@ -275,26 +277,74 @@
this.on( 'focus', 'input[name="repeat_end_date"]', function(){ $('#event_repeat_end_ondate').prop('checked', true); } );
this.on( 'change', 'input, select', this.checkForSummaryChange );
this.on( 'change', 'input, select', this.setEndDate );
this.on( 'change', '#check_single_day, #check_all_day', this.toggleFields );
this.on( 'click', '#elRecurRemove', this.disableRecurring );
this.on( 'change', 'input[name="event_dates[start_date]"]', this.setEndDateOnStartChange );
this.on( 'change', '#event_end_date', this.setHasFocusedEventOnEndChange );
$( window ).on( 'resize', _.bind( this._resizeEndGrid, this ) );
this.on( 'click', '[data-action="updateRepeat"]', this.finishRepeat );
this._checkAndSetEventEndState();
this.setup();
},
/**
* Set the end date for single & all day event
* On page load check to see what the current state of the end date is. If its set lets just go ahead and ignore any start date changes
*
* @returns {void}
*/
setEndDate: function() {
var singleDay = this.scope.find('#check_single_day');
var allDay = this.scope.find('#check_all_day');
_checkAndSetEventEndState: function() {
var eventEndDate = $("#event_end_date");
var date = eventEndDate.val();
if( singleDay.is(':checked') && !allDay.is(':checked') ) {
this.scope.find('input[name="event_dates[end_date]"]').val( this.scope.find('input[name="event_dates[start_date]"]').val() )
if (!this._hasFocusedEventEnd && this._isValidEndDate(date)) {
this._hasFocusedEventEnd = true;
}
},
/**
* Is the date passed in a valid date?
*
* @param {date} date Date to check
* @returns {boolean}
*/
_isValidEndDate: function(date) {
var tempDate = new Date(date);
if(!isNaN(tempDate.getDate())) {
return true;
}
return false;
},
/**
* If the end field has changed from input go ahead and ignore any start date changes
*
* @returns {void}
*/
setHasFocusedEventOnEndChange: function() {
this._hasFocusedEventEnd = true;
},
/**
* Event handler, handles changes to the start date
*
* @returns {void}
*/
setEndDateOnStartChange: function() {
var isSameDay = $("#check_single_day").is(":checked");
var eventStartDate = $('input[name="event_dates[start_date]');
var eventEndDate = $("#event_end_date");
if(!isSameDay && !this._hasFocusedEventEnd) {
if( ips.utils.time.supportsHTMLDate() ) {
eventEndDate.val(eventStartDate.val());
}
}
},
@@ -614,6 +664,320 @@
}
});
}(jQuery, _));]]></file>
<file javascript_app="calendar" javascript_location="front" javascript_path="controllers/venue" javascript_name="ips.venue.main.js" javascript_type="controller" javascript_version="102002" javascript_position="1000150"><![CDATA[/**
* Invision Community
* (c) Invision Power Services, Inc. - https://www.invisioncommunity.com
*
* ips.venue.main.js - Venue main browsing controller
*
*/
;( function($, _, undefined){
"use strict";
ips.controller.register('calendar.front.venue.main', {
_ajaxObj: null,
initialize: function () {
this.on( 'click', '[data-action="changeView"]', this.changeView );
this.on( window, 'statechange', this.stateChange );
this.setup();
},
/**
* Controller setup method
*
* @returns {void}
*/
setup: function () {
History.pushState( { controller: 'venueView' }, document.title, window.location.href );
},
/**
* Changes the calendar view dynamically
*
* @param {event} e Event object
* @returns {void}
*/
changeView: function (e) {
e.preventDefault();
// Load the url via ajax instead
var self = this;
var title = $( e.currentTarget ).attr('title');
var url = $( e.currentTarget ).attr('href');
History.pushState( { controller: 'venueView' }, title, url );
},
/**
* Event handler for history state changes
*
* @param {event} e Event object
* @returns {void}
*/
stateChange: function () {
var state = History.getState();
if( _.isUndefined( state.data.controller ) || state.data.controller != 'venueView' ) {
return;
}
// Track page view
ips.utils.analytics.trackPageView( state.url );
this._updateView( state.url, state.title )
},
/**
* Loads a new view
*
* @param {string} url URL to load
* @param {string} title New browser title
* @returns {void}
*/
_updateView: function (url, title) {
var self = this;
if( this._ajaxObj && _.isFunction( this._ajaxObj.abort ) ){
this._ajaxObj.abort();
}
this._setLoading( true );
this._ajaxObj = ips.getAjax()( url, {
showLoading: true
} )
.done( function (response) {
console.log( response );
self.scope.html( response );
$( document ).trigger( 'contentChange', [ self.scope ] );
History.pushState( { controller: 'venueView' }, title, url );
})
.always( function () {
self._setLoading( false );
});
},
/**
* Toggles the loading state on the view
*
* @param {boolean} state Enable the loading state?
* @returns {void}
*/
_setLoading: function (state) {
if( state ){
this.scope.animate( { opacity: 0.6 }, 'fast' );
} else {
this.scope.animate( { opacity: 1 }, 'fast' );
}
}
});
}(jQuery, _));]]></file>
<file javascript_app="calendar" javascript_location="front" javascript_path="controllers/view" javascript_name="ips.view.reminderButton.js" javascript_type="controller" javascript_version="102002" javascript_position="1000200"><![CDATA[/**
* Invision Community
* (c) Invision Power Services, Inc. - https://www.invisioncommunity.com
*
* ips.calendar.reminderButton.js - Controller for event reminder button
*
* Author: Andrew Millne
*/
;( function($, _, undefined){
"use strict";
ips.controller.register('calendar.front.view.reminderButton', {
initialize: function () {
this.setup();
this.on( document, 'reminderItem', this.reminderItemChange );
},
setup: function () {
this._id = this.scope.attr('data-reminderID');
this._button = this.scope.find('[data-role="reminderButton"]');
},
/**
* Responds to events indicating the reminder status has changed
*
* @param {event} e Event object
* @param {object} data Event data object
* @returns {void}
*/
reminderItemChange: function (e, data) {
this._reloadButton();
},
/**
* Gets a new reminder button from the server and replaces the current one with the response
*
* @returns {void}
*/
_reloadButton: function () {
// Show button as loading
this._button.addClass('ipsFaded ipsFaded_more');
var self = this;
var pos = ips.utils.position.getElemPosition( this._button );
var dims = ips.utils.position.getElemDims( this._button );
this.scope.append( ips.templates.render('calendar.reminder.loading') );
// Adjust sizing
this.scope
.css({
position: 'relative'
})
.find('.ipsLoading')
.css({
width: dims.outerWidth + 'px',
height: dims.outerHeight + 'px',
top: 0,
left: 0,
position: 'absolute',
zIndex: ips.ui.zIndex()
});
// Load new contents
ips.getAjax()( ips.getSetting('baseURL') + 'index.php?app=calendar&module=calendar&controller=event&do=reminderButton', {
data: _.extend({
id: this._id
}, ( this.scope.attr('data-buttonType') ) ? { button_type: this.scope.attr('data-buttonType') } : {} )
})
.done( function (response) {
self.scope.html( response );
$( document ).trigger( 'contentChange', [ self.scope ] );
})
.fail( function () {
self._button.removeClass('ipsFaded ipsFaded_more');
})
.always( function () {
self.scope.find('.ipsLoading').remove();
});
}
});
}(jQuery, _));]]></file>
<file javascript_app="calendar" javascript_location="front" javascript_path="controllers/view" javascript_name="ips.view.reminderForm.js" javascript_type="controller" javascript_version="102002" javascript_position="1000200">/**
* Invision Community
* (c) Invision Power Services, Inc. - https://www.invisioncommunity.com
*
* ips.calendar.reminderButton.js - Controller for reminder button
*
* Author: Andrew Millne
*/
;( function($, _, undefined){
&quot;use strict&quot;;
ips.controller.register('calendar.front.view.reminderForm', {
initialize: function () {
this.on( 'submit', this.submitForm );
this.on( 'click', '[data-action=&quot;removereminder&quot;]', this.removereminder );
this.setup();
},
/**
* Setup method
*
* @returns {void}
*/
setup: function () {
},
/**
* Event handler for removing reminder
*
* @param {event} e Event object
* @returns {void}
*/
removereminder: function (e) {
e.preventDefault();
this._doRemindAction( $( e.currentTarget ).attr('href'), {}, true );
},
/**
* Event handler for submitting the reminder form
*
* @param {event} e Event object
* @returns {void}
*/
submitForm: function (e) {
e.preventDefault();
this._doRemindAction( this.scope.attr('action'), this.scope.serialize(), false );
},
/**
* Performs an ajax action.
*
* @param {string} url URL to call
* @param {object} data Object of data to include in the request
* @returns {void}
*/
_doRemindAction: function (url, data, removereminder ) {
var self = this;
var dims = ips.utils.position.getElemDims( this.scope.parent('div') );
// Set it to loading
this.scope
.hide()
.parent('div')
.css({
width: dims.outerWidth + 'px',
height: dims.outerHeight + 'px'
})
.addClass('ipsLoading');
// Update reminder preference via ajax
ips.getAjax()( url, {
data: data,
type: 'post'
})
.done( function (response, status, jqXHR) {
if( jqXHR.getAllResponseHeaders().indexOf('X-IPS-FormError: true') !== -1 || jqXHR.getAllResponseHeaders().indexOf('X-IPS-FormNoSubmit: true') !== -1 || jqXHR.getAllResponseHeaders().indexOf('x-ips-formerror: true') !== -1 || jqXHR.getAllResponseHeaders().indexOf('x-ips-formnosubmit: true') !== -1 ){
self.scope
.show()
.html( response )
.parent('div')
.removeClass('ipsLoading')
.css({
width: 'auto',
height: 'auto'
});
} else {
// Success, so trigger event to update button
self.trigger('reminderItem');
if( removereminder ) {
ips.ui.flashMsg.show(ips.getString('event_reminder_removed'));
}
else {
ips.ui.flashMsg.show(ips.getString('event_reminder_added'));
}
self.scope.parents('.ipsHovercard').remove();
}
})
.fail( function (jqXHR, textStatus, errorThrown) {
window.location = url;
})
.always( function () {
// If we're in a hovercard, remove it
});
}
});
}(jQuery, _));
</file>
<file javascript_app="calendar" javascript_location="front" javascript_path="templates" javascript_name="ips.calendar.templates.js" javascript_type="framework" javascript_version="102002" javascript_position="1000250"><![CDATA[/**
* Invision Community
* (c) Invision Power Services, Inc. - https://www.invisioncommunity.com
*/
/* REMINDER BUTTON LOADING */
ips.templates.set('calendar.reminder.loading', " \
<div class='ipsLoading ipsLoading_tiny'></div>\
");]]></file>
<order app="global" path="/dev/js//framework/">templates
common/ips.loader.js
common/ui
@@ -629,4 +993,6 @@ app.js</order>
<order app="global" path="/dev/js//library//jquery">jquery.js
jquery.history.js
jquery.transform.js</order>
<order app="global" path="/dev/js//library//linkify">linkify.min.js
linkify-jquery.min.js</order>
</javascript>