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
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Georgios Dagkakis
erp5
Commits
1cfbf91f
Commit
1cfbf91f
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
1b18c3a2
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 @
1cfbf91f
...
...
@@ -763,18 +763,12 @@ if (typeof document.contains !== 'function') {
try
{
result
=
callback
.
apply
(
context
,
argument_list
);
}
catch
(
e
)
{
return
new
RSVP
.
Queue
()
.
push
(
function
returnPushableError
()
{
return
RSVP
.
reject
(
e
);
});
return
new
RSVP
.
Queue
(
RSVP
.
reject
(
e
));
}
if
(
result
instanceof
RSVP
.
Queue
)
{
return
result
;
}
return
new
RSVP
.
Queue
()
.
push
(
function
returnPushableResult
()
{
return
result
;
});
return
new
RSVP
.
Queue
(
result
);
}
function
readBlobAsDataURL
(
blob
)
{
...
...
@@ -829,20 +823,10 @@ if (typeof document.contains !== 'function') {
try
{
result
=
callback
(
evt
);
}
catch
(
e
)
{
re
sult
=
RSVP
.
reject
(
e
);
re
turn
reject
(
e
);
}
callback_promise
=
result
;
new
RSVP
.
Queue
()
.
push
(
function
waitForEventCallbackResult
()
{
return
result
;
})
.
push
(
undefined
,
function
handleEventCallbackError
(
error
)
{
if
(
!
(
error
instanceof
RSVP
.
CancellationError
))
{
canceller
();
reject
(
error
);
}
});
callback_promise
=
new
RSVP
.
Queue
(
result
).
push
(
undefined
,
reject
);
};
target
.
addEventListener
(
type
,
handle_event_callback
,
useCapture
);
...
...
@@ -1141,10 +1125,7 @@ if (typeof document.contains !== 'function') {
if
(
resolved
)
{
throw
new
ResolvedMonitorError
();
}
var
queue
=
new
RSVP
.
Queue
()
.
push
(
function
waitForPromiseToMonitor
()
{
return
promise_to_monitor
;
})
var
queue
=
new
RSVP
.
Queue
(
promise_to_monitor
)
.
push
(
function
handlePromiseToMonitorSuccess
(
fulfillmentValue
)
{
// Promise to monitor is fullfilled, remove it from the list
var
len
=
promise_list
.
length
,
...
...
@@ -1160,13 +1141,6 @@ if (typeof document.contains !== 'function') {
}
promise_list
=
new_promise_list
;
},
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
);
throw
rejectedReason
;
});
...
...
@@ -1321,16 +1295,16 @@ if (typeof document.contains !== 'function') {
};
function
runJob
(
gadget
,
name
,
callback
,
argument_list
)
{
var
job_promise
=
ensurePushableQueue
(
callback
,
argument_list
,
gadget
);
if
(
gadget
.
__job_dict
.
hasOwnProperty
(
name
))
{
gadget
.
__job_dict
[
name
].
cancel
();
}
var
job_promise
=
ensurePushableQueue
(
callback
,
argument_list
,
gadget
);
gadget
.
__job_dict
[
name
]
=
job_promise
;
gadget
.
__monitor
.
monitor
(
new
RSVP
.
Queue
()
.
push
(
function
waitForJobPromise
()
{
return
job_promise
;
})
// gadget.__monitor.monitor(job_promise
gadget
.
__monitor
.
monitor
(
new
RSVP
.
Queue
(
job_promise
)
.
push
(
undefined
,
function
handleJobError
(
error
)
{
// Do not crash monitor if the job has been cancelled
// by a new execution
if
(
!
(
error
instanceof
RSVP
.
CancellationError
))
{
throw
error
;
}
...
...
@@ -1918,10 +1892,7 @@ if (typeof document.contains !== 'function') {
result
=
method
(
url
,
options
,
parent_gadget
,
old_element
);
// Set the HTML context
if
(
typeof
result
.
then
===
'
function
'
)
{
return
new
RSVP
.
Queue
()
.
push
(
function
()
{
return
result
;
})
return
new
RSVP
.
Queue
(
result
)
.
push
(
function
setAsyncGadgetInstanceHTMLContext
(
gadget_instance
)
{
return
setGadgetInstanceHTMLContext
(
gadget_instance
,
options
,
parent_gadget
,
url
,
...
...
@@ -2641,11 +2612,8 @@ if (typeof document.contains !== 'function') {
embedded_channel
,
declare_method_list_waiting
;
return
new
RSVP
.
Queue
()
.
push
(
function
waitForLoadingGadget
()
{
// 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
)
{
TmpConstructor
=
result_list
[
0
];
root_gadget
=
result_list
[
1
];
...
...
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_renderjs_js.xml
View file @
1cfbf91f
...
...
@@ -234,7 +234,7 @@
</item>
<item>
<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>
<key>
<string>
state
</string>
</key>
...
...
@@ -252,7 +252,7 @@
</tuple>
<state>
<tuple>
<float>
158
0395066.9
</float>
<float>
158
2798736.54
</float>
<string>
UTC
</string>
</tuple>
</state>
...
...
product/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_xhtml_style/renderjs.js.js
View file @
1cfbf91f
...
...
@@ -763,18 +763,12 @@ if (typeof document.contains !== 'function') {
try
{
result
=
callback
.
apply
(
context
,
argument_list
);
}
catch
(
e
)
{
return
new
RSVP
.
Queue
()
.
push
(
function
returnPushableError
()
{
return
RSVP
.
reject
(
e
);
});
return
new
RSVP
.
Queue
(
RSVP
.
reject
(
e
));
}
if
(
result
instanceof
RSVP
.
Queue
)
{
return
result
;
}
return
new
RSVP
.
Queue
()
.
push
(
function
returnPushableResult
()
{
return
result
;
});
return
new
RSVP
.
Queue
(
result
);
}
function
readBlobAsDataURL
(
blob
)
{
...
...
@@ -829,20 +823,10 @@ if (typeof document.contains !== 'function') {
try
{
result
=
callback
(
evt
);
}
catch
(
e
)
{
re
sult
=
RSVP
.
reject
(
e
);
re
turn
reject
(
e
);
}
callback_promise
=
result
;
new
RSVP
.
Queue
()
.
push
(
function
waitForEventCallbackResult
()
{
return
result
;
})
.
push
(
undefined
,
function
handleEventCallbackError
(
error
)
{
if
(
!
(
error
instanceof
RSVP
.
CancellationError
))
{
canceller
();
reject
(
error
);
}
});
callback_promise
=
new
RSVP
.
Queue
(
result
).
push
(
undefined
,
reject
);
};
target
.
addEventListener
(
type
,
handle_event_callback
,
useCapture
);
...
...
@@ -1141,10 +1125,7 @@ if (typeof document.contains !== 'function') {
if
(
resolved
)
{
throw
new
ResolvedMonitorError
();
}
var
queue
=
new
RSVP
.
Queue
()
.
push
(
function
waitForPromiseToMonitor
()
{
return
promise_to_monitor
;
})
var
queue
=
new
RSVP
.
Queue
(
promise_to_monitor
)
.
push
(
function
handlePromiseToMonitorSuccess
(
fulfillmentValue
)
{
// Promise to monitor is fullfilled, remove it from the list
var
len
=
promise_list
.
length
,
...
...
@@ -1160,13 +1141,6 @@ if (typeof document.contains !== 'function') {
}
promise_list
=
new_promise_list
;
},
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
);
throw
rejectedReason
;
});
...
...
@@ -1321,16 +1295,16 @@ if (typeof document.contains !== 'function') {
};
function
runJob
(
gadget
,
name
,
callback
,
argument_list
)
{
var
job_promise
=
ensurePushableQueue
(
callback
,
argument_list
,
gadget
);
if
(
gadget
.
__job_dict
.
hasOwnProperty
(
name
))
{
gadget
.
__job_dict
[
name
].
cancel
();
}
var
job_promise
=
ensurePushableQueue
(
callback
,
argument_list
,
gadget
);
gadget
.
__job_dict
[
name
]
=
job_promise
;
gadget
.
__monitor
.
monitor
(
new
RSVP
.
Queue
()
.
push
(
function
waitForJobPromise
()
{
return
job_promise
;
})
// gadget.__monitor.monitor(job_promise
gadget
.
__monitor
.
monitor
(
new
RSVP
.
Queue
(
job_promise
)
.
push
(
undefined
,
function
handleJobError
(
error
)
{
// Do not crash monitor if the job has been cancelled
// by a new execution
if
(
!
(
error
instanceof
RSVP
.
CancellationError
))
{
throw
error
;
}
...
...
@@ -1918,10 +1892,7 @@ if (typeof document.contains !== 'function') {
result
=
method
(
url
,
options
,
parent_gadget
,
old_element
);
// Set the HTML context
if
(
typeof
result
.
then
===
'
function
'
)
{
return
new
RSVP
.
Queue
()
.
push
(
function
()
{
return
result
;
})
return
new
RSVP
.
Queue
(
result
)
.
push
(
function
setAsyncGadgetInstanceHTMLContext
(
gadget_instance
)
{
return
setGadgetInstanceHTMLContext
(
gadget_instance
,
options
,
parent_gadget
,
url
,
...
...
@@ -2641,11 +2612,8 @@ if (typeof document.contains !== 'function') {
embedded_channel
,
declare_method_list_waiting
;
return
new
RSVP
.
Queue
()
.
push
(
function
waitForLoadingGadget
()
{
// 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
)
{
TmpConstructor
=
result_list
[
0
];
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