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
f7a5176c
Commit
f7a5176c
authored
Jun 28, 2012
by
unknown
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed etudier widget
parent
c5c30bd2
Changes
12
Show whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
147 additions
and
46 deletions
+147
-46
basic.css
resources/nonDistributedWidgets/Etudier.wgt/css/basic.css
+24
-0
size_down.png
...urces/nonDistributedWidgets/Etudier.wgt/img/size_down.png
+0
-0
size_up.png
resources/nonDistributedWidgets/Etudier.wgt/img/size_up.png
+0
-0
turn_left.png
...urces/nonDistributedWidgets/Etudier.wgt/img/turn_left.png
+0
-0
turn_right.png
...rces/nonDistributedWidgets/Etudier.wgt/img/turn_right.png
+0
-0
index.html
resources/nonDistributedWidgets/Etudier.wgt/index.html
+1
-2
easySlider1.5.js
...ces/nonDistributedWidgets/Etudier.wgt/js/easySlider1.5.js
+20
-6
script.js
resources/nonDistributedWidgets/Etudier.wgt/js/script.js
+33
-11
index.html
...s/nonDistributedWidgets/Etudier.wgt/locales/fr/index.html
+1
-2
script.js
...nonDistributedWidgets/Etudier.wgt/locales/fr/js/script.js
+33
-11
index.html
...s/nonDistributedWidgets/Etudier.wgt/locales/ru/index.html
+1
-2
script.js
...nonDistributedWidgets/Etudier.wgt/locales/ru/js/script.js
+34
-12
No files found.
resources/nonDistributedWidgets/Etudier.wgt/css/basic.css
View file @
f7a5176c
...
@@ -76,6 +76,28 @@ body{
...
@@ -76,6 +76,28 @@ body{
cursor
:
pointer
;
cursor
:
pointer
;
}
}
.size_up
{
width
:
20px
;
height
:
20px
;
background-repeat
:
no-repeat
;
position
:
absolute
;
background-image
:
url(../img/size_up.png)
;
top
:
-15px
;
right
:
20px
;
cursor
:
pointer
;
}
.size_down
{
width
:
20px
;
height
:
20px
;
background-repeat
:
no-repeat
;
position
:
absolute
;
background-image
:
url(../img/size_down.png)
;
top
:
-15px
;
right
:
45px
;
cursor
:
pointer
;
}
.dropHere
{
.dropHere
{
background-color
:
#ccc
;
background-color
:
#ccc
;
}
}
...
@@ -183,6 +205,8 @@ li>div{
...
@@ -183,6 +205,8 @@ li>div{
position
:
absolute
;
position
:
absolute
;
top
:
50px
;
top
:
50px
;
left
:
100px
;
left
:
100px
;
background-color
:
white
;
border-radius
:
10px
;
}
}
.block_border
{
.block_border
{
...
...
resources/nonDistributedWidgets/Etudier.wgt/img/size_down.png
0 → 100644
View file @
f7a5176c
1.63 KB
resources/nonDistributedWidgets/Etudier.wgt/img/size_up.png
0 → 100644
View file @
f7a5176c
1.67 KB
resources/nonDistributedWidgets/Etudier.wgt/img/turn_left.png
View replaced file @
c5c30bd2
View file @
f7a5176c
4.4 KB
|
W:
|
H:
3.14 KB
|
W:
|
H:
2-up
Swipe
Onion skin
resources/nonDistributedWidgets/Etudier.wgt/img/turn_right.png
View replaced file @
c5c30bd2
View file @
f7a5176c
4.22 KB
|
W:
|
H:
3.2 KB
|
W:
|
H:
2-up
Swipe
Onion skin
resources/nonDistributedWidgets/Etudier.wgt/index.html
View file @
f7a5176c
...
@@ -49,7 +49,6 @@
...
@@ -49,7 +49,6 @@
<td
class=
"b_top_left"
>
</td>
<td
class=
"b_top_left"
>
</td>
<td
class=
"b_top_center"
>
<td
class=
"b_top_center"
>
<div
id=
"wgt_name"
></div>
<div
id=
"wgt_name"
></div>
<div
id=
"wgt_reload"
></div>
<div
id=
"wgt_display"
class=
"selected"
></div>
<div
id=
"wgt_display"
class=
"selected"
></div>
<div
id=
"wgt_edit"
></div>
<div
id=
"wgt_edit"
></div>
<select
class=
"style_select"
>
<select
class=
"style_select"
>
...
...
resources/nonDistributedWidgets/Etudier.wgt/js/easySlider1.5.js
View file @
f7a5176c
...
@@ -32,6 +32,21 @@
...
@@ -32,6 +32,21 @@
$
(
"a"
,
"#nextBtn"
).
trigger
(
"click"
);
$
(
"a"
,
"#nextBtn"
).
trigger
(
"click"
);
}
}
$
.
fn
.
goToSlide
=
function
(
dest
){
t
=
dest
;
p
=
(
t
*
w
*-
1
);
$
(
"ul"
,
$
(
this
)).
animate
(
{
marginLeft
:
p
},
0
);
}
$
.
fn
.
getPage
=
function
(){
return
t
;
}
$
.
fn
.
easySlider
=
function
(
options
){
$
.
fn
.
easySlider
=
function
(
options
){
// default configuration properties
// default configuration properties
...
@@ -99,10 +114,10 @@
...
@@ -99,10 +114,10 @@
var
ot
=
t
;
var
ot
=
t
;
switch
(
dir
){
switch
(
dir
){
case
"next"
:
case
"next"
:
t
=
(
ot
>=
ts
)
?
(
options
.
continuous
?
0
:
ts
)
:
t
+
1
;
t
=
(
ot
>=
ts
)
?
(
options
.
continuous
?
0
:
ts
)
:
++
t
;
break
;
break
;
case
"prev"
:
case
"prev"
:
t
=
(
t
<=
0
)
?
(
options
.
continuous
?
ts
:
0
)
:
t
-
1
;
t
=
(
t
<=
0
)
?
(
options
.
continuous
?
ts
:
0
)
:
--
t
;
break
;
break
;
case
"first"
:
case
"first"
:
t
=
0
;
t
=
0
;
...
@@ -118,7 +133,6 @@
...
@@ -118,7 +133,6 @@
var
speed
=
diff
*
options
.
speed
;
var
speed
=
diff
*
options
.
speed
;
if
(
!
options
.
vertical
)
{
if
(
!
options
.
vertical
)
{
p
=
(
t
*
w
*-
1
);
p
=
(
t
*
w
*-
1
);
console
.
log
(
w
+
" | "
+
h
+
" | "
+
p
);
$
(
"ul"
,
obj
).
animate
(
$
(
"ul"
,
obj
).
animate
(
{
{
marginLeft
:
p
marginLeft
:
p
...
...
resources/nonDistributedWidgets/Etudier.wgt/js/script.js
View file @
f7a5176c
...
@@ -5,7 +5,6 @@ var sankoreLang = {
...
@@ -5,7 +5,6 @@ var sankoreLang = {
new_txt
:
"New text block"
,
new_txt
:
"New text block"
,
new_slide
:
"This is new slide."
,
new_slide
:
"This is new slide."
,
wgt_name
:
"Slider"
,
wgt_name
:
"Slider"
,
reload
:
"Reload"
,
slate
:
"Wood"
,
slate
:
"Wood"
,
pad
:
"Pad"
pad
:
"Pad"
};
};
...
@@ -27,7 +26,6 @@ function start(){
...
@@ -27,7 +26,6 @@ function start(){
$
(
"#wgt_display"
).
text
(
sankoreLang
.
display
);
$
(
"#wgt_display"
).
text
(
sankoreLang
.
display
);
$
(
"#wgt_edit"
).
text
(
sankoreLang
.
edit
);
$
(
"#wgt_edit"
).
text
(
sankoreLang
.
edit
);
$
(
"#wgt_name"
).
text
(
sankoreLang
.
wgt_name
);
$
(
"#wgt_name"
).
text
(
sankoreLang
.
wgt_name
);
$
(
"#wgt_reload"
).
text
(
sankoreLang
.
reload
);
$
(
".style_select option[value='1']"
).
text
(
sankoreLang
.
slate
);
$
(
".style_select option[value='1']"
).
text
(
sankoreLang
.
slate
);
$
(
".style_select option[value='2']"
).
text
(
sankoreLang
.
pad
);
$
(
".style_select option[value='2']"
).
text
(
sankoreLang
.
pad
);
...
@@ -52,13 +50,12 @@ function start(){
...
@@ -52,13 +50,12 @@ function start(){
window
.
widget
.
onleave
=
function
(){
window
.
widget
.
onleave
=
function
(){
exportData
();
exportData
();
sankore
.
setPreference
(
"etudier_style"
,
$
(
".style_select"
).
find
(
"option:selected"
).
val
());
sankore
.
setPreference
(
"etudier_style"
,
$
(
".style_select"
).
find
(
"option:selected"
).
val
());
sankore
.
setPreference
(
"etudier_cur_page"
,
$
(
"#slider"
).
getPage
());
sankore
.
setPreference
(
"etudier_left_nav"
,
$
(
"#prevBtn a"
).
css
(
"display"
));
sankore
.
setPreference
(
"etudier_right_nav"
,
$
(
"#nextBtn a"
).
css
(
"display"
));
}
}
}
}
$
(
"#wgt_reload"
).
click
(
function
(){
window
.
location
.
reload
();
});
$
(
".style_select"
).
change
(
function
(
event
){
$
(
".style_select"
).
change
(
function
(
event
){
changeStyle
(
$
(
this
).
find
(
"option:selected"
).
val
());
changeStyle
(
$
(
this
).
find
(
"option:selected"
).
val
());
})
})
...
@@ -83,6 +80,8 @@ function start(){
...
@@ -83,6 +80,8 @@ function start(){
$
(
this
).
draggable
();
$
(
this
).
draggable
();
$
(
this
).
find
(
".move_block"
).
remove
();
$
(
this
).
find
(
".move_block"
).
remove
();
$
(
this
).
find
(
".close_img"
).
remove
();
$
(
this
).
find
(
".close_img"
).
remove
();
$
(
this
).
find
(
".size_up"
).
remove
();
$
(
this
).
find
(
".size_down"
).
remove
();
$
(
this
).
find
(
".resize_block"
).
remove
();
$
(
this
).
find
(
".resize_block"
).
remove
();
$
(
this
).
removeAttr
(
"contenteditable"
).
removeClass
(
"block_border"
);
$
(
this
).
removeAttr
(
"contenteditable"
).
removeClass
(
"block_border"
);
$
(
this
).
css
(
"position"
,
"absolute"
);
$
(
this
).
css
(
"position"
,
"absolute"
);
...
@@ -130,6 +129,8 @@ function start(){
...
@@ -130,6 +129,8 @@ function start(){
$
(
this
).
draggable
(
"destroy"
);
$
(
this
).
draggable
(
"destroy"
);
$
(
"<div class='move_block' contenteditable='false'>"
).
appendTo
(
$
(
this
));
$
(
"<div class='move_block' contenteditable='false'>"
).
appendTo
(
$
(
this
));
$
(
"<div class='close_img' contenteditable='false'>"
).
appendTo
(
$
(
this
));
$
(
"<div class='close_img' contenteditable='false'>"
).
appendTo
(
$
(
this
));
$
(
"<div class='size_up' contenteditable='false'>"
).
appendTo
(
$
(
this
));
$
(
"<div class='size_down' contenteditable='false'>"
).
appendTo
(
$
(
this
));
$
(
"<div class='resize_block' contenteditable='false'>"
).
appendTo
(
$
(
this
));
$
(
"<div class='resize_block' contenteditable='false'>"
).
appendTo
(
$
(
this
));
$
(
this
).
attr
(
"contenteditable"
,
"true"
).
addClass
(
"block_border"
);
$
(
this
).
attr
(
"contenteditable"
,
"true"
).
addClass
(
"block_border"
);
});
});
...
@@ -169,6 +170,20 @@ function start(){
...
@@ -169,6 +170,20 @@ function start(){
$
(
this
).
parent
().
remove
();
$
(
this
).
parent
().
remove
();
});
});
//increase a size of text
$
(
".size_up"
).
live
(
"click"
,
function
(){
$
(
this
).
parent
().
height
(
""
);
var
fz
=
parseInt
(
$
(
this
).
parent
().
css
(
"font-size"
).
replace
(
"px"
,
""
));
$
(
this
).
parent
().
css
(
"font-size"
,
fz
+
1
+
"px"
);
});
//decrease a size of text
$
(
".size_down"
).
live
(
"click"
,
function
(){
var
fz
=
parseInt
(
$
(
this
).
parent
().
css
(
"font-size"
).
replace
(
"px"
,
""
));
fz
=
((
fz
-
1
)
<
8
)?
8
:
fz
-
1
;
$
(
this
).
parent
().
css
(
"font-size"
,
fz
+
"px"
);
});
//play/pause event
//play/pause event
$
(
".play, .stop"
).
live
(
"click"
,
function
(){
$
(
".play, .stop"
).
live
(
"click"
,
function
(){
var
tmp_audio
=
$
(
this
);
var
tmp_audio
=
$
(
this
);
...
@@ -250,7 +265,7 @@ function start(){
...
@@ -250,7 +265,7 @@ function start(){
var
height
=
resize_obj
.
object
.
parent
().
height
()
-
resize_obj
.
top
+
event
.
clientY
;
var
height
=
resize_obj
.
object
.
parent
().
height
()
-
resize_obj
.
top
+
event
.
clientY
;
resize_obj
.
left
=
event
.
clientX
;
resize_obj
.
left
=
event
.
clientX
;
resize_obj
.
top
=
event
.
clientY
;
resize_obj
.
top
=
event
.
clientY
;
resize_obj
.
object
.
parent
().
css
(
"width"
,
width
).
css
(
"height"
,
height
);
resize_obj
.
object
.
parent
().
width
(
width
).
height
(
height
);
}
else
{
}
else
{
width
=
resize_obj
.
object
.
parent
().
width
()
-
resize_obj
.
left
+
event
.
clientX
;
width
=
resize_obj
.
object
.
parent
().
width
()
-
resize_obj
.
left
+
event
.
clientX
;
height
=
resize_obj
.
object
.
parent
().
height
()
-
resize_obj
.
top
+
event
.
clientY
;
height
=
resize_obj
.
object
.
parent
().
height
()
-
resize_obj
.
top
+
event
.
clientY
;
...
@@ -258,8 +273,8 @@ function start(){
...
@@ -258,8 +273,8 @@ function start(){
var
img_height
=
resize_obj
.
object
.
parent
().
find
(
"img"
).
height
()
-
resize_obj
.
top
+
event
.
clientY
;
var
img_height
=
resize_obj
.
object
.
parent
().
find
(
"img"
).
height
()
-
resize_obj
.
top
+
event
.
clientY
;
resize_obj
.
left
=
event
.
clientX
;
resize_obj
.
left
=
event
.
clientX
;
resize_obj
.
top
=
event
.
clientY
;
resize_obj
.
top
=
event
.
clientY
;
resize_obj
.
object
.
parent
().
css
(
"width"
,
width
).
css
(
"height"
,
height
);
resize_obj
.
object
.
parent
().
width
(
width
).
height
(
height
);
resize_obj
.
object
.
parent
().
find
(
"img"
).
css
(
"width"
,
img_width
).
css
(
"height"
,
img_height
);
resize_obj
.
object
.
parent
().
find
(
"img"
).
width
(
img_width
).
height
(
img_height
);
}
}
}
}
});
});
...
@@ -322,6 +337,8 @@ function start(){
...
@@ -322,6 +337,8 @@ function start(){
var
text_block
=
$
(
"<div class='text_block'>"
+
sankoreLang
.
new_txt
+
"</div>"
).
appendTo
(
container
);
var
text_block
=
$
(
"<div class='text_block'>"
+
sankoreLang
.
new_txt
+
"</div>"
).
appendTo
(
container
);
$
(
"<div class='move_block' contenteditable='false'>"
).
appendTo
(
text_block
);
$
(
"<div class='move_block' contenteditable='false'>"
).
appendTo
(
text_block
);
$
(
"<div class='close_img' 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
);
$
(
"<div class='resize_block' contenteditable='false'>"
).
appendTo
(
text_block
);
text_block
.
attr
(
"contenteditable"
,
"true"
).
addClass
(
"block_border"
);
text_block
.
attr
(
"contenteditable"
,
"true"
).
addClass
(
"block_border"
);
});
});
...
@@ -341,6 +358,7 @@ function exportData(){
...
@@ -341,6 +358,7 @@ function exportData(){
txt_block
.
left
=
$
(
this
).
position
().
left
;
txt_block
.
left
=
$
(
this
).
position
().
left
;
txt_block
.
h
=
$
(
this
).
height
();
txt_block
.
h
=
$
(
this
).
height
();
txt_block
.
w
=
$
(
this
).
width
();
txt_block
.
w
=
$
(
this
).
width
();
txt_block
.
fz
=
$
(
this
).
css
(
"font-size"
);
txt_block
.
val
=
$
(
this
).
text
();
txt_block
.
val
=
$
(
this
).
text
();
cont_obj
.
text
.
push
(
txt_block
);
cont_obj
.
text
.
push
(
txt_block
);
});
});
...
@@ -389,6 +407,7 @@ function importData(data){
...
@@ -389,6 +407,7 @@ function importData(data){
.
height
(
data
[
i
].
text
[
j
].
h
)
.
height
(
data
[
i
].
text
[
j
].
h
)
.
css
(
"top"
,
data
[
i
].
text
[
j
].
top
)
.
css
(
"top"
,
data
[
i
].
text
[
j
].
top
)
.
css
(
"left"
,
data
[
i
].
text
[
j
].
left
)
.
css
(
"left"
,
data
[
i
].
text
[
j
].
left
)
.
css
(
"font-size"
,
data
[
i
].
text
[
j
].
fz
)
.
appendTo
(
div
);
.
appendTo
(
div
);
}
}
...
@@ -418,11 +437,15 @@ function importData(data){
...
@@ -418,11 +437,15 @@ function importData(data){
$
(
"#slider ul"
).
append
(
li
);
$
(
"#slider ul"
).
append
(
li
);
}
}
$
(
window
).
trigger
(
"resize"
)
$
(
"#slider"
).
width
(
width
).
height
(
height
).
easySlider
({
$
(
"#slider"
).
width
(
width
).
height
(
height
).
easySlider
({
prevText
:
''
,
prevText
:
''
,
nextText
:
''
,
nextText
:
''
,
controlsShow
:
false
controlsShow
:
false
});
});
$
(
"#slider"
).
goToSlide
(
sankore
.
preference
(
"etudier_cur_page"
,
""
));
$
(
"#prevBtn a"
).
css
(
"display"
,
sankore
.
preference
(
"etudier_left_nav"
,
""
));
$
(
"#nextBtn a"
).
css
(
"display"
,
sankore
.
preference
(
"etudier_right_nav"
,
""
));
}
}
//example
//example
...
@@ -442,6 +465,7 @@ function showExample(){
...
@@ -442,6 +465,7 @@ function showExample(){
var
li3
=
$
(
"<li>"
);
var
li3
=
$
(
"<li>"
);
var
div3
=
$
(
"<div>"
).
appendTo
(
li3
);
var
div3
=
$
(
"<div>"
).
appendTo
(
li3
);
li3
.
width
(
$
(
"#slider"
).
width
()).
height
(
$
(
"#slider"
).
height
());
li3
.
width
(
$
(
"#slider"
).
width
()).
height
(
$
(
"#slider"
).
height
());
$
(
"<div class='text_block'>ololo</div>"
).
draggable
().
appendTo
(
div3
);
var
audio_block
=
$
(
"<div class='audio_block'>"
).
draggable
().
appendTo
(
div3
);
var
audio_block
=
$
(
"<div class='audio_block'>"
).
draggable
().
appendTo
(
div3
);
$
(
"<div class='play'>"
).
appendTo
(
audio_block
);
$
(
"<div class='play'>"
).
appendTo
(
audio_block
);
$
(
"<div class='replay'>"
).
appendTo
(
audio_block
);
$
(
"<div class='replay'>"
).
appendTo
(
audio_block
);
...
@@ -496,7 +520,6 @@ function changeStyle(val){
...
@@ -496,7 +520,6 @@ function changeStyle(val){
$
(
".b_bottom_right"
).
removeClass
(
"bbr_pad"
);
$
(
".b_bottom_right"
).
removeClass
(
"bbr_pad"
);
$
(
".b_bottom_left"
).
removeClass
(
"bbl_pad"
);
$
(
".b_bottom_left"
).
removeClass
(
"bbl_pad"
);
$
(
".b_bottom_center"
).
removeClass
(
"bbc_pad"
);
$
(
".b_bottom_center"
).
removeClass
(
"bbc_pad"
);
$
(
"#wgt_reload"
).
removeClass
(
"pad_color"
).
removeClass
(
"pad_reload"
);
$
(
"#wgt_edit"
).
removeClass
(
"pad_color"
).
removeClass
(
"pad_edit"
);
$
(
"#wgt_edit"
).
removeClass
(
"pad_color"
).
removeClass
(
"pad_edit"
);
$
(
"#wgt_display"
).
removeClass
(
"pad_color"
).
removeClass
(
"pad_edit"
);
$
(
"#wgt_display"
).
removeClass
(
"pad_color"
).
removeClass
(
"pad_edit"
);
$
(
"#wgt_name"
).
removeClass
(
"pad_color"
);
$
(
"#wgt_name"
).
removeClass
(
"pad_color"
);
...
@@ -510,7 +533,6 @@ function changeStyle(val){
...
@@ -510,7 +533,6 @@ function changeStyle(val){
$
(
".b_bottom_right"
).
addClass
(
"bbr_pad"
);
$
(
".b_bottom_right"
).
addClass
(
"bbr_pad"
);
$
(
".b_bottom_left"
).
addClass
(
"bbl_pad"
);
$
(
".b_bottom_left"
).
addClass
(
"bbl_pad"
);
$
(
".b_bottom_center"
).
addClass
(
"bbc_pad"
);
$
(
".b_bottom_center"
).
addClass
(
"bbc_pad"
);
$
(
"#wgt_reload"
).
addClass
(
"pad_color"
).
addClass
(
"pad_reload"
);
$
(
"#wgt_edit"
).
addClass
(
"pad_color"
).
addClass
(
"pad_edit"
);
$
(
"#wgt_edit"
).
addClass
(
"pad_color"
).
addClass
(
"pad_edit"
);
$
(
"#wgt_display"
).
addClass
(
"pad_color"
).
addClass
(
"pad_edit"
);
$
(
"#wgt_display"
).
addClass
(
"pad_color"
).
addClass
(
"pad_edit"
);
$
(
"#wgt_name"
).
addClass
(
"pad_color"
);
$
(
"#wgt_name"
).
addClass
(
"pad_color"
);
...
...
resources/nonDistributedWidgets/Etudier.wgt/locales/fr/index.html
View file @
f7a5176c
...
@@ -23,7 +23,6 @@
...
@@ -23,7 +23,6 @@
<td
class=
"b_top_left"
>
</td>
<td
class=
"b_top_left"
>
</td>
<td
class=
"b_top_center"
>
<td
class=
"b_top_center"
>
<div
id=
"wgt_name"
></div>
<div
id=
"wgt_name"
></div>
<div
id=
"wgt_reload"
></div>
<div
id=
"wgt_display"
class=
"selected"
></div>
<div
id=
"wgt_display"
class=
"selected"
></div>
<div
id=
"wgt_edit"
></div>
<div
id=
"wgt_edit"
></div>
<select
class=
"style_select"
>
<select
class=
"style_select"
>
...
...
resources/nonDistributedWidgets/Etudier.wgt/locales/fr/js/script.js
View file @
f7a5176c
...
@@ -5,7 +5,6 @@ var sankoreLang = {
...
@@ -5,7 +5,6 @@ var sankoreLang = {
new_txt
:
"Nouveau bloc de texte"
,
new_txt
:
"Nouveau bloc de texte"
,
new_slide
:
"Ceci est une nouvelle diapositive."
,
new_slide
:
"Ceci est une nouvelle diapositive."
,
wgt_name
:
"Etudier"
,
wgt_name
:
"Etudier"
,
reload
:
"Recharger"
,
slate
:
"Bois"
,
slate
:
"Bois"
,
pad
:
"Pad"
pad
:
"Pad"
};
};
...
@@ -27,7 +26,6 @@ function start(){
...
@@ -27,7 +26,6 @@ function start(){
$
(
"#wgt_display"
).
text
(
sankoreLang
.
display
);
$
(
"#wgt_display"
).
text
(
sankoreLang
.
display
);
$
(
"#wgt_edit"
).
text
(
sankoreLang
.
edit
);
$
(
"#wgt_edit"
).
text
(
sankoreLang
.
edit
);
$
(
"#wgt_name"
).
text
(
sankoreLang
.
wgt_name
);
$
(
"#wgt_name"
).
text
(
sankoreLang
.
wgt_name
);
$
(
"#wgt_reload"
).
text
(
sankoreLang
.
reload
);
$
(
".style_select option[value='1']"
).
text
(
sankoreLang
.
slate
);
$
(
".style_select option[value='1']"
).
text
(
sankoreLang
.
slate
);
$
(
".style_select option[value='2']"
).
text
(
sankoreLang
.
pad
);
$
(
".style_select option[value='2']"
).
text
(
sankoreLang
.
pad
);
...
@@ -52,13 +50,12 @@ function start(){
...
@@ -52,13 +50,12 @@ function start(){
window
.
widget
.
onleave
=
function
(){
window
.
widget
.
onleave
=
function
(){
exportData
();
exportData
();
sankore
.
setPreference
(
"etudier_style"
,
$
(
".style_select"
).
find
(
"option:selected"
).
val
());
sankore
.
setPreference
(
"etudier_style"
,
$
(
".style_select"
).
find
(
"option:selected"
).
val
());
sankore
.
setPreference
(
"etudier_cur_page"
,
$
(
"#slider"
).
getPage
());
sankore
.
setPreference
(
"etudier_left_nav"
,
$
(
"#prevBtn a"
).
css
(
"display"
));
sankore
.
setPreference
(
"etudier_right_nav"
,
$
(
"#nextBtn a"
).
css
(
"display"
));
}
}
}
}
$
(
"#wgt_reload"
).
click
(
function
(){
window
.
location
.
reload
();
});
$
(
".style_select"
).
change
(
function
(
event
){
$
(
".style_select"
).
change
(
function
(
event
){
changeStyle
(
$
(
this
).
find
(
"option:selected"
).
val
());
changeStyle
(
$
(
this
).
find
(
"option:selected"
).
val
());
})
})
...
@@ -83,6 +80,8 @@ function start(){
...
@@ -83,6 +80,8 @@ function start(){
$
(
this
).
draggable
();
$
(
this
).
draggable
();
$
(
this
).
find
(
".move_block"
).
remove
();
$
(
this
).
find
(
".move_block"
).
remove
();
$
(
this
).
find
(
".close_img"
).
remove
();
$
(
this
).
find
(
".close_img"
).
remove
();
$
(
this
).
find
(
".size_up"
).
remove
();
$
(
this
).
find
(
".size_down"
).
remove
();
$
(
this
).
find
(
".resize_block"
).
remove
();
$
(
this
).
find
(
".resize_block"
).
remove
();
$
(
this
).
removeAttr
(
"contenteditable"
).
removeClass
(
"block_border"
);
$
(
this
).
removeAttr
(
"contenteditable"
).
removeClass
(
"block_border"
);
$
(
this
).
css
(
"position"
,
"absolute"
);
$
(
this
).
css
(
"position"
,
"absolute"
);
...
@@ -130,6 +129,8 @@ function start(){
...
@@ -130,6 +129,8 @@ function start(){
$
(
this
).
draggable
(
"destroy"
);
$
(
this
).
draggable
(
"destroy"
);
$
(
"<div class='move_block' contenteditable='false'>"
).
appendTo
(
$
(
this
));
$
(
"<div class='move_block' contenteditable='false'>"
).
appendTo
(
$
(
this
));
$
(
"<div class='close_img' contenteditable='false'>"
).
appendTo
(
$
(
this
));
$
(
"<div class='close_img' contenteditable='false'>"
).
appendTo
(
$
(
this
));
$
(
"<div class='size_up' contenteditable='false'>"
).
appendTo
(
$
(
this
));
$
(
"<div class='size_down' contenteditable='false'>"
).
appendTo
(
$
(
this
));
$
(
"<div class='resize_block' contenteditable='false'>"
).
appendTo
(
$
(
this
));
$
(
"<div class='resize_block' contenteditable='false'>"
).
appendTo
(
$
(
this
));
$
(
this
).
attr
(
"contenteditable"
,
"true"
).
addClass
(
"block_border"
);
$
(
this
).
attr
(
"contenteditable"
,
"true"
).
addClass
(
"block_border"
);
});
});
...
@@ -169,6 +170,20 @@ function start(){
...
@@ -169,6 +170,20 @@ function start(){
$
(
this
).
parent
().
remove
();
$
(
this
).
parent
().
remove
();
});
});
//increase a size of text
$
(
".size_up"
).
live
(
"click"
,
function
(){
$
(
this
).
parent
().
height
(
""
);
var
fz
=
parseInt
(
$
(
this
).
parent
().
css
(
"font-size"
).
replace
(
"px"
,
""
));
$
(
this
).
parent
().
css
(
"font-size"
,
fz
+
1
+
"px"
);
});
//decrease a size of text
$
(
".size_down"
).
live
(
"click"
,
function
(){
var
fz
=
parseInt
(
$
(
this
).
parent
().
css
(
"font-size"
).
replace
(
"px"
,
""
));
fz
=
((
fz
-
1
)
<
8
)?
8
:
fz
-
1
;
$
(
this
).
parent
().
css
(
"font-size"
,
fz
+
"px"
);
});
//play/pause event
//play/pause event
$
(
".play, .stop"
).
live
(
"click"
,
function
(){
$
(
".play, .stop"
).
live
(
"click"
,
function
(){
var
tmp_audio
=
$
(
this
);
var
tmp_audio
=
$
(
this
);
...
@@ -250,7 +265,7 @@ function start(){
...
@@ -250,7 +265,7 @@ function start(){
var
height
=
resize_obj
.
object
.
parent
().
height
()
-
resize_obj
.
top
+
event
.
clientY
;
var
height
=
resize_obj
.
object
.
parent
().
height
()
-
resize_obj
.
top
+
event
.
clientY
;
resize_obj
.
left
=
event
.
clientX
;
resize_obj
.
left
=
event
.
clientX
;
resize_obj
.
top
=
event
.
clientY
;
resize_obj
.
top
=
event
.
clientY
;
resize_obj
.
object
.
parent
().
css
(
"width"
,
width
).
css
(
"height"
,
height
);
resize_obj
.
object
.
parent
().
width
(
width
).
height
(
height
);
}
else
{
}
else
{
width
=
resize_obj
.
object
.
parent
().
width
()
-
resize_obj
.
left
+
event
.
clientX
;
width
=
resize_obj
.
object
.
parent
().
width
()
-
resize_obj
.
left
+
event
.
clientX
;
height
=
resize_obj
.
object
.
parent
().
height
()
-
resize_obj
.
top
+
event
.
clientY
;
height
=
resize_obj
.
object
.
parent
().
height
()
-
resize_obj
.
top
+
event
.
clientY
;
...
@@ -258,8 +273,8 @@ function start(){
...
@@ -258,8 +273,8 @@ function start(){
var
img_height
=
resize_obj
.
object
.
parent
().
find
(
"img"
).
height
()
-
resize_obj
.
top
+
event
.
clientY
;
var
img_height
=
resize_obj
.
object
.
parent
().
find
(
"img"
).
height
()
-
resize_obj
.
top
+
event
.
clientY
;
resize_obj
.
left
=
event
.
clientX
;
resize_obj
.
left
=
event
.
clientX
;
resize_obj
.
top
=
event
.
clientY
;
resize_obj
.
top
=
event
.
clientY
;
resize_obj
.
object
.
parent
().
css
(
"width"
,
width
).
css
(
"height"
,
height
);
resize_obj
.
object
.
parent
().
width
(
width
).
height
(
height
);
resize_obj
.
object
.
parent
().
find
(
"img"
).
css
(
"width"
,
img_width
).
css
(
"height"
,
img_height
);
resize_obj
.
object
.
parent
().
find
(
"img"
).
width
(
img_width
).
height
(
img_height
);
}
}
}
}
});
});
...
@@ -322,6 +337,8 @@ function start(){
...
@@ -322,6 +337,8 @@ function start(){
var
text_block
=
$
(
"<div class='text_block'>"
+
sankoreLang
.
new_txt
+
"</div>"
).
appendTo
(
container
);
var
text_block
=
$
(
"<div class='text_block'>"
+
sankoreLang
.
new_txt
+
"</div>"
).
appendTo
(
container
);
$
(
"<div class='move_block' contenteditable='false'>"
).
appendTo
(
text_block
);
$
(
"<div class='move_block' contenteditable='false'>"
).
appendTo
(
text_block
);
$
(
"<div class='close_img' 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
);
$
(
"<div class='resize_block' contenteditable='false'>"
).
appendTo
(
text_block
);
text_block
.
attr
(
"contenteditable"
,
"true"
).
addClass
(
"block_border"
);
text_block
.
attr
(
"contenteditable"
,
"true"
).
addClass
(
"block_border"
);
});
});
...
@@ -341,6 +358,7 @@ function exportData(){
...
@@ -341,6 +358,7 @@ function exportData(){
txt_block
.
left
=
$
(
this
).
position
().
left
;
txt_block
.
left
=
$
(
this
).
position
().
left
;
txt_block
.
h
=
$
(
this
).
height
();
txt_block
.
h
=
$
(
this
).
height
();
txt_block
.
w
=
$
(
this
).
width
();
txt_block
.
w
=
$
(
this
).
width
();
txt_block
.
fz
=
$
(
this
).
css
(
"font-size"
);
txt_block
.
val
=
$
(
this
).
text
();
txt_block
.
val
=
$
(
this
).
text
();
cont_obj
.
text
.
push
(
txt_block
);
cont_obj
.
text
.
push
(
txt_block
);
});
});
...
@@ -389,6 +407,7 @@ function importData(data){
...
@@ -389,6 +407,7 @@ function importData(data){
.
height
(
data
[
i
].
text
[
j
].
h
)
.
height
(
data
[
i
].
text
[
j
].
h
)
.
css
(
"top"
,
data
[
i
].
text
[
j
].
top
)
.
css
(
"top"
,
data
[
i
].
text
[
j
].
top
)
.
css
(
"left"
,
data
[
i
].
text
[
j
].
left
)
.
css
(
"left"
,
data
[
i
].
text
[
j
].
left
)
.
css
(
"font-size"
,
data
[
i
].
text
[
j
].
fz
)
.
appendTo
(
div
);
.
appendTo
(
div
);
}
}
...
@@ -419,11 +438,16 @@ function importData(data){
...
@@ -419,11 +438,16 @@ function importData(data){
}
}
$
(
window
).
trigger
(
"resize"
)
$
(
"#slider"
).
width
(
width
).
height
(
height
).
easySlider
({
$
(
"#slider"
).
width
(
width
).
height
(
height
).
easySlider
({
prevText
:
''
,
prevText
:
''
,
nextText
:
''
,
nextText
:
''
,
controlsShow
:
false
controlsShow
:
false
});
});
$
(
"#slider"
).
goToSlide
(
sankore
.
preference
(
"etudier_cur_page"
,
""
));
$
(
"#prevBtn a"
).
css
(
"display"
,
sankore
.
preference
(
"etudier_left_nav"
,
""
));
$
(
"#nextBtn a"
).
css
(
"display"
,
sankore
.
preference
(
"etudier_right_nav"
,
""
));
}
}
//example
//example
...
@@ -497,7 +521,6 @@ function changeStyle(val){
...
@@ -497,7 +521,6 @@ function changeStyle(val){
$
(
".b_bottom_right"
).
removeClass
(
"bbr_pad"
);
$
(
".b_bottom_right"
).
removeClass
(
"bbr_pad"
);
$
(
".b_bottom_left"
).
removeClass
(
"bbl_pad"
);
$
(
".b_bottom_left"
).
removeClass
(
"bbl_pad"
);
$
(
".b_bottom_center"
).
removeClass
(
"bbc_pad"
);
$
(
".b_bottom_center"
).
removeClass
(
"bbc_pad"
);
$
(
"#wgt_reload"
).
removeClass
(
"pad_color"
).
removeClass
(
"pad_reload"
);
$
(
"#wgt_edit"
).
removeClass
(
"pad_color"
).
removeClass
(
"pad_edit"
);
$
(
"#wgt_edit"
).
removeClass
(
"pad_color"
).
removeClass
(
"pad_edit"
);
$
(
"#wgt_display"
).
removeClass
(
"pad_color"
).
removeClass
(
"pad_edit"
);
$
(
"#wgt_display"
).
removeClass
(
"pad_color"
).
removeClass
(
"pad_edit"
);
$
(
"#wgt_name"
).
removeClass
(
"pad_color"
);
$
(
"#wgt_name"
).
removeClass
(
"pad_color"
);
...
@@ -511,7 +534,6 @@ function changeStyle(val){
...
@@ -511,7 +534,6 @@ function changeStyle(val){
$
(
".b_bottom_right"
).
addClass
(
"bbr_pad"
);
$
(
".b_bottom_right"
).
addClass
(
"bbr_pad"
);
$
(
".b_bottom_left"
).
addClass
(
"bbl_pad"
);
$
(
".b_bottom_left"
).
addClass
(
"bbl_pad"
);
$
(
".b_bottom_center"
).
addClass
(
"bbc_pad"
);
$
(
".b_bottom_center"
).
addClass
(
"bbc_pad"
);
$
(
"#wgt_reload"
).
addClass
(
"pad_color"
).
addClass
(
"pad_reload"
);
$
(
"#wgt_edit"
).
addClass
(
"pad_color"
).
addClass
(
"pad_edit"
);
$
(
"#wgt_edit"
).
addClass
(
"pad_color"
).
addClass
(
"pad_edit"
);
$
(
"#wgt_display"
).
addClass
(
"pad_color"
).
addClass
(
"pad_edit"
);
$
(
"#wgt_display"
).
addClass
(
"pad_color"
).
addClass
(
"pad_edit"
);
$
(
"#wgt_name"
).
addClass
(
"pad_color"
);
$
(
"#wgt_name"
).
addClass
(
"pad_color"
);
...
...
resources/nonDistributedWidgets/Etudier.wgt/locales/ru/index.html
View file @
f7a5176c
...
@@ -23,7 +23,6 @@
...
@@ -23,7 +23,6 @@
<td
class=
"b_top_left"
>
</td>
<td
class=
"b_top_left"
>
</td>
<td
class=
"b_top_center"
>
<td
class=
"b_top_center"
>
<div
id=
"wgt_name"
></div>
<div
id=
"wgt_name"
></div>
<div
id=
"wgt_reload"
></div>
<div
id=
"wgt_display"
class=
"selected"
></div>
<div
id=
"wgt_display"
class=
"selected"
></div>
<div
id=
"wgt_edit"
></div>
<div
id=
"wgt_edit"
></div>
<select
class=
"style_select"
>
<select
class=
"style_select"
>
...
...
resources/nonDistributedWidgets/Etudier.wgt/locales/ru/js/script.js
View file @
f7a5176c
...
@@ -5,7 +5,6 @@ var sankoreLang = {
...
@@ -5,7 +5,6 @@ var sankoreLang = {
new_txt
:
"Новый текстовый блок."
,
new_txt
:
"Новый текстовый блок."
,
new_slide
:
"Это - новый слайд."
,
new_slide
:
"Это - новый слайд."
,
wgt_name
:
"Слайдер"
,
wgt_name
:
"Слайдер"
,
reload
:
"Обновить"
,
slate
:
"Узор"
,
slate
:
"Узор"
,
pad
:
"Планшет"
pad
:
"Планшет"
};
};
...
@@ -27,7 +26,6 @@ function start(){
...
@@ -27,7 +26,6 @@ function start(){
$
(
"#wgt_display"
).
text
(
sankoreLang
.
display
);
$
(
"#wgt_display"
).
text
(
sankoreLang
.
display
);
$
(
"#wgt_edit"
).
text
(
sankoreLang
.
edit
);
$
(
"#wgt_edit"
).
text
(
sankoreLang
.
edit
);
$
(
"#wgt_name"
).
text
(
sankoreLang
.
wgt_name
);
$
(
"#wgt_name"
).
text
(
sankoreLang
.
wgt_name
);
$
(
"#wgt_reload"
).
text
(
sankoreLang
.
reload
);
$
(
".style_select option[value='1']"
).
text
(
sankoreLang
.
slate
);
$
(
".style_select option[value='1']"
).
text
(
sankoreLang
.
slate
);
$
(
".style_select option[value='2']"
).
text
(
sankoreLang
.
pad
);
$
(
".style_select option[value='2']"
).
text
(
sankoreLang
.
pad
);
...
@@ -52,13 +50,12 @@ function start(){
...
@@ -52,13 +50,12 @@ function start(){
window
.
widget
.
onleave
=
function
(){
window
.
widget
.
onleave
=
function
(){
exportData
();
exportData
();
sankore
.
setPreference
(
"etudier_style"
,
$
(
".style_select"
).
find
(
"option:selected"
).
val
());
sankore
.
setPreference
(
"etudier_style"
,
$
(
".style_select"
).
find
(
"option:selected"
).
val
());
sankore
.
setPreference
(
"etudier_cur_page"
,
$
(
"#slider"
).
getPage
());
sankore
.
setPreference
(
"etudier_left_nav"
,
$
(
"#prevBtn a"
).
css
(
"display"
));
sankore
.
setPreference
(
"etudier_right_nav"
,
$
(
"#nextBtn a"
).
css
(
"display"
));
}
}
}
}
$
(
"#wgt_reload"
).
click
(
function
(){
window
.
location
.
reload
();
});
$
(
".style_select"
).
change
(
function
(
event
){
$
(
".style_select"
).
change
(
function
(
event
){
changeStyle
(
$
(
this
).
find
(
"option:selected"
).
val
());
changeStyle
(
$
(
this
).
find
(
"option:selected"
).
val
());
})
})
...
@@ -83,6 +80,8 @@ function start(){
...
@@ -83,6 +80,8 @@ function start(){
$
(
this
).
draggable
();
$
(
this
).
draggable
();
$
(
this
).
find
(
".move_block"
).
remove
();
$
(
this
).
find
(
".move_block"
).
remove
();
$
(
this
).
find
(
".close_img"
).
remove
();
$
(
this
).
find
(
".close_img"
).
remove
();
$
(
this
).
find
(
".size_up"
).
remove
();
$
(
this
).
find
(
".size_down"
).
remove
();
$
(
this
).
find
(
".resize_block"
).
remove
();
$
(
this
).
find
(
".resize_block"
).
remove
();
$
(
this
).
removeAttr
(
"contenteditable"
).
removeClass
(
"block_border"
);
$
(
this
).
removeAttr
(
"contenteditable"
).
removeClass
(
"block_border"
);
$
(
this
).
css
(
"position"
,
"absolute"
);
$
(
this
).
css
(
"position"
,
"absolute"
);
...
@@ -130,6 +129,8 @@ function start(){
...
@@ -130,6 +129,8 @@ function start(){
$
(
this
).
draggable
(
"destroy"
);
$
(
this
).
draggable
(
"destroy"
);
$
(
"<div class='move_block' contenteditable='false'>"
).
appendTo
(
$
(
this
));
$
(
"<div class='move_block' contenteditable='false'>"
).
appendTo
(
$
(
this
));
$
(
"<div class='close_img' contenteditable='false'>"
).
appendTo
(
$
(
this
));
$
(
"<div class='close_img' contenteditable='false'>"
).
appendTo
(
$
(
this
));
$
(
"<div class='size_up' contenteditable='false'>"
).
appendTo
(
$
(
this
));
$
(
"<div class='size_down' contenteditable='false'>"
).
appendTo
(
$
(
this
));
$
(
"<div class='resize_block' contenteditable='false'>"
).
appendTo
(
$
(
this
));
$
(
"<div class='resize_block' contenteditable='false'>"
).
appendTo
(
$
(
this
));
$
(
this
).
attr
(
"contenteditable"
,
"true"
).
addClass
(
"block_border"
);
$
(
this
).
attr
(
"contenteditable"
,
"true"
).
addClass
(
"block_border"
);
});
});
...
@@ -169,6 +170,20 @@ function start(){
...
@@ -169,6 +170,20 @@ function start(){
$
(
this
).
parent
().
remove
();
$
(
this
).
parent
().
remove
();
});
});
//increase a size of text
$
(
".size_up"
).
live
(
"click"
,
function
(){
$
(
this
).
parent
().
height
(
""
);
var
fz
=
parseInt
(
$
(
this
).
parent
().
css
(
"font-size"
).
replace
(
"px"
,
""
));
$
(
this
).
parent
().
css
(
"font-size"
,
fz
+
1
+
"px"
);
});
//decrease a size of text
$
(
".size_down"
).
live
(
"click"
,
function
(){
var
fz
=
parseInt
(
$
(
this
).
parent
().
css
(
"font-size"
).
replace
(
"px"
,
""
));
fz
=
((
fz
-
1
)
<
8
)?
8
:
fz
-
1
;
$
(
this
).
parent
().
css
(
"font-size"
,
fz
+
"px"
);
});
//play/pause event
//play/pause event
$
(
".play, .stop"
).
live
(
"click"
,
function
(){
$
(
".play, .stop"
).
live
(
"click"
,
function
(){
var
tmp_audio
=
$
(
this
);
var
tmp_audio
=
$
(
this
);
...
@@ -250,7 +265,7 @@ function start(){
...
@@ -250,7 +265,7 @@ function start(){
var
height
=
resize_obj
.
object
.
parent
().
height
()
-
resize_obj
.
top
+
event
.
clientY
;
var
height
=
resize_obj
.
object
.
parent
().
height
()
-
resize_obj
.
top
+
event
.
clientY
;
resize_obj
.
left
=
event
.
clientX
;
resize_obj
.
left
=
event
.
clientX
;
resize_obj
.
top
=
event
.
clientY
;
resize_obj
.
top
=
event
.
clientY
;
resize_obj
.
object
.
parent
().
css
(
"width"
,
width
).
css
(
"height"
,
height
);
resize_obj
.
object
.
parent
().
width
(
width
).
height
(
height
);
}
else
{
}
else
{
width
=
resize_obj
.
object
.
parent
().
width
()
-
resize_obj
.
left
+
event
.
clientX
;
width
=
resize_obj
.
object
.
parent
().
width
()
-
resize_obj
.
left
+
event
.
clientX
;
height
=
resize_obj
.
object
.
parent
().
height
()
-
resize_obj
.
top
+
event
.
clientY
;
height
=
resize_obj
.
object
.
parent
().
height
()
-
resize_obj
.
top
+
event
.
clientY
;
...
@@ -258,8 +273,8 @@ function start(){
...
@@ -258,8 +273,8 @@ function start(){
var
img_height
=
resize_obj
.
object
.
parent
().
find
(
"img"
).
height
()
-
resize_obj
.
top
+
event
.
clientY
;
var
img_height
=
resize_obj
.
object
.
parent
().
find
(
"img"
).
height
()
-
resize_obj
.
top
+
event
.
clientY
;
resize_obj
.
left
=
event
.
clientX
;
resize_obj
.
left
=
event
.
clientX
;
resize_obj
.
top
=
event
.
clientY
;
resize_obj
.
top
=
event
.
clientY
;
resize_obj
.
object
.
parent
().
css
(
"width"
,
width
).
css
(
"height"
,
height
);
resize_obj
.
object
.
parent
().
width
(
width
).
height
(
height
);
resize_obj
.
object
.
parent
().
find
(
"img"
).
css
(
"width"
,
img_width
).
css
(
"height"
,
img_height
);
resize_obj
.
object
.
parent
().
find
(
"img"
).
width
(
img_width
).
height
(
img_height
);
}
}
}
}
});
});
...
@@ -322,6 +337,8 @@ function start(){
...
@@ -322,6 +337,8 @@ function start(){
var
text_block
=
$
(
"<div class='text_block'>"
+
sankoreLang
.
new_txt
+
"</div>"
).
appendTo
(
container
);
var
text_block
=
$
(
"<div class='text_block'>"
+
sankoreLang
.
new_txt
+
"</div>"
).
appendTo
(
container
);
$
(
"<div class='move_block' contenteditable='false'>"
).
appendTo
(
text_block
);
$
(
"<div class='move_block' contenteditable='false'>"
).
appendTo
(
text_block
);
$
(
"<div class='close_img' 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
);
$
(
"<div class='resize_block' contenteditable='false'>"
).
appendTo
(
text_block
);
text_block
.
attr
(
"contenteditable"
,
"true"
).
addClass
(
"block_border"
);
text_block
.
attr
(
"contenteditable"
,
"true"
).
addClass
(
"block_border"
);
});
});
...
@@ -341,6 +358,7 @@ function exportData(){
...
@@ -341,6 +358,7 @@ function exportData(){
txt_block
.
left
=
$
(
this
).
position
().
left
;
txt_block
.
left
=
$
(
this
).
position
().
left
;
txt_block
.
h
=
$
(
this
).
height
();
txt_block
.
h
=
$
(
this
).
height
();
txt_block
.
w
=
$
(
this
).
width
();
txt_block
.
w
=
$
(
this
).
width
();
txt_block
.
fz
=
$
(
this
).
css
(
"font-size"
);
txt_block
.
val
=
$
(
this
).
text
();
txt_block
.
val
=
$
(
this
).
text
();
cont_obj
.
text
.
push
(
txt_block
);
cont_obj
.
text
.
push
(
txt_block
);
});
});
...
@@ -389,6 +407,7 @@ function importData(data){
...
@@ -389,6 +407,7 @@ function importData(data){
.
height
(
data
[
i
].
text
[
j
].
h
)
.
height
(
data
[
i
].
text
[
j
].
h
)
.
css
(
"top"
,
data
[
i
].
text
[
j
].
top
)
.
css
(
"top"
,
data
[
i
].
text
[
j
].
top
)
.
css
(
"left"
,
data
[
i
].
text
[
j
].
left
)
.
css
(
"left"
,
data
[
i
].
text
[
j
].
left
)
.
css
(
"font-size"
,
data
[
i
].
text
[
j
].
fz
)
.
appendTo
(
div
);
.
appendTo
(
div
);
}
}
...
@@ -419,11 +438,16 @@ function importData(data){
...
@@ -419,11 +438,16 @@ function importData(data){
}
}
$
(
window
).
trigger
(
"resize"
)
$
(
"#slider"
).
width
(
width
).
height
(
height
).
easySlider
({
$
(
"#slider"
).
width
(
width
).
height
(
height
).
easySlider
({
prevText
:
''
,
prevText
:
''
,
nextText
:
''
,
nextText
:
''
,
controlsShow
:
false
controlsShow
:
false
});
});
$
(
"#slider"
).
goToSlide
(
sankore
.
preference
(
"etudier_cur_page"
,
""
));
$
(
"#prevBtn a"
).
css
(
"display"
,
sankore
.
preference
(
"etudier_left_nav"
,
""
));
$
(
"#nextBtn a"
).
css
(
"display"
,
sankore
.
preference
(
"etudier_right_nav"
,
""
));
}
}
//example
//example
...
@@ -497,7 +521,6 @@ function changeStyle(val){
...
@@ -497,7 +521,6 @@ function changeStyle(val){
$
(
".b_bottom_right"
).
removeClass
(
"bbr_pad"
);
$
(
".b_bottom_right"
).
removeClass
(
"bbr_pad"
);
$
(
".b_bottom_left"
).
removeClass
(
"bbl_pad"
);
$
(
".b_bottom_left"
).
removeClass
(
"bbl_pad"
);
$
(
".b_bottom_center"
).
removeClass
(
"bbc_pad"
);
$
(
".b_bottom_center"
).
removeClass
(
"bbc_pad"
);
$
(
"#wgt_reload"
).
removeClass
(
"pad_color"
).
removeClass
(
"pad_reload"
);
$
(
"#wgt_edit"
).
removeClass
(
"pad_color"
).
removeClass
(
"pad_edit"
);
$
(
"#wgt_edit"
).
removeClass
(
"pad_color"
).
removeClass
(
"pad_edit"
);
$
(
"#wgt_display"
).
removeClass
(
"pad_color"
).
removeClass
(
"pad_edit"
);
$
(
"#wgt_display"
).
removeClass
(
"pad_color"
).
removeClass
(
"pad_edit"
);
$
(
"#wgt_name"
).
removeClass
(
"pad_color"
);
$
(
"#wgt_name"
).
removeClass
(
"pad_color"
);
...
@@ -511,7 +534,6 @@ function changeStyle(val){
...
@@ -511,7 +534,6 @@ function changeStyle(val){
$
(
".b_bottom_right"
).
addClass
(
"bbr_pad"
);
$
(
".b_bottom_right"
).
addClass
(
"bbr_pad"
);
$
(
".b_bottom_left"
).
addClass
(
"bbl_pad"
);
$
(
".b_bottom_left"
).
addClass
(
"bbl_pad"
);
$
(
".b_bottom_center"
).
addClass
(
"bbc_pad"
);
$
(
".b_bottom_center"
).
addClass
(
"bbc_pad"
);
$
(
"#wgt_reload"
).
addClass
(
"pad_color"
).
addClass
(
"pad_reload"
);
$
(
"#wgt_edit"
).
addClass
(
"pad_color"
).
addClass
(
"pad_edit"
);
$
(
"#wgt_edit"
).
addClass
(
"pad_color"
).
addClass
(
"pad_edit"
);
$
(
"#wgt_display"
).
addClass
(
"pad_color"
).
addClass
(
"pad_edit"
);
$
(
"#wgt_display"
).
addClass
(
"pad_color"
).
addClass
(
"pad_edit"
);
$
(
"#wgt_name"
).
addClass
(
"pad_color"
);
$
(
"#wgt_name"
).
addClass
(
"pad_color"
);
...
...
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