From 43be30c98675530fd4bd4963ef6a72732d8d3f48 Mon Sep 17 00:00:00 2001 From: fredyrivera Date: Sun, 5 Mar 2017 20:18:33 -0500 Subject: [PATCH] Nomapa --- librerias/leaflet/L.Control.SlideMenu.css | 35 -- librerias/leaflet/L.Control.SlideMenu.js | 148 --------- librerias/leaflet/css/sidebar.css | 385 ++++++++++++++++++++++ milfs/funciones/funciones.php | 18 +- nomapa.php | 167 ++++++++-- nomapak.php | 237 ------------- 6 files changed, 531 insertions(+), 459 deletions(-) delete mode 100644 librerias/leaflet/L.Control.SlideMenu.css delete mode 100644 librerias/leaflet/L.Control.SlideMenu.js create mode 100644 librerias/leaflet/css/sidebar.css delete mode 100644 nomapak.php diff --git a/librerias/leaflet/L.Control.SlideMenu.css b/librerias/leaflet/L.Control.SlideMenu.css deleted file mode 100644 index ede01ab..0000000 --- a/librerias/leaflet/L.Control.SlideMenu.css +++ /dev/null @@ -1,35 +0,0 @@ -.leaflet-control-slidemenu{ - cursor: pointer; -} - -.leaflet-menu{ - position: absolute; - background-color: rgba(255, 255, 255, 0.5); - overflow: auto; - cursor: default; - z-index: 9999; - opacity: 0,5; -} - -.leaflet-menu::-webkit-scrollbar{ - width: 7px; - height: 7px; - background: #f2f2f2; -} - -.leaflet-menu::-webkit-scrollbar-thumb{ - border-radius: 2px; - background: #777; -} - -.leaflet-menu-close-button{ - background-color: transparent; - border: none; - font-size: 14pt; - color: #777; - cursor: pointer; -} - -.leaflet-menu-close-button:hover{ - color: #4285F4; -} \ No newline at end of file diff --git a/librerias/leaflet/L.Control.SlideMenu.js b/librerias/leaflet/L.Control.SlideMenu.js deleted file mode 100644 index dd42b16..0000000 --- a/librerias/leaflet/L.Control.SlideMenu.js +++ /dev/null @@ -1,148 +0,0 @@ -L.Control.SlideMenu = L.Control.extend({ - options: { - position: 'topleft', - menuposition: 'topleft', // topleft,topright,bottomleft,bottomright - width: '300px', - height: '100%', - direction: 'horizontal', // vertical or horizontal - changeperc: '10', - delay: '10' - }, - - initialize: function (innerHTML, options) { - L.Util.setOptions(this, options); - this._innerHTML = innerHTML; - this._isLeftPosition = this.options.menuposition == 'topleft' || - this.options.menuposition == 'bottomleft' ? true : false; - this._isTopPosition = this.options.menuposition == 'topleft' || - this.options.menuposition == 'topright' ? true : false; - this._isHorizontal = this.options.direction == 'horizontal' ? true : false; - }, - - onAdd: function (map) { - this._container = L.DomUtil.create('div', 'leaflet-control-slidemenu leaflet-bar leaflet-control'); - var link = L.DomUtil.create('a', 'leaflet-bar-part leaflet-bar-part-single', this._container); - link.title = 'Menu'; - L.DomUtil.create('span', 'fa fa-info', link); - - this._menu = L.DomUtil.create('div', 'leaflet-menu', map._container); - - this._menu.style.width = this.options.width; - this._menu.style.height = this.options.height; - - if (this._isHorizontal){ - var frominit = -(parseInt(this.options.width, 10)); - if (this._isLeftPosition){ - this._menu.style.left = '-' + this.options.width; - } else { - this._menu.style.right = '-' + this.options.width; - } - if (this._isTopPosition) { - this._menu.style.top = '0px'; - } else { - this._menu.style.bottom = '0px'; - } - } else { - var frominit = -(parseInt(this.options.height, 10)); - if (this._isLeftPosition){ - this._menu.style.left = '0px'; - } else { - this._menu.style.right = '0px'; - } - if (this._isTopPosition) { - this._menu.style.top = '-' + this.options.height; - } else { - this._menu.style.bottom = '-' + this.options.height; - } - } - - var closeButton = L.DomUtil.create('button', 'leaflet-menu-close-button fa', this._menu); - - if (this._isHorizontal){ - if (this._isLeftPosition) { - closeButton.style.float = 'right'; - L.DomUtil.addClass(closeButton, 'fa-chevron-left'); - } - else { - closeButton.style.float = 'left'; - L.DomUtil.addClass(closeButton, 'fa-chevron-right'); - } - } else { - if (this._isTopPosition) { - closeButton.style.float = 'right'; - L.DomUtil.addClass(closeButton, 'fa-chevron-up'); - } - else { - closeButton.style.float = 'right'; - L.DomUtil.addClass(closeButton, 'fa-chevron-down'); - } - } - - this._contents = L.DomUtil.create('div', 'leaflet-menu-contents', this._menu); - this._contents.innerHTML = this._innerHTML; - this._contents.style.clear = 'both'; - - if (this._isHorizontal){ - var ispx = this.options.width.slice(-1) == 'x' ? true : false; - var unit = parseInt(this.options.width, 10) * parseInt(this.options.changeperc, 10) / 100; - } else { - var ispx = this.options.height.slice(-1) == 'x' ? true : false; - var unit = parseInt(this.options.height, 10) * parseInt(this.options.changeperc, 10) / 100; - } - - L.DomEvent.disableClickPropagation(this._menu); - L.DomEvent - .on(link, 'click', L.DomEvent.stopPropagation) - .on(link, 'click', function() { - // Open - this._animate(this._menu, frominit, 0, true, ispx, unit); - }, this) - .on(closeButton, 'click', L.DomEvent.stopPropagation) - .on(closeButton, 'click', function() { - // Close - this._animate(this._menu, 0, frominit, false, ispx, unit); - }, this); - - return this._container; - }, - - onRemove: function(map){ - //Remove sliding menu from DOM - map._container.removeChild(this._menu); - delete this._menu; - }, - - setContents: function(innerHTML) { - this._innerHTML = innerHTML; - this._contents.innerHTML = this._innerHTML; - }, - - _animate: function(menu, from, to, isOpen, ispx, unit) { - if (this._isHorizontal){ - if (this._isLeftPosition){ - menu.style.left = from + (ispx ? 'px' : '%'); - } else { - menu.style.right = from + (ispx ? 'px' : '%'); - } - } else { - if (this._isTopPosition) { - menu.style.top = from + (ispx ? 'px' : '%'); - } else { - menu.style.bottom = from + (ispx ? 'px' : '%'); - } - } - - if (from != to){ - setTimeout(function(slideMenu) { - var value = isOpen ? from + unit : from - unit; - slideMenu._animate(slideMenu._menu, value, to, isOpen, ispx, unit); - }, parseInt(this.options.delay), this); - } else { - return; - } - } -}); - -L.control.slideMenu = function(innerHTML, options) { - return new L.Control.SlideMenu(innerHTML, options); -} \ No newline at end of file diff --git a/librerias/leaflet/css/sidebar.css b/librerias/leaflet/css/sidebar.css new file mode 100644 index 0000000..9a28449 --- /dev/null +++ b/librerias/leaflet/css/sidebar.css @@ -0,0 +1,385 @@ + /* Adding gvnix styles css - NO COPIAR */ +/* @import 'http://geo-gvnix.rhcloud.com/resources/styles/standard.css';*/ + /* Custom fixed navs */ + + .sidebar-logo{ +padding: 20px; +margin: 0px auto; +text-align:center; + } +h1{ +font-size: 20px; !important; +} +h2{ +font-size: 16px; !important; +} + header.navbar+nav.navbar{ + /* margin-top: 20px;same margin-bottom .navbar */ + } + .navbar.navbar-default.navbar-fixed-top{ + margin-top: 50px; + } + .sidebar.navbar-fixed-top{ + margin-top: 100px; + } + + @media (min-width: 768px) and (max-width: 998px){ + .navbar.navbar-default.navbar-fixed-top{ + margin-top: 100px; + } + .sidebar.navbar-fixed-top{ + margin-top: 150px; + } + } + + /* Custom navbar default: global*/ + + .navbar.navbar-default{ + background-color: #f8f8f8; + border-color: #e7e7e7; + margin: 0; + border-radius: 0; + } + .navbar.navbar-default .navbar-brand { + color: #666; + text-shadow: none; + min-width: 150px; + } + .navbar.navbar-default .navbar-nav > li > a { + color: #666; + text-shadow: none; + } + .navbar.navbar-default .navbar-nav > li > a { + color: #666; + text-shadow: none; + } + .navbar.navbar-default .navbar-nav > li > a:hover{ + color: #acc47f; + } + .navbar.navbar-default .navbar-nav > .active > a{ + color: #fff; + background-color: #acc47f; + } + .navbar.navbar-default .navbar-nav > .active > a:hover{ + color: #608224; + background-color: #acc47f; + } + .navbar.navbar-default .caret { + border-top-color: #ccc; + border-bottom-color: #ccc; + } + .navbar.navbar-default .caret:hover { + border-top-color: #333; + border-bottom-color: #333; + } + + +/* Custom sidebar menu */ + + /*Remove rounded coners*/ + + nav.sidebar.navbar { + border-radius: 0px; + } + + nav.sidebar, .main{ + -webkit-transition: margin 200ms ease-out; + -moz-transition: margin 200ms ease-out; + -o-transition: margin 200ms ease-out; + transition: margin 200ms ease-out; + } + + /* Add gap to nav and right windows.*/ + .main{ + padding: 10px 10px 0 10px; + } + + /* .....NavBar: Icon only with coloring/layout.....*/ + + /*small/medium side display*/ + @media (min-width: 768px) { + + /*Allow main to be next to Nav*/ + .main{ + position: absolute; + width: calc(100% - 40px); /*keeps 100% minus nav size*/ + margin-left: 40px; + float: right; + } + + /*lets nav bar to be showed on mouseover*/ + nav.sidebar:hover + .main{ + margin-left: 200px; + } + + /*Center Brand*/ + nav.sidebar.navbar.sidebar>.container .navbar-brand, .navbar>.container-fluid .navbar-brand { + margin-left: 0px; + } + /*Center Brand*/ + nav.sidebar .navbar-brand, nav.sidebar .navbar-header{ + text-align: center; + width: 100%; + margin-left: 0px; + } + + /*Center Icons*/ + nav.sidebar a{ + padding-right: 13px; + min-width: 100px; + } + + /*custom sidebar nav*/ + nav.sidebar ul.nav.navbar-nav{ + margin: 0; + } + nav.sidebar.navbar-inverse .navbar-nav .open .dropdown-menu>li>a { + color: white; + } + + /*adds border top to first nav box */ + nav.sidebar .navbar-nav > li:first-child{ + border-top: 1px #e5e5e5 solid; + } + + /*adds border to bottom nav boxes*/ + nav.sidebar .navbar-nav > li{ + border-bottom: 1px #e5e5e5 solid; + } + /*adds background on hover*/ + nav.sidebar .navbar-nav > li:hover{ + color: #fff; + background-color: #43600E; + } + /*removes border last element*/ + nav.sidebar .navbar-nav > li.last{ + border-bottom: none; + } + + /* Colors/style dropdown box*/ + nav.sidebar .navbar-nav .open .dropdown-menu { + position: static; + float: none; + width: auto; + margin-top: 0; + background-color: transparent; + border: 0; + -webkit-box-shadow: none; + box-shadow: none; + } + + /*allows nav box to use 100% width*/ + nav.sidebar .navbar-collapse, nav.sidebar .container-fluid{ + padding: 0 0px 0 0px; + } + + /*colors dropdown box text */ + .navbar-inverse .navbar-nav .open .dropdown-menu>li>a { + color: #777; + } + +/*O quanto o menu irá esconder á esquerda*/ + /*gives sidebar width/height*/ + nav.sidebar{ + width: 200px; + height: 100%; + margin-left: -270px; + float: left; + z-index: 8000; + margin-bottom: 0px; + } + + /*give sidebar 100% width;*/ + nav.sidebar li { + width: 100%; + } + + /* Move nav to full on mouse over*/ + nav.sidebar:hover{ + margin-left: 0px; + } + /*for hiden things when navbar hidden*/ + .forAnimate{ + opacity: 0; + } + } + + /* .....NavBar: Fully showing nav bar..... */ + + @media (min-width: 1330px) { + +/* Allow main to be next to Nav + .main{ + width: calc(100% - 200px); keeps 100% minus nav size + margin-left: 200px; + } + + Show all nav + nav.sidebar{ + margin-left: 0px; + float: left; + } + Show hidden items on nav + nav.sidebar .forAnimate{ + opacity: 1; + } */ + } + + nav.sidebar .navbar-nav .open .dropdown-menu>li>a:hover, nav.sidebar .navbar-nav .open .dropdown-menu>li>a:focus { + color: #CCC; + background-color: transparent; + } + + nav:hover .forAnimate{ + opacity: 1; + } + + + /*---- FIM SLIDE MENU*/ + + .nav-side-menu { + overflow: auto; + font-family: verdana; + font-size: 12px; + font-weight: 200; + background-color: #2e353d; + position: fixed; + top: 0px; + width: 300px; + height: 100%; + color: #e1ffff; +} +.nav-side-menu .brand { + background-color: #23282e; + line-height: 50px; + display: block; + text-align: center; + font-size: 14px; +} +.nav-side-menu .toggle-btn { + display: none; +} +.nav-side-menu ul, +.nav-side-menu li { + list-style: none; + padding: 0px; + margin: 0px; + line-height: 35px; + cursor: pointer; + /* + .collapsed{ + .arrow:before{ + font-family: FontAwesome; + content: "\f053"; + display: inline-block; + padding-left:10px; + padding-right: 10px; + vertical-align: middle; + float:right; + } + } +*/ +} +.nav-side-menu ul :not(collapsed) .arrow:before, +.nav-side-menu li :not(collapsed) .arrow:before { + font-family: FontAwesome; + content: "\f078"; + display: inline-block; + padding-left: 10px; + padding-right: 10px; + vertical-align: middle; + float: right; +} +.nav-side-menu ul .active, +.nav-side-menu li .active { + border-left: 3px solid #d19b3d; + background-color: #4f5b69; +} +.nav-side-menu ul .sub-menu li.active, +.nav-side-menu li .sub-menu li.active { + color: #d19b3d; +} +.nav-side-menu ul .sub-menu li.active a, +.nav-side-menu li .sub-menu li.active a { + color: #d19b3d; +} +.nav-side-menu ul .sub-menu li, +.nav-side-menu li .sub-menu li { + background-color: #181c20; + border: none; + line-height: 28px; + border-bottom: 1px solid #23282e; + margin-left: 0px; +} +.nav-side-menu ul .sub-menu li:hover, +.nav-side-menu li .sub-menu li:hover { + background-color: #020203; +} +.nav-side-menu ul .sub-menu li:before, +.nav-side-menu li .sub-menu li:before { + font-family: FontAwesome; + content: "\f105"; + display: inline-block; + padding-left: 10px; + padding-right: 10px; + vertical-align: middle; +} +.nav-side-menu li { + padding-left: 0px; + border-left: 3px solid #2e353d; + border-bottom: 1px solid #23282e; +} +.nav-side-menu li a { + text-decoration: none; + color: #e1ffff; +} +.nav-side-menu li a i { + padding-left: 10px; + width: 20px; + padding-right: 20px; +} +.nav-side-menu li:hover { + border-left: 3px solid #d19b3d; + background-color: #4f5b69; + -webkit-transition: all 1s ease; + -moz-transition: all 1s ease; + -o-transition: all 1s ease; + -ms-transition: all 1s ease; + transition: all 1s ease; +} +@media (max-width: 767px) { + .nav-side-menu { + position: relative; + width: 100%; + margin-bottom: 10px; + } + .nav-side-menu .toggle-btn { + display: block; + cursor: pointer; + position: absolute; + right: 10px; + top: 10px; + z-index: 10 !important; + padding: 3px; + background-color: #ffffff; + color: #000; + width: 40px; + text-align: center; + } + .brand { + text-align: left !important; + font-size: 22px; + padding-left: 20px; + line-height: 50px !important; + } +} +@media (min-width: 767px) { + .nav-side-menu .menu-list .menu-content { + display: block; + } +} +body { + margin: 0px; + padding: 0px; +} + diff --git a/milfs/funciones/funciones.php b/milfs/funciones/funciones.php index 37cec34..794f161 100644 --- a/milfs/funciones/funciones.php +++ b/milfs/funciones/funciones.php @@ -5061,7 +5061,9 @@ $consulta = " $sql=mysqli_query($link,$consulta); if (mysqli_num_rows($sql)!='0'){ -$resultado = "
"; +$resultado = "
"; +$resultado .= " "; } else{$resultado = '';} } diff --git a/nomapa.php b/nomapa.php index 3ef59af..a361771 100644 --- a/nomapa.php +++ b/nomapa.php @@ -10,8 +10,11 @@ require ("milfs/funciones/conex.php"); $xajax->processRequests(); //if($_REQUEST[id2] =='') {$agregar= $_REQUEST[id];}else {$agregar = $_REQUEST[id2];} $formulario_nombre = remplacetas('form_id','id',$_REQUEST[id],'nombre') ; +$formulario_descripcion = remplacetas('form_id','id',$_REQUEST[id],'descripcion') ; $agregar_nombre = remplacetas('form_id','id',$agregar,'nombre') ; $id_empresa = remplacetas('form_id','id',$_REQUEST[id],'id_empresa') ; +$logo = remplacetas('empresa','id',"$id_empresa[0]",'imagen','') ; +$razon_social = remplacetas('empresa','id',"$id_empresa[0]",'razon_social','') ; $plantilla ="mapa"; ?> @@ -19,9 +22,9 @@ $plantilla ="mapa"; <?php echo $formulario_nombre[0] ?> MILFS - + - + printJavascript("milfs/xajax/"); ?> @@ -32,8 +35,8 @@ $plantilla ="mapa"; - - + + @@ -48,12 +51,9 @@ $plantilla ="mapa"; - - + + + + + +
- @@ -171,14 +210,66 @@ $leyenda ="
- + + function htmlbodyHeightUpdate(){ + var height3 = $( window ).height() + var height1 = $('.nav').height()+50 + height2 = $('.main').height() + if(height2 > height3){ + $('html').height(Math.max(height1,height3,height2)+10); + $('body').height(Math.max(height1,height3,height2)+10); + } + else + { + $('html').height(Math.max(height1,height3,height2)); + $('body').height(Math.max(height1,height3,height2)); + } + + } + $(document).ready(function () { + htmlbodyHeightUpdate() + $( window ).resize(function() { + htmlbodyHeightUpdate() + }); + $( window ).scroll(function() { + height2 = $('.main').height() + htmlbodyHeightUpdate() + }); + }); + function htmlbodyHeightUpdate(){ + var height3 = $( window ).height() + var height1 = $('.nav').height()+50 + height2 = $('.main').height() + if(height2 > height3){ + $('html').height(Math.max(height1,height3,height2)+10); + $('body').height(Math.max(height1,height3,height2)+10); + } + else + { + $('html').height(Math.max(height1,height3,height2)); + $('body').height(Math.max(height1,height3,height2)); + } + + } + $(document).ready(function () { + htmlbodyHeightUpdate() + $( window ).resize(function() { + htmlbodyHeightUpdate() + }); + $( window ).scroll(function() { + height2 = $('.main').height() + htmlbodyHeightUpdate() + }); + }); + + var tiles = L.tileLayer('http://{s}.tile.osm.org/{z}/{x}/{y}.png', { maxZoom: 18, attribution: '© OpenStreetMap contributors' }), latlng = L.latLng(4, -74.9005222); - var map = L.map('map', {center: latlng, zoom: 5, layers: [tiles]}); + var map = L.map('map', {center: latlng, zoom: 5, layers: [tiles],zoomControl: false}); var geojson = L.geoJson(geojsonSample, { @@ -210,12 +301,18 @@ onEachFeature: function(feature, layer) { map.fitBounds(geojson.getBounds()); var legend = L.control({position: 'bottomright'}); +//disable zoomControl when initializing map (which is topleft by default) +//add zoom control with your options +L.control.zoom({ + position:'topright' +}).addTo(map); + legend.onAdd = function (map) { var div = L.DomUtil.create('div', 'info legend'); - div.innerHTML = " Leyenda"; + div.innerHTML = ""; div.id = "info legend" diff --git a/nomapak.php b/nomapak.php deleted file mode 100644 index 466ace6..0000000 --- a/nomapak.php +++ /dev/null @@ -1,237 +0,0 @@ -processRequests(); -//if($_REQUEST[id2] =='') {$agregar= $_REQUEST[id];}else {$agregar = $_REQUEST[id2];} -$formulario_nombre = remplacetas('form_id','id',$_REQUEST[id],'nombre') ; -$agregar_nombre = remplacetas('form_id','id',$agregar,'nombre') ; -$id_empresa = remplacetas('form_id','id',$_REQUEST[id],'id_empresa') ; -$plantilla ="mapa"; -?> - - - - Mapa <?php echo $formulario_nombre[0] ?> - - - - - - printJavascript("milfs/xajax/"); ?> - - - - - - - - - - - - - - - - - - - - - - - - $css_adicional[0] - - "; - } - else { - $css_adicional =""; - } - echo $css_adicional; ?> - - - -
- -
- - $categorias -
- "; - $leyenda ="
Cerrar $categorias
"; - - - }else{ - - } - //echo $pie; - ?> - - - - - -