Version 4.5.0
This commit is contained in:
1 parent
1a0c7fd3c2
commit
f79dcf067a
3791 files changed
+248032
-76372
No files matched your search
@@ -1,6 +1,6 @@
|
||||
<?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="103038" javascript_position="1000250"><![CDATA[/**
|
||||
<file javascript_app="calendar" javascript_location="front" javascript_path="controllers/browse" javascript_name="ips.browse.main.js" javascript_type="controller" javascript_version="105100" javascript_position="1000250"><![CDATA[/**
|
||||
* Invision Community
|
||||
* (c) Invision Power Services, Inc. - https://www.invisioncommunity.com
|
||||
*
|
||||
@@ -105,14 +105,14 @@
|
||||
*/
|
||||
_setLoading: function (state) {
|
||||
if( state ){
|
||||
this.scope.animate( { opacity: 0.6 }, 'fast' );
|
||||
this.scope.animate( { opacity: "0.6" }, 'fast' );
|
||||
} else {
|
||||
this.scope.animate( { opacity: 1 }, 'fast' );
|
||||
this.scope.animate( { opacity: "1" }, 'fast' );
|
||||
}
|
||||
}
|
||||
});
|
||||
}(jQuery, _));]]></file>
|
||||
<file javascript_app="calendar" javascript_location="front" javascript_path="controllers/browse" javascript_name="ips.browse.monthView.js" javascript_type="controller" javascript_version="103038" javascript_position="1000250"><![CDATA[/**
|
||||
<file javascript_app="calendar" javascript_location="front" javascript_path="controllers/browse" javascript_name="ips.browse.monthView.js" javascript_type="controller" javascript_version="105100" javascript_position="1000250"><![CDATA[/**
|
||||
* Invision Community
|
||||
* (c) Invision Power Services, Inc. - https://www.invisioncommunity.com
|
||||
*
|
||||
@@ -254,7 +254,7 @@
|
||||
}
|
||||
});
|
||||
}(jQuery, _));]]></file>
|
||||
<file javascript_app="calendar" javascript_location="front" javascript_path="controllers/submit" javascript_name="ips.submit.dates.js" javascript_type="controller" javascript_version="103038" javascript_position="1000100"><![CDATA[/**
|
||||
<file javascript_app="calendar" javascript_location="front" javascript_path="controllers/submit" javascript_name="ips.submit.dates.js" javascript_type="controller" javascript_version="105100" javascript_position="1000100"><![CDATA[/**
|
||||
* Invision Community
|
||||
* (c) Invision Power Services, Inc. - https://www.invisioncommunity.com
|
||||
*
|
||||
@@ -288,6 +288,7 @@
|
||||
this.on( 'click', '[data-action="updateRepeat"]', this.finishRepeat );
|
||||
|
||||
this._checkAndSetEventEndState();
|
||||
this.evaluateRecurringOptions();
|
||||
|
||||
this.setup();
|
||||
},
|
||||
@@ -330,6 +331,8 @@
|
||||
*/
|
||||
setHasFocusedEventOnEndChange: function() {
|
||||
this._hasFocusedEventEnd = true;
|
||||
|
||||
this.evaluateRecurringOptions();
|
||||
},
|
||||
|
||||
/**
|
||||
@@ -349,6 +352,124 @@
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* When an end date is set, adjust the available recurrence options
|
||||
*
|
||||
* @returns {void}
|
||||
*/
|
||||
evaluateRecurringOptions: function() {
|
||||
var startDate = $("#event_start_date").val();
|
||||
var endDate = $("#event_end_date").val();
|
||||
|
||||
if (!this._isValidEndDate(endDate) || $('#check_single_day').prop('checked') ) {
|
||||
// If the summary isn't visible, make sure the checkbox row is
|
||||
if( !$('#elRepeatRow_shown').is(':visible') )
|
||||
{
|
||||
$('#elRepeatRow_hidden').show();
|
||||
}
|
||||
|
||||
$('#elSelect_event_repeats').find('option').prop( 'disabled', false );
|
||||
|
||||
if( $('#elRepeatOn_back').length )
|
||||
{
|
||||
$('#elRepeatOn_back').attr( 'id', 'elRepeatOn' );
|
||||
}
|
||||
|
||||
if( $('#elSelect_event_repeats').val() == 'weekly' )
|
||||
{
|
||||
$('#elRepeatOn').show();
|
||||
}
|
||||
|
||||
this._updateSummary();
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
startDate = new Date( startDate );
|
||||
endDate = new Date( endDate );
|
||||
|
||||
var dayDifference = parseInt( ( endDate.getTime() - startDate.getTime() ) / ( 24 * 3600 * 1000 ) );
|
||||
|
||||
var currentlySelected = $('#elSelect_event_repeats').val();
|
||||
|
||||
// If the event spans more than one day, remove "daily" as a recurrence option and hide the "day of the week" options for monthly
|
||||
if( dayDifference > 1 ) {
|
||||
$('#elSelect_event_repeats').find('option[value="daily"]').prop( 'disabled', true );
|
||||
$('#elRepeatOn').hide();
|
||||
$('#elRepeatOn').attr( 'id', 'elRepeatOn_back' );
|
||||
|
||||
if( !currentlySelected || currentlySelected == 'daily' )
|
||||
{
|
||||
$('#elSelect_event_repeats').find('option[value="daily"]').prop( 'selected', false );
|
||||
$('#elSelect_event_repeats').find('option[value="weekly"]').prop( 'selected', true );
|
||||
currentlySelected = 'weekly';
|
||||
}
|
||||
} else {
|
||||
$('#elSelect_event_repeats').find('option[value="daily"]').prop( 'disabled', false );
|
||||
|
||||
if( $('#elRepeatOn_back').length )
|
||||
{
|
||||
$('#elRepeatOn_back').attr( 'id', 'elRepeatOn' );
|
||||
}
|
||||
|
||||
if( $('#elSelect_event_repeats').val() == 'weekly' )
|
||||
{
|
||||
$('#elRepeatOn').show();
|
||||
}
|
||||
}
|
||||
|
||||
// If the event spans more than one week, remove "daily" and "weekly" as recurrence options
|
||||
if( dayDifference > 7 ) {
|
||||
$('#elSelect_event_repeats').find('option[value="weekly"]').prop( 'disabled', true );
|
||||
|
||||
if( !currentlySelected || currentlySelected == 'weekly' )
|
||||
{
|
||||
$('#elSelect_event_repeats').find('option[value="weekly"]').prop( 'selected', false );
|
||||
$('#elSelect_event_repeats').find('option[value="monthly"]').prop( 'selected', true );
|
||||
currentlySelected = 'monthly';
|
||||
}
|
||||
} else {
|
||||
$('#elSelect_event_repeats').find('option[value="weekly"]').prop( 'disabled', false );
|
||||
}
|
||||
|
||||
// If the event spans more than one month, remove "daily", "weekly" and "monthly" recurrence options
|
||||
if(
|
||||
// If there's more than one month between the dates, then we block
|
||||
( endDate.getMonth() - startDate.getMonth() + ( 12 * ( endDate.getFullYear() - startDate.getFullYear() ) ) > 1 )
|
||||
||
|
||||
// Else if there is one month between the dates, then we check the end date is greater than the start date
|
||||
(
|
||||
endDate.getMonth() - startDate.getMonth() + ( 12 * ( endDate.getFullYear() - startDate.getFullYear() ) ) == 1 && endDate.getDate() > startDate.getDate()
|
||||
)
|
||||
) {
|
||||
$('#elSelect_event_repeats').find('option[value="monthly"]').prop( 'disabled', true );
|
||||
|
||||
if( !currentlySelected || currentlySelected == 'monthly' )
|
||||
{
|
||||
$('#elSelect_event_repeats').find('option[value="monthly"]').prop( 'selected', false );
|
||||
$('#elSelect_event_repeats').find('option[value="yearly"]').prop( 'selected', true );
|
||||
currentlySelected = 'yearly';
|
||||
}
|
||||
} else {
|
||||
$('#elSelect_event_repeats').find('option[value="monthly"]').prop( 'disabled', false );
|
||||
}
|
||||
|
||||
// If the event spans more than one year, remove ability for event to repeat entirely
|
||||
if( dayDifference > 365 )
|
||||
{
|
||||
$('#elSelect_event_repeats').find('option[value="yearly"]').prop( 'selected', false );
|
||||
this.disableRecurring();
|
||||
$('#elRepeatRow_hidden').hide();
|
||||
}
|
||||
else
|
||||
{
|
||||
$('#elRepeatRow_hidden').show();
|
||||
}
|
||||
|
||||
// And update the summary in case anything changed
|
||||
this._updateSummary();
|
||||
},
|
||||
|
||||
/**
|
||||
* Finish setting the options
|
||||
*
|
||||
@@ -478,7 +599,10 @@
|
||||
* @returns {void}
|
||||
*/
|
||||
disableRecurring: function (e) {
|
||||
e.preventDefault();
|
||||
if( e )
|
||||
{
|
||||
e.preventDefault();
|
||||
}
|
||||
|
||||
this.scope.find('#elRepeatCb').prop( 'checked', false );
|
||||
this._updateSummary();
|
||||
@@ -588,6 +712,9 @@
|
||||
return "<em class='ipsType_light ipsType_unbold ipsFaded'>" + ips.getString('select_time') + "</em>";
|
||||
}
|
||||
|
||||
var date = new Date('1970-01-01T' + time + 'Z');
|
||||
var time = date.toLocaleTimeString( $('html').attr('lang'), { hour: '2-digit', minute: '2-digit', timeZone: 'UTC' } );
|
||||
|
||||
return time;
|
||||
},
|
||||
|
||||
@@ -624,6 +751,7 @@
|
||||
var dateObj = ips.utils.time.getDateFromInput( this.scope.find('input[name="event_dates[repeat_end_date]"]') );
|
||||
|
||||
if( ips.utils.time.isValidDateObj( dateObj ) && dateObj.getFullYear() > 1900 ){ // > 1900 just so it doesn't start updating on year 19 etc.
|
||||
ips.utils.time.removeTimezone( dateObj );
|
||||
endString = ips.getString('until', { date: ips.utils.time.localeDateString( dateObj, { weekday: 'short', month: 'short', day: 'numeric', year: 'numeric' } ) } );
|
||||
}
|
||||
}
|
||||
@@ -699,7 +827,7 @@
|
||||
}
|
||||
});
|
||||
}(jQuery, _));]]></file>
|
||||
<file javascript_app="calendar" javascript_location="front" javascript_path="controllers/venue" javascript_name="ips.venue.main.js" javascript_type="controller" javascript_version="103038" javascript_position="1000200"><![CDATA[/**
|
||||
<file javascript_app="calendar" javascript_location="front" javascript_path="controllers/venue" javascript_name="ips.venue.main.js" javascript_type="controller" javascript_version="105100" javascript_position="1000200"><![CDATA[/**
|
||||
* Invision Community
|
||||
* (c) Invision Power Services, Inc. - https://www.invisioncommunity.com
|
||||
*
|
||||
@@ -804,14 +932,14 @@
|
||||
*/
|
||||
_setLoading: function (state) {
|
||||
if( state ){
|
||||
this.scope.animate( { opacity: 0.6 }, 'fast' );
|
||||
this.scope.animate( { opacity: "0.6" }, 'fast' );
|
||||
} else {
|
||||
this.scope.animate( { opacity: 1 }, 'fast' );
|
||||
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="103038" javascript_position="1000150"><![CDATA[/**
|
||||
<file javascript_app="calendar" javascript_location="front" javascript_path="controllers/view" javascript_name="ips.view.reminderButton.js" javascript_type="controller" javascript_version="105100" javascript_position="1000150"><![CDATA[/**
|
||||
* Invision Community
|
||||
* (c) Invision Power Services, Inc. - https://www.invisioncommunity.com
|
||||
*
|
||||
@@ -869,8 +997,8 @@
|
||||
.css({
|
||||
width: dims.outerWidth + 'px',
|
||||
height: dims.outerHeight + 'px',
|
||||
top: 0,
|
||||
left: 0,
|
||||
top: "0",
|
||||
left: "0",
|
||||
position: 'absolute',
|
||||
zIndex: ips.ui.zIndex()
|
||||
});
|
||||
@@ -894,7 +1022,7 @@
|
||||
}
|
||||
});
|
||||
}(jQuery, _));]]></file>
|
||||
<file javascript_app="calendar" javascript_location="front" javascript_path="controllers/view" javascript_name="ips.view.reminderForm.js" javascript_type="controller" javascript_version="103038" javascript_position="1000150">/**
|
||||
<file javascript_app="calendar" javascript_location="front" javascript_path="controllers/view" javascript_name="ips.view.reminderForm.js" javascript_type="controller" javascript_version="105100" javascript_position="1000150">/**
|
||||
* Invision Community
|
||||
* (c) Invision Power Services, Inc. - https://www.invisioncommunity.com
|
||||
*
|
||||
@@ -1004,7 +1132,7 @@
|
||||
});
|
||||
}(jQuery, _));
|
||||
</file>
|
||||
<file javascript_app="calendar" javascript_location="front" javascript_path="templates" javascript_name="ips.calendar.templates.js" javascript_type="framework" javascript_version="103038" javascript_position="1000050"><![CDATA[/**
|
||||
<file javascript_app="calendar" javascript_location="front" javascript_path="templates" javascript_name="ips.calendar.templates.js" javascript_type="framework" javascript_version="105100" javascript_position="1000050"><![CDATA[/**
|
||||
* Invision Community
|
||||
* (c) Invision Power Services, Inc. - https://www.invisioncommunity.com
|
||||
*/
|
||||
@@ -1023,9 +1151,11 @@ controllers</order>
|
||||
jquery
|
||||
mustache
|
||||
jstz
|
||||
IntersectionObserver
|
||||
Debug.js
|
||||
app.js</order>
|
||||
<order app="global" path="/dev/js//library//jquery">jquery.js
|
||||
jquery-migrate.js
|
||||
jquery.history.js
|
||||
jquery.transform.js</order>
|
||||
<order app="global" path="/dev/js//library//linkify">linkify.min.js
|
||||
|
||||
Reference in new issue
Block a user