Skip to content

Commit

Permalink
tab
Browse files Browse the repository at this point in the history
  • Loading branch information
aeroxy committed Apr 8, 2013
1 parent 9bf28df commit 4d15315
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 11 deletions.
2 changes: 1 addition & 1 deletion www/css/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ footer {
}

.bubble {
color: #fff;
color: #000;
font-family: 'Avenir', 'MS Trebuchet', sans-serif;
font-size: 16px;
}
6 changes: 4 additions & 2 deletions www/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,11 @@
<div id="map-canvas"></div>
<footer>
<div>
<label>Change Your User Name To:</label>
<input type="text" id="userName" value="Anonymous User">
<button id="change-username">Confirm</button>
</div>
<div>
<textarea id="status-update">Update Your Status Here</textarea>
<button id="update">Update</button>
</div>
</footer>
</body>
Expand Down
16 changes: 8 additions & 8 deletions www/js/script.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,23 +39,23 @@ $(document).ready(function() {
strokeColor: "4c8f2a",
fontFamily: "Avenir",
});
var changeUserName = document.getElementById('change-username');
google.maps.event.addDomListener(changeUserName, 'click', function() {
mapUserName.set('text', document.getElementById('userName').value);
});

var infoBubble = new InfoBubble({
content: '<div><p>:/ I haven\'t had weekends seem when?!</p></div>',
position: gLatLng,
maxWidth: 300,
backgroundColor: 'rgba(57,57,57,0.8)',
backgroundColor: 'rgba(255,255,255,0.8)',
backgroundClassName: 'bubble',
hideCloseButton: true,
borderRadius: 6,
shadowStyle: 0,
});

infoBubble.open(map);
var status = $("#status-update").val();

$("#update").click(function(){
mapUserName.set('text', $("#userName").val());
infoBubble.addTab($("#userName").val() + ':', status);
infoBubble.open(map);
});

}, function(error) {
alert('Error occurred. Error code: ' + error.code);
Expand Down

0 comments on commit 4d15315

Please sign in to comment.