Permalink
Browse files

Internationalizing

  • Loading branch information...
1 parent 99058b7 commit 377a8e682d3e01dd5faf80afd624f3ca0df737b3 @gaerae committed Jul 4, 2016
View
@@ -1,24 +1,22 @@
# JIRA Subtask Sortable
-[![Chrome Web Store](https://img.shields.io/badge/Chrome%20Web%20Store-v0.1-orange.svg)](https://chrome.google.com/webstore/detail/hcidkmckdnbkbjghgcgeikdoljdhlimb)
+[![Chrome Web Store](https://img.shields.io/badge/Chrome%20Web%20Store-v0.2-orange.svg)](https://chrome.google.com/webstore/detail/hcidkmckdnbkbjghgcgeikdoljdhlimb)
+
+지라 서브 테스크를 드래그&드롭으로 정렬 순서를 변경할 수 있습니다.
"JIRA Subtask Sortable" is a subtle enhancement for JIRA Subtasks. This allows you to move them by dragging and dropping, rather than using the annoying little arrows. After you've dragged the subtask to the desired location, its location will be transparently saved so no reloading is required.
-JIRA icon resource from [Amadeze](http://plainicon.com/download-icon/51474/jira)
+* Download for [Google Chrome Extension](https://chrome.google.com/webstore/detail/hcidkmckdnbkbjghgcgeikdoljdhlimb)
## Features
* drag and drop for subtask
## License
-This chrome extension is released under the *MIT* license.
-
-Please see [LICENSE](LICENSE) for more information.
+* This chrome extension is released under the *MIT* license. Please see [LICENSE](LICENSE) for more information.
+* JIRA icon resource from [Amadeze](http://plainicon.com/download-icon/51474/jira)
## Support
For support please create an issue here at GitHub
## Pull Requests
Feel free to submit any Pull Requests here.
Please indent using two spaces only, have a newline at the EOF and use UNIX line ending, thanks!
-
-
-
@@ -0,0 +1,10 @@
+{
+ "appName": {
+ "message": "JIRA Subtask Sortable",
+ "description": "The title of the application, displayed in the web store."
+ },
+ "appDesc": {
+ "message": "Drag and drop to reorder subtasks.",
+ "description": "The description of the application, displayed in the web store."
+ }
+}
@@ -0,0 +1,8 @@
+{
+ "appName": {
+ "message": "JIRA Subtask Sortable(지라 드래그&드롭)"
+ },
+ "appDesc": {
+ "message": "지라 서브 테스크를 드래그&드롭으로 정렬 순서를 변경할 수 있습니다."
+ }
+}
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
View
@@ -0,0 +1,65 @@
+(function () {
+ "use strict";
+ var app;
+ app = {
+ oldTableRows: {},
+ newTableRows: {},
+ /**
+ * @description Getting the table row id
+ */
+ getTableRows: function() {
+ var tempTableRows = [];
+ $('#issuetable>tbody').children('tr').each(function(idx, elm) {
+ if (elm.id) tempTableRows.push(elm.id);
+ });
+ return tempTableRows;
+ },
+ /**
+ * @description Attach events
+ */
+ delegate: function() {
+ // Drang and drop
+ $('#issuetable>tbody>tr').css('cursor', '-webkit-grab');
+ $('#issuetable>tbody').sortable({
+ placeholder: 'ui-state-highlight',
+ opacity: 0.65,
+ start: function() {
+ app.oldTableRows = app.getTableRows();
+ },
+ stop: function(event, ui) {
+ app.newTableRows = app.getTableRows();
+ for (var i = 0; i <= app.newTableRows.length; i++) {
+ if (ui.item[0].id == app.oldTableRows[i]) var oldRowId = i;
+ if (ui.item[0].id == app.newTableRows[i]) var newRowId = i;
+ }
+
+ // Reorder for current page
+ var tempNumber = 1;
+ $('#issuetable>tbody').children('tr').each(function(idx, elm) {
+ var withTick = $(elm).find('td.stsequence>div');
+ var withOutTick = $(elm).find('td.stsequence');
+
+ // Checking icon
+ if ($(withTick).length > 0){
+ $(withTick).text(tempNumber+'.');
+ } else {
+ $(withOutTick).text(tempNumber+'.');
+ }
+ tempNumber++;
+ });
+
+ // Reorder for database
+ $.get('/secure/MoveIssueLink.jspa?id='+$('#key-val').attr('rel')+'&currentSubTaskSequence='+oldRowId+'&subTaskSequence='+newRowId);
+ }
+ });
+ $('#issuetable>tbody').disableSelection();
+ },
+ /**
+ * @description Initialize background page
+ */
+ init: function() {
+ app.delegate();
+ }
+ }
+ app.init();
+}());
File renamed without changes.
File renamed without changes.
@@ -1,18 +1,16 @@
{
"manifest_version": 2,
- "name": "JIRA Subtask Sortable",
- "name": "JIRA Subtask Sortable",
- "short_name": "JIRA Subtask DnD",
- "description": "Drag and drop to reorder subtasks.",
- "version": "0.1",
-
+ "default_locale": "en",
+ "name": "__MSG_appName__",
+ "description": "__MSG_appDesc__",
+ "version": "0.2",
"browser_action": {
"default_icon": "images/icon32.png"
},
- "permissions": [ "tabs", "http://*/browse/*", "https://*/browse/*" ],
+ "permissions": ["tabs", "http://*/browse/*", "https://*/browse/*"],
"content_scripts": [ {
- "js": [ "js/jquery-3.0.0.min.js", "js/jquery-ui.min.js", "js/jira-subtask-sortable.js" ],
- "matches": [ "http://*/browse/*", "https://*/browse/*" ]
+ "js": ["js/jquery-3.0.0.min.js", "js/jquery-ui.min.js", "js/content.js"],
+ "matches": ["http://*/browse/*", "https://*/browse/*"]
} ],
"icons": {
"16": "images/icon16.png",
@@ -1,47 +0,0 @@
-$.noConflict();
-jQuery(document).ready(function($) {
- // Getting the table row id
- function getTableRows(){
- tableRows = [];
- $('#issuetable>tbody').children('tr').each(function(idx,elm) {
- if (elm.id) tableRows.push(elm.id);
- });
- return tableRows;
- }
-
- // Drang and drop
- $('#issuetable>tbody>tr').css('cursor', '-webkit-grab');
- $('#issuetable>tbody').sortable({
- placeholder: 'ui-state-highlight',
- opacity: 0.65,
- start: function() {
- oldTableRows = getTableRows();
- },
- stop: function(event, ui) {
- newTableRows = getTableRows();
- for (i = 0; i <= newTableRows.length; i++) {
- if (ui.item[0].id == oldTableRows[i]) oldRowId = i;
- if (ui.item[0].id == newTableRows[i]) newRowId = i;
- }
-
- // Reorder for current page
- tempNumber = 1;
- $('#issuetable>tbody').children('tr').each(function(idx, elm) {
- withTick = $(elm).find('td.stsequence>div');
- withOutTick = $(elm).find('td.stsequence');
-
- // Checking icon
- if ($(withTick).length > 0){
- $(withTick).text(tempNumber+'.');
- } else {
- $(withOutTick).text(tempNumber+'.');
- }
- tempNumber++;
- });
-
- // Reorder for database
- $.get('/secure/MoveIssueLink.jspa?id='+$('#key-val').attr('rel')+'&currentSubTaskSequence='+oldRowId+'&subTaskSequence='+newRowId);
- }
- });
- $('#issuetable>tbody').disableSelection();
-});
File renamed without changes
File renamed without changes.

0 comments on commit 377a8e6

Please sign in to comment.