@@ -172,16 +172,21 @@ public function config($config=NULL) {
172172 * @param mixed $injected optional param for Symfony/Ubiquity
173173 */
174174 public function __construct ($ params =array (),$ injected =NULL ) {
175- $ defaults =['debug ' =>true , ' defer ' =>false ,'ajax ' =>
176- [ ' ajaxTransition ' =>null , ' attr ' =>'' , ' historize ' =>false , ' jsCallback ' =>null ,'hasLoader ' =>true , ' jqueryDone ' => ' html ' ,
177- ' async ' =>true ,'params ' =>null , ' headers ' =>null , ' jsCondition ' => null , ' ajaxLoader ' => null ] ,
175+ $ ajaxDefault =['ajaxTransition ' =>null , ' attr ' =>'' , ' historize ' => false ,'jsCallback ' =>null , ' hasLoader ' => true , ' jqueryDone ' => ' html ' ,
176+ ' async ' =>true , ' params ' =>null , ' headers ' =>null , ' jsCondition ' =>null ,'ajaxLoader ' =>null ];
177+ $ defaults =[ ' debug ' =>true ,'defer ' =>false , ' ajax ' =>$ ajaxDefault ,
178178 'historize ' =>true ,'autoActiveLinks ' =>true
179179 ];
180180 foreach ( $ defaults as $ key => $ val ) {
181181 if (isset ($ params [$ key ])===false || $ params [$ key ]==="" ) {
182182 $ params [$ key ]=$ defaults [$ key ];
183183 }
184184 }
185+ foreach ( $ ajaxDefault as $ key =>$ val ){
186+ if (isset ($ params ["ajax " ][$ key ])===false || $ params ["ajax " ][$ key ]==="" ) {
187+ $ params ["ajax " ][$ key ]=$ ajaxDefault [$ key ];
188+ }
189+ }
185190
186191 if (\array_key_exists ("semantic " , $ params )){
187192 $ this ->semantic (new Semantic ());
0 commit comments