Sha256: a2b747abc6fd9b17c4e987f4cc4206fa96f821d0b5b50b9cd22c2506fa05dcbf

Contents?: true

Size: 1.11 KB

Versions: 1

Compression:

Stored size: 1.11 KB

Contents

javascript:
  // cancel enterkey event
  $(document).on('keypress', '[data-provide="typeahead"]', function(ev){
    if ((ev.which && ev.which === 13) || (ev.keyCode && ev.keyCode === 13)) {
      return false;
    } else {
      return true;
    }
  });
  // <a data-method="post"></a>
  $(document).on('click', 'a[data-method="post"], a[data-method="put"], a[data-method="delete"]', function() {
    var $link = $(this),
    href = $link.attr('href'),
    method = $link.data('method'),
    form = $('<form method="post" action="' + href + '"></form>'),
    metadata_input = '<input name="_method" value="' + method + '" type="hidden" />';

    if($link.attr("disabled")) {
      return false;
    }

    if($link.data("confirm")){
      if(!window.confirm('Really?'))
        return false;
    }

    form.hide().append(metadata_input).appendTo('body');
    form.submit();
    return false;
  });
- if FluentdServer::Config.file_storage
  javascript:
    $('#post_name').attr("disabled", "disabled");
    $('#post_body').attr("disabled", "disabled");
    $('#post_submit').addClass('disabled');
    $('#post_delete').addClass('disabled');

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
fluentd-server-0.3.2 views/_js.slim