Aggiunto pulsante Salva e chiudi per ritornare all'elenco del modulo
This commit is contained in:
parent
6deca4bd9b
commit
a07234ec4b
23
editor.php
23
editor.php
|
@ -175,9 +175,21 @@ if (empty($record) || !$has_access) {
|
|||
|
||||
{( "name": "button", "type": "email", "id_module": "'.$id_module.'", "id_plugin": "'.$id_plugin.'", "id_record": "'.$id_record.'" )}
|
||||
|
||||
<a class="btn btn-success" id="'.(!empty($record['deleted_at']) ? 'restore' : 'save').'">
|
||||
<i class="fa fa-'.(!empty($record['deleted_at']) ? 'undo' : 'check').'"></i> '.(!empty($record['deleted_at']) ? tr('Salva e Ripristina') : tr('Salva')).'
|
||||
</a>
|
||||
<div class="btn-group" id="save-buttons">
|
||||
<a class="btn btn-success" id="save">
|
||||
<i class="fa fa-'.(!empty($record['deleted_at']) ? 'undo' : 'check').'"></i> '.(!empty($record['deleted_at']) ? tr('Salva e ripristina') : tr('Salva')).'
|
||||
</a>
|
||||
<a type="button" class="btn btn-success dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
||||
<span class="caret"></span>
|
||||
<span class="sr-only">Toggle Dropdown</span>
|
||||
</a>
|
||||
<ul class="dropdown-menu dropdown-menu-right">
|
||||
<li><a href="#" id="save-close">
|
||||
<i class="fa fa-'.(!empty($record['deleted_at']) ? 'undo' : 'check').'"></i>
|
||||
'.(!empty($record['deleted_at']) ? tr('Ripristina e chiudi') : tr('Salva e chiudi')).'
|
||||
</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
@ -191,6 +203,11 @@ if (empty($record) || !$has_access) {
|
|||
$("#save").click(function(){
|
||||
//submitAjax(form);
|
||||
|
||||
$("#submit").trigger("click");
|
||||
});
|
||||
|
||||
$("#save-close").on("click", function (){
|
||||
form.find("[name=backto]").val("record-list");
|
||||
$("#submit").trigger("click");
|
||||
});';
|
||||
|
||||
|
|
|
@ -151,10 +151,13 @@ $(document).ready(function() {';
|
|||
}
|
||||
|
||||
echo '
|
||||
$("#save").html("<i class=\"fa fa-flag-checkered\"></i> '.tr('Avvia importazione').'");
|
||||
$("#save-buttons").find(".dropdown-menu, .dropdown-toggle").remove();
|
||||
|
||||
$("#save").unbind("click");
|
||||
$("#save").on("click", function() {
|
||||
var save = $("#save");
|
||||
save.html("<i class=\"fa fa-flag-checkered\"></i> '.tr('Avvia importazione').'");
|
||||
|
||||
save.unbind("click");
|
||||
save.on("click", function() {
|
||||
count = 0;
|
||||
importPage(0);
|
||||
});
|
||||
|
|
|
@ -221,11 +221,11 @@ function controllaConti() {
|
|||
if (continuare) {
|
||||
$("#add-submit").prop("disabled", false);
|
||||
$("#modello-button").prop("disabled", false);
|
||||
$("#save").removeAttr("disabled");
|
||||
$("#save, #save-close").removeAttr("disabled").removeClass("disabled");
|
||||
} else {
|
||||
$("#add-submit").prop("disabled", true);
|
||||
$("#modello-button").prop("disabled", true);
|
||||
$("#save").attr("disabled", "true");
|
||||
$("#save, #save-close").attr("disabled", "true").addClass("disabled");
|
||||
}
|
||||
|
||||
return continuare;
|
||||
|
|
|
@ -34,7 +34,7 @@ if (!empty($record['default'])) {
|
|||
echo '
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
$("#save").prop("disabled", true).addClass("disabled");
|
||||
$("#save-buttons").hide();
|
||||
});
|
||||
</script>
|
||||
|
||||
|
|
|
@ -209,7 +209,7 @@ if ($record['editable'] == 1) {
|
|||
echo '
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
$("#save").addClass("hide");
|
||||
$("#save-buttons").hide();
|
||||
|
||||
$("#email-button").remove();
|
||||
});
|
||||
|
|
|
@ -241,7 +241,7 @@ echo '
|
|||
});
|
||||
|
||||
$(document).ready(function() {
|
||||
$("#save").addClass("hide");
|
||||
$("#save-buttons").hide();
|
||||
|
||||
$(".sortable").disableSelection();
|
||||
$(".sortable").each(function() {
|
||||
|
|
|
@ -25,7 +25,7 @@ include_once __DIR__.'/../../core.php';
|
|||
echo '
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
$("#save").hide();
|
||||
$("#save-buttons").hide();
|
||||
});
|
||||
</script>';
|
||||
|
||||
|
|
Loading…
Reference in New Issue