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
916cae47
Commit
916cae47
authored
May 24, 2012
by
Tristan Cavelier
Committed by
Sebastien Robin
Jun 07, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make renderjs work with renderjs.
parent
d5235038
Changes
10
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
542 additions
and
438 deletions
+542
-438
OfficeJS/component/aloha.html
OfficeJS/component/aloha.html
+40
-0
OfficeJS/component/elrte.html
OfficeJS/component/elrte.html
+78
-0
OfficeJS/component/left_nav_bar.html
OfficeJS/component/left_nav_bar.html
+34
-0
OfficeJS/component/login.html
OfficeJS/component/login.html
+33
-0
OfficeJS/component/texteditor.html
OfficeJS/component/texteditor.html
+11
-0
OfficeJS/component/top_nav_bar.html
OfficeJS/component/top_nav_bar.html
+57
-0
OfficeJS/component/xinha.html
OfficeJS/component/xinha.html
+51
-0
OfficeJS/index.html
OfficeJS/index.html
+25
-170
OfficeJS/js/moduleloader.js
OfficeJS/js/moduleloader.js
+3
-15
OfficeJS/js/officejs.js
OfficeJS/js/officejs.js
+210
-253
No files found.
OfficeJS/component/aloha.html
0 → 100644
View file @
916cae47
<!doctype html>
<html
xmlns=
"http://www.w3.org/1999/xhtml"
>
<head>
<title>
Aloha Editor Example
</title>
<!-- load the Aloha Editor core and some plugins -->
<script
src=
"http://cdn.aloha-editor.org/current/lib/aloha.js"
data-aloha-plugins=
"common/format,
common/list,
common/link,
common/highlighteditables"
>
</script>
<!-- load the Aloha Editor CSS styles -->
<link
href=
"http://cdn.aloha-editor.org/current/css/aloha.css"
rel=
"stylesheet"
type=
"text/css"
/>
<!-- make all elements with class="editable" editable with Aloha Editor -->
<script
type=
"text/javascript"
>
<!--
Aloha
.
ready
(
function
()
{
var
$
=
Aloha
.
jQuery
;
$
(
'
.editable
'
).
aloha
();
});
//-->
</script>
</head>
<body>
<h1
class=
"editable"
>
Aloha Editor Example
</h1>
<p
class=
"editable"
>
Click to edit this paragraph.
</p>
<div
class=
"editable"
>
<p>
This is an editable div container.
</p>
<p>
Follow us on
<a
href=
"http://twitter.com/alohaeditor"
>
Twitter
</a>
.
</p>
<ul>
<li>
list item one
</li>
<li>
list item two
</li>
</ul>
</div>
<p>
Use Aloha Editor your existing textarea elements:
</p>
<textarea
class=
"editable"
>
An editable textarea.
</textarea>
</body>
</html>
OfficeJS/component/elrte.html
0 → 100644
View file @
916cae47
<!DOCTYPE html>
<html
lang=
"en"
>
<head>
<meta
http-equiv=
"Content-Type"
content=
"text/html; charset=utf-8"
>
<title>
elRTE
</title>
<!-- jQuery and jQuery UI -->
<script
src=
"lib/elrte/js/jquery-1.6.1.min.js"
type=
"text/javascript"
charset=
"utf-8"
>
</script>
<script
src=
"lib/elrte/js/jquery-ui-1.8.13.custom.min.js"
type=
"text/javascript"
charset=
"utf-8"
>
</script>
<link
rel=
"stylesheet"
href=
"lib/elrte/css/smoothness/jquery-ui-1.8.13.custom.css"
type=
"text/css"
media=
"screen"
charset=
"utf-8"
/>
<!-- elRTE -->
<script
src=
"lib/elrte/js/elrte.min.js"
type=
"text/javascript"
charset=
"utf-8"
>
</script>
<link
rel=
"stylesheet"
href=
"lib/elrte/css/elrte.min.css"
type=
"text/css"
media=
"screen"
charset=
"utf-8"
/>
<!-- elRTE translation messages -->
<script
src=
"lib/elrte/js/i18n/elrte.en.js"
type=
"text/javascript"
charset=
"utf-8"
>
</script>
<script
type=
"text/javascript"
charset=
"utf-8"
>
<!--
$
().
ready
(
function
()
{
var
opts
=
{
cssClass
:
'
el-rte
'
,
lang
:
'
en
'
,
height
:
450
,
toolbar
:
'
complete
'
,
cssfiles
:
[
'
lib/elrte/css/elrte-inner.css
'
]
}
$
(
'
#elrte_editor
'
).
elrte
(
opts
);
})
//-->
</script>
</head>
<body>
<div>
<input
type=
"text"
name=
"fileName"
id=
"input_fileName"
value=
"{{CurrentFileName}}"
placeholder=
"File name here"
/>
<button
type=
"submit"
class=
"btn btn-primary"
onclick=
"OfficeJS.save($('#input_fileName').attr('value'),OfficeJS.getContentOf('elrte'));"
>
<i
class=
"icon-download-alt icon-white"
></i>
Save
</button>
<button
type=
"submit"
class=
"btn"
onclick=
"OfficeJS.load($('#input_fileName'));"
>
<i
class=
"icon-upload"
></i>
Load
</button>
<button
type=
"submit"
class=
"btn btn-danger"
onclick=
"OfficeJS.remove($('#input_fileName'));"
>
<i
class=
"icon-remove icon-white"
></i>
Remove
</button>
</div>
<div
id=
"elrte_editor"
>
<h1>
OfficeJS elRTE texteditor
</h1><p>
This is a new document.
<br></p>
</div>
</body>
</html>
OfficeJS/component/left_nav_bar.html
0 → 100644
View file @
916cae47
<div
class=
"container-fluid"
>
<div
class=
"row-fluid"
>
<div
class=
"well"
>
<ul
class=
"nav nav-list"
>
<li
class=
"nav-header"
>
Nav
</li>
<li>
<a
href=
"#/login"
onclick=
"javascript:
TabbularGadget.addNewTabGadget(
'component/login.html','page-content');
return false;"
>
<i
class=
"icon-ok"
>
</i>
Login
</a>
</li>
<li
class=
"nav-header"
>
Tools
</li>
<li
class=
"texteditor"
>
<a
href=
"#/texteditor"
onclick=
"javascript:
TabbularGadget.addNewTabGadget(
OfficeJS.getPathOf(OfficeJS.getPreference('textEditor')),
'page-content');
return false;"
>
<i
class=
"icon-font"
></i>
Text Editor
</a>
</li>
<li
class=
"nav-header"
><a
href=
"#/doclist"
>
Document List
</a></li>
<div
id=
"document_list"
></div>
</ul>
</div>
</div>
</div>
OfficeJS/component/login.html
0 → 100644
View file @
916cae47
<article>
<div
class=
"control-group"
>
<label
class=
"control-label"
for=
"input_json_storage"
>
JSON Storage
</label>
<div
class=
"controls docs-input-sizes"
>
<input
class=
"input-xlarge"
value=
"{"type":"local","userName":"tristan"}"
type=
"text"
name=
"JSONstorage"
id=
"input_json_storage"
placeholder=
"storage"
/>
<!-- value="{"type":"replicate","storageArray":[{"type":"local","userName":"tristan"},{"type":"dav","userName":"tristan","password":"mdp","location":"http://localhost:80"}]}" -->
<!-- value="{"type":"dav","userName":"tristan","password":"mdp","location":"http://localhost:80"}" -->
</div>
<label
class=
"control-label"
for=
"JSONapplicantID"
>
JSON Applicant
</label>
<div
class=
"controls docs-input-sizes"
>
<input
class=
"input-xlarge"
type=
"text"
name=
"JSONapplicant"
id=
"input_json_applicant"
value=
"{"ID":"jiotests"}"
placeholder=
"applicant"
/>
</div>
</div>
<button
type=
"submit"
class=
"btn"
onclick=
"OfficeJS.setJio(
$('#input_json_storage').attr('value'),
$('#input_json_applicant').attr('value'));"
>
Create New JIO
</button>
</article>
OfficeJS/component/texteditor.html
0 → 100644
View file @
916cae47
<div>
Test
</div>
<div
id=
"texteditor_field"
></div>
<script
type=
"text/javascript"
>
<!--
TabbularGadget
.
addNewTabGadget
(
'
component/
'
+
OfficeJS
.
getPreference
(
'
textEditor
'
)
+
'
.html
'
,
'
texteditor_field
'
);
//-->
</script>
OfficeJS/component/top_nav_bar.html
0 → 100644
View file @
916cae47
<div
id=
"loading"
style=
"position:absolute;
right:10px;
top:10px;
width:100px;
height:40px;"
>
<div
id=
"loading_spin"
style=
"background-image:url('img/icons/loading_spin_16.gif');
width:16px;
height:16px;
float:right;
display:none;"
>
</div>
<div
id=
"loading_spin"
style=
"width:16px;
height:16px;
float:right;"
>
</div>
<div
id=
"loading_getlist"
style=
"float:right;
display:none;"
>
<i
class=
"icon-refresh icon-white"
></i>
</div>
<div
id=
"loading_save"
style=
"float:right;
display:none;"
>
<i
class=
"icon-download-alt icon-white"
></i>
</div>
<div
id=
"loading_load"
style=
"float:right;
display:none;"
>
<i
class=
"icon-upload icon-white"
></i>
</div>
<div
id=
"loading_remove"
style=
"float:right;
display:none;"
>
<i
class=
"icon-remove icon-white"
></i>
</div>
</div>
<div
class=
"navbar"
>
<div
class=
"navbar-inner"
>
<div
class=
"container-fluid"
>
<div
class=
"row-fluid"
>
<div
class=
"span2"
>
<h1>
OfficeJS
</h1>
</div>
<div
class=
"span10"
>
<ul
class=
"nav"
>
<li><a
href=
"#"
>
Nav
</a></li>
<li><a
href=
"#/about"
>
About
</a></li>
<li><a
href=
"#/contact"
>
Contact
</a></li>
</ul>
</div>
</div>
</div>
</div>
</div>
OfficeJS/component/xinha.html
0 → 100644
View file @
916cae47
<!-- js scripts -->
<script
type=
"text/javascript"
>
<!--
_editor_url
=
window
.
location
+
''
;
_editor_url
=
_editor_url
.
split
(
'
#
'
)[
0
].
split
(
'
/
'
);
_editor_url
.
pop
();
_editor_url
=
_editor_url
.
join
(
'
/
'
)
+
'
/lib/xinha
'
;
_editor_lang
=
"
en
"
;
//-->
</script>
<script
type=
"text/javascript"
src=
"lib/xinha/XinhaCore.js"
>
</script>
<script
type=
"text/javascript"
src=
"js/XinhaConfig.js"
>
</script>
<article>
<div
class=
"control-group"
>
<div
class=
"controls docs-input-sizes"
style=
"float: left"
>
<input
type=
"text"
name=
"fileName"
id=
"input_fileName"
value=
"{{CurrentFileName}}"
placeholder=
"file name"
/>
</div>
<div
style=
"float: right;"
>
<button
type=
"submit"
class=
"btn btn-primary"
onclick=
"OfficeJS.save()"
>
<i
class=
"icon-download-alt icon-white"
></i>
Save
</button>
<button
type=
"submit"
class=
"btn"
onclick=
"OfficeJS.load()"
>
<i
class=
"icon-upload"
></i>
Load
</button>
<button
type=
"submit"
class=
"btn btn-danger"
onclick=
"OfficeJS.remove()"
>
<i
class=
"icon-remove icon-white"
></i>
Remove
</button>
</div>
</div><br
/>
<textarea
name=
"textEditor"
id=
"textEditor"
rows=
"25"
cols=
"50"
style=
"width:100%"
>
</textarea>
<script
type=
"text/javascript"
>
<!--
xinha_init
();
//-->
</script>
</article>
OfficeJS/index.html
View file @
916cae47
...
...
@@ -6,181 +6,36 @@
<link
rel=
"shortcut icon"
href=
"img/icons/favicon.png"
/>
<link
rel=
"stylesheet"
href=
"lib/bootstrap/css/bootstrap.min.css"
/>
<title>
OfficeJS
</title>
<!-- js scripts -->
<script
type=
"text/javascript"
src=
"lib/xinha/XinhaLoader.js?lang=en"
>
</script>
<script
type=
"text/javascript"
src=
"js/XinhaConfig.js"
>
</script>
<script
type=
"text/javascript"
src=
"lib/icanhaz/ICanHaz.min.js"
></script>
<script
data-main=
"js/officejs"
type=
"text/javascript"
src=
"lib/require/require.js"
></script>
<!-- html scripts -->
<script
id=
"home"
type=
"text/html"
>
<
article
>
<
p
>
home
<
/p
>
<
/article
>
</script>
<script
id=
"about"
type=
"text/html"
>
<
article
>
<
p
>
about
<
/p
>
<
/article
>
</script>
<script
id=
"login"
type=
"text/html"
>
<
article
>
<
div
class
=
"
control-group
"
>
<
label
class
=
"
control-label
"
for
=
"
input_json_storage
"
>
JSON
Storage
<
/label
>
<
div
class
=
"
controls docs-input-sizes
"
>
<
input
class
=
"
input-xlarge
"
type
=
"
text
"
name
=
"
JSONstorage
"
id
=
"
input_json_storage
"
value
=
"
{"type":"replicate","storageArray":[{"type":"local","userName":"tristan"},{"type":"dav","userName":"tristan","password":"mdp","location":"http://localhost:80"}]}
"
placeholder
=
"
storage
"
/>
<!--
value
=
"
{"type":"dav","userName":"tristan","password":"mdp","location":"http://localhost:80"}
"
-->
<!--
value
=
"
{"type":"local","userName":"tristan"}
"
-->
<
/div
>
<
label
class
=
"
control-label
"
for
=
"
JSONapplicantID
"
>
JSON
Applicant
<
/label
>
<
div
class
=
"
controls docs-input-sizes
"
>
<
input
class
=
"
input-xlarge
"
type
=
"
text
"
name
=
"
JSONapplicant
"
id
=
"
input_json_applicant
"
value
=
"
{"ID":"jiotests"}
"
placeholder
=
"
applicant
"
/>
<
/div
>
<
/div
>
<
button
type
=
"
submit
"
class
=
"
btn
"
onclick
=
"
OfficeJS.setJio()
"
>
Create
New
JIO
<
/button
>
<
/article
>
</script>
<script
id=
"text_editor"
type=
"text/html"
>
<
article
>
<
div
class
=
"
control-group
"
>
<
div
class
=
"
span5
"
>
<!--
<
label
class
=
"
control-label
"
for
=
"
fileName
"
>
File
Name
<
/label> --
>
<
div
class
=
"
controls docs-input-sizes
"
>
<
input
type
=
"
text
"
name
=
"
fileName
"
id
=
"
input_fileName
"
value
=
"
{{CurrentFileName}}
"
placeholder
=
"
file name
"
/>
<
/div
>
<!--
<
label
class
=
"
control-label
"
for
=
"
fileContent
"
>
File
Content
<
/label> --
>
<!--
<
div
class
=
"
controls docs-input-sizes
"
>
-->
<!--
<
input
type
=
"
text
"
name
=
"
fileContent
"
id
=
"
input_content
"
-->
<!--
value
=
""
placeholder
=
"
content
"
/>
-->
<!--
<
/div> --
>
<
/div
>
<
div
class
=
"
span5
"
>
<
button
type
=
"
submit
"
class
=
"
btn btn-primary
"
onclick
=
"
OfficeJS.save()
"
>
<
i
class
=
"
icon-download-alt icon-white
"
><
/i
>
Save
<
/button> 
;
<
button
type
=
"
submit
"
class
=
"
btn
"
onclick
=
"
OfficeJS.load()
"
>
<
i
class
=
"
icon-upload
"
><
/i
>
Load
<
/button> 
;
<
button
type
=
"
submit
"
class
=
"
btn btn-danger
"
onclick
=
"
OfficeJS.remove()
"
>
<
i
class
=
"
icon-remove icon-white
"
><
/i
>
Remove
<
/button> 
;
<!--
<
button
type
=
"
submit
"
-->
<!--
class
=
"
btn
"
-->
<!--
onclick
=
"
OfficeJS.getlist()
"
>
-->
<!--
<
i
class
=
"
icon-refresh
"
><
/i> --
>
<!--
Get
List
-->
<!--
<
/button> --
>
<
/div
>
<
/div
>
<!--
<
div
id
=
"
document_list
"
class
=
"
span4
"
>
-->
<!--
<
ul
>
-->
<!--
{{
#
DocumentList
}}
-->
<!--
<
li
>
{{
fileName
}}
<
/li> --
>
<!--
{{
/
DocumentList
}}
-->
<!--
<
/ul> --
>
<!--
<
/div> --
>
<
/article
>
</script>
<script
id=
"document_list"
type=
"text/html"
>
<
article
>
<
ul
>
{{
#
DocumentList
}}
<
li
><
a
href
=
"
#/texteditor:fileName={{fileName}}
"
>
{{
fileName
}}
<
/a>, created: {{creationDate}}, last modified: {{lastModified}}</
li
>
{{
/
DocumentList
}}
<
/ul
>
<
/article
>
</script>
<script
type=
"text/javascript"
src=
"lib/jquery/jquery.js"
></script>
<script
type=
"text/javascript"
src=
"lib/jstorage/jstorage.js"
></script>
<script
type=
"text/javascript"
src=
"lib/renderjs/renderjs.js"
></script>
<script
type=
"text/javascript"
src=
"src/localorcookiestorage.js"
></script>
<script
type=
"text/javascript"
src=
"src/jio.js"
></script>
<script
type=
"text/javascript"
src=
"lib/base64/base64.js"
></script>
<script
type=
"text/javascript"
src=
"src/jio.storage.js"
></script>
</head>
<body>
<div
id=
"loading"
style=
"position:absolute;right:10px;top:10px;width:100px;height:40px;"
>
<div
id=
"loading_spin"
style=
"background-image:url('img/icons/loading_spin_16.gif');width:16px;height:16px;float:right;display:none;"
></div>
<div
id=
"loading_spin"
style=
"width:16px;height:16px;float:right;"
></div>
<div
id=
"loading_getlist"
style=
"float:right;display:none;"
><i
class=
"icon-refresh icon-white"
></i></div>
<div
id=
"loading_save"
style=
"float:right;display:none;"
><i
class=
"icon-download-alt icon-white"
></i></div>
<div
id=
"loading_load"
style=
"float:right;display:none;"
><i
class=
"icon-upload icon-white"
></i></div>
<div
id=
"loading_remove"
style=
"float:right;display:none;"
><i
class=
"icon-remove icon-white"
></i></div>
</div>
<div
class=
"navbar"
>
<div
class=
"navbar-inner"
>
<div
class=
"container-fluid"
>
<div
class=
"row-fluid"
>
<div
class=
"span2"
>
<h1>
OfficeJS
</h1>
</div>
<div
class=
"span10"
>
<ul
class=
"nav"
>
<li><a
href=
"#"
>
Nav
</a></li>
<li><a
href=
"#/about"
>
About
</a></li>
<li><a
href=
"#/contact"
>
Contact
</a></li>
</ul>
</div>
</div>
</div>
<header>
<div
id=
"page-top_nav_bar"
gadget:property=
"{"cacheable":"1",
"cache_id":"top_nav_bar"}"
>
</div>
</header>
<nav
class=
"span4"
>
<div
id=
"page-left_nav_bar"
gadget:property=
"{"cacheable":"1",
"cache_id":"left_nav_bar"}"
>
</div>
</
di
v>
</
na
v>
<div
class=
"container-fluid"
>
<div
class=
"row-fluid"
>
<div
class=
"span2"
>
<div
class=
"well"
>
<ul
class=
"nav nav-list"
>
<li
class=
"nav-header"
>
Nav
</li>
<li><a
href=
"#/login"
><i
class=
"icon-ok"
></i>
Login
</a></li>
<li
class=
"nav-header"
>
Tools
</li>
<li
class=
"texteditor"
>
<a
href=
"#/texteditor"
><i
class=
"icon-font"
></i>
Text Editor
</a>
</li>
<li
class=
"nav-header"
><a
href=
"#/doclist"
>
Document List
</a></li>
<div
id=
"document_list"
></div>
</ul>
</div>
</div>
<section
class=
"span10"
id=
"main"
>
<!-- Body content -->
<article>
<p>
Loading...
</p>
</article>
</section>
<section
class=
"span10"
id=
"text_editor"
style=
"display: none"
>
<textarea
name=
"textEditor"
id=
"textEditor"
rows=
"25"
cols=
"50"
style=
"width: 100%"
>
</textarea>
</section>
<section
class=
"span12"
>
<div
id=
"page-content"
>
</div>
</div>
</section>
<script
type=
"text/javascript"
src=
"js/officejs.js"
></script>
</body>
</html>
OfficeJS/js/moduleloader.js
View file @
916cae47
define
(
'
OfficeJS
'
,
[
'
LocalOrCookieStorage
'
,
'
jQuery
'
,
'
JIO
'
,
'
Base64
'
,
'
JIOStorages
'
],
function
(
LocalOrCookieStorage
,
jQuery
,
JIO
,
Base64
)
{
return
{
LocalOrCookieStorage
:
LocalOrCookieStorage
,
jQuery
:
jQuery
,
JIO
:
JIO
,
Base64
:
Base64
,
ich
:
window
.
ich
};
define
(
'
OfficeJS
'
,[
'
order!jQuery
'
,
'
order!jStorage
'
,
'
order!RenderJS
'
],
function
()
{
return
;
});
OfficeJS/js/officejs.js
View file @
916cae47
This diff is collapsed.
Click to expand it.
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