[ 
https://issues.apache.org/jira/browse/SHINDIG-1723?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13224359#comment-13224359
 ] 

[email protected] commented on SHINDIG-1723:
--------------------------------------------------------


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/4216/#review5684
-----------------------------------------------------------

Ship it!


LGTM, nice catch.

- Dan


On 2012-03-07 06:44:46, Yao Zhang wrote:
bq.  
bq.  -----------------------------------------------------------
bq.  This is an automatically generated e-mail. To reply, visit:
bq.  https://reviews.apache.org/r/4216/
bq.  -----------------------------------------------------------
bq.  
bq.  (Updated 2012-03-07 06:44:46)
bq.  
bq.  
bq.  Review request for shindig and Henry Saputra.
bq.  
bq.  
bq.  Summary
bq.  -------
bq.  
bq.  runAction function receives an empty array when it calls the 
registry.getGadgetSites instead of "undefined", which is what it receives when 
gadget loading works in earlier builds. Therefore, the first section in "if 
(!gadgetSites)" below doesn't get run and instead it incorrectly goes to the 
"else". .getGadgetSites appears to now always return an array and it will be 
empty if there aren't any sites instead of "undefined" like in the past.
bq.  
bq.  runAction: function(actionId, opt_selection) {
bq.  var action = registry.getItemById(actionId);
bq.  if (action) {
bq.  // if gadget site has not been registered yet
bq.  // the gadget needs to be rendered
bq.  var gadgetSites = registry.getGadgetSites(actionId);
bq.  if (!gadgetSites) {
bq.  var gadgetUrl = registry.getUrl(actionId);
bq.  pendingActions[actionId] = {
bq.  selection: opt_selection || container_.selection.getSelection()
bq.  };
bq.  // set optional params
bq.  ......
bq.  }, 
bq.  
bq.  
bq.  This addresses bug SHINDIG-1723.
bq.      https://issues.apache.org/jira/browse/SHINDIG-1723
bq.  
bq.  
bq.  Diffs
bq.  -----
bq.  
bq.    
http://svn.apache.org/repos/asf/shindig/trunk/features/src/main/javascript/features/actions/actions_container.js
 1297846 
bq.  
bq.  Diff: https://reviews.apache.org/r/4216/diff
bq.  
bq.  
bq.  Testing
bq.  -------
bq.  
bq.  Done.
bq.  
bq.  
bq.  Thanks,
bq.  
bq.  Yao
bq.  
bq.


                
> runAction function in action_container.js receives an empty array when it 
> calls the registry.getGadgetSites instead of "undefined"
> ----------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: SHINDIG-1723
>                 URL: https://issues.apache.org/jira/browse/SHINDIG-1723
>             Project: Shindig
>          Issue Type: Bug
>          Components: Javascript 
>    Affects Versions: 2.5.0
>            Reporter: Yao Zhang
>
> runAction function receives an empty array when it calls the 
> registry.getGadgetSites instead of "undefined", which is what it receives 
> when gadget loading works in earlier builds.  Therefore, the first section in 
> "if (!gadgetSites)" below doesn't get run and instead it incorrectly goes to 
> the "else".  .getGadgetSites appears to now always return an array and it 
> will be empty if there aren't any sites instead of "undefined" like in the 
> past. 
> runAction: function(actionId, opt_selection) {
> var action = registry.getItemById(actionId);
> if (action) {
> // if gadget site has not been registered yet
> // the gadget needs to be rendered
> var gadgetSites = registry.getGadgetSites(actionId);
> if (!gadgetSites) {
> var gadgetUrl = registry.getUrl(actionId);
> pendingActions[actionId] = {
> selection: opt_selection || container_.selection.getSelection()
> };
> // set optional params
> ......
> }, 

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to