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

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



Revision: 1927
          http://ledger-smb.svn.sourceforge.net/ledger-smb/?rev=1927&view=rev
Author:   einhverfr
Date:     2007-11-30 00:21:03 -0800 (Fri, 30 Nov 2007)

Log Message:
-----------
Using login.html to test new header framework.

Modified Paths:
--------------
    trunk/UI/lib/ui-header.html
    trunk/UI/login.html
    trunk/UI/login.js

Modified: trunk/UI/lib/ui-header.html
===================================================================
--- trunk/UI/lib/ui-header.html	2007-11-30 07:31:45 UTC (rev 1926)
+++ trunk/UI/lib/ui-header.html	2007-11-30 08:21:03 UTC (rev 1927)
@@ -15,7 +15,7 @@
 	<link rel="stylesheet" href="<?lsmb s ?>" type="text/css" title="LedgerSMB stylesheet" />
 	<?lsmb END ?>
 	<?lsmb FOREACH s = include_script ?>
-	<script type="text/javascript" src="<?lsmb s ?>" />
+	<script type="text/javascript" language="JavaScript" src="<?lsmb s ?>" />
 	<?lsmb END ?>
 	
 

Modified: trunk/UI/login.html
===================================================================
--- trunk/UI/login.html	2007-11-30 07:31:45 UTC (rev 1926)
+++ trunk/UI/login.html	2007-11-30 08:21:03 UTC (rev 1927)
@@ -1,81 +1,29 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
-		"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd";>
-<html xmlns="http://www.w3.org/1999/xhtml"; xml:lang="en" lang="en">
-<head>
-        <!--  TODO:  Allow the ui-header to be used for this file 
-	Also, move all elements to elements.html
-	CT  -->
-	<title>LedgerSMB <?lsmb VERSION ?></title>
-	<meta http-equiv="Pragma" content="no-cache" />
-	<meta http-equiv="Expires" content="-1" />
-	<link rel="shortcut icon" href="favicon.ico" type="image/x-icon" />
-
-	<link rel="stylesheet" href="css/ledgersmb.css" type="text/css" title="LedgerSMB stylesheet" />
-	<link rel="stylesheet" href="UI/login.css" type="text/css" title="LedgerSMB stylesheet" />
-	<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
-
-	<meta name="robots" content="noindex,nofollow" />
-        
-	<script language="JavaScript" type="text/javascript" 
-		src="UI/login.js">
-	</script>
-	<script language="JavaScript" type="text/javascript" >
-function setup_page() {
-	var credential_html;
-
-	var cred_div = document.getElementById("credentials");
-	credential_html = 
-		'<div class="labelledinput">' +
-			'<div class="label">' +
-				'<label for="login">' +
-				"<?lsmb text('Name') ?>"+
-				"</label>" +
-			'</div>' +
-			'<div class="input">' +
-				'<input class="login" ' + 
-				'name="login" size="30" ' + 
-				'value="" id="login" '+ 
-				'accesskey="n" />' +
-			'</div>' +
-		'</div>' +
-		'<div class="labelledinput">' +
-			'<div class="label">' +
-				'<label for="password">' +
-				"<?lsmb text('Password') ?>" +
-				'</label>' +
-			'</div>' +
-			'<div class="input">' +
-				'<input class="login" ' + 
-					'type="password" ' +
-					'name="password" ' +
-					'size="30" ' +
-					'id="password" ' +
-					'accesskey="p" />' +
-			'</div>' +
-		'</div>';
-	if (<?lsmb IF blacklisted ?>false<?lsmb ELSE ?>true<?lsmb END ?>
-			&& get_http_request_object()){
-		cred_div.innerHTML = credential_html;
-	}
-	document.login.login.focus();
-}
-	</script>
-</head>
+<?lsmb INCLUDE 'ui-header.html' 
+	titlebar = "LedgerSMB $VERSION"
+	include_stylesheet = ["UI/login.css", "css/ledgersmb.css"]
+	include_script = ["UI/login.js"]
+?>
 <?lsmb PROCESS elements.html ?>
 
 		 
 
 
-<body class="login" onload="setup_page();">
+<body class="login" onload="setup_page('<?lsmb text('Name:')?>',
+	'<?lsmb text('Password:') ?>');">
 	<br /><br />
 	<center>
 		<form method="post" action="login.pl" name="login"
 			onsubmit="return submit_form()">
-		<?lsmb PROCESS input element_data = {
+		<?lsmb INCLUDE input element_data = {
 			type = "hidden",
 			name = "menubar",
 			value = menubar
 		} ?> 
+		<?lsmb INCLUDE input element_data = {
+			type = "hidden",
+			name = "blacklisted",
+			value = blacklisted
+		} ?> 
 		<div class="login">
 			<div class="login" align="center">
 				<a href="http://www.ledgersmb.org/"; target="_top"><img src="images/ledgersmb.png" class="logo" alt="LedgerSMB Logo" /></a>

Modified: trunk/UI/login.js
===================================================================
--- trunk/UI/login.js	2007-11-30 07:31:45 UTC (rev 1926)
+++ trunk/UI/login.js	2007-11-30 08:21:03 UTC (rev 1927)
@@ -36,3 +36,45 @@
 		username, password
     );
 }
+
+function setup_page(login_label, password_label) {
+	var credential_html;
+
+	var cred_div = document.getElementById("credentials");
+	credential_html = 
+		'<div class="labelledinput">' +
+			'<div class="label">' +
+				'<label for="login">' +
+				login_label+
+				"</label>" +
+			'</div>' +
+			'<div class="input">' +
+				'<input class="login" ' + 
+				'name="login" size="30" ' + 
+				'value="" id="login" '+ 
+				'accesskey="n" />' +
+			'</div>' +
+		'</div>' +
+		'<div class="labelledinput">' +
+			'<div class="label">' +
+				'<label for="password">' +
+				password_label +
+				'</label>' +
+			'</div>' +
+			'<div class="input">' +
+				'<input class="login" ' + 
+					'type="password" ' +
+					'name="password" ' +
+					'size="30" ' +
+					'id="password" ' +
+					'accesskey="p" />' +
+			'</div>' +
+		'</div>';
+	if (!document.login.blacklisted.value && get_http_request_object()){
+		cred_div.innerHTML = credential_html;
+		document.login.login.focus();
+	}
+	else {
+		document.login.company.focus();
+	}
+}


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