Hi,
I am using the RadControl for SharePoint 2007. I would like to check the following things
I am using the RadControl for SharePoint 2007. I would like to check the following things
- Currently i am using a custom radEditor dialog to open a Form page and when closed this form, the values will be populated to the RadEditor. Is it possible to open a Form without using a RadEditor Dialog. If yes, how can we pass back the values from the form to the RadEditor ?
- Current are having two custom buttons to the RadEditor, these two buttons functionalities are added to the following js located in C:\Program Files\Common Files\Microsoft Shared\web server extensions\wpresources\RadEditorSharePoint\4.5.1.0__1f131a624888eeed\RadControls\Editor\Scripts\7_3_2\MOSSEditorTools.js. Is it possible to have these button functionality as a separate js file instead of touching the MossEditorTools.js. For your reference i have put below the code that we added in the js
var RadEditor1ClientObject = null;
RadEditorCommandList["AddNewVideo"] =
function CustomDialogCommand(commandName, editor, oTool)
{
RadEditor1ClientObject = editor;
editor.ShowDialog(
"/_layouts/Videos/Videos.aspx"
, null
, 1000
, 450
, CustomDialogCallback
, null
, "Add New Video");
};
function CustomDialogCallback(returnValue)
{
if (returnValue)
{
var flashContent ="<object codebase=\"http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701\""+
" type=\"application/x-oleobject\" height=\""+returnValue.height+"\" standby=\"Loading Microsoft® Windows® Media Player components...\""+
" width=\""+returnValue.width+"\" align=\"middle\" classid=\"CLSID:22D6F312-B0F6-11D0-94AB-0080C74C7E95\">"+
"<param name=\"FileName\" value=\"" + returnValue.url + "\">"+
"<param name=\"ShowStatusBar\" value=\"True\">"+
"<param name=\"DefaultFrame\" value=\"mainFrame\">"+
"<param name=\"autostart\" value=\"true\">" +
"<embed type=\"application/x-mplayer2\""+
" pluginspage = \"http://www.microsoft.com/Windows/MediaPlayer//""+
" src=\"" + returnValue.url + "\" align=\"middle\""+
" width="+returnValue.height+""+
" height="+returnValue.width+""+
" autostart=0"+
" showcontrols=0 >"+
"</embed>"+
"</object>";
var filterIE = RadEditor1ClientObject.FiltersManager.GetFilterByName("IEKeepObjectParamsFilter");
flashContent = (filterIE)?filterIE.GetDesignContent(flashContent):flashContent;
RadEditor1ClientObject.PasteHtml(flashContent);
}
}
function CustomDialogCallback(returnValue)
{
if (returnValue)
{
var flashContent ="<object codebase=\"http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701\""+
" type=\"application/x-oleobject\" height=\""+returnValue.height+"\" standby=\"Loading Microsoft® Windows® Media Player components...\""+
" width=\""+returnValue.width+"\" align=\"middle\" classid=\"CLSID:22D6F312-B0F6-11D0-94AB-0080C74C7E95\">"+
"<param name=\"FileName\" value=\"" + returnValue.url + "\">"+
"<param name=\"ShowStatusBar\" value=\"True\">"+
"<param name=\"DefaultFrame\" value=\"mainFrame\">"+
"<param name=\"autostart\" value=\"true\">" +
"<embed type=\"application/x-mplayer2\""+
" pluginspage = \"http://www.microsoft.com/Windows/MediaPlayer//""+
" src=\"" + returnValue.url + "\" align=\"middle\""+
" width="+returnValue.height+""+
" height="+returnValue.width+""+
" autostart=0"+
" showcontrols=0 >"+
"</embed>"+
"</object>";
var filterIE = RadEditor1ClientObject.FiltersManager.GetFilterByName("IEKeepObjectParamsFilter");
flashContent = (filterIE)?filterIE.GetDesignContent(flashContent):flashContent;
RadEditor1ClientObject.PasteHtml(flashContent);
}
}
RadEditorCommandList["AddExistingVideo"] =
function CustomDialogCommand(commandName, editor, oTool)
{
RadEditor1ClientObject = editor;
editor.ShowDialog(
"/_layouts/Videos/Search/SearchVideo.aspx?ValidOpener=True"
, null
, 1000
, 450
, CustomDialogAddExistingVideoCallback
, null
, "Add Existing Video");
};
function CustomDialogAddExistingVideoCallback(returnValue)
{
if (returnValue)
{
var flashContent ="<object codebase=\"http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701\""+
" type=\"application/x-oleobject\" height=\""+returnValue.height+"\" standby=\"Loading Microsoft® Windows® Media Player components...\""+
" width=\""+returnValue.width+"\" align=\"middle\" classid=\"CLSID:22D6F312-B0F6-11D0-94AB-0080C74C7E95\">"+
"<param name=\"FileName\" value=\"" + returnValue.url + "\">"+
"<param name=\"ShowStatusBar\" value=\"True\">"+
"<param name=\"DefaultFrame\" value=\"mainFrame\">"+
"<param name=\"autostart\" value=\"true\">" +
"<embed type=\"application/x-mplayer2\""+
" pluginspage = \"http://www.microsoft.com/Windows/MediaPlayer//""+
" src=\"" + returnValue.url + "\" align=\"middle\""+
" width="+returnValue.height+""+
" height="+returnValue.width+""+
" autostart=0"+
" showcontrols=0 >"+
"</embed>"+
"</object>";
var filterIE = RadEditor1ClientObject.FiltersManager.GetFilterByName("IEKeepObjectParamsFilter");
flashContent = (filterIE)?filterIE.GetDesignContent(flashContent):flashContent;
RadEditor1ClientObject.PasteHtml(flashContent);
}
}
Kindly Advise,
function CustomDialogCommand(commandName, editor, oTool)
{
RadEditor1ClientObject = editor;
editor.ShowDialog(
"/_layouts/Videos/Search/SearchVideo.aspx?ValidOpener=True"
, null
, 1000
, 450
, CustomDialogAddExistingVideoCallback
, null
, "Add Existing Video");
};
function CustomDialogAddExistingVideoCallback(returnValue)
{
if (returnValue)
{
var flashContent ="<object codebase=\"http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701\""+
" type=\"application/x-oleobject\" height=\""+returnValue.height+"\" standby=\"Loading Microsoft® Windows® Media Player components...\""+
" width=\""+returnValue.width+"\" align=\"middle\" classid=\"CLSID:22D6F312-B0F6-11D0-94AB-0080C74C7E95\">"+
"<param name=\"FileName\" value=\"" + returnValue.url + "\">"+
"<param name=\"ShowStatusBar\" value=\"True\">"+
"<param name=\"DefaultFrame\" value=\"mainFrame\">"+
"<param name=\"autostart\" value=\"true\">" +
"<embed type=\"application/x-mplayer2\""+
" pluginspage = \"http://www.microsoft.com/Windows/MediaPlayer//""+
" src=\"" + returnValue.url + "\" align=\"middle\""+
" width="+returnValue.height+""+
" height="+returnValue.width+""+
" autostart=0"+
" showcontrols=0 >"+
"</embed>"+
"</object>";
var filterIE = RadEditor1ClientObject.FiltersManager.GetFilterByName("IEKeepObjectParamsFilter");
flashContent = (filterIE)?filterIE.GetDesignContent(flashContent):flashContent;
RadEditor1ClientObject.PasteHtml(flashContent);
}
}
Kindly Advise,