plaquettes & js
This commit is contained in:
parent
c33f7583c1
commit
1b51e7287c
13
Gemfile.lock
13
Gemfile.lock
@ -40,12 +40,6 @@ GEM
|
|||||||
bcrypt-ruby (3.0.1)
|
bcrypt-ruby (3.0.1)
|
||||||
builder (3.1.4)
|
builder (3.1.4)
|
||||||
cancan (1.6.10)
|
cancan (1.6.10)
|
||||||
capistrano (2.15.5)
|
|
||||||
highline
|
|
||||||
net-scp (>= 1.0.0)
|
|
||||||
net-sftp (>= 2.0.0)
|
|
||||||
net-ssh (>= 2.0.14)
|
|
||||||
net-ssh-gateway (>= 1.1.0)
|
|
||||||
carrierwave (0.9.0)
|
carrierwave (0.9.0)
|
||||||
activemodel (>= 3.2.0)
|
activemodel (>= 3.2.0)
|
||||||
activesupport (>= 3.2.0)
|
activesupport (>= 3.2.0)
|
||||||
@ -115,13 +109,6 @@ GEM
|
|||||||
minitest (4.7.5)
|
minitest (4.7.5)
|
||||||
multi_json (1.9.2)
|
multi_json (1.9.2)
|
||||||
mysql2 (0.3.15)
|
mysql2 (0.3.15)
|
||||||
net-scp (1.1.2)
|
|
||||||
net-ssh (>= 2.6.5)
|
|
||||||
net-sftp (2.1.2)
|
|
||||||
net-ssh (>= 2.6.5)
|
|
||||||
net-ssh (2.8.0)
|
|
||||||
net-ssh-gateway (1.2.0)
|
|
||||||
net-ssh (>= 2.6.5)
|
|
||||||
nokogiri (1.6.1)
|
nokogiri (1.6.1)
|
||||||
mini_portile (~> 0.5.0)
|
mini_portile (~> 0.5.0)
|
||||||
non-stupid-digest-assets (1.0.4)
|
non-stupid-digest-assets (1.0.4)
|
||||||
|
@ -1,41 +0,0 @@
|
|||||||
|
|
||||||
|
|
||||||
$('.article_row .show_details').live "click", ->
|
|
||||||
url = $(this).attr("href")+".html"
|
|
||||||
|
|
||||||
$(this).closest(".article_row").addClass('active')
|
|
||||||
$('#article_detail').load url, ->
|
|
||||||
|
|
||||||
$("#article_detail").show().delay(1).css
|
|
||||||
"-webkit-transition-duration": "0.8s"
|
|
||||||
"-moz-transition-duration": "0.8s"
|
|
||||||
"margin-right": "0px"
|
|
||||||
|
|
||||||
|
|
||||||
$("#article_index_slide").show().delay(1).css
|
|
||||||
"-webkit-transition-duration": "0.8s"
|
|
||||||
"-moz-transition-duration": "0.8s"
|
|
||||||
"margin-left": "-110%"
|
|
||||||
"margin-right": "110%"
|
|
||||||
false
|
|
||||||
|
|
||||||
$('#article_detail .hide').live "click", ->
|
|
||||||
$("#article_detail #content_types_draggables").hide();
|
|
||||||
|
|
||||||
$("#article_index_slide").show().delay(1).css
|
|
||||||
"-webkit-transition-duration": "0.8s"
|
|
||||||
"-moz-transition-duration": "0.8s"
|
|
||||||
"margin-left": "0%"
|
|
||||||
"margin-right": "0%"
|
|
||||||
|
|
||||||
|
|
||||||
$("#article_detail").css(
|
|
||||||
"-webkit-transition-duration": "0.8s"
|
|
||||||
"-moz-transition-duration": "0.8s"
|
|
||||||
"margin-right": "-110%").delay(800).queue ->
|
|
||||||
$("#article_detail").html("").clearQueue()
|
|
||||||
false
|
|
||||||
|
|
||||||
|
|
||||||
false
|
|
||||||
|
|
@ -44,8 +44,8 @@ function init_note_upload_fields(note_id){
|
|||||||
|
|
||||||
$(document).ready(function () {
|
$(document).ready(function () {
|
||||||
|
|
||||||
$(".note .add_files").live("click",function(){
|
$("body").on("click", ".note .add_files",function(){
|
||||||
alert('test');
|
|
||||||
$(this).next('input').click();
|
$(this).next('input').click();
|
||||||
return false;
|
return false;
|
||||||
});
|
});
|
||||||
|
@ -34,11 +34,29 @@ test_question = (question) ->
|
|||||||
return rep
|
return rep
|
||||||
|
|
||||||
|
|
||||||
|
(($) ->
|
||||||
|
$.fn.nodoubletapzoom = ->
|
||||||
|
$(this).bind "touchstart", preventZoom = (e) ->
|
||||||
|
t2 = e.timeStamp
|
||||||
|
t1 = $(this).data("lastTouch") or t2
|
||||||
|
dt = t2 - t1
|
||||||
|
fingers = e.originalEvent.touches.length
|
||||||
|
$(this).data "lastTouch", t2
|
||||||
|
return if not dt or dt > 500 or fingers > 1 # not double-tap
|
||||||
|
e.preventDefault() # double tap - prevent the zoom
|
||||||
|
# also synthesize click events we just swallowed up
|
||||||
|
$(this).trigger("click").trigger "click"
|
||||||
|
return
|
||||||
|
|
||||||
|
return
|
||||||
|
|
||||||
|
return
|
||||||
|
) jQuery
|
||||||
|
|
||||||
$ ->
|
$ ->
|
||||||
$(".quizz_img").hide()
|
$("body").nodoubletapzoom()
|
||||||
$("a.def").click ->
|
|
||||||
|
$("body").on "click","a.def", ->
|
||||||
|
|
||||||
r = "<div class='pane_hover'><h3>"+$(this).html()+"</h3><p>"+$(this).data("def")+"</p></div>"
|
r = "<div class='pane_hover'><h3>"+$(this).html()+"</h3><p>"+$(this).data("def")+"</p></div>"
|
||||||
|
|
||||||
@ -64,7 +82,7 @@ $ ->
|
|||||||
$(this).remove();
|
$(this).remove();
|
||||||
|
|
||||||
|
|
||||||
$("a.img").click ->
|
$("body").on "click", "a.img",->
|
||||||
|
|
||||||
r = "<div class='pane_hover'><img src='"+$(this).data("img")+"' />"
|
r = "<div class='pane_hover'><img src='"+$(this).data("img")+"' />"
|
||||||
|
|
||||||
@ -79,19 +97,19 @@ $ ->
|
|||||||
|
|
||||||
$("body").append(r)
|
$("body").append(r)
|
||||||
|
|
||||||
$(".pane_hover").click ->
|
$(".pane_hover").on "click", ->
|
||||||
$(this).remove();
|
$(this).remove();
|
||||||
|
|
||||||
$(".page").hide()
|
$(".page").hide()
|
||||||
$(".page:first").show()
|
$(".page:first").show()
|
||||||
|
|
||||||
$(".prev_slide").click ->
|
$("body").on "click",".prev_slide", ->
|
||||||
|
|
||||||
$(this).closest(".page").hide()
|
$(this).closest(".page").hide()
|
||||||
$(this).closest(".page").prev(".page").show()
|
$(this).closest(".page").prev(".page").show()
|
||||||
|
|
||||||
|
|
||||||
$(".next_slide").click ->
|
$("body").on "click",".next_slide", ->
|
||||||
|
|
||||||
$(this).closest(".page").hide()
|
$(this).closest(".page").hide()
|
||||||
$(this).closest(".page").next(".page").show()
|
$(this).closest(".page").next(".page").show()
|
||||||
@ -109,32 +127,7 @@ $ ->
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
$(".quizz").each ->
|
|
||||||
|
|
||||||
$(this).find("input").change ->
|
|
||||||
test_question($(this).closest(".question"))
|
|
||||||
|
|
||||||
|
|
||||||
$(this).find(".fail, .success").hide()
|
|
||||||
|
|
||||||
$(this).find(".question").hide()
|
|
||||||
$(this).find(".question:first").show()
|
|
||||||
|
|
||||||
$(this).find(".prev").click ->
|
|
||||||
test_question($(this).closest(".question"))
|
|
||||||
$(this).closest(".question").hide()
|
|
||||||
$(this).closest(".question").prev(".question").show()
|
|
||||||
|
|
||||||
$(this).find(".next").click ->
|
|
||||||
if test_question($(this).closest(".question")) == true
|
|
||||||
|
|
||||||
$(this).closest(".question").fadeOut(0)
|
|
||||||
$(this).closest(".question").next(".question").fadeIn(0)
|
|
||||||
|
|
||||||
|
|
||||||
$(this).find(".check").click ->
|
|
||||||
test_question($(this).closest(".question"))
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -261,93 +254,28 @@ initialize_vie_sol = () ->
|
|||||||
$(".t_sortable").closest(".animaux_sol").html archive
|
$(".t_sortable").closest(".animaux_sol").html archive
|
||||||
initialize_vie_sol()
|
initialize_vie_sol()
|
||||||
|
|
||||||
|
initialize_jeu_1 = ->
|
||||||
|
|
||||||
|
$(".sortable_quizz").each ->
|
||||||
|
|
||||||
|
element = $(this)
|
||||||
|
|
||||||
$(document).ready ->
|
|
||||||
|
|
||||||
|
|
||||||
intialize_arbre()
|
|
||||||
|
|
||||||
initialize_vie_sol()
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
intialize_places_jeu2()
|
|
||||||
intialize_places_jeu()
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
intialize_puzzle()
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#$.backstretch(["/assets/plaquettes/fond.jpg"]);
|
|
||||||
initialize_jeu_1 = ->
|
|
||||||
|
|
||||||
$(".sortable_quizz").each ->
|
|
||||||
|
|
||||||
element = $(this)
|
|
||||||
|
|
||||||
html = element.find(".sortable").html()
|
|
||||||
element.find(".sortable").sortable
|
|
||||||
stop: () ->
|
|
||||||
win = true
|
|
||||||
i = 0
|
|
||||||
element.find("img").each ->
|
|
||||||
i = i + 1
|
|
||||||
win = false unless i is $(this).data("order")
|
|
||||||
|
|
||||||
if win is true
|
|
||||||
element.find(".win").show()
|
|
||||||
element.find(".loose").hide()
|
|
||||||
|
|
||||||
|
|
||||||
element.find(".sortable").disableSelection()
|
|
||||||
|
|
||||||
|
|
||||||
element.find(".reset").click ->
|
|
||||||
element.find(".sortable").html html
|
|
||||||
element.find(".sortable").sortable "refresh"
|
|
||||||
element.find(".win").hide()
|
|
||||||
element.find(".loose").hide()
|
|
||||||
|
|
||||||
initialize_jeu_2 = ->
|
|
||||||
element = $("#insectes_jeu_2")
|
|
||||||
html = element.find(".sortable").html()
|
html = element.find(".sortable").html()
|
||||||
element.find(".receptable").sortable
|
element.find(".sortable").sortable
|
||||||
connectWith: ".labels,.receptable"
|
stop: () ->
|
||||||
items: ".label"
|
win = true
|
||||||
tolerance: "pointer"
|
i = 0
|
||||||
receive: (event, ui) ->
|
element.find("img").each ->
|
||||||
if $(this).children().length > 1
|
i = i + 1
|
||||||
child = $(this).children().not(ui.item)[0]
|
win = false unless i is $(this).data("order")
|
||||||
element.find(".labels").append child
|
|
||||||
|
|
||||||
element.find(".receptable ul").disableSelection()
|
if win is true
|
||||||
element.find(".labels").sortable
|
element.find(".win").show()
|
||||||
connectWith: ".receptable"
|
element.find(".loose").hide()
|
||||||
tolerance: "pointer"
|
|
||||||
items: ".label"
|
|
||||||
receive: (event, ui) ->
|
element.find(".sortable").disableSelection()
|
||||||
ui.item.attr "style", ""
|
|
||||||
|
|
||||||
element.find(".labels").disableSelection()
|
|
||||||
element.find(".verif").bind "click", ->
|
|
||||||
win = true
|
|
||||||
i = 0
|
|
||||||
element.find("img").each ->
|
|
||||||
i = i + 1
|
|
||||||
win = false unless i is $(this).data("order")
|
|
||||||
|
|
||||||
if win is true
|
|
||||||
element.find(".win").show()
|
|
||||||
element.find(".loose").hide()
|
|
||||||
else
|
|
||||||
element.find(".win").hide()
|
|
||||||
element.find(".loose").show()
|
|
||||||
|
|
||||||
element.find(".reset").click ->
|
element.find(".reset").click ->
|
||||||
element.find(".sortable").html html
|
element.find(".sortable").html html
|
||||||
@ -355,5 +283,99 @@ $(document).ready ->
|
|||||||
element.find(".win").hide()
|
element.find(".win").hide()
|
||||||
element.find(".loose").hide()
|
element.find(".loose").hide()
|
||||||
|
|
||||||
initialize_jeu_1()
|
initialize_jeu_2 = ->
|
||||||
initialize_jeu_2()
|
element = $("#insectes_jeu_2")
|
||||||
|
html = element.find(".sortable").html()
|
||||||
|
element.find(".receptable").sortable
|
||||||
|
connectWith: ".labels,.receptable"
|
||||||
|
items: ".label"
|
||||||
|
tolerance: "pointer"
|
||||||
|
receive: (event, ui) ->
|
||||||
|
if $(this).children().length > 1
|
||||||
|
child = $(this).children().not(ui.item)[0]
|
||||||
|
element.find(".labels").append child
|
||||||
|
|
||||||
|
element.find(".receptable ul").disableSelection()
|
||||||
|
element.find(".labels").sortable
|
||||||
|
connectWith: ".receptable"
|
||||||
|
tolerance: "pointer"
|
||||||
|
items: ".label"
|
||||||
|
receive: (event, ui) ->
|
||||||
|
ui.item.attr "style", ""
|
||||||
|
|
||||||
|
element.find(".labels").disableSelection()
|
||||||
|
element.find(".verif").bind "click", ->
|
||||||
|
win = true
|
||||||
|
i = 0
|
||||||
|
element.find("img").each ->
|
||||||
|
i = i + 1
|
||||||
|
win = false unless i is $(this).data("order")
|
||||||
|
|
||||||
|
if win is true
|
||||||
|
element.find(".win").show()
|
||||||
|
element.find(".loose").hide()
|
||||||
|
else
|
||||||
|
element.find(".win").hide()
|
||||||
|
element.find(".loose").show()
|
||||||
|
|
||||||
|
element.find(".reset").click ->
|
||||||
|
element.find(".sortable").html html
|
||||||
|
element.find(".sortable").sortable "refresh"
|
||||||
|
element.find(".win").hide()
|
||||||
|
element.find(".loose").hide()
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
$(document).ready ->
|
||||||
|
|
||||||
|
|
||||||
|
initialize_plaquette = ->
|
||||||
|
intialize_arbre()
|
||||||
|
initialize_vie_sol()
|
||||||
|
intialize_places_jeu2()
|
||||||
|
intialize_places_jeu()
|
||||||
|
intialize_puzzle()
|
||||||
|
initialize_jeu_1()
|
||||||
|
initialize_jeu_2()
|
||||||
|
|
||||||
|
$(".quizz_img").hide()
|
||||||
|
|
||||||
|
$(".quizz").each ->
|
||||||
|
$(this).find(".prev").click ->
|
||||||
|
test_question($(this).closest(".question"))
|
||||||
|
$(this).closest(".question").hide()
|
||||||
|
$(this).closest(".question").prev(".question").show()
|
||||||
|
|
||||||
|
$(this).find(".next").on "click", ->
|
||||||
|
if test_question($(this).closest(".question")) == true
|
||||||
|
|
||||||
|
$(this).closest(".question").fadeOut(0)
|
||||||
|
$(this).closest(".question").next(".question").fadeIn(0)
|
||||||
|
|
||||||
|
$(this).find("input").change ->
|
||||||
|
test_question($(this).closest(".question"))
|
||||||
|
|
||||||
|
$(this).find(".fail, .success").hide()
|
||||||
|
|
||||||
|
$(this).find(".question").hide()
|
||||||
|
$(this).find(".question:first").show()
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
archive_plaquette = $("body").html()
|
||||||
|
|
||||||
|
|
||||||
|
initialize_plaquette()
|
||||||
|
|
||||||
|
$("body").on "click",".restart_plaquette", ->
|
||||||
|
$("body").html(archive_plaquette)
|
||||||
|
|
||||||
|
initialize_plaquette()
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -60,8 +60,8 @@ text-align:center !important;
|
|||||||
|
|
||||||
color:white;
|
color:white;
|
||||||
font-size:30px;
|
font-size:30px;
|
||||||
padding:10px 20px;
|
padding:20px 30px;
|
||||||
background:rgba(0,0,0,0.9);
|
background:rgba(0,0,0,0.2);
|
||||||
position:absolute;
|
position:absolute;
|
||||||
bottom:10px;
|
bottom:10px;
|
||||||
cursor:pointer;
|
cursor:pointer;
|
||||||
@ -71,15 +71,16 @@ text-align:right;
|
|||||||
}
|
}
|
||||||
|
|
||||||
.next_slide{
|
.next_slide{
|
||||||
|
padding-right:23px;
|
||||||
border-radius:30px 0px 0px 0px;
|
border-radius:50px 0px 0px 0px;
|
||||||
bottom:0px;
|
bottom:0px;
|
||||||
right:0px;
|
right:0px;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.prev_slide{
|
.prev_slide{
|
||||||
border-radius:0px 30px 0px 0px;
|
padding-left:23px;
|
||||||
|
border-radius:0px 50px 0px 0px;
|
||||||
text-align:left;
|
text-align:left;
|
||||||
bottom:0px;
|
bottom:0px;
|
||||||
left:0px;
|
left:0px;
|
||||||
@ -172,7 +173,8 @@ padding:1em;
|
|||||||
|
|
||||||
.quizz{
|
.quizz{
|
||||||
.quizz_answer{
|
.quizz_answer{
|
||||||
margin:1em 0;
|
margin:1.8em 0;
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
label{
|
label{
|
||||||
@ -189,8 +191,8 @@ input[type="radio"] {
|
|||||||
input[type="radio"] + label {
|
input[type="radio"] + label {
|
||||||
position:relative;
|
position:relative;
|
||||||
padding: 0 0 0 25px;
|
padding: 0 0 0 25px;
|
||||||
font-size: 20px;
|
font-size: 25px;
|
||||||
line-height: 20px;
|
line-height: 25px;
|
||||||
}
|
}
|
||||||
input[type="radio"] + label:before {
|
input[type="radio"] + label:before {
|
||||||
content:"";
|
content:"";
|
||||||
@ -218,9 +220,17 @@ p{
|
|||||||
text-align:left;
|
text-align:left;
|
||||||
}
|
}
|
||||||
*{
|
*{
|
||||||
font-size:1.2em !important;
|
font-size:25px !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.quizz_img p, .quizz_ill p{
|
||||||
|
|
||||||
|
font-size:20px !important;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
h3{
|
h3{
|
||||||
font-size:1.7em !important;
|
font-size:1.7em !important;
|
||||||
line-height:1.3em;
|
line-height:1.3em;
|
||||||
@ -564,4 +574,25 @@ height:100% !important;
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ul{
|
||||||
|
|
||||||
|
li{
|
||||||
|
padding:0.3em;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
.page_jardins{
|
||||||
|
li{
|
||||||
|
padding:0.1em;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -10,11 +10,11 @@
|
|||||||
<meta charset="utf-8">
|
<meta charset="utf-8">
|
||||||
<meta name="apple-mobile-web-app-capable" content="yes">
|
<meta name="apple-mobile-web-app-capable" content="yes">
|
||||||
|
|
||||||
<link rel="apple-touch-icon" href="/apple-icon.png" />
|
<link rel="apple-touch-icon" href="/apple-iconp.png" />
|
||||||
|
|
||||||
<link rel="icon" type="image/png" href="/apple-icon.png" />
|
<link rel="icon" type="image/png" href="/apple-iconp.png" />
|
||||||
<link rel="icon" href="/favicon.ico" />
|
<link rel="icon" href="/faviconp.ico" />
|
||||||
<link rel="shortcut icon" href="/favicon.ico">
|
<link rel="shortcut icon" href="/faviconp.ico">
|
||||||
|
|
||||||
%body
|
%body
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
|
|
||||||
.page
|
.page.page_jardins
|
||||||
.content{:style => "width:500px;box-sizing:border-box;padding:1em;font-size:0.99em;"}
|
.content{:style => "width:500px;box-sizing:border-box;padding:1em;font-size:0.99em;"}
|
||||||
%div{:style => "font-size:1.30em;"}
|
%div{:style => "font-size:1.30em;"}
|
||||||
%h1 Un jardin et son compost
|
%h1 Un jardin et son compost
|
||||||
|
@ -16,7 +16,7 @@
|
|||||||
%p Nous remercions également l'entreprise Nicolas Bally pour la confection de toute l’application.
|
%p Nous remercions également l'entreprise Nicolas Bally pour la confection de toute l’application.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -26,4 +26,8 @@
|
|||||||
=image_tag "plaquettes/logos/logo_leader.jpg"
|
=image_tag "plaquettes/logos/logo_leader.jpg"
|
||||||
=image_tag "plaquettes/logos/logo_CAPV.jpg"
|
=image_tag "plaquettes/logos/logo_CAPV.jpg"
|
||||||
=image_tag "plaquettes/logos/logo_nb.png"
|
=image_tag "plaquettes/logos/logo_nb.png"
|
||||||
|
|
||||||
|
%center
|
||||||
|
.restart_plaquette.btn
|
||||||
|
Remettre à zero
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
CACHE MANIFEST
|
CACHE MANIFEST
|
||||||
|
|
||||||
# version6
|
#version10
|
||||||
|
|
||||||
CACHE:
|
CACHE:
|
||||||
/plaquettes/index.html
|
/plaquettes/index.html
|
||||||
@ -113,8 +113,8 @@ CACHE:
|
|||||||
/assets/plaquettes/jardin/piege.jpg
|
/assets/plaquettes/jardin/piege.jpg
|
||||||
/assets/plaquettes/jardin/tas.jpg
|
/assets/plaquettes/jardin/tas.jpg
|
||||||
/assets/plaquettes/jardin/campagnol.jpg
|
/assets/plaquettes/jardin/campagnol.jpg
|
||||||
/apple-icon.png
|
/apple-iconp.png
|
||||||
/favicon.ico
|
/faviconp.ico
|
||||||
|
|
||||||
FALLBACK:
|
FALLBACK:
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user