Skip to content

Commit 2bc90bb

Browse files
author
Alex Olson
committed
Merge PR #66 from @alexkolson.
2 parents c8806c2 + 79e603c commit 2bc90bb

14 files changed

+304
-3
lines changed

index.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"/>
77
<link rel="stylesheet" href="style/jquery.mobile-1.4.0.css" />
88
<link rel="stylesheet" href="style/jquery.mobile.icons-1.4.0.min.css" />
9+
<link rel="stylesheet" href="style/tooltipster.css" />
910
<link rel="stylesheet" href="style/app.css" />
1011
<script data-main="js/app" src="js/vendor/require.js"></script>
1112
</head>

js/app.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ require.config({
55
"jquery": "vendor/jquery-1.11.0.min",
66
"jquerymobile": "vendor/jquery.mobile-1.4.0.min",
77
"jquerymobileconfig": "vendor/jquery.mobile.config",
8+
"tooltipster": "vendor/jquery.tooltipster.min",
89
"cloudos": "vendor/CloudOS",
910
"cloudosconfig": "vendor/CloudOS.config",
1011
"underscore": "vendor/underscore-min",
@@ -22,6 +23,7 @@ require.config({
2223
},
2324
"jquerymobileconfig": ["jquery"],
2425
"jquerymobile": ["jquery", "jquerymobileconfig"],
26+
"tooltipster": ["jquery"],
2527
"cloudosconfig": ["jquery"],
2628
"cloudos": {
2729
deps: ["jquery", "cloudosconfig"],

js/fuse.js

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -240,6 +240,16 @@ define(["backbone", "jquery", "underscore", "vendor/google.maps", "text!template
240240
});
241241
},
242242

243+
initTooltips: function() {
244+
// this is somewhat of a hack until I can finish a stable
245+
// patch of the tooltipster() plugin which allows
246+
// for adding tooltipster functionality to dynamically-added
247+
// elements.
248+
$(document).on("mouseenter", "[title]", function() {
249+
$(this).tooltipster();
250+
});
251+
},
252+
243253
preventGhostTaps: function() {
244254
$(document).on("tap", function(e) {
245255
if (e.handled) {
@@ -256,6 +266,8 @@ define(["backbone", "jquery", "underscore", "vendor/google.maps", "text!template
256266
this.initMenu();
257267
// add reusable map container to page.
258268
this.initMap();
269+
// inialize tooltip plugin.
270+
this.initTooltips();
259271
// prevent ghost taps.
260272
this.preventGhostTaps();
261273
// tell Backbone to start listening for hashchanges.

js/main.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
require(["fuse", "cloudos", "jquery", "routers/app.router", "routers/vehicles.router", "jquerymobile"], function(Fuse, CloudOS, $, AppRouter, VehiclesRouter) {
1+
require(["fuse", "cloudos", "jquery", "routers/app.router", "routers/vehicles.router", "jquerymobile", "tooltipster"], function(Fuse, CloudOS, $, AppRouter, VehiclesRouter) {
22
// setup the routers
33
Fuse.routers = {};
44
Fuse.routers.AppRouter = new AppRouter();

js/templates/footerTmpl.html

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1-
<div class="fuse-footer" data-role="footer" data-position="fixed">
2-
<h1>Icons coming soon...</h1>
1+
<div class="fuse-footer ui-grid-b ui-bar" data-role="footer" data-position="fixed">
2+
<div class="fuse-footer-container ui-grid-b center-text">
3+
<a class="tooltip ui-block-a" data-action="trips"><img src="style/images/trip_small.png" title="view your trips"></a>
4+
<a class="tooltip ui-block-b" data-action="find-car"><img src="style/images/findcar_small.png" title="find your car"></a>
5+
<a class="tooltip ui-block-c" data-action="maintenance"><img src="style/images/maintenance_small.png" title="check maintenance schedule"></a>
6+
</div>
37
</div>

js/vendor/jquery.tooltipster.min.js

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

style/app.css

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
11
.center-text {
22
text-align: center;
3+
}
4+
5+
.fuse-footer {
6+
padding: 10px;
7+
}
8+
.fuse-footer img {
9+
vertical-align: middle;
310
}
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)