forked from rumblelabs/couchbase-squish
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Style short url and fix js logic t:40m
- Loading branch information
Will McNeilly
committed
Sep 16, 2011
1 parent
bc9bc6a
commit 0993317
Showing
3 changed files
with
39 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,6 @@ | ||
<div class="full-width squish-wrapper"> | ||
<div class="container"> | ||
<h3>Short Link</h3> | ||
<%= link_to short_url(@link), short_url(@link) %> | ||
<h3>Long Link</h3> | ||
<%= link_to @link.url, @link.url %> | ||
</div> | ||
<div class="short-link-container"> | ||
<label>Squished</label> | ||
<input type="text" onclick="this.focus();this.select()" readonly="readonly" value="<%= "#{short_url(@link)}" %>"/> | ||
</div> | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
$('.short-link-container').remove(); | ||
$('#new_link').after("<%= escape_javascript(render(:partial => "short_url")) %>"); | ||
$('.link-table').prepend("<%= escape_javascript(render(:partial => "link", :locals => { :link => @link })) %>") | ||
$('.link-table').prepend("<%= escape_javascript(render(:partial => "link", :locals => { :link => @link })) %>"); |