#220 Autocomplete the calendar names upon adding/editing a widget about them
Merged by pingou. Opened by pingou.
pingou/fedora-hubs autocomplete_calendar  into  develop

Download 220.patch
no initial comment

not sure if editing this line was necessary and also it looks like indentation is off as well

Locally it looks good, I removed the two spaces indentation that was there before

Ohh i see now. This line is fine.

Steps I took that was unsuccessful

  1. Login
  2. Edit hubs
  3. Add meetings-widget on left side
  4. in the Input box the auto-complete doesn't show up on any input char input

Trying to debug it on my machine. I added a console.log right before the if statement and it seems that this function never gets called on my machine.

edit 2

When I click on edit meetings. the function does get called. But for some reason I'm unable to see the edit panel pop up.

  • edit 3 *

Verified on the current develop branch that edit widget works. Something here is blocking it from popping up.

I also suggest we move this out of edit.html so that we can use this same function in add_widget

More of a style issue but I typically try to avoid using for() loops when possible because dealing with the issues they introduce can be tricky. Especially when the iterator is declared globally like you have here.

My suggestion would be:

var d = data.calendars.map(function(cal) {
  return cal.name;
});

I always have problems with using .map() , one day I'll know :)

So I fall back to what I know, a for loop

Adjusted, thanks!

rebased

@pingou changes work locally for me with adding and editing. :thumbsup:

Cool, let's merge then :)

Pull-Request has been merged by pingou

Metadata