Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
O
officejs
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
officejs
Commits
12e1a7fe
Commit
12e1a7fe
authored
Jul 19, 2011
by
François Billioud
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add files linked with login
parent
2e404066
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
365 additions
and
0 deletions
+365
-0
UNGProject/images/ung/ung-logo.png
UNGProject/images/ung/ung-logo.png
+0
-0
UNGProject/js/login.js
UNGProject/js/login.js
+74
-0
UNGProject/login.html
UNGProject/login.html
+291
-0
No files found.
UNGProject/images/ung/ung-logo.png
0 → 100644
View file @
12e1a7fe
40.1 KB
UNGProject/js/login.js
0 → 100644
View file @
12e1a7fe
/**
* change the display if the new account button is clicked
*/
var
displayNewAccountForm
=
function
(
bool
)
{
if
(
bool
)
{
$
(
"
table#create-new-user
"
).
css
(
"
display
"
,
"
table
"
);
$
(
"
table#field_table
"
).
css
(
"
display
"
,
"
none
"
);
$
(
"
table#new-account-table
"
).
css
(
"
display
"
,
"
none
"
);
}
else
{
$
(
"
table#create-new-user
"
).
css
(
"
display
"
,
"
none
"
);
$
(
"
table#field_table
"
).
css
(
"
display
"
,
"
table
"
);
$
(
"
table#new-account-table
"
).
css
(
"
display
"
,
"
table
"
);
}
}
/**
* Log an user with it's Name and ID provider
*/
var
logUser
=
function
()
{
var
name
=
$
(
"
input#name
"
).
attr
(
"
value
"
);
var
IDProvider
=
$
(
"
input#id_provider
"
).
attr
(
"
value
"
);
if
(
name
)
{
setCurrentStorage
(
IDProvider
?
new
JIOStorage
(
name
,
IDProvider
)
:
new
LocalStorage
(
name
));
window
.
location
=
"
ung.html
"
;
}
}
/**
* create an account (to use only if UNG is also an ID provider)
*/
var
createNewUser
=
function
()
{
var
form
=
$
(
"
form#create-user
"
)[
0
];
/* check that the form is complete */
for
(
var
i
=
0
;
i
<
form
.
length
-
1
;
i
++
)
{
if
(
!
form
[
i
].
value
)
{
formError
(
"
please fill each field
"
);}
}
if
(
form
[
4
].
value
!=
form
[
5
].
value
)
{
formError
(
"
please enter the same password twice
"
);
form
[
4
].
value
=
""
;
form
[
5
].
value
=
""
;
}
if
(
!
testEMail
())
{
formError
(
"
please enter a valid email
"
);}
/* create the new user */
//JIO
}
/**
* Report an error when filling the form
*/
var
formError
=
function
(
message
)
{
$
(
"
td#form-message
"
).
attr
(
"
value
"
,
message
);
$
(
"
td#form-message
"
).
css
(
"
display
"
,
"
table-cell
"
);
}
/**
* check if an email address is valid
*/
function
testEMail
(
email
)
{
var
patern
=
"
^([a-zA-Z0-9]+(([
\
.
\
-
\
_]?[a-zA-Z0-9]+)+)?)
\
@(([a-zA-Z0-9]+[
\
.
\
-
\
_])+[a-zA-Z]{2,4})$
"
;
var
regEx
=
new
RegExp
(
patern
);
return
regEx
.
test
(
email
);
}
function
setFocus
()
{
login
=
document
.
getElementById
(
'
name
'
);
password
=
document
.
getElementById
(
'
password
'
);
if
(
login
.
value
!=
''
)
password
.
focus
();
else
login
.
focus
();
}
\ No newline at end of file
UNGProject/login.html
0 → 100644
View file @
12e1a7fe
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html
xmlns=
"http://www.w3.org/1999/xhtml"
xml:lang=
"en"
lang=
"en"
>
<head>
<meta
name=
"generator"
content=
"ERP5 - Copyright (C) 2001 - 2008. All rights reserved."
/>
<meta
name=
"description"
content=
"ERP5 Free Open Source ERP and CRM"
/>
<meta
name=
"keywords"
content=
""
/>
<meta
name=
"robots"
content=
"index, follow"
/>
<meta
http-equiv=
"Content-Type"
content=
"text/html; charset=utf-8"
/>
<meta
http-equiv=
"Content-Script-Type"
content=
"text/javascript"
/>
<meta
http-equiv=
"Content-Style-Type"
content=
"text/css"
/>
<title>
ERP5 | ERP5
</title>
<link
type=
"text/css"
rel=
"stylesheet"
href=
"css/jquery-ui.css"
/>
<link
type=
"text/css"
rel=
"stylesheet"
href=
"css/ung.css"
/>
<script
type=
"text/javascript"
src=
"js/jquery/jquery.js"
></script>
<script
type=
"text/javascript"
src=
"js/tools.js"
></script>
<script
type=
"text/javascript"
src=
"js/theme.js"
></script>
<script
type=
"text/javascript"
src=
"js/ung.js"
></script>
<script
type=
"text/javascript"
src=
"js/login.js"
></script>
<link
rel=
"icon"
type=
"image/x-icon"
href=
"images/ung/favicon.ico"
/>
<link
rel=
"shortcut icon"
type=
"image/x-icon"
href=
"images/ung/favicon.ico"
/>
<script
type=
"text/javascript"
>
var
init
=
function
()
{
tooltip
=
new
Tooltip
();
$
(
"
span.tooltipElement
"
)
.
mouseover
(
function
()
{
tooltip
.
show
(
"
sdf
"
)})
.
mouseout
(
function
()
{
tooltip
.
hide
();})
.
mousemove
(
function
(
event
)
{
tooltip
.
move
(
event
);});
}
$
(
document
).
ready
(
init
);
</script>
</head>
<body>
<div
class=
"container"
>
<div
class=
"navigation"
style=
"display:none"
>
<!-- Each aggregate of groups is a div wrapper -->
<div
class=
"wrapper"
id=
"wrapper_navigation"
>
<div
class=
" navigation-right"
>
<fieldset
class=
"widget"
>
<legend
class=
"group_title"
></legend>
<div
class=
"field"
title=
""
>
<label>
your_language
</label>
<div
class=
"input"
><div
>
<div
id=
"select_language"
>
<!-- todo : interface to change the language -->
</div>
</div></div>
</div>
</fieldset>
</div>
</div>
</div>
<div
class=
"main"
>
<!-- Each aggregate of groups is a div wrapper -->
<div
class=
"wrapper"
id=
"wrapper_main"
>
<div
class=
"content"
>
<fieldset
class=
"widget"
>
<p></p>
<h2>
Welcome to UNG Web Office
</h2>
<div
id=
"main-content"
>
<table
width=
"100%"
cellspacing=
"0"
cellpadding=
"0"
border=
"0"
>
<tbody>
<tr>
<td
valign=
"top"
>
<div
id=
"advertisement"
>
<b>
Sign in to edit documents, spreadsheets and drawing and share this document with other users
</b>
<br/>
<img
src=
"images/ung/ung-logo.png"
alt=
""
/>
</div>
</td>
<td>
<table
id=
"field_table"
style=
"display: table; width: 78%;"
>
<tbody>
<tr>
<td
align=
"center"
>
<table>
<tbody>
<tr>
<td
align=
"center"
colspan=
"2"
>
<font
size=
"-1"
>
Login in
</font>
</td>
</tr>
<tr><td></td></tr>
<tr>
<td
align=
"center"
>
<label
for=
"name"
>
Name
</label>
</td>
<td
align=
"center"
>
<input
id=
"name"
type=
"text"
value=
""
name=
"name"
/>
</td>
</tr>
<tr>
<td
align=
"center"
>
<label
for=
"id_provider"
>
ID provider
<span
class=
"tooltipElement"
onmouseover=
"tooltip.show('please, indicate the storage server<br/>where your data will be stored<br/>let free to store on your computer')"
>
(?)
</span>
</label>
</td>
<td>
<input
id=
"id_provider"
type=
"text"
value=
""
name=
"id_provider"
/>
</td>
</tr>
<tr>
<td
align=
"center"
colspan=
"2"
>
<input
class=
"submit"
onclick=
"logUser()"
type=
"button"
value=
"Login"
name=
"logged_in:method"
/>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
<tr>
<td>
<br/>
</td>
<td>
<table
id=
"create-new-user"
style=
"width: 78%; display: none;"
>
<tbody>
<tr>
<td>
<form
id=
"create-user"
action=
"javascript:createNewUser()"
method=
"post"
>
<table
width=
"100%"
>
<tbody>
<tr>
<td
align=
"center"
colspan=
"2"
>
<b>
Create an account
</b>
</td>
</tr>
<tr>
<td
id=
"form-message"
align=
"center"
colspan=
"2"
></td>
</tr>
<tr>
<td>
First Name
</td>
<td>
<input
type=
"text"
name=
"firstname"
/>
</td>
</tr>
<tr>
<td>
Last Name
</td>
<td>
<input
type=
"text"
name=
"lastname"
/>
</td>
</tr>
<tr>
<td>
Email
</td>
<td>
<input
type=
"text"
name=
"email"
/>
</td>
</tr>
<tr>
<td>
Login name
</td>
<td>
<input
type=
"text"
name=
"login_name"
/>
</td>
</tr>
<tr>
<td>
Password
</td>
<td>
<input
type=
"password"
name=
"password"
/>
</td>
</tr>
<tr>
<td>
Confirm Password
</td>
<td>
<input
type=
"password"
name=
"confirm"
/>
</td>
</tr>
<tr>
<td
align=
"center"
colspan=
"2"
>
<input
class=
"submit"
type=
"submit"
value=
"Create Account"
name=
"logged_in:method"
/>
</td>
</tr>
<tr>
<td
id=
"back-login"
align=
"left"
colspan=
"2"
>
<a
onclick=
"displayNewAccountForm(false)"
>
<<
Back
</a>
</td>
</tr>
</tbody>
</table>
</form>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
<tr><td></td></tr>
<tr>
<td></td>
<td>
<table
id=
"new-account-table"
style=
"display: table; width: 78%;"
>
<tbody>
<tr>
<td>
<table
width=
"100%"
>
<tbody>
<tr>
<td
align=
"center"
colspan=
"2"
>
<b>
Don't have an
<span
class=
"tooltipElement"
onmouseover=
"tooltip.show('register to store your data<br/>on our server<br/>(not implemented yet)')"
>
UNG Account
</span>
?
</b>
</td>
</tr>
<tr>
<td
id=
"new-account-form"
align=
"center"
colspan=
"2"
onclick=
"displayNewAccountForm(true)"
>
Create an account now
</td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
</div>
<div
class=
"footer"
>
<a
href=
"http://www.freecloudalliance.org/"
>
Free Cloud Alliance
</a>
-
<a
href=
"#"
>
Help
</a>
</div>
<p></p>
</fieldset>
</div>
</div>
</div>
</div>
<div
id=
"page_bottom"
>
</div>
<div
class=
"toolLocation"
></div>
</body>
</html>
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment