mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-23 09:53:15 +00:00
PHRAS-3148 : unbind click on populate buton
This commit is contained in:
@@ -226,7 +226,7 @@
|
|||||||
<p><span class="alert alert-message"> {{ 'thesaurus:: confirm populate' | trans }}</span></p>
|
<p><span class="alert alert-message"> {{ 'thesaurus:: confirm populate' | trans }}</span></p>
|
||||||
<div class="thesaurus_confirm_bottom_block">
|
<div class="thesaurus_confirm_bottom_block">
|
||||||
<input type="button" class="cancel_button cancel_btn" value="{{ 'boutton::annuler' | trans }}" >
|
<input type="button" class="cancel_button cancel_btn" value="{{ 'boutton::annuler' | trans }}" >
|
||||||
<input type="button" id="confirm_populate_button" class="validate_btn" value="{{ 'boutton::valider' | trans }}" >
|
<input type="submit" id="confirm_populate_button" class="validate_btn" value="{{ 'boutton::valider' | trans }}" >
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -1521,55 +1521,58 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
/**Populate btn action**/
|
$(document).ready(function () {
|
||||||
$('#populate_btn').click(function (e) {
|
/**Populate btn action**/
|
||||||
e.preventDefault();
|
$('#populate_btn').bind('click', function (e) {
|
||||||
$("#confirm_populate").dialog({
|
e.preventDefault();
|
||||||
modal: true,
|
$("#confirm_populate").dialog({
|
||||||
title: "{{ 'thesaurus: Populate title' | trans }}",
|
modal: true,
|
||||||
autoOpen:false,
|
title: "{{ 'thesaurus: Populate title' | trans }}",
|
||||||
width: 400,
|
autoOpen:false,
|
||||||
open:function () {
|
width: 400,
|
||||||
$(this).closest(".ui-dialog")
|
open:function () {
|
||||||
.find(".ui-button:first") // the first button
|
$(this).closest(".ui-dialog")
|
||||||
.addClass("close-dialog").hide();
|
.find(".ui-button:first") // the first button
|
||||||
$('.cancel_button').click(function () {
|
.addClass("close-dialog").hide();
|
||||||
$('.close-dialog').trigger('click');
|
$('.cancel_button').click(function () {
|
||||||
});
|
$('.close-dialog').trigger('click');
|
||||||
$('#CTERMS').find('.OB').addClass('ob').removeClass('OB');
|
});
|
||||||
$('#THP_C').html('+');
|
$('#CTERMS').find('.OB').addClass('ob').removeClass('OB');
|
||||||
|
$('#THP_C').html('+');
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
$("#confirm_populate").dialog('open');
|
$("#confirm_populate").dialog('open');
|
||||||
$('#confirm_populate_button').click(function () {
|
$('#confirm_populate_button').unbind('click').bind('click', function (e) {
|
||||||
$.ajax({
|
e.preventDefault();
|
||||||
type: 'GET',
|
$.ajax({
|
||||||
url: '/admin/worker-manager/populate-status',
|
type: 'GET',
|
||||||
data: {
|
url: '/admin/worker-manager/populate-status',
|
||||||
sbasIds: [{{ bid }}]
|
data: {
|
||||||
},
|
sbasIds: [{{ bid }}]
|
||||||
success: function (data) {
|
},
|
||||||
if (data == 0) {
|
success: function (data) {
|
||||||
$.ajax({
|
if (data == 0) {
|
||||||
url: '/thesaurus/populate',
|
$.ajax({
|
||||||
type: 'POST',
|
url: '/thesaurus/populate',
|
||||||
data: {
|
type: 'POST',
|
||||||
databox_id: {{ bid }}
|
data: {
|
||||||
},
|
databox_id: {{ bid }}
|
||||||
success: function (data) {
|
},
|
||||||
//humane.info('{{ "thesaurus::populate: success message" |trans }}');
|
success: function (data) {
|
||||||
$('.close-dialog').trigger('click');
|
//humane.info('{{ "thesaurus::populate: success message" |trans }}');
|
||||||
}
|
$('.close-dialog').trigger('click');
|
||||||
});
|
}
|
||||||
} else {
|
});
|
||||||
alert('{{ "thesaurus::populate: Warning populate is in process to indexing databox" |trans }}');
|
} else {
|
||||||
}
|
alert('{{ "thesaurus::populate: Warning populate is in process to indexing databox" |trans }}');
|
||||||
}
|
}
|
||||||
});
|
}
|
||||||
})
|
});
|
||||||
});
|
})
|
||||||
|
});
|
||||||
|
})
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
</body>
|
</body>
|
||||||
|
Reference in New Issue
Block a user