Skip to content

Commit

Permalink
assign link to actions bar with button styling
Browse files Browse the repository at this point in the history
  • Loading branch information
Phill committed Apr 13, 2015
1 parent 0ede6c1 commit 9291882
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions assets/publish.link_preview.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,18 +21,21 @@
var text = elem.attr('data-text');

if (!!url) {
var link = $('<a />')
var li = $('<li />'),
link = $('<a />')
.text(text)
.attr('class', 'link-preview')
.attr('class', 'button drawer vertical-right')
.attr('href', url)
.attr('target', '_blank');

target.after(link);

li.append(link);

target.append(li);
}
};

var init = function () {
target = $('#context #breadcrumbs h2');
target = $('#context .actions');
return $(FIELD_CLASS).each(hookOne);
};

Expand Down

0 comments on commit 9291882

Please sign in to comment.