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
1e909891
Commit
1e909891
authored
May 29, 2012
by
Tristan Cavelier
Committed by
Sebastien Robin
Jun 07, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove the list of document from left nav bar.
Of course, the link is still there.
parent
f9b5718e
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
69 additions
and
71 deletions
+69
-71
OfficeJS/component/left_nav_bar.html
OfficeJS/component/left_nav_bar.html
+51
-50
OfficeJS/js/officejs.js
OfficeJS/js/officejs.js
+18
-21
No files found.
OfficeJS/component/left_nav_bar.html
View file @
1e909891
<div
class=
"container-fluid"
>
<div
class=
"well"
>
<ul
class=
"nav nav-list"
>
<ul
class=
"nav nav-list"
id=
"left-nav-bar"
>
<li
class=
"nav-header"
>
Nav
</li>
<li>
<a
href=
"#/login"
...
...
@@ -12,8 +12,12 @@
Login
</a>
</li>
<li
class=
"nav-header"
>
Tools
</li>
<li
class=
"texteditor"
>
</ul>
</div>
</div>
<script
type=
"text/html"
id=
"left-nav-tools"
>
<
li
class
=
"
nav-header left-nav-tools
"
>
Tools
<
/li
>
<
li
class
=
"
texteditor left-nav-tools
"
>
<
a
href
=
"
#/texteditor
"
onclick
=
"
javascript:
OfficeJS.open({app:'textEditor'});
...
...
@@ -22,7 +26,7 @@
New
Text
Document
<
/a
>
<
/li
>
<li
class=
"imgeditor
"
>
<
li
class
=
"
imgeditor left-nav-tools
"
>
<
a
href
=
"
#/imgeditor
"
onclick
=
"
javascript:
OfficeJS.open({app:'imgEditor'});
...
...
@@ -31,7 +35,7 @@
New
Image
<
/a
>
<
/li
>
<li
class=
"spreadsheet
"
>
<
li
class
=
"
spreadsheet left-nav-tools
"
>
<
a
href
=
"
#/spreadsheet
"
onclick
=
"
javascript:
OfficeJS.open({app:'speadsheet'});
...
...
@@ -40,7 +44,7 @@
New
Spreadsheet
<
/a
>
<
/li
>
<li
class=
"editpreference
s"
>
<
li
class
=
"
editpreferences left-nav-tool
s
"
>
<
a
href
=
"
#/editpreferences
"
onclick
=
"
javascript:
OfficeJS.open({app:'editpreferences'});
...
...
@@ -49,18 +53,15 @@
Edit
Preferences
<
/a
>
<
/li
>
<li
id=
"nav_document_list_header"
style=
"display:none"
>
<
li
id
=
"
nav_document_list_header left-nav-tools
"
>
<
a
href
=
"
#/doclist
"
onclick
=
"
javascript:
OfficeJS.open({app:'documentLister'});
return false;
"
>
<!-- <i class="icon-list"></i> --
>
<
i
class
=
"
icon-list
"
><
/i
>
Document
List
<
/a
>
<
div
id
=
"
nav_document_list
"
>
<
/div
>
<
/li
>
</ul>
</div>
</div>
</script>
OfficeJS/js/officejs.js
View file @
1e909891
...
...
@@ -30,7 +30,18 @@
leftnavbar
:
{
type
:
'
nav
'
,
path
:
'
component/left_nav_bar.html
'
,
gadgetid
:
'
page-left_nav_bar
'
gadgetid
:
'
page-left_nav_bar
'
,
bar_tools
:
false
,
update
:
function
()
{
var
elmt
;
if
(
priv
.
isJioSet
()
&&
!
this
.
bar_tools
)
{
// add tools to nav bar
elmt
=
document
.
querySelector
(
'
script#left-nav-tools
'
);
document
.
querySelector
(
'
#left-nav-bar
'
).
innerHTML
+=
elmt
.
innerHTML
;
this
.
bar_tools
=
true
;
}
}
},
login
:
{
type
:
'
loader
'
,
...
...
@@ -163,26 +174,6 @@
* @method showDocumentListInsideLeftNavBar
*/
priv
.
showDocumentListInsideLeftNavBar
=
function
()
{
var
i
,
html_string
=
'
<ul>
'
;
for
(
i
=
0
;
i
<
priv
.
data_object
.
documentList
.
length
;
i
+=
1
)
{
html_string
+=
'
<li>
'
+
'
<a href="#/texteditor:
'
+
priv
.
data_object
.
documentList
[
i
].
fileName
+
'
"
'
+
'
onclick="javascript:
'
+
'
OfficeJS.open({app:
\'
textEditor
\'
,fileName:
\'
'
+
priv
.
data_object
.
documentList
[
i
].
fileName
+
'
\'
});
'
+
'
return false;">
'
+
priv
.
data_object
.
documentList
[
i
].
fileName
+
'
</a>
'
+
'
</li>
'
;
}
html_string
+=
'
</ul>
'
;
if
(
html_string
===
'
<ul></ul>
'
)
{
// if there's no document
html_string
=
'
<ul><li>No document</li></ul>
'
;
}
// show list in the left nav bar
$
(
'
#nav_document_list
'
).
html
(
html_string
);
$
(
'
#nav_document_list_header
'
).
show
();
};
...
...
@@ -305,12 +296,18 @@
* @param {object} applicant The applicant informations
*/
that
.
setJio
=
function
(
storage
,
applicant
)
{
var
leftnavbar
;
if
(
priv
.
isJioSet
())
{
alert
(
'
Jio already set.
'
);
return
;
}
// if there is not any jio created
priv
.
jio
=
JIO
.
createNew
(
storage
,
applicant
);
// update left nav bar
leftnavbar
=
priv
.
getRealApplication
(
'
leftnavbar
'
);
if
(
typeof
leftnavbar
.
update
!==
'
undefined
'
)
{
leftnavbar
.
update
();
}
that
.
getList
();
};
...
...
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