Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
erp5
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
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Vincent Bechu
erp5
Commits
0d3ad7ac
Commit
0d3ad7ac
authored
Dec 11, 2017
by
Vincent Bechu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[Officejs] Remove editable from views
parent
d38ec55d
Changes
16
Hide whitespace changes
Inline
Side-by-side
Showing
16 changed files
with
214 additions
and
282 deletions
+214
-282
bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_jio_pdf_view_js.js
...teItem/web_page_module/gadget_officejs_jio_pdf_view_js.js
+21
-36
bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_jio_pdf_view_js.xml
...eItem/web_page_module/gadget_officejs_jio_pdf_view_js.xml
+2
-2
bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_jio_web_illustration_view_js.js
...ge_module/gadget_officejs_jio_web_illustration_view_js.js
+20
-29
bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_jio_web_illustration_view_js.xml
...e_module/gadget_officejs_jio_web_illustration_view_js.xml
+2
-2
bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_jio_web_page_view_js.js
...m/web_page_module/gadget_officejs_jio_web_page_view_js.js
+20
-27
bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_jio_web_page_view_js.xml
.../web_page_module/gadget_officejs_jio_web_page_view_js.xml
+2
-2
bt5/erp5_officejs_jquery_app/PathTemplateItem/web_page_module/gadget_image_editor_officejs_view_js.js
...m/web_page_module/gadget_image_editor_officejs_view_js.js
+33
-40
bt5/erp5_officejs_jquery_app/PathTemplateItem/web_page_module/gadget_image_editor_officejs_view_js.xml
.../web_page_module/gadget_image_editor_officejs_view_js.xml
+2
-2
bt5/erp5_officejs_jquery_app/PathTemplateItem/web_page_module/gadget_web_table_view_js.js
...hTemplateItem/web_page_module/gadget_web_table_view_js.js
+20
-29
bt5/erp5_officejs_jquery_app/PathTemplateItem/web_page_module/gadget_web_table_view_js.xml
...TemplateItem/web_page_module/gadget_web_table_view_js.xml
+2
-2
bt5/erp5_officejs_ooffice/PathTemplateItem/web_page_module/gadget_ooffice_jio_presentation_view_js.js
...eb_page_module/gadget_ooffice_jio_presentation_view_js.js
+28
-35
bt5/erp5_officejs_ooffice/PathTemplateItem/web_page_module/gadget_ooffice_jio_presentation_view_js.xml
...b_page_module/gadget_ooffice_jio_presentation_view_js.xml
+2
-2
bt5/erp5_officejs_ooffice/PathTemplateItem/web_page_module/gadget_ooffice_jio_spreadsheet_view_js.js
...web_page_module/gadget_ooffice_jio_spreadsheet_view_js.js
+28
-35
bt5/erp5_officejs_ooffice/PathTemplateItem/web_page_module/gadget_ooffice_jio_spreadsheet_view_js.xml
...eb_page_module/gadget_ooffice_jio_spreadsheet_view_js.xml
+2
-2
bt5/erp5_officejs_ooffice/PathTemplateItem/web_page_module/gadget_ooffice_jio_text_view_js.js
...teItem/web_page_module/gadget_ooffice_jio_text_view_js.js
+28
-35
bt5/erp5_officejs_ooffice/PathTemplateItem/web_page_module/gadget_ooffice_jio_text_view_js.xml
...eItem/web_page_module/gadget_ooffice_jio_text_view_js.xml
+2
-2
No files found.
bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_jio_pdf_view_js.js
View file @
0d3ad7ac
...
...
@@ -23,13 +23,12 @@
.
declareMethod
(
"
render
"
,
function
(
options
)
{
return
this
.
changeState
({
jio_key
:
options
.
jio_key
,
doc
:
options
.
doc
,
editable
:
options
.
editable
?
1
:
0
doc
:
options
.
doc
});
})
.
onEvent
(
'
submit
'
,
function
()
{
var
gadget
=
this
,
doc
;
var
gadget
=
this
;
return
gadget
.
notifySubmitting
()
.
push
(
function
()
{
return
gadget
.
getDeclaredGadget
(
'
form_view
'
);
...
...
@@ -38,12 +37,6 @@
return
form_gadget
.
getContent
();
})
.
push
(
function
(
content
)
{
if
(
gadget
.
state
.
editable
)
{
return
jIO
.
util
.
dataURItoBlob
(
content
)
.
push
(
function
(
blob
)
{
return
gadget
.
jio_putAttachment
(
gadget
.
state
.
doc
.
jio_key
,
"
data
"
,
blob
);
});
}
return
gadget
.
updateDocument
(
content
);
})
.
push
(
function
()
{
...
...
@@ -78,7 +71,6 @@
return
gadget
.
getDeclaredGadget
(
'
form_view
'
);
})
.
push
(
function
(
form_gadget
)
{
var
editable
=
gadget
.
state
.
editable
;
return
form_gadget
.
render
({
erp5_document
:
{
"
_embedded
"
:
{
"
_view
"
:
{
...
...
@@ -88,9 +80,9 @@
"
default
"
:
gadget
.
state
.
doc
.
title
,
"
css_class
"
:
""
,
"
required
"
:
1
,
"
editable
"
:
1
-
editable
,
"
editable
"
:
1
,
"
key
"
:
"
title
"
,
"
hidden
"
:
editable
,
"
hidden
"
:
0
,
"
type
"
:
"
StringField
"
},
"
my_reference
"
:
{
...
...
@@ -99,9 +91,9 @@
"
default
"
:
gadget
.
state
.
doc
.
reference
,
"
css_class
"
:
""
,
"
required
"
:
0
,
"
editable
"
:
1
-
editable
,
"
editable
"
:
1
,
"
key
"
:
"
reference
"
,
"
hidden
"
:
editable
,
"
hidden
"
:
0
,
"
type
"
:
"
StringField
"
},
"
my_version
"
:
{
...
...
@@ -110,9 +102,9 @@
"
default
"
:
gadget
.
state
.
doc
.
version
,
"
css_class
"
:
""
,
"
required
"
:
0
,
"
editable
"
:
1
-
editable
,
"
editable
"
:
1
,
"
key
"
:
"
version
"
,
"
hidden
"
:
editable
,
"
hidden
"
:
0
,
"
type
"
:
"
StringField
"
},
"
my_language
"
:
{
...
...
@@ -121,9 +113,9 @@
"
default
"
:
gadget
.
state
.
doc
.
language
,
"
css_class
"
:
""
,
"
required
"
:
0
,
"
editable
"
:
1
-
editable
,
"
editable
"
:
1
,
"
key
"
:
"
language
"
,
"
hidden
"
:
editable
,
"
hidden
"
:
0
,
"
type
"
:
"
StringField
"
},
"
my_description
"
:
{
...
...
@@ -132,19 +124,19 @@
"
default
"
:
gadget
.
state
.
doc
.
description
,
"
css_class
"
:
""
,
"
required
"
:
0
,
"
editable
"
:
1
-
editable
,
"
editable
"
:
1
,
"
key
"
:
"
description
"
,
"
hidden
"
:
editable
,
"
hidden
"
:
0
,
"
type
"
:
"
TextAreaField
"
},
"
my_content
"
:
{
"
default
"
:
data
,
"
css_class
"
:
editable
===
1
?
"
content-iframe-maximize
"
:
""
,
"
css_class
"
:
""
,
"
required
"
:
0
,
"
editable
"
:
editable
,
"
editable
"
:
1
,
"
key
"
:
"
text_content
"
,
"
hidden
"
:
0
,
"
type
"
:
editable
===
1
?
"
GadgetField
"
:
"
Editor
Field
"
,
"
type
"
:
"
Gadget
Field
"
,
"
url
"
:
"
../officejs_pdf_viewer_gadget/app/
"
,
"
sandbox
"
:
"
iframe
"
}
...
...
@@ -171,24 +163,17 @@
return
RSVP
.
all
([
gadget
.
getUrlFor
({
command
:
'
history_previous
'
}),
gadget
.
getUrlFor
({
command
:
'
selection_previous
'
}),
gadget
.
getUrlFor
({
command
:
'
selection_next
'
}),
gadget
.
getUrlFor
({
command
:
"
change
"
,
options
:
{
editable
:
true
}})
gadget
.
getUrlFor
({
command
:
'
selection_next
'
})
]);
})
.
push
(
function
(
url_list
)
{
var
header_dict
=
{
return
gadget
.
updateHeader
(
{
page_title
:
gadget
.
state
.
doc
.
title
,
selection_url
:
url_list
[
0
],
previous_url
:
url_list
[
1
],
next_url
:
url_list
[
2
],
save_action
:
true
};
if
(
gadget
.
state
.
editable
)
{
header_dict
.
edit_properties
=
url_list
[
3
].
replace
(
"
n.editable=true
"
,
""
).
replace
(
"
p.editable=true
"
,
""
);
}
else
{
header_dict
.
edit_content
=
url_list
[
3
];
}
return
gadget
.
updateHeader
(
header_dict
);
save_action
:
true
,
previous_url
:
url_list
[
1
],
next_url
:
url_list
[
2
]
});
});
});
}(
window
,
rJS
,
RSVP
,
jIO
,
Blob
));
bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_jio_pdf_view_js.xml
View file @
0d3ad7ac
...
...
@@ -233,7 +233,7 @@
</item>
<item>
<key>
<string>
serial
</string>
</key>
<value>
<string>
96
2.37367.12390.34440
</string>
</value>
<value>
<string>
96
4.5644.25223.9574
</string>
</value>
</item>
<item>
<key>
<string>
state
</string>
</key>
...
...
@@ -251,7 +251,7 @@
</tuple>
<state>
<tuple>
<float>
15
07276424.45
</float>
<float>
15
13091327.7
</float>
<string>
UTC
</string>
</tuple>
</state>
...
...
bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_jio_web_illustration_view_js.js
View file @
0d3ad7ac
...
...
@@ -21,8 +21,7 @@
.
declareMethod
(
"
render
"
,
function
(
options
)
{
return
this
.
changeState
({
jio_key
:
options
.
jio_key
,
doc
:
options
.
doc
,
editable
:
options
.
editable
?
1
:
0
doc
:
options
.
doc
});
})
...
...
@@ -51,7 +50,6 @@
var
gadget
=
this
;
return
gadget
.
getDeclaredGadget
(
'
form_view
'
)
.
push
(
function
(
form_gadget
)
{
var
editable
=
gadget
.
state
.
editable
;
return
form_gadget
.
render
({
erp5_document
:
{
"
_embedded
"
:
{
"
_view
"
:
{
"
my_title
"
:
{
...
...
@@ -60,9 +58,9 @@
"
default
"
:
gadget
.
state
.
doc
.
title
,
"
css_class
"
:
""
,
"
required
"
:
1
,
"
editable
"
:
1
-
editable
,
"
editable
"
:
1
,
"
key
"
:
"
title
"
,
"
hidden
"
:
editable
,
"
hidden
"
:
0
,
"
type
"
:
"
StringField
"
},
"
my_reference
"
:
{
...
...
@@ -71,9 +69,9 @@
"
default
"
:
gadget
.
state
.
doc
.
reference
,
"
css_class
"
:
""
,
"
required
"
:
0
,
"
editable
"
:
1
-
editable
,
"
editable
"
:
1
,
"
key
"
:
"
reference
"
,
"
hidden
"
:
editable
,
"
hidden
"
:
0
,
"
type
"
:
"
StringField
"
},
"
my_version
"
:
{
...
...
@@ -82,9 +80,9 @@
"
default
"
:
gadget
.
state
.
doc
.
version
,
"
css_class
"
:
""
,
"
required
"
:
0
,
"
editable
"
:
1
-
editable
,
"
editable
"
:
1
,
"
key
"
:
"
version
"
,
"
hidden
"
:
editable
,
"
hidden
"
:
0
,
"
type
"
:
"
StringField
"
},
"
my_language
"
:
{
...
...
@@ -93,9 +91,9 @@
"
default
"
:
gadget
.
state
.
doc
.
language
,
"
css_class
"
:
""
,
"
required
"
:
0
,
"
editable
"
:
1
-
editable
,
"
editable
"
:
1
,
"
key
"
:
"
language
"
,
"
hidden
"
:
editable
,
"
hidden
"
:
0
,
"
type
"
:
"
StringField
"
},
"
my_description
"
:
{
...
...
@@ -104,19 +102,19 @@
"
default
"
:
gadget
.
state
.
doc
.
description
,
"
css_class
"
:
""
,
"
required
"
:
0
,
"
editable
"
:
1
-
editable
,
"
editable
"
:
1
,
"
key
"
:
"
description
"
,
"
hidden
"
:
editable
,
"
hidden
"
:
0
,
"
type
"
:
"
TextAreaField
"
},
"
my_content
"
:
{
"
default
"
:
gadget
.
state
.
doc
.
text_content
,
"
css_class
"
:
editable
===
1
?
"
content-iframe-maximize
"
:
""
,
"
css_class
"
:
""
,
"
required
"
:
0
,
"
editable
"
:
editable
,
"
editable
"
:
1
,
"
key
"
:
"
text_content
"
,
"
hidden
"
:
0
,
"
type
"
:
editable
===
1
?
"
GadgetField
"
:
"
Editor
Field
"
,
"
type
"
:
"
Gadget
Field
"
,
"
url
"
:
"
../officejs_svg_editor_gadget/
"
+
"
app/method-draw/method-draw.gadget.html
"
,
"
sandbox
"
:
"
iframe
"
...
...
@@ -143,24 +141,17 @@
return
RSVP
.
all
([
gadget
.
getUrlFor
({
command
:
'
history_previous
'
}),
gadget
.
getUrlFor
({
command
:
'
selection_previous
'
}),
gadget
.
getUrlFor
({
command
:
'
selection_next
'
}),
gadget
.
getUrlFor
({
command
:
"
change
"
,
options
:
{
editable
:
true
}})
gadget
.
getUrlFor
({
command
:
'
selection_next
'
})
]);
})
.
push
(
function
(
url_list
)
{
var
header_dict
=
{
return
gadget
.
updateHeader
(
{
page_title
:
gadget
.
state
.
doc
.
title
,
selection_url
:
url_list
[
0
],
previous_url
:
url_list
[
1
],
next_url
:
url_list
[
2
],
save_action
:
true
};
if
(
gadget
.
state
.
editable
)
{
header_dict
.
edit_properties
=
url_list
[
3
].
replace
(
"
n.editable=true
"
,
""
).
replace
(
"
p.editable=true
"
,
""
);
}
else
{
header_dict
.
edit_content
=
url_list
[
3
];
}
return
gadget
.
updateHeader
(
header_dict
);
save_action
:
true
,
previous_url
:
url_list
[
1
],
next_url
:
url_list
[
2
]
});
});
});
}(
window
,
rJS
,
RSVP
));
bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_jio_web_illustration_view_js.xml
View file @
0d3ad7ac
...
...
@@ -273,7 +273,7 @@
</item>
<item>
<key>
<string>
serial
</string>
</key>
<value>
<string>
963.
3430.40377.1177
</string>
</value>
<value>
<string>
963.
49321.32568.53862
</string>
</value>
</item>
<item>
<key>
<string>
state
</string>
</key>
...
...
@@ -291,7 +291,7 @@
</tuple>
<state>
<tuple>
<float>
151
0310205.61
</float>
<float>
151
3090098.94
</float>
<string>
UTC
</string>
</tuple>
</state>
...
...
bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_jio_web_page_view_js.js
View file @
0d3ad7ac
...
...
@@ -21,8 +21,7 @@
.
declareMethod
(
"
render
"
,
function
(
options
)
{
return
this
.
changeState
({
jio_key
:
options
.
jio_key
,
doc
:
options
.
doc
,
editable
:
options
.
editable
?
1
:
0
doc
:
options
.
doc
});
})
...
...
@@ -51,7 +50,6 @@
var
gadget
=
this
;
return
gadget
.
getDeclaredGadget
(
'
form_view
'
)
.
push
(
function
(
form_gadget
)
{
var
editable
=
gadget
.
state
.
editable
;
return
form_gadget
.
render
({
erp5_document
:
{
"
_embedded
"
:
{
"
_view
"
:
{
...
...
@@ -61,9 +59,9 @@
"
default
"
:
gadget
.
state
.
doc
.
title
,
"
css_class
"
:
""
,
"
required
"
:
1
,
"
editable
"
:
1
-
editable
,
"
editable
"
:
1
,
"
key
"
:
"
title
"
,
"
hidden
"
:
editable
,
"
hidden
"
:
0
,
"
type
"
:
"
StringField
"
},
"
my_reference
"
:
{
...
...
@@ -72,9 +70,9 @@
"
default
"
:
gadget
.
state
.
doc
.
reference
,
"
css_class
"
:
""
,
"
required
"
:
0
,
"
editable
"
:
1
-
editable
,
"
editable
"
:
1
,
"
key
"
:
"
reference
"
,
"
hidden
"
:
editable
,
"
hidden
"
:
0
,
"
type
"
:
"
StringField
"
},
"
my_version
"
:
{
...
...
@@ -83,9 +81,9 @@
"
default
"
:
gadget
.
state
.
doc
.
version
,
"
css_class
"
:
""
,
"
required
"
:
0
,
"
editable
"
:
1
-
editable
,
"
editable
"
:
1
,
"
key
"
:
"
version
"
,
"
hidden
"
:
editable
,
"
hidden
"
:
0
,
"
type
"
:
"
StringField
"
},
"
my_language
"
:
{
...
...
@@ -94,9 +92,9 @@
"
default
"
:
gadget
.
state
.
doc
.
language
,
"
css_class
"
:
""
,
"
required
"
:
0
,
"
editable
"
:
1
-
editable
,
"
editable
"
:
1
,
"
key
"
:
"
language
"
,
"
hidden
"
:
editable
,
"
hidden
"
:
0
,
"
type
"
:
"
StringField
"
},
"
my_description
"
:
{
...
...
@@ -105,19 +103,19 @@
"
default
"
:
gadget
.
state
.
doc
.
description
,
"
css_class
"
:
""
,
"
required
"
:
0
,
"
editable
"
:
1
-
editable
,
"
editable
"
:
1
,
"
key
"
:
"
description
"
,
"
hidden
"
:
editable
,
"
hidden
"
:
0
,
"
type
"
:
"
TextAreaField
"
},
"
my_content
"
:
{
"
default
"
:
gadget
.
state
.
doc
.
text_content
,
"
css_class
"
:
editable
===
1
?
"
content-iframe-maximize
"
:
""
,
"
css_class
"
:
""
,
"
required
"
:
0
,
"
editable
"
:
editable
,
"
editable
"
:
1
,
"
key
"
:
"
text_content
"
,
"
hidden
"
:
0
,
"
type
"
:
editable
===
1
?
"
GadgetField
"
:
"
Editor
Field
"
,
"
type
"
:
"
Gadget
Field
"
,
"
url
"
:
"
../officejs_ckeditor_gadget/app/
"
,
"
sandbox
"
:
"
iframe
"
}
...
...
@@ -144,22 +142,17 @@
return
RSVP
.
all
([
gadget
.
getUrlFor
({
command
:
'
history_previous
'
}),
gadget
.
getUrlFor
({
command
:
'
selection_previous
'
}),
gadget
.
getUrlFor
({
command
:
'
selection_next
'
}),
gadget
.
getUrlFor
({
command
:
"
change
"
,
options
:
{
editable
:
true
}})
gadget
.
getUrlFor
({
command
:
'
selection_next
'
})
]);
})
.
push
(
function
(
url_list
)
{
var
header_dict
=
{
return
gadget
.
updateHeader
(
{
page_title
:
gadget
.
state
.
doc
.
title
,
selection_url
:
url_list
[
0
],
save_action
:
true
};
if
(
!
gadget
.
state
.
editable
)
{
header_dict
.
previous_url
=
url_list
[
1
];
header_dict
.
next_url
=
url_list
[
2
];
header_dict
.
edit_content
=
url_list
[
3
];
}
return
gadget
.
updateHeader
(
header_dict
);
save_action
:
true
,
previous_url
:
url_list
[
1
],
next_url
:
url_list
[
2
]
});
});
});
}(
window
,
rJS
,
RSVP
));
bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_jio_web_page_view_js.xml
View file @
0d3ad7ac
...
...
@@ -232,7 +232,7 @@
</item>
<item>
<key>
<string>
serial
</string>
</key>
<value>
<string>
96
2.37368.2625.44083
</string>
</value>
<value>
<string>
96
4.5587.42141.48196
</string>
</value>
</item>
<item>
<key>
<string>
state
</string>
</key>
...
...
@@ -250,7 +250,7 @@
</tuple>
<state>
<tuple>
<float>
15
07276723.18
</float>
<float>
15
13090096.0
</float>
<string>
UTC
</string>
</tuple>
</state>
...
...
bt5/erp5_officejs_jquery_app/PathTemplateItem/web_page_module/gadget_image_editor_officejs_view_js.js
View file @
0d3ad7ac
...
...
@@ -23,13 +23,12 @@
.
declareMethod
(
"
render
"
,
function
(
options
)
{
return
this
.
changeState
({
jio_key
:
options
.
jio_key
,
doc
:
options
.
doc
,
editable
:
options
.
editable
?
1
:
0
doc
:
options
.
doc
});
})
.
onEvent
(
'
submit
'
,
function
()
{
var
gadget
=
this
,
d
oc
;
var
gadget
=
this
,
d
ata
;
return
gadget
.
notifySubmitting
()
.
push
(
function
()
{
return
gadget
.
getDeclaredGadget
(
'
form_view
'
);
...
...
@@ -38,17 +37,19 @@
return
form_gadget
.
getContent
();
})
.
push
(
function
(
content
)
{
if
(
gadget
.
state
.
editable
)
{
return
new
RSVP
.
Queue
()
.
push
(
function
()
{
return
jIO
.
util
.
dataURItoBlob
(
content
.
text_content
);
})
.
push
(
function
(
blob
)
{
return
gadget
.
jio_putAttachment
(
gadget
.
state
.
jio_key
,
"
data
"
,
blob
);
});
}
data
=
content
.
text_content
;
content
.
text_content
=
undefined
;
return
gadget
.
updateDocument
(
content
);
})
.
push
(
function
()
{
if
(
gadget
.
state
.
content_editable
)
{
return
gadget
.
jio_putAttachment
(
gadget
.
state
.
jio_key
,
"
data
"
,
jIO
.
util
.
dataURItoBlob
(
data
)
);
}
})
.
push
(
function
()
{
return
gadget
.
notifySubmitted
({
message
:
'
Data Updated
'
,
status
:
'
success
'
});
});
...
...
@@ -76,7 +77,6 @@
return
gadget
.
getDeclaredGadget
(
'
form_view
'
);
})
.
push
(
function
(
form_gadget
)
{
var
editable
=
gadget
.
state
.
editable
;
return
form_gadget
.
render
({
erp5_document
:
{
"
_embedded
"
:
{
"
_view
"
:
{
...
...
@@ -86,9 +86,9 @@
"
default
"
:
gadget
.
state
.
doc
.
title
,
"
css_class
"
:
""
,
"
required
"
:
1
,
"
editable
"
:
1
-
editable
,
"
editable
"
:
1
,
"
key
"
:
"
title
"
,
"
hidden
"
:
editable
,
"
hidden
"
:
0
,
"
type
"
:
"
StringField
"
},
"
my_reference
"
:
{
...
...
@@ -97,9 +97,9 @@
"
default
"
:
gadget
.
state
.
doc
.
reference
,
"
css_class
"
:
""
,
"
required
"
:
0
,
"
editable
"
:
1
-
editable
,
"
editable
"
:
1
,
"
key
"
:
"
reference
"
,
"
hidden
"
:
editable
,
"
hidden
"
:
0
,
"
type
"
:
"
StringField
"
},
"
my_version
"
:
{
...
...
@@ -108,9 +108,9 @@
"
default
"
:
gadget
.
state
.
doc
.
version
,
"
css_class
"
:
""
,
"
required
"
:
0
,
"
editable
"
:
1
-
editable
,
"
editable
"
:
1
,
"
key
"
:
"
version
"
,
"
hidden
"
:
editable
,
"
hidden
"
:
0
,
"
type
"
:
"
StringField
"
},
"
my_language
"
:
{
...
...
@@ -119,9 +119,9 @@
"
default
"
:
gadget
.
state
.
doc
.
language
,
"
css_class
"
:
""
,
"
required
"
:
0
,
"
editable
"
:
1
-
editable
,
"
editable
"
:
1
,
"
key
"
:
"
language
"
,
"
hidden
"
:
editable
,
"
hidden
"
:
0
,
"
type
"
:
"
StringField
"
},
"
my_description
"
:
{
...
...
@@ -130,19 +130,19 @@
"
default
"
:
gadget
.
state
.
doc
.
description
,
"
css_class
"
:
""
,
"
required
"
:
0
,
"
editable
"
:
1
-
editable
,
"
editable
"
:
1
,
"
key
"
:
"
description
"
,
"
hidden
"
:
editable
,
"
hidden
"
:
0
,
"
type
"
:
"
TextAreaField
"
},
"
my_content
"
:
{
"
default
"
:
editable
?
data
:
data
.
blob
,
"
css_class
"
:
editable
===
1
?
"
content-iframe-maximize
"
:
""
,
"
default
"
:
data
,
"
css_class
"
:
""
,
"
required
"
:
0
,
"
editable
"
:
editable
,
"
editable
"
:
1
,
"
key
"
:
"
text_content
"
,
"
hidden
"
:
0
,
"
type
"
:
editable
===
1
?
"
GadgetField
"
:
"
Image
Field
"
,
"
type
"
:
"
Gadget
Field
"
,
"
url
"
:
"
../officejs_image_editor_gadget/app/
"
,
"
sandbox
"
:
"
iframe
"
}
...
...
@@ -169,24 +169,17 @@
return
RSVP
.
all
([
gadget
.
getUrlFor
({
command
:
'
history_previous
'
}),
gadget
.
getUrlFor
({
command
:
'
selection_previous
'
}),
gadget
.
getUrlFor
({
command
:
'
selection_next
'
}),
gadget
.
getUrlFor
({
command
:
"
change
"
,
options
:
{
editable
:
true
}})
gadget
.
getUrlFor
({
command
:
'
selection_next
'
})
]);
})
.
push
(
function
(
url_list
)
{
var
header_dict
=
{
return
gadget
.
updateHeader
(
{
page_title
:
gadget
.
state
.
doc
.
title
,
selection_url
:
url_list
[
0
],
previous_url
:
url_list
[
1
],
next_url
:
url_list
[
2
],
save_action
:
true
};
if
(
gadget
.
state
.
editable
)
{
header_dict
.
edit_properties
=
url_list
[
3
].
replace
(
"
n.editable=true
"
,
""
).
replace
(
"
p.editable=true
"
,
""
);
}
else
{
header_dict
.
edit_content
=
url_list
[
3
];
}
return
gadget
.
updateHeader
(
header_dict
);
save_action
:
true
,
previous_url
:
url_list
[
1
],
next_url
:
url_list
[
2
]
});
});
});
}(
window
,
rJS
,
RSVP
,
jIO
,
Blob
));
bt5/erp5_officejs_jquery_app/PathTemplateItem/web_page_module/gadget_image_editor_officejs_view_js.xml
View file @
0d3ad7ac
...
...
@@ -235,7 +235,7 @@
</item>
<item>
<key>
<string>
serial
</string>
</key>
<value>
<string>
96
2.54506.51685.58146
</string>
</value>
<value>
<string>
96
4.5641.61141.26828
</string>
</value>
</item>
<item>
<key>
<string>
state
</string>
</key>
...
...
@@ -253,7 +253,7 @@
</tuple>
<state>
<tuple>
<float>
15
08245149.26
</float>
<float>
15
13091333.42
</float>
<string>
UTC
</string>
</tuple>
</state>
...
...
bt5/erp5_officejs_jquery_app/PathTemplateItem/web_page_module/gadget_web_table_view_js.js
View file @
0d3ad7ac
...
...
@@ -21,8 +21,7 @@
.
declareMethod
(
"
render
"
,
function
(
options
)
{
return
this
.
changeState
({
jio_key
:
options
.
jio_key
,
doc
:
options
.
doc
,
editable
:
options
.
editable
?
1
:
0
doc
:
options
.
doc
});
})
...
...
@@ -51,7 +50,6 @@
var
gadget
=
this
;
return
gadget
.
getDeclaredGadget
(
'
form_view
'
)
.
push
(
function
(
form_gadget
)
{
var
editable
=
gadget
.
state
.
editable
;
return
form_gadget
.
render
({
erp5_document
:
{
"
_embedded
"
:
{
"
_view
"
:
{
"
my_title
"
:
{
...
...
@@ -60,9 +58,9 @@
"
default
"
:
gadget
.
state
.
doc
.
title
,
"
css_class
"
:
""
,
"
required
"
:
1
,
"
editable
"
:
1
-
editable
,
"
editable
"
:
1
,
"
key
"
:
"
title
"
,
"
hidden
"
:
editable
,
"
hidden
"
:
0
,
"
type
"
:
"
StringField
"
},
"
my_reference
"
:
{
...
...
@@ -71,9 +69,9 @@
"
default
"
:
gadget
.
state
.
doc
.
reference
,
"
css_class
"
:
""
,
"
required
"
:
0
,
"
editable
"
:
1
-
editable
,
"
editable
"
:
1
,
"
key
"
:
"
reference
"
,
"
hidden
"
:
editable
,
"
hidden
"
:
0
,
"
type
"
:
"
StringField
"
},
"
my_version
"
:
{
...
...
@@ -82,9 +80,9 @@
"
default
"
:
gadget
.
state
.
doc
.
version
,
"
css_class
"
:
""
,
"
required
"
:
0
,
"
editable
"
:
1
-
editable
,
"
editable
"
:
1
,
"
key
"
:
"
version
"
,
"
hidden
"
:
editable
,
"
hidden
"
:
0
,
"
type
"
:
"
StringField
"
},
"
my_language
"
:
{
...
...
@@ -93,9 +91,9 @@
"
default
"
:
gadget
.
state
.
doc
.
language
,
"
css_class
"
:
""
,
"
required
"
:
0
,
"
editable
"
:
1
-
editable
,
"
editable
"
:
1
,
"
key
"
:
"
language
"
,
"
hidden
"
:
editable
,
"
hidden
"
:
0
,
"
type
"
:
"
StringField
"
},
"
my_description
"
:
{
...
...
@@ -104,19 +102,19 @@
"
default
"
:
gadget
.
state
.
doc
.
description
,
"
css_class
"
:
""
,
"
required
"
:
0
,
"
editable
"
:
1
-
editable
,
"
editable
"
:
1
,
"
key
"
:
"
description
"
,
"
hidden
"
:
editable
,
"
hidden
"
:
0
,
"
type
"
:
"
TextAreaField
"
},
"
my_content
"
:
{
"
default
"
:
gadget
.
state
.
doc
.
text_content
,
"
css_class
"
:
editable
===
1
?
"
content-iframe-maximize
"
:
""
,
"
css_class
"
:
""
,
"
required
"
:
0
,
"
editable
"
:
editable
,
"
editable
"
:
1
,
"
key
"
:
"
text_content
"
,
"
hidden
"
:
0
,
"
type
"
:
editable
===
1
?
"
GadgetField
"
:
"
Editor
Field
"
,
"
type
"
:
"
Gadget
Field
"
,
"
url
"
:
"
../officejs_web_table_editor_gadget/app/
"
,
"
sandbox
"
:
"
iframe
"
}
...
...
@@ -142,24 +140,17 @@
return
RSVP
.
all
([
gadget
.
getUrlFor
({
command
:
'
history_previous
'
}),
gadget
.
getUrlFor
({
command
:
'
selection_previous
'
}),
gadget
.
getUrlFor
({
command
:
'
selection_next
'
}),
gadget
.
getUrlFor
({
command
:
"
change
"
,
options
:
{
editable
:
true
}})
gadget
.
getUrlFor
({
command
:
'
selection_next
'
})
]);
})
.
push
(
function
(
url_list
)
{
var
header_dict
=
{
return
gadget
.
updateHeader
(
{
page_title
:
gadget
.
state
.
doc
.
title
,
selection_url
:
url_list
[
0
],
previous_url
:
url_list
[
1
],
next_url
:
url_list
[
2
],
save_action
:
true
};
if
(
gadget
.
state
.
editable
)
{
header_dict
.
edit_properties
=
url_list
[
3
].
replace
(
"
n.editable=true
"
,
""
).
replace
(
"
p.editable=true
"
,
""
);
}
else
{
header_dict
.
edit_content
=
url_list
[
3
];
}
return
gadget
.
updateHeader
(
header_dict
);
save_action
:
true
,
previous_url
:
url_list
[
1
],
next_url
:
url_list
[
2
]
});
});
});
}(
window
,
rJS
,
RSVP
));
bt5/erp5_officejs_jquery_app/PathTemplateItem/web_page_module/gadget_web_table_view_js.xml
View file @
0d3ad7ac
...
...
@@ -227,7 +227,7 @@
</item>
<item>
<key>
<string>
serial
</string>
</key>
<value>
<string>
96
2.47399.35230.56951
</string>
</value>
<value>
<string>
96
4.5638.24467.20428
</string>
</value>
</item>
<item>
<key>
<string>
state
</string>
</key>
...
...
@@ -245,7 +245,7 @@
</tuple>
<state>
<tuple>
<float>
15
08245160.26
</float>
<float>
15
13091035.01
</float>
<string>
UTC
</string>
</tuple>
</state>
...
...
bt5/erp5_officejs_ooffice/PathTemplateItem/web_page_module/gadget_ooffice_jio_presentation_view_js.js
View file @
0d3ad7ac
...
...
@@ -23,14 +23,13 @@
return
this
.
changeState
({
jio_key
:
options
.
jio_key
,
doc
:
options
.
doc
,
editable
:
options
.
editable
?
1
:
0
,
content_editable
:
options
.
doc
.
content_type
===
undefined
||
options
.
doc
.
content_type
.
indexOf
(
"
application/x-asc
"
)
===
0
});
})
.
onEvent
(
'
submit
'
,
function
()
{
var
gadget
=
this
,
d
oc
;
var
gadget
=
this
,
d
ata
;
return
gadget
.
notifySubmitting
()
.
push
(
function
()
{
return
gadget
.
getDeclaredGadget
(
'
form_view
'
);
...
...
@@ -39,14 +38,18 @@
return
form_gadget
.
getContent
();
})
.
push
(
function
(
content
)
{
if
(
gadget
.
state
.
editable
)
{
data
=
content
.
text_content
;
content
.
text_content
=
undefined
;
return
gadget
.
updateDocument
(
content
);
})
.
push
(
function
()
{
if
(
gadget
.
state
.
content_editable
)
{
return
gadget
.
jio_putAttachment
(
gadget
.
state
.
jio_key
,
"
data
"
,
jIO
.
util
.
dataURItoBlob
(
content
.
text_content
)
jIO
.
util
.
dataURItoBlob
(
data
)
);
}
return
gadget
.
updateDocument
(
content
);
})
.
push
(
function
()
{
return
gadget
.
notifySubmitted
({
message
:
'
Data Updated
'
,
status
:
'
success
'
});
...
...
@@ -80,7 +83,6 @@
return
gadget
.
getDeclaredGadget
(
'
form_view
'
);
})
.
push
(
function
(
form_gadget
)
{
var
editable
=
gadget
.
state
.
editable
&&
gadget
.
state
.
content_editable
;
return
form_gadget
.
render
({
erp5_document
:
{
"
_embedded
"
:
{
"
_view
"
:
{
...
...
@@ -90,9 +92,9 @@
"
default
"
:
gadget
.
state
.
doc
.
title
,
"
css_class
"
:
""
,
"
required
"
:
1
,
"
editable
"
:
1
-
editable
,
"
editable
"
:
1
,
"
key
"
:
"
title
"
,
"
hidden
"
:
editable
,
"
hidden
"
:
0
,
"
type
"
:
"
StringField
"
},
"
my_reference
"
:
{
...
...
@@ -101,9 +103,9 @@
"
default
"
:
gadget
.
state
.
doc
.
reference
,
"
css_class
"
:
""
,
"
required
"
:
0
,
"
editable
"
:
1
-
editable
,
"
editable
"
:
1
,
"
key
"
:
"
reference
"
,
"
hidden
"
:
editable
,
"
hidden
"
:
0
,
"
type
"
:
"
StringField
"
},
"
my_version
"
:
{
...
...
@@ -112,9 +114,9 @@
"
default
"
:
gadget
.
state
.
doc
.
version
,
"
css_class
"
:
""
,
"
required
"
:
0
,
"
editable
"
:
1
-
editable
,
"
editable
"
:
1
,
"
key
"
:
"
version
"
,
"
hidden
"
:
editable
,
"
hidden
"
:
0
,
"
type
"
:
"
StringField
"
},
"
my_language
"
:
{
...
...
@@ -123,9 +125,9 @@
"
default
"
:
gadget
.
state
.
doc
.
language
,
"
css_class
"
:
""
,
"
required
"
:
0
,
"
editable
"
:
1
-
editable
,
"
editable
"
:
1
,
"
key
"
:
"
language
"
,
"
hidden
"
:
editable
,
"
hidden
"
:
0
,
"
type
"
:
"
StringField
"
},
"
my_description
"
:
{
...
...
@@ -134,19 +136,19 @@
"
default
"
:
gadget
.
state
.
doc
.
description
,
"
css_class
"
:
""
,
"
required
"
:
0
,
"
editable
"
:
1
-
editable
,
"
editable
"
:
1
,
"
key
"
:
"
description
"
,
"
hidden
"
:
editable
,
"
hidden
"
:
0
,
"
type
"
:
"
TextAreaField
"
},
"
my_content
"
:
{
"
default
"
:
((
gadget
.
state
.
editable
||
!
gadget
.
state
.
content_editable
)
?
data
:
""
)
,
"
css_class
"
:
editable
?
"
content-iframe-maximize
"
:
""
,
"
default
"
:
data
,
"
css_class
"
:
""
,
"
required
"
:
0
,
"
editable
"
:
editable
,
"
editable
"
:
1
,
"
key
"
:
"
text_content
"
,
"
hidden
"
:
0
,
"
type
"
:
editable
?
"
GadgetField
"
:
"
EditorField
"
,
"
type
"
:
gadget
.
state
.
content_
editable
?
"
GadgetField
"
:
"
EditorField
"
,
"
url
"
:
"
../ooffice_presentation_gadget/app/
"
,
"
sandbox
"
:
"
iframe
"
}
...
...
@@ -173,26 +175,17 @@
return
RSVP
.
all
([
gadget
.
getUrlFor
({
command
:
'
history_previous
'
}),
gadget
.
getUrlFor
({
command
:
'
selection_previous
'
}),
gadget
.
getUrlFor
({
command
:
'
selection_next
'
}),
gadget
.
getUrlFor
({
command
:
"
change
"
,
options
:
{
editable
:
true
}})
gadget
.
getUrlFor
({
command
:
'
selection_next
'
})
]);
})
.
push
(
function
(
url_list
)
{
var
header_dict
=
{
return
gadget
.
updateHeader
(
{
page_title
:
gadget
.
state
.
doc
.
title
,
selection_url
:
url_list
[
0
],
previous_url
:
url_list
[
1
],
next_url
:
url_list
[
2
],
save_action
:
true
};
if
(
gadget
.
state
.
content_editable
)
{
if
(
gadget
.
state
.
editable
)
{
header_dict
.
edit_properties
=
url_list
[
3
].
replace
(
"
n.editable=true
"
,
""
).
replace
(
"
p.editable=true
"
,
""
);
}
else
{
header_dict
.
edit_content
=
url_list
[
3
];
}
}
return
gadget
.
updateHeader
(
header_dict
);
save_action
:
true
,
previous_url
:
url_list
[
1
],
next_url
:
url_list
[
2
]
});
});
});
}(
window
,
rJS
,
RSVP
,
jIO
,
Blob
));
\ No newline at end of file
bt5/erp5_officejs_ooffice/PathTemplateItem/web_page_module/gadget_ooffice_jio_presentation_view_js.xml
View file @
0d3ad7ac
...
...
@@ -233,7 +233,7 @@
</item>
<item>
<key>
<string>
serial
</string>
</key>
<value>
<string>
96
2.47399.35230.5695
1
</string>
</value>
<value>
<string>
96
4.5637.48492.5398
1
</string>
</value>
</item>
<item>
<key>
<string>
state
</string>
</key>
...
...
@@ -251,7 +251,7 @@
</tuple>
<state>
<tuple>
<float>
15
08245197.16
</float>
<float>
15
13090920.75
</float>
<string>
UTC
</string>
</tuple>
</state>
...
...
bt5/erp5_officejs_ooffice/PathTemplateItem/web_page_module/gadget_ooffice_jio_spreadsheet_view_js.js
View file @
0d3ad7ac
...
...
@@ -23,14 +23,13 @@
return
this
.
changeState
({
jio_key
:
options
.
jio_key
,
doc
:
options
.
doc
,
editable
:
options
.
editable
?
1
:
0
,
content_editable
:
options
.
doc
.
content_type
===
undefined
||
options
.
doc
.
content_type
.
indexOf
(
"
application/x-asc
"
)
===
0
});
})
.
onEvent
(
'
submit
'
,
function
()
{
var
gadget
=
this
,
doc
;
var
gadget
=
this
,
doc
,
data
;
return
gadget
.
notifySubmitting
()
.
push
(
function
()
{
return
gadget
.
getDeclaredGadget
(
'
form_view
'
);
...
...
@@ -39,14 +38,18 @@
return
form_gadget
.
getContent
();
})
.
push
(
function
(
content
)
{
if
(
gadget
.
state
.
editable
)
{
data
=
content
.
text_content
;
content
.
text_content
=
undefined
;
return
gadget
.
updateDocument
(
content
);
})
.
push
(
function
()
{
if
(
gadget
.
state
.
content_editable
)
{
return
gadget
.
jio_putAttachment
(
gadget
.
state
.
jio_key
,
"
data
"
,
jIO
.
util
.
dataURItoBlob
(
content
.
text_content
)
jIO
.
util
.
dataURItoBlob
(
data
)
);
}
return
gadget
.
updateDocument
(
content
);
})
.
push
(
function
()
{
return
gadget
.
notifySubmitted
({
message
:
'
Data Updated
'
,
status
:
'
success
'
});
...
...
@@ -80,7 +83,6 @@
return
gadget
.
getDeclaredGadget
(
'
form_view
'
);
})
.
push
(
function
(
form_gadget
)
{
var
editable
=
gadget
.
state
.
editable
&&
gadget
.
state
.
content_editable
;
return
form_gadget
.
render
({
erp5_document
:
{
"
_embedded
"
:
{
"
_view
"
:
{
...
...
@@ -90,9 +92,9 @@
"
default
"
:
gadget
.
state
.
doc
.
title
,
"
css_class
"
:
""
,
"
required
"
:
1
,
"
editable
"
:
1
-
editable
,
"
editable
"
:
1
,
"
key
"
:
"
title
"
,
"
hidden
"
:
editable
,
"
hidden
"
:
0
,
"
type
"
:
"
StringField
"
},
"
my_reference
"
:
{
...
...
@@ -101,9 +103,9 @@
"
default
"
:
gadget
.
state
.
doc
.
reference
,
"
css_class
"
:
""
,
"
required
"
:
0
,
"
editable
"
:
1
-
editable
,
"
editable
"
:
1
,
"
key
"
:
"
reference
"
,
"
hidden
"
:
editable
,
"
hidden
"
:
0
,
"
type
"
:
"
StringField
"
},
"
my_version
"
:
{
...
...
@@ -112,9 +114,9 @@
"
default
"
:
gadget
.
state
.
doc
.
version
,
"
css_class
"
:
""
,
"
required
"
:
0
,
"
editable
"
:
1
-
editable
,
"
editable
"
:
1
,
"
key
"
:
"
version
"
,
"
hidden
"
:
editable
,
"
hidden
"
:
0
,
"
type
"
:
"
StringField
"
},
"
my_language
"
:
{
...
...
@@ -123,9 +125,9 @@
"
default
"
:
gadget
.
state
.
doc
.
language
,
"
css_class
"
:
""
,
"
required
"
:
0
,
"
editable
"
:
1
-
editable
,
"
editable
"
:
1
,
"
key
"
:
"
language
"
,
"
hidden
"
:
editable
,
"
hidden
"
:
0
,
"
type
"
:
"
StringField
"
},
"
my_description
"
:
{
...
...
@@ -134,19 +136,19 @@
"
default
"
:
gadget
.
state
.
doc
.
description
,
"
css_class
"
:
""
,
"
required
"
:
0
,
"
editable
"
:
1
-
editable
,
"
editable
"
:
1
,
"
key
"
:
"
description
"
,
"
hidden
"
:
editable
,
"
hidden
"
:
0
,
"
type
"
:
"
TextAreaField
"
},
"
my_content
"
:
{
"
default
"
:
gadget
.
state
.
editable
||
!
gadget
.
state
.
content_editable
?
data
:
""
,
"
css_class
"
:
editable
?
"
content-iframe-maximize
"
:
""
,
"
default
"
:
data
,
"
css_class
"
:
""
,
"
required
"
:
0
,
"
editable
"
:
editable
,
"
editable
"
:
1
,
"
key
"
:
"
text_content
"
,
"
hidden
"
:
0
,
"
type
"
:
editable
?
"
GadgetField
"
:
"
EditorField
"
,
"
type
"
:
gadget
.
state
.
content_
editable
?
"
GadgetField
"
:
"
EditorField
"
,
"
url
"
:
"
../ooffice_spreadsheet_gadget/app/
"
,
"
sandbox
"
:
"
iframe
"
}
...
...
@@ -173,26 +175,17 @@
return
RSVP
.
all
([
gadget
.
getUrlFor
({
command
:
'
history_previous
'
}),
gadget
.
getUrlFor
({
command
:
'
selection_previous
'
}),
gadget
.
getUrlFor
({
command
:
'
selection_next
'
}),
gadget
.
getUrlFor
({
command
:
"
change
"
,
options
:
{
editable
:
true
}})
gadget
.
getUrlFor
({
command
:
'
selection_next
'
})
]);
})
.
push
(
function
(
url_list
)
{
var
header_dict
=
{
return
gadget
.
updateHeader
(
{
page_title
:
gadget
.
state
.
doc
.
title
,
selection_url
:
url_list
[
0
],
previous_url
:
url_list
[
1
],
next_url
:
url_list
[
2
],
save_action
:
true
};
if
(
gadget
.
state
.
content_editable
)
{
if
(
gadget
.
state
.
editable
)
{
header_dict
.
edit_properties
=
url_list
[
3
].
replace
(
"
n.editable=true
"
,
""
).
replace
(
"
p.editable=true
"
,
""
);
}
else
{
header_dict
.
edit_content
=
url_list
[
3
];
}
}
return
gadget
.
updateHeader
(
header_dict
);
save_action
:
true
,
previous_url
:
url_list
[
1
],
next_url
:
url_list
[
2
]
});
});
});
}(
window
,
rJS
,
RSVP
,
jIO
,
Blob
));
\ No newline at end of file
bt5/erp5_officejs_ooffice/PathTemplateItem/web_page_module/gadget_ooffice_jio_spreadsheet_view_js.xml
View file @
0d3ad7ac
...
...
@@ -233,7 +233,7 @@
</item>
<item>
<key>
<string>
serial
</string>
</key>
<value>
<string>
96
2.47399.35230.56951
</string>
</value>
<value>
<string>
96
4.5634.4854.39389
</string>
</value>
</item>
<item>
<key>
<string>
state
</string>
</key>
...
...
@@ -251,7 +251,7 @@
</tuple>
<state>
<tuple>
<float>
15
08245186.26
</float>
<float>
15
13090896.91
</float>
<string>
UTC
</string>
</tuple>
</state>
...
...
bt5/erp5_officejs_ooffice/PathTemplateItem/web_page_module/gadget_ooffice_jio_text_view_js.js
View file @
0d3ad7ac
...
...
@@ -23,14 +23,13 @@
return
this
.
changeState
({
jio_key
:
options
.
jio_key
,
doc
:
options
.
doc
,
editable
:
options
.
editable
?
1
:
0
,
content_editable
:
options
.
doc
.
content_type
===
undefined
||
options
.
doc
.
content_type
.
indexOf
(
"
application/x-asc
"
)
===
0
});
})
.
onEvent
(
'
submit
'
,
function
()
{
var
gadget
=
this
,
d
oc
;
var
gadget
=
this
,
d
ata
;
return
gadget
.
notifySubmitting
()
.
push
(
function
()
{
return
gadget
.
getDeclaredGadget
(
'
form_view
'
);
...
...
@@ -39,14 +38,18 @@
return
form_gadget
.
getContent
();
})
.
push
(
function
(
content
)
{
if
(
gadget
.
state
.
editable
)
{
data
=
content
.
text_content
;
content
.
text_content
=
undefined
;
return
gadget
.
updateDocument
(
content
);
})
.
push
(
function
()
{
if
(
gadget
.
state
.
content_editable
)
{
return
gadget
.
jio_putAttachment
(
gadget
.
state
.
jio_key
,
"
data
"
,
jIO
.
util
.
dataURItoBlob
(
content
.
text_content
)
jIO
.
util
.
dataURItoBlob
(
data
)
);
}
return
gadget
.
updateDocument
(
content
);
})
.
push
(
function
()
{
return
gadget
.
notifySubmitted
({
message
:
'
Data Updated
'
,
status
:
'
success
'
});
...
...
@@ -80,7 +83,6 @@
return
gadget
.
getDeclaredGadget
(
'
form_view
'
);
})
.
push
(
function
(
form_gadget
)
{
var
editable
=
gadget
.
state
.
editable
&&
gadget
.
state
.
content_editable
;
return
form_gadget
.
render
({
erp5_document
:
{
"
_embedded
"
:
{
"
_view
"
:
{
...
...
@@ -90,9 +92,9 @@
"
default
"
:
gadget
.
state
.
doc
.
title
,
"
css_class
"
:
""
,
"
required
"
:
1
,
"
editable
"
:
1
-
editable
,
"
editable
"
:
1
,
"
key
"
:
"
title
"
,
"
hidden
"
:
editable
,
"
hidden
"
:
0
,
"
type
"
:
"
StringField
"
},
"
my_reference
"
:
{
...
...
@@ -101,9 +103,9 @@
"
default
"
:
gadget
.
state
.
doc
.
reference
,
"
css_class
"
:
""
,
"
required
"
:
0
,
"
editable
"
:
1
-
editable
,
"
editable
"
:
1
,
"
key
"
:
"
reference
"
,
"
hidden
"
:
editable
,
"
hidden
"
:
0
,
"
type
"
:
"
StringField
"
},
"
my_version
"
:
{
...
...
@@ -112,9 +114,9 @@
"
default
"
:
gadget
.
state
.
doc
.
version
,
"
css_class
"
:
""
,
"
required
"
:
0
,
"
editable
"
:
1
-
editable
,
"
editable
"
:
1
,
"
key
"
:
"
version
"
,
"
hidden
"
:
editable
,
"
hidden
"
:
0
,
"
type
"
:
"
StringField
"
},
"
my_language
"
:
{
...
...
@@ -123,9 +125,9 @@
"
default
"
:
gadget
.
state
.
doc
.
language
,
"
css_class
"
:
""
,
"
required
"
:
0
,
"
editable
"
:
1
-
editable
,
"
editable
"
:
1
,
"
key
"
:
"
language
"
,
"
hidden
"
:
editable
,
"
hidden
"
:
0
,
"
type
"
:
"
StringField
"
},
"
my_description
"
:
{
...
...
@@ -134,19 +136,19 @@
"
default
"
:
gadget
.
state
.
doc
.
description
,
"
css_class
"
:
""
,
"
required
"
:
0
,
"
editable
"
:
1
-
editable
,
"
editable
"
:
1
,
"
key
"
:
"
description
"
,
"
hidden
"
:
editable
,
"
hidden
"
:
0
,
"
type
"
:
"
TextAreaField
"
},
"
my_content
"
:
{
"
default
"
:
gadget
.
state
.
editable
||
!
gadget
.
state
.
content_editable
?
data
:
""
,
"
css_class
"
:
editable
?
"
content-iframe-maximize
"
:
""
,
"
default
"
:
data
,
"
css_class
"
:
""
,
"
required
"
:
0
,
"
editable
"
:
editable
,
"
editable
"
:
1
,
"
key
"
:
"
text_content
"
,
"
hidden
"
:
0
,
"
type
"
:
editable
?
"
GadgetField
"
:
"
EditorField
"
,
"
type
"
:
gadget
.
state
.
content_
editable
?
"
GadgetField
"
:
"
EditorField
"
,
"
url
"
:
"
../ooffice_text_gadget/app/
"
,
"
sandbox
"
:
"
iframe
"
}
...
...
@@ -173,26 +175,17 @@
return
RSVP
.
all
([
gadget
.
getUrlFor
({
command
:
'
history_previous
'
}),
gadget
.
getUrlFor
({
command
:
'
selection_previous
'
}),
gadget
.
getUrlFor
({
command
:
'
selection_next
'
}),
gadget
.
getUrlFor
({
command
:
"
change
"
,
options
:
{
editable
:
true
}})
gadget
.
getUrlFor
({
command
:
'
selection_next
'
})
]);
})
.
push
(
function
(
url_list
)
{
var
header_dict
=
{
return
gadget
.
updateHeader
(
{
page_title
:
gadget
.
state
.
doc
.
title
,
selection_url
:
url_list
[
0
],
previous_url
:
url_list
[
1
],
next_url
:
url_list
[
2
],
save_action
:
true
};
if
(
gadget
.
state
.
content_editable
)
{
if
(
gadget
.
state
.
editable
)
{
header_dict
.
edit_properties
=
url_list
[
3
].
replace
(
"
n.editable=true
"
,
""
).
replace
(
"
p.editable=true
"
,
""
);
}
else
{
header_dict
.
edit_content
=
url_list
[
3
];
}
}
return
gadget
.
updateHeader
(
header_dict
);
save_action
:
true
,
previous_url
:
url_list
[
1
],
next_url
:
url_list
[
2
]
});
});
});
}(
window
,
rJS
,
RSVP
,
jIO
,
Blob
));
\ No newline at end of file
bt5/erp5_officejs_ooffice/PathTemplateItem/web_page_module/gadget_ooffice_jio_text_view_js.xml
View file @
0d3ad7ac
...
...
@@ -233,7 +233,7 @@
</item>
<item>
<key>
<string>
serial
</string>
</key>
<value>
<string>
96
2.47399.35230.56951
</string>
</value>
<value>
<string>
96
4.5637.7087.14148
</string>
</value>
</item>
<item>
<key>
<string>
state
</string>
</key>
...
...
@@ -251,7 +251,7 @@
</tuple>
<state>
<tuple>
<float>
15
08245173.46
</float>
<float>
15
13090895.02
</float>
<string>
UTC
</string>
</tuple>
</state>
...
...
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