From c785347a84a66d36d5f03fec74f91f4ffd832037 Mon Sep 17 00:00:00 2001 From: John Cleaver Date: Wed, 13 Apr 2016 18:35:19 -0400 Subject: [PATCH 1/2] Added a function to tell if a bundle is complete. --- main.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/main.js b/main.js index 234091c..66dc2f8 100644 --- a/main.js +++ b/main.js @@ -140,6 +140,9 @@ var v = new Vue({ } return true; + }, + isBundleComplete: function(bundle_id){ + return this.user_data[bundle_id].length >= this.static.bundles[bundle_id].items_required; } } }); From 8024b6f032282f8a931d0b48a49b319ac36a0029 Mon Sep 17 00:00:00 2001 From: John Cleaver Date: Wed, 13 Apr 2016 18:39:00 -0400 Subject: [PATCH 2/2] Changed the color of unchecked items in complete bundles to default. --- index.html | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/index.html b/index.html index a504b01..167b2b3 100644 --- a/index.html +++ b/index.html @@ -215,7 +215,8 @@

+ v-bind:class="[isItemInBundle(bundle_id, item.id, $index) ? 'is-success' : '', + !isItemInBundle(bundle_id, item.id, $index) && !isBundleComplete(bundle_id) ? 'is-danger' : '' ]"> @@ -290,7 +291,8 @@

+ v-bind:class="[isItemInBundle(bundle_id, item.id, $index) ? 'is-success' : '', + !isItemInBundle(bundle_id, item.id, $index) && !isBundleComplete(bundle_id) ? 'is-danger' : '' ]"> @@ -367,7 +369,8 @@

+ v-bind:class="[isItemInBundle(bundle_id, item.id, $index) ? 'is-success' : '', + !isItemInBundle(bundle_id, item.id, $index) && !isBundleComplete(bundle_id) ? 'is-danger' : '' ]"> @@ -446,7 +449,8 @@

+ v-bind:class="[isItemInBundle(bundle_id, item.id, $index) ? 'is-success' : '', + !isItemInBundle(bundle_id, item.id, $index) && !isBundleComplete(bundle_id) ? 'is-danger' : '' ]">