Skip to content

Commit

Permalink
Added styling to the panel
Browse files Browse the repository at this point in the history
  • Loading branch information
Roy van de Water committed Apr 9, 2011
1 parent c98f4a9 commit 3be8700
Show file tree
Hide file tree
Showing 9 changed files with 79 additions and 26 deletions.
1 change: 1 addition & 0 deletions .gitignore
@@ -1,2 +1,3 @@
*.swp
*.xpi
*.backup*
5 changes: 2 additions & 3 deletions data/app.js
@@ -1,9 +1,8 @@
$("#form").submit(function(e){
e.preventDefault();
postMessage($("#text").val());
postMessage($("#search").val());
});

onMessage = function onMessage(message) {
console.log("hi");
$('#text').focus();
$('#search').focus();
}
11 changes: 0 additions & 11 deletions data/foo.html

This file was deleted.

17 changes: 17 additions & 0 deletions data/panel.html
@@ -0,0 +1,17 @@
<!doctype HTML>
<html>
<head>
<title>My nifty title</title>
<link rel="stylesheet" type="text/css" href="reset.css" />
<link rel="stylesheet" type="text/css" href="style.css" />
</head>
<body>
<h4>Navigate - Invoice</h4>
<form id="form">
<div id="input">
<input id="search" type="text"/>
</div>
<input type="submit" value="Go"/>
</form>
</body>
</html>
48 changes: 48 additions & 0 deletions data/reset.css
@@ -0,0 +1,48 @@
/* http://meyerweb.com/eric/tools/css/reset/
v2.0 | 20110126
License: none (public domain)
*/

html, body, div, span, applet, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, big, cite, code,
del, dfn, em, img, ins, kbd, q, s, samp,
small, strike, strong, sub, sup, tt, var,
b, u, i, center,
dl, dt, dd, ol, ul, li,
fieldset, form, label, legend,
table, caption, tbody, tfoot, thead, tr, th, td,
article, aside, canvas, details, embed,
figure, figcaption, footer, header, hgroup,
menu, nav, output, ruby, section, summary,
time, mark, audio, video {
margin: 0;
padding: 0;
border: 0;
font-size: 100%;
font: inherit;
vertical-align: baseline;
}
/* HTML5 display-role reset for older browsers */
article, aside, details, figcaption, figure,
footer, header, hgroup, menu, nav, section {
display: block;
}
body {
line-height: 1;
}
ol, ul {
list-style: none;
}
blockquote, q {
quotes: none;
}
blockquote:before, blockquote:after,
q:before, q:after {
content: '';
content: none;
}
table {
border-collapse: collapse;
border-spacing: 0;
}
5 changes: 5 additions & 0 deletions data/style.css
@@ -0,0 +1,5 @@
body { font-family: Helvetica, Arial, sans-serif; }
h4 { margin-top: 5px; margin-bottom: 5px; text-align: center; font-weight: bold; font-size: 1.1em; }

div#input { margin-left: auto; margin-right: auto; text-align: center;}
input[type=submit]{ display: none; }
4 changes: 3 additions & 1 deletion lib/main.js
Expand Up @@ -4,7 +4,9 @@ const data = require("self").data;
const { Hotkey } = require("hotkeys");

var panel = require("panel").Panel({
contentURL: data.url("foo.html"),
width: 220,
height: 60,
contentURL: data.url("panel.html"),
contentScriptFile: [data.url("jquery-1.5.2.min.js"), data.url("app.js")],
contentScriptWhen: "ready",
onMessage: function(message) {
Expand Down
6 changes: 3 additions & 3 deletions package.json
@@ -1,9 +1,9 @@
{
"name": "navigator",
"description": "Helps navigate around liberty sweet",
"license": "OpenBSD",
"author": "Drew LeSueur & Roy van de Water",
"version": "0.1",
"fullName": "Navigator Extreme",
"id": "jid0-BF1lVk5B7QFldPwFAdaMFhTnhlE",
"description": "Helps navigate around liberty sweet"
"id": "jid0-4eEHkt1WrUj2mytzpxTByQi06zw",
"name": "navigator"
}
8 changes: 0 additions & 8 deletions package.json.backup

This file was deleted.

0 comments on commit 3be8700

Please sign in to comment.