summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'app/views/cve/_ui_misc.js.erb')
-rw-r--r--app/views/cve/_ui_misc.js.erb115
1 files changed, 0 insertions, 115 deletions
diff --git a/app/views/cve/_ui_misc.js.erb b/app/views/cve/_ui_misc.js.erb
deleted file mode 100644
index 135f653..0000000
--- a/app/views/cve/_ui_misc.js.erb
+++ /dev/null
@@ -1,115 +0,0 @@
-/** UI misc **/
-uki("#reload-table").click(
- function() { reloadTable(); }
-);
-
-uki("#cve-details").click(
- function() {
- var sel = uki('Table').selectedRows();
-
- if (sel.length > 15) {
- alert("I'm not opening more than 15 windows...");
- return false;
- }
-
- for(var i = 0; i < sel.length; i++) {
- cvepopup(sel[i][1]);
- }
- }
-);
-
-uki("#close").click(
- function() {
- window.location = "/";
- }
-);
-
-uki('Table').bind('dblclick', function() {
- cvepopup(uki('Table').selectedRow()[1]);
-});
-
-// View settings
-uki("#toggle-new").click(
- function() {
- if (this.checked())
- view |= 1;
- else
- view ^= 1;
-
- reloadTable();
- }
-);
-
-uki("#toggle-assigned").click(
- function() {
- if (this.checked())
- view |= 2;
- else
- view ^= 2;
-
- reloadTable();
- }
-);
-
-uki("#toggle-later").click(
- function() {
- if (this.checked())
- view |= 4;
- else
- view ^= 4;
-
- reloadTable();
- }
-);
-
-uki("#toggle-nfu").click(
- function() {
- if (this.checked())
- view |= 8;
- else
- view ^= 8;
-
- reloadTable();
- }
-);
-
-uki("#toggle-invalid").click(
- function() {
- if (this.checked())
- view |= 16;
- else
- view ^= 16;
-
- reloadTable();
- }
-);
-
-uki("#cve-add-note").click(
- function() {
- var sel = uki('Table').selectedRows();
-
- if (sel.length < 1) {
- alert("Please select at least one CVE.");
- return false;
- }
-
- var data = new Array();
-
- for (var i = 0; i < sel.length; i++) {
- data.push(sel[i][0]);
- }
-
- new Ajax.Request('/cve/note', {
- parameters: { cves: data.join(','), note: uki('#cve-note-text').value() },
- onSuccess: function(response) {
- uki('#cve-note-text').value('');
- reloadTable();
- },
- onFailure: function(response) {
- alert("Could not process your request:\n\n" + response.responseText);
- }
- });
- }
-);
-
-/** UI misc end **/ \ No newline at end of file