Created
November 9, 2015 18:11
-
-
Save dgershman/a74dbf4bd8559e7f969b to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // ==UserScript== | |
| // @name YouTrack Agile Modal | |
| // @namespace http://versomas.com/ | |
| // @version 0.1 | |
| // @description Allows tickets to be opened in modals directly | |
| // @author dannygnc | |
| // @match */youtrack/rest/agile/* | |
| // @grant none | |
| // @require https://code.jquery.com/ui/1.11.4/jquery-ui.min.js | |
| // ==/UserScript== | |
| /* jshint -W097 */ | |
| 'use strict'; | |
| $(function() { | |
| $("body").prepend("<div id=\"agileDialog\" style=\"display:none;\"><iframe id=\"dialogFrame\" width=\"1095\" height=\"800\"></iframe></div>"); | |
| $(".sb-task-issue-ref").click(function () { | |
| $("#dialogFrame").attr('src', $(this).attr("href")); | |
| $("#agileDialog").dialog({ | |
| width: 1100, | |
| height: 800, | |
| modal: true, | |
| close: function () { | |
| $("#dialogFrame").attr('src', "about:blank"); | |
| $("body").css({ overflow: 'inherit' }); | |
| }, | |
| open: function() { | |
| $(".ui-dialog").css("z-index", "1000"); | |
| $("body").css({ overflow: 'hidden' }); | |
| } | |
| }); | |
| return false; | |
| }); | |
| }); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment