Knockout and  Socket.io realtime communication for admin

Thanks for giving me push access!
This update is a little cray cray though, so I'll pull request you for this one, so you can tell me what you think first haha.

Socket.io + Knockout js

Identical implementation as Print Shoppe, but with a lot of cruft removed which wasn't needed due to the update/notify posts being proper requests.

*** note you will need to npm install again *** argh.

😱
Ah I was wondering about them. I saw they changed UI for some reason? so I migrated those changes over to the knockout stuff.

happy to change ti all back!!

On 2 December 2014 at 23:53:35 , Mike Skalnik (notifications@github.com) wrote:

In views/admin.handlebars:

>            <td class="update">
>              <form class="form-inline"
>                    role="form"
> -                  action="/admin/queue/{{id}}/?_method=PATCH"
> -                  method="post">
> -              <select class="form-control input-sm {{status}}" name="status">
> -                {{#each ../possibleStatuses}}
> -                  {{#equal ../status this}}
> -                    <option value="{{this}}" selected >{{this}}</option>
> -                  {{else}}
> -                    <option value="{{this}}">{{this}}</option>
> -                  {{/equal}}
> -                {{/each}}
> +                  method="post"
> +                  data-bind="attr: { 'action': '/admin/queue/' + id + '/?_method=PATCH', }">
> +              <select data-bind="value: status, attr: { 'class': status }, css: { 'form-control': true, 'input-sm': true, status: true }" name="status">
> +                    <!-- need to figure out how to get this list pulling from a dynamic list again -->
Looks like this isn't quite functioning yet. When I load a list, everything is set to pending (not actually valid, should be submitted, but happy to change if you want to update wording). When I pick a new thing from the drop down, it changes, but it doesn't persist a refresh.

—
Reply to this email directly or view it on GitHub.