From 548e3576b9623c4ffba52186d963ec0c11a8578e Mon Sep 17 00:00:00 2001 From: Maikel Linke Date: Wed, 15 Apr 2015 17:13:10 +1000 Subject: [PATCH] textAngular editor for group description --- .../admin/enterprise_groups/enterprise_groups.js.coffee | 2 +- app/views/admin/enterprise_groups/_form_about.html.haml | 6 +++--- app/views/groups/show.html.haml | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/app/assets/javascripts/admin/enterprise_groups/enterprise_groups.js.coffee b/app/assets/javascripts/admin/enterprise_groups/enterprise_groups.js.coffee index e8e462d998..0ff8e4f515 100644 --- a/app/assets/javascripts/admin/enterprise_groups/enterprise_groups.js.coffee +++ b/app/assets/javascripts/admin/enterprise_groups/enterprise_groups.js.coffee @@ -1 +1 @@ -angular.module("admin.enterprise_groups", ["admin.side_menu", "admin.users"]) +angular.module("admin.enterprise_groups", ["admin.side_menu", "admin.users", "textAngular"]) diff --git a/app/views/admin/enterprise_groups/_form_about.html.haml b/app/views/admin/enterprise_groups/_form_about.html.haml index 60d7276094..a29fde22cd 100644 --- a/app/views/admin/enterprise_groups/_form_about.html.haml +++ b/app/views/admin/enterprise_groups/_form_about.html.haml @@ -1,6 +1,6 @@ %fieldset.alpha.no-border-bottom{ ng: { show: "menu.selected.name=='About'" } } %legend About = f.field_container :long_description do - = f.label :long_description - %br/ - = f.text_area :long_description + %text-angular{'id' => 'enterprise_group_long_description', 'name' => 'enterprise_group[long_description]', 'class' => 'text-angular', + 'ta-toolbar' => "[['h1','h2','h3','h4','p'],['bold','italics','underline','clear'],['insertLink']]"} + != @enterprise_group[:long_description] diff --git a/app/views/groups/show.html.haml b/app/views/groups/show.html.haml index 9bc40337a9..1bc965dfb3 100644 --- a/app/views/groups/show.html.haml +++ b/app/views/groups/show.html.haml @@ -40,7 +40,7 @@ active: "active(\'about\')", select: "select(\'about\')"} %h1 About Us - %p= @group.long_description + %p!= @group.long_description %tab{heading: 'Our producers', active: "active(\'producers\')",