You are here

function theme_simple_editor in Kaltura 5

Same name and namespace in other branches
  1. 6 includes/kaltura.themeing.inc \theme_simple_editor()

File

includes/kaltura.themeing.inc, line 405

Code

function theme_simple_editor($theme_params, $no_refresh) {
  $javascript = '
  function onSimpleEditorBackClick(modified) {
    if (modified == 0) {
      setTimeout("window.top.kalturaCloseModalBox();", 0);
    } else {
    ';
  if ($no_refresh === TRUE) {
    $javascript .= 'setTimeout("window.top.kalturaCloseModalBox();", 0);';
  }
  else {
    $javascript .= 'setTimeout("window.top.kalturaRefreshTop();", 0);';
  }
  $javascript .= '
    }
    return;
  }

  function onSimpleEditorSaveClick(modified) {

  }
  ';
  $flash_embed = '
    <div id="divKalturaSe"></div>
    <script type="text/javascript">
      var kso = new SWFObject("' . $theme_params->swfUrl . '", "kalturaSe", "' . $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("divKalturaSe");
    </script>
  ';
  return theme("kaltura_modal", array(
    "javascript" => $javascript,
    "flashEmbed" => $flash_embed,
  ));
}