CKEDITOR.dialog.add('leaflet', function(editor) { // Dialog's function callback for the Leaflet Map Widget. return { title: 'Create/Edit Leaflet Map', minWidth: 320, minHeight: 125, contents: [{ // Create a Location tab. id: 'location_tab', label: 'Location', elements: [ { id: 'map_geocode', className: 'geocode', type: 'text', label: 'Auto-Search of Coordinates.', style: 'margin-top: -7px;', setup: function(widget) { this.setValue(""); }, onShow: function (widget) { // Get the DOM reference for the Search field. var input = jQuery(".geocode input")[0]; // Bind the Search field to the Autocomplete widget. var autocomplete = new google.maps.places.Autocomplete(input); // Fix for the Google's type-ahead search displaying behind // the widgets dialog window. // Basically, we want to override the z-index of the // Seach Autocomplete list, in which the styling is being set // in real-time by Google. // Make a new DOM element. var stylesheet = jQuery('