Gitlab CSE Unil
Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
M. Chardon
moodle-assignfeedback_editpdfplus
Commits
d1b74faa
Commit
d1b74faa
authored
Aug 07, 2017
by
M. Chardon
Browse files
gestion des questions/réponses
parent
70bef5e2
Changes
4
Expand all
Hide whitespace changes
Inline
Side-by-side
amd/build/admin_panel.min.js
View file @
d1b74faa
define
([
"
jquery
"
,
"
core/notification
"
,
"
core/templates
"
,
"
core/fragment
"
,
"
core/ajax
"
,
"
core/str
"
,
"
assignfeedback_editpdfplus/annotation
"
,
"
assignfeedback_editpdfplus/annotationhighlightplus
"
,
"
assignfeedback_editpdfplus/annotationstampplus
"
,
"
assignfeedback_editpdfplus/annotationframe
"
,
"
assignfeedback_editpdfplus/annotationcommentplus
"
,
"
assignfeedback_editpdfplus/annotationverticalline
"
,
"
assignfeedback_editpdfplus/annotationstampcomment
"
],
function
(
a
,
b
,
c
,
d
,
e
,
f
,
g
,
h
,
i
,
j
,
k
,
l
,
m
){
var
n
=
null
,
o
=
null
,
p
=
null
,
q
=
null
,
r
=
function
(
a
,
b
){
this
.
init
(),
n
=
a
,
q
=
JSON
.
parse
(
b
)},
s
=
null
;
r
.
prototype
.
selectTool
=
null
,
r
.
prototype
.
init
=
function
(){
a
(
"
#editpdlplus_axes
"
).
on
(
"
change
"
,
function
(){
a
(
"
.toolbar
"
).
hide
();
var
b
=
a
(
"
#editpdlplus_axes
"
).
val
();
a
(
"
#editpdlplus_toolbar_
"
+
b
).
show
();
var
c
=
a
(
"
#editpdlplus_axes option:selected
"
).
data
(
"
delete
"
);
c
&&
parseInt
(
c
)
>
0
?
a
(
"
#assignfeedback_editpdfplus_widget_admin_button_delaxis
"
).
addClass
(
"
disabled
"
):
a
(
"
#assignfeedback_editpdfplus_widget_admin_button_delaxis
"
).
removeClass
(
"
disabled
"
)}),
a
(
"
#editpdlplus_axes
"
).
change
(),
a
(
"
.editpdlplus_tool
"
).
on
(
"
click
"
,
w
),
this
.
selectTool
=
a
(
"
.editpdlplus_tool
"
).
first
(),
this
.
initTool
(),
a
(
"
#assignfeedback_editpdfplus_widget_admin_button_addaxis
"
).
on
(
"
click
"
,
this
.
openDivAddAxis
),
a
(
"
#assignfeedback_editpdfplus_widget_admin_button_editaxis
"
).
on
(
"
click
"
,
this
.
openDivEditAxis
),
a
(
"
#assignfeedback_editpdfplus_widget_admin_button_delaxis
"
).
on
(
"
click
"
,
this
.
openDivDelAxis
),
a
(
"
#assignfeedback_editpdfplus_widget_admin_button_addtool
"
).
on
(
"
click
"
,
this
.
openDivAddTool
)},
r
.
prototype
.
test
=
function
(){
alert
(
"
test
"
),
w
()},
r
.
prototype
.
initTool
=
function
(){
a
(
this
.
selectTool
).
removeClass
(
"
btn-default
"
),
a
(
this
.
selectTool
).
addClass
(
"
btn-primary
"
)},
r
.
prototype
.
refreshPrevisu
=
function
(
b
){
alert
(
a
(
"
#libelle
"
).
val
()),
a
(
"
#typetool
"
).
val
(
b
.
typetool
),
a
(
"
#color
"
).
val
(
b
.
color
),
a
(
"
#libelle
"
).
val
(
b
.
libelle
),
a
(
"
#cartridgecolor
"
).
val
(
b
.
catridgecolor
),
a
(
"
#texts
"
).
val
(
b
.
texts
),
a
(
"
#button
"
).
val
(
b
.
button
),
a
(
"
#enabled
"
).
val
(
b
.
enabled
),
a
(
"
#reply
"
).
val
(
b
.
reply
),
a
(
"
#order
"
).
val
(
b
.
order
),
alert
(
b
.
libelle
),
o
=
b
,
u
()};
var
t
=
function
(
a
){
for
(
var
b
=
0
;
b
<
q
.
length
;
b
++
)
if
(
q
[
b
].
id
==
a
)
return
q
[
b
]},
u
=
function
(){
a
(
"
#canevas
"
).
html
(
""
),
s
=
null
;
var
b
=
parseInt
(
a
(
"
#typetool
"
).
val
());
if
(
3
===
b
||
4
===
b
||
7
===
b
?
a
(
"
#canevas
"
).
css
(
"
background-image
"
,
"
url(
"
+
a
(
"
#map01
"
).
val
()
+
"
)
"
):
1
===
b
||
6
===
b
?
a
(
"
#canevas
"
).
css
(
"
background-image
"
,
"
url(
"
+
a
(
"
#map02
"
).
val
()
+
"
)
"
):
5
===
b
&&
a
(
"
#canevas
"
).
css
(
"
background-image
"
,
"
url(
"
+
a
(
"
#map03
"
).
val
()
+
"
)
"
),
1
===
b
)
s
=
new
h
;
else
if
(
3
===
b
)
s
=
new
i
;
else
if
(
4
===
b
){
s
=
new
j
;
var
c
=
new
j
}
else
5
===
b
?
s
=
new
l
:
6
===
b
?
s
=
new
m
:
7
===
b
&&
(
s
=
new
k
);
if
(
s
){
var
d
=
t
(
b
);
s
.
initAdminDemo
(
o
,
d
),
s
.
draw
(
a
(
"
#canevas
"
)),
c
&&
(
c
.
initChildAdminDemo
(
s
),
c
.
draw
(
a
(
"
#canevas
"
)))}};
r
.
prototype
.
openDivAddAxis
=
function
(){
a
(
"
#axistool
"
).
hide
(),
a
(
"
#assignfeedback_editpdfplus_widget_admin_div_addaxis
"
).
show
(),
a
(
"
#assignfeedback_editpdfplus_widget_admin_div_addaxis > .panel-body
"
).
html
(
""
);
var
e
=
{};
d
.
loadFragment
(
"
assignfeedback_editpdfplus
"
,
"
axisadd
"
,
n
,
e
).
done
(
function
(
a
,
b
){
c
.
appendNodeContents
(
"
#assignfeedback_editpdfplus_widget_admin_div_addaxis > .panel-body
"
,
a
,
b
)}.
bind
(
this
)).
fail
(
b
.
exception
)},
r
.
prototype
.
openDivEditAxis
=
function
(){
a
(
"
#axistool
"
).
hide
(),
a
(
"
#assignfeedback_editpdfplus_widget_admin_div_editaxis
"
).
show
(),
a
(
"
#assignfeedback_editpdfplus_widget_admin_div_editaxis > .panel-body
"
).
html
(
""
);
var
e
=
a
(
"
#editpdlplus_axes option:selected
"
).
val
(),
f
=
{
axeid
:
e
};
d
.
loadFragment
(
"
assignfeedback_editpdfplus
"
,
"
axisedit
"
,
n
,
f
).
done
(
function
(
a
,
b
){
c
.
appendNodeContents
(
"
#assignfeedback_editpdfplus_widget_admin_div_editaxis > .panel-body
"
,
a
,
b
)}.
bind
(
this
)).
fail
(
b
.
exception
)},
r
.
prototype
.
openDivDelAxis
=
function
(){
a
(
"
#axistool
"
).
hide
(),
a
(
"
#assignfeedback_editpdfplus_widget_admin_div_delaxis
"
).
show
(),
a
(
"
#assignfeedback_editpdfplus_widget_admin_div_delaxis > .panel-body
"
).
html
(
""
);
var
e
=
a
(
"
#editpdlplus_axes option:selected
"
).
val
(),
f
=
{
axeid
:
e
};
d
.
loadFragment
(
"
assignfeedback_editpdfplus
"
,
"
axisdel
"
,
n
,
f
).
done
(
function
(
a
,
b
){
c
.
appendNodeContents
(
"
#assignfeedback_editpdfplus_widget_admin_div_delaxis > .panel-body
"
,
a
,
b
)}.
bind
(
this
)).
fail
(
b
.
exception
)};
var
v
=
function
(
b
,
d
,
e
){
var
f
=
a
.
Deferred
();
return
b
.
fadeOut
(
"
fast
"
,
function
(){
c
.
replaceNodeContents
(
b
,
d
,
e
),
b
.
fadeIn
(
"
fast
"
,
function
(){
f
.
resolve
()})}),
f
.
promise
()},
w
=
function
(){
var
c
=
f
.
get_string
(
"
admindeltool_messageok
"
,
"
assignfeedback_editpdfplus
"
),
g
=
a
(
this
).
val
();
a
(
"
.editpdlplus_tool
"
).
each
(
function
(){
a
(
this
).
removeClass
(
"
btn-primary
"
),
a
(
this
).
removeClass
(
"
btn-default
"
);
var
b
=
a
(
this
).
data
(
"
enable
"
);
1
===
b
&&
a
(
this
).
val
()
!==
g
&&
a
(
this
).
addClass
(
"
btn-default
"
)}),
a
(
this
).
addClass
(
"
btn-primary
"
),
a
(
"
#editpdlplus_tool_item
"
).
html
(
""
);
var
h
=
{
toolid
:
g
};
d
.
loadFragment
(
"
assignfeedback_editpdfplus
"
,
"
tooledit
"
,
n
,
h
).
done
(
function
(
d
,
f
){
v
(
a
(
"
#editpdlplus_tool_item
"
),
d
,
f
).
done
(
function
(){
o
=
new
Object
,
o
.
typetool
=
a
(
"
#typetool
"
).
val
(),
o
.
color
=
a
(
"
#color
"
).
val
(),
o
.
libelle
=
a
(
"
#libelle
"
).
val
(),
o
.
catridgecolor
=
a
(
"
#cartridgecolor
"
).
val
(),
o
.
texts
=
a
(
"
#texts
"
).
val
(),
o
.
button
=
a
(
"
#button
"
).
val
(),
o
.
enabled
=
a
(
"
#enabled
"
).
val
(),
o
.
reply
=
a
(
"
#reply
"
).
val
(),
o
.
order
=
a
(
"
#order
"
).
val
(),
a
(
"
#toolFormSubmit
"
).
on
(
"
click
"
,
function
(){
var
c
=
a
(
"
#assignfeedback_editpdfplus_edit_tool
"
),
d
=
c
.
serialize
();
e
.
call
([{
methodname
:
"
assignfeedback_editpdfplus_submit_tool_edit_form
"
,
args
:{
jsonformdata
:
JSON
.
stringify
(
d
)}}])[
0
].
done
(
function
(
b
){
if
(
""
===
b
[
0
].
message
){
a
(
"
#message_edit_tool
"
).
html
(
"
Modifications enregistrées
"
),
a
(
"
#message_edit_tool
"
).
addClass
(
"
alert-success
"
),
a
(
"
#message_edit_tool
"
).
removeClass
(
"
alert-danger
"
),
a
(
"
#editpdlplus_toolbar_
"
+
b
[
0
].
axeid
).
html
(
""
);
for
(
var
c
=
null
,
d
=
0
;
d
<
b
.
length
;
d
++
){
var
e
=
"
btn-default
"
;
1
!==
b
[
d
].
enable
&&
(
e
=
""
),
b
[
d
].
toolid
===
b
[
d
].
selecttool
&&
(
e
=
"
btn-primary
"
,
c
=
b
[
d
]);
var
f
=
""
;
4
!==
b
[
d
].
typetool
&&
1
!==
b
[
d
].
typetool
||
(
f
=
"
text-decoration: underline;
"
);
var
g
=
b
[
d
].
button
;
4
!==
b
[
d
].
typetool
&&
5
!==
b
[
d
].
typetool
||
(
g
=
"
|
"
+
g
,
4
===
b
[
d
].
typetool
&&
(
g
+=
"
|
"
));
var
h
=
"
<button class='btn
"
+
e
+
"
editpdlplus_tool' id='editpdlplus_tool_
"
+
b
[
d
].
toolid
+
"
' style='
"
+
f
+
"
' value='
"
+
b
[
d
].
toolid
+
"
' data-enable='
"
+
b
[
d
].
enable
+
"
'>
"
+
g
+
"
</button>
"
;
a
(
"
#editpdlplus_toolbar_
"
+
b
[
0
].
axeid
).
append
(
h
)}
a
(
"
.editpdlplus_tool
"
).
on
(
"
click
"
,
w
),
r
.
prototype
.
refreshPrevisu
(
c
)}
else
a
(
"
#message_edit_tool
"
).
html
(
b
[
0
].
message
),
a
(
"
#message_edit_tool
"
).
addClass
(
"
alert-danger
"
),
a
(
"
#message_edit_tool
"
).
removeClass
(
"
alert-success
"
)}).
fail
(
b
.
exception
)}),
a
(
"
#toolEnabled
"
).
on
(
"
click
"
,
function
(){
var
b
=
a
(
"
#toolenabled
"
).
val
();
1
==
b
?(
a
(
"
#toolEnabled > i
"
).
addClass
(
"
fa-eye-slash
"
),
a
(
"
#toolEnabled > i
"
).
removeClass
(
"
fa-eye
"
),
a
(
"
#toolenabled
"
).
val
(
0
)):(
a
(
"
#toolEnabled > i
"
).
addClass
(
"
fa-eye
"
),
a
(
"
#toolEnabled > i
"
).
removeClass
(
"
fa-eye-slash
"
),
a
(
"
#toolenabled
"
).
val
(
1
)),
a
(
"
#toolFormSubmit
"
).
click
()}),
a
(
"
#toolClone
"
).
on
(
"
click
"
,
function
(){
p
=
"
clone
"
,
a
(
"
#assignfeedback_editpdfplus_widget_admin_button_addtool
"
).
click
()}),
a
(
"
#toolRemove
"
).
on
(
"
click
"
,
function
(){
if
(
!
a
(
this
).
hasClass
(
"
disabled
"
)){
var
d
=
a
(
"
#assignfeedback_editpdfplus_edit_tool
"
),
f
=
d
.
serialize
();
e
.
call
([{
methodname
:
"
assignfeedback_editpdfplus_submit_tool_del_form
"
,
args
:{
jsonformdata
:
JSON
.
stringify
(
f
)}}])[
0
].
done
(
function
(
b
){
if
(
""
===
b
[
0
].
message
){
a
(
"
#message_edit_tool
"
).
html
(
c
),
a
(
"
#message_edit_tool
"
).
addClass
(
"
alert-success
"
),
a
(
"
#message_edit_tool
"
).
removeClass
(
"
alert-danger
"
),
a
(
"
#editpdlplus_toolbar_
"
+
b
[
0
].
axeid
).
html
(
""
);
for
(
var
d
=
0
;
d
<
b
.
length
;
d
++
){
var
e
=
"
btn-default
"
;
1
!==
b
[
d
].
enable
&&
(
e
=
""
),
b
[
d
].
toolid
===
b
[
d
].
selecttool
&&
(
e
=
"
btn-primary
"
);
var
f
=
""
;
4
!==
b
[
d
].
typetool
&&
1
!==
b
[
d
].
typetool
||
(
f
=
"
text-decoration: underline;
"
);
var
g
=
b
[
d
].
button
;
4
!==
b
[
d
].
typetool
&&
5
!==
b
[
d
].
typetool
||
(
g
=
"
|
"
+
g
,
4
===
b
[
d
].
typetool
&&
(
g
+=
"
|
"
));
var
h
=
"
<button class='btn
"
+
e
+
"
editpdlplus_tool' id='editpdlplus_tool_
"
+
b
[
d
].
toolid
+
"
' style='
"
+
f
+
"
' value='
"
+
b
[
d
].
toolid
+
"
' data-enable='
"
+
b
[
d
].
enable
+
"
'>
"
+
g
+
"
</button>
"
;
a
(
"
#editpdlplus_toolbar_
"
+
b
[
0
].
axeid
).
append
(
h
)}
a
(
"
.editpdlplus_tool
"
).
on
(
"
click
"
,
w
),
a
(
"
#toolworkspace
"
).
html
(
""
)}
else
a
(
"
#message_edit_tool
"
).
html
(
b
[
0
].
message
),
a
(
"
#message_edit_tool
"
).
addClass
(
"
alert-danger
"
),
a
(
"
#message_edit_tool
"
).
removeClass
(
"
alert-success
"
)}).
fail
(
b
.
exception
)}}),
u
()}.
bind
(
this
)).
fail
(
b
.
exception
)}.
bind
(
this
)).
fail
(
b
.
exception
)};
return
r
.
prototype
.
openDivAddTool
=
function
(){
var
c
=
f
.
get_string
(
"
adminaddtool_messageok
"
,
"
assignfeedback_editpdfplus
"
);
a
(
"
#editpdlplus_tool_item
"
).
html
(
""
),
a
(
"
.btn-primary
"
).
addClass
(
"
btn-default
"
),
a
(
"
.editpdlplus_tool
"
).
removeClass
(
"
btn-primary
"
);
var
g
=
a
(
"
#editpdlplus_axes option:selected
"
).
val
(),
h
=
{
axisid
:
g
};
d
.
loadFragment
(
"
assignfeedback_editpdfplus
"
,
"
tooladd
"
,
n
,
h
).
done
(
function
(
d
,
f
){
v
(
a
(
"
#editpdlplus_tool_item
"
),
d
,
f
).
done
(
function
(){
"
clone
"
===
p
&&
(
a
(
"
#typetool
"
).
val
(
o
.
typetool
),
a
(
"
#color
"
).
val
(
o
.
color
),
a
(
"
#libelle
"
).
val
(
o
.
libelle
),
a
(
"
#cartridgecolor
"
).
val
(
o
.
catridgecolor
),
a
(
"
#texts
"
).
val
(
o
.
texts
),
a
(
"
#button
"
).
val
(
o
.
button
),
a
(
"
#enabled
"
).
val
(
o
.
enabled
),
a
(
"
#reply
"
).
val
(
o
.
reply
),
a
(
"
#order
"
).
val
(
o
.
order
),
o
=
null
,
p
=
null
),
a
(
"
#toolFormSubmit
"
).
on
(
"
click
"
,
function
(){
var
d
=
a
(
"
#assignfeedback_editpdfplus_edit_tool
"
),
f
=
d
.
serialize
();
e
.
call
([{
methodname
:
"
assignfeedback_editpdfplus_submit_tool_add_form
"
,
args
:{
jsonformdata
:
JSON
.
stringify
(
f
)}}])[
0
].
done
(
function
(
b
){
if
(
""
===
b
[
0
].
message
){
a
(
"
#message_edit_tool
"
).
html
(
c
),
a
(
"
#message_edit_tool
"
).
addClass
(
"
alert-success
"
),
a
(
"
#message_edit_tool
"
).
removeClass
(
"
alert-danger
"
),
a
(
"
#editpdlplus_toolbar_
"
+
b
[
0
].
axeid
).
html
(
""
);
for
(
var
d
=
0
;
d
<
b
.
length
;
d
++
){
var
e
=
"
btn-default
"
;
1
!==
b
[
d
].
enable
&&
(
e
=
""
),
b
[
d
].
toolid
===
b
[
d
].
selecttool
&&
(
e
=
"
btn-primary
"
);
var
f
=
""
;
4
!==
b
[
d
].
typetool
&&
1
!==
b
[
d
].
typetool
||
(
f
=
"
text-decoration: underline;
"
);
var
g
=
b
[
d
].
button
;
4
!==
b
[
d
].
typetool
&&
5
!==
b
[
d
].
typetool
||
(
g
=
"
|
"
+
g
,
4
===
b
[
d
].
typetool
&&
(
g
+=
"
|
"
));
var
h
=
"
<button class='btn
"
+
e
+
"
editpdlplus_tool' id='editpdlplus_tool_
"
+
b
[
d
].
toolid
+
"
' style='
"
+
f
+
"
' value='
"
+
b
[
d
].
toolid
+
"
' data-enable='
"
+
b
[
d
].
enable
+
"
'>
"
+
g
+
"
</button>
"
;
a
(
"
#editpdlplus_toolbar_
"
+
b
[
0
].
axeid
).
append
(
h
)}
a
(
"
.editpdlplus_tool
"
).
on
(
"
click
"
,
w
),
a
(
"
#editpdlplus_tool_item
"
).
html
(
""
)}
else
a
(
"
#message_edit_tool
"
).
html
(
b
[
0
].
message
),
a
(
"
#message_edit_tool
"
).
addClass
(
"
alert-danger
"
),
a
(
"
#message_edit_tool
"
).
removeClass
(
"
alert-success
"
)}).
fail
(
b
.
exception
)})}.
bind
(
this
)).
fail
(
b
.
exception
)}.
bind
(
this
)).
fail
(
b
.
exception
)},
r
});
define
([
"
jquery
"
,
"
core/notification
"
,
"
core/templates
"
,
"
core/fragment
"
,
"
core/ajax
"
,
"
core/str
"
,
"
assignfeedback_editpdfplus/annotation
"
,
"
assignfeedback_editpdfplus/annotationhighlightplus
"
,
"
assignfeedback_editpdfplus/annotationstampplus
"
,
"
assignfeedback_editpdfplus/annotationframe
"
,
"
assignfeedback_editpdfplus/annotationcommentplus
"
,
"
assignfeedback_editpdfplus/annotationverticalline
"
,
"
assignfeedback_editpdfplus/annotationstampcomment
"
],
function
(
a
,
b
,
c
,
d
,
e
,
f
,
g
,
h
,
i
,
j
,
k
,
l
,
m
){
var
n
=
null
,
o
=
null
,
p
=
null
,
q
=
null
,
r
=
function
(
a
,
b
){
n
=
a
,
q
=
JSON
.
parse
(
b
),
this
.
init
()},
s
=
null
;
r
.
prototype
.
selectTool
=
null
,
r
.
prototype
.
init
=
function
(){
a
(
"
#editpdlplus_axes
"
).
on
(
"
change
"
,
function
(){
a
(
"
.toolbar
"
).
hide
();
var
b
=
a
(
"
#editpdlplus_axes
"
).
val
();
a
(
"
#editpdlplus_toolbar_
"
+
b
).
show
();
var
c
=
a
(
"
#editpdlplus_axes option:selected
"
).
data
(
"
delete
"
);
c
&&
parseInt
(
c
)
>
0
?
a
(
"
#assignfeedback_editpdfplus_widget_admin_button_delaxis
"
).
addClass
(
"
disabled
"
):
a
(
"
#assignfeedback_editpdfplus_widget_admin_button_delaxis
"
).
removeClass
(
"
disabled
"
)}),
a
(
"
#editpdlplus_axes
"
).
change
(),
a
(
"
.editpdlplus_tool
"
).
on
(
"
click
"
,
w
),
this
.
selectTool
=
a
(
"
.editpdlplus_tool
"
).
first
(),
this
.
initTool
(),
a
(
"
#assignfeedback_editpdfplus_widget_admin_button_addaxis
"
).
on
(
"
click
"
,
this
.
openDivAddAxis
),
a
(
"
#assignfeedback_editpdfplus_widget_admin_button_editaxis
"
).
on
(
"
click
"
,
this
.
openDivEditAxis
),
a
(
"
#assignfeedback_editpdfplus_widget_admin_button_delaxis
"
).
on
(
"
click
"
,
this
.
openDivDelAxis
),
a
(
"
#assignfeedback_editpdfplus_widget_admin_button_addtool
"
).
on
(
"
click
"
,
this
.
openDivAddTool
),
a
(
"
.btn-primary
"
).
click
()},
r
.
prototype
.
test
=
function
(){
alert
(
"
test
"
),
w
()},
r
.
prototype
.
initTool
=
function
(){
a
(
this
.
selectTool
).
removeClass
(
"
btn-default
"
),
a
(
this
.
selectTool
).
addClass
(
"
btn-primary
"
)},
r
.
prototype
.
refreshPrevisu
=
function
(){
o
.
typetool
=
a
(
"
#typetool
"
).
val
(),
o
.
color
=
a
(
"
#color
"
).
val
(),
o
.
libelle
=
a
(
"
#libelle
"
).
val
(),
o
.
catridgecolor
=
a
(
"
#cartridgecolor
"
).
val
(),
o
.
texts
=
a
(
"
#texts
"
).
val
(),
o
.
button
=
a
(
"
#button
"
).
val
(),
o
.
enabled
=
a
(
"
#enabled
"
).
val
(),
o
.
reply
=
0
,
a
(
"
#reply
"
).
is
(
"
:checked
"
)
&&
(
o
.
reply
=
1
),
o
.
order
=
a
(
"
#order
"
).
val
(),
u
()};
var
t
=
function
(
a
){
for
(
var
b
=
0
;
b
<
q
.
length
;
b
++
)
if
(
q
[
b
].
id
==
a
)
return
q
[
b
]},
u
=
function
(){
a
(
"
#canevas
"
).
html
(
""
),
s
=
null
;
var
b
=
parseInt
(
a
(
"
#typetool
"
).
val
());
if
(
3
===
b
||
4
===
b
||
7
===
b
?
a
(
"
#canevas
"
).
css
(
"
background-image
"
,
"
url(
"
+
a
(
"
#map01
"
).
val
()
+
"
)
"
):
1
===
b
||
6
===
b
?
a
(
"
#canevas
"
).
css
(
"
background-image
"
,
"
url(
"
+
a
(
"
#map02
"
).
val
()
+
"
)
"
):
5
===
b
&&
a
(
"
#canevas
"
).
css
(
"
background-image
"
,
"
url(
"
+
a
(
"
#map03
"
).
val
()
+
"
)
"
),
1
===
b
)
s
=
new
h
;
else
if
(
3
===
b
)
s
=
new
i
;
else
if
(
4
===
b
){
s
=
new
j
;
var
c
=
new
j
}
else
5
===
b
?
s
=
new
l
:
6
===
b
?
s
=
new
m
:
7
===
b
&&
(
s
=
new
k
);
if
(
s
){
var
d
=
t
(
b
);
o
.
reply
=
0
,
a
(
"
#reply
"
).
is
(
"
:checked
"
)
&&
(
o
.
reply
=
1
),
s
.
initAdminDemo
(
o
,
d
),
s
.
draw
(
a
(
"
#canevas
"
)),
c
&&
(
c
.
initChildAdminDemo
(
s
),
c
.
draw
(
a
(
"
#canevas
"
)))}};
r
.
prototype
.
openDivAddAxis
=
function
(){
a
(
"
#axistool
"
).
hide
(),
a
(
"
#assignfeedback_editpdfplus_widget_admin_div_addaxis
"
).
show
(),
a
(
"
#assignfeedback_editpdfplus_widget_admin_div_addaxis > .panel-body
"
).
html
(
""
);
var
e
=
{};
d
.
loadFragment
(
"
assignfeedback_editpdfplus
"
,
"
axisadd
"
,
n
,
e
).
done
(
function
(
a
,
b
){
c
.
appendNodeContents
(
"
#assignfeedback_editpdfplus_widget_admin_div_addaxis > .panel-body
"
,
a
,
b
)}.
bind
(
this
)).
fail
(
b
.
exception
)},
r
.
prototype
.
openDivEditAxis
=
function
(){
a
(
"
#axistool
"
).
hide
(),
a
(
"
#assignfeedback_editpdfplus_widget_admin_div_editaxis
"
).
show
(),
a
(
"
#assignfeedback_editpdfplus_widget_admin_div_editaxis > .panel-body
"
).
html
(
""
);
var
e
=
a
(
"
#editpdlplus_axes option:selected
"
).
val
(),
f
=
{
axeid
:
e
};
d
.
loadFragment
(
"
assignfeedback_editpdfplus
"
,
"
axisedit
"
,
n
,
f
).
done
(
function
(
a
,
b
){
c
.
appendNodeContents
(
"
#assignfeedback_editpdfplus_widget_admin_div_editaxis > .panel-body
"
,
a
,
b
)}.
bind
(
this
)).
fail
(
b
.
exception
)},
r
.
prototype
.
openDivDelAxis
=
function
(){
a
(
"
#axistool
"
).
hide
(),
a
(
"
#assignfeedback_editpdfplus_widget_admin_div_delaxis
"
).
show
(),
a
(
"
#assignfeedback_editpdfplus_widget_admin_div_delaxis > .panel-body
"
).
html
(
""
);
var
e
=
a
(
"
#editpdlplus_axes option:selected
"
).
val
(),
f
=
{
axeid
:
e
};
d
.
loadFragment
(
"
assignfeedback_editpdfplus
"
,
"
axisdel
"
,
n
,
f
).
done
(
function
(
a
,
b
){
c
.
appendNodeContents
(
"
#assignfeedback_editpdfplus_widget_admin_div_delaxis > .panel-body
"
,
a
,
b
)}.
bind
(
this
)).
fail
(
b
.
exception
)};
var
v
=
function
(
b
,
d
,
e
){
var
f
=
a
.
Deferred
();
return
b
.
fadeOut
(
"
fast
"
,
function
(){
c
.
replaceNodeContents
(
b
,
d
,
e
),
b
.
fadeIn
(
"
fast
"
,
function
(){
f
.
resolve
()})}),
f
.
promise
()},
w
=
function
(){
var
c
=
f
.
get_string
(
"
admindeltool_messageok
"
,
"
assignfeedback_editpdfplus
"
),
g
=
a
(
this
).
val
();
a
(
"
.editpdlplus_tool
"
).
each
(
function
(){
a
(
this
).
removeClass
(
"
btn-primary
"
),
a
(
this
).
removeClass
(
"
btn-default
"
);
var
b
=
a
(
this
).
data
(
"
enable
"
);
1
===
b
&&
a
(
this
).
val
()
!==
g
&&
a
(
this
).
addClass
(
"
btn-default
"
)}),
a
(
this
).
addClass
(
"
btn-primary
"
),
a
(
"
#editpdlplus_tool_item
"
).
html
(
""
);
var
h
=
{
toolid
:
g
};
d
.
loadFragment
(
"
assignfeedback_editpdfplus
"
,
"
tooledit
"
,
n
,
h
).
done
(
function
(
d
,
f
){
v
(
a
(
"
#editpdlplus_tool_item
"
),
d
,
f
).
done
(
function
(){
o
=
new
Object
,
o
.
typetool
=
a
(
"
#typetool
"
).
val
(),
o
.
color
=
a
(
"
#color
"
).
val
(),
o
.
libelle
=
a
(
"
#libelle
"
).
val
(),
o
.
catridgecolor
=
a
(
"
#cartridgecolor
"
).
val
(),
o
.
texts
=
a
(
"
#texts
"
).
val
(),
o
.
button
=
a
(
"
#button
"
).
val
(),
o
.
enabled
=
a
(
"
#enabled
"
).
val
(),
o
.
reply
=
a
(
"
#reply
"
).
val
(),
o
.
order
=
a
(
"
#order
"
).
val
(),
a
(
"
#toolFormSubmit
"
).
on
(
"
click
"
,
function
(){
var
c
=
a
(
"
#assignfeedback_editpdfplus_edit_tool
"
),
d
=
c
.
serialize
();
e
.
call
([{
methodname
:
"
assignfeedback_editpdfplus_submit_tool_edit_form
"
,
args
:{
jsonformdata
:
JSON
.
stringify
(
d
)}}])[
0
].
done
(
function
(
b
){
if
(
""
===
b
[
0
].
message
){
a
(
"
#message_edit_tool
"
).
html
(
"
Modifications enregistrées
"
),
a
(
"
#message_edit_tool
"
).
addClass
(
"
alert-success
"
),
a
(
"
#message_edit_tool
"
).
removeClass
(
"
alert-danger
"
),
a
(
"
#editpdlplus_toolbar_
"
+
b
[
0
].
axeid
).
html
(
""
);
for
(
var
c
=
0
;
c
<
b
.
length
;
c
++
){
var
d
=
"
btn-default
"
;
1
!==
b
[
c
].
enable
&&
(
d
=
""
),
b
[
c
].
toolid
===
b
[
c
].
selecttool
&&
(
d
=
"
btn-primary
"
);
var
e
=
""
;
4
!==
b
[
c
].
typetool
&&
1
!==
b
[
c
].
typetool
||
(
e
=
"
text-decoration: underline;
"
);
var
f
=
b
[
c
].
button
;
4
!==
b
[
c
].
typetool
&&
5
!==
b
[
c
].
typetool
||
(
f
=
"
|
"
+
f
,
4
===
b
[
c
].
typetool
&&
(
f
+=
"
|
"
));
var
g
=
"
<button class='btn
"
+
d
+
"
editpdlplus_tool' id='editpdlplus_tool_
"
+
b
[
c
].
toolid
+
"
' style='
"
+
e
+
"
' value='
"
+
b
[
c
].
toolid
+
"
' data-enable='
"
+
b
[
c
].
enable
+
"
'>
"
+
f
+
"
</button>
"
;
a
(
"
#editpdlplus_toolbar_
"
+
b
[
0
].
axeid
).
append
(
g
)}
a
(
"
.editpdlplus_tool
"
).
on
(
"
click
"
,
w
),
r
.
prototype
.
refreshPrevisu
()}
else
a
(
"
#message_edit_tool
"
).
html
(
b
[
0
].
message
),
a
(
"
#message_edit_tool
"
).
addClass
(
"
alert-danger
"
),
a
(
"
#message_edit_tool
"
).
removeClass
(
"
alert-success
"
)}).
fail
(
b
.
exception
)}),
a
(
"
#toolEnabled
"
).
on
(
"
click
"
,
function
(){
var
b
=
a
(
"
#toolenabled
"
).
val
();
1
==
b
?(
a
(
"
#toolEnabled > i
"
).
addClass
(
"
fa-eye-slash
"
),
a
(
"
#toolEnabled > i
"
).
removeClass
(
"
fa-eye
"
),
a
(
"
#toolenabled
"
).
val
(
0
)):(
a
(
"
#toolEnabled > i
"
).
addClass
(
"
fa-eye
"
),
a
(
"
#toolEnabled > i
"
).
removeClass
(
"
fa-eye-slash
"
),
a
(
"
#toolenabled
"
).
val
(
1
)),
a
(
"
#toolFormSubmit
"
).
click
()}),
a
(
"
#toolClone
"
).
on
(
"
click
"
,
function
(){
p
=
"
clone
"
,
a
(
"
#assignfeedback_editpdfplus_widget_admin_button_addtool
"
).
click
()}),
a
(
"
#toolRemove
"
).
on
(
"
click
"
,
function
(){
if
(
!
a
(
this
).
hasClass
(
"
disabled
"
)){
var
d
=
a
(
"
#assignfeedback_editpdfplus_edit_tool
"
),
f
=
d
.
serialize
();
e
.
call
([{
methodname
:
"
assignfeedback_editpdfplus_submit_tool_del_form
"
,
args
:{
jsonformdata
:
JSON
.
stringify
(
f
)}}])[
0
].
done
(
function
(
b
){
if
(
""
===
b
[
0
].
message
){
a
(
"
#message_edit_tool
"
).
html
(
c
),
a
(
"
#message_edit_tool
"
).
addClass
(
"
alert-success
"
),
a
(
"
#message_edit_tool
"
).
removeClass
(
"
alert-danger
"
),
a
(
"
#editpdlplus_toolbar_
"
+
b
[
0
].
axeid
).
html
(
""
);
for
(
var
d
=
0
;
d
<
b
.
length
;
d
++
){
var
e
=
"
btn-default
"
;
1
!==
b
[
d
].
enable
&&
(
e
=
""
),
b
[
d
].
toolid
===
b
[
d
].
selecttool
&&
(
e
=
"
btn-primary
"
);
var
f
=
""
;
4
!==
b
[
d
].
typetool
&&
1
!==
b
[
d
].
typetool
||
(
f
=
"
text-decoration: underline;
"
);
var
g
=
b
[
d
].
button
;
4
!==
b
[
d
].
typetool
&&
5
!==
b
[
d
].
typetool
||
(
g
=
"
|
"
+
g
,
4
===
b
[
d
].
typetool
&&
(
g
+=
"
|
"
));
var
h
=
"
<button class='btn
"
+
e
+
"
editpdlplus_tool' id='editpdlplus_tool_
"
+
b
[
d
].
toolid
+
"
' style='
"
+
f
+
"
' value='
"
+
b
[
d
].
toolid
+
"
' data-enable='
"
+
b
[
d
].
enable
+
"
'>
"
+
g
+
"
</button>
"
;
a
(
"
#editpdlplus_toolbar_
"
+
b
[
0
].
axeid
).
append
(
h
)}
a
(
"
.editpdlplus_tool
"
).
on
(
"
click
"
,
w
),
a
(
"
#toolworkspace
"
).
html
(
""
)}
else
a
(
"
#message_edit_tool
"
).
html
(
b
[
0
].
message
),
a
(
"
#message_edit_tool
"
).
addClass
(
"
alert-danger
"
),
a
(
"
#message_edit_tool
"
).
removeClass
(
"
alert-success
"
)}).
fail
(
b
.
exception
)}}),
u
()}.
bind
(
this
)).
fail
(
b
.
exception
)}.
bind
(
this
)).
fail
(
b
.
exception
)};
return
r
.
prototype
.
openDivAddTool
=
function
(){
var
c
=
f
.
get_string
(
"
adminaddtool_messageok
"
,
"
assignfeedback_editpdfplus
"
);
a
(
"
#editpdlplus_tool_item
"
).
html
(
""
),
a
(
"
.btn-primary
"
).
addClass
(
"
btn-default
"
),
a
(
"
.editpdlplus_tool
"
).
removeClass
(
"
btn-primary
"
);
var
g
=
a
(
"
#editpdlplus_axes option:selected
"
).
val
(),
h
=
{
axisid
:
g
};
d
.
loadFragment
(
"
assignfeedback_editpdfplus
"
,
"
tooladd
"
,
n
,
h
).
done
(
function
(
d
,
f
){
v
(
a
(
"
#editpdlplus_tool_item
"
),
d
,
f
).
done
(
function
(){
"
clone
"
===
p
&&
(
a
(
"
#typetool
"
).
val
(
o
.
typetool
),
a
(
"
#color
"
).
val
(
o
.
color
),
a
(
"
#libelle
"
).
val
(
o
.
libelle
),
a
(
"
#cartridgecolor
"
).
val
(
o
.
catridgecolor
),
a
(
"
#texts
"
).
val
(
o
.
texts
),
a
(
"
#button
"
).
val
(
o
.
button
),
a
(
"
#enabled
"
).
val
(
o
.
enabled
),
a
(
"
#reply
"
).
val
(
o
.
reply
),
a
(
"
#order
"
).
val
(
o
.
order
),
o
=
null
,
p
=
null
),
a
(
"
#toolFormSubmit
"
).
on
(
"
click
"
,
function
(){
var
d
=
a
(
"
#assignfeedback_editpdfplus_edit_tool
"
),
f
=
d
.
serialize
();
e
.
call
([{
methodname
:
"
assignfeedback_editpdfplus_submit_tool_add_form
"
,
args
:{
jsonformdata
:
JSON
.
stringify
(
f
)}}])[
0
].
done
(
function
(
b
){
if
(
""
===
b
[
0
].
message
){
a
(
"
#message_edit_tool
"
).
html
(
c
),
a
(
"
#message_edit_tool
"
).
addClass
(
"
alert-success
"
),
a
(
"
#message_edit_tool
"
).
removeClass
(
"
alert-danger
"
),
a
(
"
#editpdlplus_toolbar_
"
+
b
[
0
].
axeid
).
html
(
""
);
for
(
var
d
=
0
;
d
<
b
.
length
;
d
++
){
var
e
=
"
btn-default
"
;
1
!==
b
[
d
].
enable
&&
(
e
=
""
),
b
[
d
].
toolid
===
b
[
d
].
selecttool
&&
(
e
=
"
btn-primary
"
);
var
f
=
""
;
4
!==
b
[
d
].
typetool
&&
1
!==
b
[
d
].
typetool
||
(
f
=
"
text-decoration: underline;
"
);
var
g
=
b
[
d
].
button
;
4
!==
b
[
d
].
typetool
&&
5
!==
b
[
d
].
typetool
||
(
g
=
"
|
"
+
g
,
4
===
b
[
d
].
typetool
&&
(
g
+=
"
|
"
));
var
h
=
"
<button class='btn
"
+
e
+
"
editpdlplus_tool' id='editpdlplus_tool_
"
+
b
[
d
].
toolid
+
"
' style='
"
+
f
+
"
' value='
"
+
b
[
d
].
toolid
+
"
' data-enable='
"
+
b
[
d
].
enable
+
"
'>
"
+
g
+
"
</button>
"
;
a
(
"
#editpdlplus_toolbar_
"
+
b
[
0
].
axeid
).
append
(
h
)}
a
(
"
.editpdlplus_tool
"
).
on
(
"
click
"
,
w
),
a
(
"
#editpdlplus_tool_item
"
).
html
(
""
)}
else
a
(
"
#message_edit_tool
"
).
html
(
b
[
0
].
message
),
a
(
"
#message_edit_tool
"
).
addClass
(
"
alert-danger
"
),
a
(
"
#message_edit_tool
"
).
removeClass
(
"
alert-success
"
)}).
fail
(
b
.
exception
)})}.
bind
(
this
)).
fail
(
b
.
exception
)}.
bind
(
this
)).
fail
(
b
.
exception
)},
r
});
\ No newline at end of file
\ No newline at end of file
amd/build/annotation.min.js
View file @
d1b74faa
This diff is collapsed.
Click to expand it.
amd/src/admin_panel.js
View file @
d1b74faa
...
@@ -41,9 +41,9 @@ define(['jquery'/*, 'core/yui'*/, 'core/notification', 'core/templates', 'core/f
...
@@ -41,9 +41,9 @@ define(['jquery'/*, 'core/yui'*/, 'core/notification', 'core/templates', 'core/f
*/
*/
var
AdminPanel
=
function
(
contextidP
,
typetoolsP
)
{
var
AdminPanel
=
function
(
contextidP
,
typetoolsP
)
{
//this.registerEventListeners();
//this.registerEventListeners();
this
.
init
();
contextid
=
contextidP
;
contextid
=
contextidP
;
typetools
=
JSON
.
parse
(
typetoolsP
);
typetools
=
JSON
.
parse
(
typetoolsP
);
this
.
init
();
};
};
var
annotationcurrent
=
null
;
var
annotationcurrent
=
null
;
//
//
...
@@ -72,6 +72,7 @@ define(['jquery'/*, 'core/yui'*/, 'core/notification', 'core/templates', 'core/f
...
@@ -72,6 +72,7 @@ define(['jquery'/*, 'core/yui'*/, 'core/notification', 'core/templates', 'core/f
$
(
"
#assignfeedback_editpdfplus_widget_admin_button_editaxis
"
).
on
(
"
click
"
,
this
.
openDivEditAxis
);
$
(
"
#assignfeedback_editpdfplus_widget_admin_button_editaxis
"
).
on
(
"
click
"
,
this
.
openDivEditAxis
);
$
(
"
#assignfeedback_editpdfplus_widget_admin_button_delaxis
"
).
on
(
"
click
"
,
this
.
openDivDelAxis
);
$
(
"
#assignfeedback_editpdfplus_widget_admin_button_delaxis
"
).
on
(
"
click
"
,
this
.
openDivDelAxis
);
$
(
"
#assignfeedback_editpdfplus_widget_admin_button_addtool
"
).
on
(
"
click
"
,
this
.
openDivAddTool
);
$
(
"
#assignfeedback_editpdfplus_widget_admin_button_addtool
"
).
on
(
"
click
"
,
this
.
openDivAddTool
);
$
(
"
.btn-primary
"
).
click
();
};
};
//
//
AdminPanel
.
prototype
.
test
=
function
()
{
AdminPanel
.
prototype
.
test
=
function
()
{
...
@@ -84,21 +85,7 @@ define(['jquery'/*, 'core/yui'*/, 'core/notification', 'core/templates', 'core/f
...
@@ -84,21 +85,7 @@ define(['jquery'/*, 'core/yui'*/, 'core/notification', 'core/templates', 'core/f
$
(
this
.
selectTool
).
addClass
(
"
btn-primary
"
);
$
(
this
.
selectTool
).
addClass
(
"
btn-primary
"
);
};
};
//
//
AdminPanel
.
prototype
.
refreshPrevisu
=
function
(
newtool
)
{
AdminPanel
.
prototype
.
refreshPrevisu
=
function
()
{
/*currentTool
alert($("#libelle").val());
$("#typetool").val(newtool.typetool);
$("#color").val(newtool.color);
$("#libelle").val(newtool.libelle);
$("#cartridgecolor").val(newtool.catridgecolor);
$("#texts").val(newtool.texts);
$("#button").val(newtool.button);
$("#enabled").val(newtool.enabled);
$("#reply").val(newtool.reply);
$("#order").val(newtool.order);
alert(newtool.libelle);
currentTool = newtool;
*/
currentTool
.
typetool
=
$
(
"
#typetool
"
).
val
();
currentTool
.
typetool
=
$
(
"
#typetool
"
).
val
();
currentTool
.
color
=
$
(
"
#color
"
).
val
();
currentTool
.
color
=
$
(
"
#color
"
).
val
();
currentTool
.
libelle
=
$
(
"
#libelle
"
).
val
();
currentTool
.
libelle
=
$
(
"
#libelle
"
).
val
();
...
@@ -106,7 +93,10 @@ define(['jquery'/*, 'core/yui'*/, 'core/notification', 'core/templates', 'core/f
...
@@ -106,7 +93,10 @@ define(['jquery'/*, 'core/yui'*/, 'core/notification', 'core/templates', 'core/f
currentTool
.
texts
=
$
(
"
#texts
"
).
val
();
currentTool
.
texts
=
$
(
"
#texts
"
).
val
();
currentTool
.
button
=
$
(
"
#button
"
).
val
();
currentTool
.
button
=
$
(
"
#button
"
).
val
();
currentTool
.
enabled
=
$
(
"
#enabled
"
).
val
();
currentTool
.
enabled
=
$
(
"
#enabled
"
).
val
();
currentTool
.
reply
=
$
(
"
#reply
"
).
val
();
currentTool
.
reply
=
0
;
if
(
$
(
"
#reply
"
).
is
(
'
:checked
'
))
{
currentTool
.
reply
=
1
;
}
currentTool
.
order
=
$
(
"
#order
"
).
val
();
currentTool
.
order
=
$
(
"
#order
"
).
val
();
initCanevas
();
initCanevas
();
};
};
...
@@ -146,6 +136,10 @@ define(['jquery'/*, 'core/yui'*/, 'core/notification', 'core/templates', 'core/f
...
@@ -146,6 +136,10 @@ define(['jquery'/*, 'core/yui'*/, 'core/notification', 'core/templates', 'core/f
}
}
if
(
annotationcurrent
)
{
if
(
annotationcurrent
)
{
var
typetoolEntity
=
getTypeTool
(
typetool
);
var
typetoolEntity
=
getTypeTool
(
typetool
);
currentTool
.
reply
=
0
;
if
(
$
(
"
#reply
"
).
is
(
'
:checked
'
))
{
currentTool
.
reply
=
1
;
}
annotationcurrent
.
initAdminDemo
(
currentTool
,
typetoolEntity
);
annotationcurrent
.
initAdminDemo
(
currentTool
,
typetoolEntity
);
annotationcurrent
.
draw
(
$
(
'
#canevas
'
));
annotationcurrent
.
draw
(
$
(
'
#canevas
'
));
if
(
annotChild
)
{
if
(
annotChild
)
{
...
@@ -271,7 +265,7 @@ define(['jquery'/*, 'core/yui'*/, 'core/notification', 'core/templates', 'core/f
...
@@ -271,7 +265,7 @@ define(['jquery'/*, 'core/yui'*/, 'core/notification', 'core/templates', 'core/f
$
(
"
#message_edit_tool
"
).
removeClass
(
"
alert-danger
"
);
$
(
"
#message_edit_tool
"
).
removeClass
(
"
alert-danger
"
);
//mise à jour bar d'outils
//mise à jour bar d'outils
$
(
"
#editpdlplus_toolbar_
"
+
toolbar
[
0
].
axeid
).
html
(
""
);
$
(
"
#editpdlplus_toolbar_
"
+
toolbar
[
0
].
axeid
).
html
(
""
);
var
newtool
=
null
;
//
var newtool = null;
for
(
var
i
=
0
;
i
<
toolbar
.
length
;
i
++
)
{
for
(
var
i
=
0
;
i
<
toolbar
.
length
;
i
++
)
{
var
classButton
=
"
btn-default
"
;
var
classButton
=
"
btn-default
"
;
if
(
toolbar
[
i
].
enable
!==
1
)
{
if
(
toolbar
[
i
].
enable
!==
1
)
{
...
@@ -279,7 +273,7 @@ define(['jquery'/*, 'core/yui'*/, 'core/notification', 'core/templates', 'core/f
...
@@ -279,7 +273,7 @@ define(['jquery'/*, 'core/yui'*/, 'core/notification', 'core/templates', 'core/f
}
}
if
(
toolbar
[
i
].
toolid
===
toolbar
[
i
].
selecttool
)
{
if
(
toolbar
[
i
].
toolid
===
toolbar
[
i
].
selecttool
)
{
classButton
=
"
btn-primary
"
;
classButton
=
"
btn-primary
"
;
newtool
=
toolbar
[
i
];
//
newtool = toolbar[i];
}
}
var
style
=
""
;
var
style
=
""
;
if
(
toolbar
[
i
].
typetool
===
4
||
toolbar
[
i
].
typetool
===
1
)
{
if
(
toolbar
[
i
].
typetool
===
4
||
toolbar
[
i
].
typetool
===
1
)
{
...
@@ -306,7 +300,7 @@ define(['jquery'/*, 'core/yui'*/, 'core/notification', 'core/templates', 'core/f
...
@@ -306,7 +300,7 @@ define(['jquery'/*, 'core/yui'*/, 'core/notification', 'core/templates', 'core/f
$
(
"
#editpdlplus_toolbar_
"
+
toolbar
[
0
].
axeid
).
append
(
buttonTmp
);
$
(
"
#editpdlplus_toolbar_
"
+
toolbar
[
0
].
axeid
).
append
(
buttonTmp
);
}
}
$
(
"
.editpdlplus_tool
"
).
on
(
"
click
"
,
refreshToolView
);
$
(
"
.editpdlplus_tool
"
).
on
(
"
click
"
,
refreshToolView
);
AdminPanel
.
prototype
.
refreshPrevisu
(
newtool
);
AdminPanel
.
prototype
.
refreshPrevisu
();
}
else
{
}
else
{
$
(
"
#message_edit_tool
"
).
html
(
toolbar
[
0
].
message
);
$
(
"
#message_edit_tool
"
).
html
(
toolbar
[
0
].
message
);
$
(
"
#message_edit_tool
"
).
addClass
(
"
alert-danger
"
);
$
(
"
#message_edit_tool
"
).
addClass
(
"
alert-danger
"
);
...
...
amd/src/annotation.js
View file @
d1b74faa
...
@@ -368,7 +368,7 @@ define(['jquery', './global'],
...
@@ -368,7 +368,7 @@ define(['jquery', './global'],
divconteneurdisplay
.
append
(
inputonof
);
divconteneurdisplay
.
append
(
inputonof
);
}
}
//var readonly = this.editor.get('readonly');
//var readonly = this.editor.get('readonly');
//
divconteneurdisplay.append(this.get_input_question());
divconteneurdisplay
.
append
(
this
.
get_input_question
());
//readonly = this.editor.get('readonly');
//readonly = this.editor.get('readonly');
//if (!readonly) {
//if (!readonly) {
this
.
get_button_visibility_left
(
divconteneurdisplay
);
this
.
get_button_visibility_left
(
divconteneurdisplay
);
...
@@ -385,6 +385,17 @@ define(['jquery', './global'],
...
@@ -385,6 +385,17 @@ define(['jquery', './global'],
return
divconteneurdisplay
;
return
divconteneurdisplay
;
};
};
/**
* get the html node for the hidden input to keep information about question state
* @return node
*/
Annotation
.
prototype
.
get_input_question
=
function
()
{
var
qst
=
0
;
if
(
this
.
answerrequested
&&
this
.
answerrequested
===
1
)
{
qst
=
1
;
}
return
"
<input type='hidden' id='
"
+
this
.
divcartridge
+
"
_question' value='
"
+
qst
+
"
'/>
"
;
};
/**
/**
* get the html node for the button to set visibility on right
* get the html node for the button to set visibility on right
* @return node
* @return node
...
...
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