version 11.0.13 - October 21, 2023 - change how the 2018 %DV are computed for Potassium, Vitamin D, Calcium and Iron) https://github.com/nutritionix/nutrition-label/issues/142 ------------------------------------------------------------------------------------------------------ ------------------------------------------------------------------------------------------------------ version 11.0.12 - September 21, 2023 - REVERTED - Remove Total Sugars %DV from Legacy and 2018 Label Versions https://github.com/nutritionix/nutrition-label/issues/141#issuecomment-1728379600 ------------------------------------------------------------------------------------------------------ ------------------------------------------------------------------------------------------------------ version 11.0.11 - September 17, 2023 - changes on the %DV computations https://github.com/nutritionix/nutrition-label/issues/140 - Remove Total Sugars %DV from Legacy and 2018 Label Versions https://github.com/nutritionix/nutrition-label/issues/141 ------------------------------------------------------------------------------------------------------ ------------------------------------------------------------------------------------------------------ version 11.0.10 - April 9, 2022 - minor fix https://github.com/nutritionix/nutrition-label/commit/bb9f6eaf3033cdcaeba3fbc9640df774d3bb5343 ------------------------------------------------------------------------------------------------------ ------------------------------------------------------------------------------------------------------ version 11.0.9 - March 23, 2022 - design changes on the 2018 label https://github.com/nutritionix/nutrition-label/issues/136 ------------------------------------------------------------------------------------------------------ ------------------------------------------------------------------------------------------------------ version 11.0.8 - October 27, 2021 - another bug fix related to this task https://github.com/nutritionix/nutrition-label/issues/135 ------------------------------------------------------------------------------------------------------ ------------------------------------------------------------------------------------------------------ version 11.0.7 - October 21, 2021 - bug fix related to this task https://github.com/nutritionix/nutrition-label/issues/135 ------------------------------------------------------------------------------------------------------ ------------------------------------------------------------------------------------------------------ version 11.0.6 - October 19, 2021 - accessibility improvements listed here https://github.com/nutritionix/nutrition-label/issues/135 ------------------------------------------------------------------------------------------------------ ------------------------------------------------------------------------------------------------------ version 11.0.5 - October 17, 2021 - accessibility improvements listed here https://github.com/nutritionix/nutrition-label/issues/134 ------------------------------------------------------------------------------------------------------ ------------------------------------------------------------------------------------------------------ version 11.0.4 - December 12, 2020 - css changes from Rommel to fix the validation issue "contrast between foreground and background colors meets WCAG 2 AA contrast ratio thresholds" for Axe https://dequeuniversity.com/rules/axe/3.5/region?application=AxeChrome ------------------------------------------------------------------------------------------------------ ------------------------------------------------------------------------------------------------------ version 11.0.3 - December 9, 2020 - added `role="region" aria-label="nutrition label` on all label div so it will pass the aria landmark validation for Axe https://dequeuniversity.com/rules/axe/3.5/region?application=AxeChrome ------------------------------------------------------------------------------------------------------ ------------------------------------------------------------------------------------------------------ version 11.0.2 - October 4, 2020 - fixed the arrow design issue on the legacy mobile labels (related to the use of the latest version of jqm) https://github.com/nutritionix/nutrition-label/issues/132 ------------------------------------------------------------------------------------------------------ ------------------------------------------------------------------------------------------------------ version 11.0.1 - September 30, 2020 - change the .toFixed function to something that's more reliable https://github.com/nutritionix/nutrition-label/issues/102 - also changed the tool used to minify the css and js files from https://github.com/yui/yuicompressor to this one https://javascript-minifier.com/ (using https://github.com/promatik/PHP-JS-CSS-Minifier) ------------------------------------------------------------------------------------------------------ ------------------------------------------------------------------------------------------------------ version 10.0.6 - May 10, 2020 - made some changes on the code so the plugin can work with the latest version of jquery (currently it is version 3.5.1) https://github.com/nutritionix/nutrition-label/issues/129 - also changed the jquery used on the demo files from 2.2.0 to 3.5.1 ------------------------------------------------------------------------------------------------------ ------------------------------------------------------------------------------------------------------ version 10.0.5 - April 28, 2020 - made changes to the code to make it complient to the eslint. take note that the eslint setting is customized to fit the coding of the plugin https://github.com/nutritionix/nutrition-label/issues/126 ------------------------------------------------------------------------------------------------------ ------------------------------------------------------------------------------------------------------ version 10.0.4 - March 16, 2020 - fixed the issue on the extra bars on the label https://github.com/nutritionix/nutrition-label/issues/124 ------------------------------------------------------------------------------------------------------ ------------------------------------------------------------------------------------------------------ version 10.0.3 - February 17, 2020 - add an option to remove the bold formatting on the caffeine attribute (2018 label) https://github.com/nutritionix/nutrition-label/issues/125 - boldCaffeine : true, //this is for the 2018 version ------------------------------------------------------------------------------------------------------ ------------------------------------------------------------------------------------------------------ version 10.0.2 - February 7, 2020 - more changes to the 2018 label https://github.com/nutritionix/nutrition-label/issues/121 - add a new setting for the 2018 label to allow to only show the textServingSize https://github.com/nutritionix/nutrition-label/issues/123 - //this is for the 2018 version and will only work when showServingUnitQuantity is false. see https://github.com/nutritionix/nutrition-label/issues/123 - showOnlyTheTextServingSize : false, ------------------------------------------------------------------------------------------------------ ------------------------------------------------------------------------------------------------------ version 10.0.1 - January 21, 2020 - modification to the 2018 label for the nutrition values - vitamin d, calcium, iron and potassium https://github.com/nutritionix/nutrition-label/issues/120 - //this will only affect Vitamin D (valueVitaminD), Calcium (valueCalcium), Iron (valueIron) and Potassium (valuePotassium_2018). - //this will tell the system to process these values as base values and not % Daily Values (default) - useBaseValueFor2018LabelAndNotDVPercentage : false, //this is for the 2018 version ------------------------------------------------------------------------------------------------------ ------------------------------------------------------------------------------------------------------ version 9.0.11 - January 12, 2020 - add a setting to allow the serving weight and unit value to be hidden on the legacy and 2018 version https://github.com/nutritionix/nutrition-label/issues/118 - fixed an overlooked issue on the /dist/demo/html files where "../js/nutritionLabel-min.js" is coded as "../css/nutritionLabel-min.js" ------------------------------------------------------------------------------------------------------ ------------------------------------------------------------------------------------------------------ version 9.0.10 - November 16, 2019 - add a new nutrition label for the 2018 version - caffeine https://github.com/nutritionix/nutrition-label/issues/117 - added a new demo to test the rounding rule of the legacy version demo/legacy-version/demo-rounding-rule.html ------------------------------------------------------------------------------------------------------ ------------------------------------------------------------------------------------------------------ version 9.0.9 - May 29, 2019 - add a feature on the uk version where the serving unit quantity can be changed https://github.com/nutritionix/nutrition-label/issues/107 - some code improvements ------------------------------------------------------------------------------------------------------ ------------------------------------------------------------------------------------------------------ version 9.0.8 - May 15, 2019 - minor change on the uk label to change the default value Kj to kj https://github.com/nutritionix/nutrition-label/issues/114 ------------------------------------------------------------------------------------------------------ ------------------------------------------------------------------------------------------------------ version 9.0.7 - April 6, 2019 - moved the tooltip div inside the main div https://github.com/nutritionix/nutrition-label/issues/113 ------------------------------------------------------------------------------------------------------ ------------------------------------------------------------------------------------------------------ version 9.0.6 - April 1, 2019 - fix an issue with the 2018 label where "Amount per serving" is hard-coded instead of using the setting "textAmountPerServing" - make the remaining hard-coded texts customizable by adding them on the settings https://github.com/nutritionix/nutrition-label/issues/112 - unitServingWeight : ' grams', //this is for the 2018 version - textUKPer100 : 'Per', //this is for the uk version - textUKDefaultServingNameIfEmpty : 'Serving', //this is for the uk version - textDataNotAvailable : 'Data not available', - textAriaLabelIncreaseQuantityArrow : 'Increase the Quantity Arrow', - textAriaLabelDecreaseQuantityArrow : 'Decrease the Quantity Arrow', - textAriaLabelChangeQuantityTextbox : 'Change the Quantity Textbox', - textCalorieDietHtmlLegacyLessThan : 'Less than', - textCalorieDietHtmlLegacyDietary : 'Dietary', ------------------------------------------------------------------------------------------------------ ------------------------------------------------------------------------------------------------------ version 9.0.5 - March 31, 2019 - fixed a minor issue with the line height for the item name on the uk label https://github.com/nutritionix/nutrition-label/issues/111 ------------------------------------------------------------------------------------------------------ ------------------------------------------------------------------------------------------------------ version 9.0.4 - March 22, 2019 - add a div at the top for the item name on the uk version (should be hidden by default) https://github.com/nutritionix/nutrition-label/issues/109 - //to show the item name for the UK version. the main difference with the previous setting is this feature is set to false by default. the UK version will ignore the showItemName setting - showItemNameForUK : false, ------------------------------------------------------------------------------------------------------ ------------------------------------------------------------------------------------------------------ version 9.0.3 - March 22, 2019 - added a way to handle long serving unit names on the uk label https://github.com/nutritionix/nutrition-label/issues/110 ------------------------------------------------------------------------------------------------------ ------------------------------------------------------------------------------------------------------ version 9.0.2 - March 13, 2019 - for the uk label, if the serving name is empty, have it default to "Serving" https://github.com/nutritionix/nutrition-label/issues/108 - this is controlled by the setting convertEmptyServingNametoServingForUKLabel which is set to true by default ------------------------------------------------------------------------------------------------------ ------------------------------------------------------------------------------------------------------ version 9.0.1 - March 8, 2019 - fixed a minor bug where the itemprop value for sodium as it was incorrect - renamed showTheDailyValue to showPercentageCode as it seems more understandable for coders who wants to make changes on the code in the future - a few minor improvement on the nutritionLabel.js file - a few minor improvement on the demo files - https://github.com/nutritionix/nutrition-label/issues/106 - new settings that are exclusive for the uk version and their default values - dailyValueEnergyKcal : 2000, - dailyValueProtein : 50, - dailyValueSalt : 6, - showDailyProtein : true, - showDailyEnergy : true, - unitEnergy_kj : 'Kj', - unitEnergy_kcal : 'kcal', - unitSalt : 'g', - unitGramOrMlForThePer100Part : 'g', - textUKTypicalValues : 'Typical Values', - textUKReferenceIntake : 'Reference intake of an average adult', - showUKVersion : false, - please take note that the daily values needs to be changed to work properly on the uk version - dailyValueTotalFat : 65, //this should be 70 for the uk version - dailyValueCarb : 300, //this should be 260 for the uk version - dailyValueSugar : 100, //this should be 90 for the uk version - take note of these comments on how the plugin will select which version to show //if the showLegacyVersion is true, the system will show the legacy version //if both the showLegacyVersion and showUKVersion are false, the system will show the 2018 version //if both the showLegacyVersion is false and showUKVersion is true, the system will show the uk version ------------------------------------------------------------------------------------------------------ ------------------------------------------------------------------------------------------------------ version 8.0.15 - January 31, 2019 - fix the issue with the mobile demo pages ------------------------------------------------------------------------------------------------------ ------------------------------------------------------------------------------------------------------ version 8.0.14 - September 26, 2018 - changes the setting indentSugarAndRemoveBoldStyleFor2018Label so to set it true by default https://github.com/nutritionix/nutrition-label/issues/104 ------------------------------------------------------------------------------------------------------ ------------------------------------------------------------------------------------------------------ version 8.0.13 - September 23, 2018 - when the fda rounding is enabled, round the 2018 version serving weight like how it is on the legacy version https://github.com/nutritionix/nutrition-label/issues/93 ------------------------------------------------------------------------------------------------------ ------------------------------------------------------------------------------------------------------ version 8.0.12 - September 23, 2018 - bug on the default value of indentSugarAndRemoveBoldStyleFor2018Label. it should be false by default and not true ------------------------------------------------------------------------------------------------------ ------------------------------------------------------------------------------------------------------ version 8.0.11 - September 22, 2018 - new feature for the sugar details on the 2018 label https://github.com/nutritionix/nutrition-label/issues/103 ------------------------------------------------------------------------------------------------------ ------------------------------------------------------------------------------------------------------ version 8.0.10 - September 16, 2018 - changes on the feature for the 2018 label - option to hide the % Daily Values https://github.com/nutritionix/nutrition-label/issues/101 ------------------------------------------------------------------------------------------------------ ------------------------------------------------------------------------------------------------------ version 8.0.9 - September 14, 2018 - add a feature for %DV for total sugars https://github.com/nutritionix/nutrition-label/issues/99 - minor changes on the demo files in preparation to linting the code ------------------------------------------------------------------------------------------------------ ------------------------------------------------------------------------------------------------------ version 8.0.8 - September 9, 2018 - changed the demo html code to use media='all' and not media='screen' https://github.com/nutritionix/nutrition-label/issues/96 - add a feature so the % daily values can be hidden (visible by default) https://github.com/nutritionix/nutrition-label/issues/100 ------------------------------------------------------------------------------------------------------ ------------------------------------------------------------------------------------------------------ version 8.0.7 - July 2, 2018 - more changes on task to hide the text near the bottom of the label that pertains to the daily values https://github.com/nutritionix/nutrition-label/issues/90#issuecomment-401797188 ------------------------------------------------------------------------------------------------------ ------------------------------------------------------------------------------------------------------ version 8.0.6 - June 27, 2018 - option to hide the % Daily Values https://github.com/nutritionix/nutrition-label/issues/90 - for the 2018 version, the "Daily Value" text is now controlled by the "textDailyValues" setting like the legacy version ------------------------------------------------------------------------------------------------------ ------------------------------------------------------------------------------------------------------ version 8.0.5 - March 2, 2018 - minor changes to publish this on npm too ------------------------------------------------------------------------------------------------------ ------------------------------------------------------------------------------------------------------ version 8.0.4 - January 16, 2018 - new attribute - sugar alcohol https://github.com/nutritionix/nutrition-label/issues/86 ------------------------------------------------------------------------------------------------------ ------------------------------------------------------------------------------------------------------ version 8.0.3 - October 9, 2017 - fixed a bug for task https://github.com/nutritionix/nutrition-label/issues/85 ------------------------------------------------------------------------------------------------------ ------------------------------------------------------------------------------------------------------ version 8.0.2 - October 7, 2017 - create a setting to allow users to customize the not applicable value https://github.com/nutritionix/nutrition-label/issues/85 ------------------------------------------------------------------------------------------------------ ------------------------------------------------------------------------------------------------------ version 8.0.1 - October 5, 2017 - moved the /dist/images to /dist/css/images to fix the path issue on the css - put back the non minified version of the css and js on the dist files ------------------------------------------------------------------------------------------------------ ------------------------------------------------------------------------------------------------------ version 7.0.15 - October 4, 2017 - fixed the bug - long item name scroll feature isn't appearing on most browsers https://github.com/nutritionix/nutrition-label/issues/79 ------------------------------------------------------------------------------------------------------ ------------------------------------------------------------------------------------------------------ version 7.0.14 - September 21, 2017 - added sr-only class style on the css (copied from bootstrap http://getbootstrap.com/) ------------------------------------------------------------------------------------------------------ ------------------------------------------------------------------------------------------------------ version 7.0.13 - September 16, 2017 - improve how the label is read by screen readers https://github.com/nutritionix/nutrition-label/issues/80 - change the default unit values to make it more screen reader friendly. not all screen reader behaves the same so we opted to be on the safe side and make sure that these units are readable - eg: 'g' => ' grams' - up arrow, down arrow and the textbox are now screen reader friendly and it can be navigated using tab - not applicable data is now screen reader friendly - most daily percent value are hidden on screen reader. no idea yet if we can make this optional (eg. a setting to control this) - added tabIndex to a few
and elements to make it easy to use with screen reader. the outline is removed but devs can override it using css. the code that we use is "div, span{outline: 0;}" ------------------------------------------------------------------------------------------------------ ------------------------------------------------------------------------------------------------------ version 7.0.12 - September 15, 2017 - added a new setting, "version (default 1)" to allow different styles on the labels. For this change, the legacy version will have an ability to show 2 different design on the servings area (best refer to the details on the task) https://github.com/nutritionix/nutrition-label/issues/77 ------------------------------------------------------------------------------------------------------ ------------------------------------------------------------------------------------------------------ version 7.0.11 - August 5, 2017 - https://github.com/nutritionix/nutrition-label/issues/78 - changed the default text for these two 2018 version attributes: - Vit. D to Vitamin D - Potas. to Potassium - given these changes, removed the setting textPotassium_2018 as there is no need for it anymore and the 2018 label will now use the setting textPotassium, same as the legacy label ------------------------------------------------------------------------------------------------------ ------------------------------------------------------------------------------------------------------ version 7.0.10 - August 1, 2017 - fixed a minor oversight where the default vitamin d unit was coded mg when it should have been mcg https://github.com/nutritionix/nutrition-label/issues/75#issuecomment-319099495 ------------------------------------------------------------------------------------------------------ ------------------------------------------------------------------------------------------------------ version 7.0.9 - July 30, 2017 - made some changes on the 2018 version based on the discussion here - changed the default unit for vitamin D from IU to mcg - added a new daily potassium value for the 2018 label with a default value of 4700. this way, it don't affect the optional potassium value for the legacy label https://github.com/nutritionix/nutrition-label/commit/cff80ba92a399a12d3ba5aa07f651cb751b5c1ff?w=1#diff-9ce72bf5eb39b381c67a00ed3b790dd5 - changed the daily calcium value to 1300. this value don't affect the legacy version, only the 2018 version - changed the daily vitamin d value to 20. this value don't affect the legacy version, only the 2018 version ------------------------------------------------------------------------------------------------------ ------------------------------------------------------------------------------------------------------ version 7.0.8 - July 15, 2017 - fixed a minor bug - missing line under the label header. see the discussion on https://github.com/nutritionix/nutrition-label/issues/73 - fixed a bug - issue with the serving weight gram on the 2018 label https://github.com/nutritionix/nutrition-label/issues/74 ------------------------------------------------------------------------------------------------------ ------------------------------------------------------------------------------------------------------ version 7.0.7 - June 30, 2017 - fixed the default base unit of Vitamin D (only available on the 2018 version). see the discussion on https://github.com/nutritionix/nutrition-label/issues/71 ------------------------------------------------------------------------------------------------------ ------------------------------------------------------------------------------------------------------ version 7.0.6 - June 15, 2017 - added to the demo pages - set poly and moni fat to be hidden by default https://github.com/nutritionix/nutrition-label/issues/70 ------------------------------------------------------------------------------------------------------ ------------------------------------------------------------------------------------------------------ version 7.0.5 - May 30, 2017 - improvement on the feature to trigger custom javascript commands when the quantity is changed https://github.com/nutritionix/nutrition-label/issues/68 - the change is to allow the current feature to work normally and to be able to have this feature work when the label is integrated in angular - fixed an issue where the serving size unit scrolls down along with the item name https://github.com/nutritionix/nutrition-label/issues/67 ------------------------------------------------------------------------------------------------------ ------------------------------------------------------------------------------------------------------ version 7.0.4 - April 30, 2017 - https://github.com/nutritionix/nutrition-label/issues/59 - new setting showLegacyVersion (default to true), set this to false to show the 2018 version - new settings that are exclusive for the 2018 version and their default values - dailyValuePotassium: 3500 - dailyValueVitaminD : 400 - dailyValueAddedSugar : 50 - showPotassium_2018: true - showVitaminD: true - showAddedSugars : true - naPotassium_2018: false - naVitaminD : false - naAddedSugars : false - valuePotassium_2018: 0 - valueVitaminD : 0 - valueAddedSugars : 0 - unitPotassium: 'mg' - unitPotassium_base: 'mg' - unitPotassium_percent: '%' - unitAddedSugars : 'g' - unitVitaminD_base : 'mcg' - unitVitaminD_percent : '%' - unitCalcium_base : 'mg' - unitCalcium_percent : '%' - unitIron_base : 'mg' - unitIron_percent : '%' - textPotassium_2018 : 'Potas.' - textVitaminD : 'Vit. D' - textAddedSugars1 : 'Includes ', - textAddedSugars2 : ' Added Sugars', ------------------------------------------------------------------------------------------------------ ------------------------------------------------------------------------------------------------------ version 7.0.3 - March 23, 2017 - fix the bug where the custom js function feature isn't working https://github.com/nutritionix/nutrition-label/issues/64 ------------------------------------------------------------------------------------------------------ ------------------------------------------------------------------------------------------------------ version 7.0.2 - February 19, 2017 - added itemprop="servingSize" on the serving size element for the legacy version - some code improvements for the legacy version ------------------------------------------------------------------------------------------------------ ------------------------------------------------------------------------------------------------------ version 7.0.1 - January 23, 2017 - improvement on the code to prepare for the feature to allow the plugin to display the legacy version (current version) or the 2018 version https://github.com/nutritionix/nutrition-label/issues/62 - bug fixes - fixed a missing </span> on the sodium div - fixed a bug on the fiber value where if the result of the formula [ daily fiber value * (calorie intake / 2000) ] is zero (eg. there was an error in the input where the daily fiber value is set to zero), it will result to division by zero. this possible error is caught on all other instances where if the result is zero, it is changed to 1 to prevent the "division by zero" error - add an option for the user to choose to show the legacy label or the 2018 label (take note that the 2018 label isn't coded yet) https://github.com/nutritionix/nutrition-label/issues/61 ------------------------------------------------------------------------------------------------------ ------------------------------------------------------------------------------------------------------ version 6.0.18 - November 28, 2016 - change <i> to <em> for WCAG 2.0 compliance https://github.com/nutritionix/nutrition-label/pull/57 ------------------------------------------------------------------------------------------------------ ------------------------------------------------------------------------------------------------------ version 6.0.17 - November 11, 2016 - change <b> to <strong> for WCAG 2.0 compliance https://github.com/nutritionix/nutrition-label/pull/56 ------------------------------------------------------------------------------------------------------ ------------------------------------------------------------------------------------------------------ version 6.0.16 - July 6, 2016 - updating the schema ------------------------------------------------------------------------------------------------------ ------------------------------------------------------------------------------------------------------ version 6.0.15 - May 22, 2016 - changed the way userFunctionNameOnQuantityChange works https://github.com/nutritionix/nutrition-label/pull/52 ------------------------------------------------------------------------------------------------------ ------------------------------------------------------------------------------------------------------ version 6.0.14 - May 11, 2016 - changed the way userFunctionNameOnQuantityChange works https://github.com/nutritionix/nutrition-label/pull/52 ------------------------------------------------------------------------------------------------------ ------------------------------------------------------------------------------------------------------ version 6.0.13 - May 2, 2016 - Adding a new feature to trigger a user function when a quantity is changed and passing 3 values to it, kind (input/arrows), old value, new value https://github.com/nutritionix/nutrition-label/issues/51#issuecomment-216072925 - New Feature: when a user enters an invalid value on the quantity textbox, the label now replace it with the previous valid value and not "1.0" ------------------------------------------------------------------------------------------------------ ------------------------------------------------------------------------------------------------------ version 6.0.12 - May 1, 2016 - Add a way to fire google analytics event when changing the quantities https://github.com/nutritionix/nutrition-label/issues/51 ------------------------------------------------------------------------------------------------------ ------------------------------------------------------------------------------------------------------ version 6.0.11 - March 4, 2016 - set the default value of showPotassium to be false as it's not commonly used by brands on their labels ------------------------------------------------------------------------------------------------------ ------------------------------------------------------------------------------------------------------ version 6.0.10 - January 26, 2016 - fixed a bug when the user input a non numeric value https://github.com/nutritionix/nutrition-label/issues/49 ------------------------------------------------------------------------------------------------------ ------------------------------------------------------------------------------------------------------ version 6.0.9 - January 26, 2016 - minor change: changing the default width and updating the demo pages https://github.com/nutritionix/nutrition-label/issues/50 ------------------------------------------------------------------------------------------------------ ------------------------------------------------------------------------------------------------------ version 6.0.8 - January 18, 2016 - prevent a "division by zero" and added the ability to use potassium on the label https://github.com/nutritionix/nutrition-label/issues/39 ------------------------------------------------------------------------------------------------------ ------------------------------------------------------------------------------------------------------ version 6.0.7 - January 18, 2016 - fixed the css issue with labels where the item name is long https://github.com/nutritionix/nutrition-label/issues/44 ------------------------------------------------------------------------------------------------------ ------------------------------------------------------------------------------------------------------ version 6.0.6 - December 18, 2015 - serving weight grams is now linked to the quantity ------------------------------------------------------------------------------------------------------ ------------------------------------------------------------------------------------------------------ version 6.0.5 - December 16, 2015 - Added Micro data ------------------------------------------------------------------------------------------------------ ------------------------------------------------------------------------------------------------------ version 6.0.4 - November 20, 2014 - Fixed the bug - Servings Per Container disappears when the Serving Size is decreased https://github.com/nutritionix/nutrition-label/issues/36 ------------------------------------------------------------------------------------------------------ ------------------------------------------------------------------------------------------------------ version 6.0.3 - October 18, 2014 - Added changes on the serving per container so it is now affected by the current quantity https://github.com/nutritionix/nutrition-label/issues/32 ------------------------------------------------------------------------------------------------------ ------------------------------------------------------------------------------------------------------ version 6.0.2 - March 18, 2014 - Added spacing above ingredients list https://github.com/nutritionix/nutrition-label/issues/35 ------------------------------------------------------------------------------------------------------ ------------------------------------------------------------------------------------------------------ version 6.0.1 - february 1, 2014 - new feature - allow html and js values to be added on the footer https://github.com/nutritionix/nutrition-label/issues/34 ------------------------------------------------------------------------------------------------------ ------------------------------------------------------------------------------------------------------ version 6.0.0 - january 29, 2014 - changes on the rounding rules of Vitamins A and C, Calcium and Iron https://github.com/nutritionix/nutrition-label/issues/33 ------------------------------------------------------------------------------------------------------ ------------------------------------------------------------------------------------------------------ version 5.0.5 - november 25, 2013 - added a new customizable setting decimalPlacesForQuantityTextbox and also drop unnecessary zeroes on the textbox https://github.com/nutritionix/nutrition-label/issues/30 - fixed a bug when changing the quantity by entering different values using the keyboard https://github.com/nutritionix/nutrition-label/issues/31 ------------------------------------------------------------------------------------------------------ ------------------------------------------------------------------------------------------------------ version 5.0.4 - october 31, 2013 - fixed google font Archivo Black ------------------------------------------------------------------------------------------------------ ------------------------------------------------------------------------------------------------------ version 5.0.3 - october 20, 2013 - fixed a minor bug on the on the display when the fat calories is present but the calories isn't https://github.com/nutritionix/nutrition-label/issues/28 ------------------------------------------------------------------------------------------------------ ------------------------------------------------------------------------------------------------------ version 5.0.2 - june 30, 2013 - fixed a minor bug on the FDA rounding rule https://github.com/nutritionix/nutrition-label/issues/27 ------------------------------------------------------------------------------------------------------ ------------------------------------------------------------------------------------------------------ version 5.0.1 - june 23, 2013 - fixed a bug where the scroll isn't showing on long item names when that item name has no textbox https://github.com/nutritionix/nutrition-label/issues/16#issuecomment-19864016 ------------------------------------------------------------------------------------------------------ ------------------------------------------------------------------------------------------------------ version 5.0.0 - june 19, 2013 - added a new setting hideNotAppicableValues (default false). When set to true, this will hide the values if they are not applicable https://github.com/nutritionix/nutrition-label/issues/25 - added scrollbar when item name is too long. this feature can be turned off using the setting below https://github.com/nutritionix/nutrition-label/issues/16 //to scroll the item name if the qQuery.height() is > scrollLongItemNamePixel scrollLongItemName : true, scrollLongItemNamePixel : 36, ------------------------------------------------------------------------------------------------------ ------------------------------------------------------------------------------------------------------ version 4.0.10 - may 26, 2013 - added class names to vitamins, calcium and iron ------------------------------------------------------------------------------------------------------ ------------------------------------------------------------------------------------------------------ version 4.0.9 - may 21, 2013 - fixed iOS css bugs on serving quantity textbox ------------------------------------------------------------------------------------------------------ ------------------------------------------------------------------------------------------------------ version 4.0.8 - may 19, 2013 - bring back the disclaimer text feature but have it scroll like the long ingredients when scrollLongIngredients is true https://github.com/nutritionix/nutrition-label/issues/20 //to show the disclaimer text or not showDisclaimer : false, //the height in px of the disclaimer div scrollDisclaimer : 95, valueDisclaimer : 'Please note that these nutrition values are estimated based on our standard serving portions. As food servings may have a slight variance each time you visit, please expect these values to be with in 10% +/- of your actual meal. If you have any questions about our nutrition calculator, please contact Nutritionix.', ingredientLabel : 'INGREDIENTS:', ------------------------------------------------------------------------------------------------------ ------------------------------------------------------------------------------------------------------ version 4.0.7 - may 17, 2013 - fix the issue with the computation and the initial serving size unit value https://github.com/nutritionix/nutrition-label/issues/19 - "nutrition multiplier" = 1.0 IF "original serving size quantity" is equal to or less than zero - ELSE "nutrition multiplier" = 1 / "original serving size quantity" - the new computation is "final nutrition value" = "initial nutrition value" x "current serving size quantity" x "nutrition multiplier" ------------------------------------------------------------------------------------------------------ ------------------------------------------------------------------------------------------------------ version 4.0.6 - may 13, 2013 - fixed the scroll not appearing on chrome mac - removed the setting naServingUnitQuantity. Serving size cannot be "N/A", it will either have a value, or not appear at all https://github.com/nutritionix/nutrition-label/issues/15 - added a new setting to allow hiding of the textbox arrows https://github.com/nutritionix/nutrition-label/issues/13 //allow hiding of the textbox arrows hideTextboxArrows : false - worked on a feature about how the up and down arrow works when the value is between 0 to 2. see https://github.com/nutritionix/nutrition-label/issues/14 - minor improvement - reduce the extra space between the textbox (if shown) and the serving unit name https://github.com/nutritionix/nutrition-label/issues/17 ------------------------------------------------------------------------------------------------------ ------------------------------------------------------------------------------------------------------ version 4.0.5 - may 10, 2013 - fixed the bug where on the serving unit quantity when the initial value is 0 (zero) https://github.com/nutritionix/nutrition-label/issues/12 ------------------------------------------------------------------------------------------------------ ------------------------------------------------------------------------------------------------------ version 4.0.4 - may 4, 2013 - https://github.com/nutritionix/nutrition-label/issues/10 - removed the showItemNameAtTheTop settings - made more js and css fixes for the new textbox feature mentioned on 4.0.0 and 4.0.3 - changes on showBrandName and brandName. before, this is shown at the top before the 'title', now it is shown on the same line as the 'item name' - the show brand name will now appear after the item name if the setting showBrandName is true and brandName is not null - "ITEM NAME" dash (-) "BRAND NAME" - the item name will also now appear right after the 'title' ------------------------------------------------------------------------------------------------------ ------------------------------------------------------------------------------------------------------ version 4.0.3 - apr 27, 2013 - fixed a bug where the scrolling ingredient is removed when the textbox value is changed - fixed a bug where the not applicable tooltip stopped working when the textbox value is changed - fixed a bug where the unit quantity textbox feature is not working properly when there are non numeric values on the settings. - the system already filters this (see version 4.0.0 changes) but it still caused problems with the unit quantity textbox feature - MAJOR CHANGE: removed valueServingSize and it is now replaced with valueServingUnitQuantity - this means that all the previous pages where you have implemented the plugin needs to be updated. - you just need to rename valueServingSize to valueServingUnitQuantity - REASON: after some discussion, it is decided that SERVING SIZE means "valueServingUnitQuantity valueServingSizeUnit" - eg. Serving Size 8 Cookie (valueServingUnitQuantity = 8; valueServingSizeUnit = Cookie) - eg. Serving Size 1.0 (valueServingUnitQuantity = 1.0) - MAJOR CHANGE: renamed naServingSize to naServingUnitQuantity - MAJOR CHANGE: renamed showServingSize to showServingUnitQuantity - REASON: this is so all servingUnitQuantity settings will have the same prefix like the others ('na', 'show' and 'value') - valueServingUnitQuantity => value of the serving size unit - showServingUnitQuantity => show / hide the serving size div - naServingUnitQuantity => set the serving size unit to be 'not applicable' or not - MAJOR CHANGE: changes on the unit quantity textbox feature that was added on version 4.0.0 //this value can be changed and the value of the nutritions will be affected directly //the computation is "current nutrition value" * "serving unit quantity value" = "final nutrition value" //this can't be less than zero, all values less than zero is converted to zero //the textbox to change this value is visible / enabled by default //when enabled, user can change this value by clicking the arrow or changing the value on the textbox and //pressing enter. the value on the label will be updated automatically //different scenarios and the result if this feature is enabled //NOTE 1: [ ] => means a textbox will be shown //NOTE 2: on all cases below showServingUnitQuantityTextbox == true AND showServingUnitQuantity == true //if showServingUnitQuantity == false, the values that should be on the 'serving size div' are empty or null //CASE 1a: valueServingSizeUnit != '' (AND NOT null) && valueServingUnitQuantity >= 0 (AND NOT N/A) //RESULT: textServingSize [valueServingUnitQuantity] valueServingSizeUnit //CASE 2: valueServingSizeUnit != '' (AND NOT null) && valueServingUnitQuantity is N/A //RESULT: textServingSize - (dash for not applicable) valueServingSizeUnit //CASE 3a: valueServingSizeUnit == '' (OR null) && valueServingUnitQuantity is N/A //RESULT: textServingSize - (dash for not applicable) //NOTE 3: on all cases below showServingUnitQuantityTextbox == true AND showItemName == true //if showItemName == false, the values that should be on the 'item name div' are empty or null //CASE 1b: valueServingSizeUnit != '' (AND NOT null) && valueServingUnitQuantity <= 0 (AND NOT N/A) //RESULT: [valueServingUnitQuantity default to 1.0] itemName //CASE 3b: valueServingSizeUnit == '' (OR null) && valueServingUnitQuantity > 0 (AND NOT N/A) //RESULT: [valueServingUnitQuantity] itemName //CASE 3c: valueServingSizeUnit == '' (OR null) && valueServingUnitQuantity <= 0 (AND NOT N/A) //RESULT: [valueServingUnitQuantity default to 1.0] itemName //NOTE 4: to see the different resulting labels, check the html/demo-texbox-case*.html files to see different settings and the resulting label valueServingUnitQuantity : 1.0, valueServingSizeUnit : '', showServingUnitQuantityTextbox : true, //the name of the item for this label (eg. cheese burger or mayonnaise) itemName : 'Item / Ingredient Name', showServingUnitQuantity : true, naServingUnitQuantity : false ------------------------------------------------------------------------------------------------------ ------------------------------------------------------------------------------------------------------ version 4.0.2 - apr 15, 2013 - fixed the bug: the arrow links aren't clickable on IE8 ------------------------------------------------------------------------------------------------------ ------------------------------------------------------------------------------------------------------ version 4.0.1 - apr 14, 2013 - fixed the problem with internet explorer where the textbox changes aren't triggered when you press enter on the textbox - preparing the code for more changes on the serving unit quantity feature - NOTE: the demo files are using the non-minified version of the js and css file for the time being until the 'serving unit quantity' feature is completed ------------------------------------------------------------------------------------------------------ ------------------------------------------------------------------------------------------------------ version 4.0.0 - apr 11, 2013 - added a filter so that all settings that the plugin expects to be numeric will be checked and coverted to numeric if needed - added a new feature to allow users to change the unit quantity of the label (default is 1.0) https://github.com/nutritionix/nutrition-label/issues/3 - this value can be easily hidden by changing one of the settings (see below) (default is it is visible) - the value can be adjusted by clicking the arrows or changing the value on the textbox and pressing enter or focusing on another element on the page //this value can be changed and the value of the nutritions will be affected directly //the computation is "current nutrition value" * "value serving unit quantity" = "final nutrition value" //this can't be less than zero, all values less than zero is converted to zero //the textbox to change this is hidden by default //when enabled, user can change this value by clicking the arrow or changing the value on the textbox and //pressing enter. the value on the label will be updated automatically valueServingUnitQuantity : 1.0, showServingUnitQuantityTextbox : true ------------------------------------------------------------------------------------------------------ ------------------------------------------------------------------------------------------------------ version 3.0.1 - mar 28, 2013 - fixed N/A tooltip ------------------------------------------------------------------------------------------------------ ------------------------------------------------------------------------------------------------------ version 3.0.0 - mar 23, 2013 - made a few code improvements - found a limitation that the valueServingSize and valueServingPerContainer can't be text like the other nutrition values, solved that limitation - hide the serving size when the value is zero, null or blank or '0' (text) - improve the label when the showServingSize and showItemName are both set to false. Before, the bar was too close to the label title; now, we added a bit of a space to make the label more presentable in cases like this - also solved the case where showItemName is set to false, showServingSize is set to true, but both the serving size and servings per container are hidden (see the above changes) - automatically hide the serving size unit if it is null or blank - added a new value 'valueServingWeightGrams' - if the serving size is 1 and unit is Oz, the result is '1 Oz' - if the serving weight grams is not zero, null, blank or '0': - if the value is 85.33, the result will be (including the above example) '1 Oz (85.3g)' (still affected by decimalPlacesForNutrition - in this case, it is 1) - if the value is '~99', the result will be (including the above example) '1 Oz (~99g)' - created a minified version of the css and used it on the demo pages (to make sure it's working) to give other devs the option to use it too ------------------------------------------------------------------------------------------------------ ------------------------------------------------------------------------------------------------------ version 2.0.4 - mar 20, 2013 - changed font-sizing from px to em ------------------------------------------------------------------------------------------------------ ------------------------------------------------------------------------------------------------------ version 2.0.3 - mar 18, 2013 - fixed google font issue in IE 7 and 8 ------------------------------------------------------------------------------------------------------ ------------------------------------------------------------------------------------------------------ version 2.0.2 - mar 9, 2013 - fixed a bug where the minified version of the plugin is causing error - added a minified version of the plugin - minor change on the demo pages so that it uses the minified version of the plugin ------------------------------------------------------------------------------------------------------ ------------------------------------------------------------------------------------------------------ version 2.0.1 - mar 6, 2013 - improve the width feature by changing this setting //to allow percentage width - usually needed for mobile sites allowPercentageWidth : false, percentageWidth : 99 to: //to allow custom width - usually needed for mobile sites allowCustomWidth : false, widthCustom : 'auto' ------------------------------------------------------------------------------------------------------ ------------------------------------------------------------------------------------------------------ version 2.0.0 - mar 3, 2013 - some fixes on the showCalorieDiet - the ingredients and calorie daily intake text was included in this block so when it is hidden, these 2 values are hidden too - made some css fix - added a line class on the div with a class dvCalorieDiet (contains the ingredients, calorie daily intake text and calorie diet) - added more customizable values and added a feature to round the values based on FDA rounding rules (taken from the default setting) //to allow percentage width - usually needed for mobile sites allowPercentageWidth : false, percentageWidth : 99, //the brand name of the item for this label (eg. just salad) brandName : 'Brand where this item belongs to' //to show the item name at the top of the page showItemNameAtTheTop : false, //show the brand where this item belongs to showBrandName : false, //to allow the label to have no border allowNoBorder : false, //customizable units for the values unitCalories : '', unitFatCalories : '', unitTotalFat : 'g', unitSatFat : 'g', unitTransFat : 'g', unitPolyFat : 'g', unitMonoFat : 'g', unitCholesterol : 'mg', unitSodium : 'mg', unitTotalCarb : 'g', unitFibers : 'g', unitSugars : 'g', unitProteins : 'g', unitVitaminA : '%', unitVitaminC : '%', unitCalcium : '%', unitIron : '%', //to enable rounding of the numerical values based on the FDA rounding rules //http://goo.gl/RMD2O allowFDARounding : false ------------------------------------------------------------------------------------------------------ ------------------------------------------------------------------------------------------------------ version 1.0.0 - feb 28, 2013 - initial version - customizable vales are (taken from the default setting) //default width of the nutrition label width : 260, //the name of the item for this label (eg. cheese burger or mayonnaise) itemName : 'Item / Ingredient Name', //to scroll the ingredients if the innerheight is > scrollHeightComparison scrollLongIngredients : false, scrollHeightComparison : 100, //the height in px of the ingredients div scrollHeightPixel : 95, //this is to set how many decimal places will be shown on the nutrition values (calories, fat, protein, vitamin a, iron, etc) decimalPlacesForNutrition : 1, //this is to set how many decimal places will be shown for the "% daily values*" decimalPlacesForDailyValues : 0, //show the customizable link at the bottom showBottomLink : false, //url for the customizable link at the bottom urlBottomLink : 'http://www.nutritionix.com', //link name for the customizable link at the bottom nameBottomLink : 'Nutritionix', //default calorie intake calorieIntake : 2000, //these are the recommended daily intake values dailyValueTotalFat : 65, dailyValueSatFat : 20, dailyValueCholesterol : 300, dailyValueSodium : 2400, dailyValueCarb : 300, dailyValueFiber : 25, //these values can be change to hide some nutrition values showServingSize : true, showCalories : true, showFatCalories : true, showTotalFat : true, showSatFat : true, showTransFat : true, showPolyFat : true, showMonoFat : true, showCholesterol : true, showSodium : true, showTotalCarb : true, showFibers : true, showSugars : true, showProteins : true, showVitaminA : true, showVitaminC : true, showCalcium : true, showIron : true, //to show the 'amount per serving' text showAmountPerServing : true, //to show the 'servings per container' data and replace the default 'Serving Size' value (without unit and servings per container text and value) showServingsPerContainer : false, //to show the item name. there are special cases where the item name is replaced with 'servings per container' value showItemName : true, //to show the ingredients value or not showIngredients : true, //to show the calorie diet info at the bottom of the label showCalorieDiet : false, //the are to set some values as 'not applicable'. this means that the nutrition label will appear but the value will be a 'gray dash' naServingSize : false, naCalories : false, naFatCalories : false, naTotalFat : false, naSatFat : false, naTransFat : false, naPolyFat : false, naMonoFat : false, naCholesterol : false, naSodium : false, naTotalCarb : false, naFibers : false, naSugars : false, naProteins : false, naVitaminA : false, naVitaminC : false, naCalcium : false, naIron : false, //these are the default values for the nutrition info valueServingSize : 0, valueServingSizeUnit : '', valueServingPerContainer : 1, valueCalories : 0, valueFatCalories : 0, valueTotalFat : 0, valueSatFat : 0, valueTransFat : 0, valuePolyFat : 0, valueMonoFat : 0, valueCholesterol : 0, valueSodium : 0, valueTotalCarb : 0, valueFibers : 0, valueSugars : 0, valueProteins : 0, valueVitaminA : 0, valueVitaminC : 0, valueCalcium : 0, valueIron : 0, //these are the values for the optional calorie diet valueCol1CalorieDiet : 2000, valueCol2CalorieDiet : 2500, valueCol1DietaryTotalFat : 0, valueCol2DietaryTotalFat : 0, valueCol1DietarySatFat : 0, valueCol2DietarySatFat : 0, valueCol1DietaryCholesterol : 0, valueCol2DietaryCholesterol : 0, valueCol1DietarySodium : 0, valueCol2DietarySodium : 0, valueCol1DietaryTotalCarb : 0, valueCol2DietaryTotalCarb : 0, valueCol1Dietary : 0, valueCol2Dietary : 0, //these text settings is so you can create nutrition labels in different languages or to simply change them to your need textNutritionFacts : 'Nutrition Facts', textDailyValues : 'Daily Value', textServingSize : 'Serving Size', textServingsPerContainer : 'Servings Per Container', textAmountPerServing : 'Amount Per Serving', textCalories : 'Calories', textFatCalories : 'Calories from Fat', textTotalFat : 'Total Fat', textSatFat : 'Saturated Fat', textTransFat : '<i>Trans</i> Fat', textPolyFat : 'Polyunsaturated Fat', textMonoFat : 'Monounsaturated Fat', textCholesterol : 'Cholesterol', textSodium : 'Sodium', textTotalCarb : 'Total Carbohydrates', textFibers : 'Dietary Fiber', textSugars : 'Sugars', textProteins : 'Protein', textVitaminA : 'Vitamin A', textVitaminC : 'Vitamin C', textCalcium : 'Calcium', textIron : 'Iron', ingredientLabel : 'INGREDIENTS:', ingredientList : 'None', textPercentDailyPart1 : 'Percent Daily Values are based on a', textPercentDailyPart2 : 'calorie diet' ------------------------------------------------------------------------------------------------------ ------------------------------------------------------------------------------------------------------