La gemme webshim est en place, offrant un calendrier pour les datetime pour les navigateurs ne le gérant pas eux même

This commit is contained in:
echarp 2014-07-16 23:48:24 +02:00
parent ffc825089b
commit 432a555b78
6 changed files with 50 additions and 42 deletions

View File

@ -50,6 +50,7 @@ gem 'haml-rails'
gem 'compass-rails' gem 'compass-rails'
gem 'modernizr-rails' gem 'modernizr-rails'
gem 'activeadmin', github: 'gregbell/active_admin' gem 'activeadmin', github: 'gregbell/active_admin'
gem 'webshims-rails'
gem 'devise' gem 'devise'
gem 'devise-i18n' gem 'devise-i18n'

View File

@ -285,6 +285,8 @@ GEM
warden (1.2.3) warden (1.2.3)
rack (>= 1.0) rack (>= 1.0)
webrick (1.3.1) webrick (1.3.1)
webshims-rails (1.14.4)
rails (> 3.1.0)
PLATFORMS PLATFORMS
ruby ruby
@ -326,3 +328,4 @@ DEPENDENCIES
turbolinks turbolinks
uglifier uglifier
webrick (>= 1.3.1) webrick (>= 1.3.1)
webshims-rails

View File

@ -1,19 +0,0 @@
// This is a manifest file that'll be compiled into application.js, which will include all the files
// listed below.
//
// Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts,
// or vendor/assets/javascripts of plugins, if any, can be referenced here using a relative path.
//
// It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the
// compiled file.
//
// Read Sprockets README (https://github.com/sstephenson/sprockets#sprockets-directives) for details
// about supported directives.
//
//= require jquery
//= require jquery_ujs
//= require tinymce-jquery
//= require jquery.turbolinks
//= require turbolinks
//= require modernizr
//= require_tree .

View File

@ -0,0 +1,45 @@
# This is a manifest file that'll be compiled into application.js, which will include all the files
# listed below.
#
# Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts,
# or vendor/assets/javascripts of plugins, if any, can be referenced here using a relative path.
#
# It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the
# compiled file.
#
# Read Sprockets README (https://github.com/sstephenson/sprockets#sprockets-directives) for details
# about supported directives.
#
#= require jquery
#= require jquery_ujs
#= require jquery.turbolinks
#= require turbolinks
#= require tinymce
#= require modernizr
#= require webshims/polyfiller
#= require_tree .
# Setup polyfills, so that older browsers can also take advanage of html5!
$.webshims.setOptions('basePath', '/assets/webshims/shims/')
$.webshims.polyfill('es5 forms forms-ext mediaelement')
$(document).ready ->
$(this).updatePolyfill()
tinyMCE.init {
selector: 'textarea',
language: 'fr_FR',
menubar : false,
toolbar: [
' bold italic strikethrough
| bullist numlist outdent indent
| alignleft aligncenter alignright alignjustify
| link media insertdatetime charmap table
| undo redo
| searchreplace spellchecker
| code visualblocks preview fullscreen'
],
plugins: 'lists, advlist, autolink, link, charmap, paste, print, preview,
table, fullscreen, searchreplace, media, insertdatetime, visualblocks,
visualchars, wordcount, contextmenu, code, spellchecker'
}

View File

@ -33,8 +33,7 @@
:markdown :markdown
#{t '.description_helper'} #{t '.description_helper'}
= f.label :description = f.label :description
= f.text_area :description, required: true, class: 'tinymce', rows: 29, cols: 80 = f.text_area :description, required: true, rows: 29, cols: 80
= tinymce language: 'fr_FR'
.field .field
= f.label :city = f.label :city

View File

@ -1,21 +0,0 @@
toolbar:
- undo redo | bold italic strikethrough | bullist numlist outdent indent | alignleft aligncenter alignright alignjustify | link media insertdatetime charmap table | searchreplace | code visualblocks preview fullscreen
plugins:
- lists
- advlist
- autolink
- link
- charmap
- paste
- print
- preview
- table
- fullscreen
- searchreplace
- media
- insertdatetime
- visualblocks
- visualchars
- wordcount
- contextmenu
- code