mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-14 21:43:18 +00:00
Add city retrieval from geonamed id on input creation
This commit is contained in:
@@ -24,6 +24,6 @@
|
||||
"js-fixtures": "https://github.com/badunk/js-fixtures/archive/master.zip",
|
||||
"bootstrap-multiselect": "https://github.com/davidstutz/bootstrap-multiselect.git",
|
||||
"zxcvbn" : "https://github.com/lowe/zxcvbn.git",
|
||||
"geonames-server-jquery-plugin" : "~0.2.0"
|
||||
"geonames-server-jquery-plugin" : "~0.2"
|
||||
}
|
||||
}
|
||||
|
@@ -23,7 +23,6 @@ $groups = array(
|
||||
'client' => array(
|
||||
'//include/jslibs/swfobject/swfobject.js'
|
||||
, '//include/jslibs/jquery-ui-1.10.3/jquery-ui-i18n.js'
|
||||
, '//skins/geonames/geonames.js'
|
||||
, '//include/jslibs/jquery.cookie.js'
|
||||
, '//include/jquery.common.js'
|
||||
, '//include/jslibs/json2.js'
|
||||
@@ -45,7 +44,6 @@ $groups = array(
|
||||
, '//skins/admin/users.js'
|
||||
, '//skins/admin/editusers.js'
|
||||
, '//include/jquery.common.js'
|
||||
, '//skins/geonames/geonames.js'
|
||||
, '//include/jquery.tooltip.js'
|
||||
, '//include/jslibs/jquery.contextmenu_scroll.js'
|
||||
, '//assets/blueimp-load-image/js/load-image.js'
|
||||
@@ -81,7 +79,6 @@ $groups = array(
|
||||
, '//assets/blueimp-load-image/js/load-image.js'
|
||||
, '//assets/jquery-file-upload/js/jquery.iframe-transport.js'
|
||||
, '//assets/jquery-file-upload/js/jquery.fileupload.js'
|
||||
, '//skins/geonames/geonames.js'
|
||||
, '//include/jslibs/jquery.form.2.49.js'
|
||||
, '//include/jslibs/jquery.vertical.buttonset.js'
|
||||
, '//include/js/jquery.Selection.js'
|
||||
@@ -121,7 +118,6 @@ $groups = array(
|
||||
'//include/jslibs/jquery.mousewheel.js'
|
||||
, '//include/jquery.tooltip.js'
|
||||
, '//include/jslibs/swfobject/swfobject.js'
|
||||
, '//skins/geonames/geonames.js'
|
||||
, '//include/jslibs/jquery-ui-1.10.3/jquery-ui-i18n.js'
|
||||
, '//include/jslibs/jquery.cookie.js'
|
||||
, '//include/jslibs/jquery.contextmenu_scroll.js'
|
||||
@@ -133,7 +129,6 @@ $groups = array(
|
||||
'//include/jslibs/jquery.mousewheel.js'
|
||||
, '//include/jquery.tooltip.js'
|
||||
, '//include/jslibs/swfobject/swfobject.js'
|
||||
, '//skins/geonames/geonames.js'
|
||||
, '//include/jslibs/jquery-ui-1.10.3/jquery-ui-i18n.js'
|
||||
, '//include/jslibs/jquery.cookie.js'
|
||||
, '//include/jslibs/jquery.contextmenu_scroll.js'
|
||||
|
@@ -5,8 +5,8 @@
|
||||
{% set selected = "informations" %}
|
||||
|
||||
{% block stylesheet %}
|
||||
<link rel="stylesheet" type="text/css" href="{{ path('minifier', { 'f' : 'skins/geonames/geonames.css' }) }}">
|
||||
{{ parent() }}
|
||||
{#<link rel="stylesheet" type="text/css" href="{{ path('minifier', { 'f' : 'skins/geonames/geonames.css' }) }}">#}
|
||||
{% endblock %}
|
||||
|
||||
{% block javascript %}
|
||||
@@ -14,12 +14,10 @@
|
||||
<script type="text/javascript" language="javascript" src="{{ path('minifier', { 'f' : '/skins/account/account.js,assets/geonames-server-jquery-plugin/jquery.geonames.js,scripts/common/geonames.js' }) }}"></script>
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function() {
|
||||
var geocompleter = geonames.init($("#form_geonameid"), {
|
||||
geonames.init($("#form_geonameid"), {
|
||||
"server": "{{ app['geonames.server-uri'] }}",
|
||||
"limit": 40
|
||||
});
|
||||
|
||||
geocompleter.data("geocompleter").getAutocompleter().addClass("input-xlarge");
|
||||
});
|
||||
</script>
|
||||
{% endblock %}
|
||||
|
@@ -8,7 +8,7 @@
|
||||
{% endblock %}
|
||||
|
||||
{% block stylesheet %}
|
||||
<link type="text/css" rel="stylesheet" href="{{ path('minifier', { 'f' : 'include/jslibs/jquery-treeview/jquery.treeview.css,include/jslibs/jquery.contextmenu.css,skins/common/main.css,skins/admin/css/Main.css,skins/admin/css/Bases.css,skins/admin/css/Tables.css,skins/admin/css/fields.css' }) }}" />
|
||||
<link type="text/css" rel="stylesheet" href="{{ path('minifier', { 'f' : 'include/jslibs/jquery-treeview/jquery.treeview.css,include/jslibs/jquery.contextmenu.css,skins/common/main.css,skins/admin/css/Main.css,skins/admin/css/Bases.css,skins/admin/css/Tables.css,skins/admin/css/fields.css,skins/geonames/geonames.css' }) }}" />
|
||||
{% endblock %}
|
||||
|
||||
|
||||
|
@@ -30,7 +30,7 @@
|
||||
name="registerForm"
|
||||
method="POST"
|
||||
action="{{ path("login_register_classic") }}"
|
||||
data-geonames-server-adress="{{ app['geonames.server-uri'] }}"
|
||||
data-geonames-server-adress="{{ app['geonames.server-uri'] }}"
|
||||
>
|
||||
{% if form.vars.errors|length > 0 %}
|
||||
<div class="row-fluid">
|
||||
|
@@ -79,7 +79,7 @@
|
||||
.ui-tabs-vertical .ui-tabs-panel { padding: 1em; float: right;}
|
||||
</style>
|
||||
|
||||
<link type="text/css" rel="stylesheet" href="{{ path('minifier', { 'f' : 'include/jslibs/jquery.contextmenu.css,include/jslibs/colorpicker/css/colorpicker.css,include/jslibs/jquery-treeview/jquery.treeview.css,skins/common/main.css,include/jquery.image_enhancer.css' }) }}" >
|
||||
<link type="text/css" rel="stylesheet" href="{{ path('minifier', { 'f' : 'include/jslibs/jquery.contextmenu.css,include/jslibs/colorpicker/css/colorpicker.css,include/jslibs/jquery-treeview/jquery.treeview.css,skins/common/main.css,include/jquery.image_enhancer.css,skins/geonames/geonames.css' }) }}" >
|
||||
<link id="skinCss" type="text/css" rel="stylesheet" href="{{ path('minifier', { 'f' : 'skins/prod/' ~ cssfile ~ '/prodcolor.css' }) }}" >
|
||||
<link type="text/css" rel="stylesheet" href="{{ path('minifier', { 'f' : 'assets/humane-js/themes/libnotify.css,skins/prod/Prod.css,skins/prod/Basket.css,skins/prod/Push.css' }) }}" >
|
||||
|
||||
|
@@ -29,7 +29,7 @@ require.config({
|
||||
deps: ['jquery', 'jqueryui'],
|
||||
exports: '$.fn.geocompleter'
|
||||
},
|
||||
geonames: {
|
||||
"common/geonames": {
|
||||
deps: ["jquery.geonames"]
|
||||
},
|
||||
multiselect: {
|
||||
|
@@ -90,7 +90,8 @@ require([
|
||||
|
||||
var geocompleter = geonames.init($("#geonameid"), {
|
||||
"server": $form.data("geonames-server-adress"),
|
||||
"limit": 40
|
||||
"limit": 40,
|
||||
"init-input": false
|
||||
});
|
||||
|
||||
// Positioning menu below input
|
||||
|
@@ -9,9 +9,6 @@
|
||||
init: function($field, options) {
|
||||
var geocompleter = $field.geocompleter(options);
|
||||
|
||||
var geonameId = $field.val();
|
||||
|
||||
|
||||
// On focus add select-state
|
||||
geocompleter.geocompleter("autocompleter", "on", "autocompletefocus", function(event, ui) {
|
||||
$("li", $(event.originalEvent.target)).closest("li").removeClass("selected");
|
||||
|
20
www/skins/geonames/geonames.css
Normal file
20
www/skins/geonames/geonames.css
Normal file
@@ -0,0 +1,20 @@
|
||||
.geocompleter-menu {
|
||||
max-height: 180px;
|
||||
overflow-y: auto;
|
||||
/* prevent horizontal scrollbar */
|
||||
overflow-x: hidden;
|
||||
}
|
||||
|
||||
.geocompleter-menu .region {
|
||||
font-size: 11px;
|
||||
font-style: italic;
|
||||
display: block;
|
||||
}
|
||||
|
||||
.geocompleter-input.input-loading {
|
||||
background: url('/skins/icons/loaderFFF.gif') #fff center right no-repeat;
|
||||
}
|
||||
|
||||
.geocompleter-input.input-error {
|
||||
color: red !important;
|
||||
}
|
@@ -798,11 +798,8 @@ form[name=registerForm] .multiselect-group {
|
||||
}
|
||||
|
||||
.geocompleter-menu {
|
||||
max-height: 180px;
|
||||
overflow: auto;
|
||||
background: @backgroundSideBar;
|
||||
.glow(@sideBarGlow);
|
||||
list-style-type: none;
|
||||
}
|
||||
|
||||
.geocompleter-menu .ui-menu-item.selected {
|
||||
@@ -825,11 +822,9 @@ form[name=registerForm] .multiselect-group {
|
||||
|
||||
.geocompleter-menu .region {
|
||||
font-size: @fontSizeMini;
|
||||
font-style: italic;
|
||||
display: block;
|
||||
}
|
||||
|
||||
.geocompleter-menu .highlight {
|
||||
.geocompleter-menu .ui-state-highlight {
|
||||
background: @green;
|
||||
}
|
||||
|
||||
@@ -837,10 +832,6 @@ form[name=registerForm] .multiselect-group {
|
||||
background: url('/skins/icons/loader-black.gif') @black center right no-repeat;
|
||||
}
|
||||
|
||||
.geocompleter-input.input-error {
|
||||
color: red !important;
|
||||
}
|
||||
|
||||
/** IE Fixes */
|
||||
|
||||
.lt-ie8 authentication-sidebar-language .caret {
|
||||
|
Reference in New Issue
Block a user