diff options
author | Unknown <ilovemilk@wusa.io> | 2018-08-25 17:24:07 +0300 |
---|---|---|
committer | Unknown <ilovemilk@wusa.io> | 2018-08-25 17:24:07 +0300 |
commit | 87dc378b3a5b0c67d2acaf5804dd6ad3db08e727 (patch) | |
tree | 23141d9d68a6c37e2bb1e2ac73059c2a7b6be088 /js | |
parent | 3fbaae5aa2026ee893f7b4a9b9fc53ca9ff35b76 (diff) |
Fix empty app header if debug mode is active
Diffstat (limited to 'js')
-rw-r--r-- | js/filelist.js | 14 |
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>'); |