diff --git a/include/bottom.php b/include/bottom.php index 240210e24..7f6020728 100644 --- a/include/bottom.php +++ b/include/bottom.php @@ -16,8 +16,8 @@ if (Auth::check()) { '.tr('OpenSTAManager').' - - '; + + '; } echo ' '; diff --git a/lib/functions.js b/lib/functions.js index 0b2784476..393b26e2e 100644 --- a/lib/functions.js +++ b/lib/functions.js @@ -412,6 +412,10 @@ function start_widgets($widgets) { // Modal function launch_modal(title, href, init_modal, id) { + + //Fix - Select2 does not function properly when I use it inside a Bootstrap modal. + $.fn.modal.Constructor.prototype.enforceFocus = function() {}; + if (id == null) { id = '#bs-popup'; } diff --git a/modules/articoli/edit.php b/modules/articoli/edit.php index e2b8880cb..4e937477c 100644 --- a/modules/articoli/edit.php +++ b/modules/articoli/edit.php @@ -70,7 +70,7 @@ $_SESSION['superselect']['id_categoria'] = $records[0]['id_categoria'];
- {[ "type": "number", "label": "", "name": "threshold_qta", "value": "$threshold_qta$", "decimals": "qta" ]} + {[ "type": "number", "label": "", "name": "threshold_qta", "value": "$threshold_qta$", "decimals": "qta|undefined" ]}
- {[ "type": "text", "label": "'.tr('Indirizzo').'", "name": "indirizzo", "required": 1, "value": "$indirizzo$" ]} + {[ "type": "text", "label": "'.tr('Indirizzo').'", "name": "indirizzo", "id": "indirizzo_", "required": 1, "value": "$indirizzo$" ]}
@@ -44,7 +44,7 @@ echo '
- {[ "type": "text", "label": "'.tr('Città').'", "name": "citta", "value": "$citta$" ]} + {[ "type": "text", "label": "'.tr('Città').'", "name": "citta", "id": "citta_", "value": "$citta$" ]}
@@ -91,39 +91,40 @@ echo '
'; if (!empty($google)) { - echo ' -
-
-
-
- {[ "type": "text", "label": "'.tr('Indirizzo Google').'", "name": "gaddress", "value": "$gaddress$", "extra": "data-geo=\'formatted_address\'" ]} -
+ echo ' +
+
+ {[ "type": "text", "label": "'.tr('Indirizzo Google').'", "name": "gaddress", "value": "$gaddress$", "extra": "data-geo=\'formatted_address\'" ]} +
-
- {[ "type": "text", "label": "'.tr('Latitudine').'", "name": "lat", "value": "$lat$", "extra": "data-geo=\'lat\'", "class": "text-right" ]} -
+
+ {[ "type": "text", "label": "'.tr('Latitudine').'", "name": "lat", "id": "lat_", "value": "$lat$", "extra": "data-geo=\'lat\'", "class": "text-right" ]} +
-
- {[ "type": "text", "label": "'.tr('Longitudine').'", "name": "lng", "value": "$lng$", "extra": "data-geo=\'lng\'", "class": "text-right" ]} -
-
-
'; +
+ {[ "type": "text", "label": "'.tr('Longitudine').'", "name": "lng", "id": "lng_", "value": "$lng$", "extra": "data-geo=\'lng\'", "class": "text-right" ]} +
'; - // Calcola percorso - if (empty($records[0]['gaddress']) || (empty($records[0]['lat']) && empty($records[0]['lng']))) { + // Vedi su google maps + if (!empty($records[0]['indirizzo']) || (empty($records[0]['citta'])) ) { + echo ' - '; +
+
+    + '; + + echo ' + +
'; } echo '
'; if (!empty($records[0]['gaddress']) || (!empty($records[0]['lat']) && !empty($records[0]['lng']))) { - echo ' -
'; + echo ' +

'; } } else { echo ' @@ -153,12 +154,12 @@ echo ' $(document).ready( function(){ $("#form_sedi #geocomplete input").geocomplete({ map: $("#form_sedi #map").length ? "#form_sedi #map" : false, - location: $("#form_sedi #gaddress").val() ? $("#form_sedi #gaddress").val() : [$("#form_sedi #lat").val(), $("#form_sedi #lng").val()], + location: $("#form_sedi #gaddress").val() ? $("#form_sedi #gaddress").val() : [$("#form_sedi #lat_").val(), $("#form_sedi #lng_").val()], details: "#form_sedi .details", detailsAttribute: "data-geo" }).bind("geocode:result", function (event, result) { - $("#form_sedi #lat").val(result.geometry.location.lat()); - $("#form_sedi #lng").val(result.geometry.location.lng()); + $("#form_sedi #lat_").val(result.geometry.location.lat()); + $("#form_sedi #lng_").val(result.geometry.location.lng()); }); }); ';