Commit 37592717 authored by Irina Ivanova's avatar Irina Ivanova

v2.0

parent 8a4d6a46
File added
File added
......@@ -9,12 +9,15 @@ img {
float: left;
margin: 10px
}
ul {
padding-left: 100px;
margin-left: 100px
}
h1 {
color: #205081;
padding-left: 100px
}
p {
color: gray;
padding-left: 50px
}
table {
......
......@@ -8,7 +8,8 @@ body {
}
input {
font-size: 14px;
color: #000000
color: #000000;
margin-left: 20px
}
#error {
font-size: 14px;
......@@ -16,11 +17,6 @@ input {
padding-bottom: 10px;
text-align: center
}
#info {
float: right;
color: white;
font-size: 10px
}
.description {
text-align: right;
font-size: 11px;
......
File added
......@@ -21,14 +21,9 @@ Tartu, Estonia -->
<br/>
</div>
<div id='keyInput'>
<label for='key'>Key:&nbsp;</label>
<input type='text' name='key' id='key' maxlength='100' size='22' autofocus />
<p class='description'>Insert issue key</p>
<p class='description'>Spaces and Skype formatting will be trimmed</p>
<p class='description'>JIRA issue will be opened in new tab</p>
</div>
<div id='info'>
<p>iriiiina@gmail.com v1.2</p>
<input type='text' name='key' id='key' maxlength='100' size='22' placeholder='JIRA issue key' autofocus />
<br />
<br />
</div>
</body>
......
File added
function setErrorText(errorText) {
'use strict';
var divError = document.getElementById('error');
divError.innerText = errorText + '\n';
}
function colorBorderToRed(element) {
'use strict';
var border = document.getElementById(element);
border.style.borderColor = '#FF6666';
border.focus();
......@@ -15,8 +11,6 @@ function colorBorderToRed(element) {
}
function returnError(errorText, element) {
'use strict';
setErrorText(errorText);
colorBorderToRed(element);
throw '';
......@@ -26,8 +20,6 @@ var key,
url;
function setUrl(urlOption) {
'use strict';
if (urlOption !== undefined) {
if (urlOption.charAt(urlOption.length - 1) === '/') {
url = urlOption + 'browse/';
......@@ -38,8 +30,6 @@ function setUrl(urlOption) {
}
function removeSpaces(string) {
'use strict';
while (string.charAt(string.length - 1) === ' ') {
string = string.slice(0, string.length - 1);
}
......@@ -53,8 +43,6 @@ function removeSpaces(string) {
}
function removeSkypeFormatting(string) {
'use strict';
if (string.charAt(0) === '[') {
var temp = string.split(' ');
string = temp[temp.length - 1];
......@@ -65,14 +53,10 @@ function removeSkypeFormatting(string) {
function openWindow() {
'use strict';
window.open(url + key);
}
function openIssue() {
'use strict';
chrome.storage.sync.get(function (item) {
var urlOption = item.savedUrl;
......@@ -95,16 +79,12 @@ function openIssue() {
var enter = 13;
function inputKeyListener(e) {
'use strict';
if (e.keyCode === enter) {
openIssue();
}
}
function listenInputKey(inputKey) {
'use strict';
if (inputKey.addEventListener) {
inputKey.addEventListener('keydown', inputKeyListener, false);
} else if (inputKey.attachEvent) {
......@@ -113,8 +93,6 @@ function listenInputKey(inputKey) {
}
function listenKeys() {
'use strict';
listenInputKey(document.getElementById('key'));
}
......
......@@ -27,7 +27,7 @@ function save_options() {
function restore_options() {
chrome.storage.sync.get({
savedUrl: 'http://jira.atlassian.com'
savedUrl: 'https://jira.atlassian.com'
}, function (items) {
document.getElementById('urlOption').value = items.savedUrl;
document.getElementById('urlOption').select();
......@@ -42,16 +42,12 @@ document.getElementById('save').addEventListener('click',
var enter = 13;
function inputURLListener(e) {
'use strict';
if (e.keyCode === enter) {
save_options();
}
}
function listenInputURL(inputURL) {
'use strict';
if (inputURL.addEventListener) {
inputURL.addEventListener('keydown', inputURLListener, false);
} else if (inputURL.attachEvent) {
......@@ -60,8 +56,6 @@ function listenInputURL(inputURL) {
}
function listenURL() {
'use strict';
listenInputURL(document.getElementById('urlOption'));
}
......
{
"name": "JIRA Issue Opener",
"short_name": "JIRA Issue Opener",
"version": "1.2",
"version": "2.0",
"manifest_version": 2,
"description": "Extension opens JIRA issue in new tab",
"homepage_url": "http://ivanova-irina.blogspot.com/p/jira-issue-opener.html",
......
......@@ -2,18 +2,21 @@
<html>
<head>
<title>Options of JIRA Issue Opener</title>
<title>Options of JIRA Issue Opener 2.0</title>
<link rel='stylesheet' type='text/css' href='css/options.css' />
</head>
<body>
<img src='icons/big.jpg' width='130' alt='Fisheye icon' />
<h1>Options of JIRA Issue Opener</h1>
<p>Extension opens JIRA issue in new tab</p>
<p id='contacts'>Read more on <a href='http://ivanova-irina.blogspot.com/p/jira-issue-opener.html' target='_blank'>JIRA Issue Opener page</a>
<br />
<a href='mailto:iriiiina@gmail.com'>iriiiina@gmail.com</a>
<h1>Options of JIRA Issue Opener 2.0</h1>
<p>Extension opens JIRA issue in new tab. User needs only to insert issue key.</p>
<ul>
<li>KEY is case insensitive</li>
<li>All spaces in the beginning and in the end will be trimmed</li>
<li>Skype formatting will be trimmed: <code>[16.09.2014 13:34:34] Irina Ivanova: KEY-776</code> will be recognized as <code>KEY-776</code></li>
</ul>
<p id='contacts'>Read more on <a href='http://ivanova-irina.blogspot.com/p/jira-issue-opener.html' target='_blank'>JIRA Issue Opener page</a> or write to <a href='mailto:iriiiina@gmail.com'>iriiiina@gmail.com</a>
</p>
<br />
<br />
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment