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
ab73481a
Commit
ab73481a
authored
Jun 26, 2012
by
Claudio Valerio
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'Sankore-1.40' of github.com:Sankore/Sankore-3.1 into Sankore-1.40
parents
2000d94e
d09cfc14
Changes
10
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
167 additions
and
77 deletions
+167
-77
script.js
...urces/library/interactivities/Cat images.wgt/js/script.js
+14
-5
script.js
...ry/interactivities/Cat images.wgt/locales/fr/js/script.js
+14
-5
script.js
...ry/interactivities/Cat images.wgt/locales/ru/js/script.js
+14
-5
script.js
resources/library/interactivities/Cat text.wgt/js/script.js
+11
-9
script.js
...rary/interactivities/Cat text.wgt/locales/fr/js/script.js
+13
-11
script.js
...rary/interactivities/Cat text.wgt/locales/ru/js/script.js
+11
-9
index.html
...urces/library/interactivities/Ordre images.wgt/index.html
+6
-5
script.js
...ces/library/interactivities/Ordre images.wgt/js/script.js
+28
-9
script.js
.../interactivities/Ordre images.wgt/locales/fr/js/script.js
+28
-9
script.js
.../interactivities/Ordre images.wgt/locales/ru/js/script.js
+28
-10
No files found.
resources/library/interactivities/Cat images.wgt/js/script.js
View file @
ab73481a
...
...
@@ -34,12 +34,21 @@ function start(){
if
(
window
.
widget
)
{
window
.
widget
.
onleave
=
function
(){
//
exportData();
exportData
();
}
}
$
(
"#wgt_reload"
).
click
(
function
(){
window
.
location
.
reload
();
if
(
$
(
"#wgt_display"
).
hasClass
(
"selected"
)){
$
(
"#wgt_edit"
).
trigger
(
"click"
);
$
(
"#wgt_display"
).
trigger
(
"click"
);
}
else
{
$
(
"#wgt_display"
).
trigger
(
"click"
);
}
});
$
(
"#wgt_reload, #wgt_display, #wgt_edit"
).
mouseover
(
function
(){
exportData
();
});
$
(
".style_select"
).
change
(
function
(
event
){
...
...
@@ -131,9 +140,9 @@ function start(){
$
(
"<button class='del_category'>-</button>"
).
appendTo
(
$
(
this
));
$
(
"<button class='add_category'>+</button>"
).
appendTo
(
$
(
this
));
$
(
this
).
attr
(
"ondragenter"
,
"return false;"
)
.
attr
(
"ondragleave"
,
"$(this).css(
\"
background-color
\"
,
\"\"
); return false;"
)
.
attr
(
"ondragover"
,
"$(this).css(
\"
background-color
\"
,
\"\"
); return false;"
)
.
attr
(
"ondrop"
,
"$(this).css(
\"
background-color
\"
,
\"\"
); return onDropTarget(this,event);"
)
.
attr
(
"ondragleave"
,
"$(this).css(
\"
background-color
\"
,
\"
#E6F6FF
\"
); return false;"
)
.
attr
(
"ondragover"
,
"$(this).css(
\"
background-color
\"
,
\"
#C3E9FF
\"
); return false;"
)
.
attr
(
"ondrop"
,
"$(this).css(
\"
background-color
\"
,
\"
#E6F6FF
\"
); return onDropTarget(this,event);"
)
.
removeClass
(
"red_cont"
)
.
removeClass
(
"green_cont"
)
.
addClass
(
"def_cont"
)
...
...
resources/library/interactivities/Cat images.wgt/locales/fr/js/script.js
View file @
ab73481a
...
...
@@ -34,12 +34,21 @@ function start(){
if
(
window
.
widget
)
{
window
.
widget
.
onleave
=
function
(){
//
exportData();
exportData
();
}
}
$
(
"#wgt_reload"
).
click
(
function
(){
window
.
location
.
reload
();
if
(
$
(
"#wgt_display"
).
hasClass
(
"selected"
)){
$
(
"#wgt_edit"
).
trigger
(
"click"
);
$
(
"#wgt_display"
).
trigger
(
"click"
);
}
else
{
$
(
"#wgt_display"
).
trigger
(
"click"
);
}
});
$
(
"#wgt_reload, #wgt_display, #wgt_edit"
).
mouseover
(
function
(){
exportData
();
});
$
(
".style_select"
).
change
(
function
(
event
){
...
...
@@ -131,9 +140,9 @@ function start(){
$
(
"<button class='del_category'>-</button>"
).
appendTo
(
$
(
this
));
$
(
"<button class='add_category'>+</button>"
).
appendTo
(
$
(
this
));
$
(
this
).
attr
(
"ondragenter"
,
"return false;"
)
.
attr
(
"ondragleave"
,
"$(this).css(
\"
background-color
\"
,
\"\"
); return false;"
)
.
attr
(
"ondragover"
,
"$(this).css(
\"
background-color
\"
,
\"\"
); return false;"
)
.
attr
(
"ondrop"
,
"$(this).css(
\"
background-color
\"
,
\"\"
); return onDropTarget(this,event);"
)
.
attr
(
"ondragleave"
,
"$(this).css(
\"
background-color
\"
,
\"
#E6F6FF
\"
); return false;"
)
.
attr
(
"ondragover"
,
"$(this).css(
\"
background-color
\"
,
\"
#C3E9FF
\"
); return false;"
)
.
attr
(
"ondrop"
,
"$(this).css(
\"
background-color
\"
,
\"
#E6F6FF
\"
); return onDropTarget(this,event);"
)
.
removeClass
(
"red_cont"
)
.
removeClass
(
"green_cont"
)
.
addClass
(
"def_cont"
)
...
...
resources/library/interactivities/Cat images.wgt/locales/ru/js/script.js
View file @
ab73481a
...
...
@@ -34,12 +34,21 @@ function start(){
if
(
window
.
widget
)
{
window
.
widget
.
onleave
=
function
(){
//
exportData();
exportData
();
}
}
$
(
"#wgt_reload"
).
click
(
function
(){
window
.
location
.
reload
();
if
(
$
(
"#wgt_display"
).
hasClass
(
"selected"
)){
$
(
"#wgt_edit"
).
trigger
(
"click"
);
$
(
"#wgt_display"
).
trigger
(
"click"
);
}
else
{
$
(
"#wgt_display"
).
trigger
(
"click"
);
}
});
$
(
"#wgt_reload, #wgt_display, #wgt_edit"
).
mouseover
(
function
(){
exportData
();
});
$
(
".style_select"
).
change
(
function
(
event
){
...
...
@@ -131,9 +140,9 @@ function start(){
$
(
"<button class='del_category'>-</button>"
).
appendTo
(
$
(
this
));
$
(
"<button class='add_category'>+</button>"
).
appendTo
(
$
(
this
));
$
(
this
).
attr
(
"ondragenter"
,
"return false;"
)
.
attr
(
"ondragleave"
,
"$(this).css(
\"
background-color
\"
,
\"\"
); return false;"
)
.
attr
(
"ondragover"
,
"$(this).css(
\"
background-color
\"
,
\"\"
); return false;"
)
.
attr
(
"ondrop"
,
"$(this).css(
\"
background-color
\"
,
\"\"
); return onDropTarget(this,event);"
)
.
attr
(
"ondragleave"
,
"$(this).css(
\"
background-color
\"
,
\"
#E6F6FF
\"
); return false;"
)
.
attr
(
"ondragover"
,
"$(this).css(
\"
background-color
\"
,
\"
#C3E9FF
\"
); return false;"
)
.
attr
(
"ondrop"
,
"$(this).css(
\"
background-color
\"
,
\"
#E6F6FF
\"
); return onDropTarget(this,event);"
)
.
removeClass
(
"red_cont"
)
.
removeClass
(
"green_cont"
)
.
addClass
(
"def_cont"
)
...
...
resources/library/interactivities/Cat text.wgt/js/script.js
View file @
ab73481a
...
...
@@ -40,12 +40,21 @@ function start(){
if
(
window
.
widget
)
{
window
.
widget
.
onleave
=
function
(){
//
exportData();
exportData
();
}
}
$
(
"#wgt_reload"
).
click
(
function
(){
window
.
location
.
reload
();
if
(
$
(
"#wgt_display"
).
hasClass
(
"selected"
)){
$
(
"#wgt_edit"
).
trigger
(
"click"
);
$
(
"#wgt_display"
).
trigger
(
"click"
);
}
else
{
$
(
"#wgt_display"
).
trigger
(
"click"
);
}
});
$
(
"#wgt_reload, #wgt_display, #wgt_edit"
).
mouseover
(
function
(){
exportData
();
});
$
(
".style_select"
).
change
(
function
(
event
){
...
...
@@ -202,13 +211,6 @@ function start(){
$
(
this
).
parent
().
remove
();
}
});
$
(
".text_cont"
).
live
(
"blur"
,
function
(){
exportData
();
}).
live
(
"keyup"
,
function
(
e
){
if
(
e
.
keyCode
==
13
)
exportData
();
});
}
//export
...
...
resources/library/interactivities/Cat text.wgt/locales/fr/js/script.js
View file @
ab73481a
...
...
@@ -13,8 +13,8 @@ var sankoreLang = {
text
:
"Texte"
,
wgt_name
:
"Catégoriser des textes"
,
reload
:
"Recharger"
,
slate
:
"
Ardoise
"
,
pad
:
"
Tablette
"
slate
:
"
Bois
"
,
pad
:
"
Pad
"
};
//main function
...
...
@@ -40,12 +40,21 @@ function start(){
if
(
window
.
widget
)
{
window
.
widget
.
onleave
=
function
(){
//
exportData();
exportData
();
}
}
$
(
"#wgt_reload"
).
click
(
function
(){
window
.
location
.
reload
();
if
(
$
(
"#wgt_display"
).
hasClass
(
"selected"
)){
$
(
"#wgt_edit"
).
trigger
(
"click"
);
$
(
"#wgt_display"
).
trigger
(
"click"
);
}
else
{
$
(
"#wgt_display"
).
trigger
(
"click"
);
}
});
$
(
"#wgt_reload, #wgt_display, #wgt_edit"
).
mouseover
(
function
(){
exportData
();
});
$
(
".style_select"
).
change
(
function
(
event
){
...
...
@@ -202,13 +211,6 @@ function start(){
$
(
this
).
parent
().
remove
();
}
});
$
(
".text_cont"
).
live
(
"blur"
,
function
(){
exportData
();
}).
live
(
"keyup"
,
function
(
e
){
if
(
e
.
keyCode
==
13
)
exportData
();
});
}
//export
...
...
resources/library/interactivities/Cat text.wgt/locales/ru/js/script.js
View file @
ab73481a
...
...
@@ -40,12 +40,21 @@ function start(){
if
(
window
.
widget
)
{
window
.
widget
.
onleave
=
function
(){
//
exportData();
exportData
();
}
}
$
(
"#wgt_reload"
).
click
(
function
(){
window
.
location
.
reload
();
if
(
$
(
"#wgt_display"
).
hasClass
(
"selected"
)){
$
(
"#wgt_edit"
).
trigger
(
"click"
);
$
(
"#wgt_display"
).
trigger
(
"click"
);
}
else
{
$
(
"#wgt_display"
).
trigger
(
"click"
);
}
});
$
(
"#wgt_reload, #wgt_display, #wgt_edit"
).
mouseover
(
function
(){
exportData
();
});
$
(
".style_select"
).
change
(
function
(
event
){
...
...
@@ -202,13 +211,6 @@ function start(){
$
(
this
).
parent
().
remove
();
}
});
$
(
".text_cont"
).
live
(
"blur"
,
function
(){
exportData
();
}).
live
(
"keyup"
,
function
(
e
){
if
(
e
.
keyCode
==
13
)
exportData
();
});
}
//export
...
...
resources/library/interactivities/Ordre images.wgt/index.html
View file @
ab73481a
...
...
@@ -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
{
...
...
@@ -57,17 +58,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/Ordre images.wgt/js/script.js
View file @
ab73481a
...
...
@@ -34,12 +34,21 @@ function start(){
//events
if
(
window
.
widget
)
{
window
.
widget
.
onleave
=
function
(){
//
exportData();
exportData
();
}
}
$
(
"#wgt_reload"
).
click
(
function
(){
window
.
location
.
reload
();
if
(
$
(
"#wgt_display"
).
hasClass
(
"selected"
)){
$
(
"#wgt_edit"
).
trigger
(
"click"
);
$
(
"#wgt_display"
).
trigger
(
"click"
);
}
else
{
$
(
"#wgt_display"
).
trigger
(
"click"
);
}
});
$
(
"#wgt_reload, #wgt_display, #wgt_edit"
).
mouseover
(
function
(){
exportData
();
});
$
(
".style_select"
).
change
(
function
(
event
){
...
...
@@ -204,6 +213,10 @@ function exportData(){
array_to_export
.
push
(
cont_obj
);
}
sankore
.
setPreference
(
"odr_des_imgs"
,
JSON
.
stringify
(
array_to_export
));
if
(
$
(
"#wgt_display"
).
hasClass
(
"selected"
))
sankore
.
setPreference
(
"odr_des_imgs_state"
,
"display"
);
else
sankore
.
setPreference
(
"odr_des_imgs_state"
,
"edit"
);
}
//import
...
...
@@ -240,13 +253,19 @@ function importData(data){
img_block
.
append
(
hidden_input
).
append
(
img
);
tmp_array
.
push
(
img_block
);
}
tmp_array
=
shuffle
(
tmp_array
);
if
(
sankore
.
preference
(
"odr_des_imgs_state"
,
""
)){
if
(
sankore
.
preference
(
"odr_des_imgs_state"
,
""
)
==
"edit"
)
tmp_array
=
shuffle
(
tmp_array
);
}
else
tmp_array
=
shuffle
(
tmp_array
);
for
(
j
=
0
;
j
<
tmp_array
.
length
;
j
++
)
tmp_array
[
j
].
appendTo
(
imgs_container
);
imgs_container
.
sortable
(
{
update
:
checkResult
}
);
imgs_container
.
sortable
(
).
bind
(
'sortupdate'
,
function
(
event
,
ui
)
{
checkResult
(
event
);
}
);
container
.
appendTo
(
"#data"
);
imgs_container
.
trigger
(
"sortupdate"
)
}
}
}
...
...
@@ -286,9 +305,9 @@ function showExample(){
tmp_array
=
shuffle
(
tmp_array
);
for
(
var
i
=
0
;
i
<
tmp_array
.
length
;
i
++
)
tmp_array
[
i
].
appendTo
(
imgs_container
);
imgs_container
.
sortable
(
{
update
:
checkResult
}
);
imgs_container
.
sortable
(
).
bind
(
'sortupdate'
,
function
(
event
,
ui
)
{
checkResult
(
event
);
});
container
.
appendTo
(
"#data"
);
}
...
...
resources/library/interactivities/Ordre images.wgt/locales/fr/js/script.js
View file @
ab73481a
...
...
@@ -35,12 +35,21 @@ function start(){
//events
if
(
window
.
widget
)
{
window
.
widget
.
onleave
=
function
(){
//
exportData();
exportData
();
}
}
$
(
"#wgt_reload"
).
click
(
function
(){
window
.
location
.
reload
();
if
(
$
(
"#wgt_display"
).
hasClass
(
"selected"
)){
$
(
"#wgt_edit"
).
trigger
(
"click"
);
$
(
"#wgt_display"
).
trigger
(
"click"
);
}
else
{
$
(
"#wgt_display"
).
trigger
(
"click"
);
}
});
$
(
"#wgt_reload, #wgt_display, #wgt_edit"
).
mouseover
(
function
(){
exportData
();
});
$
(
".style_select"
).
change
(
function
(
event
){
...
...
@@ -205,6 +214,10 @@ function exportData(){
array_to_export
.
push
(
cont_obj
);
}
sankore
.
setPreference
(
"odr_des_imgs"
,
JSON
.
stringify
(
array_to_export
));
if
(
$
(
"#wgt_display"
).
hasClass
(
"selected"
))
sankore
.
setPreference
(
"odr_des_imgs_state"
,
"display"
);
else
sankore
.
setPreference
(
"odr_des_imgs_state"
,
"edit"
);
}
//import
...
...
@@ -240,13 +253,19 @@ function importData(data){
img_block
.
append
(
hidden_input
).
append
(
img
);
tmp_array
.
push
(
img_block
);
}
tmp_array
=
shuffle
(
tmp_array
);
if
(
sankore
.
preference
(
"odr_des_imgs_state"
,
""
)){
if
(
sankore
.
preference
(
"odr_des_imgs_state"
,
""
)
==
"edit"
)
tmp_array
=
shuffle
(
tmp_array
);
}
else
tmp_array
=
shuffle
(
tmp_array
);
for
(
j
=
0
;
j
<
tmp_array
.
length
;
j
++
)
tmp_array
[
j
].
appendTo
(
imgs_container
);
imgs_container
.
sortable
(
{
update
:
checkResult
}
);
imgs_container
.
sortable
(
).
bind
(
'sortupdate'
,
function
(
event
,
ui
)
{
checkResult
(
event
);
}
);
container
.
appendTo
(
"#data"
);
imgs_container
.
trigger
(
"sortupdate"
)
}
}
}
...
...
@@ -286,9 +305,9 @@ function showExample(){
tmp_array
=
shuffle
(
tmp_array
);
for
(
var
i
=
0
;
i
<
tmp_array
.
length
;
i
++
)
tmp_array
[
i
].
appendTo
(
imgs_container
);
imgs_container
.
sortable
(
{
update
:
checkResult
}
);
imgs_container
.
sortable
(
).
bind
(
'sortupdate'
,
function
(
event
,
ui
)
{
checkResult
(
event
);
});
container
.
appendTo
(
"#data"
);
}
...
...
resources/library/interactivities/Ordre images.wgt/locales/ru/js/script.js
View file @
ab73481a
...
...
@@ -35,12 +35,21 @@ function start(){
//events
if
(
window
.
widget
)
{
window
.
widget
.
onleave
=
function
(){
//
exportData();
exportData
();
}
}
$
(
"#wgt_reload"
).
click
(
function
(){
window
.
location
.
reload
();
if
(
$
(
"#wgt_display"
).
hasClass
(
"selected"
)){
$
(
"#wgt_edit"
).
trigger
(
"click"
);
$
(
"#wgt_display"
).
trigger
(
"click"
);
}
else
{
$
(
"#wgt_display"
).
trigger
(
"click"
);
}
});
$
(
"#wgt_reload, #wgt_display, #wgt_edit"
).
mouseover
(
function
(){
exportData
();
});
$
(
".style_select"
).
change
(
function
(
event
){
...
...
@@ -205,6 +214,10 @@ function exportData(){
array_to_export
.
push
(
cont_obj
);
}
sankore
.
setPreference
(
"odr_des_imgs"
,
JSON
.
stringify
(
array_to_export
));
if
(
$
(
"#wgt_display"
).
hasClass
(
"selected"
))
sankore
.
setPreference
(
"odr_des_imgs_state"
,
"display"
);
else
sankore
.
setPreference
(
"odr_des_imgs_state"
,
"edit"
);
}
//import
...
...
@@ -240,13 +253,19 @@ function importData(data){
img_block
.
append
(
hidden_input
).
append
(
img
);
tmp_array
.
push
(
img_block
);
}
tmp_array
=
shuffle
(
tmp_array
);
if
(
sankore
.
preference
(
"odr_des_imgs_state"
,
""
)){
if
(
sankore
.
preference
(
"odr_des_imgs_state"
,
""
)
==
"edit"
)
tmp_array
=
shuffle
(
tmp_array
);
}
else
tmp_array
=
shuffle
(
tmp_array
);
for
(
j
=
0
;
j
<
tmp_array
.
length
;
j
++
)
tmp_array
[
j
].
appendTo
(
imgs_container
);
imgs_container
.
sortable
(
{
update
:
checkResult
}
);
imgs_container
.
sortable
(
).
bind
(
'sortupdate'
,
function
(
event
,
ui
)
{
checkResult
(
event
);
}
);
container
.
appendTo
(
"#data"
);
imgs_container
.
trigger
(
"sortupdate"
)
}
}
}
...
...
@@ -286,9 +305,9 @@ function showExample(){
tmp_array
=
shuffle
(
tmp_array
);
for
(
var
i
=
0
;
i
<
tmp_array
.
length
;
i
++
)
tmp_array
[
i
].
appendTo
(
imgs_container
);
imgs_container
.
sortable
(
{
update
:
checkResult
}
);
imgs_container
.
sortable
(
).
bind
(
'sortupdate'
,
function
(
event
,
ui
)
{
checkResult
(
event
);
});
container
.
appendTo
(
"#data"
);
}
...
...
@@ -467,4 +486,3 @@ function onDropTarget(obj, event) {
}
return
false
;
}
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