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
3f423885
Commit
3f423885
authored
Jul 12, 2011
by
François Billioud
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add dialog box actions
parent
15d6eafd
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
86 additions
and
1 deletion
+86
-1
UNGProject/js/theme.js
UNGProject/js/theme.js
+55
-1
UNGProject/xml/xmlElements.xml
UNGProject/xml/xmlElements.xml
+31
-0
No files found.
UNGProject/js/theme.js
View file @
3f423885
...
...
@@ -124,7 +124,10 @@ Page.prototype = {
//document information
displayLastUserName
:
function
(
doc
)
{
$
(
"
a#author
"
).
html
(
doc
.
getAuthor
());},
displayLastModification
:
function
(
doc
)
{
$
(
"
a#last_update
"
).
html
(
doc
.
getLastModification
());},
displayDocumentTitle
:
function
(
doc
)
{
$
(
"
a#document_title
"
).
html
(
doc
.
getTitle
());},
displayDocumentTitle
:
function
(
doc
)
{
var
title
=
(
doc
.
getTitle
().
length
<
30
)
?
doc
.
getTitle
()
:
doc
.
getTitle
().
substring
(
0
,
30
)
+
"
...
"
;
$
(
"
a#document_title
"
).
html
(
title
);
},
displayDocumentContent
:
function
(
doc
)
{
this
.
getEditor
().
loadContentFromDocument
(
doc
);},
displayDocumentState
:
function
(
doc
)
{
$
(
"
a#document_state
"
).
html
(
doc
.
getState
()[
getCurrentUser
().
getLanguage
()]);},
...
...
@@ -300,6 +303,57 @@ editDocumentSettings = function() {
}
)}
/**
* open a dialog box to upload a document
*/
uploadDocument
=
function
()
{
loadFile
(
"
xml/xmlElements.xml
"
,
"
html
"
,
function
(
data
)
{
$
(
"
upload
"
,
data
).
dialog
({
autoOpen
:
false
,
height
:
116
,
width
:
346
,
modal
:
true
});
});
}
/**
* open a dialog box to propose gadgets
*/
gadgetListBox
=
function
()
{
loadFile
(
"
xml/xmlElements.xml
"
,
"
html
"
,
function
(
data
)
{
$
(
"
gadget
"
,
data
).
dialog
({
autoOpen
:
false
,
height
:
416
,
width
:
600
,
modal
:
true
,
buttons
:
{
"
Add
"
:
function
(){
var
gadgetIdList
=
Array
();
$
(
"
table#gadget-table tbody tr td input
"
).
each
(
function
(){
if
(
this
.
checked
){
gadgetIdList
.
push
(
$
(
this
).
attr
(
"
id
"
));
}
});
if
(
gadgetIdList
.
length
==
0
){
$
(
this
).
dialog
(
"
close
"
);
}
var
tabTitle
=
$
(
"
div#tabs ul li.tab_selected span
"
).
html
();
$
.
ajax
({
type
:
"
post
"
,
url
:
"
WebSection_addGadgetList
"
,
data
:
[{
name
:
"
gadget_id_list
"
,
value
:
gadgetIdList
}],
success
:
function
(
data
)
{
window
.
location
.
reload
();
}
});
}
}
});
});
}
saveCurrentDocument
=
function
()
{
getCurrentPage
().
getEditor
().
saveEdition
();
getCurrentDocument
().
save
();
...
...
UNGProject/xml/xmlElements.xml
View file @
3f423885
...
...
@@ -40,6 +40,37 @@
</fieldset>
</form>
</upload>
<settings>
<form
id=
"erp5_preference"
>
<fieldset
class=
"center editable"
>
<div
class=
"field"
title=
"The text editor used by default"
>
<label>
Text Editor
</label>
<div
class=
"input"
>
<input
type=
"radio"
value=
"fck_editor"
name=
"field_my_preferred_text_editor"
checked=
"checked"
/>
Xinha Editor
<input
type=
"radio"
value=
"text_area"
name=
"field_my_preferred_text_editor"
/>
Plain Text
<input
type=
"hidden"
value=
""
name=
"default_field_my_preferred_text_editor"
/>
</div>
</div>
<div
class=
"field"
title=
"The text format used by default"
>
<label>
Text Format
</label>
<div
class=
"input"
>
<input
type=
"radio"
value=
"text/html"
name=
"field_my_preferred_text_format"
/>
HTML
<input
type=
"radio"
value=
"text/plain"
name=
"field_my_preferred_text_format"
checked=
"checked"
/>
Plain Text
<input
type=
"radio"
value=
"text/x-rst"
name=
"field_my_preferred_text_format"
/>
reStructuredText
<input
type=
"hidden"
value=
""
name=
"default_field_my_preferred_text_format"
/>
</div>
</div>
</fieldset>
</form>
</settings>
<line>
<table>
<tbody>
...
...
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