From 5e05db4292f9fb330b732367edaace91d1098d8e Mon Sep 17 00:00:00 2001 From: Ivan Kohler Date: Wed, 28 Dec 2016 12:38:00 -0800 Subject: style --- httemplate/view/cust_main/menu.html | 8 -------- 1 file changed, 8 deletions(-) diff --git a/httemplate/view/cust_main/menu.html b/httemplate/view/cust_main/menu.html index 7b8f68a8c..6f177c3c4 100644 --- a/httemplate/view/cust_main/menu.html +++ b/httemplate/view/cust_main/menu.html @@ -64,14 +64,6 @@ background: transparent; } -%# #customer_menu ul li.ui-state-active { -%# background: #f8f0fc; -%# border: 1px solid #7e0079; -%# border-radius: 2px; -%# margin-right: 1px; -%# margin-left: 1px; -%# } - <& /elements/dropdown-menu.html, -- cgit v1.2.1 From 0497c3eef8d7fb384ec09cf2ef82d3324faef89c Mon Sep 17 00:00:00 2001 From: Ivan Kohler Date: Wed, 28 Dec 2016 12:48:18 -0800 Subject: default payby for new installs, regression from 3.x, RT#73853 --- httemplate/view/cust_main/menu.html | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/httemplate/view/cust_main/menu.html b/httemplate/view/cust_main/menu.html index 6f177c3c4..4d35a0235 100644 --- a/httemplate/view/cust_main/menu.html +++ b/httemplate/view/cust_main/menu.html @@ -83,7 +83,10 @@ my $custnum = $cust_main->custnum; my $curuser = $FS::CurrentUser::CurrentUser; my $conf = FS::Conf->new; -my %payby = map { $_ => 1 } $conf->config('payby'); +my @payby = grep /\w/, $conf->config('payby'); +@payby = (qw( CARD DCRD CHEK DCHK )) + unless @payby; +my %payby = map { $_ => 1 } @payby; # cached for conditions, to avoid looking it up twice my $invoicing_list_emailonly = $cust_main->invoicing_list_emailonly; -- cgit v1.2.1 From 3bb4340c3ea12b3475439f5628f966ea222b626e Mon Sep 17 00:00:00 2001 From: Ivan Kohler Date: Thu, 29 Dec 2016 12:45:07 -0800 Subject: fix change pkg link --- httemplate/view/cust_main/packages/package.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/httemplate/view/cust_main/packages/package.html b/httemplate/view/cust_main/packages/package.html index dd15c7b71..ed460de11 100644 --- a/httemplate/view/cust_main/packages/package.html +++ b/httemplate/view/cust_main/packages/package.html @@ -254,7 +254,7 @@ acl => 'Change customer package', condition => $reg_recur_cond, popup => "misc/change_pkg.cgi?$plink". - ';locationnum='. $cust_pkg->locationnum. + ';locationnum='. $cust_pkg->locationnum, actionlabel => emt('Change package'), #width => 768, width => 960, -- cgit v1.2.1 From b393200c6678a0c245e6b1918d0c1b3fe6ea850f Mon Sep 17 00:00:00 2001 From: Mark Wells Date: Thu, 29 Dec 2016 19:30:25 -0800 Subject: fix coverage map display when there are no services, #73972 --- httemplate/search/elements/gmap.html | 15 ++++++++---- httemplate/search/svc_broadband-map.html | 40 +++++++++++++++++++++++++++++--- 2 files changed, 47 insertions(+), 8 deletions(-) diff --git a/httemplate/search/elements/gmap.html b/httemplate/search/elements/gmap.html index b7d135dd6..47db1507d 100644 --- a/httemplate/search/elements/gmap.html +++ b/httemplate/search/elements/gmap.html @@ -99,11 +99,16 @@ function initMap() { // construct bounds around all of the features var bounds = new google.maps.LatLngBounds; map.data.forEach(function(feature) { - var g = feature.getGeometry(); - if (g.getType() == 'Point') { - bounds.extend(g.get()); - } else if (g.getArray) { - g.getArray().forEach(function(point) { bounds.extend(point); }); + var b = feature.getProperty('bounds'); + if (b) { // if it specifies an ROI, include all of it + bounds.union(b); + } else { + var g = feature.getGeometry(); + if (g.getType() == 'Point') { + bounds.extend(g.get()); + } else if (g.getArray) { + g.getArray().forEach(function(point) { bounds.extend(point); }); + } } }); diff --git a/httemplate/search/svc_broadband-map.html b/httemplate/search/svc_broadband-map.html index fe3c0950b..95a31d352 100755 --- a/httemplate/search/svc_broadband-map.html +++ b/httemplate/search/svc_broadband-map.html @@ -114,9 +114,44 @@ foreach my $svc_broadband (@rows) { } # if tower has coords } # foreach $svc_broadband +# if we were given a towernum or sectornum, ensure that the map includes +# that tower/sector, even if there are no services + +foreach my $towernum ($cgi->param('towernum')) { + next if $towernum !~ /^\d+$/; + next if exists($towers{$towernum}); + $towers{$towernum} = FS::tower->by_key($towernum); +} + +foreach my $sectornum ($cgi->param('sectornum')) { + next if $sectornum !~ /^\d+$/; + next if exists($sectors{$sectornum}); + $sectors{$sectornum} = FS::tower_sector->by_key($sectornum) + or die "bad sectornum $sectornum"; + # and put it on the tower list also + my $towernum = $sectors{$sectornum}->towernum; + if (!exists($towers{$towernum})) { + $towers{$towernum} = FS::tower->by_key($towernum); + } +} + +# if the tower/sector was included in the search, but has no services, set +# default bounds around it of 1 minute in each direction +my $default_bounds = 0.017; + foreach my $tower (values(%towers)) { my $towernum = $tower->towernum; - my $bounds = $tower_bounds{$towernum}; + $tower_coord{$towernum} ||= [ $tower->longitude + 0, + $tower->latitude + 0, + ($tower->altitude || 0) + 0 + ]; +warn encode_json($tower_coord{$towernum}); + my $bounds = $tower_bounds{$towernum} + ||= { 'north' => $tower->latitude + $default_bounds, + 'south' => $tower->latitude - $default_bounds, + 'east' => $tower->longitude + $default_bounds, + 'west' => $tower->longitude - $default_bounds, + }; # add some padding for easier reading my $dx = 0.1 * ($bounds->{east} - $bounds->{west}); my $dy = 0.1 * ($bounds->{north} - $bounds->{south}); @@ -135,7 +170,7 @@ foreach my $tower (values(%towers)) { style => { icon => { path => undef, - url => $fsurl.'images/jcartier-antenna-square-21x51.png', + url => $fsurl.'images/antenna-square-21x51.png', anchor => { x => 10, y => 4 } }, }, @@ -157,7 +192,6 @@ foreach my $sector (values %sectors) { push @overlays, $o; }; }; - <%def .svc_broadband> % my $svc = shift; -- cgit v1.2.1 From ed832a11546a4bad4961165291b025790b76b68e Mon Sep 17 00:00:00 2001 From: Mark Wells Date: Fri, 30 Dec 2016 13:22:43 -0800 Subject: fix "Create map" form submission, #73266 --- httemplate/search/sector.html | 27 ++++++++++++++------------- 1 file changed, 14 insertions(+), 13 deletions(-) diff --git a/httemplate/search/sector.html b/httemplate/search/sector.html index 037df10ea..f93264907 100644 --- a/httemplate/search/sector.html +++ b/httemplate/search/sector.html @@ -59,19 +59,20 @@ % $text = 'Reprocess'; % }
- - <& /elements/progress-init.html, - 'create_'.$sectornum, - [ 'sectornum' ], - $fsurl.'misc/sector-create_map.html', - { 'message' => 'Map generated', - 'url' => $cgi->self_url }, - "sector$sectornum" - &> - - <% $text %> - -% } + + <& /elements/progress-init.html, + 'create_'.$sectornum, + [ 'sectornum' ], + $fsurl.'misc/sector-create_map.html', + { 'message' => 'Map generated', + 'url' => $cgi->self_url }, + "sector$sectornum" + &> + + <% $text %> + +
+% } # if @need_fields % if ( length($sector->image) > 0 ) { -- cgit v1.2.1