bug fixing
This commit is contained in:
parent
42f84e3b29
commit
edfaacf34c
970
index_4.7.html
970
index_4.7.html
File diff suppressed because it is too large
Load Diff
|
@ -1454,12 +1454,24 @@ $(document).ready(function() {
|
|||
cleanSearchResult()
|
||||
esprlogica = []
|
||||
jsonQuery = getJsonQuery()
|
||||
var queryNumber = numberOfQueries;
|
||||
var clausola = jsonQuery['Clausola1'];
|
||||
var qterm;
|
||||
var query;
|
||||
var lemma_forma;
|
||||
var opzioni;
|
||||
if (clausola != null){
|
||||
switch(queryType){
|
||||
case simpleSearch:
|
||||
unitaRicerca = 'forma'
|
||||
jsonQuery['Clausola0']['lemma_forma'] = "forma";
|
||||
jsonQuery['unitaRicerca'] = "forma";
|
||||
break;
|
||||
case advancedeSearch:
|
||||
unitaRicerca = jsonQuery['unitaRicerca']
|
||||
break;
|
||||
|
||||
}
|
||||
/* if (clausola != null){
|
||||
jsonQuery['QueryAvanzata'] = "1";
|
||||
}
|
||||
if (jsonQuery['QueryAvanzata'] == 0){ // Nik ricerca semplice sistema ricerca semplice dopo aver attivato Avanzata
|
||||
|
@ -1505,7 +1517,7 @@ $(document).ready(function() {
|
|||
unitaRicerca = jsonQuery['unitaRicerca']
|
||||
jsonQuery['Clausola0']['Attiva'] = "0";
|
||||
}
|
||||
}
|
||||
}*/
|
||||
console.log("got json query, unita ricerca: " + unitaRicerca)
|
||||
if (jsonQuery['QueryAvanzata'] == 0 && jsonQuery['Clausola0']['queryText'] == '') {
|
||||
alert('Digitare una stringa da cercare')
|
||||
|
|
|
@ -9,6 +9,7 @@ var currPage = 0;
|
|||
var latestPhraseId = "";
|
||||
var numeroPagine = 0;
|
||||
var latestOffset = 0;
|
||||
var numberOfQueries = 0;
|
||||
|
||||
const cssCantoHeight = 0.65;
|
||||
const cssTableMainHeight = 0.95; //.tableMain {height: 95%;}
|
||||
|
@ -353,6 +354,7 @@ $(document).ready(function() {
|
|||
var claListItemId = $(this).closest('li').attr('id');
|
||||
var claIdNum = claListItemId.substr(6);
|
||||
claListLen--;
|
||||
numberOfQueries--;
|
||||
var thisIs = $("#" + claListItemId);
|
||||
$("#" + claListItemId).fadeOut(300, function() {
|
||||
thisIs.remove();
|
||||
|
@ -387,10 +389,12 @@ $(document).ready(function() {
|
|||
case "btnAddCla1":
|
||||
tabID++;
|
||||
addGramCla("#sortable0", 1, tabID, 1);
|
||||
numberOfQueries++;
|
||||
break;
|
||||
case "btnAddCla2":
|
||||
tabID++;
|
||||
addSyntCla("#sortable0", 1, tabID, 1);
|
||||
numberOfQueries++;
|
||||
break;
|
||||
case "btnAddCla3":
|
||||
tabID++;
|
||||
|
@ -842,11 +846,11 @@ $(document).ready(function() {
|
|||
$('#queryText' + tabID).val(query);
|
||||
$('#lemma_forma' + tabID).val(lemma_forma);
|
||||
$('#opzioni_testo' + tabID).val(opzioni);
|
||||
//Nik
|
||||
$('#queryText').val(query);
|
||||
//Nik verificare costruzione clausole JSON
|
||||
/*$('#queryText').val(query);
|
||||
$('#lemma_forma').val(lemma_forma);
|
||||
$('#opzioni_testo').val(opzioni);
|
||||
|
||||
*/
|
||||
$('#queryTextN').val(query);
|
||||
$('#lemma_formaN').val(lemma_forma);
|
||||
$('#opzioni_testoN').val(opzioni);
|
||||
|
@ -1134,6 +1138,8 @@ $(document).ready(function() {
|
|||
var claListItemId = "li-cla" + claIdNum;
|
||||
var claType = $("#" + claId).attr('data-claType');
|
||||
var claActive = $("#" + claId).attr('data-claActive');
|
||||
var tabsContentLenght = ($("#sortable0").find(".claLI").length);
|
||||
|
||||
if (claActive > 0) {
|
||||
checkInsert = ' checked="checked"';
|
||||
};
|
||||
|
@ -1147,21 +1153,30 @@ $(document).ready(function() {
|
|||
//Nik verificare in cao di modifica delle clausola
|
||||
var unitaDiRicerca = $("#unitaRicerca")[0].options[$("#unitaRicerca")[0].selectedIndex].value;
|
||||
if (editCard == 9999) {
|
||||
if (unitaDiRicerca == "lemma" || unitaDiRicerca == "forma") {
|
||||
l_f = unitaDiRicerca;
|
||||
if (l_f == "forma") {
|
||||
articolo = "La ";
|
||||
if (claListItemId == "li-cla" + tabsContentLenght) {
|
||||
if (unitaDiRicerca == "lemma" || unitaDiRicerca == "forma") {
|
||||
l_f = unitaDiRicerca;
|
||||
if (l_f == "forma") {
|
||||
articolo = "La ";
|
||||
}
|
||||
l_f_t = articolo + l_f;
|
||||
qText = $("#queryTextUnita")[0].value;
|
||||
optText = $("#opzioni_testoUnita")[0].value;
|
||||
optText_t = $("#opzioni_testoUnita")[0].options[$("#opzioni_testoUnita")[0].selectedIndex].text;
|
||||
} else {
|
||||
l_f = $("#lemma_formaN")[0].options[$("#lemma_formaN")[0].selectedIndex].value;
|
||||
l_f_t = $("#lemma_formaN")[0].options[$("#lemma_formaN")[0].selectedIndex].text;
|
||||
qText = $("#queryTextN")[0].value;
|
||||
optText = $("#opzioni_testoN")[0].value;
|
||||
optText_t = $("#opzioni_testoN")[0].options[$("#opzioni_testoN")[0].selectedIndex].text;
|
||||
}
|
||||
l_f_t = articolo + l_f;
|
||||
qText = $("#queryTextUnita")[0].value;
|
||||
optText = $("#opzioni_testoUnita")[0].value;
|
||||
optText_t = $("#opzioni_testoUnita")[0].options[$("#opzioni_testoUnita")[0].selectedIndex].text;
|
||||
} else {
|
||||
l_f = $("#lemma_formaN")[0].options[$("#lemma_formaN")[0].selectedIndex].value;
|
||||
l_f_t = $("#lemma_formaN")[0].options[$("#lemma_formaN")[0].selectedIndex].text;
|
||||
qText = $("#queryTextN")[0].value;
|
||||
optText = $("#opzioni_testoN")[0].value;
|
||||
optText_t = $("#opzioni_testoN")[0].options[$("#opzioni_testoN")[0].selectedIndex].text;
|
||||
}else{
|
||||
l_f = $("form #lemma_forma" + claIdNum)[0].options[$("form #lemma_forma" + claIdNum)[0].selectedIndex].value;
|
||||
l_f_t = $("form #lemma_forma" + claIdNum)[0].options[$("form #lemma_forma" + claIdNum)[0].selectedIndex].text;
|
||||
qText = $("form #queryText" + claIdNum)[0].value;
|
||||
optText = $("form #opzioni_testo" + claIdNum)[0].value;
|
||||
optText_t = $("form #opzioni_testo" + claIdNum)[0].options[$("form #opzioni_testo" + claIdNum)[0].selectedIndex].text;
|
||||
|
||||
}
|
||||
} else {
|
||||
l_f = $("#lemma_forma" + editCard)[0].options[$("#lemma_forma" + editCard)[0].selectedIndex].value;
|
||||
|
@ -1214,7 +1229,6 @@ $(document).ready(function() {
|
|||
var jsonTextToParse = '{"queryText": "", "lemma_forma": "", "opzioni_testo": "", "TipoClausola": "' + claType + '", "Attiva": "' + claActive + '"';
|
||||
};
|
||||
// nik controllare in quale caso si verifica "else"
|
||||
var tabsContentLenght = ($("#sortable0").find(".claLI").length);
|
||||
if ($("#" + claListItemId)[0]) {
|
||||
if (claListItemId == "li-cla" + tabsContentLenght && editCard == 9999) {
|
||||
$("#" + claListItemId + " .clatext").replaceWith('<span class="small clatext">' + claText + '</span>');
|
||||
|
|
Loading…
Reference in New Issue