mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
Merged V3.1 to HEAD
13371: Fix for ETHREEOH-1371, ETHREEOH-1373, ETHREEOH-1374. Rule comparator now correctly deals with MLTEXT datatype fields such as name/title/description. 13372: Fix for ETHREEOH-1291. Fixes the general issue that "decodeURI()" should not be used to decode javascript encoded strings -unless- you specifically want to ignore certain characters, "unescape()" should be used instead. 13373: Fix for ETHREEOH-1284. Clean up of generated javascript for UIDataPager component - also moved to include file for performance and ease of modification. 13384: Fix for ETHREEOH-1459. Sweep through and clean up of the Edit Online/Offline editing and Checkin/Checkout process as per latest wireframes. A number of minor fixes to JSF action evaluators and related JSPs also. Icons updated as per wires. 13396: Fix for ETHREEOH-1424. Web-framework script connector now generates an Accept-Language header based on current user locale by default for remote calls. 13404: Missing paging controls added to task and workflow dialogs (part of ETHREEOH-1410). git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@13596 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -3,6 +3,7 @@
|
||||
// Gavin Cornwell 14-07-2006
|
||||
//
|
||||
|
||||
|
||||
// Global Alfresco namespace object
|
||||
if (typeof Alfresco == "undefined")
|
||||
{
|
||||
@@ -11,6 +12,22 @@ if (typeof Alfresco == "undefined")
|
||||
|
||||
var _alfContextPath = null;
|
||||
|
||||
|
||||
/**
|
||||
* window.onload function for r:page tag
|
||||
*/
|
||||
function onloadFunc(webdavUrl, cifsPath)
|
||||
{
|
||||
if (webdavUrl != "")
|
||||
{
|
||||
openDoc(webdavUrl);
|
||||
}
|
||||
if (cifsPath != "")
|
||||
{
|
||||
window.open(cifsPath, "_blank");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Error handler for errors caught in a catch block
|
||||
*/
|
||||
@@ -119,6 +136,89 @@ if (typeof document.ELEMENT_NODE == "undefined")
|
||||
document.NOTATION_NODE = 12;
|
||||
}
|
||||
|
||||
/**
|
||||
* UIDataPager functions
|
||||
*/
|
||||
function validateAndSubmit(e, pageInputId, formClientId, hiddenFieldName)
|
||||
{
|
||||
var keycode;
|
||||
if (window.event) keycode = window.event.keyCode;
|
||||
else if (e) keycode = e.which;
|
||||
if (keycode == 13)
|
||||
{
|
||||
var inputControl = $(pageInputId);
|
||||
var dialogForm = $('dialog');
|
||||
if (dialogForm)
|
||||
{
|
||||
dialogForm.removeProperty('onsubmit');
|
||||
}
|
||||
var val = parseInt(inputControl.value);
|
||||
if (val == 'NaN' || document.forms[formClientId][hiddenFieldName] == undefined)
|
||||
{
|
||||
inputControl.value = 1;
|
||||
//console.log("validateAndSubmit: reverting to 1");
|
||||
return false;
|
||||
}
|
||||
else
|
||||
{
|
||||
val = (val-1)>=0 ? val-1 : 0;
|
||||
document.forms[formClientId][hiddenFieldName].value = val;
|
||||
document.forms[formClientId].submit();
|
||||
//console.log("validateAndSubmit: submitting value: " + val);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
//console.log("validateAndSubmit: passthrough...");
|
||||
return true;
|
||||
}
|
||||
|
||||
function onlyDigitsIE6(e, pageInputId, formClientId, hiddenFieldName)
|
||||
{
|
||||
var keycode;
|
||||
if (window.event) keycode = window.event.keyCode;
|
||||
else if (e) keycode = e.which;
|
||||
var keychar = String.fromCharCode(keycode);
|
||||
var numcheck = /\d/;
|
||||
if (keycode == 13)
|
||||
{
|
||||
var inputControl = $(pageInputId);
|
||||
var val = parseInt(inputControl.value);
|
||||
if (val == 'NaN' || document.forms[formClientId][hiddenFieldName] == undefined)
|
||||
{
|
||||
inputControl.value = 1;
|
||||
return false;
|
||||
}
|
||||
else
|
||||
{
|
||||
val = (val-1)>=0 ? val-1 : 0;
|
||||
document.forms[formClientId][hiddenFieldName].value = val;
|
||||
document.forms[formClientId].submit();
|
||||
return false;
|
||||
}
|
||||
}
|
||||
var result = (keycode==13 || keycode==8 || keycode==37 || keycode==39 || keycode==46 || (keycode>=96 && keycode<=105) || numcheck.test(keychar));
|
||||
//console.log("onlyDigits: " + result);
|
||||
return result;
|
||||
}
|
||||
|
||||
function onlyDigits(e)
|
||||
{
|
||||
var keycode;
|
||||
if (window.event) keycode = window.event.keyCode;
|
||||
else if (e) keycode = e.which;
|
||||
var keychar = String.fromCharCode(keycode);
|
||||
var numcheck = /\d/;
|
||||
var dialogForm = $('dialog');
|
||||
if (dialogForm && keyCode == 13)
|
||||
{
|
||||
dialogForm.setProperty('onsubmit', 'return false;');
|
||||
}
|
||||
var result = (keycode==13 || keycode==8 || keycode==37 || keycode==39 || keycode==46 || (keycode>=96 && keycode<=105) || numcheck.test(keychar));
|
||||
//console.log("onlyDigits: " + result);
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Alfresco Utility libraries
|
||||
*/
|
||||
|
Reference in New Issue
Block a user