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,11 +92,20 @@ define(['jquery'/*, 'core/yui'*/, 'core/notification', 'core/templates', 'core/f
$(this.selectTool).addClass("btn-primary");
};
//
/*AdminPanel.prototype.refreshPrevisu = function () {
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();
......@@ -106,7 +115,7 @@ define(['jquery'/*, 'core/yui'*/, 'core/notification', 'core/templates', 'core/f
}
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);
......
......@@ -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'>
......
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