Use gem bootstrap-wysihtml5 on textarea
This commit is contained in:
parent
3a76275058
commit
20a41ef172
8 changed files with 19 additions and 9 deletions
1
Gemfile
1
Gemfile
|
@ -75,6 +75,7 @@ gem 'mailjet'
|
||||||
gem "smart_listing"
|
gem "smart_listing"
|
||||||
|
|
||||||
gem 'css_splitter'
|
gem 'css_splitter'
|
||||||
|
gem 'bootstrap-wysihtml5-rails', '~> 0.3.3.8'
|
||||||
|
|
||||||
group :test do
|
group :test do
|
||||||
gem 'capybara'
|
gem 'capybara'
|
||||||
|
|
|
@ -64,6 +64,8 @@ GEM
|
||||||
bootstrap-sass (3.3.5)
|
bootstrap-sass (3.3.5)
|
||||||
autoprefixer-rails (>= 5.0.0.1)
|
autoprefixer-rails (>= 5.0.0.1)
|
||||||
sass (>= 3.2.19)
|
sass (>= 3.2.19)
|
||||||
|
bootstrap-wysihtml5-rails (0.3.3.8)
|
||||||
|
railties (>= 3.0)
|
||||||
builder (3.2.2)
|
builder (3.2.2)
|
||||||
byebug (5.0.0)
|
byebug (5.0.0)
|
||||||
columnize (= 0.9.0)
|
columnize (= 0.9.0)
|
||||||
|
@ -449,6 +451,7 @@ DEPENDENCIES
|
||||||
active_model_serializers
|
active_model_serializers
|
||||||
bootstrap-datepicker-rails
|
bootstrap-datepicker-rails
|
||||||
bootstrap-sass (~> 3.3.5)
|
bootstrap-sass (~> 3.3.5)
|
||||||
|
bootstrap-wysihtml5-rails (~> 0.3.3.8)
|
||||||
byebug
|
byebug
|
||||||
capybara
|
capybara
|
||||||
carrierwave
|
carrierwave
|
||||||
|
|
|
@ -27,6 +27,8 @@
|
||||||
//= require smart_listing
|
//= require smart_listing
|
||||||
//= require turf
|
//= require turf
|
||||||
//= require franceconnect
|
//= require franceconnect
|
||||||
|
//= require bootstrap-wysihtml5
|
||||||
|
//= require bootstrap-wysihtml5/locales/fr-FR
|
||||||
|
|
||||||
|
|
||||||
$(document).on('page:load', scroll_to);
|
$(document).on('page:load', scroll_to);
|
||||||
|
|
8
app/assets/javascripts/bootstrap_wysihtml5.js
vendored
Normal file
8
app/assets/javascripts/bootstrap_wysihtml5.js
vendored
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
$(document).ready(wysihtml5_active);
|
||||||
|
$(document).on('page:load', wysihtml5_active);
|
||||||
|
|
||||||
|
function wysihtml5_active (){
|
||||||
|
$('.wysihtml5').each(function(i, elem) {
|
||||||
|
$(elem).wysihtml5({ toolbar:{ "fa": true } });
|
||||||
|
});
|
||||||
|
}
|
|
@ -21,6 +21,7 @@
|
||||||
*/
|
*/
|
||||||
@import "bootstrap-sprockets";
|
@import "bootstrap-sprockets";
|
||||||
@import "bootstrap";
|
@import "bootstrap";
|
||||||
|
@import "bootstrap-wysihtml5/bootstrap3-wysihtml5";
|
||||||
|
|
||||||
body {
|
body {
|
||||||
background-color: rgb(255, 255, 255);
|
background-color: rgb(255, 255, 255);
|
||||||
|
|
|
@ -7,12 +7,7 @@
|
||||||
= @facade.dossier.procedure.libelle
|
= @facade.dossier.procedure.libelle
|
||||||
|
|
||||||
.description
|
.description
|
||||||
- begin
|
= @facade.dossier.description.html_safe
|
||||||
- @facade.dossier.description.split(/(?:\n\r?|\r\n?')/).each do |line|
|
|
||||||
= line
|
|
||||||
%br
|
|
||||||
- rescue
|
|
||||||
=''
|
|
||||||
|
|
||||||
- if @facade.dossier.mandataire_social && gestionnaire_signed_in?
|
- if @facade.dossier.mandataire_social && gestionnaire_signed_in?
|
||||||
.mandataire_social.text-success.center
|
.mandataire_social.text-success.center
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
.row
|
.row
|
||||||
.col-md-12
|
.col-md-12
|
||||||
%h4 Description de votre projet *
|
%h4 Description de votre projet *
|
||||||
= text_area_tag :description, @dossier.description, rows: '6', placeholder: 'Description du projet', class: 'form-control'
|
= text_area_tag :description, @dossier.description, rows: '6', placeholder: 'Description du projet', class: 'form-control wysihtml5'
|
||||||
|
|
||||||
#liste_champs
|
#liste_champs
|
||||||
-unless @champs.nil?
|
-unless @champs.nil?
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
.content#commentaires_flux{style:'width:100%;'}
|
.content#commentaires_flux{style:'width:100%;'}
|
||||||
%div#commentaire_new{style: 'width:80%; margin-left:auto; margin-right:auto'}
|
%div#commentaire_new{style: 'width:80%; margin-left:auto; margin-right:auto'}
|
||||||
= form_tag(url_for({ controller: 'commentaires', action: :create, dossier_id: @facade.dossier.id }), class: 'form-inline', method: 'POST') do
|
= form_tag(url_for({ controller: 'commentaires', action: :create, dossier_id: @facade.dossier.id }), class: 'form-inline', method: 'POST') do
|
||||||
%textarea.form-control{id: 'texte_commentaire', name: 'texte_commentaire', style: 'width: 100%; margin-bottom:2%', rows: '5', placeholder:"Dialoguer avec votre interlocuteur privilégié en charge de votre dossier."}
|
%textarea.form-control{id: 'texte_commentaire', class: 'wysihtml5', name: 'texte_commentaire', style: 'width: 100%; margin-bottom:2%', rows: '5', placeholder:"Dialoguer avec votre interlocuteur privilégié en charge de votre dossier."}
|
||||||
%input.form-control.btn.btn-success{:type => 'submit', :value => 'Poster', style: 'float:right'}
|
%input.form-control.btn.btn-success{:type => 'submit', :value => 'Poster', style: 'float:right'}
|
||||||
%br
|
%br
|
||||||
%br
|
%br
|
||||||
|
@ -14,5 +14,5 @@
|
||||||
=com.created_at_fr
|
=com.created_at_fr
|
||||||
%br
|
%br
|
||||||
.description#body
|
.description#body
|
||||||
=com.body
|
=com.body.html_safe
|
||||||
%br
|
%br
|
||||||
|
|
Loading…
Add table
Reference in a new issue