Author: kishore
Date: Wed Mar 22 22:33:00 2017
New Revision: 1788164

URL: http://svn.apache.org/viewvc?rev=1788164&view=rev
Log:
Added overlay to UI for AJAX calls.

Modified:
    
manifoldcf/branches/CONNECTORS-1196-2/framework/crawler-ui/src/main/webapp/css/style.css
    
manifoldcf/branches/CONNECTORS-1196-2/framework/crawler-ui/src/main/webapp/index.jsp
    
manifoldcf/branches/CONNECTORS-1196-2/framework/crawler-ui/src/main/webapp/javascript/app.js
    
manifoldcf/branches/CONNECTORS-1196-2/framework/crawler-ui/src/main/webapp/less/miscellaneous.less
    
manifoldcf/branches/CONNECTORS-1196-2/framework/crawler-ui/src/main/webapp/less/style.less

Modified: 
manifoldcf/branches/CONNECTORS-1196-2/framework/crawler-ui/src/main/webapp/css/style.css
URL: 
http://svn.apache.org/viewvc/manifoldcf/branches/CONNECTORS-1196-2/framework/crawler-ui/src/main/webapp/css/style.css?rev=1788164&r1=1788163&r2=1788164&view=diff
==============================================================================
--- 
manifoldcf/branches/CONNECTORS-1196-2/framework/crawler-ui/src/main/webapp/css/style.css
 (original)
+++ 
manifoldcf/branches/CONNECTORS-1196-2/framework/crawler-ui/src/main/webapp/css/style.css
 Wed Mar 22 22:33:00 2017
@@ -2636,6 +2636,27 @@ table.text-center th {
   opacity: 1;
   filter: alpha(opacity=100);
 }
+.fa-fw {
+  width: auto;
+  margin-right: 0.4em;
+}
+.overlay {
+  position: absolute;
+  top: 0;
+  left: 0;
+  right: 0;
+  bottom: 0;
+  background-color: rgba(52, 52, 62, 0.5);
+  z-index: 9999;
+  color: white;
+  display: inline-block;
+}
+.overlay .spinner {
+  display: block;
+  position: relative;
+  top: 50%;
+  text-align: center;
+}
 .displaytable,
 .formtable {
   border: 1px solid #f4f4f4;
@@ -3106,10 +3127,6 @@ fieldset[disabled] .formtable td input[t
 .skin-black .treeview-menu > li > a:hover {
   color: #ffffff;
 }
-.fa-fw {
-  width: auto;
-  margin-right: 0.4em;
-}
 @font-face {
   font-family: 'Source Sans Pro';
   font-style: normal;

Modified: 
manifoldcf/branches/CONNECTORS-1196-2/framework/crawler-ui/src/main/webapp/index.jsp
URL: 
http://svn.apache.org/viewvc/manifoldcf/branches/CONNECTORS-1196-2/framework/crawler-ui/src/main/webapp/index.jsp?rev=1788164&r1=1788163&r2=1788164&view=diff
==============================================================================
--- 
manifoldcf/branches/CONNECTORS-1196-2/framework/crawler-ui/src/main/webapp/index.jsp
 (original)
+++ 
manifoldcf/branches/CONNECTORS-1196-2/framework/crawler-ui/src/main/webapp/index.jsp
 Wed Mar 22 22:33:00 2017
@@ -54,11 +54,6 @@
           <!-- Navbar Right Menu -->
           <div class="navbar-custom-menu">
             <div id="loader">Loading...</div>
-            <div class="spinner">
-              <div class="bounce1"></div>
-              <div class="bounce2"></div>
-              <div class="bounce3"></div>
-            </div>
           </div>
         </nav>
       </header>
@@ -79,6 +74,13 @@
         
<strong><%=Messages.getBodyString(pageContext.getRequest().getLocale(),"index.Copyright")%>&nbsp;&nbsp;&nbsp;&nbsp;<a
 target="_blank" 
href="https://www.apache.org/";><%=Messages.getBodyString(pageContext.getRequest().getLocale(),"index.TheApacheSoftwareFoundation")%></a></strong>
       </footer>
     </div>
+    <div class="overlay" style="display: none">
+      <div class="spinner">
+        <div class="bounce1"></div>
+        <div class="bounce2"></div>
+        <div class="bounce3"></div>
+      </div>
+    </div>
     <script src="javascript/jquery.min.js"></script>
     <!-- Bootstrap JS -->
     <script src="bootstrap/js/bootstrap.min.js" 
type="text/javascript"></script>

Modified: 
manifoldcf/branches/CONNECTORS-1196-2/framework/crawler-ui/src/main/webapp/javascript/app.js
URL: 
http://svn.apache.org/viewvc/manifoldcf/branches/CONNECTORS-1196-2/framework/crawler-ui/src/main/webapp/javascript/app.js?rev=1788164&r1=1788163&r2=1788164&view=diff
==============================================================================
--- 
manifoldcf/branches/CONNECTORS-1196-2/framework/crawler-ui/src/main/webapp/javascript/app.js
 (original)
+++ 
manifoldcf/branches/CONNECTORS-1196-2/framework/crawler-ui/src/main/webapp/javascript/app.js
 Wed Mar 22 22:33:00 2017
@@ -359,11 +359,22 @@ $.ManifoldCF.setTitle=function (title,he
 
 function displayError(xhr)
 {
-  var msg='<div class="alert alert-danger alert-dismissable">' +
-      '<button type="button" class="close" data-dismiss="alert" 
aria-hidden="true">×</button>' +
-      '<h4><i class="icon fa fa-ban"></i> Error!</h4>' +
-      'Sorry but there was an error:  ';
-  $("#content").html(msg + xhr.status + " " + xhr.statusText + '</div>');
+  $(".content-header #heading").text('Error!');
+  document.title='Error';
+  var errorTemplate = '<div class="box box-solid">' +
+                        '<div class="box-body">' +
+                          '<div class="alert alert-danger">' +
+                            '<h3><i class="icon fa fa-ban"></i> Error!</h3>' +
+                            '<h4>' + xhr.status + " " + xhr.statusText 
+'</h4>' +
+                          '</div>' +
+                        '</div>' +
+                        '<div class="box-footer with-border">' +
+                          '<a class="btn btn-primary" href="index.jsp" 
title="Return" data-toggle="tooltip">' +
+                            '<i class="fa fa-check fa-fw" 
aria-hidden="true"></i>OK' +
+                          '</a>' +
+                        '</div>' +
+                      '</div>';
+  $("#content").html(errorTemplate);
 }
 
 function _preLoadContent()
@@ -394,25 +405,23 @@ function _postLoadContent()
 
 $.ManifoldCF.loadContent=function (url)
 {
-  $('.spinner,#loader').show();
+  $('.overlay,#loader').show();
   console.log("URL: " + url);
   _preLoadContent();
   $('#content').load(decodeURIComponent(url),function (response,status,xhr)
   {
     if (status == 'error')
     {
-      $(".content-header #heading").text('Error');
-      document.title='Error';
       displayError(xhr);
     }
     _postLoadContent();
-    $('.spinner,#loader').hide();
+    $('.overlay,#loader').hide();
   });
 };
 
 $.ManifoldCF.submit=function (form)
 {
-  $('.spinner,#loader').show();
+  $('.overlay,#loader').show();
   var $form=$(form);
   var action=$form.attr('action')
   console.log("Ajax URL: " + action);
@@ -442,7 +451,7 @@ $.ManifoldCF.submit=function (form)
   }).always(function ()
   {
     _postLoadContent();
-    $('.spinner,#loader').hide();
+    $('.overlay,#loader').hide();
   });
 }
 

Modified: 
manifoldcf/branches/CONNECTORS-1196-2/framework/crawler-ui/src/main/webapp/less/miscellaneous.less
URL: 
http://svn.apache.org/viewvc/manifoldcf/branches/CONNECTORS-1196-2/framework/crawler-ui/src/main/webapp/less/miscellaneous.less?rev=1788164&r1=1788163&r2=1788164&view=diff
==============================================================================
--- 
manifoldcf/branches/CONNECTORS-1196-2/framework/crawler-ui/src/main/webapp/less/miscellaneous.less
 (original)
+++ 
manifoldcf/branches/CONNECTORS-1196-2/framework/crawler-ui/src/main/webapp/less/miscellaneous.less
 Wed Mar 22 22:33:00 2017
@@ -333,3 +333,28 @@
     .opacity(1);
   }
 }
+
+//Custom
+.fa-fw {
+  width:auto;
+  margin-right: 0.4em;
+}
+
+.overlay {
+  position: absolute;
+  top: 0;
+  left: 0;
+  right: 0;
+  bottom: 0;
+  background-color: fade(@sidebar-dark-bg, 50%);
+  z-index: 9999;
+  color: white;
+  display: inline-block;
+
+  .spinner{
+    display: block;
+    position: relative;
+    top: 50%;
+    text-align: center;
+  }
+ }

Modified: 
manifoldcf/branches/CONNECTORS-1196-2/framework/crawler-ui/src/main/webapp/less/style.less
URL: 
http://svn.apache.org/viewvc/manifoldcf/branches/CONNECTORS-1196-2/framework/crawler-ui/src/main/webapp/less/style.less?rev=1788164&r1=1788163&r2=1788164&view=diff
==============================================================================
--- 
manifoldcf/branches/CONNECTORS-1196-2/framework/crawler-ui/src/main/webapp/less/style.less
 (original)
+++ 
manifoldcf/branches/CONNECTORS-1196-2/framework/crawler-ui/src/main/webapp/less/style.less
 Wed Mar 22 22:33:00 2017
@@ -58,11 +58,5 @@
 //THEME
 @import "skin-black.less";
 
-//Custom
-.fa-fw{
-  width:auto;
-  margin-right: 0.4em;
-}
-
 //google fonts
 @import "sourcesanspro-fonts.less";


Reply via email to