[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

SF.net SVN: ledger-smb:[6063] trunk/UI



Revision: 6063
          http://sourceforge.net/p/ledger-smb/code/6063
Author:   einhverfr
Date:     2013-09-20 03:33:09 +0000 (Fri, 20 Sep 2013)
Log Message:
-----------
Fixed some issues with indicator, still trying to get it up to a progress bar

Modified Paths:
--------------
    trunk/UI/login.css
    trunk/UI/login.html
    trunk/UI/login.js

Modified: trunk/UI/login.css
===================================================================
--- trunk/UI/login.css	2013-09-19 14:01:18 UTC (rev 6062)
+++ trunk/UI/login.css	2013-09-20 03:33:09 UTC (rev 6063)
@@ -51,7 +51,7 @@
     margin-top: 10px;
 }
 
-div.login-indicator {
+div#login-indicator {
     font-size: x-large;
     margin-left: auto;
     margin-right: auto;

Modified: trunk/UI/login.html
===================================================================
--- trunk/UI/login.html	2013-09-19 14:01:18 UTC (rev 6062)
+++ trunk/UI/login.html	2013-09-20 03:33:09 UTC (rev 6063)
@@ -68,9 +68,10 @@
 						</div>
 					</div>
 				</div>
-				<button type="submit" name="action" value="login" accesskey="l"><?lsmb text('Login') ?></button>
+				<button type="submit" name="action" value="login" accesskey="l" id="action-login"><?lsmb text('Login') ?></button>
 			</div>
-                <div id="indicator" class="login-indicator">
+                <div id="login-indicator" 
+                     onLoad="set_indicator()">
                   <?lsmb text('Logging in.  Please wait.') ?>
                 </div>
 		</div></div>

Modified: trunk/UI/login.js
===================================================================
--- trunk/UI/login.js	2013-09-19 14:01:18 UTC (rev 6062)
+++ trunk/UI/login.js	2013-09-20 03:33:09 UTC (rev 6063)
@@ -1,7 +1,7 @@
 
 
 function show_indicator() {
-        var e = document.getElementById('indicator');
+        var e = document.getElementById('login-indicator');
         e.style.visibility='visible';
 }
 
@@ -21,11 +21,13 @@
 	http.open("get", 'login.pl?action=authenticate&company='+company, false, username, password);
 	http.send("");
         if (http.status != 200){
-                if (http.status != '454'){
+                if (http.status == '454'){
+                     alert('Company does not exist.');
+                } else {
   		     alert("Access Denied:  Bad username/Password");
-                } else {
-                     alert('Company does not exist.');
                 }
+                var e = document.getElementById('login-indicator');
+                e.style.visibility='hidden';
 		return false;
 	}
 	document.location=document.login.action.value+".pl?action=login&company="+document.login.company.value;
@@ -43,3 +45,24 @@
     );
 }
 
+function set_indicator() {
+    require(['dojo/on', 'dijit/registry', 'dojo/ready!'],
+    function(on, registry){
+        var button = registry.byId('action-login');
+        button.set('type', 'button');
+        on(button, 'click', function(evt){
+           require(['dojo/dom', 'dijit/ProgressBar', 'dojo/_base/window'],
+           function(dom, progressbar, win){
+               var indicator = new progressbar({
+                  "indeterminate": true,
+                  "style": "width: 25em"
+               }, dom.byId("login-indicator"));
+               indicator.startup();
+               
+           });
+           send_form();
+           return false;
+        });
+      });
+}
+

This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.


------------------------------------------------------------------------------
LIMITED TIME SALE - Full Year of Microsoft Training For Just $49.99!
1,500+ hours of tutorials including VisualStudio 2012, Windows 8, SharePoint
2013, SQL 2012, MVC 4, more. BEST VALUE: New Multi-Library Power Pack includes
Mobile, Cloud, Java, and UX Design. Lowest price ever! Ends 9/20/13. 
http://pubads.g.doubleclick.net/gampad/clk?id=58041151&iu=/4140/ostg.clktrk
_______________________________________________
Ledger-smb-commits mailing list
..hidden..
https://lists.sourceforge.net/lists/listinfo/ledger-smb-commits