Skip to content

Commit

Permalink
Fix pulsanti di aggiunta righe
Browse files Browse the repository at this point in the history
  • Loading branch information
Dasc3er committed Aug 26, 2020
1 parent 0b29131 commit 1d44f64
Show file tree
Hide file tree
Showing 8 changed files with 40 additions and 40 deletions.
10 changes: 5 additions & 5 deletions modules/contratti/edit.php
Expand Up @@ -301,27 +301,27 @@

if (!$block_edit) {
echo '
<button class="btn btn-sm btn-primary tip" title="'.tr('Aggiungi articolo').'" onclick="gestioneArticolo(this)">
<button type="button" class="btn btn-sm btn-primary tip" title="'.tr('Aggiungi articolo').'" onclick="gestioneArticolo(this)">
<i class="fa fa-plus"></i> '.tr('Articolo').'
</button>';

echo '
<button class="btn btn-sm btn-primary tip" title="'.tr('Aggiungi articoli tramite barcode').'" onclick="gestioneBarcode(this)">
<button type="button" class="btn btn-sm btn-primary tip" title="'.tr('Aggiungi articoli tramite barcode').'" onclick="gestioneBarcode(this)">
<i class="fa fa-plus"></i> '.tr('Barcode').'
</button>';

echo '
<button class="btn btn-sm btn-primary tip" title="'.tr('Aggiungi riga').'" onclick="gestioneRiga(this)">
<button type="button" class="btn btn-sm btn-primary tip" title="'.tr('Aggiungi riga').'" onclick="gestioneRiga(this)">
<i class="fa fa-plus"></i> '.tr('Riga').'
</button>';

echo '
<button class="btn btn-sm btn-primary tip" title="'.tr('Aggiungi descrizione').'" onclick="gestioneDescrizione(this)">
<button type="button" class="btn btn-sm btn-primary tip" title="'.tr('Aggiungi descrizione').'" onclick="gestioneDescrizione(this)">
<i class="fa fa-plus"></i> '.tr('Descrizione').'
</button>';

echo '
<button class="btn btn-sm btn-primary tip" title="'.tr('Aggiungi sconto/maggiorazione').'" onclick="gestioneSconto(this)">
<button type="button" class="btn btn-sm btn-primary tip" title="'.tr('Aggiungi sconto/maggiorazione').'" onclick="gestioneSconto(this)">
<i class="fa fa-plus"></i> '.tr('Sconto/maggiorazione').'
</button>';
}
Expand Down
10 changes: 5 additions & 5 deletions modules/ddt/edit.php
Expand Up @@ -312,27 +312,27 @@
</a>';

echo '
<button class="btn btn-sm btn-primary tip" title="'.tr('Aggiungi articolo').'" onclick="gestioneArticolo(this)">
<button type="button" class="btn btn-sm btn-primary tip" title="'.tr('Aggiungi articolo').'" onclick="gestioneArticolo(this)">
<i class="fa fa-plus"></i> '.tr('Articolo').'
</button>';

echo '
<button class="btn btn-sm btn-primary tip" title="'.tr('Aggiungi articoli tramite barcode').'" onclick="gestioneBarcode(this)">
<button type="button" class="btn btn-sm btn-primary tip" title="'.tr('Aggiungi articoli tramite barcode').'" onclick="gestioneBarcode(this)">
<i class="fa fa-plus"></i> '.tr('Barcode').'
</button>';

echo '
<button class="btn btn-sm btn-primary tip" title="'.tr('Aggiungi riga').'" onclick="gestioneRiga(this)">
<button type="button" class="btn btn-sm btn-primary tip" title="'.tr('Aggiungi riga').'" onclick="gestioneRiga(this)">
<i class="fa fa-plus"></i> '.tr('Riga').'
</button>';

echo '
<button class="btn btn-sm btn-primary tip" title="'.tr('Aggiungi descrizione').'" onclick="gestioneDescrizione(this)">
<button type="button" class="btn btn-sm btn-primary tip" title="'.tr('Aggiungi descrizione').'" onclick="gestioneDescrizione(this)">
<i class="fa fa-plus"></i> '.tr('Descrizione').'
</button>';

echo '
<button class="btn btn-sm btn-primary tip" title="'.tr('Aggiungi sconto/maggiorazione').'" onclick="gestioneSconto(this)">
<button type="button" class="btn btn-sm btn-primary tip" title="'.tr('Aggiungi sconto/maggiorazione').'" onclick="gestioneSconto(this)">
<i class="fa fa-plus"></i> '.tr('Sconto/maggiorazione').'
</button>';
}
Expand Down
8 changes: 4 additions & 4 deletions modules/fatture/edit.php
Expand Up @@ -640,22 +640,22 @@
</button>';

echo '
<button class="btn btn-sm btn-primary tip" title="'.tr('Aggiungi articoli tramite barcode').'" onclick="gestioneBarcode(this)">
<button type="button" class="btn btn-sm btn-primary tip" title="'.tr('Aggiungi articoli tramite barcode').'" onclick="gestioneBarcode(this)">
<i class="fa fa-plus"></i> '.tr('Barcode').'
</button>';

echo '
<button class="btn btn-sm btn-primary tip" title="'.tr('Aggiungi riga').'" onclick="gestioneRiga(this)">
<button type="button" class="btn btn-sm btn-primary tip" title="'.tr('Aggiungi riga').'" onclick="gestioneRiga(this)">
<i class="fa fa-plus"></i> '.tr('Riga').'
</button>';

echo '
<button class="btn btn-sm btn-primary tip" title="'.tr('Aggiungi descrizione').'" onclick="gestioneDescrizione(this)">
<button type="button" class="btn btn-sm btn-primary tip" title="'.tr('Aggiungi descrizione').'" onclick="gestioneDescrizione(this)">
<i class="fa fa-plus"></i> '.tr('Descrizione').'
</button>';

echo '
<button class="btn btn-sm btn-primary tip" title="'.tr('Aggiungi sconto/maggiorazione').'" onclick="gestioneSconto(this)">
<button type="button" class="btn btn-sm btn-primary tip" title="'.tr('Aggiungi sconto/maggiorazione').'" onclick="gestioneSconto(this)">
<i class="fa fa-plus"></i> '.tr('Sconto/maggiorazione').'
</button>';
}
Expand Down
18 changes: 9 additions & 9 deletions modules/fatture/fe/document-fe.php
Expand Up @@ -142,7 +142,7 @@

foreach ($documenti as $nome => $info) {
echo '
<table class="hide" id="'.$nome.'-templace">';
<table class="hide" id="'.$nome.'-template">';
$dato = [];
$key = '-id-';

Expand All @@ -152,7 +152,7 @@
</table>
<table class="hide">
<tbody id="riferimento_'.$nome.'-templace">
<tbody id="riferimento_'.$nome.'-template">
<tr class="fifth-level" title="RiferimentoNumeroLinea-'.$nome.'--id-">
<td style="vertical-align: middle;">
'.str_repeat($space, 4).$info['code'].'.1 RiferimentoNumeroLinea - '.tr('Riga _NUM_', [
Expand Down Expand Up @@ -184,27 +184,27 @@
<script>
function add_blocco(btn, nome){
cleanup_inputs();
var last = $(btn).closest("table").find("tr[id^=last-" + nome + "]").parent().last();
keys[nome]++;
var text = replaceAll($("#" + nome + "-templace").html(), "-id-", "" + keys[nome]);
var text = replaceAll($("#" + nome + "-template").html(), "-id-", "" + keys[nome]);
ref_keys[nome + keys[nome]] = 1;
last.after(text);
restart_inputs();
}
function add_riferimento(btn, nome, key) {
cleanup_inputs();
var last = $(btn).closest("table").find("tr[title=RiferimentoNumeroLinea-" + nome + "-" + key + "]").last();
ref_keys[nome + key]++;
var text = replaceAll($("#riferimento_" + nome + "-templace").html(), "-id-", "" + key);
var text = replaceAll($("#riferimento_" + nome + "-template").html(), "-id-", "" + key);
text = replaceAll(text, "-num-", "" + ref_keys[nome + key]);
last.after(text);
restart_inputs();
}
Expand Down
4 changes: 2 additions & 2 deletions modules/fatture/fe/row-fe.php
Expand Up @@ -125,14 +125,14 @@ function add_altri_dati(btn){
var last = $(btn).closest("table").find("tr[id^=last-altri_dati]").parent().last();
n++;
var text = replaceAll($("#altri_dati-templace").html(), "-id-", "" + n);
var text = replaceAll($("#altri_dati-template").html(), "-id-", "" + n);
last.after(text);
restart_inputs();
};
</script>
<table class="hide" id="altri_dati-templace">';
<table class="hide" id="altri_dati-template">';
$dato = [];
$key = '-id-';

Expand Down
10 changes: 5 additions & 5 deletions modules/interventi/edit.php
Expand Up @@ -364,28 +364,28 @@ function getIndirizzoAnagrafica() {

if (!$block_edit) {
echo '
<button class="btn btn-sm btn-primary tip" title="'.tr('Aggiungi articolo').'" onclick="gestioneArticolo(this)">
<button type="button" class="btn btn-sm btn-primary tip" title="'.tr('Aggiungi articolo').'" onclick="gestioneArticolo(this)">
<i class="fa fa-plus"></i> '.tr('Articolo').'
</button>';

echo '
<button class="btn btn-sm btn-primary tip" title="'.tr('Aggiungi articoli tramite barcode').'" onclick="gestioneBarcode(this)">
<button type="button" class="btn btn-sm btn-primary tip" title="'.tr('Aggiungi articoli tramite barcode').'" onclick="gestioneBarcode(this)">
<i class="fa fa-plus"></i> '.tr('Barcode').'
</button>';

echo '
<button class="btn btn-sm btn-primary tip" title="'.tr('Aggiungi riga').'" onclick="gestioneRiga(this)">
<button type="button" class="btn btn-sm btn-primary tip" title="'.tr('Aggiungi riga').'" onclick="gestioneRiga(this)">
<i class="fa fa-plus"></i> '.tr('Riga').'
</button>';

/*
echo '
<button class="btn btn-sm btn-primary tip" title="'.tr('Aggiungi descrizione').'" onclick="gestioneDescrizione(this)">
<button type="button" class="btn btn-sm btn-primary tip" title="'.tr('Aggiungi descrizione').'" onclick="gestioneDescrizione(this)">
<i class="fa fa-plus"></i> '.tr('Descrizione').'
</button>';*/

echo '
<button class="btn btn-sm btn-primary tip" title="'.tr('Aggiungi sconto/maggiorazione').'" onclick="gestioneSconto(this)">
<button type="button" class="btn btn-sm btn-primary tip" title="'.tr('Aggiungi sconto/maggiorazione').'" onclick="gestioneSconto(this)">
<i class="fa fa-plus"></i> '.tr('Sconto/maggiorazione').'
</button>';
}
Expand Down
10 changes: 5 additions & 5 deletions modules/ordini/edit.php
Expand Up @@ -179,27 +179,27 @@
<div class="pull-left">';

echo '
<button class="btn btn-sm btn-primary tip" title="'.tr('Aggiungi articolo').'" onclick="gestioneArticolo(this)">
<button type="button" class="btn btn-sm btn-primary tip" title="'.tr('Aggiungi articolo').'" onclick="gestioneArticolo(this)">
<i class="fa fa-plus"></i> '.tr('Articolo').'
</button>';

echo '
<button class="btn btn-sm btn-primary tip" title="'.tr('Aggiungi articoli tramite barcode').'" onclick="gestioneBarcode(this)">
<button type="button" class="btn btn-sm btn-primary tip" title="'.tr('Aggiungi articoli tramite barcode').'" onclick="gestioneBarcode(this)">
<i class="fa fa-plus"></i> '.tr('Barcode').'
</button>';

echo '
<button class="btn btn-sm btn-primary tip" title="'.tr('Aggiungi riga').'" onclick="gestioneRiga(this)">
<button type="button" class="btn btn-sm btn-primary tip" title="'.tr('Aggiungi riga').'" onclick="gestioneRiga(this)">
<i class="fa fa-plus"></i> '.tr('Riga').'
</button>';

echo '
<button class="btn btn-sm btn-primary tip" title="'.tr('Aggiungi descrizione').'" onclick="gestioneDescrizione(this)">
<button type="button" class="btn btn-sm btn-primary tip" title="'.tr('Aggiungi descrizione').'" onclick="gestioneDescrizione(this)">
<i class="fa fa-plus"></i> '.tr('Descrizione').'
</button>';

echo '
<button class="btn btn-sm btn-primary tip" title="'.tr('Aggiungi sconto/maggiorazione').'" onclick="gestioneSconto(this)">
<button type="button" class="btn btn-sm btn-primary tip" title="'.tr('Aggiungi sconto/maggiorazione').'" onclick="gestioneSconto(this)">
<i class="fa fa-plus"></i> '.tr('Sconto/maggiorazione').'
</button>';

Expand Down
10 changes: 5 additions & 5 deletions modules/preventivi/edit.php
Expand Up @@ -197,27 +197,27 @@

if (!$block_edit) {
echo '
<button class="btn btn-sm btn-primary tip" title="'.tr('Aggiungi articolo').'" onclick="gestioneArticolo(this)">
<button type="button" class="btn btn-sm btn-primary tip" title="'.tr('Aggiungi articolo').'" onclick="gestioneArticolo(this)">
<i class="fa fa-plus"></i> '.tr('Articolo').'
</button>';

echo '
<button class="btn btn-sm btn-primary tip" title="'.tr('Aggiungi articoli tramite barcode').'" onclick="gestioneBarcode(this)">
<button type="button" class="btn btn-sm btn-primary tip" title="'.tr('Aggiungi articoli tramite barcode').'" onclick="gestioneBarcode(this)">
<i class="fa fa-plus"></i> '.tr('Barcode').'
</button>';

echo '
<button class="btn btn-sm btn-primary tip" title="'.tr('Aggiungi riga').'" onclick="gestioneRiga(this)">
<button type="button" class="btn btn-sm btn-primary tip" title="'.tr('Aggiungi riga').'" onclick="gestioneRiga(this)">
<i class="fa fa-plus"></i> '.tr('Riga').'
</button>';

echo '
<button class="btn btn-sm btn-primary tip" title="'.tr('Aggiungi descrizione').'" onclick="gestioneDescrizione(this)">
<button type="button" class="btn btn-sm btn-primary tip" title="'.tr('Aggiungi descrizione').'" onclick="gestioneDescrizione(this)">
<i class="fa fa-plus"></i> '.tr('Descrizione').'
</button>';

echo '
<button class="btn btn-sm btn-primary tip" title="'.tr('Aggiungi sconto/maggiorazione').'" onclick="gestioneSconto(this)">
<button type="button" class="btn btn-sm btn-primary tip" title="'.tr('Aggiungi sconto/maggiorazione').'" onclick="gestioneSconto(this)">
<i class="fa fa-plus"></i> '.tr('Sconto/maggiorazione').'
</button>';
}
Expand Down

0 comments on commit 1d44f64

Please sign in to comment.