Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
pm-tools
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Packages
Packages
Container Registry
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Yaroslav Lushnikov
pm-tools
Commits
e72767db
Commit
e72767db
authored
Jul 21, 2018
by
Yaroslav Lushnikov
🦆
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add a workflow feature
parent
acdf94c5
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
66 additions
and
3 deletions
+66
-3
manifest.json
extension/manifest.json
+3
-2
adyax_issue.js
extension/scripts/pm/adyax_issue.js
+1
-1
workflow.js
extension/scripts/pm/workflow.js
+62
-0
No files found.
extension/manifest.json
View file @
e72767db
{
{
"manifest_version"
:
2
,
"manifest_version"
:
2
,
"name"
:
"i20 tools"
,
"name"
:
"i20 tools"
,
"version"
:
"0.0.
1
"
,
"version"
:
"0.0.
2
"
,
"icons"
:
{
"icons"
:
{
"16"
:
"images/logo.png"
,
"16"
:
"images/logo.png"
,
"32"
:
"images/logo.png"
,
"32"
:
"images/logo.png"
,
...
@@ -20,7 +20,8 @@
...
@@ -20,7 +20,8 @@
"scripts/pm/branch.js"
,
"scripts/pm/branch.js"
,
"scripts/pm/commit_message.js"
,
"scripts/pm/commit_message.js"
,
"scripts/pm/prepare_assigment.js"
,
"scripts/pm/prepare_assigment.js"
,
"scripts/pm/adyax_issue.js"
"scripts/pm/adyax_issue.js"
,
"scripts/pm/workflow.js"
]
]
},
},
{
{
...
...
extension/scripts/pm/adyax_issue.js
View file @
e72767db
(
function
(
$
)
{
(
function
(
$
)
{
var
issueTitle
=
$
(
'
body.controller-issues.action-show
'
).
find
(
'
.subject h3
'
);
var
issueTitle
=
$
(
'
body.controller-issues.action-show
'
).
find
(
'
.subject h3
'
);
if
(
issueTitle
)
{
if
(
issueTitle
.
length
)
{
var
regex
=
new
RegExp
(
'
^#[0-9]{1,7}
'
);
var
regex
=
new
RegExp
(
'
^#[0-9]{1,7}
'
);
var
searchResult
=
issueTitle
.
html
().
match
(
regex
);
var
searchResult
=
issueTitle
.
html
().
match
(
regex
);
if
(
searchResult
)
{
if
(
searchResult
)
{
...
...
extension/scripts/pm/workflow.js
0 → 100644
View file @
e72767db
(
function
(
$
)
{
function
closePopin
()
{
$
(
'
.pm-tools-workflow-block
'
).
remove
();
$
(
'
#content
'
).
show
();
}
function
getTrackerInfo
(
tracker
)
{
var
trackerData
=
{
'
feature
'
:
{
'
image
'
:
'
https://pm.i20.biz/attachments/download/19693/redmine_flow_feature.png
'
,
'
link
'
:
'
https://sites.google.com/a/i20.biz/i20-terrim/cod-holding/standards/development/pravila-raboty-v-redmajne/3-pravilo-raboty-s-zadacami/3-2-user-story-feature
'
},
'
support
'
:
{
'
image
'
:
'
https://pm.i20.biz/attachments/download/19693/redmine_flow_feature.png
'
,
'
link
'
:
'
https://sites.google.com/a/i20.biz/i20-terrim/cod-holding/standards/development/pravila-raboty-v-redmajne/3-pravilo-raboty-s-zadacami/3-2-user-story-feature
'
},
'
task
'
:
{
'
image
'
:
'
https://pm.i20.biz/attachments/download/19692/redmine_flow_task.jpg
'
,
'
link
'
:
'
https://sites.google.com/a/i20.biz/i20-terrim/cod-holding/standards/development/pravila-raboty-v-redmajne/3-pravilo-raboty-s-zadacami/3-3-task
'
},
'
bug
'
:
{
'
image
'
:
'
https://pm.i20.biz/attachments/download/19691/redmine_flow_bug.jpg
'
,
'
link
'
:
'
https://sites.google.com/a/i20.biz/i20-terrim/cod-holding/standards/development/pravila-raboty-v-redmajne/3-pravilo-raboty-s-zadacami/3-4-bug
'
},
'
epic
'
:
undefined
};
return
trackerData
[
tracker
];
}
if
(
$
(
'
.issue
'
).
length
)
{
var
issueTitleParts
=
$
(
'
h2
'
).
text
().
split
(
'
'
);
var
tracker
=
issueTitleParts
[
0
].
toLowerCase
();
var
trackerData
=
getTrackerInfo
(
tracker
);
if
(
trackerData
===
undefined
)
{
return
;
}
var
$subject
=
$
(
'
.subject
'
);
$
(
'
#sidebar, #header
'
).
click
(
closePopin
);
$
(
document
).
keyup
(
function
(
event
)
{
if
(
event
.
keyCode
===
27
)
closePopin
()});
var
workflowBlock
=
$
(
'
<div class="workflow-image" style="float: right">
'
+
'
<p><strong>Workflow</strong></p>
'
+
'
<img src="
'
+
trackerData
.
image
+
'
" width="200px">
'
+
'
</div>
'
);
$
(
'
img
'
,
workflowBlock
).
click
(
function
()
{
var
blockStyle
=
"
position: absolute; width: 75%; height: 100%; background-color: #fff; z-index: 20; text-align:center
"
;
var
closeButton
=
$
(
"
<div class='pm-tools-close-button' style='float:right; font-size: 50px; cursor: pointer'>×</div>
"
);
closeButton
.
click
(
closePopin
);
var
element
=
$
(
'
<div class="pm-tools-workflow-block" style="
'
+
blockStyle
+
'
">
'
+
'
<img style="display: inline-block" src="
'
+
$
(
this
).
attr
(
'
src
'
)
+
'
" />
'
+
'
<p><a href="
'
+
trackerData
.
link
+
'
" target="_blank" style="padding-bottom: 20px; font-size: 25px; font-weight:600">Больше информации</a></p>
'
+
'
</div>"
'
);
element
.
prepend
(
closeButton
);
$
(
'
#main
'
).
prepend
(
element
);
$
(
'
#content
'
).
hide
();
});
$subject
.
append
(
workflowBlock
);
}
})(
jQuery
);
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment