Merge branch 'master' into opt

This commit is contained in:
IndrekV
2015-08-10 16:14:40 +03:00
14 changed files with 252 additions and 25 deletions

13
CHANGES
View File

@@ -1,3 +1,16 @@
[0.6.10]
- Fixed Teamweek issues
[0.6.9]
- Added support for Breeze
- Added support for BamBam
- Added support for Wrike
- Added support for Bugzilla
- Added support for GQueue
- Fixed issues with Taiga.io ui
- Fixed issues with Teamweek ui
- Show running entry description in running popup item tooltip
- Fixed project name issue in github
- Added Worksection .net and .eu domains
[0.6.8]
- Fixed Google Calendar description issue
- Fixed http and https url support

View File

@@ -42,7 +42,12 @@ Add Toggl one-click time tracking to popular web tools.
- [Sprintly][38]
- [Google Calendar][39]
- [TestRail][40]
- [Bugzilla][41]
- [Breeze][42]
- [BamBam][43]
- [GQueue][44]
- [Wrike][45]
## Installing from the Web Store
https://chrome.google.com/webstore/detail/toggl-button/oejgccbfbmkkpaidnkphaiaecficdnfn
@@ -64,7 +69,8 @@ List of all the changes and added features can be found at http://toggl.github.i
[Trello][8], [Worksection][9], [Redbooth][10], [Podio][11], [Basecamp][12], [JIRA][13], [Producteev][14],
[Bitbucket][15], [Stifer][16], [Google Docs][17], [Redmine][18], [YouTrack][19], [CapsuleCRM][20],
[Xero][21], [Zendesk][22], [Any.do][23], [Todoist][24], [Trac][25], [Wunderlist][26], [Toodledo][27],
[Teamwork.com][28], [Google Mail][29], [Taiga][30], [HabitRPG][31], [Axosoft][32], [Countersoft Gemini][33], [Drupal][34], [Esa][35], [Help Scout][36], [Flow][37], [Sprintly][38], [Google Calendar][39], [TestRail][40] account and start your Toggl timer there.
[Teamwork.com][28], [Google Mail][29], [Taiga][30], [HabitRPG][31], [Axosoft][32], [Countersoft Gemini][33], [Drupal][34], [Esa][35], [Help Scout][36], [Flow][37], [Sprintly][38], [Google Calendar][39], [TestRail][40], [Bugzilla][41], [Breeze][42], [BamBam][43], [GQueue][44], [Wrike][45] account and start your Toggl timer there.
3. To stop the current running timer:
- press the button again
- start another time entry inside your account.
@@ -118,6 +124,12 @@ Don't know how to start? Just check out the [user requested services][97] that h
[38]: https://sprint.ly
[39]: https://www.google.com/calendar
[40]: https://testrail.com
[41]: https://bugzilla.mozilla.org/
[42]: http://www.breeze.pm/
[43]: https://www.dobambam.com/
[44]: https://www.gqueues.com/
[45]: https://www.wrike.com/
[97]: https://github.com/toggl/toggl-button/wiki/User-requested-buttons
[98]: https://github.com/toggl/toggl-button/wiki/Adding-custom-domains
[99]: https://github.com/toggl/toggl-button/pulls

View File

@@ -1,7 +1,7 @@
{
"name": "Toggl Button",
"short_name": "Toggl Button",
"version": "0.6.8",
"version": "0.6.10",
"manifest_version": 2,
"description": "Add Official Toggl Online Timer to Popular Web Tools",
"background": {
@@ -34,6 +34,8 @@
"*://*.redbooth.com/*",
"*://*.trello.com/*",
"*://*.worksection.com/*",
"*://*.worksection.eu/*",
"*://*.worksection.net/*",
"*://*.basecamp.com/*",
"*://*.basecamphq.com/*",
"*://*.atlassian.net/*",
@@ -56,7 +58,7 @@
"*://*.wunderlist.com/*",
"*://*.teamwork.com/*",
"*://*.teamworkpm.net/*",
"*://*.habitrpg.com/*",
"*://*.habitica.com/*",
"*://*.taiga.io/*",
"*://*.axosoft.com/*",
"*://*.ongemini.com/*",
@@ -65,7 +67,12 @@
"*://secure.helpscout.net/*",
"*://*.getflow.com/*",
"*://sprint.ly/*",
"*://www.google.com/calendar/*"
"*://*.wrike.com/*",
"*://www.google.com/calendar/*",
"*://bugzilla.mozilla.org/*",
"*://*.dobambam.com/*",
"*://app.breeze.pm/*",
"*://www.gqueues.com/*"
],
"icons": {
"16": "images/icon-16.png",
@@ -89,6 +96,8 @@
"*://*.redbooth.com/*",
"*://*.trello.com/*",
"*://*.worksection.com/*",
"*://*.worksection.eu/*",
"*://*.worksection.net/*",
"*://*.basecamp.com/*",
"*://*.basecamphq.com/*",
"*://*.atlassian.net/*",
@@ -113,7 +122,7 @@
"*://*.teamwork.com/*",
"*://*.teamworkpm.net/*",
"*://mail.google.com/*",
"*://*.habitrpg.com/*",
"*://*.habitica.com/*",
"*://*.taiga.io/*",
"*://*.axosoft.com/*",
"*://*.ongemini.com/*",
@@ -122,7 +131,12 @@
"*://secure.helpscout.net/*",
"*://*.getflow.com/*",
"*://sprint.ly/*",
"*://www.google.com/calendar/*"
"*://*.wrike.com/*",
"*://www.google.com/calendar/*",
"*://bugzilla.mozilla.org/*",
"*://*.dobambam.com/*",
"*://app.breeze.pm/*",
"*://www.gqueues.com/*"
],
"css": ["styles/style.css"],
"js": ["scripts/common.js"]
@@ -185,7 +199,11 @@
"js": ["scripts/content/trello.js"]
},
{
"matches": ["*://*.worksection.com/*"],
"matches": [
"*://*.worksection.com/*",
"*://*.worksection.eu/*",
"*://*.worksection.net/*"
],
"js": ["scripts/content/worksection.js"]
},
{
@@ -265,7 +283,7 @@
"js": ["scripts/content/google-mail.js"]
},
{
"matches": ["*://*.habitrpg.com/*"],
"matches": ["*://*.habitica.com/*"],
"js": ["scripts/content/habitrpg.js"]
},
{
@@ -293,16 +311,36 @@
"js": ["scripts/content/helpscout.js"]
},
{
"matches": ["*://*.getflow.com/*"],
"js": ["scripts/content/getflow.js"]
},
"matches": ["*://*.getflow.com/*"],
"js": ["scripts/content/getflow.js"]
},
{
"matches": ["*://sprint.ly/*"],
"js": ["scripts/content/sprintly.js"]
},
{
"matches": ["*://*.wrike.com/*"],
"js": ["scripts/content/wrike.js"]
},
{
"matches": ["*://www.google.com/calendar/*"],
"js": ["scripts/content/google-calendar.js"]
},
{
"matches": ["*://bugzilla.mozilla.org/*"],
"js": ["scripts/content/bugzilla.js"]
},
{
"matches": ["*://*.dobambam.com/*"],
"js": ["scripts/content/dobambam.js"]
},
{
"matches": ["*://app.breeze.pm/*"],
"js": ["scripts/content/breeze.js"]
},
{
"matches": ["*://www.gqueues.com/*"],
"js": ["scripts/content/gqueues.js"]
}
]
}

View File

@@ -175,7 +175,6 @@ var togglbutton = {
editForm,
togglButtonDescription;
elemRect = togglbutton.element.getBoundingClientRect();
editForm = $("#toggl-button-edit-form");
position = togglbutton.topPosition(elemRect, editFormWidth, editFormHeight);

View File

@@ -0,0 +1,24 @@
/*jslint indent: 2 */
/*global $: false, document: false, togglbutton: false*/
'use strict';
togglbutton.render('.card_box:not(.toggl), .card-content:not(.toggl)', {observe: true}, function (elem) {
var link, description, project;
project = $('.project_name_card');
link = togglbutton.createTimerLink({
className: 'breeze',
description: function () {
description = $('.card_name', elem);
if (!description) {
description = $('.card-name', elem);
}
return description && description.textContent.trim();
},
projectName: project && project.textContent.trim()
});
link.setAttribute('data-action', 'start-time-entry');
$('.timer, .time-tracker', elem).appendChild(link);
});

View File

@@ -0,0 +1,18 @@
/*jslint indent: 2, unparam: true*/
/*global $: false, document: false, togglbutton: false*/
'use strict';
togglbutton.render('input[name=id]', {}, function (elem) {
var link,
description = elem.value;
link = togglbutton.createTimerLink({
className: 'bugzilla',
description: description,
projectName: 'Bugs'
});
if ($('#summary_alias_container') !== undefined) {
$('#summary_alias_container').appendChild(link);
}
});

View File

@@ -0,0 +1,24 @@
/*jslint indent: 2 */
/*global $: false, document: false, togglbutton: false*/
'use strict';
togglbutton.render('.taskScroll:not(.toggl)', {observe: true}, function (elem) {
var link, description, project;
description = $('.jQ_taskTitleEl a', elem);
if (!description) {
description = $('.jQ_taskTitleEl', elem);
}
project = $('.txt-gry .jhtmlTicketsTicketViewItem .jQ_trigger', elem);
link = togglbutton.createTimerLink({
className: 'dobambam',
description: description && description.textContent.trim(),
projectName: project && project.textContent.trim()
});
if ($('section.jQ_taskHeader')) {
$('section.jQ_taskHeader').appendChild(link);
}
});

View File

@@ -6,7 +6,7 @@ togglbutton.render('#partial-discussion-header:not(.toggl)', {observe: true}, fu
var link, description,
numElem = $('.gh-header-number', elem),
titleElem = $('.js-issue-title', elem),
projectElem = $('.js-current-repository');
projectElem = $('.entry-title strong a');
description = titleElem.innerText;
if (numElem !== null) {

View File

@@ -0,0 +1,27 @@
/*jslint indent: 2 */
/*global $: false, document: false, togglbutton: false, createTag: false*/
'use strict';
function insertAfter(newNode, referenceNode) {
referenceNode.parentNode.insertBefore(newNode, referenceNode.nextSibling);
}
togglbutton.render('#gqItemList .gq-item-row:not(.toggl)', {observe: true}, function (elem) {
var link,
container = createTag('div', 'taskItem-toggl'),
titleElem = $('.gq-i-description', elem),
projectContainer = $('.gq-queue-container.selected .gq-queue-name');
if (titleElem) {
link = togglbutton.createTimerLink({
className: 'gqueues',
buttonType: 'minimal',
description: titleElem.innerText,
projectName: projectContainer.innerText
});
container.appendChild(link);
container.style.paddingTop = "5px"; // move button 5px down
insertAfter(container, titleElem);
}
});

View File

@@ -6,16 +6,21 @@
/* User story details button */
togglbutton.render('.us-detail:not(.toggl)', {observe: true}, function (elem) {
var link,
refElem = $('.us-number', elem),
titleElem = $('.view-subject', elem),
projectElem = $('.project-name', elem),
refElem,
titleElem,
container = $('.us-title-text');
link = togglbutton.createTimerLink({
className: 'taiga',
buttonType: 'minimal',
description: refElem.textContent + ' ' + titleElem.textContent,
projectName: projectElem.textContent
description: function () {
refElem = $('.us-number', elem);
titleElem = $('.view-subject', elem);
return refElem.textContent + ' ' + titleElem.textContent;
},
projectName: function () {
return $('.project-name', elem).textContent;
}
});
container.insertBefore(link, $('.us-number', elem));

View File

@@ -6,7 +6,7 @@
togglbutton.render('.timeline-task-popup:not(.toggl)', {observe: true}, function (element) {
var link,
titleElement = $('[data-hook=input-name]', element),
projectNameElement = $('[data-hook=select-project]', element),
projectNameElement = element,
container = $('[data-hook=row-actions]', element);
if (titleElement === null || container === null) {
@@ -20,8 +20,8 @@ togglbutton.render('.timeline-task-popup:not(.toggl)', {observe: true}, function
return titleElement.value;
},
projectName: function () {
var projectSelectedElem = $('option:checked', projectNameElement);
return projectSelectedElem.value ? projectSelectedElem.text : null;
var projectSelectedElem = $('[data-hook=input-project]', projectNameElement);
return projectSelectedElem.value || null;
}
});

View File

@@ -0,0 +1,17 @@
/*jslint indent: 2 */
/*global $: false, document: false, togglbutton: false*/
'use strict';
togglbutton.render('.wspace-task-view:not(.toggl)', {observe: true}, function () {
var link,
titleElem = function () {
return $('title').innerText.replace(' - Wrike', '');
};
link = togglbutton.createTimerLink({
className: 'wrike',
description: titleElem
});
$('.wspace-task-settings-bar').appendChild(link);
});

View File

@@ -43,6 +43,7 @@ var PopUp = {
showCurrentDuration: function (startTimer) {
if (TogglButton.$curEntry === null) {
PopUp.$togglButton.setAttribute('data-event', 'timeEntry');
PopUp.$togglButton.setAttribute('title', '');
PopUp.$togglButton.textContent = 'Start timer';
clearInterval(PopUp.$timer);
PopUp.$timer = null;
@@ -54,6 +55,7 @@ var PopUp = {
PopUp.$togglButton.textContent = 'Stop timer [' + duration + ']';
if (startTimer) {
PopUp.$timer = setInterval(function () { PopUp.showCurrentDuration(); }, 1000);
PopUp.$togglButton.setAttribute('title', TogglButton.$curEntry.description);
}
},

File diff suppressed because one or more lines are too long