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
270253a7
Commit
270253a7
authored
Jun 16, 2011
by
François Billioud
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove storage server
parent
147ede8a
Changes
11
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
39 additions
and
144 deletions
+39
-144
UNGProject/dav/.htaccess
UNGProject/dav/.htaccess
+0
-7
UNGProject/dav/.htpasswd
UNGProject/dav/.htpasswd
+0
-1
UNGProject/dav/temp
UNGProject/dav/temp
+0
-5
UNGProject/dav/temp.json
UNGProject/dav/temp.json
+0
-1
UNGProject/dav/temp.xml
UNGProject/dav/temp.xml
+0
-7
UNGProject/js/editor.js
UNGProject/js/editor.js
+24
-25
UNGProject/js/theme.js
UNGProject/js/theme.js
+11
-13
UNGProject/theme.html
UNGProject/theme.html
+4
-1
index.html
index.html
+0
-9
oauth2/.htaccess
oauth2/.htaccess
+0
-1
oauth2/auth/index.php
oauth2/auth/index.php
+0
-74
No files found.
UNGProject/dav/.htaccess
deleted
100644 → 0
View file @
147ede8a
AuthType
"Basic"
AuthName
"nom"
AuthUserFile
"http://localhost/dav/.htpasswd"
Header
always
set
Access-Control-Allow-Methods "GET, POST, DELETE, OPTIONS, PUT"
Header
always
set
Access-Control-Allow-Headers "Content-Type, X-Requested-With, X-HTTP-Method-Override, Accept, Authorization"
Header
always
set
Access-Control-Allow-Credentials "true"
Header
always
set
Access-Control-Allow-Origin "*"
UNGProject/dav/.htpasswd
deleted
100644 → 0
View file @
147ede8a
nom:test
UNGProject/dav/temp
deleted
100644 → 0
View file @
147ede8a
CSQdhQSKD
QSDFSDKJGQ
SDFJGSKDJ
djflsjfdghsl </br>
sdfgmj
\ No newline at end of file
UNGProject/dav/temp.json
deleted
100644 → 0
View file @
147ede8a
{
"author"
:
"test"
,
"title"
:
"test"
,
"content"
:
"<div align=
\"
center
\"
>
\u
000a <h1>Test</h1>
\u
000a <h2 align=
\"
left
\"
><u style=
\"
color: #ff1f1f;
\"
>Mon site HTML</u></h2>
\u
000a <h5 align=
\"
left
\"
><font face=
\"
wingdings
\"
>C'est moche, mais ça marche !</font><br /></h5>
\u
000a </div>
\u
000a <div align=
\"
center
\"
> </div>"
,
"creation"
:
"Mon, 06 Jun 2011 15:27:08 GMT"
,
"lastModif"
:
"Tue, 07 Jun 2011 12:26:31 GMT"
}
\ No newline at end of file
UNGProject/dav/temp.xml
deleted
100644 → 0
View file @
147ede8a
<?xml version='1.0' encoding='UTF-8'?>
<Document>
<Auth></Auth>
<LastMod></LastMod>
<Title></Title>
<Content>
test
</Content>
</Document>
UNGProject/js/editor.js
View file @
270253a7
/**
* Editors
*/
var
Xinha
=
function
()
{
this
.
name
=
"
Xinha
"
;
this
.
load
=
function
()
{
_editor_url
=
"
http://www.ungproject.com/xinha/
"
;
getCurrentPage
().
include
(
"
xinha/XinhaCore.js
"
,
"
script
"
);
getCurrentPage
().
include
(
"
xinha/config.js
"
,
"
script
"
);
xinha_init
();
}
this
.
saveEdition
=
function
()
{
var
textArea
=
getCurrentPage
().
getHTML
().
getElementById
(
"
input_area
"
);
getCurrentDocument
().
setContent
(
textArea
.
content
);
//saveCurrentDocument(); : JIO function
}
this
.
loadContent
=
function
()
{
var
textArea
=
getCurrentPage
().
getHTML
().
getElementById
(
"
input_area
"
);
textArea
.
content
=
getCurrentDocument
().
getContent
();
}
this
.
load
();
}
/**
* Text documents
...
...
@@ -40,6 +16,7 @@ JSONTextDocument.prototype.saveEdition = function(content) {
this
.
setLastModification
(
currentTime
());
setCurrentDocument
(
this
);
}
JSONTextDocument
.
prototype
.
setAsCurrentDocument
=
function
()
{
getCurrentPage
().
displayDocumentTitle
(
this
);
getCurrentPage
().
displayDocumentState
(
this
);
...
...
@@ -53,10 +30,32 @@ getCurrentDocument = function() {
doc
.
__proto__
=
JSONTextDocument
.
prototype
;
return
doc
;
}
new
JSONTextDocument
();
//load the document (it's just for testing)
/**
* Editors
*/
var
Xinha
=
function
()
{
this
.
name
=
"
Xinha
"
;
this
.
load
=
function
()
{
_editor_url
=
"
http://www.ungproject.com/xinha/
"
;
getCurrentPage
().
include
(
"
xinha/XinhaCore.js
"
,
"
script
"
);
getCurrentPage
().
include
(
"
xinha/config.js
"
,
"
script
"
);
xinha_init
();
}
this
.
saveEdition
=
function
()
{
var
textArea
=
getCurrentPage
().
getHTML
().
getElementById
(
"
input_area
"
);
getCurrentDocument
().
setContent
(
textArea
.
content
);
//saveCurrentDocument(); : JIO function
}
this
.
loadContent
=
function
()
{
var
textArea
=
getCurrentPage
().
getHTML
().
getElementById
(
"
input_area
"
);
textArea
.
content
=
getCurrentDocument
().
getContent
();
}
this
.
load
();
}
/*
// save
...
...
UNGProject/js/theme.js
View file @
270253a7
/*
* global variables
*/
...
...
@@ -39,7 +40,7 @@ Page.prototype = {
type
:
"
GET
"
,
url
:
source
,
dataType
:
"
html
"
,
async
:
fals
e
,
async
:
tru
e
,
success
:
function
(
data
)
{
currentPage
.
setXML
(
data
);
}
...
...
@@ -93,7 +94,9 @@ Page.prototype = {
}
this
.
getHTML
().
getElementById
(
"
available_languages
"
).
innerHTML
=
avLang
;
},
displayUserName
:
function
(
user
)
{
this
.
getHTML
().
getElementById
(
"
userName
"
).
innerHTML
=
user
.
getName
();},
displayUserName
:
function
(
user
)
{
//alert($(this.getHTML()).find("html").html());
this
.
getHTML
().
getElementById
(
"
user_name
"
).
innerHTML
=
user
.
getName
();},
//document information
displayAuthorName
:
function
(
doc
)
{
this
.
getHTML
().
getElementById
(
"
author
"
).
innerHTML
=
doc
.
getAuthor
();},
...
...
@@ -128,8 +131,6 @@ var User = function() {
this
.
language
=
"
en
"
;
this
.
storage
=
"
http://www.unhosted-dav.com
"
;
this
.
identityProvider
=
"
http://www.webfinger.com
"
;
this
.
setAsCurrentUser
();
}
User
.
prototype
=
{
getName
:
function
()
{
return
this
.
name
;},
...
...
@@ -147,7 +148,6 @@ User.prototype = {
setAsCurrentUser
:
function
()
{
getCurrentPage
().
displayUserName
(
this
);
getCurrentPage
().
displayLanguages
(
this
);
setCurrentUser
(
this
);
}
}
getCurrentUser
=
function
()
{
...
...
@@ -155,8 +155,11 @@ getCurrentUser = function() {
user
.
__proto__
=
User
.
prototype
;
return
user
;
}
setCurrentUser
=
function
(
user
)
{
localStorage
.
setItem
(
"
currentUser
"
,
JSON
.
stringify
(
user
));}
setCurrentUser
=
function
(
user
)
{
localStorage
.
setItem
(
"
currentUser
"
,
JSON
.
stringify
(
user
));
user
.
setAsCurrentUser
();
}
//setCurrentUser(new User());
/**
...
...
@@ -172,8 +175,6 @@ var JSONDocument = function() {
this
.
creation
=
currentTime
();
this
.
lastModification
=
currentTime
();
this
.
state
=
Document
.
states
.
draft
;
this
.
setAsCurrentDocument
();
//temp
}
JSONDocument
.
prototype
=
{
//type
...
...
@@ -220,10 +221,7 @@ setCurrentDocument = function(doc) {localStorage.setItem("currentDocument",JSON.
/*
* tools
*/
currentTime
=
function
()
{
return
(
new
Date
()).
toUTCString
();}
cancel_sharing
=
function
()
{
alert
(
"
cancel
"
);}
translate
=
function
()
{
alert
(
"
translate
"
);}
submit
=
function
()
{
alert
(
"
submit
"
);}
//test = new User();
\ No newline at end of file
submit
=
function
()
{
alert
(
"
submit
"
);}
\ No newline at end of file
UNGProject/theme.html
View file @
270253a7
...
...
@@ -26,6 +26,7 @@
<script
type=
"text/javascript"
></script>
<script
type=
"text/javascript"
src=
"js/base64.js"
></script>
<script
type=
"text/javascript"
src=
"js/tools.js"
></script>
<script
type=
"text/javascript"
src=
"js/theme.js"
></script>
<script
type=
"text/javascript"
>
...
...
@@ -33,8 +34,10 @@
init
=
function
()
{
setCurrentPage
(
"
editor
"
);
new
User
();
doc
=
new
document
.
JSONTextDocument
();
//load the document (it's just for testing)
//doc.setAsCurrentDocument();
}
window
.
onload
=
init
;
$
(
document
).
ready
(
init
)
;
</script>
</head>
...
...
index.html
deleted
100644 → 0
View file @
147ede8a
<!DOCTYPE html>
<html
lang=
"en"
>
<head>
</head>
<body>
This the unhosted hive for $protocol://$domain. Please contact superman@$domain for more info about your unhosted account.
</body>
</html>
oauth2/.htaccess
deleted
100644 → 0
View file @
147ede8a
Options
MultiViews
oauth2/auth/index.php
deleted
100644 → 0
View file @
147ede8a
<?php
require_once
(
'../../unhosted/unhosted.php'
);
function
getString
(
$paramName
)
{
if
(
!
isset
(
$_POST
[
$paramName
]))
{
die
(
"Parameter
$paramName
not specified"
);
}
return
$_POST
[
$paramName
];
}
function
getDomain
(
$paramName
)
{
$domain
=
getString
(
$paramName
);
if
(
!
preg_match
(
'|^[a-z0-9-]+(\.[a-z0-9-]+)*$|i'
,
$domain
))
{
die
(
"Parameter
$paramName
should be a valid domain"
);
}
return
$domain
;
}
function
getUserAddress
(
$paramName
)
{
$userAddress
=
getString
(
$paramName
);
if
(
!
preg_match
(
'|^[a-z0-9-]+(\.[a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*$|i'
,
$userAddress
))
{
die
(
"Parameter
$paramName
is '
$userAddress
' but should be a valid user address"
);
}
return
$userAddress
;
}
if
(
count
(
$_POST
))
{
$unhostedAccount
=
new
UnhostedAccount
(
getUserAddress
(
"user_address"
),
getString
(
"pwd"
));
$token
=
$unhostedAccount
->
addAPP
(
getDomain
(
"scope"
));
if
(
$token
)
{
header
(
"Location:"
.
$_POST
[
"redirect_uri"
]
.
"?token="
.
$token
);
echo
"redirecting you back to the application.
\n
"
;
}
else
{
echo
"Wrong password!"
;
}
}
else
{
?>
<!DOCTYPE html>
<html
lang=
"en"
>
<head>
<meta
http-equiv=
"content-type"
content=
"text/html; charset=utf-8"
/>
<script
src=
"/html5.js"
></script>
<!-- this is the javascript allowing html5 to run in older browsers -->
<title>
My Unhosted node
</title>
<link
rel=
"stylesheet"
href=
"/css/uncompressed/reset.css"
/>
<link
rel=
"stylesheet"
href=
"/css/uncompressed/text.css"
/>
<link
rel=
"stylesheet"
href=
"/general.css"
/>
<link
rel=
"stylesheet"
href=
"/css/uncompressed/login.css"
/>
</head>
<header>
<h1><strong>
<?php
echo
UnhostedSettings
::
domain
?>
</strong>
Unhosted storage node
</h1>
</header>
<body>
<div
class=
"content"
>
<h2>
The app '
<?=
$_GET
[
"client_id"
]
?>
' wants to read and write the
<?=
$_GET
[
"scope"
]
?>
data in your unhosted account
</h2>
<form
method=
"post"
action=
""
>
<label>
User address:
</label><span
class=
"username"
>
<?=
$_GET
[
"user_address"
]
?>
</span>
<label
for=
"password"
>
Password:
</label>
<div
id=
"passAllow"
>
<form
method=
"POST"
action=
"?"
>
<input
type=
"password"
name=
"pwd"
value=
""
/>
<input
type=
"submit"
name=
"submit"
value=
"Allow"
/>
<input
type=
"hidden"
value=
"
<?=
$_GET
[
"user_address"
]
?>
"
name=
"user_address"
>
<input
type=
"hidden"
value=
"
<?=
$_GET
[
"scope"
]
?>
"
name=
"scope"
>
<input
type=
"hidden"
value=
"
<?=
$_GET
[
"redirect_uri"
]
?>
"
name=
"redirect_uri"
>
</form>
</div>
</form>
</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