function media_browser_js in D7 Media 7
Helper function to define browser javascript.
2 calls to media_browser_js()
- media_attach_browser_js in includes/
media.browser.inc - Attaches media browser javascript to an element.
- media_include_browser_js in wysiwyg_plugins/
media.inc - Prepares the page to be able to launch the media browser.
File
- includes/
media.browser.inc, line 279 - Media Browser page callback
Code
function media_browser_js() {
$settings = array(
'browserUrl' => url('media/browser', array(
'query' => array(
'render' => 'media-popup',
),
)),
'styleSelectorUrl' => url('media/-media_id-/format-form', array(
'query' => array(
'render' => 'media-popup',
),
)),
);
$js = array(
'library' => array(
array(
'media',
'media_browser',
),
),
'js' => array(
array(
'data' => array(
'media' => $settings,
),
'type' => 'setting',
),
),
);
return $js;
}