aboutsummaryrefslogtreecommitdiffstats
path: root/sonar-server/src/main/webapp/javascripts/resource.js
diff options
context:
space:
mode:
authorSimon Brandhof <simon.brandhof@gmail.com>2013-05-23 14:59:34 +0200
committerSimon Brandhof <simon.brandhof@gmail.com>2013-05-23 17:46:59 +0200
commitf1187355aa041dc5dd183574bf43a52ca535db5f (patch)
tree216884f51336af7941227496ecd0606b9f9e26e7 /sonar-server/src/main/webapp/javascripts/resource.js
parent6a0ee5725ed9fd514f177d9c07ade38cf1cf8272 (diff)
downloadsonarqube-f1187355aa041dc5dd183574bf43a52ca535db5f.tar.gz
sonarqube-f1187355aa041dc5dd183574bf43a52ca535db5f.zip
SONAR-3755 remove code related to reviews and violations
Diffstat (limited to 'sonar-server/src/main/webapp/javascripts/resource.js')
-rw-r--r--sonar-server/src/main/webapp/javascripts/resource.js252
1 files changed, 0 insertions, 252 deletions
diff --git a/sonar-server/src/main/webapp/javascripts/resource.js b/sonar-server/src/main/webapp/javascripts/resource.js
index 46818a37187..07ef48116a6 100644
--- a/sonar-server/src/main/webapp/javascripts/resource.js
+++ b/sonar-server/src/main/webapp/javascripts/resource.js
@@ -22,258 +22,6 @@ function loadGWT(gwtId, resourceId, resourceKey, resourceName, resourceScope, re
modules[gwtId]();
}
-// cancel action : hide form and refresh violation
-function cancelViolationAction(violation_id) {
- new Ajax.Updater(
- 'vId' + violation_id,
- baseUrl + '/reviews/display_violation/' + violation_id,
- {
- asynchronous:true,
- evalScripts:true
- });
- return false;
-}
-
-function hideMoreViolationActions(violation_id) {
- var popup = $('more' + violation_id);
- if (popup != null) {
- popup.hide();
- }
-}
-
-function sCF(violation_id) {
- hideMoreViolationActions(violation_id);
- new Ajax.Updater('reviewForm' + violation_id,
- baseUrl + '/reviews/violation_comment_form/' + violation_id,
- {
- asynchronous:true,
- evalScripts:true,
- onComplete:function (request) {
- $('vActions' + violation_id).remove();
- $('reviewForm' + violation_id).show();
- $('commentText' + violation_id).focus();
- }
- });
- return false;
-}
-
-// show review screen
-function sS(violation_id, command_key) {
- hideMoreViolationActions(violation_id);
- new Ajax.Updater('reviewForm' + violation_id,
- baseUrl + '/reviews/screen/' + violation_id + '?command=' + command_key,
- {
- asynchronous:true,
- evalScripts:true,
- onComplete:function (request) {
- $('vActions' + violation_id).remove();
- $('reviewForm' + violation_id).show();
- $('commentText' + violation_id).focus();
- }
- });
- return false;
-}
-
-// show the form to change severity
-function sCSF(violation_id) {
- hideMoreViolationActions(violation_id);
- new Ajax.Updater('reviewForm' + violation_id,
- baseUrl + '/reviews/violation_change_severity_form/' + violation_id,
- {
- asynchronous:true,
- evalScripts:true,
- onComplete:function (request) {
- $('vActions' + violation_id).remove();
- $('reviewForm' + violation_id).show();
- $('selectSeverity' + violation_id).focus();
- }
- });
- return false;
-}
-
-// show the form to change status
-function sCStF(violation_id) {
- hideMoreViolationActions(violation_id);
- new Ajax.Updater('reviewForm' + violation_id,
- baseUrl + '/reviews/violation_change_status_form/' + violation_id,
- {
- asynchronous:true,
- evalScripts:true,
- onComplete:function (request) {
- $('vActions' + violation_id).remove();
- $('reviewForm' + violation_id).show();
- $('commentText' + violation_id).focus();
- }
- });
- return false;
-}
-
-// show the form to flag as false-positive
-function sFPF(violation_id) {
- hideMoreViolationActions(violation_id);
- new Ajax.Updater('reviewForm' + violation_id,
- baseUrl + '/reviews/violation_false_positive_form/' + violation_id,
- {
- asynchronous:true,
- evalScripts:true,
- onComplete:function (request) {
- $('vActions' + violation_id).remove();
- $('reviewForm' + violation_id).show();
- $('commentText' + violation_id).focus();
- }
- });
- return false;
-}
-
-// show the form to assign violation
-function sAF(violation_id) {
- hideMoreViolationActions(violation_id);
- new Ajax.Updater('reviewForm' + violation_id,
- baseUrl + '/reviews/violation_assign_form/' + violation_id,
- {
- asynchronous:true,
- evalScripts:true,
- onComplete:function (request) {
- $('vActions' + violation_id).remove();
- $('reviewForm' + violation_id).show();
- $('assignee_login').focus();
- }
- });
- return false;
-}
-
-// show the form to link a review to an action plan
-function sAPF(violation_id) {
- hideMoreViolationActions(violation_id);
- new Ajax.Updater('reviewForm' + violation_id,
- baseUrl + '/reviews/violation_action_plan_form/' + violation_id,
- {
- asynchronous:true,
- evalScripts:true,
- onComplete:function (request) {
- $('vActions' + violation_id).remove();
- $('reviewForm' + violation_id).show();
- $('action_plan').focus();
- }
- });
- return false;
-}
-
-// show the form to create violation
-function sVF(elt, resource, line, gray_colspan, white_colspan) {
- row = $j('#createViolationForm' + line);
- if (!row.length) {
- expandAccordionItem(elt);
- var element = $j(elt).closest('.pos' + line);
- $j.get(baseUrl + '/resource/show_create_violation_form?resource='+ resource + '&line='+ line + '&gray_colspan='+ gray_colspan + '&white_colspan='+ white_colspan, function (html) {
- element.after(html);
- }).error(function () {
- alert("Server error. Please contact your administrator.");
- });
- }
- return false;
-}
-
-// hide review form
-function hVF(elt, line) {
- var row = $j(elt).closest('#createViolationRow'+ line);
- if (row.length) {
- row.remove();
- }
- return false;
-}
-
-/*
- Functions used in issues code viewer
- */
-
-// show the form for transition
-function displayIssueTransitionForm(issueKey, transitionKey) {
- hideMoreIssueActions(issueKey);
- new Ajax.Updater('issue-form' + issueKey,
- baseUrl + '/issue/issue_transition_form?issue=' + issueKey + '&transition='+ transitionKey,
- {
- asynchronous:true,
- evalScripts:true,
- onComplete:function (request) {
- $('issue-actions' + issueKey).remove();
- $('issue-form' + issueKey).show();
- $('issue-comment' + issueKey).focus();
- }
- });
- return false;
-}
-
-// show the form to assign issue
-function displayIssueAssignForm(issueKey) {
- hideMoreIssueActions(issueKey);
- new Ajax.Updater('issue-form' + issueKey,
- baseUrl + '/issue/issue_assign_form/?issue=' +issueKey,
- {
- asynchronous:true,
- evalScripts:true,
- onComplete:function (request) {
- $('issue-actions' + issueKey).remove();
- $('issue-form' + issueKey).show();
- $('issue_assignee_login').focus();
- }
- });
- return false;
-}
-
-// show the form to change severity
-function displayIssueChangeSeverityForm(issueKey) {
- hideMoreIssueActions(issueKey);
- new Ajax.Updater('issue-form' + issueKey,
- baseUrl + '/issue/issue_change_severity_form/?issue=' + issueKey,
- {
- asynchronous:true,
- evalScripts:true,
- onComplete:function (request) {
- $('issue-actions' + issueKey).remove();
- $('issue-form' + issueKey).show();
- $('issue-severity' + issueKey).focus();
- }
- });
- return false;
-}
-
-// show the form to link a issue to an action plan
-function displayIssuePlanForm(issueKey) {
- hideMoreIssueActions(issueKey);
- new Ajax.Updater('issue-form' + issueKey,
- baseUrl + '/issue/issue_plan_form/?issue=' + issueKey,
- {
- asynchronous:true,
- evalScripts:true,
- onComplete:function (request) {
- $('issue-actions' + issueKey).remove();
- $('issue-form' + issueKey).show();
- $('issue-plan').focus();
- }
- });
- return false;
-}
-
-// cancel action : hide form and refresh issue
-function cancelIssueAction(issueKey) {
- new Ajax.Updater(
- 'issue-key' + issueKey,
- baseUrl + '/issue/display_issue?issue=' + issueKey,
- {
- asynchronous:true,
- evalScripts:true
- });
- return false;
-}
-
-function hideMoreIssueActions(issueKey) {
- var popup = $('more' + issueKey);
- if (popup != null) {
- popup.hide();
- }
-}
-
/*
Functions used in tests viewer
*/