dbxapp 4.1.3
CMS, Shop, Workflows und modulare Geschäftsanwendungen
Loading...
Searching...
No Matches
dbxAjax_submitter_test.php File Reference

Go to the source code of this file.

Variables

 $dbxRoot = dirname(__DIR__, 2)
 Regressionstest für benannte Submit-Schaltflächen in AJAX-Formularen.
 $ajaxFile = $dbxRoot . DIRECTORY_SEPARATOR . 'js' . DIRECTORY_SEPARATOR . 'lib' . DIRECTORY_SEPARATOR . 'ajax.js'
 $confirmFile = $dbxRoot . DIRECTORY_SEPARATOR . 'js' . DIRECTORY_SEPARATOR . 'lib' . DIRECTORY_SEPARATOR . 'confirm.js'
 $cartTemplate
 $shopStartTemplate
 $shopJsFile
 $shopServiceFile
 $ajax = is_file($ajaxFile) ? (string)file_get_contents($ajaxFile) : ''
 $confirm = is_file($confirmFile) ? (string)file_get_contents($confirmFile) : ''
 $cart = is_file($cartTemplate) ? (string)file_get_contents($cartTemplate) : ''
 $shopStart = is_file($shopStartTemplate) ? (string)file_get_contents($shopStartTemplate) : ''
 $shopJs = is_file($shopJsFile) ? (string)file_get_contents($shopJsFile) : ''
 $shopService = is_file($shopServiceFile) ? (string)file_get_contents($shopServiceFile) : ''
 $errors = array()
if(strpos( $ajax, 'submitSource:e.submitter||null')===false) if(strpos($ajax, 'body.set(ctx.submitName, ctx.submitValue)')===false) if(strpos( $confirm, 'form.requestSubmit(source)')===false) if(strpos($confirm, 'dbx.ajax.run(ajaxRoot') !==false) if(strpos( $confirm, 'data-dbx-confirm-submitter')===false||strpos( $confirm, 'form.appendChild(submitProxy)')===false) if(strpos($cart, 'name="clear"')===false) if(strpos( $shopService, 'name="remove"')===false) if(strpos($cart, 'data-dbx-shop-cart-count="{cart_count}"')===false||strpos($shopService, "add_rep('cart_count'")===false) if(!preg_match('#dbxShop/design/js/shop\.js\?v=\d+#', $shopStart)||strpos( $shopJs, 'window.dbx.event.on("ajax:after"')===false) if ( $errors !==array())

Variable Documentation

◆ $ajax

$ajax = is_file($ajaxFile) ? (string)file_get_contents($ajaxFile) : ''

◆ $ajaxFile

$ajaxFile = $dbxRoot . DIRECTORY_SEPARATOR . 'js' . DIRECTORY_SEPARATOR . 'lib' . DIRECTORY_SEPARATOR . 'ajax.js'

Definition at line 14 of file dbxAjax_submitter_test.php.

◆ $cart

$cart = is_file($cartTemplate) ? (string)file_get_contents($cartTemplate) : ''

Definition at line 27 of file dbxAjax_submitter_test.php.

◆ $cartTemplate

$cartTemplate
Initial value:
= $dbxRoot . DIRECTORY_SEPARATOR . 'modules' . DIRECTORY_SEPARATOR . 'dbxShop'
. DIRECTORY_SEPARATOR . 'tpl' . DIRECTORY_SEPARATOR . 'htm' . DIRECTORY_SEPARATOR . 'shop-cart-report.htm'
$dbxRoot
Regressionstest für benannte Submit-Schaltflächen in AJAX-Formularen.

Definition at line 16 of file dbxAjax_submitter_test.php.

◆ $confirm

$confirm = is_file($confirmFile) ? (string)file_get_contents($confirmFile) : ''

◆ $confirmFile

$confirmFile = $dbxRoot . DIRECTORY_SEPARATOR . 'js' . DIRECTORY_SEPARATOR . 'lib' . DIRECTORY_SEPARATOR . 'confirm.js'

Definition at line 15 of file dbxAjax_submitter_test.php.

◆ $dbxRoot

$dbxRoot = dirname(__DIR__, 2)

Regressionstest für benannte Submit-Schaltflächen in AJAX-Formularen.

Hintergrund: FormData(form) enthält den Wert des geklickten Submit-Buttons nicht. ajax.js muss deshalb SubmitEvent.submitter übernehmen. confirm.js darf die AJAX-Verarbeitung außerdem nicht direkt am Button starten, weil die AJAX-Konfiguration regulär am Formular hängen kann.

Definition at line 13 of file dbxAjax_submitter_test.php.

◆ $errors

◆ $shopJs

$shopJs = is_file($shopJsFile) ? (string)file_get_contents($shopJsFile) : ''

Definition at line 29 of file dbxAjax_submitter_test.php.

◆ $shopJsFile

$shopJsFile
Initial value:
= $dbxRoot . DIRECTORY_SEPARATOR . 'modules' . DIRECTORY_SEPARATOR . 'dbxShop'
. DIRECTORY_SEPARATOR . 'design' . DIRECTORY_SEPARATOR . 'js' . DIRECTORY_SEPARATOR . 'shop.js'

Definition at line 20 of file dbxAjax_submitter_test.php.

◆ $shopService

$shopService = is_file($shopServiceFile) ? (string)file_get_contents($shopServiceFile) : ''

Definition at line 30 of file dbxAjax_submitter_test.php.

◆ $shopServiceFile

$shopServiceFile
Initial value:
= $dbxRoot . DIRECTORY_SEPARATOR . 'modules' . DIRECTORY_SEPARATOR . 'dbxShop'
. DIRECTORY_SEPARATOR . 'include' . DIRECTORY_SEPARATOR . 'dbxShopService.class.php'

Definition at line 22 of file dbxAjax_submitter_test.php.

◆ $shopStart

$shopStart = is_file($shopStartTemplate) ? (string)file_get_contents($shopStartTemplate) : ''

Definition at line 28 of file dbxAjax_submitter_test.php.

◆ $shopStartTemplate

$shopStartTemplate
Initial value:
= $dbxRoot . DIRECTORY_SEPARATOR . 'modules' . DIRECTORY_SEPARATOR . 'dbxShop'
. DIRECTORY_SEPARATOR . 'tpl' . DIRECTORY_SEPARATOR . 'htm' . DIRECTORY_SEPARATOR . 'start.htm'

Definition at line 18 of file dbxAjax_submitter_test.php.

◆ if

if(strpos($ajax, 'submitSource:e.submitter||null')===false) if(strpos( $ajax, 'body.set(ctx.submitName, ctx.submitValue)')===false) if(strpos($confirm, 'form.requestSubmit(source)')===false) if(strpos( $confirm, 'dbx.ajax.run(ajaxRoot') !==false) if(strpos($confirm, 'data-dbx-confirm-submitter')===false||strpos($confirm, 'form.appendChild(submitProxy)')===false) if(strpos( $cart, 'name="clear"')===false) if(strpos($shopService, 'name="remove"')===false) if(strpos( $cart, 'data-dbx-shop-cart-count="{cart_count}"')===false||strpos( $shopService, "add_rep('cart_count'")===false) if(!preg_match('#dbxShop/design/js/shop\.js\?v=\d+#', $shopStart)||strpos($shopJs, 'window.dbx.event.on("ajax:after"')===false) if($errors !==array()) ( $errors ! = = array())

Definition at line 72 of file dbxAjax_submitter_test.php.