diff --git a/dreditor.user.js b/dreditor.user.js index 86fad11..dc2b412 100644 --- a/dreditor.user.js +++ b/dreditor.user.js @@ -1626,56 +1626,6 @@ Drupal.behaviors.dreditorIssueSummaryTemplate = function() { .after(')'); }); - // Show a warning on the bare issue summary template edit page. - if (location.href.search('node/1326662/edit') !== -1) { - $('body.logged-in.page-node #content').once('dreditorIssueTemplate', function () { - var $content = $(this).hide(); - var $warning = $('
') - .html('WARNING: editing this page affects the Dreditor project. A new window will appear before actually saving this page so you can automatically file an issue to notify the project of this change.') - .css({ - color: '#ff0000', - fontSize: '20px', - lineHeight: '1.25em', - marginBottom: '0.5em' - }) - .appendTo($content.parent()); - $('') - .addClass('dreditor-button') - .text('Continue') - .appendTo($content.parent()) - .click(function() { - $(this).remove(); - $warning.remove(); - $content.show(); - }); - var issueOpened = false; - $('#node-form').submit(function(e) { - var $form = $(this); - if (!issueOpened) { - var w = window.open('//drupal.org/node/add/project-issue/dreditor#edit-rid-wrapper', '_blank'); - w.onload = function() { - $(w).ready(function() { - setTimeout(function() { - var $doc = $(w.document); - $doc.find('#edit-component').val('Miscellaneous'); - $doc.find('#edit-category').val('task'); - $doc.find('#edit-priority').val('1'); - $doc.find('#edit-sid').val('8'); - $doc.find('#edit-title').val('Updated bare issue summary template').focus(); - $doc.find('#edit-body').val('Log message: ' + $form.find('#edit-log').val()); - // Manually trigger the "submit" event. - issueOpened = true; - $form.trigger('submit'); - }, 10); - }); - } - // Prevent default "submit" event. - e.preventDefault(); - } - }); - }); - } - }; /**