jquery - Rendering fullcalendar.io in polymer a core-animated-pages section -


i have app setup using core-animated pages transition between section. in 1 section trying render fullcalendar plugin (http://fullcalendar.io/). using sbg-fullcalendar element this: https://github.com/smorgasbord-development/sgb-fullcalendar

this works great if put element in first section of app. app loads , on domready event calendar renders. however, want include in section , when doesn't render.

i've made updates sbg-calendar element listen core-animated-pages-transition-end event. calendar element catch event , tries creates calendar, still doesn't render.

could rendering issue because jquery selectors don't work in shadow dom? i'm new polymer , unsure lot of inner workings.

here's index page.

<core-animated-pages id="pages" selected="{{selected}}" transitions="cross-fade fade-slide-up fade-scale" fit>          <section layout vertical>              <categories-page class="page" id="categories" cross-fade?="{{largescreen}}" fade-slide-up?="{{!largescreen}}" heading="{{heading}}" flex></categories-page>         </section>          <section layout vertical>             <calendar-page  class="page" cross-fade?="{{largescreen}}" fade-slide-up?="{{!largescreen}}" heading="{{heading}}" flex></calendar-page>         </section>     </core-animated-pages> 

and calendar page:

<link rel="import" href="../base-page/base-page.html"> 

        <!-- main -->         <div main layout vertical>             <core-header-panel id="headerpanel" mode="seamed" flex>                 <core-toolbar>                     <paper-icon-button icon="menu" core-drawer-toggle>                     </paper-icon-button>                     <div id="title" flex>{{heading}}</div>                      <paper-menu-button id="menubtn" noink>                         <paper-icon-button icon="more-vert" noink></paper-icon-button>                         <paper-dropdown class="dropdown" halign="right">                             <core-menu class="menu">                                 <paper-item>settings</paper-item>                                 <paper-item>help</paper-item>                                 <paper-item>feedback</paper-item>                             </core-menu>                         </paper-dropdown>                     </paper-menu-button>                  </core-toolbar>                 <div class="content" style="max-height:1000px;">                          <sgb-fullcalendar id="calendar" defaultview="month"></sgb-fullcalendar>                  </div>             </core-header-panel>         </div> </template> <script>     (function () {         polymer({             willprepare: function () {                 this.super();              },             geturl: function (idx) {                 console.log(window.location.pathname + '/' + idx);                 return '/subjects/' + idx;             }                       });     })(); </script> 

i've been using rob dodson's contacts app example app too.

i've succeded rendering fullcalendar on 1 of section (i used core-animated-pages) using domready method. how in case :

<polymer-element name="calendar-page" attributes="your attribute"> <template>     <style>         :host {             display: block;         }     </style>     <link rel='stylesheet' href='../fullcalendar/fullcalendar.css'>     <div id='calendar'></div> </template> <script>     polymer("calendar-page",{         domready: function() {           $(this.$.calendar).fullcalendar({                 weekends: false ,                 alldayslot: false,                 mintime : "06:00:00",                 maxtime : "18:00:00",                 defaultview: 'agendaweek',                 header: {left:'title', center: 'agendaday,agendaweek,month', right:  'today prev,next'},                 googlecalendarapikey: 'yourapikey',                 events: {                     googlecalendarid: 'yourcalendarid',                 },                 eventclick: function(calevent, jsevent, view) {                     //console.log(calevent);                     return false;                 },             })         },     }); </script> 

don't forget link css file inside of element. hope help!


Comments

Popular posts from this blog

cakephp - simple blog with croogo -

How to group boxplot outliers in gnuplot -

bash - Performing variable substitution in a string -