[\s\S]*?',
'gi');
if (html.match(tagOrComment)) {
var oldHtml;
do {
oldHtml = html;
html = html.replace(tagOrComment, '');
} while (html !== oldHtml);
}
return html.replace(/0) {
sort += ' desc';
} else {
sort += ' asc';
}
}
$("#sort").val(sort);
return true;
}
function formatResultSimple (item) {
var str = new String(item.text);
str = sanitize(str);
var n=str.indexOf('#');
if (n==0) {
var str = str.substring(n+1);
}
return str;
}
function formatResultNomenclature (item) {
var str = new String(item.text);
str = sanitize(str);
var n=str.indexOf('|');
if (n!=-1) {
var code = str.substring(0,n);
var libelle = str.substring(n+1);
return '
'+code+'
'+libelle+'
'
} else {
return '
'+str+'
';
}
}
function formatResultZone (item) {
if (item.text.substring(0,1)=='/') {
var n=item.text.indexOf('/',1);
if (n!=-1) {
var code = '';
var libelle = item.text.substring(n+1);
var n=libelle.indexOf(' ',1);
if (n!=-1) {
code = libelle.substring(0,n);
libelle = libelle.substring(n+1);
}
return '
'+code+'
'+libelle+'
'
} else {
return '
'+item.text+'
';
}
} else {
return '
'+item.text+'
';
}
}
function formatSelectionNomenclature (item) {
var str = new String(item.text);
str = sanitize(str);
var n = str.indexOf('|');
if (n>0) {
str = str.substring(n+1);
}
return str;
}
function formatSelectionNomenclatureForUaiRequests (item) {
var n=item.text.indexOf('|');
if (item.text.substr(n+1)=='----') return '';
var str = item.text.substr(n+1) + ' (' + item.text.substr(0, n) + ')';
return str;
}
function formatSelectionSimple (item) {
var str = new String(item.text);
str = sanitize(str);
str = str.replace(/\([0-9]{1,3}\)$/g,'');
return str;
}
function formatSelectionZone (item) {
var n=item.text.indexOf('/', 1);
var str = item.text.substr(n+1);
n=str.indexOf(' ', 1);
str = str.substr(n+1);
return str;
}
function formatSelectionNomenclatureOption (item) {
var n=item.text.indexOf('|');
if (n!=-1) {
var str = item.text.substr(0,n);
} else {
var str = item.text;
}
return str;
}
function createSearchChoice (term) {
term = new String(term);
term = sanitize(term);
term = term.replace(/"/g, '');
if (term=='') return null;
return { id: -1, text: term };
}
var breadcrumb_actions = {
"search" : {"action" : "search", "mode": "simple"},
"advanced_search" : {"action" : "search", "mode": "advanced"},
"queries" : {"action" : "queries"},
"extract" : {"action" : "extract"}
};
function crumbClick (target) {
$("#crumb_action").val(breadcrumb_actions[target]['action']);
$("#crumb_mode").val('');
if (breadcrumb_actions[target]['mode']) {
$("#mode").val(breadcrumb_actions[target]['mode']);
}
$("#breadcrumb_form").submit();
}
var rgaa_size = 12;
function rgaaSetSize(rgaa_size) {
$('body').css("font-size", rgaa_size + 'px');
}
function rgaaClick (taille) {
rgaa_size += (taille*2)
rgaaSetSize(rgaa_size);
$.ajax({
type: "get",
url: getAjaxUrl() + '?action=rgaa&size=' + rgaa_size,
success: function(data) {}
});
}
function pingSession () {
$.ajax({
type: "get",
url: getAjaxUrl() + '?action=ping',
success: function(data) {}
});
}
function updateLogs() {
$.ajax({
type: "post",
url: "ajax/ajax.php?action=logs",
success: function(data) {
$("#logs").html( data['html'] );
}
});
}
//-->