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
720eb7eb
Commit
720eb7eb
authored
Mar 01, 2012
by
unknown
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
upgraded interactivities
parent
9c8a49f8
Changes
11
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
942 additions
and
491 deletions
+942
-491
index.html
resources/library/interactivities/ord-phrases.wgt/index.html
+51
-20
index.html
...ary/interactivities/ord-phrases.wgt/locales/fr/index.html
+33
-0
template2.js
...activities/ord-phrases.wgt/locales/fr/script/template2.js
+248
-0
index.html
...ary/interactivities/ord-phrases.wgt/locales/ru/index.html
+33
-0
template2.js
...activities/ord-phrases.wgt/locales/ru/script/template2.js
+248
-0
jquery-1.6.2.min.js
...teractivities/ord-phrases.wgt/scripts/jquery-1.6.2.min.js
+18
-0
jquery-ui-1.8.9.custom.min.js
...ies/ord-phrases.wgt/scripts/jquery-ui-1.8.9.custom.min.js
+0
-0
template2.js
...rary/interactivities/ord-phrases.wgt/scripts/template2.js
+249
-242
master.css
...library/interactivities/ord-phrases.wgt/styles/master.css
+0
-0
of_puppets.css
...ary/interactivities/ord-phrases.wgt/styles/of_puppets.css
+62
-62
jquery144.js
...ractivities/ord-phrases.wgt/template/scripts/jquery144.js
+0
-167
No files found.
resources/library/interactivities/ord-phrases.wgt/index.html
View file @
720eb7eb
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<html>
<head>
<head>
<meta
http-equiv=
"Content-Type"
content=
"text/html; charset=utf-8"
>
<meta
http-equiv=
"Content-Type"
content=
"text/html; charset=utf-8"
>
<title>
Template
</title>
<title>
Template
</title>
<!--Styles-->
<!--Styles-->
<link
rel=
"stylesheet"
type=
"text/css"
href=
"template/
styles/master.css"
>
<link
rel=
"stylesheet"
type=
"text/css"
href=
"
styles/master.css"
>
<link
rel=
"stylesheet"
type=
"text/css"
href=
"template/
styles/of_puppets.css"
>
<link
rel=
"stylesheet"
type=
"text/css"
href=
"
styles/of_puppets.css"
>
<!--Scripts-->
<!--Scripts-->
<script
type=
"text/javascript"
src=
"template/scripts/jquery144.js"
></script>
<script
type=
"text/javascript"
src=
"scripts/jquery-1.6.2.min.js"
></script>
<script
type=
"text/javascript"
src=
"template/scripts/jquery-ui-1.8.9.custom.min.js"
></script>
<script
type=
"text/javascript"
src=
"scripts/jquery-ui-1.8.9.custom.min.js"
></script>
<script
type=
"text/javascript"
src=
"template/scripts/template2.js"
></script>
<script
type=
"text/javascript"
src=
"scripts/template2.js"
></script>
<script
type=
"text/javascript"
>
$
(
document
).
ready
(
function
(){
var
lang
=
""
;
//locale language
if
(
window
.
sankore
){
lang
=
sankore
.
locale
().
substr
(
0
,
2
);
}
else
lang
=
"en"
;
if
(
lang
==
"en"
){
if
(
window
.
sankore
)
sankore
.
enableDropOnWidget
(
false
);
$
(
"#ub-widget"
).
append
(
'<div id="mp_setup"></div><div id="mp_word"></div>'
);
modeView
();
}
else
{
returnStatus
(
lang
);
}
</head>
function
returnStatus
(
lang
){
$
.
ajax
({
type
:
'POST'
,
url
:
'locales/'
+
lang
+
'/index.html'
,
statusCode
:
{
404
:
function
()
{
if
(
window
.
sankore
)
sankore
.
enableDropOnWidget
(
false
);
modeView
();
},
200
:
function
(){
window
.
location
.
href
=
'locales/'
+
lang
+
'/index.html'
;
}
}
});
}
});
</script>
</head>
<body>
<body>
<div
id=
"ub-widget"
>
<div
id=
"ub-widget"
>
</div>
</div>
</body>
</body>
</html>
</html>
\ No newline at end of file
resources/library/interactivities/ord-phrases.wgt/locales/fr/index.html
0 → 100644
View file @
720eb7eb
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta
http-equiv=
"Content-Type"
content=
"text/html; charset=utf-8"
>
<title>
Template
</title>
<!--Styles-->
<link
rel=
"stylesheet"
type=
"text/css"
href=
"../../styles/master.css"
>
<link
rel=
"stylesheet"
type=
"text/css"
href=
"../../styles/of_puppets.css"
>
<!--Scripts-->
<script
type=
"text/javascript"
src=
"../../scripts/jquery-1.6.2.min.js"
></script>
<script
type=
"text/javascript"
src=
"../../scripts/jquery-ui-1.8.9.custom.min.js"
></script>
<script
type=
"text/javascript"
src=
"script/template2.js"
></script>
<script
type=
"text/javascript"
>
$
(
document
).
ready
(
function
(){
if
(
window
.
sankore
)
sankore
.
enableDropOnWidget
(
false
);
$
(
"#ub-widget"
).
append
(
'<div id="mp_setup"></div><div id="mp_word"></div>'
);
modeView
();
});
</script>
</head>
<body>
<div
id=
"ub-widget"
>
</div>
</body>
</html>
\ No newline at end of file
resources/library/interactivities/ord-phrases.wgt/locales/fr/script/template2.js
0 → 100644
View file @
720eb7eb
/*
Sankore API
*/
function
startEditing
()
{
modeEdit
();
}
function
stopEditing
()
{
modeView
();
}
function
initialize
()
{
}
function
checkResponse
()
{
checkWord
();
}
/*
/ END sankore api
*/
var
sankoreLang
=
{
view
:
"D'affichage"
,
edit
:
"Modifier"
,
example
:
"il
\n
s'agit
\n
d'une
\n
phrase
\n
d'exemple"
};
var
sentence
=
""
;
var
curSentence
=
""
;
if
(
window
.
sankore
){
sentence
=
(
sankore
.
preference
(
"rightOrdPhrases"
,
""
))?
sankore
.
preference
(
"rightOrdPhrases"
,
""
):
sankoreLang
.
example
;
curSentence
=
(
sankore
.
preference
(
"currentOrdPhrases"
,
""
))?
sankore
.
preference
(
"currentOrdPhrases"
,
""
):
""
;
}
else
{
sentence
=
sankoreLang
.
example
;
}
var
doCheck
=
true
;
// array of dom elements
var
phrases
=
[];
var
editMode
=
false
;
// just a flag
// if use the "edit" button or rely on the api instead
var
isSankore
=
false
;
// whether to do window.resize or not (window = widget area)
var
isBrowser
=
(
typeof
(
widget
)
==
"undefined"
);
// hardcoded parameters, not very good
var
input_width
=
606
;
var
widget_padding
=
100
;
function
str_replace
(
w
,
b
,
s
){
while
(
s
.
indexOf
(
w
)
!=
-
1
){
s
=
s
.
replace
(
w
,
b
);
}
return
s
;
}
/*
==============
shuffle
==============
shuffles an array
*/
function
shuffle
(
arr
)
{
var
pos
,
tmp
;
for
(
var
i
=
0
;
i
<
arr
.
length
;
i
++
)
{
pos
=
Math
.
round
(
Math
.
random
()
*
(
arr
.
length
-
1
)
);
tmp
=
arr
[
pos
];
arr
[
pos
]
=
arr
[
i
];
arr
[
i
]
=
tmp
;
}
return
arr
;
}
/*
=================
createWordLetters
=================
returns array of dom elements
*/
function
createElements
(
sentence
)
{
var
el
;
var
elements
=
[];
var
phrases
=
sentence
.
split
(
"
\n
"
);
for
(
i
in
phrases
)
{
el
=
document
.
createElement
(
"div"
);
$
(
el
).
addClass
(
"phrase"
).
text
(
phrases
[
i
]
);
elements
.
push
(
el
);
}
return
elements
;
}
function
checkSentence
()
{
if
(
!
doCheck
)
return
;
var
ph
=
[];
$
(
"#mp_word .phrase"
).
each
(
function
()
{
ph
.
push
(
$
(
this
).
text
()
);
});
if
(
ph
.
join
(
"
\n
"
)
==
str_replace
(
"
\
r"
,
""
,
sentence
)
){
$
(
"#mp_word .phrase"
).
addClass
(
"right"
);
}
}
/*
==================
modeView()
==================
turns the widget into the view mode
*/
function
modeView
()
{
if
(
editMode
){
sentence
=
str_replace
(
"
\
r"
,
""
,
$
(
"#mp_word textarea"
).
attr
(
"value"
)
);
var
p
=
sentence
.
split
(
"
\n
"
);
var
p2
=
[];
var
t
;
for
(
var
i
in
p
)
{
t
=
jQuery
.
trim
(
p
[
i
]
);
if
(
t
)
p2
.
push
(
t
);
}
sentence
=
p2
.
join
(
"
\n
"
);
}
// if no sankore api, insert edit button
if
(
!
isSankore
){
$
(
"#mp_setup"
).
empty
().
append
(
'<input type="button" value="'
+
sankoreLang
.
edit
+
'">'
);
$
(
"#mp_setup input:button"
).
click
(
function
(){
modeEdit
();
});
}
// clean the previous word
$
(
"#mp_word"
).
empty
();
var
phrases
;
// create new set of elements
if
(
window
.
sankore
&&
curSentence
&&
!
editMode
)
phrases
=
createElements
(
curSentence
);
else
phrases
=
shuffle
(
createElements
(
sentence
)
);
for
(
i
in
phrases
){
$
(
"#mp_word"
).
append
(
phrases
[
i
]
);
}
// in sankore api there would be a function to check
// the answer, so no update parameter would be needed
$
(
"#mp_word"
).
sortable
();
if
(
!
isSankore
){
$
(
"#mp_word"
).
sortable
(
{
update
:
checkSentence
}
);
}
else
$
(
"#mp_word"
).
sortable
();
// adjustHeight
var
aHeight
=
$
(
phrases
[
0
]
).
outerHeight
(
true
);
// apply new width
adjust
(
aHeight
*
phrases
.
length
);
}
/*
============
adjust width or height
============
*/
function
adjust
(
height
)
{
$
(
"#mp_word"
).
animate
(
{
height
:
height
}
);
// if viewed as a widget, resize the window
if
(
!
isBrowser
){
window
.
resizeTo
(
widget
.
width
,
height
+
widget_padding
);
}
}
/*
================
modeEdit
================
*/
function
modeEdit
()
{
editMode
=
true
;
// if no sankore api, insert ok button
if
(
!
isSankore
)
{
$
(
"#mp_setup"
).
empty
().
append
(
'<input type="button" value="'
+
sankoreLang
.
view
+
'">'
);
$
(
"#mp_setup input:button"
).
click
(
function
(){
modeView
();
});
}
$
(
"#mp_word"
).
css
(
"margin-left"
,
0
).
empty
()
.
append
(
'<textarea cols="50" rows="5">'
+
sentence
+
'</textarea>'
);
adjust
(
$
(
"#mp_word textarea"
).
outerHeight
()
);
}
if
(
window
.
widget
)
{
window
.
widget
.
onleave
=
function
(){
if
(
$
(
"#mp_word textarea"
).
val
())
{
modeView
();
var
ph
=
[];
$
(
"#mp_word .phrase"
).
each
(
function
()
{
ph
.
push
(
$
(
this
).
text
()
);
});
sankore
.
setPreference
(
"currentOrdPhrases"
,
ph
.
join
(
"
\n
"
));
modeEdit
();
}
else
{
ph
=
[];
$
(
"#mp_word .phrase"
).
each
(
function
()
{
ph
.
push
(
$
(
this
).
text
()
);
});
sankore
.
setPreference
(
"currentOrdPhrases"
,
ph
.
join
(
"
\n
"
));
}
sankore
.
setPreference
(
"rightOrdPhrases"
,
sentence
);
}
}
\ No newline at end of file
resources/library/interactivities/ord-phrases.wgt/locales/ru/index.html
0 → 100644
View file @
720eb7eb
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta
http-equiv=
"Content-Type"
content=
"text/html; charset=utf-8"
>
<title>
Template
</title>
<!--Styles-->
<link
rel=
"stylesheet"
type=
"text/css"
href=
"../../styles/master.css"
>
<link
rel=
"stylesheet"
type=
"text/css"
href=
"../../styles/of_puppets.css"
>
<!--Scripts-->
<script
type=
"text/javascript"
src=
"../../scripts/jquery-1.6.2.min.js"
></script>
<script
type=
"text/javascript"
src=
"../../scripts/jquery-ui-1.8.9.custom.min.js"
></script>
<script
type=
"text/javascript"
src=
"script/template2.js"
></script>
<script
type=
"text/javascript"
>
$
(
document
).
ready
(
function
(){
if
(
window
.
sankore
)
sankore
.
enableDropOnWidget
(
false
);
$
(
"#ub-widget"
).
append
(
'<div id="mp_setup"></div><div id="mp_word"></div>'
);
modeView
();
});
</script>
</head>
<body>
<div
id=
"ub-widget"
>
</div>
</body>
</html>
\ No newline at end of file
resources/library/interactivities/ord-phrases.wgt/locales/ru/script/template2.js
0 → 100644
View file @
720eb7eb
/*
Sankore API
*/
function
startEditing
()
{
modeEdit
();
}
function
stopEditing
()
{
modeView
();
}
function
initialize
()
{
}
function
checkResponse
()
{
checkWord
();
}
/*
/ END sankore api
*/
var
sankoreLang
=
{
edit
:
"Изменить"
,
view
:
"Просмотр"
,
example
:
"это
\n
пример
\n
предложения"
}
var
sentence
=
""
;
var
curSentence
=
""
;
if
(
window
.
sankore
){
sentence
=
(
sankore
.
preference
(
"rightOrdPhrases"
,
""
))?
sankore
.
preference
(
"rightOrdPhrases"
,
""
):
sankoreLang
.
example
;
curSentence
=
(
sankore
.
preference
(
"currentOrdPhrases"
,
""
))?
sankore
.
preference
(
"currentOrdPhrases"
,
""
):
""
;
}
else
{
sentence
=
sankoreLang
.
example
;
}
var
doCheck
=
true
;
// array of dom elements
var
phrases
=
[];
var
editMode
=
false
;
// just a flag
// if use the "edit" button or rely on the api instead
var
isSankore
=
false
;
// whether to do window.resize or not (window = widget area)
var
isBrowser
=
(
typeof
(
widget
)
==
"undefined"
);
// hardcoded parameters, not very good
var
input_width
=
606
;
var
widget_padding
=
100
;
function
str_replace
(
w
,
b
,
s
){
while
(
s
.
indexOf
(
w
)
!=
-
1
){
s
=
s
.
replace
(
w
,
b
);
}
return
s
;
}
/*
==============
shuffle
==============
shuffles an array
*/
function
shuffle
(
arr
)
{
var
pos
,
tmp
;
for
(
var
i
=
0
;
i
<
arr
.
length
;
i
++
)
{
pos
=
Math
.
round
(
Math
.
random
()
*
(
arr
.
length
-
1
)
);
tmp
=
arr
[
pos
];
arr
[
pos
]
=
arr
[
i
];
arr
[
i
]
=
tmp
;
}
return
arr
;
}
/*
=================
createWordLetters
=================
returns array of dom elements
*/
function
createElements
(
sentence
)
{
var
el
;
var
elements
=
[];
var
phrases
=
sentence
.
split
(
"
\n
"
);
for
(
i
in
phrases
)
{
el
=
document
.
createElement
(
"div"
);
$
(
el
).
addClass
(
"phrase"
).
text
(
phrases
[
i
]
);
elements
.
push
(
el
);
}
return
elements
;
}
function
checkSentence
()
{
if
(
!
doCheck
)
return
;
var
ph
=
[];
$
(
"#mp_word .phrase"
).
each
(
function
()
{
ph
.
push
(
$
(
this
).
text
()
);
});
if
(
ph
.
join
(
"
\n
"
)
==
str_replace
(
"
\
r"
,
""
,
sentence
)
){
$
(
"#mp_word .phrase"
).
addClass
(
"right"
);
}
}
/*
==================
modeView()
==================
turns the widget into the view mode
*/
function
modeView
()
{
if
(
editMode
){
sentence
=
str_replace
(
"
\
r"
,
""
,
$
(
"#mp_word textarea"
).
attr
(
"value"
)
);
var
p
=
sentence
.
split
(
"
\n
"
);
var
p2
=
[];
var
t
;
for
(
var
i
in
p
)
{
t
=
jQuery
.
trim
(
p
[
i
]
);
if
(
t
)
p2
.
push
(
t
);
}
sentence
=
p2
.
join
(
"
\n
"
);
}
// if no sankore api, insert edit button
if
(
!
isSankore
){
$
(
"#mp_setup"
).
empty
().
append
(
'<input type="button" value="'
+
sankoreLang
.
edit
+
'">'
);
$
(
"#mp_setup input:button"
).
click
(
function
(){
modeEdit
();
});
}
// clean the previous word
$
(
"#mp_word"
).
empty
();
var
phrases
;
// create new set of elements
if
(
window
.
sankore
&&
curSentence
&&
!
editMode
)
phrases
=
createElements
(
curSentence
);
else
phrases
=
shuffle
(
createElements
(
sentence
)
);
for
(
i
in
phrases
){
$
(
"#mp_word"
).
append
(
phrases
[
i
]
);
}
// in sankore api there would be a function to check
// the answer, so no update parameter would be needed
$
(
"#mp_word"
).
sortable
();
if
(
!
isSankore
){
$
(
"#mp_word"
).
sortable
(
{
update
:
checkSentence
}
);
}
else
$
(
"#mp_word"
).
sortable
();
// adjustHeight
var
aHeight
=
$
(
phrases
[
0
]
).
outerHeight
(
true
);
// apply new width
adjust
(
aHeight
*
phrases
.
length
);
}
/*
============
adjust width or height
============
*/
function
adjust
(
height
)
{
$
(
"#mp_word"
).
animate
(
{
height
:
height
}
);
// if viewed as a widget, resize the window
if
(
!
isBrowser
){
window
.
resizeTo
(
widget
.
width
,
height
+
widget_padding
);
}
}
/*
================
modeEdit
================
*/
function
modeEdit
()
{
editMode
=
true
;
// if no sankore api, insert ok button
if
(
!
isSankore
)
{
$
(
"#mp_setup"
).
empty
().
append
(
'<input type="button" value="'
+
sankoreLang
.
view
+
'">'
);
$
(
"#mp_setup input:button"
).
click
(
function
(){
modeView
();
});
}
$
(
"#mp_word"
).
css
(
"margin-left"
,
0
).
empty
()
.
append
(
'<textarea cols="50" rows="5">'
+
sentence
+
'</textarea>'
);
adjust
(
$
(
"#mp_word textarea"
).
outerHeight
()
);
}
if
(
window
.
widget
)
{
window
.
widget
.
onleave
=
function
(){
if
(
$
(
"#mp_word textarea"
).
val
())
{
modeView
();
var
ph
=
[];
$
(
"#mp_word .phrase"
).
each
(
function
()
{
ph
.
push
(
$
(
this
).
text
()
);
});
sankore
.
setPreference
(
"currentOrdPhrases"
,
ph
.
join
(
"
\n
"
));
modeEdit
();
}
else
{
ph
=
[];
$
(
"#mp_word .phrase"
).
each
(
function
()
{
ph
.
push
(
$
(
this
).
text
()
);
});
sankore
.
setPreference
(
"currentOrdPhrases"
,
ph
.
join
(
"
\n
"
));
}
sankore
.
setPreference
(
"rightOrdPhrases"
,
sentence
);
}
}
\ No newline at end of file
resources/library/interactivities/ord-phrases.wgt/scripts/jquery-1.6.2.min.js
0 → 100644
View file @
720eb7eb
This diff is collapsed.
Click to expand it.
resources/library/interactivities/ord-phrases.wgt/
template/
scripts/jquery-ui-1.8.9.custom.min.js
→
resources/library/interactivities/ord-phrases.wgt/scripts/jquery-ui-1.8.9.custom.min.js
View file @
720eb7eb
File moved
resources/library/interactivities/ord-phrases.wgt/
template/
scripts/template2.js
→
resources/library/interactivities/ord-phrases.wgt/scripts/template2.js
View file @
720eb7eb
...
@@ -26,16 +26,21 @@ function checkResponse()
...
@@ -26,16 +26,21 @@ function checkResponse()
/ END sankore api
/ END sankore api
*/
*/
var
sankoreLang
=
{
edit
:
"Edit"
,
view
:
"View"
,
example
:
"this is
\n
an example
\n
sentence"
}
var
sentence
=
""
;
var
sentence
=
""
;
var
curSentence
=
""
;
var
curSentence
=
""
;
if
(
window
.
sankore
){
if
(
window
.
sankore
){
sentence
=
(
sankore
.
preference
(
"rightOrdPhrases"
,
""
))?
sankore
.
preference
(
"rightOrdPhrases"
,
""
):
"this is
\n
an example
\n
sentence"
;
sentence
=
(
sankore
.
preference
(
"rightOrdPhrases"
,
""
))?
sankore
.
preference
(
"rightOrdPhrases"
,
""
):
sankoreLang
.
example
;
curSentence
=
(
sankore
.
preference
(
"currentOrdPhrases"
,
""
))?
sankore
.
preference
(
"currentOrdPhrases"
,
""
):
""
;
curSentence
=
(
sankore
.
preference
(
"currentOrdPhrases"
,
""
))?
sankore
.
preference
(
"currentOrdPhrases"
,
""
):
""
;
}
else
{
}
else
{
sentence
=
"this is
\n
an example
\n
sentence"
;
sentence
=
sankoreLang
.
example
;
}
}
var
doCheck
=
true
;
var
doCheck
=
true
;
...
@@ -143,7 +148,7 @@ function modeView()
...
@@ -143,7 +148,7 @@ function modeView()
// if no sankore api, insert edit button
// if no sankore api, insert edit button
if
(
!
isSankore
){
if
(
!
isSankore
){
$
(
"#mp_setup"
).
empty
().
append
(
'<input type="button" value="
Edit">'
);
$
(
"#mp_setup"
).
empty
().
append
(
'<input type="button" value="
'
+
sankoreLang
.
edit
+
'">'
);
$
(
"#mp_setup input:button"
).
click
(
function
(){
$
(
"#mp_setup input:button"
).
click
(
function
(){
modeEdit
();
modeEdit
();
});
});
...
@@ -208,7 +213,7 @@ function modeEdit()
...
@@ -208,7 +213,7 @@ function modeEdit()
// if no sankore api, insert ok button
// if no sankore api, insert ok button
if
(
!
isSankore
)
if
(
!
isSankore
)
{
{
$
(
"#mp_setup"
).
empty
().
append
(
'<input type="button" value="
View">'
);
$
(
"#mp_setup"
).
empty
().
append
(
'<input type="button" value="
'
+
sankoreLang
.
view
+
'">'
);
$
(
"#mp_setup input:button"
).
click
(
function
(){
$
(
"#mp_setup input:button"
).
click
(
function
(){
modeView
();
modeView
();
});
});
...
@@ -218,25 +223,27 @@ function modeEdit()
...
@@ -218,25 +223,27 @@ function modeEdit()
adjust
(
$
(
"#mp_word textarea"
).
outerHeight
()
);
adjust
(
$
(
"#mp_word textarea"
).
outerHeight
()
);
}
}
$
(
window
).
mouseout
(
function
(){
if
(
window
.
widget
)
{
if
(
window
.
sankore
){
window
.
widget
.
onleave
=
function
(){
if
(
$
(
"#mp_word textarea"
).
val
())
{
modeView
();
var
ph
=
[];
var
ph
=
[];
$
(
"#mp_word .phrase"
).
each
(
function
()
$
(
"#mp_word .phrase"
).
each
(
function
()
{
{
ph
.
push
(
$
(
this
).
text
()
);
ph
.
push
(
$
(
this
).
text
()
);
});
});
sankore
.
setPreference
(
"currentOrdPhrases"
,
ph
.
join
(
"
\n
"
));
sankore
.
setPreference
(
"currentOrdPhrases"
,
ph
.
join
(
"
\n
"
));
modeEdit
();
}
else
{
ph
=
[];
$
(
"#mp_word .phrase"
).
each
(
function
()
{
ph
.
push
(
$
(
this
).
text
()
);
});
sankore
.
setPreference
(
"currentOrdPhrases"
,
ph
.
join
(
"
\n
"
));
}
sankore
.
setPreference
(
"rightOrdPhrases"
,
sentence
);
sankore
.
setPreference
(
"rightOrdPhrases"
,
sentence
);
}
}
});
}
\ No newline at end of file
$
(
document
).
ready
(
function
()
{
$
(
"#ub-widget"
).
append
(
'
\
<div id="mp_setup"></div>
\
<div id="mp_word"></div>
\
'
);
modeView
();
});
\ No newline at end of file
resources/library/interactivities/ord-phrases.wgt/
template/
styles/master.css
→
resources/library/interactivities/ord-phrases.wgt/styles/master.css
View file @
720eb7eb
File moved
resources/library/interactivities/ord-phrases.wgt/
template/
styles/of_puppets.css
→
resources/library/interactivities/ord-phrases.wgt/styles/of_puppets.css
View file @
720eb7eb
resources/library/interactivities/ord-phrases.wgt/template/scripts/jquery144.js
deleted
100644 → 0
View file @
9c8a49f8
This diff is collapsed.
Click to expand it.
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