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
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Bryan Kaperick
erp5
Commits
e1620dac
Commit
e1620dac
authored
Jul 17, 2018
by
Bryan Kaperick
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added see_history gadget to display listbox of revisions of all documents in text editor app
parent
62389287
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
169 additions
and
2 deletions
+169
-2
bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_erp5_page_document_list_js.js
...page_module/gadget_officejs_erp5_page_document_list_js.js
+4
-2
bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_erp5_page_see_history_html.html
...ge_module/gadget_officejs_erp5_page_see_history_html.html
+19
-0
bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_erp5_page_see_history_js.js
...b_page_module/gadget_officejs_erp5_page_see_history_js.js
+146
-0
No files found.
bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_erp5_page_document_list_js.js
View file @
e1620dac
...
...
@@ -124,14 +124,16 @@
.
push
(
function
()
{
return
RSVP
.
all
([
gadget
.
getUrlFor
({
command
:
"
change
"
,
options
:
{
"
page
"
:
"
ojs_add_document
"
}}),
gadget
.
getSetting
(
'
document_title_plural
'
)
gadget
.
getSetting
(
'
document_title_plural
'
),
gadget
.
getUrlFor
({
command
:
"
change
"
,
options
:
{
"
page
"
:
"
ojs_see_history
"
}})
]);
})
.
push
(
function
(
result
)
{
return
gadget
.
updateHeader
({
page_title
:
result
[
1
],
filter_action
:
true
,
add_url
:
result
[
0
]
add_url
:
result
[
0
],
see_history
:
result
[
2
]
});
});
});
...
...
bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_erp5_page_see_history_html.html
0 → 100644
View file @
e1620dac
<!doctype html>
<html>
<head>
<meta
charset=
"utf-8"
>
<meta
name=
"viewport"
content=
"width=device-width, initial-scale=1"
>
<title>
OfficeJS See History Page
</title>
<script
src=
"rsvp.js"
></script>
<script
src=
"renderjs.js"
></script>
<script
src=
"gadget_erp5_page_ojs_see_history.js"
></script>
</head>
<body>
<div
data-gadget-url=
"gadget_erp5_pt_form_list.html"
data-gadget-scope=
"form_list"
></div>
</body>
</html>
\ No newline at end of file
bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_erp5_page_see_history_js.js
0 → 100644
View file @
e1620dac
/*global window, rJS, RSVP */
/*jslint nomen: true, indent: 2, maxerr: 3 */
(
function
(
window
,
rJS
,
RSVP
)
{
"
use strict
"
;
rJS
(
window
)
/////////////////////////////////////////////////////////////////
// Acquired methods
/////////////////////////////////////////////////////////////////
.
declareAcquiredMethod
(
"
updateHeader
"
,
"
updateHeader
"
)
.
declareAcquiredMethod
(
"
getUrlParameter
"
,
"
getUrlParameter
"
)
.
declareAcquiredMethod
(
"
getUrlFor
"
,
"
getUrlFor
"
)
.
declareAcquiredMethod
(
"
jio_allDocs
"
,
"
jio_allDocs
"
)
.
declareAcquiredMethod
(
"
getSetting
"
,
"
getSetting
"
)
.
declareAcquiredMethod
(
"
jio_toggleRevisionOption
"
,
"
jio_toggleRevisionOption
"
)
/////////////////////////////////////////////////////////////////
// declared methods
/////////////////////////////////////////////////////////////////
.
allowPublicAcquisition
(
"
jio_allDocs
"
,
function
(
param_list
)
{
var
gadget
=
this
;
return
gadget
.
jio_toggleRevisionOption
()
.
push
(
function
()
{
return
gadget
.
jio_allDocs
(
param_list
[
0
])
.
push
(
function
(
result
)
{
var
i
,
date
,
len
=
result
.
data
.
total_rows
;
for
(
i
=
0
;
i
<
len
;
i
+=
1
)
{
if
(
result
.
data
.
rows
[
i
].
value
.
hasOwnProperty
(
"
modification_date
"
))
{
date
=
new
Date
(
result
.
data
.
rows
[
i
].
value
.
modification_date
);
result
.
data
.
rows
[
i
].
value
.
modification_date
=
{
field_gadget_param
:
{
allow_empty_time
:
0
,
ampm_time_style
:
0
,
css_class
:
"
date_field
"
,
date_only
:
0
,
description
:
"
The Date
"
,
editable
:
0
,
hidden
:
0
,
hidden_day_is_last_day
:
0
,
"
default
"
:
date
.
toUTCString
(),
key
:
"
modification_date
"
,
required
:
0
,
timezone_style
:
0
,
title
:
"
Modification Date
"
,
type
:
"
DateTimeField
"
}
};
result
.
data
.
rows
[
i
].
value
[
"
listbox_uid:list
"
]
=
{
key
:
"
listbox_uid:list
"
,
value
:
2713
};
}
}
return
gadget
.
jio_toggleRevisionOption
()
.
push
(
function
()
{
return
result
;
});
});
});
})
.
allowPublicAcquisition
(
'
notifySubmit
'
,
function
()
{
return
this
.
triggerSubmit
();
})
.
declareMethod
(
"
triggerSubmit
"
,
function
()
{
var
argument_list
=
arguments
;
return
this
.
getDeclaredGadget
(
'
form_list
'
)
.
push
(
function
(
gadget
)
{
return
gadget
.
triggerSubmit
.
apply
(
gadget
,
argument_list
);
});
})
.
declareMethod
(
"
render
"
,
function
()
{
var
gadget
=
this
;
return
new
RSVP
.
Queue
()
.
push
(
function
()
{
return
RSVP
.
all
([
gadget
.
getDeclaredGadget
(
'
form_list
'
),
gadget
.
getSetting
(
"
portal_type
"
)
]);
})
.
push
(
function
(
result
)
{
var
column_list
=
[
[
'
title
'
,
'
Title
'
],
[
'
reference
'
,
'
Reference
'
],
[
'
language
'
,
'
Language
'
],
[
'
description
'
,
'
Description
'
],
[
'
version
'
,
'
Version
'
],
[
'
modification_date
'
,
'
Modification Date
'
]
];
return
result
[
0
].
render
({
erp5_document
:
{
"
_embedded
"
:
{
"
_view
"
:
{
"
listbox
"
:
{
"
column_list
"
:
column_list
,
"
show_anchor
"
:
0
,
"
default_params
"
:
{},
"
editable
"
:
1
,
"
editable_column_list
"
:
[],
"
key
"
:
"
field_listbox
"
,
"
lines
"
:
30
,
"
list_method
"
:
"
portal_catalog
"
,
"
query
"
:
"
urn:jio:allDocs?query=portal_type%3A%22
"
+
result
[
1
]
+
"
%22
"
,
"
portal_type
"
:
[],
"
search_column_list
"
:
column_list
,
"
sort_column_list
"
:
column_list
,
"
sort
"
:
[[
'
modification_date
'
,
'
descending
'
]],
"
title
"
:
"
Documents
"
,
"
type
"
:
"
ListBox
"
}
}},
"
_links
"
:
{
"
type
"
:
{
// form_list display portal_type in header
name
:
""
}
}
},
form_definition
:
{
group_list
:
[[
"
bottom
"
,
[[
"
listbox
"
]]
]]
}
});
})
.
push
(
function
()
{
return
RSVP
.
all
([
gadget
.
getUrlFor
({
command
:
"
change
"
,
options
:
{
"
page
"
:
"
ojs_add_document
"
}}),
gadget
.
getSetting
(
'
document_title_plural
'
),
gadget
.
getUrlFor
({
command
:
"
change
"
,
options
:
{
"
page
"
:
"
ojs_document_list
"
}})
]);
})
.
push
(
function
(
result
)
{
return
gadget
.
updateHeader
({
page_title
:
result
[
1
],
filter_action
:
true
,
add_url
:
result
[
0
],
doc_list
:
result
[
2
]
});
});
});
}(
window
,
rJS
,
RSVP
));
\ No newline at end of file
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