-
-
Notifications
You must be signed in to change notification settings - Fork 725
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2384 from luisramos0/open_new_tab
added directive to make links open in new tab by default in textangul…
- Loading branch information
Showing
4 changed files
with
10 additions
and
4 deletions.
There are no files selected for viewing
6 changes: 6 additions & 0 deletions
6
app/assets/javascripts/admin/utils/directives/textangular_links_target_blank.js.coffee
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 |
---|---|---|
@@ -0,0 +1,6 @@ | ||
angular.module("admin.utils").directive "textangularLinksTargetBlank", () -> | ||
restrict: 'CA' | ||
link: (scope, element, attrs) -> | ||
setTimeout -> | ||
element.find(".ta-editor").scope().defaultTagAttributes.a.target = '_blank' | ||
, 500 |
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,6 +1,6 @@ | ||
%fieldset.alpha.no-border-bottom{ ng: { show: "menu.selected.name=='about'" } } | ||
%legend {{menu.selected.label}} | ||
= f.field_container :long_description do | ||
%text-angular{'id' => 'enterprise_group_long_description', 'name' => 'enterprise_group[long_description]', 'class' => 'text-angular', | ||
%text-angular{'id' => 'enterprise_group_long_description', 'name' => 'enterprise_group[long_description]', 'class' => 'text-angular', "textangular-links-target-blank" => true, | ||
'ta-toolbar' => "[['h1','h2','h3','h4','p'],['bold','italics','underline','clear'],['insertLink']]"} | ||
!= @enterprise_group[:long_description] |
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