Yii Framework Forum: Fancybox Issues an Usage Discussion - Yii Framework Forum

Jump to content

  • (3 Pages)
  • +
  • 1
  • 2
  • 3
  • You cannot start a new topic
  • You cannot reply to this topic

Fancybox Issues an Usage Discussion Rate Topic: -----

#41 User is offline   dfortun 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 9
  • Joined: 01-June 11

Posted 10 June 2011 - 04:21 PM

Hello I have and issue with the submit button after show the fancybox. It loses completely the submit functionality.
If I press the Preview link on the grid it will pop up the fancybox, I close it and when I try to press the confirm button it does not work. I got an IE error

Quote

Mensaje: 'jQuery.yii' is null or not an object


I leave you part of the code for your review:

$this->widget('zii.widgets.grid.CGridView', array(
	'id'=>'card-grid',
	'dataProvider'=>$model->search(), 
	'afterAjaxUpdate'=>'function(id, data){ fancyboxRearm("a[rel=myrel]") }', //provide the correct target!!!
	'columns'=>array(
		'first_name',
		'middle_name',
		'last_name',
		'suffix',
		'title_line1',
		'title_line2',
		'phone_main',
		'phone_direct',
		'phone_mobile',
		'phone_fax',
		'phone_noc',
		'email',
		'address',
		
		
		array('name'=>'view_picture', 
				'type'=>'raw', 
				'header'=>'', 
				'value'=> 'CHtml::link("Preview", Yii::app()->createUrl("card/view", array("id"=>$data->id)), array("rel"=>"myrel"))', 
				'htmlOptions'=>array('width'=>'40','style'=>'text-align:center;'), 
		), 
		array( 
                        'id'=>'inline',
                        'class'=>'CButtonColumn',
						'template' => '{delete}', 
						'deleteButtonImageUrl' => false, 
 
		),
	),
)); ?>

	<div style="color:#72a7d9; font-size:12px; font-style:italic; padding:10px 20px 10px 10px; text-align:left; text-align:right;  ">
		<?php echo CHtml::button('Confirm', array('submit' => array('/email/index&id='.$model->id_order), )); ?>
		<?php 
			$confirmOut = Yii::app()->request->baseUrl.'/images/confirm-default.png';
			$confirmOver = Yii::app()->request->baseUrl.'/images/confirm-over.png';
			echo CHtml::imageButton($confirmOut, 
			array('submit' => array('/email/index&id='.$model->id_order), 'id'=>'confirmButton', 'width'=>'156', 'heigth'=>'53', 'onmouseover'=>'this.src=(\''.$confirmOver.'\')', 'onmouseout'=>'this.src=(\''.$confirmOut.'\')')); 
		?>
		
	</div>


HELP!!
Attached File  comfirm_lost.JPG (82.1K)
Number of downloads: 53
0

#42 User is offline   remistp 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 3
  • Joined: 13-June 11

Posted 13 June 2011 - 10:16 AM

I'm using the extension in a very simple way


In my view file :

Quote

<?php $this->widget('application.extensions.fancybox.EFancyBox', array(
'target'=>'a#single_image',
'config'=>array(
'scrolling' => 'yes',
'titleShow' => true,),));?>
CHtml::link("aperçu", array('images/history_preview.jpg'), array('id'=>'single_image'))



When browsing to the page in IE, it works but it keeps populating my applicationélog file with error like these:

Quote

2011/06/13 10:52:29 [error] [exception.CHttpException.404] exception 'CHttpException' with message 'Unable to resolve the request « fancybox/fancy_shadow_s.png ».' in /home/remi/public/framework/web/CWebApplication.php:328
Stack trace:
#0 /home/remi/public/framework/web/CWebApplication.php(121): CWebApplication->runController('fancybox/fancy_...')
#1 /home/remi/public/framework/base/CApplication.php(135): CWebApplication->processRequest()
#2 /home/remi/public/demo/index.php(13): CApplication->run()
#3 {main} REQUEST_URI=/fancybox/fancy_shadow_s.png


2011/06/13 10:52:45 [error] [exception.CHttpException.404] exception 'CHttpException' with message 'Can't find the requested action « fancybox ».' in /home/remi/public/framework/web/CController.php:444
Stack trace:
#0 /home/remi/public/framework/web/CController.php(262): CController->missingAction('fancybox')
#1 /home/remi/public/framework/web/CWebApplication.php(324): CController->run('fancybox')
#2 /home/remi/public/framework/web/CWebApplication.php(121): CWebApplication->runController('site/fancybox/f...')
#3 /home/remi/public/framework/base/CApplication.php(135): CWebApplication->processRequest()
#4 /home/remi/public/demo/index.php(13): CApplication->run()
#5 {main} REQUEST_URI=/site/fancybox/fancy_shadow_s.png


Someone knows why and how to get rid of these errors ?
Thank you very much!
0

#43 User is offline   Dagfinn 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 5
  • Joined: 01-November 11

Posted 01 November 2011 - 01:43 PM

Hi,

I am not getting the fancybox to load the images that is in the container that the fancybox is loading.
Here is my code:

    <div id="offer_images" class="float_left">
        <?php
            $images = $model->getImages();
            $first = true;
            foreach ($images as $img) {
                if ($first) {
                    $first = false;
                    echo '<div class="offer_main_picture_container"><a href="#" rel="gallery">'.CHtml::image($img->picture_path, "Produktbilde", array('class'=>'offer_main_picture lkj', 'title'=>$img->title)).'</a></div>';
                } else {
                    echo '<div class="offer_picture_container"><a href="#" rel="gallery">'.CHtml::image($img->thumbnail_path, "Produktbilde", array('class'=>'offer_picture', 'title'=>$img->title)).'</a></div>';
                }
            }
        ?>
    </div>
    
    <?php
        $this->widget('ext.fancybox.EFancyBox', array(
            'target'=>'a[rel=gallery]',
            'config'=>array(
                    'scrolling' => 'yes',
                    'titleShow' => true,
                ),
            )
        );
    ?>



The fancybox is loading the awesome popup, but I always get the message: "The requested content cannot be loaded.
Please try again later."

The images are shown in the different <div><a ..><img... />, so I know that the images has correct URL.

Please help... Thanks!
0

#44 User is offline   Dagfinn 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 5
  • Joined: 01-November 11

Posted 08 November 2011 - 06:08 PM

OK, I managed to fix the bug myself...

I simply needed to add the url to the image in the anchor tag. Pretty silly that I did not see that earlier.
0

#45 User is offline   sunnycoolboy 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 4
  • Joined: 15-January 11

Posted 18 November 2011 - 08:38 PM

View Postthiagovidal, on 22 July 2010 - 06:34 PM, said:

Yes dude. I got this issue on one of my projects...
Try use 'js:...' at the beginning of the functions like folow

'onStart':'js:function(){console.log(\'it works\'\');}',
'onClosed':'js:function(){alert(\'it works\');}'

Thanks very very very very very much :lol:
0

#46 User is offline   H.G.Chavda 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 6
  • Joined: 12-May 11

Posted 03 February 2012 - 09:21 AM

View Postnasrul, on 21 July 2010 - 01:07 AM, said:

solved

<?php echo CHtml::link("tes","#data", array('id'=>'inline')); ?>
<div style="display:none"><div id="data">Lorem ipsum dolor sit amet, consectetur adipiscing elit.</div></div>
<?php $this->widget('application.extensions.fancybox.CFancyBox', array(
	'target'=>'a#inline',
	'config'=>array(
		'scrolling'		=> 'yes',
		'titleShow'		=> true,
	),
	)
);
?>




Hi,

above code doed not show anything i tried please help me

Thanks in advance
0

#47 User is offline   Yureshwar Ravuri 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 29
  • Joined: 30-November 11
  • Location:Hyderabad

Posted 05 March 2012 - 01:25 AM

Hi,

Any example on how to add youtube links. As the config options from fancybox.net are different for youtube links or swf objects.

Thanks
Yureshwar Ravuri
--------------------------
Thanks,
Yureshwar Ravuri
Mail: yureshwar@yuresh.net
Web: http://www.yuresh.net
0

#48 User is offline   astroboyyy 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 2
  • Joined: 28-March 12

Posted 01 December 2012 - 04:28 AM

how to show fancybox in fancybox?
0

#49 User is offline   desatir7316 

  • Standard Member
  • PipPip
  • Yii
  • Group: Members
  • Posts: 266
  • Joined: 19-March 14

Posted 29 March 2014 - 12:35 PM

i have some thumbs in my view file
how can i show them by fancybox by clicking on one of theme and walk through by next and prev buttons?
0

Share this topic:


  • (3 Pages)
  • +
  • 1
  • 2
  • 3
  • 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