Skip to content

Commit 260994a

Browse files
committed
Created a screenshot, updated readme, converted popover arrow into text.
1 parent fde3696 commit 260994a

File tree

6 files changed

+75
-46
lines changed

6 files changed

+75
-46
lines changed

README.md

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -131,16 +131,11 @@ $(selector).optionsPopover([methods] or [config]);
131131
* [jQuery]
132132
133133
### Contact Us
134-
**Twitter:** [@_kellyje]
135-
134+
* **Twitter:** [@_kellyje]
135+
* **Email:** [email protected]
136136
137137
## License
138138
Licensed under the MIT License.
139139
140140
[jQuery]: http://jquery.com
141-
[@_kellyje]: http://twitter.com/_kellyje
142-
143-
144-
145-
146-
141+
[@kellyje_]: http://twitter.com/kellyje_

example/screenshot.png

5.2 KB
Loading

popover.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -479,7 +479,7 @@ Popover.prototype.createPopover = function () {
479479
popoverWrapperDiv.attr("id", "popoverWrapper");
480480

481481
var s = "<div id='popover'>" +
482-
"<div id='popoverArrow'></div>" +
482+
"<div id='popoverArrow'></div>" +
483483
"<div id='currentPopoverAction' style='display: none;'></div>" +
484484
"<div id='popoverContentWrapper'>" +
485485
"<div id='popoverContent'></div>" +
@@ -682,7 +682,7 @@ Popover.prototype.insertHeader = function (){
682682
if(this.isBackEnabled){
683683
//console.log("LOG: Creating back button.");
684684
var thisPopover = this;
685-
$("#popoverHeader").prepend("<a id='popoverBack'><span id='popoverBackIcon'></span></a>");
685+
$("#popoverHeader").prepend("<a id='popoverBack'><span id='popoverBackIcon'></span></a>");
686686
$("#popoverBack").on("click", function () {
687687
thisPopover.previousPopover();
688688
});

popover.less

Lines changed: 52 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@
1414
@red: #d06268;
1515

1616
@popoverHeaderHeight: 45px;
17-
@popoverCarrotHeight: 14px;
18-
@popoverCarrotWidth: 28px;
17+
@popoverCarrotHeight: 18px;
18+
@popoverCarrotWidth: 18px;
1919

2020
@hoverOpacity: .5;
2121

@@ -40,7 +40,7 @@ html{
4040
}
4141

4242
#popoverWrapper {
43-
font-family: verdana, sans-serif;
43+
font-family: "Helvetica Neue", Helvetica, sans-serif;
4444
position: fixed;
4545
height: 100%;
4646
width: 305px;
@@ -64,7 +64,6 @@ html{
6464
visibility: visible !important;
6565
z-index: 10;
6666
-webkit-transform: translateZ(0);
67-
border-top: 1px solid @darkGrey;
6867

6968
a {
7069
color: @charcoal;
@@ -87,6 +86,8 @@ html{
8786
border-left: 1px solid @darkGrey;
8887
height: 49px;
8988
pointer-events: auto;
89+
border-top: 1px solid @darkGrey;
90+
.roundedCornersTop;
9091
}
9192

9293
#popoverArrow {
@@ -98,10 +99,14 @@ html{
9899
left: 50%;
99100
z-index: 2;
100101

101-
height: @popoverCarrotHeight;
102+
height: @popoverCarrotHeight - 4;
102103
width: @popoverCarrotWidth;
103104

104-
background: url('popupSprite1.png') no-repeat 0px 0px;
105+
font-size: 18px;
106+
color: #fff;
107+
-webkit-transform: scale(2, 1);
108+
text-shadow: 0 -2px #ccc;
109+
//background: url('popupSprite1.png') no-repeat 0px 0px;
105110
}
106111

107112
.flipArrow{
@@ -117,40 +122,28 @@ html{
117122
}
118123
}
119124

120-
#popoverClose{
125+
#popoverClose, #popoverBack{
121126
position: absolute;
122127
cursor: pointer;
123-
top: 0;
124-
right: 0;
128+
height: 49px;
125129
line-height: 49px;
126130
}
127131

128-
#popoverCloseIcon{
129-
color: #555;
132+
#popoverCloseIcon, #popoverBackIcon{
130133
display: inline-block;
131-
//height: 22px;
132-
//width: 21px;
134+
color: #555;
133135
margin: -2px 10px;
134-
font-size: 26px;
136+
font-size: 22px;
135137
font-weight: 800;
136-
//background: url('popupSprite1.png') no-repeat -5px -89px;
137138
}
138139

139-
#popoverBack {
140-
position: absolute;
141-
cursor: pointer;
142-
line-height: 49px;
140+
#popoverClose {
141+
top: 0;
142+
right: 0;
143143
}
144144

145145
#popoverBackIcon {
146-
color: #555;
147-
display: inline-block;
148-
//height: 22px;
149-
//width: 22px;
150-
//margin: 13px;
151-
margin: -7px 10px;
152-
font-size: 50px;
153-
//background: url('popupSprite1.png') no-repeat -9px -116px;
146+
-webkit-transform: scale(.75,1);
154147
}
155148

156149
#popoverBackIcon:hover, #popoverCloseIcon:hover{
@@ -177,7 +170,36 @@ html{
177170
.borderBox;
178171
}
179172

173+
.roundedCornersTop{
174+
-webkit-border-top-left-radius: 5px;
175+
-moz-border-top-left-radius: 5px;
176+
-ms-border-top-left-radius: 5px;
177+
-o-border-top-left-radius: 5px;
178+
border-top-left-radius: 5px;
179+
180+
-webkit-border-top-right-radius: 5px;
181+
-moz-border-top-right-radius: 5px;
182+
-ms-border-top-right-radius: 5px;
183+
-o-border-top-right-radius: 5px;
184+
border-top-right-radius: 5px;
185+
}
186+
187+
.roundedCornersBot{
188+
-webkit-border-bottom-left-radius: 5px;
189+
-moz-border-bottom-left-radius: 5px;
190+
-ms-border-bottom-left-radius: 5px;
191+
-o-border-bottom-left-radius: 5px;
192+
border-bottom-left-radius: 5px;
193+
194+
-webkit-border-bottom-right-radius: 5px;
195+
-moz-border-bottom-right-radius: 5px;
196+
-ms-border-bottom-right-radius: 5px;
197+
-o-border-bottom-right-radius: 5px;
198+
border-bottom-right-radius: 5px;
199+
}
200+
180201
#popoverContent {
202+
border-top: 1px solid @darkGrey;
181203
visibility: visible;
182204
position: relative;
183205
overflow: auto;
@@ -187,9 +209,12 @@ html{
187209
text-align: left;
188210
font-size: 1em;
189211
background: @white;
212+
box-shadow: 0px 12px 15px -6px #888;
190213
border-right: 1px solid @darkGrey;
191214
border-left: 1px solid @darkGrey;
192215
border-bottom: 1px solid @darkGrey;
216+
.roundedCornersBot;
217+
.roundedCornersTop;
193218
.borderBox;
194219
.last {
195220
border-bottom: none;

test/test.html

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -33,18 +33,18 @@
3333
background: #fff;
3434
}
3535

36-
#popover{
37-
font-size: .925em;
36+
#popoverHeader{
37+
font-size: 1em !important;
38+
}
39+
40+
#popoverContent{
41+
font-size: .875em !important;
3842
}
3943

4044
p{
4145
padding: 0;
4246
margin: 0;
4347
}
44-
45-
#popoverContent{
46-
text-align: center !important;
47-
}
4848
</style>
4949
</head>
5050
<body>

test/test.js

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,19 @@ var removeButton = function(id){
1919
addButton();
2020
var button1 = addButton();
2121

22-
var popover = $("#"+button1.id).popover({
22+
var popover = $("#"+button1.id).optionsPopover({
2323
id: "button1",
24-
title: "Popup Demo",
25-
contents: "<p>testing</p>",
24+
title: "Popover Demo",
25+
contents: [
26+
{
27+
name: "Github",
28+
id: "github"
29+
},
30+
{
31+
name: "Logout",
32+
id: "logout"
33+
}
34+
],
2635
disableHeader: true,
2736
disableBackButton: false
2837
});

0 commit comments

Comments
 (0)