ЙажаСценарий / Говнокод #12139 Ссылка на оригинал

0

  1. 1
  2. 2
  3. 3
  4. 4
  5. 5
  6. 6
  7. 7
  8. 8
  9. 9
  10. 10
  11. 11
  12. 12
  13. 13
  14. 14
  15. 15
  16. 16
  17. 17
  18. 18
  19. 19
  20. 20
  21. 21
  22. 22
  23. 23
  24. 24
  25. 25
  26. 26
  27. 27
if (
    event.which == $.ui.keyCode.COMMA ||
    event.which == $.ui.keyCode.ENTER ||
    (
        event.which == $.ui.keyCode.TAB &&
        that._tagInput.val() !== ''
    ) ||
    (
        event.which == $.ui.keyCode.SPACE &&
        that.options.allowSpaces !== true &&
        (
            $.trim(that._tagInput.val()).replace( /^s*/, '' ).charAt(0) != '"' ||
            (
                $.trim(that._tagInput.val()).charAt(0) == '"' &&
                $.trim(that._tagInput.val()).charAt($.trim(that._tagInput.val()).length - 1) == '"' &&
                $.trim(that._tagInput.val()).length - 1 !== 0
            )
        )
    )
) {
    event.preventDefault();
    that.createTag(that._cleanedInput());

    // The autocomplete doesn't close automatically when TAB is pressed.
    // So let's ensure that it closes.
    that._tagInput.autocomplete('close');
}

https://github.com/aehlke/tag-it/blob/master/js/tag-it.js#L183

Запостил: Sc0rp10 Sc0rp10, (Updated )

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

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

Где здесь C++, guest?!

    А не использовать ли нам bbcode?


    8