Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
O
OpenBoard
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lifo
Nicolas Ollinger
OpenBoard
Commits
f482d9f0
Commit
f482d9f0
authored
Jul 14, 2012
by
unknown
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
some widgets fixes
parent
332b5f8a
Changes
19
Hide whitespace changes
Inline
Side-by-side
Showing
19 changed files
with
135 additions
and
90 deletions
+135
-90
basic.css
...rces/library/interactivities/Ass images.wgt/css/basic.css
+3
-2
index.html
resources/library/interactivities/Ass images.wgt/index.html
+6
-5
script.js
...urces/library/interactivities/Ass images.wgt/js/script.js
+6
-3
basic.css
resources/library/interactivities/Ass sons.wgt/css/basic.css
+5
-3
script.js
resources/library/interactivities/Ass sons.wgt/js/script.js
+2
-1
index.html
resources/library/interactivities/Cat images.wgt/index.html
+2
-1
script.js
...urces/library/interactivities/Cat images.wgt/js/script.js
+8
-6
script.js
...ry/interactivities/Cat images.wgt/locales/fr/js/script.js
+3
-3
script.js
...ry/interactivities/Cat images.wgt/locales/ru/js/script.js
+1
-1
basic.css
resources/library/interactivities/Cat text.wgt/css/basic.css
+6
-2
script.js
resources/library/interactivities/Cat text.wgt/js/script.js
+2
-2
config.xml
resources/library/interactivities/Choisir.wgt/config.xml
+1
-1
basic.css
resources/library/interactivities/Choisir.wgt/css/basic.css
+16
-4
selQuestionApp.js
...tivities/Choisir.wgt/locales/fr/scripts/selQuestionApp.js
+16
-13
selQuestionApp.js
...tivities/Choisir.wgt/locales/ru/scripts/selQuestionApp.js
+16
-13
selQuestionApp.js
...ary/interactivities/Choisir.wgt/scripts/selQuestionApp.js
+16
-13
basic.css
resources/library/interactivities/Etudier.wgt/css/basic.css
+5
-0
script.js
resources/library/interactivities/Etudier.wgt/js/script.js
+11
-9
script.js
...brary/interactivities/Etudier.wgt/locales/fr/js/script.js
+10
-8
No files found.
resources/library/interactivities/Ass images.wgt/css/basic.css
View file @
f482d9f0
...
...
@@ -107,12 +107,13 @@ body{
.text_cont
{
width
:
80%
;
min-height
:
40px
;
max-height
:
60px
;
float
:
right
;
overflow
:
auto
;
background-color
:
#ccc
;
border-top-left-radius
:
10px
;
border-bottom-left-radius
:
10px
;
padding-left
:
10px
;
/*font-family: 'SFToontimeRegular';*/
padding-left
:
10px
;
}
.close_cont
{
...
...
resources/library/interactivities/Ass images.wgt/index.html
View file @
f482d9f0
...
...
@@ -5,7 +5,7 @@
<meta
http-equiv=
"Content-Type"
content=
"text/html; charset=UTF-8"
/>
<link
rel=
"stylesheet"
type=
"text/css"
href=
"css/basic.css"
/>
<link
rel=
"stylesheet"
href=
"css/fonts/Lobster/stylesheet.css"
>
<link
rel=
"stylesheet"
href=
"css/fonts/SF-Toontime/stylesheet.css"
>
<link
rel=
"stylesheet"
href=
"css/fonts/SF-Toontime/stylesheet.css"
>
<script
type=
"text/javascript"
src=
"js/jquery-1.6.2.min.js"
></script>
<script
type=
"text/javascript"
src=
"js/jquery-ui-1.8.9.custom.min.js"
></script>
<script
type=
"text/javascript"
src=
"js/script.js"
></script>
...
...
@@ -17,7 +17,8 @@
}
else
lang
=
"en"
;
if
(
lang
==
"en"
){
sankore
.
enableDropOnWidget
(
false
);
if
(
window
.
sankore
)
sankore
.
enableDropOnWidget
(
false
);
start
();
}
else
{
...
...
@@ -60,17 +61,17 @@
</td>
<td
class=
"b_top_right"
>
</td>
</tr>
<tr>
<td
class=
"b_center_left"
>
</td>
<td>
<div
id=
"data"
>
</div>
</td>
<td
class=
"b_center_right"
>
</td>
</tr>
<tr
style=
"height: 54px;"
>
<td
class=
"b_bottom_left"
>
</td>
<td
class=
"b_bottom_center"
>
</td>
...
...
resources/library/interactivities/Ass images.wgt/js/script.js
View file @
f482d9f0
...
...
@@ -57,7 +57,8 @@ function start(){
$
(
"#wgt_display, #wgt_edit"
).
click
(
function
(
event
){
if
(
this
.
id
==
"wgt_display"
){
if
(
!
$
(
this
).
hasClass
(
"selected"
)){
sankore
.
enableDropOnWidget
(
false
);
if
(
window
.
sankore
)
sankore
.
enableDropOnWidget
(
false
);
$
(
this
).
addClass
(
"selected"
);
$
(
"#wgt_edit"
).
removeClass
(
"selected"
);
$
(
".style_select"
).
css
(
"display"
,
"none"
);
...
...
@@ -160,7 +161,8 @@ function start(){
}
}
else
{
if
(
!
$
(
this
).
hasClass
(
"selected"
)){
sankore
.
enableDropOnWidget
(
true
);
if
(
window
.
sankore
)
sankore
.
enableDropOnWidget
(
true
);
$
(
this
).
addClass
(
"selected"
);
$
(
"#wgt_display"
).
removeClass
(
"selected"
);
$
(
".style_select"
).
css
(
"display"
,
"block"
);
...
...
@@ -307,7 +309,8 @@ function exportData(){
array_to_export
.
push
(
cont_obj
);
}
sankore
.
setPreference
(
"associer"
,
JSON
.
stringify
(
array_to_export
));
if
(
window
.
sankore
)
sankore
.
setPreference
(
"associer"
,
JSON
.
stringify
(
array_to_export
));
}
//import
...
...
resources/library/interactivities/Ass sons.wgt/css/basic.css
View file @
f482d9f0
...
...
@@ -107,6 +107,7 @@ body{
.text_cont
{
width
:
80%
;
min-height
:
40px
;
max-height
:
60px
;
float
:
right
;
background-color
:
#999
;
border-top-left-radius
:
20px
;
...
...
@@ -211,9 +212,10 @@ body{
}
.audio_desc
{
min-height
:
30px
;
margin
:
5px
0
;
float
:
left
;
width
:
73%
;
max-height
:
40px
;
overflow-y
:
auto
;
float
:
right
;
margin-left
:
20px
;
}
...
...
resources/library/interactivities/Ass sons.wgt/js/script.js
View file @
f482d9f0
...
...
@@ -353,7 +353,8 @@ function exportData(){
array_to_export
.
push
(
cont_obj
);
});
}
sankore
.
setPreference
(
"associer_sound"
,
JSON
.
stringify
(
array_to_export
));
if
(
window
.
sankore
)
sankore
.
setPreference
(
"associer_sound"
,
JSON
.
stringify
(
array_to_export
));
}
//import
...
...
resources/library/interactivities/Cat images.wgt/index.html
View file @
f482d9f0
...
...
@@ -17,7 +17,8 @@
}
else
lang
=
"en"
;
if
(
lang
==
"en"
){
sankore
.
enableDropOnWidget
(
false
);
if
(
window
.
sankore
)
sankore
.
enableDropOnWidget
(
false
);
start
();
}
else
{
...
...
resources/library/interactivities/Cat images.wgt/js/script.js
View file @
f482d9f0
...
...
@@ -61,7 +61,8 @@ function start(){
$
(
this
).
addClass
(
"selected"
);
$
(
"#wgt_edit"
).
removeClass
(
"selected"
);
$
(
".style_select"
).
css
(
"display"
,
"none"
);
sankore
.
enableDropOnWidget
(
false
);
if
(
window
.
sankore
)
sankore
.
enableDropOnWidget
(
false
);
$
(
".add_block"
).
remove
();
$
(
".cont"
).
each
(
function
(){
var
container
=
$
(
this
);
...
...
@@ -131,7 +132,8 @@ function start(){
$
(
this
).
addClass
(
"selected"
);
$
(
"#wgt_display"
).
removeClass
(
"selected"
);
$
(
".style_select"
).
css
(
"display"
,
"block"
);
sankore
.
enableDropOnWidget
(
true
);
if
(
window
.
sankore
)
sankore
.
enableDropOnWidget
(
true
);
$
(
".cont"
).
each
(
function
(){
var
container
=
$
(
this
);
...
...
@@ -208,7 +210,7 @@ function start(){
//export
function
exportData
(){
var
array_to_export
=
[];
if
(
$
(
"#edit"
).
hasClass
(
"selected"
)){
if
(
$
(
"#
wgt_
edit"
).
hasClass
(
"selected"
)){
$
(
".cont"
).
each
(
function
(){
var
cont_obj
=
new
Object
();
cont_obj
.
style
=
$
(
".style_select"
).
find
(
"option:selected"
).
val
();
...
...
@@ -273,8 +275,8 @@ function exportData(){
cont_obj
.
tmp
=
"clear"
;
array_to_export
.
push
(
cont_obj
);
}
sankore
.
setPreference
(
"categoriser_images"
,
JSON
.
stringify
(
array_to_export
));
if
(
window
.
sankore
)
sankore
.
setPreference
(
"categoriser_images"
,
JSON
.
stringify
(
array_to_export
));
}
//import
...
...
@@ -290,7 +292,7 @@ function importData(data){
changeStyle
(
data
[
i
].
style
);
$
(
".style_select"
).
val
(
data
[
i
].
style
);
}
if
(
data
[
i
].
mode
==
"edit"
){
if
(
data
[
i
].
mode
==
"edit"
){
var
tmp_array
=
[];
var
container
=
$
(
"<div class='cont'>"
);
var
sub_container
=
$
(
"<div class='sub_cont'>"
).
appendTo
(
container
);
...
...
resources/library/interactivities/Cat images.wgt/locales/fr/js/script.js
View file @
f482d9f0
...
...
@@ -7,8 +7,8 @@ var sankoreLang = {
add
:
"Nouveau bloc"
,
wgt_name
:
"Catégoriser des images"
,
reload
:
"Recharger"
,
slate
:
"
a
rdoise"
,
pad
:
"
t
ablette"
slate
:
"
A
rdoise"
,
pad
:
"
T
ablette"
};
//main function
...
...
@@ -208,7 +208,7 @@ function start(){
//export
function
exportData
(){
var
array_to_export
=
[];
if
(
$
(
"#edit"
).
hasClass
(
"selected"
)){
if
(
$
(
"#
wgt_
edit"
).
hasClass
(
"selected"
)){
$
(
".cont"
).
each
(
function
(){
var
cont_obj
=
new
Object
();
cont_obj
.
style
=
$
(
".style_select"
).
find
(
"option:selected"
).
val
();
...
...
resources/library/interactivities/Cat images.wgt/locales/ru/js/script.js
View file @
f482d9f0
...
...
@@ -208,7 +208,7 @@ function start(){
//export
function
exportData
(){
var
array_to_export
=
[];
if
(
$
(
"#edit"
).
hasClass
(
"selected"
)){
if
(
$
(
"#
wgt_
edit"
).
hasClass
(
"selected"
)){
$
(
".cont"
).
each
(
function
(){
var
cont_obj
=
new
Object
();
cont_obj
.
style
=
$
(
".style_select"
).
find
(
"option:selected"
).
val
();
...
...
resources/library/interactivities/Cat text.wgt/css/basic.css
View file @
f482d9f0
...
...
@@ -96,8 +96,11 @@ body{
}
.text_cont
{
width
:
100%
;
min-width
:
150px
;
max-width
:
200px
;
min-height
:
20px
;
max-height
:
60px
;
overflow
:
hidden
;
display
:
block
;
cursor
:
pointer
;
}
...
...
@@ -113,7 +116,8 @@ body{
}
.img_block
{
width
:
150px
;
min-width
:
150px
;
max-width
:
200px
;
height
:
60px
;
margin
:
10px
;
display
:
inline-table
;
...
...
resources/library/interactivities/Cat text.wgt/js/script.js
View file @
f482d9f0
...
...
@@ -275,8 +275,8 @@ function exportData(){
cont_obj
.
tmp
=
"clear"
;
array_to_export
.
push
(
cont_obj
);
}
sankore
.
setPreference
(
"categoriser_text"
,
JSON
.
stringify
(
array_to_export
));
if
(
window
.
sankore
)
sankore
.
setPreference
(
"categoriser_text"
,
JSON
.
stringify
(
array_to_export
));
}
//import
...
...
resources/library/interactivities/Choisir.wgt/config.xml
View file @
f482d9f0
...
...
@@ -3,7 +3,7 @@
xmlns:ub=
"http://uniboard.mnemis.com/widgets"
id=
"http://uniboard.mnemis.com/widgets/webbrowser"
version=
"1.1"
width=
"9
0
0"
width=
"9
2
0"
height=
"400"
ub:resizable=
"true"
>
...
...
resources/library/interactivities/Choisir.wgt/css/basic.css
View file @
f482d9f0
...
...
@@ -143,6 +143,8 @@ body{
margin-left
:
10px
;
margin-bottom
:
10px
;
width
:
95%
;
max-height
:
60px
;
overflow-x
:
hidden
;
font-family
:
Verdana
,
Arial
,
Helvetica
,
sans-serif
;
font-size
:
small
;
border
:
3px
solid
#ccc
;
...
...
@@ -158,9 +160,14 @@ body{
float
:
left
;
padding
:
5px
;
margin
:
10px
;
width
:
100%
;
width
:
95%
;
max-height
:
60px
;
overflow-x
:
hidden
;
font-family
:
Verdana
,
Arial
,
Helvetica
,
sans-serif
;
color
:
white
;
border
:
1px
solid
#DFDFDE
;
border-top-left-radius
:
10px
;
border-bottom-left-radius
:
10px
;
}
.ansDiv
{
...
...
@@ -210,6 +217,8 @@ body{
font-family
:
Verdana
,
Arial
,
Helvetica
,
sans-serif
;
font-size
:
small
;
width
:
80%
;
max-height
:
45px
;
overflow-x
:
hidden
;
float
:
left
;
border
:
3px
solid
#ccc
;
-webkit-border-radius
:
5px
;
...
...
@@ -227,9 +236,12 @@ body{
font-size
:
small
;
font-weight
:
bold
;
width
:
80%
;
max-height
:
45px
;
overflow-x
:
hidden
;
float
:
left
;
-webkit-border-radius
:
5px
;
border-radius
:
5px
;
border
:
1px
solid
#DFDFDE
;
border-top-left-radius
:
10px
;
border-bottom-left-radius
:
10px
;
color
:
white
;
}
...
...
@@ -392,7 +404,7 @@ body{
}
.selected
{
}
/*top*/
...
...
resources/library/interactivities/Choisir.wgt/locales/fr/scripts/selQuestionApp.js
View file @
f482d9f0
...
...
@@ -102,11 +102,12 @@ function init(){
}
}
if
(
sankore
.
preference
(
"choisir_style"
,
""
)){
changeStyle
(
sankore
.
preference
(
"choisir_style"
,
""
));
$
(
".style_select"
).
val
(
sankore
.
preference
(
"choisir_style"
,
""
));
}
else
changeStyle
(
1
)
if
(
window
.
sankore
)
if
(
sankore
.
preference
(
"choisir_style"
,
""
)){
changeStyle
(
sankore
.
preference
(
"choisir_style"
,
""
));
$
(
".style_select"
).
val
(
sankore
.
preference
(
"choisir_style"
,
""
));
}
else
changeStyle
(
1
)
$
(
"#wgt_display, #wgt_edit"
).
click
(
function
(
event
){
if
(
this
.
id
==
"wgt_display"
){
...
...
@@ -118,8 +119,10 @@ function init(){
$
(
"#wgt_edit"
).
css
(
"display"
,
"block"
);
displayData
(
true
);
mode
=
true
;
sankore
.
setPreference
(
"qstArrayData"
,
JSON
.
stringify
(
questionArray
));
sankore
.
setPreference
(
"choisir_style"
,
$
(
".style_select"
).
find
(
"option:selected"
).
val
());
if
(
window
.
sankore
){
sankore
.
setPreference
(
"qstArrayData"
,
JSON
.
stringify
(
questionArray
));
sankore
.
setPreference
(
"choisir_style"
,
$
(
".style_select"
).
find
(
"option:selected"
).
val
());
}
}
}
else
{
if
(
!
$
(
this
).
hasClass
(
"selected"
)){
...
...
@@ -312,15 +315,15 @@ function init(){
if
(
event
.
target
.
type
==
"radio"
){
checkingAnswers
(
"radio"
,
getNeededElement
(
questionArray
,
currentQstId
).
answers
,
event
.
target
.
value
);
if
(
event
.
target
.
value
==
getNeededElement
(
questionArray
,
currentQstId
).
rightAns
)
$
(
event
.
target
).
next
().
next
().
find
(
"span"
).
css
(
"background-color"
,
"#6c0"
);
$
(
event
.
target
).
next
().
next
().
css
(
"background-color"
,
"#6c0"
);
else
$
(
event
.
target
).
next
().
next
().
find
(
"span"
).
css
(
"background-color"
,
"red"
);
$
(
event
.
target
).
next
().
next
().
css
(
"background-color"
,
"red"
);
}
else
{
checkingAnswers
(
"box"
,
getNeededElement
(
questionArray
,
currentQstId
).
answers
,
event
.
target
.
value
,
event
.
target
.
checked
);
if
(
getNeededElement
(
questionArray
,
currentQstId
).
rightAns
.
replace
(
/,/g
,
""
).
indexOf
(
event
.
target
.
value
+
" "
,
0
)
!=
-
1
)
$
(
event
.
target
).
next
().
next
().
find
(
"span"
).
css
(
"background-color"
,
"#6c0"
);
$
(
event
.
target
).
next
().
next
().
css
(
"background-color"
,
"#6c0"
);
else
$
(
event
.
target
).
next
().
next
().
find
(
"span"
).
css
(
"background-color"
,
"red"
);
$
(
event
.
target
).
next
().
next
().
css
(
"background-color"
,
"red"
);
}
}
});
...
...
@@ -462,7 +465,7 @@ function init(){
newAnswer
=
$
(
"<div class='newAnswer'>"
);
var
ansInput
=
$
(
"<input type='radio' name='"
+
counter
+
"' value='"
+
array
[
i
].
answers
[
j
].
value
+
"' "
+
local_state
+
" style='float: left; margin-right: 10px;'/>"
).
appendTo
(
newAnswer
);
var
ansSpan
=
$
(
"<span class='ansSpanDisplay'>"
+
ansCount
+
".</span>"
).
appendTo
(
newAnswer
);
var
ansContent
=
$
(
"<div class='ansContentDisplay'
><span id='answerText' "
+
local_color
+
"
>"
+
array
[
i
].
answers
[
j
].
text
+
"</span></div>"
).
appendTo
(
newAnswer
);
var
ansContent
=
$
(
"<div class='ansContentDisplay'
"
+
local_color
+
"><span id='answerText'
>"
+
array
[
i
].
answers
[
j
].
text
+
"</span></div>"
).
appendTo
(
newAnswer
);
newAnswer
.
appendTo
(
ansDiv
);
break
;
case
"2"
:
...
...
@@ -475,7 +478,7 @@ function init(){
newAnswer
=
$
(
"<div class='newAnswer'>"
);
ansInput
=
$
(
"<input type='checkbox' value='"
+
array
[
i
].
answers
[
j
].
value
+
"' "
+
local_state
+
" style='float: left; margin-right: 10px;'/>"
).
appendTo
(
newAnswer
);
ansSpan
=
$
(
"<span class='ansSpanDisplay'>"
+
ansCount
+
".</span>"
).
appendTo
(
newAnswer
);
ansContent
=
$
(
"<div class='ansContentDisplay'
><span id='answerText' "
+
local_color
+
"
>"
+
array
[
i
].
answers
[
j
].
text
+
"</span></div>"
).
appendTo
(
newAnswer
);
ansContent
=
$
(
"<div class='ansContentDisplay'
"
+
local_color
+
"><span id='answerText'
>"
+
array
[
i
].
answers
[
j
].
text
+
"</span></div>"
).
appendTo
(
newAnswer
);
newAnswer
.
appendTo
(
ansDiv
);
break
;
case
"3"
:
...
...
resources/library/interactivities/Choisir.wgt/locales/ru/scripts/selQuestionApp.js
View file @
f482d9f0
...
...
@@ -102,11 +102,12 @@ function init(){
}
}
if
(
sankore
.
preference
(
"choisir_style"
,
""
)){
changeStyle
(
sankore
.
preference
(
"choisir_style"
,
""
));
$
(
".style_select"
).
val
(
sankore
.
preference
(
"choisir_style"
,
""
));
}
else
changeStyle
(
1
)
if
(
window
.
sankore
)
if
(
sankore
.
preference
(
"choisir_style"
,
""
)){
changeStyle
(
sankore
.
preference
(
"choisir_style"
,
""
));
$
(
".style_select"
).
val
(
sankore
.
preference
(
"choisir_style"
,
""
));
}
else
changeStyle
(
1
)
$
(
"#wgt_display, #wgt_edit"
).
click
(
function
(
event
){
if
(
this
.
id
==
"wgt_display"
){
...
...
@@ -118,8 +119,10 @@ function init(){
$
(
"#wgt_edit"
).
css
(
"display"
,
"block"
);
displayData
(
true
);
mode
=
true
;
sankore
.
setPreference
(
"qstArrayData"
,
JSON
.
stringify
(
questionArray
));
sankore
.
setPreference
(
"choisir_style"
,
$
(
".style_select"
).
find
(
"option:selected"
).
val
());
if
(
window
.
sankore
){
sankore
.
setPreference
(
"qstArrayData"
,
JSON
.
stringify
(
questionArray
));
sankore
.
setPreference
(
"choisir_style"
,
$
(
".style_select"
).
find
(
"option:selected"
).
val
());
}
}
}
else
{
if
(
!
$
(
this
).
hasClass
(
"selected"
)){
...
...
@@ -312,15 +315,15 @@ function init(){
if
(
event
.
target
.
type
==
"radio"
){
checkingAnswers
(
"radio"
,
getNeededElement
(
questionArray
,
currentQstId
).
answers
,
event
.
target
.
value
);
if
(
event
.
target
.
value
==
getNeededElement
(
questionArray
,
currentQstId
).
rightAns
)
$
(
event
.
target
).
next
().
next
().
find
(
"span"
).
css
(
"background-color"
,
"#6c0"
);
$
(
event
.
target
).
next
().
next
().
css
(
"background-color"
,
"#6c0"
);
else
$
(
event
.
target
).
next
().
next
().
find
(
"span"
).
css
(
"background-color"
,
"red"
);
$
(
event
.
target
).
next
().
next
().
css
(
"background-color"
,
"red"
);
}
else
{
checkingAnswers
(
"box"
,
getNeededElement
(
questionArray
,
currentQstId
).
answers
,
event
.
target
.
value
,
event
.
target
.
checked
);
if
(
getNeededElement
(
questionArray
,
currentQstId
).
rightAns
.
replace
(
/,/g
,
""
).
indexOf
(
event
.
target
.
value
+
" "
,
0
)
!=
-
1
)
$
(
event
.
target
).
next
().
next
().
find
(
"span"
).
css
(
"background-color"
,
"#6c0"
);
$
(
event
.
target
).
next
().
next
().
css
(
"background-color"
,
"#6c0"
);
else
$
(
event
.
target
).
next
().
next
().
find
(
"span"
).
css
(
"background-color"
,
"red"
);
$
(
event
.
target
).
next
().
next
().
css
(
"background-color"
,
"red"
);
}
}
});
...
...
@@ -462,7 +465,7 @@ function init(){
newAnswer
=
$
(
"<div class='newAnswer'>"
);
var
ansInput
=
$
(
"<input type='radio' name='"
+
counter
+
"' value='"
+
array
[
i
].
answers
[
j
].
value
+
"' "
+
local_state
+
" style='float: left; margin-right: 10px;'/>"
).
appendTo
(
newAnswer
);
var
ansSpan
=
$
(
"<span class='ansSpanDisplay'>"
+
ansCount
+
".</span>"
).
appendTo
(
newAnswer
);
var
ansContent
=
$
(
"<div class='ansContentDisplay'
><span id='answerText' "
+
local_color
+
"
>"
+
array
[
i
].
answers
[
j
].
text
+
"</span></div>"
).
appendTo
(
newAnswer
);
var
ansContent
=
$
(
"<div class='ansContentDisplay'
"
+
local_color
+
"><span id='answerText'
>"
+
array
[
i
].
answers
[
j
].
text
+
"</span></div>"
).
appendTo
(
newAnswer
);
newAnswer
.
appendTo
(
ansDiv
);
break
;
case
"2"
:
...
...
@@ -475,7 +478,7 @@ function init(){
newAnswer
=
$
(
"<div class='newAnswer'>"
);
ansInput
=
$
(
"<input type='checkbox' value='"
+
array
[
i
].
answers
[
j
].
value
+
"' "
+
local_state
+
" style='float: left; margin-right: 10px;'/>"
).
appendTo
(
newAnswer
);
ansSpan
=
$
(
"<span class='ansSpanDisplay'>"
+
ansCount
+
".</span>"
).
appendTo
(
newAnswer
);
ansContent
=
$
(
"<div class='ansContentDisplay'
><span id='answerText' "
+
local_color
+
"
>"
+
array
[
i
].
answers
[
j
].
text
+
"</span></div>"
).
appendTo
(
newAnswer
);
ansContent
=
$
(
"<div class='ansContentDisplay'
"
+
local_color
+
"><span id='answerText'
>"
+
array
[
i
].
answers
[
j
].
text
+
"</span></div>"
).
appendTo
(
newAnswer
);
newAnswer
.
appendTo
(
ansDiv
);
break
;
case
"3"
:
...
...
resources/library/interactivities/Choisir.wgt/scripts/selQuestionApp.js
View file @
f482d9f0
...
...
@@ -102,11 +102,12 @@ function init(){
}
}
if
(
sankore
.
preference
(
"choisir_style"
,
""
)){
changeStyle
(
sankore
.
preference
(
"choisir_style"
,
""
));
$
(
".style_select"
).
val
(
sankore
.
preference
(
"choisir_style"
,
""
));
}
else
changeStyle
(
1
)
if
(
window
.
sankore
)
if
(
sankore
.
preference
(
"choisir_style"
,
""
)){
changeStyle
(
sankore
.
preference
(
"choisir_style"
,
""
));
$
(
".style_select"
).
val
(
sankore
.
preference
(
"choisir_style"
,
""
));
}
else
changeStyle
(
1
)
$
(
"#wgt_display, #wgt_edit"
).
click
(
function
(
event
){
if
(
this
.
id
==
"wgt_display"
){
...
...
@@ -118,8 +119,10 @@ function init(){
$
(
"#wgt_edit"
).
css
(
"display"
,
"block"
);
displayData
(
true
);
mode
=
true
;
sankore
.
setPreference
(
"qstArrayData"
,
JSON
.
stringify
(
questionArray
));
sankore
.
setPreference
(
"choisir_style"
,
$
(
".style_select"
).
find
(
"option:selected"
).
val
());
if
(
window
.
sankore
){
sankore
.
setPreference
(
"qstArrayData"
,
JSON
.
stringify
(
questionArray
));
sankore
.
setPreference
(
"choisir_style"
,
$
(
".style_select"
).
find
(
"option:selected"
).
val
());
}
}
}
else
{
if
(
!
$
(
this
).
hasClass
(
"selected"
)){
...
...
@@ -312,15 +315,15 @@ function init(){
if
(
event
.
target
.
type
==
"radio"
){
checkingAnswers
(
"radio"
,
getNeededElement
(
questionArray
,
currentQstId
).
answers
,
event
.
target
.
value
);
if
(
event
.
target
.
value
==
getNeededElement
(
questionArray
,
currentQstId
).
rightAns
)
$
(
event
.
target
).
next
().
next
().
find
(
"span"
).
css
(
"background-color"
,
"#6c0"
);
$
(
event
.
target
).
next
().
next
().
css
(
"background-color"
,
"#6c0"
);
else
$
(
event
.
target
).
next
().
next
().
find
(
"span"
).
css
(
"background-color"
,
"red"
);
$
(
event
.
target
).
next
().
next
().
css
(
"background-color"
,
"red"
);
}
else
{
checkingAnswers
(
"box"
,
getNeededElement
(
questionArray
,
currentQstId
).
answers
,
event
.
target
.
value
,
event
.
target
.
checked
);
if
(
getNeededElement
(
questionArray
,
currentQstId
).
rightAns
.
replace
(
/,/g
,
""
).
indexOf
(
event
.
target
.
value
+
" "
,
0
)
!=
-
1
)
$
(
event
.
target
).
next
().
next
().
find
(
"span"
).
css
(
"background-color"
,
"#6c0"
);
$
(
event
.
target
).
next
().
next
().
css
(
"background-color"
,
"#6c0"
);
else
$
(
event
.
target
).
next
().
next
().
find
(
"span"
).
css
(
"background-color"
,
"red"
);
$
(
event
.
target
).
next
().
next
().
css
(
"background-color"
,
"red"
);
}
}
});
...
...
@@ -462,7 +465,7 @@ function init(){
newAnswer
=
$
(
"<div class='newAnswer'>"
);
var
ansInput
=
$
(
"<input type='radio' name='"
+
counter
+
"' value='"
+
array
[
i
].
answers
[
j
].
value
+
"' "
+
local_state
+
" style='float: left; margin-right: 10px;'/>"
).
appendTo
(
newAnswer
);
var
ansSpan
=
$
(
"<span class='ansSpanDisplay'>"
+
ansCount
+
".</span>"
).
appendTo
(
newAnswer
);
var
ansContent
=
$
(
"<div class='ansContentDisplay'
><span id='answerText' "
+
local_color
+
"
>"
+
array
[
i
].
answers
[
j
].
text
+
"</span></div>"
).
appendTo
(
newAnswer
);
var
ansContent
=
$
(
"<div class='ansContentDisplay'
"
+
local_color
+
"><span id='answerText'
>"
+
array
[
i
].
answers
[
j
].
text
+
"</span></div>"
).
appendTo
(
newAnswer
);
newAnswer
.
appendTo
(
ansDiv
);
break
;
case
"2"
:
...
...
@@ -475,7 +478,7 @@ function init(){
newAnswer
=
$
(
"<div class='newAnswer'>"
);
ansInput
=
$
(
"<input type='checkbox' value='"
+
array
[
i
].
answers
[
j
].
value
+
"' "
+
local_state
+
" style='float: left; margin-right: 10px;'/>"
).
appendTo
(
newAnswer
);
ansSpan
=
$
(
"<span class='ansSpanDisplay'>"
+
ansCount
+
".</span>"
).
appendTo
(
newAnswer
);
ansContent
=
$
(
"<div class='ansContentDisplay'
><span id='answerText' "
+
local_color
+
"
>"
+
array
[
i
].
answers
[
j
].
text
+
"</span></div>"
).
appendTo
(
newAnswer
);
ansContent
=
$
(
"<div class='ansContentDisplay'
"
+
local_color
+
"><span id='answerText'
>"
+
array
[
i
].
answers
[
j
].
text
+
"</span></div>"
).
appendTo
(
newAnswer
);
newAnswer
.
appendTo
(
ansDiv
);
break
;
case
"3"
:
...
...
resources/library/interactivities/Etudier.wgt/css/basic.css
View file @
f482d9f0
...
...
@@ -209,6 +209,11 @@ li>div{
border-radius
:
10px
;
}
.real_text
{
width
:
100%
;
height
:
100%
;
}
.block_border
{
border
:
1px
solid
#999
;
border-radius
:
5px
;
...
...
resources/library/interactivities/Etudier.wgt/js/script.js
View file @
f482d9f0
...
...
@@ -83,7 +83,8 @@ function start(){
$
(
this
).
find
(
".size_up"
).
remove
();
$
(
this
).
find
(
".size_down"
).
remove
();
$
(
this
).
find
(
".resize_block"
).
remove
();
$
(
this
).
removeAttr
(
"contenteditable"
).
removeClass
(
"block_border"
);
$
(
this
).
find
(
".real_text"
).
removeAttr
(
"contenteditable"
);
$
(
this
).
removeClass
(
"block_border"
);
$
(
this
).
css
(
"position"
,
"absolute"
);
});
...
...
@@ -132,7 +133,8 @@ function start(){
$
(
"<div class='size_up' contenteditable='false'>"
).
appendTo
(
$
(
this
));
$
(
"<div class='size_down' contenteditable='false'>"
).
appendTo
(
$
(
this
));
$
(
"<div class='resize_block' contenteditable='false'>"
).
appendTo
(
$
(
this
));
$
(
this
).
attr
(
"contenteditable"
,
"true"
).
addClass
(
"block_border"
);
$
(
this
).
find
(
".real_text"
).
attr
(
"contenteditable"
,
"true"
);
$
(
this
).
addClass
(
"block_border"
);
});
container
.
find
(
".img_block"
).
each
(
function
(){
...
...
@@ -334,13 +336,13 @@ function start(){
$
(
".add_text"
).
live
(
"click"
,
function
(){
var
container
=
$
(
this
).
parent
();
var
text_block
=
$
(
"<div class='text_block'>
"
+
sankoreLang
.
new_txt
+
"
</div>"
).
appendTo
(
container
);
var
text_block
=
$
(
"<div class='text_block'>
<div class='real_text' contenteditable='true'>"
+
sankoreLang
.
new_txt
+
"</div>
</div>"
).
appendTo
(
container
);
$
(
"<div class='move_block' contenteditable='false'>"
).
appendTo
(
text_block
);
$
(
"<div class='close_img' contenteditable='false'>"
).
appendTo
(
text_block
);
$
(
"<div class='size_up' contenteditable='false'>"
).
appendTo
(
text_block
);
$
(
"<div class='size_down' contenteditable='false'>"
).
appendTo
(
text_block
);
$
(
"<div class='resize_block' contenteditable='false'>"
).
appendTo
(
text_block
);
text_block
.
a
ttr
(
"contenteditable"
,
"true"
).
a
ddClass
(
"block_border"
);
text_block
.
addClass
(
"block_border"
);
});
}
...
...
@@ -359,7 +361,7 @@ function exportData(){
txt_block
.
h
=
$
(
this
).
height
();
txt_block
.
w
=
$
(
this
).
width
();
txt_block
.
fz
=
$
(
this
).
css
(
"font-size"
);
txt_block
.
val
=
$
(
this
).
text
();
txt_block
.
val
=
$
(
this
).
find
(
".real_text"
).
html
();
cont_obj
.
text
.
push
(
txt_block
);
});
cont_obj
.
imgs
=
[];
...
...
@@ -401,7 +403,7 @@ function importData(data){
var
div
=
$
(
"<div>"
).
appendTo
(
li
);
for
(
var
j
in
data
[
i
].
text
){
var
text_div
=
$
(
"<div class='text_block'>
"
+
data
[
i
].
text
[
j
].
val
+
"
</div>"
);
var
text_div
=
$
(
"<div class='text_block'>
<div class='real_text'>"
+
data
[
i
].
text
[
j
].
val
+
"</div>
</div>"
);
text_div
.
draggable
().
css
(
"position"
,
"absolute"
)
.
width
(
data
[
i
].
text
[
j
].
w
)
.
height
(
data
[
i
].
text
[
j
].
h
)
...
...
@@ -453,7 +455,7 @@ function showExample(){
var
li1
=
$
(
"<li>"
);
var
div1
=
$
(
"<div>"
).
appendTo
(
li1
);
$
(
"<div class='text_block'>
"
+
sankoreLang
.
text_content
+
"
</div>"
).
draggable
().
appendTo
(
div1
)
$
(
"<div class='text_block'>
<div class='real_text'>"
+
sankoreLang
.
text_content
+
"</div>
</div>"
).
draggable
().
appendTo
(
div1
)
li1
.
width
(
$
(
"#slider"
).
width
()).
height
(
$
(
"#slider"
).
height
());
$
(
"#slider ul"
).
append
(
li1
);
var
li2
=
$
(
"<li>"
);
...
...
@@ -465,7 +467,7 @@ function showExample(){
var
li3
=
$
(
"<li>"
);
var
div3
=
$
(
"<div>"
).
appendTo
(
li3
);
li3
.
width
(
$
(
"#slider"
).
width
()).
height
(
$
(
"#slider"
).
height
());
$
(
"<div class='text_block'>
ololo
</div>"
).
draggable
().
appendTo
(
div3
);
$
(
"<div class='text_block'>
<div class='real_text'>"
+
sankoreLang
.
text_content
+
"</div>
</div>"
).
draggable
().
appendTo
(
div3
);
var
audio_block
=
$
(
"<div class='audio_block'>"
).
draggable
().
appendTo
(
div3
);
$
(
"<div class='play'>"
).
appendTo
(
audio_block
);
$
(
"<div class='replay'>"
).
appendTo
(
audio_block
);
...
...
@@ -475,7 +477,7 @@ function showExample(){
$
(
"#slider ul"
).
append
(
li3
);
var
li4
=
$
(
"<li>"
);
var
div4
=
$
(
"<div>"
).
appendTo
(
li4
);
$
(
"<div class='text_block'>
"
+
sankoreLang
.
text_content
+
"
</div>"
).
draggable
().
appendTo
(
div4
);
$
(
"<div class='text_block'>
<div class='real_text'>"
+
sankoreLang
.
text_content
+
"</div>
</div>"
).
draggable
().
appendTo
(
div4
);
var
img2
=
$
(
"<div class='img_block' style='text-align: center;'></div>"
).
draggable
().
appendTo
(
div4
);
$
(
"<img src=
\"
objects/1.gif
\"
style=
\"
display: inline;
\"
height=
\"
120
\"
/>"
).
appendTo
(
img2
);
var
audio_block2
=
$
(
"<div class='audio_block'>"
).
draggable
().
appendTo
(
div4
);
...
...
resources/library/interactivities/Etudier.wgt/locales/fr/js/script.js
View file @
f482d9f0
...
...
@@ -83,7 +83,8 @@ function start(){
$
(
this
).
find
(
".size_up"
).
remove
();
$
(
this
).
find
(
".size_down"
).
remove
();
$
(
this
).
find
(
".resize_block"
).
remove
();
$
(
this
).
removeAttr
(
"contenteditable"
).
removeClass
(
"block_border"
);
$
(
this
).
find
(
".real_text"
).
removeAttr
(
"contenteditable"
);
$
(
this
).
removeClass
(
"block_border"
);
$
(
this
).
css
(
"position"
,
"absolute"
);
});
...
...
@@ -132,7 +133,8 @@ function start(){
$
(
"<div class='size_up' contenteditable='false'>"
).
appendTo
(
$
(
this
));
$
(
"<div class='size_down' contenteditable='false'>"
).
appendTo
(
$
(
this
));
$
(
"<div class='resize_block' contenteditable='false'>"
).
appendTo
(
$
(
this
));
$
(
this
).
attr
(
"contenteditable"
,
"true"
).
addClass
(
"block_border"
);
$
(
this
).
find
(
".real_text"
).
attr
(
"contenteditable"
,
"true"
);
$
(
this
).
addClass
(
"block_border"
);
});
container
.
find
(
".img_block"
).
each
(
function
(){
...
...
@@ -334,13 +336,13 @@ function start(){
$
(
".add_text"
).
live
(
"click"
,
function
(){
var
container
=
$
(
this
).
parent
();
var
text_block
=
$
(
"<div class='text_block'>
"
+
sankoreLang
.
new_txt
+
"
</div>"
).
appendTo
(
container
);
var
text_block
=
$
(
"<div class='text_block'>
<div class='real_text' contenteditable='true'>"
+
sankoreLang
.
new_txt
+
"</div>
</div>"
).
appendTo
(
container
);
$
(
"<div class='move_block' contenteditable='false'>"
).
appendTo
(
text_block
);
$
(
"<div class='close_img' contenteditable='false'>"
).
appendTo
(
text_block
);
$
(
"<div class='size_up' contenteditable='false'>"
).
appendTo
(
text_block
);
$
(
"<div class='size_down' contenteditable='false'>"
).
appendTo
(
text_block
);
$
(
"<div class='resize_block' contenteditable='false'>"
).
appendTo
(
text_block
);
text_block
.
a
ttr
(
"contenteditable"
,
"true"
).
a
ddClass
(
"block_border"
);
text_block
.
addClass
(
"block_border"
);
});
}
...
...
@@ -359,7 +361,7 @@ function exportData(){
txt_block
.
h
=
$
(
this
).
height
();
txt_block
.
w
=
$
(
this
).
width
();
txt_block
.
fz
=
$
(
this
).
css
(
"font-size"
);
txt_block
.
val
=
$
(
this
).
text
();
txt_block
.
val
=
$
(
this
).
find
(
".real_text"
).
html
();
cont_obj
.
text
.
push
(
txt_block
);
});
cont_obj
.
imgs
=
[];
...
...
@@ -401,7 +403,7 @@ function importData(data){
var
div
=
$
(
"<div>"
).
appendTo
(
li
);
for
(
var
j
in
data
[
i
].
text
){
var
text_div
=
$
(
"<div class='text_block'>
"
+
data
[
i
].
text
[
j
].
val
+
"
</div>"
);
var
text_div
=
$
(
"<div class='text_block'>
<div class='real_text'>"
+
data
[
i
].
text
[
j
].
val
+
"</div>
</div>"
);
text_div
.
draggable
().
css
(
"position"
,
"absolute"
)
.
width
(
data
[
i
].
text
[
j
].
w
)
.
height
(
data
[
i
].
text
[
j
].
h
)
...
...
@@ -455,7 +457,7 @@ function showExample(){
var
li1
=
$
(
"<li>"
);
var
div1
=
$
(
"<div>"
).
appendTo
(
li1
);
$
(
"<div class='text_block'>
"
+
sankoreLang
.
text_content
+
"
</div>"
).
draggable
().
appendTo
(
div1
)
$
(
"<div class='text_block'>
<div class='real_text'>"
+
sankoreLang
.
text_content
+
"</div>
</div>"
).
draggable
().
appendTo
(
div1
)
li1
.
width
(
$
(
"#slider"
).
width
()).
height
(
$
(
"#slider"
).
height
());
$
(
"#slider ul"
).
append
(
li1
);
var
li2
=
$
(
"<li>"
);
...
...
@@ -476,7 +478,7 @@ function showExample(){
$
(
"#slider ul"
).
append
(
li3
);
var
li4
=
$
(
"<li>"
);
var
div4
=
$
(
"<div>"
).
appendTo
(
li4
);
$
(
"<div class='text_block'>
"
+
sankoreLang
.
text_content
+
"
</div>"
).
draggable
().
appendTo
(
div4
);
$
(
"<div class='text_block'>
<div class='real_text'>"
+
sankoreLang
.
text_content
+
"</div>
</div>"
).
draggable
().
appendTo
(
div4
);
var
img2
=
$
(
"<div class='img_block' style='text-align: center;'></div>"
).
draggable
().
appendTo
(
div4
);
$
(
"<img src=
\"
../../objects/1.gif
\"
style=
\"
display: inline;
\"
height=
\"
120
\"
/>"
).
appendTo
(
img2
);
var
audio_block2
=
$
(
"<div class='audio_block'>"
).
draggable
().
appendTo
(
div4
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment