Merged V2.1 to HEAD

6636: Temporary hack to fix build.  
   6637: Better handling of binary string bufs, disable link validation when poll interval is <= 0
   6638: Forgotten files for TXT to PDF transformer.
   6639: Fix for AWC-1541
   6641: Fix for WCM-792.
   6642: A little extra PropertyValue support for createNode, too.
   6643: Fix for WCM-791
   6644: Closure of AR-1528: Check concurrency handling of DuplicateChildNodeNameException
   6647: Fix WCM-794
   6648: WCM-656
   6650: Applied user supplied patch to fix AWC-1546 - Cannot mount AVM using CIFS on new alfresco installation.
   6651: Index tidy ups
   6654: Various minor updates for passthru authentication debugging and error handling.
   6657: Fix for WCM-799 (Some items selected for submission were not present)
   6659: Updated installers.
   6660: Partial fix to AWC-1524
   6661: Fix WCM-803
   6664: Including  hibernate-3.2.1.jar in $VIRTUAL_TOMCAT_HOME/server/lib/ 
   6665: adding an automated unit test for output path patterns.
   6668: Fixed to add shale-test-1.0.4.jar to Eclipse classpath (PHH oked)
   6681: Fixes WCM-811 - Lookup.getIndirectionPath() had a bit of a howler in it.
   6684: UncategorizedSQLException with the word 'deadlock' in the message is now cause for retrying a transaction.
   6691: Fix for WCM-813 (lock not removed when expiration date set and no workflow on web project)
   6696: Imporved SSO filters for SiteMinder etc + test filter
   6697: Support for scheduled import
   6699: Fix for the compliation target:  compile-benchmarkframework 
   6701: Fix for 1.6 JVMs (1.5 gets by with lucky ordering)


git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@6749 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Derek Hulley
2007-09-11 04:18:53 +00:00
parent f279d99d80
commit ac03bb5f8c
14 changed files with 486 additions and 728 deletions

View File

@@ -48,184 +48,42 @@ function alfresco_TinyMCE_urlconverter_callback(href, element, onsave)
return result;
}
function alfresco_TinyMCE_execcommand_callback(editor_id, elm, command, user_interface, value)
function alfresco_TinyMCE_file_browser_callback(field_name, url, type, win)
{
if (command == "mceLink")
{
// BEGIN COPIED FROM ADVANCED THEME editor_template_src.js
var inst = tinyMCE.getInstanceById(editor_id);
var doc = inst.getDoc();
var selectedText = (tinyMCE.isMSIE
? doc.selection.createRange().text
: inst.getSel().toString());
if (!tinyMCE.linkElement &&
tinyMCE.selectedElement.nodeName.toLowerCase() != "img" &&
selectedText.length <= 0)
{
return true;
}
var href = "", target = "", title = "", onclick = "", action = "insert", style_class = "";
if (tinyMCE.selectedElement.nodeName.toLowerCase() == "a")
{
tinyMCE.linkElement = tinyMCE.selectedElement;
}
// Is anchor not a link
if (tinyMCE.linkElement != null && tinyMCE.getAttrib(tinyMCE.linkElement, 'href') == "")
{
tinyMCE.linkElement = null;
}
if (tinyMCE.linkElement)
{
href = tinyMCE.getAttrib(tinyMCE.linkElement, 'href');
target = tinyMCE.getAttrib(tinyMCE.linkElement, 'target');
title = tinyMCE.getAttrib(tinyMCE.linkElement, 'title');
onclick = tinyMCE.getAttrib(tinyMCE.linkElement, 'onclick');
style_class = tinyMCE.getAttrib(tinyMCE.linkElement, 'class');
// Try old onclick to if copy/pasted content
if (onclick == "")
{
onclick = tinyMCE.getAttrib(tinyMCE.linkElement, 'onclick');
}
onclick = tinyMCE.cleanupEventStr(onclick);
href = eval(tinyMCE.settings['urlconverter_callback'] + "(href, tinyMCE.linkElement, true);");
// Use mce_href if defined
mceRealHref = tinyMCE.getAttrib(tinyMCE.linkElement, 'mce_href');
if (mceRealHref != "")
{
href = mceRealHref;
if (tinyMCE.getParam('convert_urls'))
{
href = eval(tinyMCE.settings['urlconverter_callback'] + "(href, tinyMCE.linkElement, true);");
}
}
action = "update";
}
var window_props = { file: alfresco.constants.WEBAPP_CONTEXT + "/jsp/wcm/tiny_mce_link_dialog.jsp",
width: 510 + tinyMCE.getLang('lang_insert_link_delta_width', 0),
height: 265 + tinyMCE.getLang('lang_insert_link_delta_height', 0) };
var dialog_props = { href: href,
target: target,
title: title,
onclick: onclick,
action: action,
className: style_class,
inline: "yes" };
tinyMCE.openWindow(window_props, dialog_props);
return true;
}
else if (command == "mceImage")
{
var src = "", alt = "", border = "", hspace = "", vspace = "", width = "", height = "", align = "",
title = "", onmouseover = "", onmouseout = "", action = "insert";
var img = tinyMCE.imgElement;
var inst = tinyMCE.getInstanceById(editor_id);
if (tinyMCE.selectedElement != null && tinyMCE.selectedElement.nodeName.toLowerCase() == "img")
{
img = tinyMCE.selectedElement;
tinyMCE.imgElement = img;
}
if (img)
{
// Is it a internal MCE visual aid image, then skip this one.
if (tinyMCE.getAttrib(img, 'name').indexOf('mce_') == 0)
{
return true;
}
src = tinyMCE.getAttrib(img, 'src');
alt = tinyMCE.getAttrib(img, 'alt');
// Try polling out the title
if (alt == "")
{
alt = tinyMCE.getAttrib(img, 'title');
}
// Fix width/height attributes if the styles is specified
if (tinyMCE.isGecko)
{
var w = img.style.width;
if (w != null && w.length != 0)
{
img.setAttribute("width", w);
}
var h = img.style.height;
if (h != null && h.length != 0)
{
img.setAttribute("height", h);
}
}
border = tinyMCE.getAttrib(img, 'border');
hspace = tinyMCE.getAttrib(img, 'hspace');
vspace = tinyMCE.getAttrib(img, 'vspace');
width = tinyMCE.getAttrib(img, 'width');
height = tinyMCE.getAttrib(img, 'height');
align = tinyMCE.getAttrib(img, 'align');
onmouseover = tinyMCE.getAttrib(img, 'onmouseover');
onmouseout = tinyMCE.getAttrib(img, 'onmouseout');
title = tinyMCE.getAttrib(img, 'title');
// Is realy specified?
if (tinyMCE.isMSIE)
{
width = img.attributes['width'].specified ? width : "";
height = img.attributes['height'].specified ? height : "";
}
//onmouseover = tinyMCE.getImageSrc(tinyMCE.cleanupEventStr(onmouseover));
//onmouseout = tinyMCE.getImageSrc(tinyMCE.cleanupEventStr(onmouseout));
src = eval(tinyMCE.settings['urlconverter_callback'] + "(src, img, true);");
// Use mce_src if defined
mceRealSrc = tinyMCE.getAttrib(img, 'mce_src');
if (mceRealSrc != "")
{
src = mceRealSrc;
if (tinyMCE.getParam('convert_urls'))
{
src = eval(tinyMCE.settings['urlconverter_callback'] + "(src, img, true);");
}
}
action = "update";
}
var window_props = { file: alfresco.constants.WEBAPP_CONTEXT + "/jsp/wcm/tiny_mce_image_dialog.jsp",
width: 510 + tinyMCE.getLang('lang_insert_image_delta_width', 0),
height: 265 + (tinyMCE.isMSIE ? 25 : 0) + tinyMCE.getLang('lang_insert_image_delta_height', 0) };
var dialog_props = { src: src,
alt: alt,
border: border,
hspace: hspace,
vspace: vspace,
width: width,
height: height,
align: align,
title: title,
onmouseover: onmouseover,
onmouseout: onmouseout,
action: action,
inline: "yes" };
tinyMCE.openWindow(window_props, dialog_props);
return true;
}
else
{
return false;
}
tinyMCE.importCSS(win.document, alfresco.constants.WEBAPP_CONTEXT + "/css/xforms.css");
var div = win.document.createElement("div");
div.style.width = "100%";
div.style.height = "100%";
div.style.backgroundColor = "white";
div.style.position = "absolute";
div.style.top = "0px";
div.style.left = "0px";
win.document.body.appendChild(div);
var pickerDiv = win.document.createElement("div");
pickerDiv.style.height = "100%";
pickerDiv.style.position = "relative";
div.appendChild(pickerDiv);
var picker = new alfresco.FilePickerWidget("alfFilePicker",
pickerDiv,
url,
false,
function(picker)
{
win.document.getElementById(field_name).value = picker.getValue();
picker.destroy();
div.parentNode.removeChild(div);
},
function()
{
picker.destroy();
div.parentNode.removeChild(div);
},
function(picker)
{
picker.node.style.height = div.offsetHeight + "px";
picker.node.style.width = div.offsetWidth + "px";
},
type == "image" ? ["wcm:avmcontent"] : [],
type == "image" ? ["image/*"] : []);
picker._navigateToNode(url);
}