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
ce289c6c
Commit
ce289c6c
authored
Aug 11, 2017
by
M. Chardon
Browse files
bouton de prévisu instantanée
parent
a5364bd7
Changes
3
Expand all
Hide whitespace changes
Inline
Side-by-side
amd/build/admin_panel.min.js
View file @
ce289c6c
This diff is collapsed.
Click to expand it.
amd/src/admin_panel.js
View file @
ce289c6c
...
...
@@ -92,21 +92,30 @@ define(['jquery'/*, 'core/yui'*/, 'core/notification', 'core/templates', 'core/f
$
(
this
.
selectTool
).
addClass
(
"
btn-primary
"
);
};
//
/*AdminPanel.prototype.refreshPrevisu = function () {
currentTool.typetool = $("#typetool").val();
currentTool.color = $("#color").val();
currentTool.libelle = $("#libelle").val();
currentTool.catridgecolor = $("#cartridgecolor").val();
currentTool.texts = $("#texts").val();
currentTool.button = $("#button").val();
currentTool.enabled = $("#enabled").val();
currentTool.reply = 0;
if ($("#reply").is(':checked')) {
currentTool.reply = 1;
}
currentTool.order = $("#order").val();
initCanevas();
};*/
AdminPanel
.
prototype
.
refreshPrevisu
=
function
()
{
currentTool
.
typetool
=
$
(
"
#typetool
"
).
val
();
currentTool
.
color
=
$
(
"
#color
"
).
val
();
currentTool
.
libelle
=
$
(
"
#libelle
"
).
val
();
currentTool
.
catridgecolor
=
$
(
"
#cartridgecolor
"
).
val
();
var
res
=
""
;
$
(
"
input[name^='text[']
"
).
each
(
function
()
{
if
(
$
(
this
).
val
()
&&
(
$
(
this
).
val
()).
length
>
0
)
{
res
+=
'
"
'
+
$
(
this
).
val
().
replace
(
/"/g
,
""
)
+
'
",
'
;
}
});
if
(
res
.
length
>
0
)
{
$
(
"
#texts
"
).
val
(
res
.
substring
(
0
,
res
.
length
-
1
));
}
currentTool
.
texts
=
$
(
"
#texts
"
).
val
();
currentTool
.
button
=
$
(
"
#button
"
).
val
();
currentTool
.
enabled
=
$
(
"
#enabled
"
).
val
();
currentTool
.
reply
=
0
;
if
(
$
(
"
#reply
"
).
is
(
'
:checked
'
))
{
currentTool
.
reply
=
1
;
}
currentTool
.
order
=
$
(
"
#order
"
).
val
();
initCanevas
();
};
//
var
getTypeTool
=
function
(
toolid
)
{
for
(
var
i
=
0
;
i
<
typetools
.
length
;
i
++
)
{
...
...
@@ -421,6 +430,9 @@ define(['jquery'/*, 'core/yui'*/, 'core/notification', 'core/templates', 'core/f
}).
fail
(
notification
.
exception
);
}
});
$
(
"
#toolRefesh
"
).
on
(
"
click
"
,
function
()
{
AdminPanel
.
prototype
.
refreshPrevisu
();
});
//maj affichage previsu
initCanevas
();
}.
bind
(
this
)).
fail
(
notification
.
exception
);
...
...
templates/tool_form.mustache
View file @
ce289c6c
...
...
@@ -12,7 +12,7 @@
<div
class=
'col-sm-3'
>
{{#
tool
.
id
}}
<div
id=
"editpdlplus_tool_label"
class=
"btn alert-info"
style=
"cursor: default;"
>
{{
tool
.
label
}}
</div>
{{/
tool
.
id
}}
</div>
<div
class=
'col-sm-offset-1 col-sm-
5
'
>
<div
class=
'col-sm-offset-1 col-sm-
3
'
>
{{#
str
}}
admintoolboxaction, assignfeedback_editpdfplus
{{/
str
}}{{#
tool
.
id
}}
s
{{/
tool
.
id
}}
:
<button
type=
"button"
class=
"btn btn-default"
id=
"toolFormSubmit"
><i
class=
"fa fa-
{{#
tool
.
id
}}
save
{{/
tool
.
id
}}{{^
tool
.
id
}}
save
{{/
tool
.
id
}}
"
aria-hidden=
"true"
></i></button>
{{#
tool
.
id
}}
...
...
@@ -21,6 +21,11 @@
<button
type=
"button"
class=
"btn btn-default
{{^
tool
.
removable
}}
disabled
{{/
tool
.
removable
}}
"
id=
"toolRemove"
><i
class=
"fa fa-remove"
aria-hidden=
"true"
></i></button>
{{/
tool
.
id
}}
</div>
<div
class=
'col-sm-2'
>
{{#
tool
.
id
}}
<button
type=
"button"
class=
"btn btn-default"
id=
"toolRefesh"
><i
class=
"fa fa-refresh"
aria-hidden=
"true"
></i></button>
{{/
tool
.
id
}}
</div>
</div>
<div
class=
'row'
>
...
...
Write
Preview
Supports
Markdown
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