aboutsummaryrefslogtreecommitdiffstats
path: root/interface
diff options
context:
space:
mode:
authorAnna Stakhova <anna@rspamd.com>2016-11-26 18:43:02 +0000
committerAnna Stakhova <anna@rspamd.com>2016-11-26 18:43:02 +0000
commita3f1ef5835fc4cb385091b1e450832d69d1bf983 (patch)
tree7a5cbe162bea7a6ee05cf5dfec771e72520e5edd /interface
parenta96a08e35a050bc0f107fee990e5bbb4321f37b3 (diff)
downloadrspamd-a3f1ef5835fc4cb385091b1e450832d69d1bf983.tar.gz
rspamd-a3f1ef5835fc4cb385091b1e450832d69d1bf983.zip
Fix scan clear btn
Fix scan clear btn Add upload btn (for future using) Improve navbar right buttons
Diffstat (limited to 'interface')
-rw-r--r--interface/css/rspamd.css21
-rw-r--r--interface/index.html15
-rw-r--r--interface/js/rspamd.js7
3 files changed, 32 insertions, 11 deletions
diff --git a/interface/css/rspamd.css b/interface/css/rspamd.css
index 5ab6a63e1..be5709a37 100644
--- a/interface/css/rspamd.css
+++ b/interface/css/rspamd.css
@@ -235,7 +235,6 @@ td.maps-cell {
}
.spinner {
background:url('../img/spinner.gif') no-repeat -100px;
- padding-left:25px;
}
.loading .spinner {
background-position:0 50%;
@@ -563,3 +562,23 @@ td.maps-cell {
.scorebar-ham {
background: rgba(100, 230, 80, 0.1)
}
+/*btn-file for upload file button*/
+.btn-file {
+ position: relative;
+ overflow: hidden;
+}
+.btn-file input[type=file] {
+ position: absolute;
+ top: 0;
+ right: 0;
+ min-width: 100%;
+ min-height: 100%;
+ font-size: 100px;
+ text-align: right;
+ filter: alpha(opacity=0);
+ opacity: 0;
+ outline: none;
+ background: white;
+ cursor: inherit;
+ display: block;
+}
diff --git a/interface/index.html b/interface/index.html
index 69d249cb3..5d9cd24da 100644
--- a/interface/index.html
+++ b/interface/index.html
@@ -19,10 +19,6 @@
<div class="navbar-header">
<a class="navbar-brand" href="."><img src="./img/rspamd_logo_navbar.png" style="width: 67px; margin-top: -16px;"/></a>
</div>
- <ul class="nav pull-right navbar-nav navbar-right" style="display:none">
- <li><a href="#" data-toggle="tab" id="refresh"><i class="glyphicon glyphicon-refresh"></i> Refresh</a></li>
- <li class="spinner"><a href="#" data-toggle="tab" id="disconnect">Disconnect</a></li>
- </ul>
<ul class="nav navbar-nav nav-pills" role="tablist">
<li role="presentation" class="active"><a id="status_nav" aria-controls="status" role="tab" href="#status" data-toggle="tab">Status</a></li>
@@ -34,6 +30,10 @@
<li role="presentation"><a id="scan_nav"aria-controls="scan" role="tab" href="#scan" data-toggle="tab">Scan</a></li>
<li role="presentation"><a id="history_nav" aria-controls="history" role="tab" href="#history" data-toggle="tab">History</a></li>
</ul>
+ <ul class="nav navbar-nav nav-pills pull-right" style="display:none">
+ <li><a href="#" data-toggle="tab" id="refresh"><i class="glyphicon glyphicon-refresh"></i> Refresh</a></li>
+ <li class="spinner"><a href="#" data-toggle="tab" id="disconnect"><i class="glyphicon glyphicon-off"></i> Disconnect</a></li>
+ </ul>
</div>
</nav>
@@ -219,8 +219,11 @@
<div class="row">
<form class="col-md-12 nomargin" id="scanForm">
<textarea class="col-md-12 scan-textarea" id="scanTextSource"></textarea>
- <p><button class="btn btn-default btn-primary" data-upload="scan">Scan message</button>
- <button class="btn btn-default pull-right" id="scanClean">Clean form</button></p>
+ <button type="submit" class="btn btn-default btn-primary" data-upload="scan">Scan message</button>
+ <!--span class="btn btn-default btn-file" style="margin-top:10px; margin-left:5px;">
+ <i class="glyphicon glyphicon-upload"></i> Upload file <input type="file" class="btn btn-default" id="inputFile">
+ </span-->
+ <button class="btn btn-default pull-right" id="scanClean">Clean form</button>
</form>
</div>
<div id="scanResult" style="display:none">
diff --git a/interface/js/rspamd.js b/interface/js/rspamd.js
index e11c0b3ba..3a38a326b 100644
--- a/interface/js/rspamd.js
+++ b/interface/js/rspamd.js
@@ -947,12 +947,11 @@
}
// @close scan output
$('#scanClean').on('click', function () {
- $('#scanTextSource').val('');
+ $('#scanTextSource').val("");
$('#scanResult').hide();
$('#scanOutput tbody').remove();
- $('html, body').animate({
- scrollTop: 0
- }, 1000);
+ $('html, body').animate({scrollTop: 0}, 1000);
+ return false;
});
// @init upload
$('[data-upload]').on('click', function () {