diff --git a/README b/README index 169be64..a979e29 100644 --- a/README +++ b/README @@ -4,11 +4,10 @@ integrates Asana into your web experience in the following ways: * Creates a button in your button-bar which, when clicked, pops up a QuickAdd window to create a new task associated with the current web page. - It will populate the task name with the page title by default, and - put the URL in the notes, along with any text you may have selected - when you pressed the button. + You can click a button to populate the task name with the page title and + the URL and current selected text in the notes. - * Installs the special Asana TAB+Q keyboard shortcut. When this key combo + * Installs the special Asana ALT+A keyboard shortcut. When this key combo is pressed from any web page, it brings up the same popup. This functionality will operate on any window opened after the extension is loaded. diff --git a/api_bridge.js b/api_bridge.js index 38b2286..a9b6843 100644 --- a/api_bridge.js +++ b/api_bridge.js @@ -1,14 +1,13 @@ /** * Functionality to communicate with the Asana API. This should get loaded * in the "server" portion of the chrome extension because it will make - * HTTP requests and needs cross-domain priveleges. + * HTTP requests and needs cross-domain privileges. * * The bridge does not need to use an auth token to connect to - * the API, because since it is a browser extension it can access - * the user's cookies, and can use them to authenticate to the API. - * This capability is specific to browser extensions, and other - * types of applications would have to obtain an auth token to communicate - * with the API. + * the API. Since it is a browser extension it can access the user's cookies + * and can use them to authenticate to the API. This capability is specific + * to browser extensions, and other types of applications would have to obtain + * an auth token to communicate with the API. */ Asana.ApiBridge = { @@ -17,6 +16,26 @@ Asana.ApiBridge = { */ API_VERSION: "1.0", + /** + * @type {Integer} How long an entry stays in the cache. + */ + CACHE_TTL_MS: 15 * 60 * 1000, + + /** + * @type {Boolean} Set to true on the server (background page), which will + * actually make the API requests. Clients will just talk to the API + * through the ExtensionServer. + * + */ + is_server: false, + + /** + * @type {dict} Map from API path to cache entry for recent GET requests. + * date {Date} When cache entry was last refreshed + * response {*} Cached request. + */ + _cache: {}, + /** * @param opt_options {dict} Options to use; if unspecified will be loaded. * @return {String} The base URL to use for API requests. @@ -37,9 +56,64 @@ Asana.ApiBridge = { * data {dict} Object representing response of API call, depends on * method. Only available if response was a 200. * error {String?} Error message, if there was a problem. + * @param options {dict?} + * miss_cache {Boolean} Do not check cache before requesting */ - request: function(http_method, path, params, callback) { - var url = this.baseApiUrl() + path; + request: function(http_method, path, params, callback, options) { + var me = this; + http_method = http_method.toUpperCase(); + + // If we're not the server page, send a message to it to make the + // API request. + if (!me.is_server) { + console.info("Client API Request", http_method, path, params); + chrome.runtime.sendMessage({ + type: "api", + method: http_method, + path: path, + params: params, + options: options || {} + }, callback); + return; + } + + console.info("Server API Request", http_method, path, params); + + // Serve from cache first. + if (!options.miss_cache && http_method === "GET") { + var data = me._readCache(path, new Date()); + if (data) { + console.log("Serving request from cache", path); + callback(data); + return; + } + } + + // Be polite to Asana API and tell them who we are. + var manifest = chrome.runtime.getManifest(); + var client_name = [ + "chrome-extension", + chrome.i18n.getMessage("@@extension_id"), + manifest.version, + manifest.name + ].join(":"); + + var url = me.baseApiUrl() + path; + var body_data; + if (http_method === "PUT" || http_method === "POST") { + // POST/PUT request, put params in body + body_data = { + data: params, + options: { client_name: client_name } + }; + } else { + // GET/DELETE request, add params as URL parameters. + var url_params = Asana.update({ opt_client_name: client_name }, params); + url += "?" + $.param(url_params); + } + + console.log("Making request to API", http_method, url); + chrome.cookies.get({ url: url, name: 'ticket' @@ -63,6 +137,9 @@ Asana.ApiBridge = { }, accept: "application/json", success: function(data, status, xhr) { + if (http_method === "GET") { + me._writeCache(path, data, new Date()); + } callback(data); }, error: function(xhr, status, error) { @@ -80,7 +157,7 @@ Asana.ApiBridge = { } callback(response); } else { - callback({ error: error || status }); + callback({ errors: [{message: error || status }]}); } }, xhrFields: { @@ -88,12 +165,27 @@ Asana.ApiBridge = { } }; if (http_method === "POST" || http_method === "PUT") { - attrs.data = JSON.stringify({data: params}); + attrs.data = JSON.stringify(body_data); attrs.dataType = "json"; attrs.processData = false; attrs.contentType = "application/json"; } $.ajax(attrs); }); + }, + + _readCache: function(path, date) { + var entry = this._cache[path]; + if (entry && entry.date >= date - this.CACHE_TTL_MS) { + return entry.response; + } + return null; + }, + + _writeCache: function(path, response, date) { + this._cache[path] = { + response: response, + date: date + }; } }; diff --git a/asana.js b/asana.js index 719d6b7..a4d1d41 100644 --- a/asana.js +++ b/asana.js @@ -1,4 +1,68 @@ /** * Define the top-level Asana namespace. */ -Asana = {}; \ No newline at end of file +Asana = { + + // When popping up a window, the size given is for the content. + // When resizing the same window, the size must include the chrome. Sigh. + CHROME_TITLEBAR_HEIGHT: 24, + // Natural dimensions of popup window. The Chrome popup window adds 10px + // bottom padding, so we must add that as well when considering how tall + // our popup window should be. + POPUP_UI_HEIGHT: 310 + 10, + POPUP_UI_WIDTH: 410, + // Size of popup when expanded to include assignee list. + POPUP_EXPANDED_UI_HEIGHT: 310 + 10 + 129, + + // If the modifier key is TAB, amount of time user has from pressing it + // until they can press Q and still get the popup to show up. + QUICK_ADD_WINDOW_MS: 5000 + + +}; + +/** + * Things borrowed from asana library. + */ + + +Asana.update = function(to, from) { + for (var k in from) { + to[k] = from[k]; + } + return to; +}; + +Asana.Node = { + + /** + * Ensures that the bottom of the element is visible. If it is not then it + * will be scrolled up enough to be visible. + * + * Note: this does not take account of the size of the window. That's ok for + * now because the scrolling element is not the top-level element. + */ + ensureBottomVisible: function(node) { + var el = $(node); + var pos = el.position(); + var element_from_point = document.elementFromPoint( + pos.left, pos.top + el.height()); + if (element_from_point === null || + $(element_from_point).closest(node).size() === 0) { + node.scrollIntoView(/*alignWithTop=*/ false); + } + } + +}; + +if (!RegExp.escape) { + // Taken from http://simonwillison.net/2006/Jan/20/escape/ + RegExp.escape = function(text, opt_do_not_escape_spaces) { + if (opt_do_not_escape_spaces !== true) { + return text.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&"); // nolint + } else { + // only difference is lack of escaping \s + return text.replace(/[-[\]{}()*+?.,\\^$|#]/g, "\\$&"); // nolint + } + }; +} diff --git a/background.html b/background.html deleted file mode 100644 index ea54961..0000000 --- a/background.html +++ /dev/null @@ -1,13 +0,0 @@ - -
- - - - - - - \ No newline at end of file diff --git a/background.js b/background.js new file mode 100644 index 0000000..fb62544 --- /dev/null +++ b/background.js @@ -0,0 +1,26 @@ +Asana.ExtensionServer.listen(); +Asana.ServerModel.startPrimingCache(); + +// Modify referer header sent to typekit, to allow it to serve to us. +// See http://stackoverflow.com/questions/12631853/google-chrome-extensions-with-typekit-fonts +chrome.webRequest.onBeforeSendHeaders.addListener(function(details) { + var requestHeaders = details.requestHeaders; + for (var i = 0; i < requestHeaders.length; ++i) { + if (requestHeaders[i].name.toLowerCase() === 'referer') { + // The request was certainly not initiated by a Chrome extension... + return; + } + } + // Set Referer + requestHeaders.push({ + name: 'referer', + // Host must match the domain in our Typekit kit settings + value: 'https://abkfopjdddhbjkiamjhkmogkcfedcnml' + }); + return { + requestHeaders: requestHeaders + }; +}, { + urls: ['*://use.typekit.net/*'], + types: ['stylesheet', 'script'] +}, ['requestHeaders','blocking']); diff --git a/click_commandeer.js b/click_commandeer.js new file mode 100644 index 0000000..8961675 --- /dev/null +++ b/click_commandeer.js @@ -0,0 +1,16 @@ +document.onclick = clickHandler; + +function clickHandler(e){ + if (!e) e = window.event; + + var closestAnchor = $(e.target).closest("A"); + if (closestAnchor.length === 1){ + var link_url = closestAnchor.prop("href"); + if (link_url.indexOf("https://app.asana.com") === 0) { + console.log("Asana chrome extension intercepting link ctrl-click") + var fragment = link_url.substr("https://app.asana.com".length) + chrome.runtime.sendMessage({fragment: fragment}); + e.preventDefault(); + } + } +} diff --git a/extension_server.js b/extension_server.js index eaeb190..5d74ce3 100644 --- a/extension_server.js +++ b/extension_server.js @@ -9,22 +9,19 @@ Asana.ExtensionServer = { * requests from page clients, which can't make cross-domain requests. */ listen: function() { - var self = this; - chrome.extension.onRequest.addListener(function(request, sender, sendResponse) { + var me = this; + + // Mark our Api Bridge as the server side (the one that actually makes + // API requests to Asana vs. just forwarding them to the server window). + Asana.ApiBridge.is_server = true; + + chrome.runtime.onMessage.addListener(function(request, sender, sendResponse) { if (request.type === "api") { // Request to the API. Pass it on to the bridge. - Asana.ApiBridge.api( - request.method, request.path, request.data || {}, sendResponse); - - } else if (request.type === "quick_add") { - // QuickAdd request, made from a content window. - // Open up a new popup, and set the request information on its window - // (see popup.html for how it's used) - var popup = window.open( - chrome.extension.getURL('popup.html') + '?external=true', - "asana_quick_add", - "dependent=1,resizable=0,location=0,menubar=0,status=0,toolbar=0,width=410,height=310"); - popup.quick_add_request = request; + Asana.ApiBridge.request( + request.method, request.path, request.params, sendResponse, + request.options || {}); + return true; // will call sendResponse asynchronously } }); } diff --git a/icon128.png b/icon128.png index f08c0e3..acef4ef 100644 Binary files a/icon128.png and b/icon128.png differ diff --git a/icon16.png b/icon16.png new file mode 100644 index 0000000..50d7b38 Binary files /dev/null and b/icon16.png differ diff --git a/icon48.png b/icon48.png new file mode 100644 index 0000000..2274029 Binary files /dev/null and b/icon48.png differ diff --git a/load_typekit.js b/load_typekit.js new file mode 100644 index 0000000..2681b36 --- /dev/null +++ b/load_typekit.js @@ -0,0 +1,74 @@ +/** + * Loads the appropriate typekit resource for fonts in the popup. + */ + +(function() { + + // From luna_page.js + var ISO3316_LANGUAGE_CODES_FOR_NON_LATIN1 = [ + 'cs', // Czech + // The only German character that seems to not be in our font is 0159 + // (see http://alt-codes.org/list/german/) and it seems close enough to + // not warrant loading a heavier font so commenting out. +// 'de', // German + + 'hu', // Hungarian + 'pl', // Polish + 'ro', // Romanian + 'hr', // Croatian + 'sk', // Slovak + 'sl', // Slovene + 'eo', // Esperanto + 'gl', // Galician + 'mt', // Maltese + 'tr', // Turkish + 'et', // Estonian + 'lv', // Latvian + 'lt', // Lithuanian + 'iu', 'ik', 'kl', // Eskimo + 'se', // "Northern" Sami + +// Cyrillic - seems like this shouldn't be an issue (see comment below) +// but we've gotten specific reports + + 'bg', // Bulgarian + 'be', // Byelorussian aka Belarisuian, + 'mk', // Macedonian + 'ru', // Russian + 'sr', // Serbian + 'uk' // Ukrainian + +// Commented out languages with no Latin characters since +// other languages only look bad when they mix Latin characters +// from our font with extended characters from the system font. + +// 'el', // Greek + + // Skipping Arabic since RTL + // Skipping Hebrew since RTL + // Couldn't find Lappish in http://en.wikipedia.org/wiki/List_of_ISO_639-1_codes + // Couldn't find Nordic + // Couldn't find Inuit + ]; + + // If the page could be in a language which is not covered by our latin1 + // font, then load the (larger) full font. + chrome.i18n.getAcceptLanguages(function(language_list) { + var languages = language_list.join(","); + var non_latin1 = ISO3316_LANGUAGE_CODES_FOR_NON_LATIN1.filter(function(code) { + return languages.indexOf(code) !== -1; + }); + Asana.TYPEKIT_ID = non_latin1.length > 0 ? "hra6rda" : "sli4yxq"; + console.info("Accepting languages: " + languages + " using typekit " + + Asana.TYPEKIT_ID); + + var head = document.getElementsByTagName('head')[0]; + var script = document.createElement('script'); + script.type = 'text/javascript'; + script.src = 'https://use.typekit.net/' + Asana.TYPEKIT_ID + '.js'; + script.onload = function() { + try{Typekit.load();}catch(e){} + }; + head.appendChild(script); + }); +})(); diff --git a/manifest.json b/manifest.json index e67fc44..d9cae26 100644 --- a/manifest.json +++ b/manifest.json @@ -1,12 +1,23 @@ { "manifest_version": 2, "name": "Asana Extension for Chrome", - "version": "0.9.1", - "description": "Integrates Asana with your browsing experience.", + "version": "1.1.0", + "description": "Quickly add tasks to Asana from any web page.", "icons": { - "128": "icon128.png" + "128": "icon128.png", + "48": "icon48.png", + "16": "icon16.png" }, - "minimum_chrome_version": "16", + "minimum_chrome_version": "25", + + "content_scripts": [ + { + "matches": ["| Default Workspace: | -
- Loading...
- |
-
| - | - The default workspace where new tasks are added. You can always select - a different workspace when you're creating a task. - | -
| Asana Host: |
diff --git a/options.js b/options.js
index 3ad9b54..e2f10c7 100644
--- a/options.js
+++ b/options.js
@@ -23,6 +23,14 @@ Asana.Options = {
return 'https://' + options.asana_host_port + '/';
},
+ /**
+ * @param opt_options {dict} Options to use; if unspecified will be loaded.
+ * @return {String} The URL for the signup page.
+ */
+ signupUrl: function(opt_options) {
+ return 'http://asana.com/?utm_source=chrome&utm_medium=ext&utm_campaign=ext';
+ },
+
/**
* @return {dict} Default options.
*/
diff --git a/options_style.css b/options_style.css
deleted file mode 100644
index fe382ed..0000000
--- a/options_style.css
+++ /dev/null
@@ -1,53 +0,0 @@
-/* Styles for options.html */
-body {
- padding: 0;
- margin: 0;
- background-color: #DDE4EA;
-}
-body, td, div {
- font-size: 13px;
-}
-
-#layout {
- width: 100%;
-}
-#options {
- width: 600px;
- min-width: 600px;
- max-width: 600px;
-}
-
-#status {
- height: 30px;
-}
-
-.v-spacer {
- height: 100px;
-}
-.form {
- border: 0;
- margin: 0;
- padding: 0;
-}
-td.field-name {
- width: 150px;
- padding: 2px 2px 2px 0;
- vertical-align: top;
-}
-td.field-value {
- padding: 2px 0 2px 2px;
- vertical-align: top;
-}
-td.field-notes {
- font-size: 11px;
- margin-top: 12px;
- padding: 2px 0 2px 2px;
- vertical-align: top;
-}
-td.field-spacer {
- height: 12px;
-}
-
-#reset_button {
- margin-left: 10px;
-}
\ No newline at end of file
diff --git a/popup.css b/popup.css
new file mode 100644
index 0000000..8fb2d96
--- /dev/null
+++ b/popup.css
@@ -0,0 +1,499 @@
+/* Styles for popup.html */
+
+/* Common widgets, from Asana app */
+
+.close-x {
+ display: block;
+ cursor: pointer;
+ width: 16px;
+ height: 16px;
+ margin: 8px 0px 0px -4px;
+ background-position: -175px 0px;
+}
+.close-x:hover {
+ background-position: -175px -25px;
+}
+
+.dropdown-arrow {
+ background-position: -150px 0px;
+ width: 16px;
+ height: 16px;
+ margin: 5px auto;
+}
+
+.dropdown-arrow:hover, #workspace_select:hover ~ .button .dropdown-arrow {
+ background-position: -150px -25px;
+}
+
+.dropdown-arrow:hover, #workspace_select:focus ~ .button .dropdown-arrow {
+ background-position: -150px -25px;
+}
+
+.button {
+ border-radius: 3px 3px 3px 3px;
+ -webkit-border-radius: 3px 3px 3px 3px;
+ box-shadow: inset 0px -1px rgba(0,0,0,0.12);
+ -webkit-box-shadow: inset 0px -1px rgba(0,0,0,0.12);
+ display:inline-block;
+ padding: 4px 10px 5px;
+ font-size: 14px;
+ font-weight: 600;
+ white-space: nowrap;
+ cursor: pointer;
+ text-align: center;
+}
+.button .button-text {
+ display: inline-block;
+}
+
+.default-button {
+ color: #596573;
+ text-shadow: 0px 1px white;
+ border: 1px solid #C0CCD7;
+ background-color: #F2F2F2;
+ background-image: -webkit-gradient(linear,left top,left bottom,from(white), color-stop(10%, #F2F2F2));
+}
+.default-button:hover {
+ background-color: #F2F2F2;
+ background-image: -webkit-gradient(linear,left top,left bottom,from(white), color-stop(100%, #CED7E0));
+ border: 1px solid #C0CCD7;
+}
+.default-button:hover .button-text {
+ color: #596573;
+ text-shadow: 0px 1px white;
+}
+.default-button:focus {
+ box-shadow: 0px 0px 6px 3px rgba(31,141,214,0.3);
+ -webkit-box-shadow: 0px 0px 6px 3px rgba(31,141,214,0.3);
+ outline: none;
+}
+
+.primary-button {
+ color: white;
+ text-shadow: 0px -1px #114D97;
+ border: 1px solid #114D97;
+ background-color: #1F8DD6;
+ background-image: -webkit-gradient(linear,left top,left bottom,from(#74C1ED), color-stop(10%, #1F8DD6));
+}
+.primary-button:hover {
+ background-color: #1F8DD6;
+ background-image: -webkit-gradient(linear,left top,left bottom,from(#74C1ED), color-stop(100%, #1F8DD6));
+ border: 1px solid #114D97;
+}
+.primary-button:hover .button-text {
+ color: white;
+ text-shadow: 0px -1px #114D97;
+}
+.primary-button:focus {
+ box-shadow: 0px 0px 6px 3px rgba(31,141,214,0.3);
+ -webkit-box-shadow: 0px 0px 6px 3px rgba(31,141,214,0.3);
+ outline: none;
+}
+
+.primary-button.disabled, .primary-button.disabled:hover {
+ background: #F2F2F2;
+ border-color: #CCCCCC;
+ outline: none;
+ box-shadow: none;
+ -webkit-box-shadow: none;
+}
+.primary-button.disabled .button-text, .primary-button.disabled:hover .button-text {
+ color: #999999;
+ text-shadow: none;
+}
+
+.big-button {
+ padding: 10px 20px;
+ border-radius: 6px;
+}
+
+.big-button .button-text {
+ font-size: 18px;
+}
+
+a:link, a:visited {
+ color: #1F8DD6;
+ text-decoration: none;
+}
+a:hover {
+ text-decoration: underline;
+}
+
+::-webkit-scrollbar{
+ width: 14px;
+}
+::-webkit-scrollbar-thumb {
+ background: rgba(0,0,0,.05);
+ box-shadow: inset 0px -1px rgba(0,0,0,.12);
+}
+
+::-webkit-scrollbar-thumb:hover {
+ background: rgba(0,0,0, .08);
+}
+
+::-webkit-scrollbar-track {
+ background-color: rgba(0,0,0, .05);
+}
+
+textarea::-webkit-scrollbar {
+ width: 7px;
+ background: #E5F1FF;
+}
+textarea::-webkit-scrollbar-thumb {
+ background: rgba(116, 193, 237, 0.3);
+}
+textarea::-webkit-scrollbar-thumb:hover {
+ background: rgba(116, 193, 237, 0.5);
+}
+
+
+/* Popup-specific layout */
+
+body {
+ overflow: hidden;
+ /* Also affects Asana.POPUP_UI_WIDTH and Asana.POPUP_UI_HEIGHT */
+ width: 410px;
+ height: 310px; /* keep this correct for the window-based (non-button) version */
+ padding: 0px;
+ margin: 0px;
+ background-color: #fff;
+ font-size: 14px;
+ font-family: proxima-nova, "Helvetica Neue", Arial, sans-serif;
+}
+
+a, input, textarea {
+ outline: none;
+}
+
+.sprite {
+ background-image: url('./sprite.png');
+ background-repeat: no-repeat;
+ display: inline-block;
+}
+
+@media only screen and (-webkit-min-device-pixel-ratio: 2) {
+ .sprite {
+ background-image: url('./sprite-retina.png');
+ background-size: 250px 75px;
+ }
+}
+
+.left-column {
+ display: inline-block;
+ margin-left: 12px;
+ width: 24px;
+ height: 24px;
+ vertical-align: middle;
+}
+.middle-column {
+ display: inline-block;
+ width: 304px;
+ padding: 0 8px 0 8px;
+ vertical-align: middle;
+}
+.right-column {
+ display: inline-block;
+ margin-right: 8px;
+ margin-left: 4px;
+ width: 32px;
+ height: 32px;
+ vertical-align: middle;
+ text-align: center;
+}
+
+.left-column .sprite {
+ margin-top: 3px;
+ height: 18px;
+ width: 24px;
+}
+
+/* Popup areas */
+
+.banner {
+ font-size: 19px;
+ font-weight: 600;
+ background-color:#f2f2f2;
+ color: #596573;
+ text-shadow: 0px 1px #fff;
+ border-bottom: 1px solid #c0ccd7;
+ -webkit-border-radius: 1px 1px 0px 0px;
+ background: -webkit-gradient(linear, left top, left bottom, from(white), color-stop(100%, #edf1f4));
+}
+
+.notes-row .left-column, .notes-row .middle-column, .notes-row .right-column,
+.assignee-row .left-column, .assignee-row .middle-column, .assignee-row .right-column {
+ vertical-align: top;
+}
+
+.banner .middle-column {
+ line-height: 46px;
+ padding-top: 2px;
+}
+
+.banner .button {
+ height: 26px;
+ width: 26px;
+ border: 1px solid #c0ccd7;
+ box-shadow: 0px 1px 0px 0px white;
+ padding: 0;
+}
+
+#workspace_select:hover ~ .button {
+ border: 1px solid #afbcc8;
+ background: -webkit-gradient(linear, left top, left bottom, from(white), color-stop(100%, #dde4ea));
+}
+
+#workspace_select:focus ~ .button {
+ border: 1px solid #74C1ED;
+ box-shadow: 0px 0px 5px 1px rgba(31, 141, 214, 0.3);
+}
+
+.banner-add {
+ position: relative;
+}
+
+.banner-add #workspace {
+ font-weight: 200;
+}
+
+.icon-checkbox {
+ background-position: -25px 0px;
+}
+
+.sprite.icon-notes {
+ margin-top: 5px;
+ background-position: -50px 0px;
+}
+
+.sprite.icon-assignee {
+ margin-top: 6px;
+ background-position: -75px 0px;
+}
+
+#workspace_select_container {
+ display: inline-block;
+ vertical-align: middle;
+ line-height: 100%;
+}
+
+#workspace_select {
+ opacity: 0;
+ position: absolute;
+ right: 0px;
+ top: -4px;
+ padding: 8px 0px;
+ -webkit-appearance: none;
+ margin: 0;
+}
+
+.name-row {
+ padding-top: 11px;
+ padding-bottom: 12px;
+}
+
+.name-row .left-column .sprite { margin-top: 2px; }
+
+#name_input, #notes_input, #assignee, #assignee_input {
+ width: 100%;
+}
+
+.name-row #name_input {
+ font-size: 20px;
+}
+
+.notes-row {
+ border-bottom: 1px solid #e5e5e5;
+ padding-bottom: 4px;
+}
+
+.assignee-row {
+ padding-top: 8px;
+}
+
+.notes-row #notes_input {
+ resize: none;
+ height: 96px;
+}
+
+#use_page_details {
+ width: 20px;
+ height: 20px;
+ position: relative;
+ border: 1px solid transparent;
+ border-radius: 3px;
+ padding: 5px 2px 3px 6px;
+ cursor: pointer;
+}
+
+#use_page_details:not(.disabled):hover {
+ border: 1px solid #e5e5e5;
+}
+
+#use_page_details.disabled {
+ opacity: .25;
+ cursor: default;
+}
+
+#use_page_details:not(.disabled):hover .icon-use-link-arrow {
+ background-position: -225px -25px;
+}
+
+.icon-use-link {
+ height: 16px;
+ width: 16px;
+ background-size: 16px 16px;
+}
+
+.icon-use-link.no-favicon {
+ height: 18px;
+ width: 18px;
+ background-position: -200px 0px;
+ background-size: auto auto;
+}
+
+#use_page_details:not(.disabled):hover .icon-use-link.no-favicon {
+ background-position: -200px -25px;
+}
+
+.icon-use-link-arrow {
+ height: 18px;
+ width: 18px;
+ background-position: -225px 0px;
+ position: absolute;
+ top: 7px;
+ left: 3px;
+}
+
+#assignee {
+ font-weight: 600;
+}
+
+#assignee .user-photo-frame {
+ margin: -5px 7px -5px 0px;
+}
+
+#assignee .unassigned {
+ color: #a9a9a9;
+ font-weight: normal;
+}
+
+.user {
+ line-height: 34px;
+ font-size: 12px;
+ font-weight: 600;
+ padding-left: 54px;
+ cursor: pointer;
+}
+
+.user.selected {
+ background-color: #1F8DD6;
+ color: white;
+}
+
+.user-photo-frame {
+ height: 27px;
+ width: 27px;
+ display: inline-block;
+ vertical-align: middle;
+ margin-right: 7px;
+}
+.user-photo {
+ height: 27px;
+ width: 27px;
+ background-size: 27px 27px;
+ background-repeat: no-repeat;
+ border-radius: 2px;
+}
+.user-name {
+ display: inline-block;
+ overflow: hidden;
+ text-overflow: ellipsis;
+}
+
+#assignee_list_container {
+ /* Also affects Asana.POPUP_EXPANDED_UI_HEIGHT */
+ height: 121px;
+ overflow-x: hidden;
+ overflow-y: scroll;
+ border-bottom: 1px solid #e5e5e5;
+ margin-top: 8px;
+}
+
+.footer {
+ padding: 14px 0px;
+}
+
+
+#success, #error {
+ width: 175px;
+ display: inline-block;
+ vertical-align: middle;
+ margin-left: 15px;
+ font-size: 12px;
+ line-height: 17px;
+ white-space: nowrap;
+ overflow: hidden;
+ text-overflow: ellipsis;
+}
+
+#success a, #error a {
+ font-weight: 600;
+ text-decoration: none;
+ color: #5998c0;
+}
+
+#login_view {
+ width: 100%;
+ height: 100%;
+ background-color: #edf1f4;
+}
+
+#login_view .content {
+ padding-top: 65px;
+ width: 250px;
+ margin: 0 auto;
+ text-align: center;
+ font-size: 19px;
+ font-weight: 400;
+ color: #596573;
+}
+
+#login_view .button {
+ margin-top: 24px;
+}
+
+#login_view #signup_button {
+ margin-right: 8px;
+}
+
+.icon-success, .icon-error {
+ width: 16px;
+ height: 16px;
+ display: inline-block;
+ vertical-align: top;
+ margin-right: 3px;
+}
+
+.icon-success { background-position: -100px 0px; }
+.icon-error { background-position: -125px 0px; margin-right: 7px; }
+
+input, textarea, #assignee {
+ color: #212F40;
+ padding: 6px 5px;
+ border: 1px solid transparent;
+ -webkit-border-radius: 3px;
+ font-size: 14px;
+ font-family: proxima-nova, "Helvetica Neue", Arial, sans-serif;
+ color: #212F40;
+ margin: 0;
+}
+
+input:hover, textarea:hover, #assignee:hover {
+ border: 1px solid #cccccc;
+ -webkit-box-shadow: inset 0px 1px 1px rgba(0,0,0,0.1);
+}
+
+input:focus, textarea:focus {
+ border: 1px solid #74C1ED;
+ box-shadow: 0px 0px 5px 1px rgba(31, 141, 214, 0.3);
+}
\ No newline at end of file
diff --git a/popup.html b/popup.html
index 5d3aecf..1c77a10 100644
--- a/popup.html
+++ b/popup.html
@@ -1,3 +1,10 @@
+
+
+
@@ -6,74 +13,109 @@
-
-
+
+
+ |