Sha256: 1aae26d1ae385a2911a546c29ae464f859bba19adc01d0f9f7495c0d7abecb27

Contents?: true

Size: 1.78 KB

Versions: 1

Compression:

Stored size: 1.78 KB

Contents

#display-new-shorts.container
#shorterner-index
  %table.table.table-striped.tablesorter
    %thead
      %tr
        %th Shortened
        %th Full Url
        %th.visible-desktop Set Count
        %th.hidden-phone Click Count
        %th.visible-desktop TTL
        %th.hidden-phone Max Clicks
    %tbody
      - @shortens.each do |short|
        %tr
          %td= short['shortened']
          %td.shortenWhenSmall
            %a{href: short['url']}= short['url'][0..50] + ((short['url'].length > 50) ? '...' : '')
          %td.visible-desktop= short['set_count']
          %td.hidden-phone= short['click_count'] || 0
          %td.visible-desktop= ttl_display(short['expire'])
          %td.hidden-phone= short['max-clicks'] || "∞"
          %td
            %a{href: "/api/v1/delete?id=#{short['shortened']}", class: 'delete-button'}
              %img{src: '/images/delete-icon.png', alt: 'delete!', width: '16px', height: '16px'}
          %td
            %a.btn.btn-mini{rel: 'popover', 'data-content' => "<input type='text' value='#{base_url}/#{short['shortened']}' data-id='#{short['shortened']}'></input>", 'data-placement' => 'top', 'data-trigger' => 'manual', 'data-toggle' => 'button', 'data-title' => "CMD/CTL + C to Copy", 'data-id'=> short['shortened']} Copy
            -#clippy("#{base_url}/#{short['shortened']}")

:javascript

  //$('a[rel="popover"]').popover({trigger: 'focus', placement: 'top'});
  $('a[rel="popover"]').popover();
  $('a.btn-small').button();
  $('a[rel="popover"]').live("click", function(){
    $(this).popover("toggle");
    $(".popover-content p input:text").select();
  });
  $(".popover-content p input:text").live('copy cut', function(){
    $('a[rel="popover"]').popover('hide');
    var sel = 'a[data-id="'+$(this).data('id')+'"]';
    $(sel).button('toggle');
  });

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
short-0.6.0 lib/shortener/server/views/index.haml