Skip to content

Commit

Permalink
Changed supporter popover behavior
Browse files Browse the repository at this point in the history
  • Loading branch information
a85 committed Oct 3, 2013
1 parent 3996697 commit 538a9db
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 6 deletions.
4 changes: 4 additions & 0 deletions chrome/css/styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -1523,6 +1523,10 @@ input[type="file"] {
padding-bottom: 5px;
}

.supporter a:hover {
background: white !important;
}

.supporter:first {
border-bottom: none;
}
Expand Down
31 changes: 26 additions & 5 deletions chrome/js/modules/layout.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,17 +63,38 @@ pm.layout = {
});
});

var supportContent = "<div class='supporter clearfix'><div class='supporter-image'><img src='img/supporters/mashape.png'/></div>";
supportContent += "<div class='supporter-tag'>Consume or provide cloud services with the Mashape API Platform & Marketplace.</div>";
supportContent += "</div>";
var supportContent = "<div class='supporters'><div class='supporter clearfix'>";
supportContent += "<div class='supporter-image'>";
supportContent += "<a href='http://www.getpostman.com/r?url=https://www.mashape.com/?utm_source=chrome%26utm_medium=app%26utm_campaign=postman'>";
supportContent += "<img src='img/supporters/mashape.png'/></a></div>";
supportContent += "<div class='supporter-tag'>Consume or provide cloud services with the Mashape API Platform.</div></div>";
supportContent += "<div class='supporter clearfix'>";
supportContent += "<div class='supporter-image'>";
supportContent += "<a href='http://www.getpostman.com/r?url=https://www.runscope.com/t/postman'>";
supportContent += "<img src='img/supporters/runscope.png'/></a></div>";
supportContent += "<div class='supporter-tag'>Everything is going to be 200 OK.</div>";
supportContent += "</div></div>";

$('#donate').popover({
animation: true,
animation: false,
content: supportContent,
placement: "top",
trigger: "hover",
trigger: "manual",
html: true,
title: "Postman is supported by some amazing companies"
}).on("mouseenter", function () {
var _this = this;
$(this).popover("show");
$(this).siblings(".popover").on("mouseleave", function () {
$(_this).popover('hide');
});
}).on("mouseleave", function () {
var _this = this;
setTimeout(function () {
if (!$(".popover:hover").length) {
$(_this).popover("hide")
}
}, 100);
});

$('#response-body-toggle').on("click", function () {
Expand Down
2 changes: 1 addition & 1 deletion chrome/manifest.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name":"__MSG_name__",
"version":"0.8.4",
"version":"0.8.4.1",
"icons":{
"16":"icon_16.png",
"32":"icon_32.png",
Expand Down

0 comments on commit 538a9db

Please sign in to comment.