Note that, you can't use parent.finishedLoading() due to cross domain reasons, you have to use something like gadget.somthing.fireFinishedLoading() which internally uses RPC. Please talk with Lasantha, he has done similar work. Before implementing this, can you please check if this is already there. There might be an already exiting callback form navigate gadget API in container library.
On Mon, May 2, 2016 at 7:40 AM, Nisala Nanayakkara <[email protected]> wrote: > Hi All, > > I am currently on the process of implementing the support to provide > gadget load order in Dashboard Server. Currently the gadgets are loaded > asynchronously without any order. But the gadget authors should be able to > provide the gadgets load order so that some dependent gadgets will be > loaded before the publisher gadgets. > > For example : all the subscriber gadgets needs to be loaded before the > publisher gadget is loaded. > > I think it would be easier,if we can introduce an event trigger which will > be triggered at the completion of loading of each gadget, into the CDATA > section of gadget definition file in the store as follows. > > <?xml version="1.0" encoding="UTF-8" ?> > <Module> > <ModulePrefs title="Date Picker" description="g1"> > <Require feature="pubsub-2"/> > <Require feature="dynamic-height"/> > </ModulePrefs> > <Content type="html"> > <![CDATA[ > <head> > <meta charset="utf-8"> > <title>jQuery UI Datepicker - Default functionality</title> > <link rel="stylesheet" > href="/portal/libs/bootstrap_3.3.5/css/bootstrap.min.css"> > <link rel="stylesheet" href="css/bootstrap-datepicker.min.css" > type="text/css"/> > <style> > .datepicker-inline { > margin:0 auto; > } > </style> > <script > src="/portal/libs/jquery_1.11.0/jquery-1.11.3.min.js"></script> > <script > src="/portal/libs/bootstrap_3.3.5/js/bootstrap.min.js"></script> > <script src="js/bootstrap-datepicker.min.js"></script> > <script> > $(function() { > $("#datepicker").datepicker({ > orientation: 'top' > }); > }); > </script> > </head> > <body> > <div class="container-fluid"> > <div class="row"> > <div class="col-md-12"> > <div id="datepicker"></div> > </div> > </div> > </div> > </body> > *<script>parent.finishedLoading()</script>* > ]]> > </Content> > </Module> > > So shall i introduce an event trigger as above or do you have any other > opinions regarding this issue? > > Thanks, > Nisala > > -- > *Nisala Niroshana Nanayakkara,* > Software Engineer > Mobile:(+94)717600022 > WSO2 Inc., http://wso2.com/ > -- With regards, *Manu*ranga Perera. phone : 071 7 70 20 50 mail : [email protected]
_______________________________________________ Dev mailing list [email protected] http://wso2.org/cgi-bin/mailman/listinfo/dev
