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
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
Mukul
erp5
Commits
d3cc385e
Commit
d3cc385e
authored
Apr 24, 2018
by
Mukul
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[erp5_officejs][erp5_web_renderjs_ui] Adds random play feature in officejs media player.
parent
94df7891
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
94 additions
and
9 deletions
+94
-9
bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_jio_js.js
...athTemplateItem/web_page_module/gadget_officejs_jio_js.js
+4
-1
bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_jio_js.xml
...thTemplateItem/web_page_module/gadget_officejs_jio_js.xml
+3
-3
bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_media_player_document_list_js.js
...e_module/gadget_officejs_media_player_document_list_js.js
+11
-1
bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_media_player_document_list_js.xml
..._module/gadget_officejs_media_player_document_list_js.xml
+2
-2
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_jio_js.js
...enderjs_ui/PathTemplateItem/web_page_module/rjs_jio_js.js
+72
-0
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_jio_js.xml
...nderjs_ui/PathTemplateItem/web_page_module/rjs_jio_js.xml
+2
-2
No files found.
bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_jio_js.js
View file @
d3cc385e
...
...
@@ -72,7 +72,10 @@
}
jio_options
=
{
type
:
'
dateupdater
'
,
sub_storage
:
jio_options
,
sub_storage
:
{
type
:
'
random
'
,
sub_storage
:
jio_options
},
property_list
:
[
'
modification_date
'
]
};
try
{
...
...
bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_jio_js.xml
View file @
d3cc385e
...
...
@@ -222,7 +222,7 @@
</item>
<item>
<key>
<string>
actor
</string>
</key>
<value>
<string>
vincent
</string>
</value>
<value>
<string>
zope
</string>
</value>
</item>
<item>
<key>
<string>
comment
</string>
</key>
...
...
@@ -236,7 +236,7 @@
</item>
<item>
<key>
<string>
serial
</string>
</key>
<value>
<string>
96
2.36985.29761.10359
</string>
</value>
<value>
<string>
96
6.54536.8656.36676
</string>
</value>
</item>
<item>
<key>
<string>
state
</string>
</key>
...
...
@@ -254,7 +254,7 @@
</tuple>
<state>
<tuple>
<float>
15
07216488.77
</float>
<float>
15
24152028.08
</float>
<string>
UTC
</string>
</tuple>
</state>
...
...
bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_media_player_document_list_js.js
View file @
d3cc385e
...
...
@@ -12,6 +12,7 @@
.
declareAcquiredMethod
(
"
getUrlFor
"
,
"
getUrlFor
"
)
.
declareAcquiredMethod
(
"
jio_allDocs
"
,
"
jio_allDocs
"
)
.
declareAcquiredMethod
(
"
getSetting
"
,
"
getSetting
"
)
.
declareAcquiredMethod
(
'
redirect
'
,
'
redirect
'
)
/////////////////////////////////////////////////////////////////
// declared methods
...
...
@@ -83,6 +84,15 @@
[
'
description
'
,
'
Description
'
],
[
'
version
'
,
'
Version
'
],
[
'
modification_date
'
,
'
Modification Date
'
]
],
sort_list
=
[
[
'
title
'
,
'
Title
'
],
[
'
reference
'
,
'
Reference
'
],
[
'
language
'
,
'
Language
'
],
[
'
description
'
,
'
Description
'
],
[
'
version
'
,
'
Version
'
],
[
'
modification_date
'
,
'
Modification Date
'
],
[
'
random
'
,
'
Random
'
]
];
return
result
[
0
].
render
({
erp5_document
:
{
...
...
@@ -100,7 +110,7 @@
result
[
1
]
+
"
%22
"
,
"
portal_type
"
:
[],
"
search_column_list
"
:
column_list
,
"
sort_column_list
"
:
column
_list
,
"
sort_column_list
"
:
sort
_list
,
"
sort
"
:
[[
'
modification_date
'
,
'
descending
'
]],
"
title
"
:
"
Documents
"
,
"
type
"
:
"
ListBox
"
...
...
bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_media_player_document_list_js.xml
View file @
d3cc385e
...
...
@@ -273,7 +273,7 @@
</item>
<item>
<key>
<string>
serial
</string>
</key>
<value>
<string>
96
6.44404.50238.55500
</string>
</value>
<value>
<string>
96
7.4474.3819.63505
</string>
</value>
</item>
<item>
<key>
<string>
state
</string>
</key>
...
...
@@ -291,7 +291,7 @@
</tuple>
<state>
<tuple>
<float>
152
3022279.07
</float>
<float>
152
4558413.59
</float>
<string>
UTC
</string>
</tuple>
</state>
...
...
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_jio_js.js
View file @
d3cc385e
...
...
@@ -10056,6 +10056,78 @@ return new Parser;
jIO
.
addStorage
(
'
uuid
'
,
UUIDStorage
);
}(
jIO
));
;
/*jslint nomen: true*/
(
function
(
jIO
)
{
"
use strict
"
;
/**
* The jIO RandomStorage extension
*
* @class RandomStorage
* @constructor
*/
function
RandomStorage
(
spec
)
{
this
.
_sub_storage
=
jIO
.
createJIO
(
spec
.
sub_storage
);
}
RandomStorage
.
prototype
.
get
=
function
()
{
return
this
.
_sub_storage
.
get
.
apply
(
this
.
_sub_storage
,
arguments
);
};
RandomStorage
.
prototype
.
allAttachments
=
function
()
{
return
this
.
_sub_storage
.
allAttachments
.
apply
(
this
.
_sub_storage
,
arguments
);
};
RandomStorage
.
prototype
.
post
=
function
()
{
return
this
.
_sub_storage
.
post
.
apply
(
this
.
_sub_storage
,
arguments
);
};
RandomStorage
.
prototype
.
put
=
function
()
{
return
this
.
_sub_storage
.
put
.
apply
(
this
.
_sub_storage
,
arguments
);
};
RandomStorage
.
prototype
.
remove
=
function
()
{
return
this
.
_sub_storage
.
remove
.
apply
(
this
.
_sub_storage
,
arguments
);
};
RandomStorage
.
prototype
.
getAttachment
=
function
()
{
return
this
.
_sub_storage
.
getAttachment
.
apply
(
this
.
_sub_storage
,
arguments
);
};
RandomStorage
.
prototype
.
putAttachment
=
function
()
{
return
this
.
_sub_storage
.
putAttachment
.
apply
(
this
.
_sub_storage
,
arguments
);
};
RandomStorage
.
prototype
.
removeAttachment
=
function
()
{
return
this
.
_sub_storage
.
removeAttachment
.
apply
(
this
.
_sub_storage
,
arguments
);
};
RandomStorage
.
prototype
.
hasCapacity
=
function
(
name
)
{
return
this
.
_sub_storage
.
hasCapacity
(
name
);
};
RandomStorage
.
prototype
.
buildQuery
=
function
(
options
)
{
if
(
options
.
sort_on
[
0
][
0
]
===
'
random
'
)
{
var
limit
=
options
.
limit
;
delete
options
.
limit
;
}
return
this
.
_sub_storage
.
buildQuery
.
apply
(
this
.
_sub_storage
,
arguments
)
.
push
(
function
(
result
)
{
// Random shuffle the result when random is present in the options.
if
(
options
.
sort_on
[
0
][
0
]
===
'
random
'
)
{
var
final_result
=
[],
random_number
;
while
(
limit
[
1
]
&&
result
.
length
-
limit
[
0
])
{
random_number
=
Math
.
floor
(
Math
.
random
()
*
result
.
length
);
random_number
=
random_number
===
result
.
length
?
result
.
length
-
1
:
random_number
;
final_result
.
push
(
result
.
splice
(
random_number
,
1
)[
0
]);
limit
[
1
]
-=
1
;
}
return
final_result
;
}
return
result
;
});
};
jIO
.
addStorage
(
'
random
'
,
RandomStorage
);
}(
jIO
));
;
/*
* Copyright 2013, Nexedi SA
...
...
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_jio_js.xml
View file @
d3cc385e
...
...
@@ -236,7 +236,7 @@
</item>
<item>
<key>
<string>
serial
</string>
</key>
<value>
<string>
96
6.12481.11377.36966
</string>
</value>
<value>
<string>
96
7.4461.64143.42632
</string>
</value>
</item>
<item>
<key>
<string>
state
</string>
</key>
...
...
@@ -254,7 +254,7 @@
</tuple>
<state>
<tuple>
<float>
152
2845747.33
</float>
<float>
152
4557708.76
</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