]> source.dussan.org Git - rspamd.git/commitdiff
Fix scan clear btn
authorAnna Stakhova <anna@rspamd.com>
Sat, 26 Nov 2016 18:43:02 +0000 (18:43 +0000)
committerAnna Stakhova <anna@rspamd.com>
Sat, 26 Nov 2016 18:43:02 +0000 (18:43 +0000)
Fix scan clear btn
Add upload btn (for future using)
Improve navbar right buttons

interface/css/rspamd.css
interface/index.html
interface/js/rspamd.js

index 5ab6a63e18962d09f5cee4e55965e15995524009..be5709a37b4da075e34655adc9c7749cd573d130 100644 (file)
@@ -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;
+}
index 69d249cb3a2273691c8b2c06519003967e01989c..5d9cd24da425e0a8b278ec160a775772928f5eee 100644 (file)
                <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>
 
                        <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>
 
                                                <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">
index e11c0b3ba4439f634372c630160049d7994a4383..3a38a326b904a79e3a3a95c72607fc7e0ddf4741 100644 (file)
         }
         // @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 () {