Skip to content
This repository has been archived by the owner on Sep 15, 2020. It is now read-only.

Commit

Permalink
HotFix
Browse files Browse the repository at this point in the history
  • Loading branch information
Super Proyectos committed Dec 14, 2018
1 parent cd385eb commit 684bb8e
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 31 deletions.
66 changes: 44 additions & 22 deletions resources/mappy_board/js/main.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
var emptyCollectionOrder;
var aMark;
var viewsManager;

$(document).ready(function(){
$('.btn-sideBar-SubMenu').on('click', function(){
var SubMenu=$(this).next('ul');
Expand Down Expand Up @@ -58,11 +60,17 @@ $(document).ready(function(){

emptyCollectionOrder=new Dialog($('#Dialog-Help'));

$('.viewSideBar').on('click', changeToMap);
viewsManager=new ViewsManager($('.navbar-text'), $('#mapMain'),$('.makeACollectionOrder'),$('.historyOfCollectionOrders'));


$('.viewSideBar').on('click', function(){viewsManager.changeToMap()});

$('.collectionOrderSideBar').on('click', changeToCollectionOrder);
$('.collectionOrderSideBar').on('click', function(){viewsManager.changeToCollectionOrder()});

$('.historySideBar').on('click', function(){viewsManager.changeToHistory()});

$('.doOne').on('click', function(){viewsManager.changeToCollectionOrder()});

$('.historySideBar').on('click', changeToHistory);
});
(function($){
$('.loading').show();
Expand All @@ -87,29 +95,43 @@ $(document).ready(function(){
});
})(jQuery);

function changeToMap()
class ViewsManager
{
$('.navbar-text').text("ÓRDENES DE RECOLECCIÓN");
$('.makeACollectionOrder').hide(300);
$('.historyOfCollectionOrders').hide(300);
$('#mapMain').show(300);
}
constructor(navbar, map, createOrderForm, history)
{
this.map=map;
this.createOrderForm=createOrderForm;
this.history=history;
this.navbar=navbar;
}

changeToMap()
{
this.navbar.text("ÓRDENES DE RECOLECCIÓN");
this.createOrderForm.hide(300);
this.history.hide(300);
this.map.show(300);
}

changeToCollectionOrder()
{
this.navbar.text("CREAR ORDEN DE RECOLECCIÓN");
this.map.hide(300);
this.history.hide(300);
this.createOrderForm.show(300);
}

changeToHistory()
{
this.navbar.text("ÓRDENES EN CURSO");
this.map.hide(300);
this.createOrderForm.hide(300);
this.history.show(300);
}

function changeToCollectionOrder()
{
$('.navbar-text').text("CREAR ORDEN DE RECOLECCIÓN");
$('#mapMain').hide(300);
$('.historyOfCollectionOrders').hide(300);
$('.makeACollectionOrder').show(300);
}
function changeToHistory()
{
$('.navbar-text').text("ÓRDENES EN CURSO");
$('#mapMain').hide(300);
$('.makeACollectionOrder').hide(300);
$('.historyOfCollectionOrders').show(300);
}


$(".formCollection").submit(async function()
{
var form = $(this);
Expand Down
9 changes: 0 additions & 9 deletions resources/mappy_board/js/map.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,12 +66,3 @@ function onMapClick(e) {
$('#latitude').val(latitude);
$('#longitude').val(longitude);
}

async function prueba()
{
$.get(location.protocol + '//nominatim.openstreetmap.org/search?format=json&q='+"Universidad Católica Andrés Bello", function(data){
console.log(data);
});
}

prueba();

0 comments on commit 684bb8e

Please sign in to comment.