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
Labels
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
Romain Courteaud
erp5
Commits
9c46b0d9
Commit
9c46b0d9
authored
Feb 21, 2020
by
Romain Courteaud
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[erp5_xhtml_style/web_renderjs_ui] renderJS 0.23.0
parent
07dfbd7b
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
28 additions
and
92 deletions
+28
-92
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_renderjs_js.js
...js_ui/PathTemplateItem/web_page_module/rjs_renderjs_js.js
+13
-45
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_renderjs_js.xml
...s_ui/PathTemplateItem/web_page_module/rjs_renderjs_js.xml
+2
-2
product/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_xhtml_style/renderjs.js.js
...TemplateItem/portal_skins/erp5_xhtml_style/renderjs.js.js
+13
-45
No files found.
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_renderjs_js.js
View file @
9c46b0d9
...
@@ -763,18 +763,12 @@ if (typeof document.contains !== 'function') {
...
@@ -763,18 +763,12 @@ if (typeof document.contains !== 'function') {
try
{
try
{
result
=
callback
.
apply
(
context
,
argument_list
);
result
=
callback
.
apply
(
context
,
argument_list
);
}
catch
(
e
)
{
}
catch
(
e
)
{
return
new
RSVP
.
Queue
()
return
new
RSVP
.
Queue
(
RSVP
.
reject
(
e
));
.
push
(
function
returnPushableError
()
{
return
RSVP
.
reject
(
e
);
});
}
}
if
(
result
instanceof
RSVP
.
Queue
)
{
if
(
result
instanceof
RSVP
.
Queue
)
{
return
result
;
return
result
;
}
}
return
new
RSVP
.
Queue
()
return
new
RSVP
.
Queue
(
result
);
.
push
(
function
returnPushableResult
()
{
return
result
;
});
}
}
function
readBlobAsDataURL
(
blob
)
{
function
readBlobAsDataURL
(
blob
)
{
...
@@ -829,20 +823,10 @@ if (typeof document.contains !== 'function') {
...
@@ -829,20 +823,10 @@ if (typeof document.contains !== 'function') {
try
{
try
{
result
=
callback
(
evt
);
result
=
callback
(
evt
);
}
catch
(
e
)
{
}
catch
(
e
)
{
re
sult
=
RSVP
.
reject
(
e
);
re
turn
reject
(
e
);
}
}
callback_promise
=
result
;
callback_promise
=
new
RSVP
.
Queue
(
result
).
push
(
undefined
,
reject
);
new
RSVP
.
Queue
()
.
push
(
function
waitForEventCallbackResult
()
{
return
result
;
})
.
push
(
undefined
,
function
handleEventCallbackError
(
error
)
{
if
(
!
(
error
instanceof
RSVP
.
CancellationError
))
{
canceller
();
reject
(
error
);
}
});
};
};
target
.
addEventListener
(
type
,
handle_event_callback
,
useCapture
);
target
.
addEventListener
(
type
,
handle_event_callback
,
useCapture
);
...
@@ -1141,10 +1125,7 @@ if (typeof document.contains !== 'function') {
...
@@ -1141,10 +1125,7 @@ if (typeof document.contains !== 'function') {
if
(
resolved
)
{
if
(
resolved
)
{
throw
new
ResolvedMonitorError
();
throw
new
ResolvedMonitorError
();
}
}
var
queue
=
new
RSVP
.
Queue
()
var
queue
=
new
RSVP
.
Queue
(
promise_to_monitor
)
.
push
(
function
waitForPromiseToMonitor
()
{
return
promise_to_monitor
;
})
.
push
(
function
handlePromiseToMonitorSuccess
(
fulfillmentValue
)
{
.
push
(
function
handlePromiseToMonitorSuccess
(
fulfillmentValue
)
{
// Promise to monitor is fullfilled, remove it from the list
// Promise to monitor is fullfilled, remove it from the list
var
len
=
promise_list
.
length
,
var
len
=
promise_list
.
length
,
...
@@ -1160,13 +1141,6 @@ if (typeof document.contains !== 'function') {
...
@@ -1160,13 +1141,6 @@ if (typeof document.contains !== 'function') {
}
}
promise_list
=
new_promise_list
;
promise_list
=
new_promise_list
;
},
function
handlePromiseToMonitorError
(
rejectedReason
)
{
},
function
handlePromiseToMonitorError
(
rejectedReason
)
{
if
(
rejectedReason
instanceof
RSVP
.
CancellationError
)
{
if
(
!
(
promise_to_monitor
.
isFulfilled
&&
promise_to_monitor
.
isRejected
))
{
// The queue could be cancelled before the first push is run
promise_to_monitor
.
cancel
();
}
}
reject
(
rejectedReason
);
reject
(
rejectedReason
);
throw
rejectedReason
;
throw
rejectedReason
;
});
});
...
@@ -1321,16 +1295,16 @@ if (typeof document.contains !== 'function') {
...
@@ -1321,16 +1295,16 @@ if (typeof document.contains !== 'function') {
};
};
function
runJob
(
gadget
,
name
,
callback
,
argument_list
)
{
function
runJob
(
gadget
,
name
,
callback
,
argument_list
)
{
var
job_promise
=
ensurePushableQueue
(
callback
,
argument_list
,
gadget
);
if
(
gadget
.
__job_dict
.
hasOwnProperty
(
name
))
{
if
(
gadget
.
__job_dict
.
hasOwnProperty
(
name
))
{
gadget
.
__job_dict
[
name
].
cancel
();
gadget
.
__job_dict
[
name
].
cancel
();
}
}
var
job_promise
=
ensurePushableQueue
(
callback
,
argument_list
,
gadget
);
gadget
.
__job_dict
[
name
]
=
job_promise
;
gadget
.
__job_dict
[
name
]
=
job_promise
;
gadget
.
__monitor
.
monitor
(
new
RSVP
.
Queue
()
// gadget.__monitor.monitor(job_promise
.
push
(
function
waitForJobPromise
()
{
gadget
.
__monitor
.
monitor
(
new
RSVP
.
Queue
(
job_promise
)
return
job_promise
;
})
.
push
(
undefined
,
function
handleJobError
(
error
)
{
.
push
(
undefined
,
function
handleJobError
(
error
)
{
// Do not crash monitor if the job has been cancelled
// by a new execution
if
(
!
(
error
instanceof
RSVP
.
CancellationError
))
{
if
(
!
(
error
instanceof
RSVP
.
CancellationError
))
{
throw
error
;
throw
error
;
}
}
...
@@ -1918,10 +1892,7 @@ if (typeof document.contains !== 'function') {
...
@@ -1918,10 +1892,7 @@ if (typeof document.contains !== 'function') {
result
=
method
(
url
,
options
,
parent_gadget
,
old_element
);
result
=
method
(
url
,
options
,
parent_gadget
,
old_element
);
// Set the HTML context
// Set the HTML context
if
(
typeof
result
.
then
===
'
function
'
)
{
if
(
typeof
result
.
then
===
'
function
'
)
{
return
new
RSVP
.
Queue
()
return
new
RSVP
.
Queue
(
result
)
.
push
(
function
()
{
return
result
;
})
.
push
(
function
setAsyncGadgetInstanceHTMLContext
(
gadget_instance
)
{
.
push
(
function
setAsyncGadgetInstanceHTMLContext
(
gadget_instance
)
{
return
setGadgetInstanceHTMLContext
(
gadget_instance
,
options
,
return
setGadgetInstanceHTMLContext
(
gadget_instance
,
options
,
parent_gadget
,
url
,
parent_gadget
,
url
,
...
@@ -2641,11 +2612,8 @@ if (typeof document.contains !== 'function') {
...
@@ -2641,11 +2612,8 @@ if (typeof document.contains !== 'function') {
embedded_channel
,
embedded_channel
,
declare_method_list_waiting
;
declare_method_list_waiting
;
return
new
RSVP
.
Queue
()
.
push
(
function
waitForLoadingGadget
()
{
// Wait for the loading gadget to be created
// Wait for the loading gadget to be created
return
wait_for_gadget_loaded
;
return
new
RSVP
.
Queue
(
wait_for_gadget_loaded
)
})
.
push
(
function
handleLoadingGadget
(
result_list
)
{
.
push
(
function
handleLoadingGadget
(
result_list
)
{
TmpConstructor
=
result_list
[
0
];
TmpConstructor
=
result_list
[
0
];
root_gadget
=
result_list
[
1
];
root_gadget
=
result_list
[
1
];
...
...
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_renderjs_js.xml
View file @
9c46b0d9
...
@@ -234,7 +234,7 @@
...
@@ -234,7 +234,7 @@
</item>
</item>
<item>
<item>
<key>
<string>
serial
</string>
</key>
<key>
<string>
serial
</string>
</key>
<value>
<string>
98
1.31793.23133.50602
</string>
</value>
<value>
<string>
98
2.6529.44506.21401
</string>
</value>
</item>
</item>
<item>
<item>
<key>
<string>
state
</string>
</key>
<key>
<string>
state
</string>
</key>
...
@@ -252,7 +252,7 @@
...
@@ -252,7 +252,7 @@
</tuple>
</tuple>
<state>
<state>
<tuple>
<tuple>
<float>
158
0395066.9
</float>
<float>
158
2798736.54
</float>
<string>
UTC
</string>
<string>
UTC
</string>
</tuple>
</tuple>
</state>
</state>
...
...
product/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_xhtml_style/renderjs.js.js
View file @
9c46b0d9
...
@@ -763,18 +763,12 @@ if (typeof document.contains !== 'function') {
...
@@ -763,18 +763,12 @@ if (typeof document.contains !== 'function') {
try
{
try
{
result
=
callback
.
apply
(
context
,
argument_list
);
result
=
callback
.
apply
(
context
,
argument_list
);
}
catch
(
e
)
{
}
catch
(
e
)
{
return
new
RSVP
.
Queue
()
return
new
RSVP
.
Queue
(
RSVP
.
reject
(
e
));
.
push
(
function
returnPushableError
()
{
return
RSVP
.
reject
(
e
);
});
}
}
if
(
result
instanceof
RSVP
.
Queue
)
{
if
(
result
instanceof
RSVP
.
Queue
)
{
return
result
;
return
result
;
}
}
return
new
RSVP
.
Queue
()
return
new
RSVP
.
Queue
(
result
);
.
push
(
function
returnPushableResult
()
{
return
result
;
});
}
}
function
readBlobAsDataURL
(
blob
)
{
function
readBlobAsDataURL
(
blob
)
{
...
@@ -829,20 +823,10 @@ if (typeof document.contains !== 'function') {
...
@@ -829,20 +823,10 @@ if (typeof document.contains !== 'function') {
try
{
try
{
result
=
callback
(
evt
);
result
=
callback
(
evt
);
}
catch
(
e
)
{
}
catch
(
e
)
{
re
sult
=
RSVP
.
reject
(
e
);
re
turn
reject
(
e
);
}
}
callback_promise
=
result
;
callback_promise
=
new
RSVP
.
Queue
(
result
).
push
(
undefined
,
reject
);
new
RSVP
.
Queue
()
.
push
(
function
waitForEventCallbackResult
()
{
return
result
;
})
.
push
(
undefined
,
function
handleEventCallbackError
(
error
)
{
if
(
!
(
error
instanceof
RSVP
.
CancellationError
))
{
canceller
();
reject
(
error
);
}
});
};
};
target
.
addEventListener
(
type
,
handle_event_callback
,
useCapture
);
target
.
addEventListener
(
type
,
handle_event_callback
,
useCapture
);
...
@@ -1141,10 +1125,7 @@ if (typeof document.contains !== 'function') {
...
@@ -1141,10 +1125,7 @@ if (typeof document.contains !== 'function') {
if
(
resolved
)
{
if
(
resolved
)
{
throw
new
ResolvedMonitorError
();
throw
new
ResolvedMonitorError
();
}
}
var
queue
=
new
RSVP
.
Queue
()
var
queue
=
new
RSVP
.
Queue
(
promise_to_monitor
)
.
push
(
function
waitForPromiseToMonitor
()
{
return
promise_to_monitor
;
})
.
push
(
function
handlePromiseToMonitorSuccess
(
fulfillmentValue
)
{
.
push
(
function
handlePromiseToMonitorSuccess
(
fulfillmentValue
)
{
// Promise to monitor is fullfilled, remove it from the list
// Promise to monitor is fullfilled, remove it from the list
var
len
=
promise_list
.
length
,
var
len
=
promise_list
.
length
,
...
@@ -1160,13 +1141,6 @@ if (typeof document.contains !== 'function') {
...
@@ -1160,13 +1141,6 @@ if (typeof document.contains !== 'function') {
}
}
promise_list
=
new_promise_list
;
promise_list
=
new_promise_list
;
},
function
handlePromiseToMonitorError
(
rejectedReason
)
{
},
function
handlePromiseToMonitorError
(
rejectedReason
)
{
if
(
rejectedReason
instanceof
RSVP
.
CancellationError
)
{
if
(
!
(
promise_to_monitor
.
isFulfilled
&&
promise_to_monitor
.
isRejected
))
{
// The queue could be cancelled before the first push is run
promise_to_monitor
.
cancel
();
}
}
reject
(
rejectedReason
);
reject
(
rejectedReason
);
throw
rejectedReason
;
throw
rejectedReason
;
});
});
...
@@ -1321,16 +1295,16 @@ if (typeof document.contains !== 'function') {
...
@@ -1321,16 +1295,16 @@ if (typeof document.contains !== 'function') {
};
};
function
runJob
(
gadget
,
name
,
callback
,
argument_list
)
{
function
runJob
(
gadget
,
name
,
callback
,
argument_list
)
{
var
job_promise
=
ensurePushableQueue
(
callback
,
argument_list
,
gadget
);
if
(
gadget
.
__job_dict
.
hasOwnProperty
(
name
))
{
if
(
gadget
.
__job_dict
.
hasOwnProperty
(
name
))
{
gadget
.
__job_dict
[
name
].
cancel
();
gadget
.
__job_dict
[
name
].
cancel
();
}
}
var
job_promise
=
ensurePushableQueue
(
callback
,
argument_list
,
gadget
);
gadget
.
__job_dict
[
name
]
=
job_promise
;
gadget
.
__job_dict
[
name
]
=
job_promise
;
gadget
.
__monitor
.
monitor
(
new
RSVP
.
Queue
()
// gadget.__monitor.monitor(job_promise
.
push
(
function
waitForJobPromise
()
{
gadget
.
__monitor
.
monitor
(
new
RSVP
.
Queue
(
job_promise
)
return
job_promise
;
})
.
push
(
undefined
,
function
handleJobError
(
error
)
{
.
push
(
undefined
,
function
handleJobError
(
error
)
{
// Do not crash monitor if the job has been cancelled
// by a new execution
if
(
!
(
error
instanceof
RSVP
.
CancellationError
))
{
if
(
!
(
error
instanceof
RSVP
.
CancellationError
))
{
throw
error
;
throw
error
;
}
}
...
@@ -1918,10 +1892,7 @@ if (typeof document.contains !== 'function') {
...
@@ -1918,10 +1892,7 @@ if (typeof document.contains !== 'function') {
result
=
method
(
url
,
options
,
parent_gadget
,
old_element
);
result
=
method
(
url
,
options
,
parent_gadget
,
old_element
);
// Set the HTML context
// Set the HTML context
if
(
typeof
result
.
then
===
'
function
'
)
{
if
(
typeof
result
.
then
===
'
function
'
)
{
return
new
RSVP
.
Queue
()
return
new
RSVP
.
Queue
(
result
)
.
push
(
function
()
{
return
result
;
})
.
push
(
function
setAsyncGadgetInstanceHTMLContext
(
gadget_instance
)
{
.
push
(
function
setAsyncGadgetInstanceHTMLContext
(
gadget_instance
)
{
return
setGadgetInstanceHTMLContext
(
gadget_instance
,
options
,
return
setGadgetInstanceHTMLContext
(
gadget_instance
,
options
,
parent_gadget
,
url
,
parent_gadget
,
url
,
...
@@ -2641,11 +2612,8 @@ if (typeof document.contains !== 'function') {
...
@@ -2641,11 +2612,8 @@ if (typeof document.contains !== 'function') {
embedded_channel
,
embedded_channel
,
declare_method_list_waiting
;
declare_method_list_waiting
;
return
new
RSVP
.
Queue
()
.
push
(
function
waitForLoadingGadget
()
{
// Wait for the loading gadget to be created
// Wait for the loading gadget to be created
return
wait_for_gadget_loaded
;
return
new
RSVP
.
Queue
(
wait_for_gadget_loaded
)
})
.
push
(
function
handleLoadingGadget
(
result_list
)
{
.
push
(
function
handleLoadingGadget
(
result_list
)
{
TmpConstructor
=
result_list
[
0
];
TmpConstructor
=
result_list
[
0
];
root_gadget
=
result_list
[
1
];
root_gadget
=
result_list
[
1
];
...
...
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