[Midas] tree browser action list
Michael Grauer
michael.grauer at kitware.com
Wed Jul 4 18:17:57 EDT 2012
Sorry, I'm pulling from a development branch of Midas in git for that file.
I just tried your JS code in a module of mine and it worked. Here are the
relevant parts of my Notification.php to make this work
<code>
public function init()
{
$this->addCallBack('CALLBACK_CORE_GET_FOOTER_LAYOUT', 'getFooter');
}
public function getFooter()
{
$baseUrl = Zend_Controller_Front::getInstance()->getBaseUrl();
$js =
$baseUrl.'/modules/'.$this->moduleName.'/public/js/'.$this->moduleName.'.notify.js';
$html = '<script type="text/javascript" src="'.$js.'"></script>';
return $html;
}
</code>
This would work if your js file is in annio/public/js/annio.notify.js, so
you may need to tweak this a bit.
Also, note that this works for "selecting" rather than "highlighting" an
item, which means you have to check the checkbox.
-Mike
On Wed, Jul 4, 2012 at 5:55 PM, Mona Wong <mona at sdsc.edu> wrote:
>
> Hi Michael:
>
> Hmm, my statistics module doesn't have a statistics.notify.js.
>
> I tried a simplier version of your code in
> annio/public/js/annio.js (that's the name specified in my Notification
> callback; I take it I can call it whatever I want) but I don't see anything
> in the Midas UI.
>
> Here is my JS code:
>
> $(document).ready(function() {
> midas.registerCallback('CALLBACK_CORE_RESOURCES_SELECTED', 'annio',
> function(params) {
> if(params.items.length > 0) {
> var html = '<li>Start Annio';
> html += '</li>';
>
> params.selectedActionsList.append(html);
> }
> });
> });
>
> What else am I missing?
>
> thanks,
> Mona
>
>
> *********************************************
> Mona Wong
> Web & iPad Application Developer
> San Diego Supercomputer Center
>
> You are the light you wish to see.
> *********************************************
>
>
>
> _______________________________________________
> Midas mailing list
> Midas at public.kitware.com
> http://public.kitware.com/cgi-bin/mailman/listinfo/midas
>
--
Thanks,
Michael Grauer
R & D Engineer
Kitware, Inc.
919 969 6990 x322
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/midas/attachments/20120704/31d23811/attachment.html>
More information about the Midas
mailing list