Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/undo-ransomware/ransomware_detection.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/js
diff options
context:
space:
mode:
authorUnknown <ilovemilk@wusa.io>2018-08-25 17:24:07 +0300
committerUnknown <ilovemilk@wusa.io>2018-08-25 17:24:07 +0300
commit87dc378b3a5b0c67d2acaf5804dd6ad3db08e727 (patch)
tree23141d9d68a6c37e2bb1e2ac73059c2a7b6be088 /js
parent3fbaae5aa2026ee893f7b4a9b9fc53ca9ff35b76 (diff)
Fix empty app header if debug mode is active
Diffstat (limited to 'js')
-rw-r--r--js/filelist.js14
1 files changed, 6 insertions, 8 deletions
diff --git a/js/filelist.js b/js/filelist.js
index d63cf6c..7d24f00 100644
--- a/js/filelist.js
+++ b/js/filelist.js
@@ -96,7 +96,9 @@
}
$.getJSON(self.url, function(data) {
console.log("Create app header.");
- self.$el.append(self._createAppHeader());
+ if (self.debug === 1) {
+ self.$el.append(self._createAppHeader());
+ }
if (data.length === 0) {
console.log("No sequence found.");
self.$el.append(self._createNoSequenceFound());
@@ -245,19 +247,15 @@
},
/**
- * Create the App header.
+ * Creates the App header.
*/
_createAppHeader: function() {
- if (this.debug == 1) {
- header = $('<div class="section"><div class="pull-right"><span><a class="action" href="/ocs/v2.php/apps/ransomware_detection/api/v1/export"><span class="icon icon-download"></span>' + t('ransomware_detection', 'Export data') + '</a></span></div></div>');
- } else {
- header = $('<div class="section"></div>')
- }
+ header = $('<div class="section"><div class="pull-right"><span><a class="action" href="/ocs/v2.php/apps/ransomware_detection/api/v1/export"><span class="icon icon-download"></span>' + t('ransomware_detection', 'Export data') + '</a></span></div></div>');
return header;
},
/**
- * Create the no sequence found text.
+ * Creates the no sequence found text.
*/
_createNoSequenceFound: function() {
var text = $('<div class="section"><h2>' + t('ransomware_detection', 'No sequences found.') + '</h2></div>');