mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
Calendar View contribution integrated
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@7546 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
44
source/web/scripts/calendar/eventRetrieversDayView.js
Normal file
44
source/web/scripts/calendar/eventRetrieversDayView.js
Normal file
@@ -0,0 +1,44 @@
|
||||
var _currentDateForDayView = new Date();
|
||||
|
||||
var handleSuccessDayView = function(o)
|
||||
{
|
||||
var response = o.responseText;
|
||||
var _divDayView = document.getElementById("divDayView");
|
||||
if (_divDayView != null) {
|
||||
_divDayView.innerHTML = response;
|
||||
document.getElementById("spnCurrentDisplayDayDayView").innerHTML = _currentDateForDayView.toDateString();
|
||||
}
|
||||
}
|
||||
|
||||
var handleFailureDayView = function(o)
|
||||
{
|
||||
alert("Unable to retrieve, " + o.statusText);
|
||||
}
|
||||
|
||||
var callbackDayView =
|
||||
{
|
||||
success:handleSuccessDayView,
|
||||
failure:handleFailureDayView,
|
||||
argument: { foo:"foo", bar:"bar" }
|
||||
};
|
||||
|
||||
function callEventRetrieverDayView()
|
||||
{
|
||||
var sUrl = getContextPath() + '/wcservice/calendar/RetrieveDayEvents?';
|
||||
var month = _currentDateForDayView.getMonth() + 1;
|
||||
var postData = "s=" + spaceRef + "&d=" + _currentDateForDayView.getFullYear() + "/" + month + "/" + _currentDateForDayView.getDate();
|
||||
sUrl += postData;
|
||||
var request = YAHOO.util.Connect.asyncRequest('GET', sUrl, callbackDayView, null);
|
||||
}
|
||||
|
||||
|
||||
function callLoadersDayView(change)
|
||||
{
|
||||
if (isNaN(change)) change = 0;
|
||||
if (change == 0) _currentDateForDayView = new Date();
|
||||
_currentDateForDayView.setDate(_currentDateForDayView.getDate() + change);
|
||||
//document.getElementById("spnCurrentDisplayDayDayView").innerHTML = _currentDateForDayView.toDateString();
|
||||
callEventRetrieverDayView();
|
||||
}
|
||||
|
||||
YAHOO.util.Event.addListener(window, "load", callLoadersDayView);
|
Reference in New Issue
Block a user