mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-05-22 05:15:29 +09:00
Fix empty procDocumentAddCart request (2.1.24 regression) #2568
This commit is contained in:
parent
b15fc8deb3
commit
3c44f96f63
2 changed files with 25 additions and 14 deletions
|
|
@ -653,7 +653,7 @@ Rhymix.ajaxForm = function(form, success, error) {
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
Rhymix.checkboxToggleAll = function(name) {
|
Rhymix.checkboxToggleAll = function(name) {
|
||||||
if (!window[name]) {
|
if (typeof name === 'undefined') {
|
||||||
name='cart';
|
name='cart';
|
||||||
}
|
}
|
||||||
let options = {
|
let options = {
|
||||||
|
|
@ -1457,12 +1457,16 @@ function popopen(url, target) {
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
function doAddDocumentCart(obj) {
|
function doAddDocumentCart(obj) {
|
||||||
|
if (obj && obj.value) {
|
||||||
Rhymix.addedDocument.push(obj.value);
|
Rhymix.addedDocument.push(obj.value);
|
||||||
|
}
|
||||||
setTimeout(function() {
|
setTimeout(function() {
|
||||||
|
if (Rhymix.addedDocument.length > 0) {
|
||||||
exec_json('document.procDocumentAddCart', {
|
exec_json('document.procDocumentAddCart', {
|
||||||
srls: Rhymix.addedDocument.join(',')
|
srls: Rhymix.addedDocument
|
||||||
});
|
});
|
||||||
Rhymix.addedDocument = [];
|
Rhymix.addedDocument = [];
|
||||||
|
}
|
||||||
}, 100);
|
}, 100);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -3301,16 +3301,23 @@ class DocumentController extends Document
|
||||||
}
|
}
|
||||||
|
|
||||||
// Get document_srl
|
// Get document_srl
|
||||||
$srls = explode(',',Context::get('srls'));
|
$srls = Context::get('srls');
|
||||||
for($i = 0; $i < count($srls); $i++)
|
if (is_array($srls))
|
||||||
{
|
{
|
||||||
$srl = trim($srls[$i]);
|
$document_srls = array_map('intval', $srls);
|
||||||
|
}
|
||||||
if(!$srl) continue;
|
else
|
||||||
|
{
|
||||||
$document_srls[] = $srl;
|
$document_srls = array_map('intval', explode(',', $srls));
|
||||||
|
}
|
||||||
|
|
||||||
|
$document_srls = array_unique(array_filter($document_srls, function($srl) {
|
||||||
|
return $srl > 0;
|
||||||
|
}));
|
||||||
|
if (!count($document_srls))
|
||||||
|
{
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
if(!count($document_srls)) return;
|
|
||||||
|
|
||||||
// Get module_srl of the documents
|
// Get module_srl of the documents
|
||||||
$args = new stdClass;
|
$args = new stdClass;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue