Révision 136a805a
Ajouté par Assos Assos il y a plus de 7 ans
drupal7/sites/all/modules/panels/plugins/display_renderers/panels_renderer_editor.class.php | ||
---|---|---|
61 | 61 |
ctools_add_js('display_editor', 'panels'); |
62 | 62 |
ctools_add_css('panels_dnd', 'panels'); |
63 | 63 |
ctools_add_css('panels_admin', 'panels'); |
64 |
drupal_add_library('system', 'ui'); |
|
64 | 65 |
} |
65 | 66 |
} |
66 | 67 |
|
... | ... | |
513 | 514 |
return $url; |
514 | 515 |
} |
515 | 516 |
|
517 |
/** |
|
518 |
* Get the Panels storage oparation for a given renderer AJAX method. |
|
519 |
* |
|
520 |
* @param string $method |
|
521 |
* The method name. |
|
522 |
* |
|
523 |
* @return string |
|
524 |
* The Panels storage op. |
|
525 |
*/ |
|
526 |
function get_panels_storage_op_for_ajax($method) { |
|
527 |
switch ($method) { |
|
528 |
case 'ajax_show': |
|
529 |
case 'ajax_hide': |
|
530 |
case 'ajax_select_content': |
|
531 |
case 'ajax_add_pane': |
|
532 |
case 'ajax_edit_pane': |
|
533 |
case 'ajax_panel_title': |
|
534 |
case 'ajax_cache_method': |
|
535 |
case 'ajax_cache_settings': |
|
536 |
case 'ajax_style_type': |
|
537 |
case 'ajax_style_settings': |
|
538 |
case 'ajax_pane_css': |
|
539 |
case 'ajax_lock': |
|
540 |
case 'ajax_access_settings': |
|
541 |
case 'ajax_access_add_test': |
|
542 |
case 'ajax_access_configure_test': |
|
543 |
case 'ajax_layout': |
|
544 |
case 'ajax_style': |
|
545 |
return 'update'; |
|
546 |
} |
|
547 |
|
|
548 |
return parent::get_panels_storage_op($method); |
|
549 |
} |
|
550 |
|
|
516 | 551 |
/** |
517 | 552 |
* AJAX command to show a pane. |
518 | 553 |
*/ |
... | ... | |
560 | 595 |
$output = theme('panels_add_content_modal', array('renderer' => $this, 'categories' => $categories, 'category' => $category, 'region' => $region)); |
561 | 596 |
} |
562 | 597 |
$this->commands[] = ctools_modal_command_display($title, $output); |
598 |
|
|
599 |
// Give keybord focus to the first item in the category we just loaded. |
|
600 |
if (!empty($category)) { |
|
601 |
$this->commands[] = ajax_command_invoke(".panels-add-content-modal .panels-section-columns :focusable:first", 'focus'); |
|
602 |
} |
|
563 | 603 |
} |
564 | 604 |
|
565 | 605 |
/** |
... | ... | |
1500 | 1540 |
} |
1501 | 1541 |
|
1502 | 1542 |
/** |
1503 |
* Handle the 'finish' click on teh add/edit pane form wizard.
|
|
1543 |
* Handle the 'finish' click on the add/edit pane form wizard.
|
|
1504 | 1544 |
* |
1505 | 1545 |
* All we need to do is set a flag so the return can handle adding |
1506 | 1546 |
* the pane. |
... | ... | |
1773 | 1813 |
'#type' => 'textfield', |
1774 | 1814 |
'#default_value' => isset($pane->css['css_id']) ? $pane->css['css_id'] : '', |
1775 | 1815 |
'#title' => t('CSS ID'), |
1776 |
'#description' => t('CSS ID to apply to this pane. This may be blank.'), |
|
1816 |
'#description' => t('CSS ID to apply to this pane. This may be blank. Keywords from context are allowed.'),
|
|
1777 | 1817 |
); |
1778 | 1818 |
$form['css_class'] = array( |
1779 | 1819 |
'#type' => 'textfield', |
1780 | 1820 |
'#default_value' => isset($pane->css['css_class']) ? $pane->css['css_class'] : '', |
1781 | 1821 |
'#title' => t('CSS class'), |
1782 |
'#description' => t('CSS class to apply to this pane. This may be blank.'), |
|
1822 |
'#description' => t('CSS class to apply to this pane. This may be blank. Keywords from context are allowed.'),
|
|
1783 | 1823 |
); |
1784 | 1824 |
|
1785 | 1825 |
$form['next'] = array( |
Formats disponibles : Unified diff
Weekly update of contrib modules