Created
February 14, 2011 22:06
-
-
Save jessebeach/826666 to your computer and use it in GitHub Desktop.
lines 917 - 953
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Add preview controls | |
$form['displays']['preview_controls'] = array( | |
'#theme_wrappers' => array('container'), | |
); | |
// Add a checkbox controlling whether or not this display auto-previews. | |
$form['displays']['preview_controls']['live_preview'] = array( | |
'#type' => 'checkbox', | |
'#title' => t('Auto preview'), | |
'#default_value' => !variable_get('views_ui_disable_live_preview', 0), | |
); | |
$form['displays']['preview_controls']['form'] = array( | |
'#theme_wrappers' => array('container'), | |
'#attributes' => array('class' => array('arguments-preview')), | |
'#process' => array('ctools_dependent_process'), | |
'#dependency' => array('edit-displays-live-preview' => array(0)), | |
'#id' => 'preview-form', | |
); | |
$form['displays']['preview_controls']['form']['view_args'] = array( | |
'#type' => 'textfield', | |
'#title' => t('Arguments'), | |
'#description' => t('Separate arguments with a / as though they were a URL path.'), | |
'#id' => 'preview-args', | |
); | |
$form['displays']['preview_controls']['form']['button'] = array( | |
'#type' => 'submit', | |
'#value' => t('Preview'), | |
'#id' => 'preview-submit', | |
'#ajax' => array( | |
'callback' => 'views_ui_preview_callback', | |
'wrapper' => 'views-live-preview', | |
), | |
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment