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