mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-23 18:03:17 +00:00
Add geonames module
This commit is contained in:
@@ -63,7 +63,7 @@
|
||||
{% macro choose_title(id, choose_export_title, default_export_title)%}
|
||||
<div class="buttons_line" style="display:{% if choose_export_title %}{% else %}none{% endif %}; text-align: left;">
|
||||
<p>{% trans 'Nom des fichiers a l\'export'%}</p>
|
||||
<div style="well-small">
|
||||
<div classe="well-small">
|
||||
<label for="type_{{id}}_original" class="radio">
|
||||
<input type="radio" name="type" id="type_{{id}}_original" {% if default_export_title == "title" %}checked{% endif %} value="title" />
|
||||
{% trans 'export::titre: titre du documument' %}
|
||||
@@ -498,6 +498,7 @@
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
<script type="text/javascript" language="javascript" src="{{ path('minifier', { 'f' : 'assets/geonames-server-jquery-plugin/jquery.geonames.js,skins/geonames/geonames.js' }) }}"></script>
|
||||
<script type="text/javascript">
|
||||
|
||||
function check_TOU(container)
|
||||
@@ -537,7 +538,7 @@
|
||||
});
|
||||
|
||||
$('input.required, textarea.required', container).each(function(i,n){
|
||||
if($.trim($(n).val()) == '')
|
||||
if($.trim($(n).val()) === '')
|
||||
{
|
||||
required = true;
|
||||
$(n).addClass('error');
|
||||
@@ -613,29 +614,11 @@
|
||||
dialog.Close();
|
||||
});
|
||||
|
||||
var geocompleter = $('#command_geoname_field').geocompleter({
|
||||
geonames.init($('#command_geoname_field'), {
|
||||
"server": "{{ app['phraseanet.registry'].get('GV_i18n_service') }}",
|
||||
"limit": 40
|
||||
});
|
||||
|
||||
geocompleter.geocompleter("autocompleter", "on", "autocompletesearch", function(event, ui) {
|
||||
$(this).addClass('input-loading');
|
||||
$(this).removeClass('input-error');
|
||||
});
|
||||
|
||||
geocompleter.geocompleter("autocompleter", "on", "autocompleteresponse", function(event, ui) {
|
||||
$(this).removeClass('input-loading');
|
||||
});
|
||||
|
||||
geocompleter.geocompleter("autocompleter", "on", "autocompleteclose", function(event, ui) {
|
||||
$(this).removeClass('input-loading');
|
||||
});
|
||||
|
||||
geocompleter.geocompleter("autocompleter", "on", "geotocompleter.request.error", function(jqXhr, status, error) {
|
||||
$(this).removeClass('input-loading');
|
||||
$(this).addClass('input-error');
|
||||
});
|
||||
|
||||
$('#download .download_button').bind('click',function(){
|
||||
if(!check_subdefs($('#download')))
|
||||
return false;
|
||||
@@ -648,8 +631,8 @@
|
||||
var count = 0;
|
||||
|
||||
$('input[name="obj[]"]', $('#download')).each(function(){
|
||||
var total_el = $('#download input[name=download_'+$(this).val()+']')
|
||||
var count_el = $('#download input[name=count_'+$(this).val()+']')
|
||||
var total_el = $('#download input[name=download_'+$(this).val()+']');
|
||||
var count_el = $('#download input[name=count_'+$(this).val()+']');
|
||||
if($(this).attr('checked'))
|
||||
{
|
||||
total += parseInt($(total_el).val());
|
||||
@@ -702,7 +685,7 @@
|
||||
$.post("../prod/order/"
|
||||
, options
|
||||
, function(data){
|
||||
$this.attr('disabled', false).removeClass('disabled')
|
||||
$this.attr('disabled', false).removeClass('disabled');
|
||||
|
||||
$('#order .order_button_loader').css('visibility','hidden');
|
||||
|
||||
|
Reference in New Issue
Block a user