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
78f133e6
Commit
78f133e6
authored
May 29, 2012
by
Tristan Cavelier
Committed by
Sebastien Robin
Jun 07, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Improving spreadsheet in officeJS.
parent
4cbc1904
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
60 additions
and
14 deletions
+60
-14
OfficeJS/component/jquery-sheet.html
OfficeJS/component/jquery-sheet.html
+41
-10
OfficeJS/component/login.html
OfficeJS/component/login.html
+3
-3
OfficeJS/js/officejs.js
OfficeJS/js/officejs.js
+16
-1
No files found.
OfficeJS/component/jquery-sheet.html
View file @
78f133e6
...
...
@@ -61,11 +61,14 @@
<!--
$
(
function
(){
//Here is where we initiate the sheets
//every time sheet is created it creates a new jQuery.sheet.instance (array), to manipulate each sheet, the jQuery object is returned
$
(
'
#jQuerySheet0
'
).
sheet
({
//every time sheet is created it creates a new jQuery.sheet.instance
//(array), to manipulate each sheet, the jQuery object is returned
$
(
'
#jQuerySheet
'
).
sheet
({
title
:
''
,
inlineMenu
:
inlineMenu
(
$
.
sheet
.
instance
),
urlGet
:
'
component/newspreadsheet.html
'
,
// buildSheet: true,
editable
:
true
,
autoFiller
:
true
});
...
...
@@ -202,14 +205,40 @@ function goToObj(s){
</style>
</head>
<body>
<div
id=
"jQuerySheet0"
class=
"jQuerySheet"
style=
"height: 450px;"
>
<div>
<input
type=
"text"
name=
"fileName"
id=
"input_fileName"
value=
""
placeholder=
"File name here"
/>
<button
type=
"submit"
class=
"btn btn-primary"
onclick=
"OfficeJS.save($('#input_fileName').attr('value'));"
>
<i
class=
"icon-download-alt icon-white"
></i>
Save
</button>
<button
type=
"submit"
class=
"btn"
onclick=
"OfficeJS.load($('#input_fileName').attr('value'));"
>
<i
class=
"icon-upload"
></i>
Load
</button>
<button
type=
"submit"
class=
"btn btn-danger"
onclick=
"OfficeJS.remove($('#input_fileName').attr('value'));"
>
<i
class=
"icon-remove icon-white"
></i>
Remove
</button>
</div>
<div
id=
"jQuerySheet"
class=
"jQuerySheet"
style=
"height: 450px;"
>
</div>
<span
id=
"inlineMenu"
style=
"display: none;"
>
<span>
<a
href=
"#"
onclick=
"sheetInstance.controlFactory.addRow(); return false;"
title=
"Insert Row After Selected"
>
<img
alt=
"Insert Row After Selected"
src=
"lib/jquery.sheet/images/sheet_row_add.png"
/>
<img
alt=
"Insert Row After Selected"
src=
"lib/jquery.sheet/images/sheet_row_add.png"
/>
</a>
<a
href=
"#"
onclick=
"sheetInstance.controlFactory.addRow(null, true);
...
...
@@ -234,7 +263,8 @@ function goToObj(s){
<a
href=
"#"
onclick=
"sheetInstance.deleteRow(); return false;"
title=
"Delete Row"
>
<img
alt=
"Delete Row"
src=
"lib/jquery.sheet/images/sheet_row_delete.png"
/>
<img
alt=
"Delete Row"
src=
"lib/jquery.sheet/images/sheet_row_delete.png"
/>
</a>
<a
href=
"#"
onclick=
"sheetInstance.controlFactory.addColumn(); return false;"
...
...
@@ -276,11 +306,12 @@ function goToObj(s){
title=
"Get Cell Range"
>
<img
alt=
"Get Cell Range"
src=
"lib/jquery.sheet/images/sheet_get_range.png"
/>
</a>
<a
href=
"#"
onclick=
"sheetInstance.s.fnSave();
return false;"
title=
"Save Sheets"
>
<img
alt=
"Save Sheet"
src=
"lib/jquery.sheet/images/disk.png"
/></a>
<!-- <a href="#" -->
<!-- onclick="sheetInstance.s.fnSave(); -->
<!-- return false;" -->
<!-- title="Save Sheets"> -->
<!-- <img alt="Save Sheet" src="lib/jquery.sheet/images/disk.png"/> -->
<!-- </a> -->
<a
href=
"#"
onclick=
"sheetInstance.deleteSheet(); return false;"
title=
"Delete Current Sheet"
>
...
...
OfficeJS/component/login.html
View file @
78f133e6
...
...
@@ -5,11 +5,11 @@
</label>
<div
class=
"controls docs-input-sizes"
>
<input
class=
"input-xlarge"
value=
"{"type":"local","userName":"tristan"}"
type=
"text"
name=
"JSONstorage"
id=
"input_json_storage"
value=
"{"type":"local","userName":"tristan"}"
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"
}" -->
<!-- value="{"type":"dav","userName":"tristan","password":"mdp","location":"http://localhost:80"
}" -->
<!-- value="{"type":"replicate","storageArray":[{"type":"local","userName":"tristan"},{"type":"dav","userName":"tristan","password":"mdp","location":"http://localhost:80"}]
}" -->
</div>
<label
class=
"control-label"
for=
"JSONapplicantID"
>
...
...
OfficeJS/js/officejs.js
View file @
78f133e6
...
...
@@ -76,7 +76,22 @@
'
jquery-sheet
'
:
{
type
:
'
editor
'
,
path
:
'
component/jquery-sheet.html
'
,
gadgetid
:
'
page-content
'
gadgetid
:
'
page-content
'
,
getContent
:
function
()
{
return
JSON
.
stringify
(
$
.
sheet
.
instance
[
0
].
exportSheet
.
json
()
);
},
setContent
:
function
(
content
)
{
$
(
'
#jQuerySheet
'
).
sheet
({
title
:
''
,
inlineMenu
:
inlineMenu
(
$
.
sheet
.
instance
),
buildSheet
:
$
.
sheet
.
makeTable
.
json
(
JSON
.
parse
(
content
)
),
autoFiller
:
true
});
}
},
'
svg-edit
'
:
{
type
:
'
editor
'
,
...
...
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