Gitlab CSE Unil

Commit ce289c6c authored by M. Chardon's avatar M. Chardon
Browse files

bouton de prévisu instantanée

parent a5364bd7
This diff is collapsed.
...@@ -92,21 +92,30 @@ define(['jquery'/*, 'core/yui'*/, 'core/notification', 'core/templates', 'core/f ...@@ -92,21 +92,30 @@ define(['jquery'/*, 'core/yui'*/, 'core/notification', 'core/templates', 'core/f
$(this.selectTool).addClass("btn-primary"); $(this.selectTool).addClass("btn-primary");
}; };
// //
/*AdminPanel.prototype.refreshPrevisu = function () { AdminPanel.prototype.refreshPrevisu = function () {
currentTool.typetool = $("#typetool").val(); currentTool.typetool = $("#typetool").val();
currentTool.color = $("#color").val(); currentTool.color = $("#color").val();
currentTool.libelle = $("#libelle").val(); currentTool.libelle = $("#libelle").val();
currentTool.catridgecolor = $("#cartridgecolor").val(); currentTool.catridgecolor = $("#cartridgecolor").val();
currentTool.texts = $("#texts").val(); var res = "";
currentTool.button = $("#button").val(); $("input[name^='text[']").each(function () {
currentTool.enabled = $("#enabled").val(); if ($(this).val() && ($(this).val()).length > 0) {
currentTool.reply = 0; res += '"' + $(this).val().replace(/"/g, "") + '",';
if ($("#reply").is(':checked')) { }
currentTool.reply = 1; });
} if (res.length > 0) {
currentTool.order = $("#order").val(); $("#texts").val(res.substring(0, res.length - 1));
initCanevas(); }
};*/ 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) { var getTypeTool = function (toolid) {
for (var i = 0; i < typetools.length; i++) { for (var i = 0; i < typetools.length; i++) {
...@@ -421,6 +430,9 @@ define(['jquery'/*, 'core/yui'*/, 'core/notification', 'core/templates', 'core/f ...@@ -421,6 +430,9 @@ define(['jquery'/*, 'core/yui'*/, 'core/notification', 'core/templates', 'core/f
}).fail(notification.exception); }).fail(notification.exception);
} }
}); });
$("#toolRefesh").on("click", function () {
AdminPanel.prototype.refreshPrevisu();
});
//maj affichage previsu //maj affichage previsu
initCanevas(); initCanevas();
}.bind(this)).fail(notification.exception); }.bind(this)).fail(notification.exception);
......
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
<div class='col-sm-3'> <div class='col-sm-3'>
{{#tool.id}}<div id="editpdlplus_tool_label" class="btn alert-info" style="cursor: default;">{{tool.label}}</div>{{/tool.id}} {{#tool.id}}<div id="editpdlplus_tool_label" class="btn alert-info" style="cursor: default;">{{tool.label}}</div>{{/tool.id}}
</div> </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}} : {{# 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> <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}} {{#tool.id}}
...@@ -21,6 +21,11 @@ ...@@ -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> <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}} {{/tool.id}}
</div> </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>
<div class='row'> <div class='row'>
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment