1. PHP / Говнокод #9634

    +29

    1. 01
    2. 02
    3. 03
    4. 04
    5. 05
    6. 06
    7. 07
    8. 08
    9. 09
    10. 10
    11. 11
    12. 12
    13. 13
    14. 14
    15. 15
    16. 16
    17. 17
    18. 18
    19. 19
    20. 20
    function multiselect_widget_init() {
      if(variable_get('multiselect_widget_activeselall', false) === true && (variable_get('multiselect_widget_url', 'all') == 'all' || strstr($_GET['q'], variable_get('multiselect_widget_url', 'all')) !== FALSE)){
        drupal_add_css(drupal_get_path('module', 'multiselect_widget') .'/multiselect/jquery.multiSelect.css');
        drupal_add_js(drupal_get_path('module', 'multiselect_widget') .'/multiselect/jquery.multiSelect.js');
        drupal_add_js(drupal_get_path('module', 'multiselect_widget') .'/multiselect/customSelect.jquery.js');
        drupal_add_js(drupal_get_path('module', 'multiselect_widget') .'/multiselect/jquery.bgiframe.min.js');
        $selectall = variable_get('multiselect_widget_selall', 'false') ? 'true' : 'false';
        drupal_add_js("$(document).ready(function(){
            $('#edit-tid').customStyle();
      });", 'inline');
        drupal_add_js("$(document).ready( function() {
            $('".variable_get('multiselect_widget_selector', '.views-exposed-form select[multiple="multiple"]')."').multiSelect({
            selectAll: ".$selectall.",
            selectAllText: '".variable_get('multiselect_widget_selalltext', 'Выбрать все')."',
            noneSelected: '".variable_get('multiselect_widget_notselectedtext', 'Ничего не выбрано')."',
            oneOrMoreSelected: '".variable_get('multiselect_widget_countselected', 'Выбрано: %')."'
      });
      });", 'inline');
      }
    }

    не мог не удержаться...

    Запостил: brainstorm, 10 Марта 2012

    Комментарии (1) RSS

    Добавить комментарий