function theme_contribution_wizard_add in Kaltura 6
Same name and namespace in other branches
- 5 includes/kaltura.themeing.inc \theme_contribution_wizard_add()
File
- includes/
kaltura.themeing.inc, line 283
Code
function theme_contribution_wizard_add($theme_params, $navigate_back = TRUE) {
$goto_url = kaltura_cw_destination();
$javascript = '
var kshowId = -1;
var goto_url = "' . $goto_url . '";
var node_url = "' . ($theme_params->mix_id ? url("node/" . $theme_params->mix_id) : '') . '";
function onContributionWizardAfterAddEntry(obj) {
if (obj && obj.length > 0 && obj[0].kshowId)
kshowId = obj[0].kshowId;
}
function onContributionWizardClose(modified) {
if (modified == "0")';
$javascript .= $theme_params->mix_id ? 'setTimeout("SendTopToNodePage();", 0);' : $navigate_back ? 'setTimeout("window.top.history.back();", 0);' : 'setTimeout("window.top.kalturaCloseModalBox();",0);';
$javascript .= ' else ';
$javascript .= $theme_params->mix_id ? 'setTimeout("SendTopToNodePage();", 0);' : 'setTimeout("SendTopToEntriesPage();",0);';
$javascript .= '}';
$flash_embed = '
<div id="divKalturaCw"></div>
<script type="text/javascript">
var kso = new SWFObject("' . $theme_params->swfUrl . '", "kalturaCw", "' . $theme_params->width . '", "' . $theme_params->height . '", "9", "#000000");
kso.addParam("flashVars", "' . $theme_params->flashVarsStr . '");
kso.addParam("allowScriptAccess", "always");
kso.addParam("allowFullScreen", "TRUE");
kso.addParam("allowNetworking", "all");
kso.write("divKalturaCw");
</script>
';
return theme("kaltura_modal", array(
"javascript" => $javascript,
"flashEmbed" => $flash_embed,
));
}