mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
- Fixes for links management UI in IE git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@6067 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
67 lines
1.7 KiB
JavaScript
67 lines
1.7 KiB
JavaScript
Alfresco.LinkValidationMonitor = function()
|
|
{
|
|
this.url = getContextPath() + '/ajax/invoke/LinkValidationProgressBean.getStatus';
|
|
}
|
|
|
|
Alfresco.LinkValidationMonitor.prototype =
|
|
{
|
|
url: null,
|
|
retrieveLinkValidationStatus: function()
|
|
{
|
|
YAHOO.util.Connect.asyncRequest('GET', this.url,
|
|
{
|
|
success: this.processResults,
|
|
failure: this.handleError,
|
|
scope: this
|
|
},
|
|
null);
|
|
},
|
|
processResults: function(ajaxResponse)
|
|
{
|
|
var xml = ajaxResponse.responseXML.documentElement;
|
|
var finished = xml.getAttribute('finished');
|
|
var fileCount = xml.getAttribute('file-count');
|
|
var linkCount = xml.getAttribute('link-count');
|
|
|
|
var fileCountElem = document.getElementById('file-count');
|
|
if (fileCountElem != null)
|
|
{
|
|
fileCountElem.innerHTML = fileCount;
|
|
}
|
|
var linkCountElem = document.getElementById('link-count');
|
|
if (linkCountElem != null)
|
|
{
|
|
linkCountElem.innerHTML = linkCount;
|
|
}
|
|
|
|
if (finished == 'true')
|
|
{
|
|
var linkOnclick = document.getElementById('validation-callback-link').onclick;
|
|
linkOnclick();
|
|
}
|
|
else
|
|
{
|
|
setTimeout('Alfresco.linkMonitor.retrieveLinkValidationStatus()', Alfresco.linkMonitorPollFreq*1000);
|
|
}
|
|
},
|
|
handleError: function(ajaxResponse)
|
|
{
|
|
handleErrorYahoo(ajaxResponse.status + ' ' + ajaxResponse.statusText);
|
|
}
|
|
}
|
|
|
|
Alfresco.initLinkValidationMonitor = function()
|
|
{
|
|
Alfresco.linkMonitor = new Alfresco.LinkValidationMonitor();
|
|
Alfresco.linkMonitor.retrieveLinkValidationStatus();
|
|
}
|
|
|
|
Alfresco.linkMonitor = null;
|
|
YAHOO.util.Event.on(window, "load", Alfresco.initLinkValidationMonitor);
|
|
|
|
|
|
|
|
|
|
|
|
|