Skip to content

Commit ac6ce31

Browse files
committedMay 5, 2015
Merge pull request #346 from sephcoster/sprint22
Peer Branch Selection Exclusivity, Style Tweaks
2 parents 02502a8 + 2d7142b commit ac6ce31

File tree

9 files changed

+495
-450
lines changed

9 files changed

+495
-450
lines changed
 

‎frontend/src/js/helpers.js

+10-1
Original file line numberDiff line numberDiff line change
@@ -109,8 +109,15 @@
109109
}
110110
addParam('peers', status);
111111
getPeerLinks();
112-
$('#peerSelect').prop('checked', status );
113112

113+
// If Peer is checked, uncheck and disable Peers and branches as they will not be displayed for peer set.
114+
$('#branchSelect').prop('disabled', status );
115+
$('#superSelect').prop('disabled', status );
116+
toggleBranches(false);
117+
toggleSuper(false);
118+
119+
// Check the box
120+
$('#peerSelect').prop('checked', status );
114121
}
115122

116123
// Uses jQuery BlockUI plugin to block UI on data loading
@@ -202,6 +209,8 @@
202209
// or layer type.
203210
}
204211

212+
213+
// Adjudicate the variables associated with selected app layers across the application (names, paths, etc)
205214
function getLayerType( layer ){
206215
var type, keyPath, displayName;
207216

‎frontend/src/js/map.js

+261-257
Large diffs are not rendered by default.

‎frontend/src/less/mapusaurus/map.less

+7
Original file line numberDiff line numberDiff line change
@@ -580,10 +580,12 @@ select {
580580

581581
#key {
582582
width: 230px;
583+
background-color: #fff;
583584
}
584585

585586

586587

588+
587589
.show-hide-control {
588590
text-align: right;
589591
cursor: pointer;
@@ -690,6 +692,11 @@ select {
690692
display: none !important;
691693
}
692694

695+
#key {
696+
padding: 5px;
697+
border: 1px solid @black;
698+
}
699+
693700
}
694701

695702

‎mapusaurus/basestyle/static/basestyle/css/mapusaurus.css

+5
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎mapusaurus/basestyle/static/basestyle/css/mapusaurus.min.css

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎mapusaurus/basestyle/static/basestyle/css/mapusaurus_sourcemap.css.map

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎mapusaurus/basestyle/static/basestyle/js/vendor.min.js

+56-42
Large diffs are not rendered by default.

‎mapusaurus/mapping/static/mapping/js/map-vendor.min.js

+146-139
Large diffs are not rendered by default.

‎mapusaurus/mapping/static/mapping/js/map.min.js

+8-9
Original file line numberDiff line numberDiff line change
@@ -232,7 +232,8 @@ function togglePeers(status) {
232232
$("#lender-peers").addClass("green-highlight"), $("#download-data").attr("href", url)) : ($("#lender-peers-list").addClass("hidden"),
233233
$("#lender-peers").removeClass("green-highlight"), $(".peers-of-true").addClass("hidden"),
234234
$("#download-data").attr("href", origUrl)), addParam("peers", status), getPeerLinks(),
235-
$("#peerSelect").prop("checked", status);
235+
$("#branchSelect").prop("disabled", status), $("#superSelect").prop("disabled", status),
236+
toggleBranches(!1), toggleSuper(!1), $("#peerSelect").prop("checked", status);
236237
}
237238

238239
function blockStuff() {
@@ -426,7 +427,7 @@ window.console || (console = {
426427
log: function() {}
427428
});
428429

429-
var cat, catId, geoQueryType = "selected", showDataContainer, destroyLarChart, cat, catId, geoQueryType = "selected";
430+
var showDataContainer, destroyLarChart, cat, catId, geoQueryType = "selected";
430431

431432
$(document).ready(function() {
432433
var lhStatus, peerStatus, branchStatus;
@@ -450,12 +451,11 @@ $(document).ready(function() {
450451
toggleBranches(status);
451452
}), "undefined" != typeof loadParams.peers ? lhStatus === !0 ? ($("#peerSelect").prop("checked", !1),
452453
console.log("Peer and Hierarchy cannot be checked at the same time. Unchecking Peers.")) : (peerStatus = "true" === loadParams.peers.values,
453-
$("#peerSelect").prop("checked", peerStatus), $("#superSelect").prop("disabled", peerStatus),
454-
togglePeers(peerStatus)) : addParam("peers", !1), $("#peerSelect").change(function() {
454+
$("#peerSelect").prop("checked", peerStatus), togglePeers(peerStatus)) : addParam("peers", !1),
455+
$("#peerSelect").change(function() {
455456
var el = $("#peerSelect"), status = el.prop("checked");
456457
togglePeers(status), $("#superSelect").prop("disabled", status), initCalls(geoQueryType);
457-
}), $("#actionTaken").text(getActionTaken($("#action-taken-selector option:selected").val())),
458-
$("#action-taken-selector").on("change", function() {
458+
}), $("#action-taken-selector").on("change", function() {
459459
var act = $("#action-taken-selector option:selected").val();
460460
addParam("action", act), $("#actionTaken").text(getActionTaken(act)), initCalls(geoQueryType);
461461
}), generateTooltips();
@@ -487,14 +487,13 @@ $(document).ready(function() {
487487
"background-image": "url(/static/basestyle/img/icon_map-layers.png)",
488488
"background-size": "26px",
489489
"background-position": "0,0"
490-
});
490+
}), $("#actionTaken").text(getActionTaken($("#action-taken-selector option:selected").val()));
491491
});
492492

493493
var msaArray = [], moveEndAction = {}, oldEndAction = geoQueryType;
494494

495495
moveEndAction.selected = function() {
496-
"selected" === oldEndAction ? console.log("No action required for 'selected' status. Nothing happens.") : (initCalls(geoQueryType),
497-
oldEndAction = "selected");
496+
"selected" === oldEndAction || (initCalls(geoQueryType), oldEndAction = "selected");
498497
}, moveEndAction.all_msa = function() {
499498
var oldMsaArray = msaArray.slice(0);
500499
"all_msa" === oldEndAction ? $.when(getMsasInBounds()).done(function(data) {

0 commit comments

Comments
 (0)
Please sign in to comment.