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:
Kevin Roast
2007-12-05 15:59:28 +00:00
parent b39830a2bd
commit 64ab846e77
66 changed files with 13965 additions and 3 deletions

View File

@@ -0,0 +1,54 @@
var _currentDateForMonthView = new Date();
function setCurrentMonthView()
{
_currentDateForMonthView = new Date();
callEventRetrieverMonthView();
}
function addMonthsMonthView(n)
{
_currentDateForMonthView.setMonth(_currentDateForMonthView.getMonth() + n);
callEventRetrieverMonthView();
}
function addYearsMonthView(n)
{
_currentDateForMonthView.setFullYear(_currentDateForMonthView.getFullYear() + n);
callEventRetrieverMonthView();
}
var handleSuccessMonthView = function(o)
{
var response = o.responseText;
var _divMonthView = document.getElementById("divMonthView");
if (_divMonthView != null)
_divMonthView.innerHTML = response;
}
var handleFailureMonthView = function(o)
{
alert("Unable to retrieve, " + o.statusText);
}
var callbackMonthView =
{
success:handleSuccessMonthView,
failure:handleFailureMonthView,
argument: { foo:"foo", bar:"bar" }
};
function callEventRetrieverMonthView()
{
var _arrMonths = MonthsArray();
var month = _currentDateForMonthView.getMonth() + 1;
document.getElementById("spnCurrentDisplayMonthMonthView").innerHTML = _arrMonths[month-1] + ", " + _currentDateForMonthView.getFullYear();
var sUrl = getContextPath() + '/wcservice/calendar/RetrieveMonthEvents?';
var postData = "s=" + spaceRef + "&d=" + _currentDateForMonthView.getFullYear() + "/" + month + "/" + _currentDateForMonthView.getDate();
sUrl += postData;
var request = YAHOO.util.Connect.asyncRequest('GET', sUrl, callbackMonthView, null);
}
YAHOO.util.Event.addListener(window, "load", callEventRetrieverMonthView);