Small update to dot before merging in filterBar

This commit is contained in:
Zach Fox 2018-03-14 09:45:42 -07:00
parent e2326a3733
commit 98cdbbb3e6
3 changed files with 12 additions and 1 deletions

View file

@ -768,6 +768,9 @@ Rectangle {
case 'purchases_showMyItems':
root.isShowingMyItems = true;
break;
case 'showUpdates':
//primaryFilter;
break;
default:
console.log('Unrecognized message from marketplaces.js:', JSON.stringify(message));
}

View file

@ -213,13 +213,15 @@
purchasesElement.innerHTML += "My Purchases";
// FRONTEND WEBDEV RANT: The username dropdown should REALLY not be programmed to be on the same
// line as the search bar, overlaid on top of the search bar, floated right, and then relatively bumped up using "top:-50px".
$('.navbar-brand').css('margin-right', '10px');
purchasesElement.style = "height:100%;margin-top:18px;font-weight:bold;float:right;margin-right:" + (dropDownElement.offsetWidth + 30) +
"px;position:relative;z-index:999;";
navbarBrandElement.parentNode.insertAdjacentElement('beforeend', purchasesElement);
$('#purchasesButton').on('click', function () {
EventBridge.emitWebEvent(JSON.stringify({
type: "PURCHASES",
referrerURL: window.location.href
referrerURL: window.location.href,
hasUpdates: messagesWaiting
}));
});
}

View file

@ -445,6 +445,12 @@ var selectionDisplay = null; // for gridTool.js to ignore
} else if (parsedJsonMessage.type === "PURCHASES") {
referrerURL = parsedJsonMessage.referrerURL;
filterText = "";
if (parsedJsonMessage.hasUpdates) {
wireEventBridge(true);
tablet.sendToQml({
method: 'showUpdates'
});
}
tablet.pushOntoStack(MARKETPLACE_PURCHASES_QML_PATH);
} else if (parsedJsonMessage.type === "LOGIN") {
openLoginWindow();