Yii Framework Forum: No Display Dialog When Running In Mode Production - Yii Framework Forum

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

No Display Dialog When Running In Mode Production Debug mode is ok, but production is not ok. Rate Topic: -----

#1 User is offline   trqson 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 10
  • Joined: 12-December 12
  • Location:Vietnam

Posted 16 May 2013 - 01:43 AM

With Yii v1.1.13, in mode production, app no display JuiDialog.

I detected and modify in framework, but could not understand why.

yii\framework\web\js\packages.php:
From
'js'=>array(YII_DEBUG ? 'jquery.js' : 'jquery.min.js'),
to
'js'=>array('jquery.js'),

0

#2 User is offline   bennouna 

  • Master Member
  • PipPipPipPip
  • Yii
  • Group: Members
  • Posts: 1,166
  • Joined: 05-January 12
  • Location:Morocco

Posted 16 May 2013 - 02:54 AM

Maybe you are disabling or setting
jquery.min.js
in your
clientScript
config or in the controller that renders the view with the
CJuiDialog
?
0

#3 User is offline   trqson 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 10
  • Joined: 12-December 12
  • Location:Vietnam

Posted 16 May 2013 - 08:32 PM

With the process: 1.Open Dialog -> 2.Post data & Close Dialog -> 3.Update GridView

1.Open Dialog
Before render, in Controller:
//I don't understand, but to update gridview after close dialog.
Yii::app()->clientscript->scriptMap['jquery.js']        = false; 
Yii::app()->clientscript->scriptMap['jquery-ui.min.js'] = false;

3.Update GridView
View:
$("#bp_group_grid").yiiGridView.update("bp_group_grid");

0

#4 User is offline   bennouna 

  • Master Member
  • PipPipPipPip
  • Yii
  • Group: Members
  • Posts: 1,166
  • Joined: 05-January 12
  • Location:Morocco

Posted 17 May 2013 - 02:03 AM

Remove your initial change, and add in your controller:

Yii::app()->clientscript->scriptMap['jquery.min.js']        = false; 

0

#5 User is offline   trqson 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 10
  • Joined: 12-December 12
  • Location:Vietnam

Posted 19 May 2013 - 08:44 PM

Thank

OK with debug and production mode:
if (Yii::app()->request->isAjaxRequest)
{
	if (YII_DEBUG)
	{
		Yii::app()->clientscript->scriptMap['jquery.js']             = false;
	}
	else
	{
		Yii::app()->clientscript->scriptMap['jquery.min.js']         = false;
	}
}

0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users