Gitlab CSE Unil

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

- migration sur bootstrap4

parent 89a18811
This diff is collapsed.
......@@ -433,14 +433,14 @@ define(['jquery', 'jqueryui', 'core/notification', 'core/templates', 'core/fragm
$("#editpdlplus_axes_worspace").hide();
}
$('#assignfeedback_editpdfplus_widget_admin_div_addaxis').show();
$('#assignfeedback_editpdfplus_widget_admin_div_addaxis > .panel-body').html("");
$('#assignfeedback_editpdfplus_widget_admin_div_addaxis').html("");
$('#assignfeedback_editpdfplus_widget_admin_toolheader').hide();
$('#assignfeedback_editpdfplus_widget_admin_toolworkspace').hide();
$("#editpdlplus_axes").prop('disabled', true);
var params = {};
fragment.loadFragment('assignfeedback_editpdfplus', 'axisadd', contextid, params)
.done(function (html, js) {
templates.appendNodeContents('#assignfeedback_editpdfplus_widget_admin_div_addaxis > .panel-body',
templates.appendNodeContents('#assignfeedback_editpdfplus_widget_admin_div_addaxis',
html, js);
}.bind(this)).fail(notification.exception);
};
......@@ -452,7 +452,7 @@ define(['jquery', 'jqueryui', 'core/notification', 'core/templates', 'core/fragm
$("#message_edit_tool").hide();
$("#axistool").hide();
$('#assignfeedback_editpdfplus_widget_admin_div_editaxis').show();
$('#assignfeedback_editpdfplus_widget_admin_div_editaxis > .panel-body').html("");
$('#assignfeedback_editpdfplus_widget_admin_div_editaxis').html("");
$('#assignfeedback_editpdfplus_widget_admin_toolheader').hide();
$('#assignfeedback_editpdfplus_widget_admin_toolworkspace').hide();
$("#editpdlplus_axes").prop('disabled', true);
......@@ -460,7 +460,7 @@ define(['jquery', 'jqueryui', 'core/notification', 'core/templates', 'core/fragm
var params = {axeid: axeid};
fragment.loadFragment('assignfeedback_editpdfplus', 'axisedit', contextid, params)
.done(function (html, js) {
templates.appendNodeContents('#assignfeedback_editpdfplus_widget_admin_div_editaxis > .panel-body',
templates.appendNodeContents('#assignfeedback_editpdfplus_widget_admin_div_editaxis',
html, js);
}.bind(this)).fail(notification.exception);
};
......@@ -474,7 +474,7 @@ define(['jquery', 'jqueryui', 'core/notification', 'core/templates', 'core/fragm
$("#message_edit_tool").hide();
$("#axistool").hide();
$('#assignfeedback_editpdfplus_widget_admin_div_delaxis').show();
$('#assignfeedback_editpdfplus_widget_admin_div_delaxis > .panel-body').html("");
$('#assignfeedback_editpdfplus_widget_admin_div_delaxis').html("");
$('#assignfeedback_editpdfplus_widget_admin_toolheader').hide();
$('#assignfeedback_editpdfplus_widget_admin_toolworkspace').hide();
$("#editpdlplus_axes").prop('disabled', true);
......@@ -482,7 +482,7 @@ define(['jquery', 'jqueryui', 'core/notification', 'core/templates', 'core/fragm
var params = {axeid: axeid};
fragment.loadFragment('assignfeedback_editpdfplus', 'axisdel', contextid, params)
.done(function (html, js) {
templates.appendNodeContents('#assignfeedback_editpdfplus_widget_admin_div_delaxis > .panel-body',
templates.appendNodeContents('#assignfeedback_editpdfplus_widget_admin_div_delaxis',
html, js);
}.bind(this)).fail(notification.exception);
}
......
......@@ -111,8 +111,8 @@
<option value="{{id}}" data-delete="{{children}}">{{label}}</option>
{{/ axis }}
</select>
<div class="panel panel-default" id="axistool">
<div class="panel-body" style="text-align: center;">
<div class="card" id="axistool">
<div class="card-body" style="text-align: center;">
<button type="button" class="btn" id="assignfeedback_editpdfplus_widget_admin_button_editaxis">
<i class="fa fa-pencil" aria-hidden="true"></i>
</button>
......@@ -145,14 +145,11 @@
<div id="editpdlplus_tool_item"></div>
</td>
<td>
<div id="assignfeedback_editpdfplus_widget_admin_div_addaxis" style="display:none;">
<div class="panel-body"></div>
<div id="assignfeedback_editpdfplus_widget_admin_div_addaxis" style="display:none;" class="card w-50 ml-2 border-primary">
</div>
<div id="assignfeedback_editpdfplus_widget_admin_div_editaxis" style="display:none;">
<div class="panel-body"></div>
<div id="assignfeedback_editpdfplus_widget_admin_div_editaxis" style="display:none;" class="card w-50 ml-2 border-primary">
</div>
<div id="assignfeedback_editpdfplus_widget_admin_div_delaxis" style="display:none;">
<div class="panel-body"></div>
<div id="assignfeedback_editpdfplus_widget_admin_div_delaxis" style="display:none;" class="card w-50 ml-2 border-primary">
</div>
</td>
</tr>
......
......@@ -26,17 +26,14 @@
* id - form id
}}
<div class="panel panel-default">
<div class="panel-heading">
{{title}}
</div>
<div class="panel-body" style="text-align: center;">
<div class="card-header">{{title}}</div>
<div class="card-body text-primary">
<p>{{# str }} adminaxisdelete_question, assignfeedback_editpdfplus {{/ str }}</p>
{{{render}}}
<button type="button" class="btn btn-primary" id="axisDelSubmit">{{# str }} adminaxisdelete_ok, assignfeedback_editpdfplus {{/ str }}</button>
<button type="button" class="btn" id="axisDelCancel">{{# str }} adminaxisdelete_ko, assignfeedback_editpdfplus {{/ str }}</button>
</div>
</div>
{{# js }}
require(['jquery','core/ajax','core/notification'], function($,ajax,notification) {
var formid='{{id}}';
......@@ -50,12 +47,13 @@ require(['jquery','core/ajax','core/notification'], function($,ajax,notification
}
])[0].done(function(message) {
if (message[0].message === "1"){
$('#assignfeedback_editpdfplus_widget_admin_div_delaxis > .panel-body').html("");
$('#assignfeedback_editpdfplus_widget_admin_div_delaxis').html("");
$('#assignfeedback_editpdfplus_widget_admin_div_delaxis').hide();
$("#editpdlplus_axes option:selected").remove();
$("#editpdlplus_axes").change();
$("#axistool").show();
}else{
$('#assignfeedback_editpdfplus_widget_admin_div_delaxis > .panel-body > .panel > .panel-body').append("<div class='alert alert-danger' style='margin-top: 5px;'>"+message[0].message+"</div>");
$('#assignfeedback_editpdfplus_widget_admin_div_delaxis').append("<div class='alert alert-danger' style='margin-top: 5px;'>"+message[0].message+"</div>");
}
var selectAxis = $("#editpdlplus_axes").val();
if (selectAxis && selectAxis !== "") {
......@@ -71,7 +69,8 @@ require(['jquery','core/ajax','core/notification'], function($,ajax,notification
}).fail(notification.exception);
});
$("#axisDelCancel").on("click", function () {
$('#assignfeedback_editpdfplus_widget_admin_div_delaxis > .panel-body').html("");
$('#assignfeedback_editpdfplus_widget_admin_div_delaxis').html("");
$('#assignfeedback_editpdfplus_widget_admin_div_delaxis').hide();
$("#axistool").show();
$('#assignfeedback_editpdfplus_widget_admin_toolheader').show();
$('#assignfeedback_editpdfplus_widget_admin_toolworkspace').show();
......
......@@ -27,16 +27,13 @@
* action - label of action 'edit' or 'add'
}}
<div class="panel panel-default">
<div class="panel-heading">
{{title}}
</div>
<div class="panel-body" style="text-align: center;">
<div class="card-header">{{title}}</div>
<div class="card-body text-primary">
{{{render}}}
<button type="button" class="btn btn-primary" id="axisFormSubmit">{{# str }} adminaxis_save, assignfeedback_editpdfplus {{/ str }}</button>
<button type="button" class="btn" id="axisFormCancel">{{# str }} adminaxis_cancel, assignfeedback_editpdfplus {{/ str }}</button>
</div>
</div>
{{# js }}
require(['jquery','core/ajax','core/notification'], function($,ajax,notification) {
var formid='{{id}}';
......@@ -52,14 +49,14 @@ require(['jquery','core/ajax','core/notification'], function($,ajax,notification
if ('{{action}}' === 'add'){
var divAxis = "<div id='editpdlplus_toolbar_"+axe[0].axeid+"' class='btn-group toolbar' style='display: none;'><ul></ul></div>";
$('#editpdlplus_toolbars').append(divAxis);
$('#assignfeedback_editpdfplus_widget_admin_div_addaxis > .panel-body').html("");
$('#assignfeedback_editpdfplus_widget_admin_div_addaxis').html("");
$('#assignfeedback_editpdfplus_widget_admin_div_addaxis').hide();
var option=new Option(axe[0].axelabel, axe[0].axeid, true, true);
$("#editpdlplus_axes").append(option);
$("#editpdlplus_axes").change();
$('#editpdlplus_tool_item').html("");
} else {
$('#assignfeedback_editpdfplus_widget_admin_div_editaxis > .panel-body').html("");
$('#assignfeedback_editpdfplus_widget_admin_div_editaxis').html("");
$('#assignfeedback_editpdfplus_widget_admin_div_editaxis').hide();
$("#editpdlplus_axes option:selected").html(axe[0].axelabel);
}
......@@ -72,10 +69,10 @@ require(['jquery','core/ajax','core/notification'], function($,ajax,notification
});
$("#axisFormCancel").on("click", function () {
if ('{{action}}' === 'add'){
$('#assignfeedback_editpdfplus_widget_admin_div_addaxis > .panel-body').html("");
$('#assignfeedback_editpdfplus_widget_admin_div_addaxis').html("");
$('#assignfeedback_editpdfplus_widget_admin_div_addaxis').hide();
} else {
$('#assignfeedback_editpdfplus_widget_admin_div_editaxis > .panel-body').html("");
$('#assignfeedback_editpdfplus_widget_admin_div_editaxis').html("");
$('#assignfeedback_editpdfplus_widget_admin_div_editaxis').hide();
}
var selectAxis = $("#editpdlplus_axes").val();
......
......@@ -56,136 +56,113 @@
</tr>
<tr>
<td class='assignfeedback_editpdfplus_widget_admin_tool_col1 assignfeedback_editpdfplus_widget_admin_tool_row' colspan="2">
<form id="{{formid}}" method="post" action="{{actionurl}}" class="form-horizontal">
<form id="{{formid}}" method="post" action="{{actionurl}}">
<div id="accordion">
<div class="card">
<div class="card-header">
<div class="card-header" id="headingOne">
<a class="card-link" data-toggle="collapse" href="#collapse1">
<i class="fa fa-wrench" aria-hidden="true"></i>&nbsp;&nbsp;{{# str }} admintoolboxtypetool, assignfeedback_editpdfplus {{/ str }}
</a>
</div>
<div id="collapse1" class="collapse" aria-labelledby="headingOne" data-parent="#accordion">
<div class="card-body">
<table>
<tr>
<td style="width: 25%;">
<label class="control-label" for="typetool">
<div class="form-group row">
<label class="col-sm-3 form-control-label" for="typetool">
{{# str }} admintoolboxtypetool_type, assignfeedback_editpdfplus {{/ str }}
</label>
</td>
<td>
<div class="col-sm-9">
<select class="form-control" id="typetool" name="typetool">
{{# tools }}
<option value='{{id}}'>{{libelle}}</option>
{{/ tools }}
</select>
</td>
</tr>
</table>
</div>
</div>
</div>
</div>
</div>
<div class="card">
<div class="card-header">
<div class="card-header" id="headingTwo">
<a class="card-link" data-toggle="collapse" href="#collapse2">
<i class="fa fa-bars" aria-hidden="true"></i>&nbsp;&nbsp;{{# str }} admintoolboxtoolbardisplay, assignfeedback_editpdfplus {{/ str }}
</a>
</div>
<div id="collapse2" class="collapse" aria-labelledby="headingTwo" data-parent="#accordion">
<div class="card-body">
<table>
<tr>
<td style="width: 25%;">
<label class="control-label" for="toolaxis">{{# str }} admintoolboxtoolbardisplay_axis, assignfeedback_editpdfplus {{/ str }}</label>
</td>
<td>
<div class="form-group row">
<label class="col-sm-3 form-control-label" for="toolaxis">{{# str }} admintoolboxtoolbardisplay_axis, assignfeedback_editpdfplus {{/ str }}</label>
<div class="col-sm-9">
<select class="form-control" id="toolaxis" name="toolaxis">
{{# axis }}
<option value='{{id}}'>{{label}}</option>
{{/ axis }}
</select>
</td>
</tr>
<tr>
<td style="width: 25%;">
<label class="control-label" for="button">
</div>
</div>
<div class="form-group row">
<label class="col-sm-3 form-control-label" for="button">
{{# str }} admintoolboxtoolbardisplay_button, assignfeedback_editpdfplus {{/ str }}
</label>
</td>
<td>
<div class="col-sm-9">
<input type="text" class="form-control" id="button" value="{{tool.label}}" name="button" />
</td>
</tr>
<tr>
<td style="width: 25%;">
<label class="control-label" for="order">{{# str }} admintoolboxtoolbardisplay_order, assignfeedback_editpdfplus {{/ str }}</label>
</td>
<td>
</div>
</div>
<div class="form-group row">
<label class="col-sm-3 form-control-label" for="order">{{# str }} admintoolboxtoolbardisplay_order, assignfeedback_editpdfplus {{/ str }}</label>
<div class="col-sm-9">
<input type="number" class="form-control" id="order" value="{{tool.order_tool}}" name="order" />
</td>
</tr>
</table>
</div>
</div>
</div>
</div>
</div>
<div class="card">
<div class="card-header">
<div class="card-header" id="headingThree">
<a class="card-link" data-toggle="collapse" href="#collapse3">
<i class="fa fa-address-card-o" aria-hidden="true"></i>&nbsp;&nbsp;{{# str }} admintoolboxcartridge, assignfeedback_editpdfplus {{/ str }}
</a>
</div>
<div id="collapse3" class="collapse" aria-labelledby="headingThree" data-parent="#accordion">
<div class="card-body">
<table>
<tr>
<td style="width: 25%;">
<label class="control-label " for="libelle">{{# str }} admintoolboxcartridge_label, assignfeedback_editpdfplus {{/ str }}</label>
</td>
<td>
<div class="form-group row">
<label class="col-sm-3 form-control-label" for="libelle">{{# str }} admintoolboxcartridge_label, assignfeedback_editpdfplus {{/ str }}</label>
<div class="col-sm-9">
<input type="text" class="form-control" id="libelle" value="{{tool.cartridge}}" name="libelle" maxlength="10" />
</td>
</tr>
<tr>
<td style="width: 25%;">
<label class="control-label " for="cartridgecolor">{{# str }} admintoolboxcartridge_color, assignfeedback_editpdfplus {{/ str }}</label>
</td>
<td>
</div>
</div>
<div class="form-group row">
<label class="col-sm-3 form-control-label" for="cartridgecolor">{{# str }} admintoolboxcartridge_color, assignfeedback_editpdfplus {{/ str }}</label>
<div class="col-sm-9">
<input type="color" class="form-control" id="cartridgecolor" placeholder="{{^tool.cartridge_color}}-{{/tool.cartridge_color}}"
value="{{#tool.cartridge_color}}{{tool.cartridge_color}}{{/tool.cartridge_color}}" name="catridgecolor" />
<input type="hidden" id="realcartridgecolor" value="{{#tool.cartridge_color}}{{tool.cartridge_color}}{{/tool.cartridge_color}}" />
</td>
</tr>
</table>
</div>
</div>
</div>
</div>
</div>
<div class="card">
<div class="card-header">
<div class="card-header" id="headingFour">
<a class="card-link" data-toggle="collapse" href="#collapse4">
<i class="fa fa-pencil-square-o" aria-hidden="true"></i>&nbsp;&nbsp;{{# str }} admintoolboxannotation, assignfeedback_editpdfplus {{/ str }}
</a>
</div>
<div id="collapse4" class="collapse" aria-labelledby="headingFour" data-parent="#accordion">
<div class="card-body" style="overflow: auto;">
<table>
<tr>
<td style="width: 25%;">
<label class="control-label" for="color">{{# str }} admintoolboxannotation_color, assignfeedback_editpdfplus {{/ str }}</label>
</td>
<td>
<input type="color" class="form-control" id="color" placeholder="{{^tool.colors}}-{{/tool.colors}}"
<div class="form-group row">
<label class="col-sm-3 form-control-label" for="color">{{# str }} admintoolboxannotation_color, assignfeedback_editpdfplus {{/ str }}</label>
<div class="col-sm-9">
<input type="color" class="form-control" id="color"
value="{{#tool.colors}}{{tool.colors}}{{/tool.colors}}" name="color" />
<input type="hidden" id="realcolor" value="{{#tool.colors}}{{tool.colors}}{{/tool.colors}}" />
</td>
</tr>
<tr>
<td style="width: 25%;">
<label class="control-label" for="texts">{{# str }} admintoolboxannotation_texts, assignfeedback_editpdfplus {{/ str }}</label>
</td>
<td>
</div>
</div>
<div class="form-group row">
<label class="col-sm-3 form-control-label" for="texts">{{# str }} admintoolboxannotation_texts, assignfeedback_editpdfplus {{/ str }}</label>
<div class="col-sm-9">
<input type="hidden" class="form-control" id="texts" value="{{tool.texts}}" name="texts" />
<ul class="textform"
data-prototype="<input type='text' class='form-control' value='' name='text[__name__]' style='width:90%;display:inline-block;' />"
......@@ -194,17 +171,14 @@
<li><input type='text' class='form-control' value='{{text}}' name='text[{{index}}]' style='width:90%;display:inline-block;' /></li>
{{/tool.textsarray}}
</ul>
</td>
</tr>
<tr>
<td style="width: 25%;">
<label class="control-label" for="reply">{{# str }} admintoolboxannotation_reply, assignfeedback_editpdfplus {{/ str }}</label>
</td>
<td>
</div>
</div>
<div class="form-group row">
<label class="col-sm-3 form-control-label" for="reply">{{# str }} admintoolboxannotation_reply, assignfeedback_editpdfplus {{/ str }}</label>
<div class="col-sm-9">
<input type="checkbox" id="reply" {{#tool.reply}}checked {{/tool.reply}}name="reply" />
</td>
</tr>
</table>
</div>
</div>
</div>
</div>
</div>
......
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