mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-06 18:21:39 +09:00
Merge branch 'master' into pr/async-ajax
This commit is contained in:
commit
f64a15d971
34 changed files with 356 additions and 144 deletions
|
|
@ -185,7 +185,7 @@ class TemplateParser_v2
|
|||
}, $content);
|
||||
|
||||
// Inline scripts.
|
||||
$content = preg_replace_callback('#(?<=\s)(href="javascript:|on[a-z]+=")([^"]*?)"#i', function($match) {
|
||||
$content = preg_replace_callback('#(?<=\s)(href="javascript:|pattern="|on[a-z]+=")([^"]*?)"#i', function($match) {
|
||||
return $match[1] . '<?php $this->config->context = \'JS\'; ?>' . $match[2] . '<?php $this->config->context = \'HTML\'; ?>"';
|
||||
}, $content);
|
||||
|
||||
|
|
|
|||
|
|
@ -668,7 +668,7 @@ Rhymix.ajaxForm = function(form, success, error) {
|
|||
* @return void
|
||||
*/
|
||||
Rhymix.checkboxToggleAll = function(name) {
|
||||
if (!window[name]) {
|
||||
if (typeof name === 'undefined') {
|
||||
name='cart';
|
||||
}
|
||||
let options = {
|
||||
|
|
@ -1027,7 +1027,7 @@ $(function() {
|
|||
e.preventDefault();
|
||||
e.stopPropagation();
|
||||
|
||||
if (window[Rhymix.loadedPopupMenus[params.menu_id]]) {
|
||||
if (Rhymix.loadedPopupMenus[params.menu_id]) {
|
||||
return Rhymix.displayPopupMenu(params, response_tags, params);
|
||||
}
|
||||
|
||||
|
|
@ -1472,12 +1472,16 @@ function popopen(url, target) {
|
|||
* @return void
|
||||
*/
|
||||
function doAddDocumentCart(obj) {
|
||||
Rhymix.addedDocument.push(obj.value);
|
||||
if (obj && obj.value) {
|
||||
Rhymix.addedDocument.push(obj.value);
|
||||
}
|
||||
setTimeout(function() {
|
||||
exec_json('document.procDocumentAddCart', {
|
||||
srls: Rhymix.addedDocument.join(',')
|
||||
});
|
||||
Rhymix.addedDocument = [];
|
||||
if (Rhymix.addedDocument.length > 0) {
|
||||
exec_json('document.procDocumentAddCart', {
|
||||
srls: Rhymix.addedDocument
|
||||
});
|
||||
Rhymix.addedDocument = [];
|
||||
}
|
||||
}, 100);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -467,13 +467,13 @@ function legacy_filter(filter_name, form, module, act, callback, responses, conf
|
|||
};
|
||||
|
||||
if (!hasFile) {
|
||||
Rhymix.ajax(module + '.' + act, params, callback_wrapper);
|
||||
exec_json(module + '.' + act, params, callback_wrapper);
|
||||
} else {
|
||||
var fd = new FormData();
|
||||
for (let key in params) {
|
||||
fd.append(key, params[key]);
|
||||
}
|
||||
Rhymix.ajax(null, fd, callback_wrapper);
|
||||
exec_json('raw', fd, callback_wrapper);
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue