1. Список говнокодов пользователя JudiCortes

    Всего: 1

  2. PHP / Говнокод #25630

    +2

    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
    switch (field.type) {
        case 'checkbox':
        case 'notification':	
            if (field.type == 'notification') {
                fieldData.element.addClass('field-notification');
                $('<span class="notification-button" data-action="notification">').text('Принять').appendTo(body).on(
                    'click', function () {
    		    _class.wrapper.removeClass('notification');
    		    _class.notification.wrapper.removeClass('notification-active');
    		    _class.fields[index - 1].changeStatus();
    		    $Mediator.fire({
                            name: 'active:filter',
    			target: _class.fields[0].filter
    		    });
                });
            }
        break;
    }

    Вдруг SWITCH не сработал)

    JudiCortes, 21 Мая 2019

    Комментарии (39)