Skip to content

Instantly share code, notes, and snippets.

@dgershman
Created November 9, 2015 18:11
Show Gist options
  • Select an option

  • Save dgershman/a74dbf4bd8559e7f969b to your computer and use it in GitHub Desktop.

Select an option

Save dgershman/a74dbf4bd8559e7f969b to your computer and use it in GitHub Desktop.
// ==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