mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-23 09:53:15 +00:00
Merge pull request #3552 from alchemy-fr/PHRAS-3148_thesaurus_Guy
PHRAS-3148 Merge fix populate from Thesaurus GUI
This commit is contained in:
@@ -33,23 +33,17 @@
|
||||
<a href="javascript:void(0)" id="delete_sy">{{ 'thesaurus:properties:: Mettre dans le stock' | trans }}</a>
|
||||
</div>
|
||||
<div id="desktop" class="dialog">
|
||||
<div class="menu" id="flagsMenu" style="z-index:999">
|
||||
{% for code, language in languages %}
|
||||
<a id='flagMenu_{{ code }}' href='javascript:void(0)' class=''>
|
||||
<img src='/assets/common/images/lng/{{ code }}_flag_18.gif' />{{ language }}</a>
|
||||
{% endfor %}
|
||||
</div>
|
||||
|
||||
<div style='text-align:right'>
|
||||
<H4>{{ fullpath | raw }}</H4>
|
||||
<div style='float:right'>
|
||||
<b>id:</b> {{ id }}
|
||||
</div>
|
||||
<H4>{{ fullpath | raw }}</H4><br/>
|
||||
{% if typ == "CT" %}
|
||||
<br/>
|
||||
{% elseif typ == "TH" %}
|
||||
{#{% elseif typ == "TH" %}
|
||||
{% trans with {'%hits%' : hits} %}thesaurus:: %hits% reponses retournees{% endtrans %}
|
||||
<br/>
|
||||
<br/>
|
||||
<br/>#}
|
||||
{% endif %}
|
||||
<div id="TSY" class="tableContainer" style="margin:10px; position:relative; top:0px; left:0px">
|
||||
<div>
|
||||
@@ -295,8 +289,8 @@
|
||||
// td.setAttribute("colSpan", "3"); // attention au 'S' majuscule !!!
|
||||
td.innerHTML = n.getAttribute("t");
|
||||
|
||||
td = tr.appendChild(document.createElement("td"));
|
||||
td.innerHTML = n.getAttribute("hits");
|
||||
/*td = tr.appendChild(document.createElement("td"));
|
||||
td.innerHTML = n.getAttribute("hits");*/
|
||||
|
||||
td = tr.appendChild(document.createElement("td"));
|
||||
td.innerHTML = n.getAttribute("id");
|
||||
@@ -322,17 +316,6 @@
|
||||
;
|
||||
if(tr)
|
||||
myGUI.select(tr);
|
||||
/* switch(o.id.substr(0, 4))
|
||||
{
|
||||
case "FLG_": // le drapeau
|
||||
document.getElementById("flagsMenu").runAsMenu( evt, tr );
|
||||
break;
|
||||
case "SYN_": // le synonyme
|
||||
document.getElementById("syMenu").runAsMenu( evt, tr );
|
||||
$('.delete_term').html('');
|
||||
$('.delete_term', tr).append($('#syMenu').html());
|
||||
break;
|
||||
}*/
|
||||
}
|
||||
break;
|
||||
case "MOUSEDOWN":
|
||||
|
@@ -169,10 +169,6 @@
|
||||
<p><img id='flagMenu_{{ code }}' src='/assets/common/images/lng/{{ code }}_flag_18.gif' /> {{ language }}</p>
|
||||
|
||||
{% endfor %}
|
||||
{# {% for code, language in flags %}
|
||||
<a id='flagMenu_{{ code }}' href='javascript:void(0)' class=''>
|
||||
<img src='/assets/common/images/lng/{{ code }}_flag_18.gif' />{{ language }}</a>
|
||||
{% endfor %}#}
|
||||
</div>
|
||||
<div class="menu" id="kctermMenu" style="z-index:999; width:240px;">
|
||||
<a href="javascript:void(0)" class="" id="kcterm_properties" style="font-weight:700">{{ 'thesaurus::menu: proprietes' | trans }}</a>
|
||||
@@ -1525,55 +1521,58 @@
|
||||
*/
|
||||
|
||||
|
||||
/**Populate btn action**/
|
||||
$('#populate_btn').click(function (e) {
|
||||
e.preventDefault();
|
||||
$("#confirm_populate").dialog({
|
||||
modal: true,
|
||||
title: "{{ 'thesaurus: Populate title' | trans }}",
|
||||
autoOpen:false,
|
||||
width: 400,
|
||||
open:function () {
|
||||
$(this).closest(".ui-dialog")
|
||||
.find(".ui-button:first") // the first button
|
||||
.addClass("close-dialog").hide();
|
||||
$('.cancel_button').click(function () {
|
||||
$('.close-dialog').trigger('click');
|
||||
});
|
||||
$('#CTERMS').find('.OB').addClass('ob').removeClass('OB');
|
||||
$('#THP_C').html('+');
|
||||
$(document).ready(function () {
|
||||
/**Populate btn action**/
|
||||
$('#populate_btn').bind('click', function (e) {
|
||||
e.preventDefault();
|
||||
$("#confirm_populate").dialog({
|
||||
modal: true,
|
||||
title: "{{ 'thesaurus: Populate title' | trans }}",
|
||||
autoOpen:false,
|
||||
width: 400,
|
||||
open:function () {
|
||||
$(this).closest(".ui-dialog")
|
||||
.find(".ui-button:first") // the first button
|
||||
.addClass("close-dialog").hide();
|
||||
$('.cancel_button').click(function () {
|
||||
$('.close-dialog').trigger('click');
|
||||
});
|
||||
$('#CTERMS').find('.OB').addClass('ob').removeClass('OB');
|
||||
$('#THP_C').html('+');
|
||||
|
||||
|
||||
}
|
||||
});
|
||||
$("#confirm_populate").dialog('open');
|
||||
$('#confirm_populate_button').click(function () {
|
||||
$.ajax({
|
||||
type: 'GET',
|
||||
url: '/admin/worker-manager/populate-status',
|
||||
data: {
|
||||
sbasIds: [{{ bid }}]
|
||||
},
|
||||
success: function (data) {
|
||||
if (data == 0) {
|
||||
$.ajax({
|
||||
url: '/thesaurus/populate',
|
||||
type: 'POST',
|
||||
data: {
|
||||
databox_id: {{ bid }}
|
||||
},
|
||||
success: function (data) {
|
||||
//humane.info('{{ "thesaurus::populate: success message" |trans }}');
|
||||
$('.close-dialog').trigger('click');
|
||||
}
|
||||
});
|
||||
} else {
|
||||
alert('{{ "thesaurus::populate: Warning populate is in process to indexing databox" |trans }}');
|
||||
}
|
||||
}
|
||||
});
|
||||
})
|
||||
});
|
||||
}
|
||||
});
|
||||
$("#confirm_populate").dialog('open');
|
||||
$('#confirm_populate_button').unbind('click').bind('click', function (e) {
|
||||
e.preventDefault();
|
||||
$.ajax({
|
||||
type: 'GET',
|
||||
url: '/admin/worker-manager/populate-status',
|
||||
data: {
|
||||
sbasIds: [{{ bid }}]
|
||||
},
|
||||
success: function (data) {
|
||||
if (data == 0) {
|
||||
$.ajax({
|
||||
url: '/thesaurus/populate',
|
||||
type: 'POST',
|
||||
data: {
|
||||
databox_id: {{ bid }}
|
||||
},
|
||||
success: function (data) {
|
||||
//humane.info('{{ "thesaurus::populate: success message" |trans }}');
|
||||
$('.close-dialog').trigger('click');
|
||||
}
|
||||
});
|
||||
} else {
|
||||
alert('{{ "thesaurus::populate: Warning populate is in process to indexing databox" |trans }}');
|
||||
}
|
||||
}
|
||||
});
|
||||
})
|
||||
});
|
||||
})
|
||||
|
||||
</script>
|
||||
</body>
|
||||
|
Reference in New Issue
Block a user