Yii Framework Forum: trouble trying to display fullcalendar in yii 1.1 - Yii Framework Forum

Jump to content

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

trouble trying to display fullcalendar in yii 1.1 Rate Topic: -----

#1 User is offline   yiinighter2000 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 5
  • Joined: 08-January 17

Posted 17 April 2017 - 01:14 PM

I'm building a calendar app in yii 1.1 and i want to display it via fullcalendar.

i cant seems to display the fullcalendar. been trying to for the past few hours.


here is the structure of my yii website:

     * protected
        ** modules
           *** Calculation
              **** extensions
                 ***** JcalFullWidget
                    ****** views
                       ******* jcal_fullsize.php
              **** lib
                 ***** fullcalendar
                    ****** fullcalendar.js
                    ****** lib
                       ******* jquery.min.js
                       ******* moment.min.js
                       ******* fullcalendar.css


I want to display my fullcalendar in the `jcal_fullsize.php` widget

here is the code:


**`protected\modules\Calculation\extensions\JcalFullWidget\views\jcal_fullsize.php`**:

    <?php
    $cs=Yii::app()->clientScript;
    $cs->registerCoreScript('jquery');
    $cs->registerCoreScript( 'jquery.ui' );
    $cs->registerScriptFile("/../../../lib/fullcalendar/lib/jquery.min.js");
    $cs->registerScriptFile("/../../../lib/fullcalendar/lib/moment.min.js");
    $cs->registerScriptFile("/../../../lib/fullcalendar/fullcalendar.js");
    $cs->registerCssFile("/../../../lib/fullcalendar/fullcalendar.css");
    $cs->registerCssFile("/../../../lib/fullcalendar/fullcalendar.print.css");
    
    
    $cs->registerScript(
          'fullSizeCalendar',
          '
              alert("Hello! 1!");
              $(document).ready(function() {
        $("#calendar").fullCalendar({
        })
    
    });
              alert("Hello!2 !");
         
    ',
          
          CClientScript::POS_READY
        );
    ?>
            
        
    <div id='calendar'></div>



**`protected\config\main.php`**:
	'components'=>array(

                    'clientScript' => array(

            'coreScriptPosition' => CClientScript::POS_END,
            'defaultScriptFilePosition' => CClientScript::POS_END,

        ),
)



this code do not display the fullcalendar. but the 2 alerts boxes do work.

anybody knows what is the problem an can please help me?

many thanks!
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