function globallink_menu_make_preview_link in GlobalLink Connect for Drupal 7.7
Function to create Preview link
1 call to globallink_menu_make_preview_link()
- globallink_menu_dashboard_form in globallink_menu/
globallink_menu_send.inc - Builds form to create a menu submission.
File
- globallink_menu/
globallink_menu_send.inc, line 477
Code
function globallink_menu_make_preview_link($link_text = '', $id) {
drupal_add_js(array(
'my-modal-style' => array(
'modalSize' => array(
'type' => 'fixed',
'width' => 700,
'height' => 400,
),
'animation' => 'fadeIn',
),
), 'setting');
// Set a default value if no text in supplied.
if (empty($link_text)) {
$link_text = 'Preview';
}
return '<div id="preview-link" style="text-align: left;" title="Click to Preview">' . l($link_text, 'admin/globallink-translations/dashboard/menu/preview/' . $id . '/nojs', array(
'attributes' => array(
'class' => 'ctools-use-modal ctools-modal-my-modal-style',
),
)) . '</div>';
}