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
94b04611
Commit
94b04611
authored
Aug 07, 2017
by
M. Chardon
Browse files
optimisation initialisation du mode adminDemo
parent
1a3d957a
Changes
16
Expand all
Show whitespace changes
Inline
Side-by-side
amd/build/admin_panel.min.js
View file @
94b04611
This diff is collapsed.
Click to expand it.
amd/build/annotation.min.js
View file @
94b04611
This diff is collapsed.
Click to expand it.
amd/build/annotationcommentplus.min.js
View file @
94b04611
define
([
"
jquery
"
,
"
./annotation
"
],
function
(
a
,
b
){
function
c
(){
return
b
.
call
(
this
),
this
}
return
c
.
prototype
=
Object
.
create
(
b
.
prototype
),
c
.
prototype
.
draw
=
function
(
b
){
if
(
b
){
var
c
=
"
<div id='
"
+
this
.
id
+
"
'><i class='fa fa-commenting' aria-hidden='true' style='color:black;'></i></div>
"
;
b
.
append
(
c
),
a
(
"
#
"
+
this
.
id
).
css
(
"
color
"
,
this
.
get_color
()),
a
(
"
#
"
+
this
.
id
).
css
(
"
width
"
,
this
.
endx
-
this
.
x
),
a
(
"
#
"
+
this
.
id
).
css
(
"
height
"
,
this
.
endy
-
this
.
y
),
a
(
"
#
"
+
this
.
id
).
css
(
"
padding
"
,
"
0 2px
"
),
a
(
"
#
"
+
this
.
id
).
css
(
"
position
"
,
"
absolute
"
),
a
(
"
#
"
+
this
.
id
).
css
(
"
display
"
,
"
inline-block
"
),
a
(
"
#
"
+
this
.
id
).
css
(
"
left
"
,
this
.
x
),
a
(
"
#
"
+
this
.
id
).
css
(
"
top
"
,
this
.
y
)}
this
.
draw_catridge
(
b
)},
c
.
prototype
.
draw_catridge
=
function
(
a
){
var
b
;
if
(
!
this
.
divcartridge
||
""
===
this
.
divcartridge
){
this
.
init_div_cartridge_id
();
var
c
=
this
.
get_color_cartridge
();
b
=
this
.
get_div_cartridge
(
c
,
a
),
b
.
addClass
(
"
assignfeedback_editpdfplus_commentplus
"
),
this
.
get_div_cartridge_label
(
c
,
b
);
var
d
=
this
.
get_div_container
(
c
,
b
);
this
.
get_div_edition
(
d
),
this
.
cartridgex
&&
0
!==
this
.
cartridgex
||
(
this
.
cartridgex
=
parseInt
(
this
.
tooltypefamille
.
cartridge_x
,
10
)),
this
.
cartridgey
&&
0
!==
this
.
cartridgey
||
(
this
.
cartridgey
=
parseInt
(
this
.
tooltypefamille
.
cartridge_y
,
10
)),
b
.
css
(
"
left
"
,
this
.
x
+
20
),
b
.
css
(
"
top
"
,
this
.
y
),
this
.
apply_visibility_annot
()}
return
!
0
},
c
});
\ No newline at end of file
define
([
"
jquery
"
,
"
./annotation
"
],
function
(
a
,
b
){
function
c
(){
return
b
.
call
(
this
),
this
}
return
c
.
prototype
=
Object
.
create
(
b
.
prototype
),
c
.
prototype
.
initAdminDemo
=
function
(
a
,
c
){
b
.
prototype
.
initAdminDemo
.
call
(
this
,
a
,
c
),
this
.
x
=
30
,
this
.
y
=
90
},
c
.
prototype
.
draw
=
function
(
b
){
if
(
b
){
var
c
=
"
<div id='
"
+
this
.
id
+
"
'><i class='fa fa-commenting' aria-hidden='true' style='color:black;'></i></div>
"
;
b
.
append
(
c
),
a
(
"
#
"
+
this
.
id
).
css
(
"
color
"
,
this
.
get_color
()),
a
(
"
#
"
+
this
.
id
).
css
(
"
width
"
,
this
.
endx
-
this
.
x
),
a
(
"
#
"
+
this
.
id
).
css
(
"
height
"
,
this
.
endy
-
this
.
y
),
a
(
"
#
"
+
this
.
id
).
css
(
"
padding
"
,
"
0 2px
"
),
a
(
"
#
"
+
this
.
id
).
css
(
"
position
"
,
"
absolute
"
),
a
(
"
#
"
+
this
.
id
).
css
(
"
display
"
,
"
inline-block
"
),
a
(
"
#
"
+
this
.
id
).
css
(
"
left
"
,
this
.
x
),
a
(
"
#
"
+
this
.
id
).
css
(
"
top
"
,
this
.
y
)}
this
.
draw_catridge
(
b
)},
c
.
prototype
.
draw_catridge
=
function
(
a
){
var
b
;
if
(
!
this
.
divcartridge
||
""
===
this
.
divcartridge
){
this
.
init_div_cartridge_id
();
var
c
=
this
.
get_color_cartridge
();
b
=
this
.
get_div_cartridge
(
c
,
a
),
b
.
addClass
(
"
assignfeedback_editpdfplus_commentplus
"
),
this
.
get_div_cartridge_label
(
c
,
b
);
var
d
=
this
.
get_div_container
(
c
,
b
);
this
.
get_div_edition
(
d
),
this
.
cartridgex
&&
0
!==
this
.
cartridgex
||
(
this
.
cartridgex
=
parseInt
(
this
.
tooltypefamille
.
cartridge_x
,
10
)),
this
.
cartridgey
&&
0
!==
this
.
cartridgey
||
(
this
.
cartridgey
=
parseInt
(
this
.
tooltypefamille
.
cartridge_y
,
10
)),
b
.
css
(
"
left
"
,
this
.
x
+
20
),
b
.
css
(
"
top
"
,
this
.
y
),
this
.
apply_visibility_annot
()}
return
!
0
},
c
});
\ No newline at end of file
amd/build/annotationframe.min.js
View file @
94b04611
define
([
"
jquery
"
,
"
./annotation
"
],
function
(
a
,
b
){
function
c
(){
return
b
.
call
(
this
),
this
}
return
c
.
prototype
=
Object
.
create
(
b
.
prototype
),
c
.
prototype
.
draw
=
function
(
b
){
if
(
b
){
var
c
=
"
<div id='
"
+
this
.
id
+
"
'></div>
"
;
b
.
append
(
c
),
a
(
"
#
"
+
this
.
id
).
css
(
"
width
"
,
this
.
endx
-
this
.
x
),
a
(
"
#
"
+
this
.
id
).
css
(
"
height
"
,
this
.
endy
-
this
.
y
),
a
(
"
#
"
+
this
.
id
).
css
(
"
border
"
,
"
solid 2px red
"
),
a
(
"
#
"
+
this
.
id
).
css
(
"
position
"
,
"
relative
"
),
a
(
"
#
"
+
this
.
id
).
css
(
"
left
"
,
this
.
x
),
a
(
"
#
"
+
this
.
id
).
css
(
"
top
"
,
this
.
y
)}
return
this
.
draw_catridge
(
b
),
this
},
c
.
prototype
.
draw_catridge
=
function
(
b
){
if
(
!
this
.
parent_annot_element
&&
0
===
this
.
parent_annot
){
var
c
;
if
(
!
this
.
divcartridge
||
""
===
this
.
divcartridge
){
this
.
init_div_cartridge_id
();
var
d
=
a
(
"
#
"
+
this
.
id
);
d
&&
d
.
addClass
(
"
class_
"
+
this
.
divcartridge
);
var
e
=
this
.
get_color
();
c
=
this
.
get_div_cartridge
(
e
,
b
),
c
.
addClass
(
"
assignfeedback_editpdfplus_frame
"
),
this
.
get_div_cartridge_label
(
e
,
c
,
!
0
);
var
f
=
this
.
get_div_container
(
e
,
c
),
g
=
"
<button id='
"
+
this
.
divcartridge
+
"
_buttonpencil' class='btn btn-default
"
;
this
.
adminDemo
&&
(
g
+=
"
disabled
"
),
g
+=
"
' type='button'>
"
,
g
+=
'
<i class="fa fa-eyedropper" aria-hidden="true"></i>
'
,
g
+=
"
</button>
"
;
var
h
=
"
<button id='
"
+
this
.
divcartridge
+
"
_buttonadd' class='btn btn-default
"
;
this
.
adminDemo
&&
(
h
+=
"
disabled
"
),
h
+=
"
' type='button'>
"
,
h
+=
'
<i class="fa fa-plus" aria-hidden="true"></i>
'
,
h
+=
"
</button>
"
,
f
.
append
(
g
),
f
.
append
(
h
),
this
.
get_div_edition
(
f
),
this
.
cartridgex
&&
0
!==
this
.
cartridgex
||
(
this
.
cartridgex
=
parseInt
(
this
.
tooltypefamille
.
cartridge_x
,
10
)),
this
.
cartridgey
&&
0
!==
this
.
cartridgey
||
(
this
.
cartridgey
=
parseInt
(
this
.
tooltypefamille
.
cartridge_y
,
10
)),
c
.
css
(
"
left
"
,
this
.
cartridgex
+
15
),
c
.
css
(
"
top
"
,
this
.
y
+
this
.
cartridgey
),
this
.
apply_visibility_annot
()}}
return
!
0
},
c
});
\ No newline at end of file
define
([
"
jquery
"
,
"
./annotation
"
],
function
(
a
,
b
){
function
c
(){
return
b
.
call
(
this
),
this
}
return
c
.
prototype
=
Object
.
create
(
b
.
prototype
),
c
.
prototype
.
initAdminDemo
=
function
(
a
,
c
){
b
.
prototype
.
initAdminDemo
.
call
(
this
,
a
,
c
),
this
.
x
=
279
,
this
.
y
=
113
,
this
.
endx
=
435
,
this
.
endy
=
129
,
this
.
parent_annot
=
0
},
c
.
prototype
.
initChildAdminDemo
=
function
(
a
){
b
.
prototype
.
initAdminDemo
.
call
(
this
,
a
.
tooltype
,
a
.
tooltypefamille
),
this
.
x
=
144
,
this
.
y
=
216
,
this
.
endx
=
296
,
this
.
endy
=
232
,
this
.
parent_annot
=
a
.
id
,
this
.
id
=
"
previsu_annot_child
"
},
c
.
prototype
.
draw
=
function
(
b
){
if
(
b
){
var
c
=
"
<div id='
"
+
this
.
id
+
"
'></div>
"
;
b
.
append
(
c
),
a
(
"
#
"
+
this
.
id
).
css
(
"
width
"
,
this
.
endx
-
this
.
x
),
a
(
"
#
"
+
this
.
id
).
css
(
"
height
"
,
this
.
endy
-
this
.
y
),
a
(
"
#
"
+
this
.
id
).
css
(
"
border
"
,
"
solid 2px red
"
),
a
(
"
#
"
+
this
.
id
).
css
(
"
position
"
,
"
relative
"
),
a
(
"
#
"
+
this
.
id
).
css
(
"
left
"
,
this
.
x
),
a
(
"
#
"
+
this
.
id
).
css
(
"
top
"
,
this
.
y
)}
return
this
.
draw_catridge
(
b
),
this
},
c
.
prototype
.
draw_catridge
=
function
(
b
){
if
(
!
this
.
parent_annot_element
&&
0
===
this
.
parent_annot
){
var
c
;
if
(
!
this
.
divcartridge
||
""
===
this
.
divcartridge
){
this
.
init_div_cartridge_id
();
var
d
=
a
(
"
#
"
+
this
.
id
);
d
&&
d
.
addClass
(
"
class_
"
+
this
.
divcartridge
);
var
e
=
this
.
get_color
();
c
=
this
.
get_div_cartridge
(
e
,
b
),
c
.
addClass
(
"
assignfeedback_editpdfplus_frame
"
),
this
.
get_div_cartridge_label
(
e
,
c
,
!
0
);
var
f
=
this
.
get_div_container
(
e
,
c
),
g
=
"
<button id='
"
+
this
.
divcartridge
+
"
_buttonpencil' class='btn btn-default
"
;
this
.
adminDemo
&&
(
g
+=
"
disabled
"
),
g
+=
"
' type='button'>
"
,
g
+=
'
<i class="fa fa-eyedropper" aria-hidden="true"></i>
'
,
g
+=
"
</button>
"
;
var
h
=
"
<button id='
"
+
this
.
divcartridge
+
"
_buttonadd' class='btn btn-default
"
;
this
.
adminDemo
&&
(
h
+=
"
disabled
"
),
h
+=
"
' type='button'>
"
,
h
+=
'
<i class="fa fa-plus" aria-hidden="true"></i>
'
,
h
+=
"
</button>
"
,
f
.
append
(
g
),
f
.
append
(
h
),
this
.
get_div_edition
(
f
),
this
.
cartridgex
&&
0
!==
this
.
cartridgex
||
(
this
.
cartridgex
=
parseInt
(
this
.
tooltypefamille
.
cartridge_x
,
10
)),
this
.
cartridgey
&&
0
!==
this
.
cartridgey
||
(
this
.
cartridgey
=
parseInt
(
this
.
tooltypefamille
.
cartridge_y
,
10
)),
c
.
css
(
"
left
"
,
this
.
cartridgex
+
15
),
c
.
css
(
"
top
"
,
this
.
y
+
this
.
cartridgey
),
this
.
apply_visibility_annot
()}}
return
!
0
},
c
});
\ No newline at end of file
amd/build/annotationhighlightplus.min.js
View file @
94b04611
define
([
"
jquery
"
,
"
./annotation
"
],
function
(
a
,
b
){
function
c
(){
return
b
.
call
(
this
),
this
}
return
c
.
prototype
=
Object
.
create
(
b
.
prototype
),
c
.
prototype
.
draw
=
function
(
b
){
if
(
b
){
var
c
=
"
<div id='
"
+
this
.
id
+
"
'></div>
"
;
b
.
append
(
c
),
a
(
"
#
"
+
this
.
id
).
css
(
"
background-color
"
,
this
.
get_color
()),
a
(
"
#
"
+
this
.
id
).
css
(
"
width
"
,
this
.
endx
-
this
.
x
),
a
(
"
#
"
+
this
.
id
).
css
(
"
height
"
,
this
.
endy
-
this
.
y
),
a
(
"
#
"
+
this
.
id
).
css
(
"
opacity
"
,.
5
),
a
(
"
#
"
+
this
.
id
).
css
(
"
position
"
,
"
relative
"
),
a
(
"
#
"
+
this
.
id
).
css
(
"
display
"
,
"
inline-block
"
),
a
(
"
#
"
+
this
.
id
).
css
(
"
left
"
,
this
.
x
),
a
(
"
#
"
+
this
.
id
).
css
(
"
top
"
,
this
.
y
)}
this
.
draw_catridge
(
b
)},
c
.
prototype
.
draw_catridge
=
function
(
a
){
var
b
;
if
(
!
this
.
divcartridge
||
""
===
this
.
divcartridge
){
this
.
init_div_cartridge_id
();
var
c
=
this
.
get_color_cartridge
();
b
=
this
.
get_div_cartridge
(
c
,
a
),
b
.
addClass
(
"
assignfeedback_editpdfplus_hightlightplus
"
),
this
.
get_div_cartridge_label
(
c
,
b
);
var
d
=
this
.
get_div_container
(
c
,
b
);
this
.
get_div_edition
(
d
),
this
.
cartridgex
&&
0
!==
this
.
cartridgex
||
(
this
.
cartridgex
=
parseInt
(
this
.
tooltypefamille
.
cartridge_x
,
10
)),
this
.
cartridgey
&&
0
!==
this
.
cartridgey
||
(
this
.
cartridgey
=
parseInt
(
this
.
tooltypefamille
.
cartridge_y
,
10
)),
b
.
css
(
"
left
"
,
this
.
x
+
this
.
cartridgex
+
17
),
b
.
css
(
"
top
"
,
this
.
y
+
this
.
cartridgey
),
this
.
apply_visibility_annot
()}
return
!
0
},
c
});
\ No newline at end of file
define
([
"
jquery
"
,
"
./annotation
"
],
function
(
a
,
b
){
function
c
(){
return
b
.
call
(
this
),
this
}
return
c
.
prototype
=
Object
.
create
(
b
.
prototype
),
c
.
prototype
.
initAdminDemo
=
function
(
a
,
c
){
b
.
prototype
.
initAdminDemo
.
call
(
this
,
a
,
c
),
this
.
x
=
83
,
this
.
y
=
84
,
this
.
endx
=
239
,
this
.
endy
=
100
},
c
.
prototype
.
draw
=
function
(
b
){
if
(
b
){
var
c
=
"
<div id='
"
+
this
.
id
+
"
'></div>
"
;
b
.
append
(
c
),
a
(
"
#
"
+
this
.
id
).
css
(
"
background-color
"
,
this
.
get_color
()),
a
(
"
#
"
+
this
.
id
).
css
(
"
width
"
,
this
.
endx
-
this
.
x
),
a
(
"
#
"
+
this
.
id
).
css
(
"
height
"
,
this
.
endy
-
this
.
y
),
a
(
"
#
"
+
this
.
id
).
css
(
"
opacity
"
,.
5
),
a
(
"
#
"
+
this
.
id
).
css
(
"
position
"
,
"
relative
"
),
a
(
"
#
"
+
this
.
id
).
css
(
"
display
"
,
"
inline-block
"
),
a
(
"
#
"
+
this
.
id
).
css
(
"
left
"
,
this
.
x
),
a
(
"
#
"
+
this
.
id
).
css
(
"
top
"
,
this
.
y
)}
this
.
draw_catridge
(
b
)},
c
.
prototype
.
draw_catridge
=
function
(
a
){
var
b
;
if
(
!
this
.
divcartridge
||
""
===
this
.
divcartridge
){
this
.
init_div_cartridge_id
();
var
c
=
this
.
get_color_cartridge
();
b
=
this
.
get_div_cartridge
(
c
,
a
),
b
.
addClass
(
"
assignfeedback_editpdfplus_hightlightplus
"
),
this
.
get_div_cartridge_label
(
c
,
b
);
var
d
=
this
.
get_div_container
(
c
,
b
);
this
.
get_div_edition
(
d
),
this
.
cartridgex
&&
0
!==
this
.
cartridgex
||
(
this
.
cartridgex
=
parseInt
(
this
.
tooltypefamille
.
cartridge_x
,
10
)),
this
.
cartridgey
&&
0
!==
this
.
cartridgey
||
(
this
.
cartridgey
=
parseInt
(
this
.
tooltypefamille
.
cartridge_y
,
10
)),
b
.
css
(
"
left
"
,
this
.
x
+
this
.
cartridgex
+
17
),
b
.
css
(
"
top
"
,
this
.
y
+
this
.
cartridgey
),
this
.
apply_visibility_annot
()}
return
!
0
},
c
});
\ No newline at end of file
amd/build/annotationstampcomment.min.js
View file @
94b04611
define
([
"
jquery
"
,
"
./annotation
"
],
function
(
a
,
b
){
function
c
(){
return
b
.
call
(
this
),
this
}
return
c
.
prototype
=
Object
.
create
(
b
.
prototype
),
c
.
prototype
.
draw
=
function
(
b
){
if
(
b
){
this
.
shape_id
=
"
ct_stampcomment_
"
+
(
new
Date
).
toJSON
().
replace
(
/:/g
,
""
).
replace
(
/
\.
/g
,
""
);
var
c
=
'
<i id="
'
+
this
.
shape_id
+
'
_img" class="fa fa-arrows-h fa-2x" aria-hidden="true"></i>
'
;
this
.
displayrotation
>
0
&&
(
c
=
'
<i id="
'
+
this
.
shape_id
+
'
_img" class="fa fa-arrows-v fa-2x" aria-hidden="true"></i>
'
);
var
d
=
"
<div id='
"
+
this
.
id
+
"
'>
"
+
c
+
"
</div>
"
;
b
.
append
(
d
),
a
(
"
#
"
+
this
.
id
).
css
(
"
position
"
,
"
absolute
"
),
a
(
"
#
"
+
this
.
id
).
css
(
"
display
"
,
"
inline-block
"
),
a
(
"
#
"
+
this
.
id
).
css
(
"
left
"
,
this
.
x
),
a
(
"
#
"
+
this
.
id
).
css
(
"
top
"
,
this
.
y
)}
this
.
draw_catridge
(
b
)},
c
.
prototype
.
draw_catridge
=
function
(
a
){
var
b
;
if
(
!
this
.
divcartridge
||
""
===
this
.
divcartridge
){
this
.
init_div_cartridge_id
();
var
c
=
this
.
get_color_cartridge
();
b
=
this
.
get_div_cartridge
(
c
,
a
),
b
.
addClass
(
"
assignfeedback_editpdfplus_stampcomment
"
),
this
.
get_div_cartridge_label
(
c
,
b
);
var
d
=
this
.
get_div_container
(
c
,
b
),
e
=
0
;
this
.
displayrotation
>
0
&&
(
e
=
1
);
var
f
=
"
<input type='hidden' id='
"
+
this
.
divcartridge
+
"
_rotation' value=
"
+
e
+
"
/>
"
;
d
.
append
(
f
);
var
g
=
"
<button id='
"
+
this
.
divcartridge
+
"
_buttonrotation' class='btn btn-default
"
;
this
.
adminDemo
&&
(
g
+=
"
disabled
"
),
g
+=
'
\'
type=
\'
button
\'
><i class="fa fa-refresh" aria-hidden="true"></i></button>
'
,
d
.
append
(
g
),
this
.
get_div_edition
(
d
),
this
.
cartridgex
&&
0
!==
this
.
cartridgex
||
(
this
.
cartridgex
=
parseInt
(
this
.
tooltypefamille
.
cartridge_x
,
10
)),
this
.
cartridgey
&&
0
!==
this
.
cartridgey
||
(
this
.
cartridgey
=
parseInt
(
this
.
tooltypefamille
.
cartridge_y
,
10
)),
b
.
css
(
"
left
"
,
this
.
x
+
this
.
cartridgex
),
b
.
css
(
"
top
"
,
this
.
y
+
this
.
cartridgey
-
5
),
this
.
apply_visibility_annot
()}
return
!
0
},
c
});
\ No newline at end of file
define
([
"
jquery
"
,
"
./annotation
"
],
function
(
a
,
b
){
function
c
(){
return
b
.
call
(
this
),
this
}
return
c
.
prototype
=
Object
.
create
(
b
.
prototype
),
c
.
prototype
.
initAdminDemo
=
function
(
a
,
c
){
b
.
prototype
.
initAdminDemo
.
call
(
this
,
a
,
c
),
this
.
x
=
188
,
this
.
y
=
118
,
this
.
displayrotation
=
1
},
c
.
prototype
.
draw
=
function
(
b
){
if
(
b
){
this
.
shape_id
=
"
ct_stampcomment_
"
+
(
new
Date
).
toJSON
().
replace
(
/:/g
,
""
).
replace
(
/
\.
/g
,
""
);
var
c
=
'
<i id="
'
+
this
.
shape_id
+
'
_img" class="fa fa-arrows-h fa-2x" aria-hidden="true"></i>
'
;
this
.
displayrotation
>
0
&&
(
c
=
'
<i id="
'
+
this
.
shape_id
+
'
_img" class="fa fa-arrows-v fa-2x" aria-hidden="true"></i>
'
);
var
d
=
"
<div id='
"
+
this
.
id
+
"
'>
"
+
c
+
"
</div>
"
;
b
.
append
(
d
),
a
(
"
#
"
+
this
.
id
).
css
(
"
position
"
,
"
absolute
"
),
a
(
"
#
"
+
this
.
id
).
css
(
"
display
"
,
"
inline-block
"
),
a
(
"
#
"
+
this
.
id
).
css
(
"
left
"
,
this
.
x
),
a
(
"
#
"
+
this
.
id
).
css
(
"
top
"
,
this
.
y
)}
this
.
draw_catridge
(
b
)},
c
.
prototype
.
draw_catridge
=
function
(
a
){
var
b
;
if
(
!
this
.
divcartridge
||
""
===
this
.
divcartridge
){
this
.
init_div_cartridge_id
();
var
c
=
this
.
get_color_cartridge
();
b
=
this
.
get_div_cartridge
(
c
,
a
),
b
.
addClass
(
"
assignfeedback_editpdfplus_stampcomment
"
),
this
.
get_div_cartridge_label
(
c
,
b
);
var
d
=
this
.
get_div_container
(
c
,
b
),
e
=
0
;
this
.
displayrotation
>
0
&&
(
e
=
1
);
var
f
=
"
<input type='hidden' id='
"
+
this
.
divcartridge
+
"
_rotation' value=
"
+
e
+
"
/>
"
;
d
.
append
(
f
);
var
g
=
"
<button id='
"
+
this
.
divcartridge
+
"
_buttonrotation' class='btn btn-default
"
;
this
.
adminDemo
&&
(
g
+=
"
disabled
"
),
g
+=
'
\'
type=
\'
button
\'
><i class="fa fa-refresh" aria-hidden="true"></i></button>
'
,
d
.
append
(
g
),
this
.
get_div_edition
(
d
),
this
.
cartridgex
&&
0
!==
this
.
cartridgex
||
(
this
.
cartridgex
=
parseInt
(
this
.
tooltypefamille
.
cartridge_x
,
10
)),
this
.
cartridgey
&&
0
!==
this
.
cartridgey
||
(
this
.
cartridgey
=
parseInt
(
this
.
tooltypefamille
.
cartridge_y
,
10
)),
b
.
css
(
"
left
"
,
this
.
x
+
this
.
cartridgex
),
b
.
css
(
"
top
"
,
this
.
y
+
this
.
cartridgey
-
5
),
this
.
apply_visibility_annot
()}
return
!
0
},
c
});
\ No newline at end of file
amd/build/annotationstampplus.min.js
View file @
94b04611
define
([
"
jquery
"
,
"
./annotation
"
],
function
(
a
,
b
){
function
c
(){
return
b
.
call
(
this
),
this
}
return
c
.
prototype
=
Object
.
create
(
b
.
prototype
),
c
.
prototype
.
draw
=
function
(
b
){
if
(
b
){
var
c
=
"
<div id='
"
+
this
.
id
+
"
'></div>
"
;
b
.
append
(
c
),
a
(
"
#
"
+
this
.
id
).
css
(
"
position
"
,
"
relative
"
),
a
(
"
#
"
+
this
.
id
).
css
(
"
top
"
,
this
.
y
),
a
(
"
#
"
+
this
.
id
).
css
(
"
left
"
,
this
.
x
),
a
(
"
#
"
+
this
.
id
).
css
(
"
color
"
,
this
.
colour
),
a
(
"
#
"
+
this
.
id
).
css
(
"
border
"
,
"
2px solid
"
+
this
.
colour
),
a
(
"
#
"
+
this
.
id
).
css
(
"
padding
"
,
"
0 2px
"
),
a
(
"
#
"
+
this
.
id
).
css
(
"
display
"
,
"
inline-block
"
),
a
(
"
#
"
+
this
.
id
).
append
(
this
.
tooltype
.
button
)}
return
this
},
c
});
\ No newline at end of file
define
([
"
jquery
"
,
"
./annotation
"
],
function
(
a
,
b
){
function
c
(){
return
b
.
call
(
this
),
this
}
return
c
.
prototype
=
Object
.
create
(
b
.
prototype
),
c
.
prototype
.
initAdminDemo
=
function
(
a
,
c
){
b
.
prototype
.
initAdminDemo
.
call
(
this
,
a
,
c
),
this
.
x
=
60
,
this
.
y
=
100
},
c
.
prototype
.
draw
=
function
(
b
){
if
(
b
){
var
c
=
"
<div id='
"
+
this
.
id
+
"
'></div>
"
;
b
.
append
(
c
),
a
(
"
#
"
+
this
.
id
).
css
(
"
position
"
,
"
relative
"
),
a
(
"
#
"
+
this
.
id
).
css
(
"
top
"
,
this
.
y
),
a
(
"
#
"
+
this
.
id
).
css
(
"
left
"
,
this
.
x
),
a
(
"
#
"
+
this
.
id
).
css
(
"
color
"
,
this
.
colour
),
a
(
"
#
"
+
this
.
id
).
css
(
"
border
"
,
"
2px solid
"
+
this
.
colour
),
a
(
"
#
"
+
this
.
id
).
css
(
"
padding
"
,
"
0 2px
"
),
a
(
"
#
"
+
this
.
id
).
css
(
"
display
"
,
"
inline-block
"
),
a
(
"
#
"
+
this
.
id
).
append
(
this
.
tooltype
.
button
)}
return
this
},
c
});
\ No newline at end of file
amd/build/annotationverticalline.min.js
View file @
94b04611
define
([
"
jquery
"
,
"
./annotation
"
],
function
(
a
,
b
){
function
c
(){
return
b
.
call
(
this
),
this
}
return
c
.
prototype
=
Object
.
create
(
b
.
prototype
),
c
.
prototype
.
draw
=
function
(
b
){
if
(
b
){
var
c
=
"
<div id='
"
+
this
.
id
+
"
'></div>
"
;
b
.
append
(
c
),
a
(
"
#
"
+
this
.
id
).
css
(
"
background-color
"
,
this
.
get_color
()),
a
(
"
#
"
+
this
.
id
).
css
(
"
width
"
,
3
),
this
.
endy
-
this
.
y
<=
30
&&
(
this
.
endy
=
this
.
y
+
30
),
a
(
"
#
"
+
this
.
id
).
css
(
"
height
"
,
this
.
endy
-
this
.
y
),
a
(
"
#
"
+
this
.
id
).
css
(
"
position
"
,
"
relative
"
),
a
(
"
#
"
+
this
.
id
).
css
(
"
display
"
,
"
inline-block
"
),
a
(
"
#
"
+
this
.
id
).
css
(
"
left
"
,
this
.
x
),
a
(
"
#
"
+
this
.
id
).
css
(
"
top
"
,
this
.
y
)}
this
.
draw_catridge
(
b
)},
c
.
prototype
.
draw_catridge
=
function
(
a
){
var
b
;
if
(
!
this
.
divcartridge
||
""
===
this
.
divcartridge
){
this
.
init_div_cartridge_id
();
var
c
=
this
.
get_color_cartridge
();
b
=
this
.
get_div_cartridge
(
c
,
a
),
b
.
addClass
(
"
assignfeedback_editpdfplus_verticalline
"
),
this
.
get_div_cartridge_label
(
c
,
b
);
var
d
=
this
.
get_div_container
(
c
,
b
);
this
.
get_div_edition
(
d
),
this
.
cartridgex
&&
0
!==
this
.
cartridgex
||
(
this
.
cartridgex
=
parseInt
(
this
.
tooltypefamille
.
cartridge_x
,
10
)),
this
.
cartridgey
&&
0
!==
this
.
cartridgey
||
(
this
.
cartridgey
=
parseInt
(
this
.
tooltypefamille
.
cartridge_y
,
10
)),
b
.
css
(
"
left
"
,
this
.
x
+
this
.
cartridgex
),
b
.
css
(
"
top
"
,
this
.
y
+
this
.
cartridgey
),
this
.
apply_visibility_annot
()}
return
!
0
},
c
});
\ No newline at end of file
define
([
"
jquery
"
,
"
./annotation
"
],
function
(
a
,
b
){
function
c
(){
return
b
.
call
(
this
),
this
}
return
c
.
prototype
=
Object
.
create
(
b
.
prototype
),
c
.
prototype
.
initAdminDemo
=
function
(
a
,
c
){
b
.
prototype
.
initAdminDemo
.
call
(
this
,
a
,
c
),
this
.
x
=
285
,
this
.
y
=
65
,
this
.
endy
=
175
},
c
.
prototype
.
draw
=
function
(
b
){
if
(
b
){
var
c
=
"
<div id='
"
+
this
.
id
+
"
'></div>
"
;
b
.
append
(
c
),
a
(
"
#
"
+
this
.
id
).
css
(
"
background-color
"
,
this
.
get_color
()),
a
(
"
#
"
+
this
.
id
).
css
(
"
width
"
,
3
),
this
.
endy
-
this
.
y
<=
30
&&
(
this
.
endy
=
this
.
y
+
30
),
a
(
"
#
"
+
this
.
id
).
css
(
"
height
"
,
this
.
endy
-
this
.
y
),
a
(
"
#
"
+
this
.
id
).
css
(
"
position
"
,
"
relative
"
),
a
(
"
#
"
+
this
.
id
).
css
(
"
display
"
,
"
inline-block
"
),
a
(
"
#
"
+
this
.
id
).
css
(
"
left
"
,
this
.
x
),
a
(
"
#
"
+
this
.
id
).
css
(
"
top
"
,
this
.
y
)}
this
.
draw_catridge
(
b
)},
c
.
prototype
.
draw_catridge
=
function
(
a
){
var
b
;
if
(
!
this
.
divcartridge
||
""
===
this
.
divcartridge
){
this
.
init_div_cartridge_id
();
var
c
=
this
.
get_color_cartridge
();
b
=
this
.
get_div_cartridge
(
c
,
a
),
b
.
addClass
(
"
assignfeedback_editpdfplus_verticalline
"
),
this
.
get_div_cartridge_label
(
c
,
b
);
var
d
=
this
.
get_div_container
(
c
,
b
);
this
.
get_div_edition
(
d
),
this
.
cartridgex
&&
0
!==
this
.
cartridgex
||
(
this
.
cartridgex
=
parseInt
(
this
.
tooltypefamille
.
cartridge_x
,
10
)),
this
.
cartridgey
&&
0
!==
this
.
cartridgey
||
(
this
.
cartridgey
=
parseInt
(
this
.
tooltypefamille
.
cartridge_y
,
10
)),
b
.
css
(
"
left
"
,
this
.
x
+
this
.
cartridgex
+
17
),
b
.
css
(
"
top
"
,
this
.
y
+
this
.
cartridgey
),
this
.
apply_visibility_annot
()}
return
!
0
},
c
});
\ No newline at end of file
amd/src/admin_panel.js
View file @
94b04611
...
...
@@ -105,66 +105,24 @@ define(['jquery'/*, 'core/yui'*/, 'core/notification', 'core/templates', 'core/f
}
if
(
typetool
===
1
)
{
this
.
annotationcurrent
=
new
AnnotationHighlightplus
();
this
.
annotationcurrent
.
x
=
83
;
this
.
annotationcurrent
.
y
=
84
;
this
.
annotationcurrent
.
endx
=
239
;
this
.
annotationcurrent
.
endy
=
100
;
}
else
if
(
typetool
===
3
)
{
this
.
annotationcurrent
=
new
AnnotationStampplus
();
this
.
annotationcurrent
.
x
=
60
;
this
.
annotationcurrent
.
y
=
100
;
}
else
if
(
typetool
===
4
)
{
this
.
annotationcurrent
=
new
AnnotationFrame
();
this
.
annotationcurrent
.
x
=
279
;
this
.
annotationcurrent
.
y
=
113
;
this
.
annotationcurrent
.
endx
=
435
;
this
.
annotationcurrent
.
endy
=
129
;
this
.
annotationcurrent
.
parent_annot
=
0
;
var
annotChild
=
new
AnnotationFrame
();
annotChild
.
x
=
144
;
annotChild
.
y
=
216
;
annotChild
.
endx
=
296
;
annotChild
.
endy
=
232
;
}
else
if
(
typetool
===
5
)
{
this
.
annotationcurrent
=
new
AnnotationVerticalline
();
this
.
annotationcurrent
.
x
=
285
;
this
.
annotationcurrent
.
y
=
65
;
this
.
annotationcurrent
.
endy
=
175
;
}
else
if
(
typetool
===
6
)
{
this
.
annotationcurrent
=
new
AnnotationStampcomment
();
this
.
annotationcurrent
.
x
=
188
;
this
.
annotationcurrent
.
y
=
118
;
this
.
annotationcurrent
.
displayrotation
=
1
;
}
else
if
(
typetool
===
7
)
{
this
.
annotationcurrent
=
new
AnnotationCommentplus
();
this
.
annotationcurrent
.
x
=
30
;
this
.
annotationcurrent
.
y
=
90
;
}
if
(
this
.
annotationcurrent
)
{
var
typetoolEntity
=
getTypeTool
(
typetool
);
this
.
annotationcurrent
.
tooltype
=
currentTool
;
if
(
currentTool
.
color
)
{
this
.
annotationcurrent
.
colour
=
currentTool
.
color
;
}
else
{
this
.
annotationcurrent
.
colour
=
typetoolEntity
.
color
;
}
this
.
annotationcurrent
.
tooltypefamille
=
typetoolEntity
;
this
.
annotationcurrent
.
id
=
'
previsu_annot
'
;
this
.
annotationcurrent
.
displaylock
=
1
;
this
.
annotationcurrent
.
adminDemo
=
1
;
this
.
annotationcurrent
.
initAdminDemo
(
currentTool
,
typetoolEntity
);
this
.
annotationcurrent
.
draw
(
$
(
'
#canevas
'
));
if
(
annotChild
)
{
annotChild
.
tooltype
=
currentTool
;
if
(
currentTool
.
color
)
{
annotChild
.
colour
=
currentTool
.
color
;
}
else
{
annotChild
.
colour
=
typetoolEntity
.
color
;
}
annotChild
.
tooltypefamille
=
typetoolEntity
;
annotChild
.
parent_annot
=
this
.
annotationcurrent
.
id
;
annotChild
.
id
=
'
previsu_annot_child
'
;
annotChild
.
displaylock
=
1
;
annotChild
.
adminDemo
=
1
;
annotChild
.
initChildAdminDemo
(
this
.
annotationcurrent
);
annotChild
.
draw
(
$
(
'
#canevas
'
));
}
}
...
...
amd/src/annotation.js
View file @
94b04611
...
...
@@ -156,6 +156,19 @@ define(['jquery', './global'],
this
.
toolid
=
config
.
toolid
;
this
.
tooltypefamille
=
this
.
editor
.
typetools
[
this
.
tooltype
.
type
];
};
Annotation
.
prototype
.
initAdminDemo
=
function
(
currentTool
,
typetoolEntity
)
{
this
.
id
=
'
previsu_annot
'
;
this
.
displaylock
=
1
;
this
.
adminDemo
=
1
;
this
.
tooltype
=
currentTool
;
this
.
tooltypefamille
=
typetoolEntity
;
if
(
currentTool
.
color
)
{
this
.
colour
=
currentTool
.
color
;
}
else
{
this
.
colour
=
typetoolEntity
.
color
;
}
};
/**
* Draw an annotation
* @public
...
...
amd/src/annotationcommentplus.js
View file @
94b04611
...
...
@@ -31,6 +31,12 @@ define(['jquery', './annotation'],
}
// The Friend class extends the base Model class.
AnnotationCommentplus
.
prototype
=
Object
.
create
(
Annotation
.
prototype
);
AnnotationCommentplus
.
prototype
.
initAdminDemo
=
function
(
currentTool
,
typetoolEntity
)
{
Annotation
.
prototype
.
initAdminDemo
.
call
(
this
,
currentTool
,
typetoolEntity
);
this
.
x
=
30
;
this
.
y
=
90
;
};
/**
* Draw a highlight annotation
* @protected
...
...
amd/src/annotationframe.js
View file @
94b04611
...
...
@@ -31,6 +31,25 @@ define(['jquery', './annotation'],
}
// The Friend class extends the base Model class.
AnnotationFrame
.
prototype
=
Object
.
create
(
Annotation
.
prototype
);
AnnotationFrame
.
prototype
.
initAdminDemo
=
function
(
currentTool
,
typetoolEntity
)
{
Annotation
.
prototype
.
initAdminDemo
.
call
(
this
,
currentTool
,
typetoolEntity
);
this
.
x
=
279
;
this
.
y
=
113
;
this
.
endx
=
435
;
this
.
endy
=
129
;
this
.
parent_annot
=
0
;
};
AnnotationFrame
.
prototype
.
initChildAdminDemo
=
function
(
annotationparent
)
{
Annotation
.
prototype
.
initAdminDemo
.
call
(
this
,
annotationparent
.
tooltype
,
annotationparent
.
tooltypefamille
);
this
.
x
=
144
;
this
.
y
=
216
;
this
.
endx
=
296
;
this
.
endy
=
232
;
this
.
parent_annot
=
annotationparent
.
id
;
this
.
id
=
'
previsu_annot_child
'
;
};
/**
* Draw a highlight annotation
* @protected
...
...
amd/src/annotationhighlightplus.js
View file @
94b04611
...
...
@@ -31,6 +31,14 @@ define(['jquery', './annotation'],
}
// The Friend class extends the base Model class.
AnnotationHighlightplus
.
prototype
=
Object
.
create
(
Annotation
.
prototype
);
AnnotationHighlightplus
.
prototype
.
initAdminDemo
=
function
(
currentTool
,
typetoolEntity
)
{
Annotation
.
prototype
.
initAdminDemo
.
call
(
this
,
currentTool
,
typetoolEntity
);
this
.
x
=
83
;
this
.
y
=
84
;
this
.
endx
=
239
;
this
.
endy
=
100
;
};
/**
* Draw a highlight annotation
* @protected
...
...
amd/src/annotationstampcomment.js
View file @
94b04611
...
...
@@ -31,6 +31,13 @@ define(['jquery', './annotation'],
}
// The Friend class extends the base Model class.
AnnotationStampcomment
.
prototype
=
Object
.
create
(
Annotation
.
prototype
);
AnnotationStampcomment
.
prototype
.
initAdminDemo
=
function
(
currentTool
,
typetoolEntity
)
{
Annotation
.
prototype
.
initAdminDemo
.
call
(
this
,
currentTool
,
typetoolEntity
);
this
.
x
=
188
;
this
.
y
=
118
;
this
.
displayrotation
=
1
;
};
/**
* Draw a highlight annotation
* @protected
...
...
amd/src/annotationstampplus.js
View file @
94b04611
...
...
@@ -31,6 +31,12 @@ define(['jquery', './annotation'],
}
// The Friend class extends the base Model class.
AnnotationStampplus
.
prototype
=
Object
.
create
(
Annotation
.
prototype
);
AnnotationStampplus
.
prototype
.
initAdminDemo
=
function
(
currentTool
,
typetoolEntity
)
{
Annotation
.
prototype
.
initAdminDemo
.
call
(
this
,
currentTool
,
typetoolEntity
);
this
.
x
=
60
;
this
.
y
=
100
;
};
/**
* Draw a highlight annotation
* @protected
...
...
amd/src/annotationverticalline.js
View file @
94b04611
...
...
@@ -31,6 +31,13 @@ define(['jquery', './annotation'],
}
// The Friend class extends the base Model class.
AnnotationVerticalline
.
prototype
=
Object
.
create
(
Annotation
.
prototype
);
AnnotationVerticalline
.
prototype
.
initAdminDemo
=
function
(
currentTool
,
typetoolEntity
)
{
Annotation
.
prototype
.
initAdminDemo
.
call
(
this
,
currentTool
,
typetoolEntity
);
this
.
x
=
285
;
this
.
y
=
65
;
this
.
endy
=
175
;
};
/**
* Draw a highlight annotation
* @protected
...
...
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