function _popups_test_popups in Popups API (Ajax Dialogs) 5
Same name and namespace in other branches
- 6.2 popups_test.module \_popups_test_popups()
- 6 popups_test.module \_popups_test_popups()
- 7 popups.module \_popups_test_popups()
1 string reference to '_popups_test_popups'
- popups_menu in ./
popups.module - hook_menu
File
- ./
popups.module, line 345 - popups.module
Code
function _popups_test_popups() {
popups_add_popups();
$output = '<ul id="test-list">';
$output .= '<li>' . l("Pop up entire local page.", 'popups/test/response', array(
'class' => 'popups',
));
$output .= "<li>" . l("Pop with options (href override).", 'popups/test/', array(
'class' => 'popups',
'on-popups-options' => '{href: "test/response"}',
));
$output .= "<li>" . l("Pop with options (width=200px).", 'popups/test/response', array(
'class' => 'popups',
'on-popups-options' => '{width: "200px"}',
));
$output .= "<li class=\"popups\" on-popups-options=\"{href: 'test/response'}\">Non-link popup</li>";
$output .= '<li>' . l("Add Page (hook).", 'node/add/page', array(
'id' => 'test-popup',
));
$output .= '<li>' . l("Add Page (attribute).", 'node/add/page', array(
'class' => 'popups-form',
'on-popups-options' => '{behaviors: ["Drupal.popups.collapsibleBehavior"]}',
), 'destination=popups/test');
$output .= '<li>' . l("Change Settings and reload page.", 'admin/settings/popups', array(
'class' => 'popups-form',
), 'destination=popups/test');
$output .= "<span id='response1'> (Auto Fade checkbox is: " . (variable_get('popups_popup_final_message', 1) ? 'on' : 'off') . ')</span>';
$output .= '<li>' . l("Change Settings and reload target.", 'admin/settings/popups', array(
'id' => 'reload-target',
), 'destination=popups/test');
$output .= "<span id='response2'> (Auto Fade checkbox is: " . (variable_get('popups_popup_final_message', 1) ? 'on' : 'off') . ')</span>';
popups_add_popups(array(
'#reload-target' => array(
'targetSelectors' => array(
'#response2',
),
),
));
$output .= '<li>' . l("Change Settings and cherry pick.", 'admin/settings/popups', array(
'id' => 'foo',
'class' => 'popups-form',
'on-popups-options' => '{targetSelectors: {"label": "#foo", "label:first": "#test-list li:first"}, forceReturn: "admin/settings/popups"}',
));
$output .= '<li>' . l("Pop up defined by popups_add_popups rule.", 'popups/test/response', array(
'id' => 'rule-test',
));
popups_add_popups(array(
'#rule-test' => array(
'width' => '300px',
),
));
$output .= '<li>' . l("Change Page Title.", 'popups/test/namechange', array(
'id' => 'title-test',
));
popups_add_popups(array(
'#title-test' => array(
'titleSelectors' => array(
'#page-title',
),
'forceReturn' => 'popups/test/namechange',
),
));
$output .= "</ul>";
return $output;
}