Various lights with lumen estimates

Ok, it's a pretty easy fix:

Search for this:

if(result.length == 23) return result;
return "";

replace with this:

//if(result.length == 23) return result;
return result;

but then the problem is that it cannot load/stream columns without a "header" (ie. something in the first row), and some columns start on the second row, so only columns like lightbox lux are displayed.

Even then, what it does it is only "filter" (display/hide), not sort.

So basically this needs to be rewrite to still use the api, but with different functionality. And it's web development/javascript, blaugh...

The last time I did any coding was 1979. However, I'll take a look and see what I can do with it.

Since it doesn't require write access to the sheet this should be feasible.

It is no big deal to rearrange the sheet appropriately - but some of the data is only available from it as I've just plugged in numbers from all over the place, a lot of my reviews only exist online.

If you're going to do this, the easy way is to make the changes to

constructTable()

_datarows contains the values for the rows. The minimal change is to do a sort on that table structure in the function before the loops that create the html table elements (I would just create another array that parallels _datarows, sort the array[i] entries by the selected column and use that in the loops).

For UI, radio buttons for each column and one more for "none" makes sense.

The alternative is to use the api's built in sort (orderby) function. However this would require more drastic changes to that app, since it uses the cell based feed type from the sheet api, and the sort seems to work on the list (ie. row) based access api.

I'm not a web developer but I'm pretty sure the above is correct (given http://code.google.com/apis/spreadsheets/data/2.0/reference.html#WorksheetFeed).

Instead of trying to understand that POS ajax app, I should've just tried out the spreadsheet UI.

Everyone, instead of being dumb like me use this:

In menu, View->List View

In list view, you can do what that crappy filter app does, plus sort on column.

Can I do that on Don's list without having the password? It asks for a login....

I hope you can't. I don't want it vandalised you see. See the PM I just sent though. You are welcome to copy it and do what you like with it for any non-commercial use. I may make it more open once I've got all the data collated and in one place - and backed up...

I can always copy it in excel and apply autofilter and sort ... but I have to do it every time you add a new light. Would be nice to have it online on a user basis ... I certainly don't want to mess up your list. Would be nice to filter for example 1xAA and then sort by output. I am very familiar with excel vba macros, but never worked with that google docs api.

Uh look:

- Sort and filter without modifying underlying data.

http://docs.google.com/support/bin/answer.py?hl=en&answer=139561

I took a look, but it is an editing operation unfortunately. It will not let me save it in that configuration without making it globally writeable.

The Publish HTML I tried didn't work here, it didn't update when I changed it immediately afterwards. And it and Drupal seemed to be fighting over the formatting.

https://spreadsheets.google.com/pub?key=0ApkFM37n_QnRdDU5MDNzOURjYllmZHI4M3JYMUVwM0E&single=true&gid=1&output=html

is the republished link. Not sure if that'll do any good though.

What I have done is made a copy of the master sheet that it editable by anyone. Since I can revert it in seconds as it is a copy of the main sheet, feel free to play with it.

The link is.

I took a look, but it is an editing operation unfortunately.

It's not. List view is usable in read-only. I did it in http://budgetlightforum.cz.cc/node/505?page=2#comment-9691

Effectively it is, as with my Webkit browser (If it'll work with another browser please let me know) there is no way to save it in that configuration which means I can't publish it that way or produce a link to it. It would have helped if I'd checked this while not logged in.

Except I'm speaking rubbish - it seems that anyone can look at it and use list view. I thought I had to enable it as the owner of the spreadsheet. If you use the recent link I posted, you have access to an editable sheet that anyone can do anything they want with. Since it is a copy of a protected sheet, it is no big deal for me to reset it.

You don't need to save it in that config. Any user can put it into list view. The sheet is also accessible via its "lv" url:

for example if you decide to change the "default" view for sort, click on the column header, and http param "sortcolid" will change ("sort column id") in the url (to, say, 2 for battery type), and you can copy paste it into your sig.

Ah OK, you have to have a Google docs account to use 'autofilter and sort'... had to create one ... then the 'list view' function worked. A pity that you can't use it without one. That is totally not intuitive, that I have to log in to sort someone else's documents.That should be in cell A1 of your table Don. Thanks for all the work BTW.

Good idea!

Done.

Hehe, thanks. That chat option in the right upper corner is also funky. ;-)

Don, you have 2 PM.

Might be better to just give the ListView url by default. It's quite a bit cleaner and more useful anyway.

Filtering by battery type is pretty cool, but perhaps a bit of work to make that all consistent. I wonder if there are "category" types that can be useful to filter on, like "mode", so for each light, the mode it's in is a seperate column.

For that link to work you must be logged in... so users with no google account can't see it... bad idea in my opinion.

That's weird. Apparently this is a "known" issue: http://www.google.com/support/forum/p/Google+Docs/thread?tid=6a70db1cb1eab4e8&hl=en&start=80

I wonder if "publishing" the doc makes any difference. Seems like an oversight to me. No big deal either way.

And everyone should have a google account anyway, because google loves you.