Skip to content

Commit

Permalink
worked on task well-2210
Browse files Browse the repository at this point in the history
  • Loading branch information
majin22 committed Sep 21, 2023
1 parent 84dc267 commit 3939077
Show file tree
Hide file tree
Showing 12 changed files with 38 additions and 31 deletions.
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "nutrition-label-jquery-plugin",
"version": "11.0.11",
"version": "11.0.12",
"homepage": "https://github.com/nutritionix/nutrition-label",
"authors": [
"Leo Joseph Gajitos <leejay22@gmail.com>",
Expand Down
7 changes: 7 additions & 0 deletions changelog.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,11 @@

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
Expand Down
2 changes: 1 addition & 1 deletion dist/css/nutritionLabel-min.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/css/nutritionLabel.css
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
* @license This Nutritionix jQuery Nutrition Label is dual licensed under the MIT and GPL licenses. |
* @link http://www.nutritionix.com |
* @github http://github.com/nutritionix/nutrition-label |
* @current version 11.0.11 |
* @current version 11.0.12 |
* @stable version 11.0.4 |
* @supported browser Firefox, Chrome, IE8+ |
* @description To be able to create a FDA-style nutrition label with any nutrition data source |
Expand Down
4 changes: 2 additions & 2 deletions dist/js/nutritionLabel-min.js

Large diffs are not rendered by default.

22 changes: 11 additions & 11 deletions dist/js/nutritionLabel.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
* @license This Nutritionix jQuery Nutrition Label is dual licensed under the MIT and GPL licenses. |
* @link http://www.nutritionix.com |
* @github http://github.com/nutritionix/nutrition-label |
* @current version 11.0.11 |
* @current version 11.0.12 |
* @stable version 11.0.4 |
* @supported browser Firefox, Chrome, IE8+ |
* @description To be able to create a FDA-style nutrition label with any nutrition data source |
Expand Down Expand Up @@ -197,19 +197,19 @@
calorieIntake: 2000,

//these are the recommended daily intake values
dailyValueTotalFat: 65, //this should be 70 for the uk version
dailyValueTotalFat: 65, //this should be 70 for the uk version and 78 for the 2018 version
dailyValueSatFat: 20,
dailyValueCholesterol: 300,
dailyValueSodium: 2400,
dailyValueSodium: 2400, //this should be 2300 for the uk version
dailyValuePotassium: 3500,
dailyValuePotassium_2018: 4700, //this is for the 2018 version
dailyValueCarb: 300, //this should be 260 for the uk version
dailyValueFiber: 25,
dailyValueCarb: 300, //this should be 260 for the uk version and 275 for the 2018 version
dailyValueFiber: 25, //this should be 28 for the 2018 version
dailyValueCalcium: 1300, //this is for the 2018 version
dailyValueIron: 18,
dailyValueVitaminD: 20,
dailyValueAddedSugar: 50,
dailyValueSugar: 90,
dailyValueSugar: 100, //this should be 90 for the uk version
dailyValueEnergyKcal: 2000, //this is for the uk version
dailyValueProtein: 50, //this is for the uk version
dailyValueSalt: 6, //this is for the uk version
Expand Down Expand Up @@ -2445,7 +2445,7 @@
if ($this.settings.showSugars) {
nutritionLabel += generateAttributeWithPercentageHtmlLegacy(
//$localSetting valueIndex dailyValueIndex unitIndex naIndex attributeTexts lineClass itemPropValue roundFunctionName roundFunctionRuleName boldName showPercentageCode
$this.settings, 'valueSugars', 'dailyValueSugar', 'unitSugars', 'naSugars', 'textSugars', useLine + ' indent', 'sugarContent', 'roundCarbFiberSugarProtein', 'roundCarbFiberSugarProteinRule', false, false
$this.settings, 'valueSugars', 'dailyValueSugar', 'unitSugars', 'naSugars', 'textSugars', useLine + ' indent', 'sugarContent', 'roundCarbFiberSugarProtein', 'roundCarbFiberSugarProteinRule', false, $this.settings.showDailySugars
);
useLine = 'line';
}
Expand Down Expand Up @@ -2733,13 +2733,13 @@
if ($this.settings.showSugars) {
if (!$this.settings.indentSugarAndRemoveBoldStyleFor2018Label) {
nutritionLabel += generateAttributeHtml2018Version(
//$localSettings valueIndex unitIndex naIndex attributeText itemPropValue topDivClass showPercentageCode roundFunctionName roundFunctionRuleName labelClass valueClass dailyValueIndex
$this.settings, 'valueSugars', 'unitSugars', 'naSugars', 'textSugars', 'sugarContent', 'nf-line', false, 'roundCarbFiberSugarProtein', 'roundCarbFiberSugarProteinRule', 'nf-highlight', '', 'dailyValueSugar'
//$localSettings valueIndex unitIndex naIndex attributeText itemPropValue topDivClass showPercentageCode roundFunctionName roundFunctionRuleName labelClass valueClass dailyValueIndex
$this.settings, 'valueSugars', 'unitSugars', 'naSugars', 'textSugars', 'sugarContent', 'nf-line', $this.settings.showDailySugars, 'roundCarbFiberSugarProtein', 'roundCarbFiberSugarProteinRule', 'nf-highlight', '', 'dailyValueSugar'
);
} else {
nutritionLabel += generateAttributeHtml2018Version(
//$localSettings valueIndex unitIndex naIndex attributeText itemPropValue topDivClass showPercentageCode roundFunctionName roundFunctionRuleName labelClass valueClass dailyValueIndex
$this.settings, 'valueSugars', 'unitSugars', 'naSugars', 'textSugars', 'sugarContent', 'nf-line nf-indent', false, 'roundCarbFiberSugarProtein', 'roundCarbFiberSugarProteinRule', '', '', 'dailyValueSugar'
//$localSettings valueIndex unitIndex naIndex attributeText itemPropValue topDivClass showPercentageCode roundFunctionName roundFunctionRuleName labelClass valueClass dailyValueIndex
$this.settings, 'valueSugars', 'unitSugars', 'naSugars', 'textSugars', 'sugarContent', 'nf-line nf-indent', $this.settings.showDailySugars, 'roundCarbFiberSugarProtein', 'roundCarbFiberSugarProteinRule', '', '', 'dailyValueSugar'
);
}
}
Expand Down
6 changes: 3 additions & 3 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
* @license This Nutritionix jQuery Nutrition Label is dual licensed under the MIT and GPL licenses. |
* @link http://www.nutritionix.com |
* @github http://github.com/nutritionix/nutrition-label |
* @current version 11.0.11 |
* @current version 11.0.12 |
* @stable version 11.0.4 |
* @supported browser Firefox, Chrome, IE8+ |
* @description To be able to create a FDA-style nutrition label with any nutrition data source |
Expand All @@ -29,7 +29,7 @@
<body>
<div class="container" style="width: 1250px;">
<div class="hero-unit">
<h1>Nutrition Label version 11.0.10</h1>
<h1>Nutrition Label version 11.0.12</h1>
<h4>from Nutritionix</h4>
<h4><a href="http://github.com/nutritionix/nutrition-label" target="_newDemo">Homepage</a></h4>
<p>
Expand Down Expand Up @@ -167,7 +167,7 @@ <h4><a href="http://github.com/nutritionix/nutrition-label" target="_newDemo">Ho
dailyValueIron: 18,
dailyValueVitaminD: 20,
dailyValueAddedSugar: 50,
dailyValueSugar: 90,
dailyValueSugar: 100, //this should be 90 for the uk version
dailyValueEnergyKcal: 2000, //this is for the uk version
dailyValueProtein: 50, //this is for the uk version
dailyValueSalt: 6, //this is for the uk version
Expand Down
2 changes: 1 addition & 1 deletion nutritionLabel-min.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions nutritionLabel-min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion nutritionLabel.css
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
* @license This Nutritionix jQuery Nutrition Label is dual licensed under the MIT and GPL licenses. |
* @link http://www.nutritionix.com |
* @github http://github.com/nutritionix/nutrition-label |
* @current version 11.0.11 |
* @current version 11.0.12 |
* @stable version 11.0.4 |
* @supported browser Firefox, Chrome, IE8+ |
* @description To be able to create a FDA-style nutrition label with any nutrition data source |
Expand Down
14 changes: 7 additions & 7 deletions nutritionLabel.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
* @license This Nutritionix jQuery Nutrition Label is dual licensed under the MIT and GPL licenses. |
* @link http://www.nutritionix.com |
* @github http://github.com/nutritionix/nutrition-label |
* @current version 11.0.11 |
* @current version 11.0.12 |
* @stable version 11.0.4 |
* @supported browser Firefox, Chrome, IE8+ |
* @description To be able to create a FDA-style nutrition label with any nutrition data source |
Expand Down Expand Up @@ -209,7 +209,7 @@
dailyValueIron: 18,
dailyValueVitaminD: 20,
dailyValueAddedSugar: 50,
dailyValueSugar: 90,
dailyValueSugar: 100, //this should be 90 for the uk version
dailyValueEnergyKcal: 2000, //this is for the uk version
dailyValueProtein: 50, //this is for the uk version
dailyValueSalt: 6, //this is for the uk version
Expand Down Expand Up @@ -2445,7 +2445,7 @@
if ($this.settings.showSugars) {
nutritionLabel += generateAttributeWithPercentageHtmlLegacy(
//$localSetting valueIndex dailyValueIndex unitIndex naIndex attributeTexts lineClass itemPropValue roundFunctionName roundFunctionRuleName boldName showPercentageCode
$this.settings, 'valueSugars', 'dailyValueSugar', 'unitSugars', 'naSugars', 'textSugars', useLine + ' indent', 'sugarContent', 'roundCarbFiberSugarProtein', 'roundCarbFiberSugarProteinRule', false, false
$this.settings, 'valueSugars', 'dailyValueSugar', 'unitSugars', 'naSugars', 'textSugars', useLine + ' indent', 'sugarContent', 'roundCarbFiberSugarProtein', 'roundCarbFiberSugarProteinRule', false, $this.settings.showDailySugars
);
useLine = 'line';
}
Expand Down Expand Up @@ -2733,13 +2733,13 @@
if ($this.settings.showSugars) {
if (!$this.settings.indentSugarAndRemoveBoldStyleFor2018Label) {
nutritionLabel += generateAttributeHtml2018Version(
//$localSettings valueIndex unitIndex naIndex attributeText itemPropValue topDivClass showPercentageCode roundFunctionName roundFunctionRuleName labelClass valueClass dailyValueIndex
$this.settings, 'valueSugars', 'unitSugars', 'naSugars', 'textSugars', 'sugarContent', 'nf-line', false, 'roundCarbFiberSugarProtein', 'roundCarbFiberSugarProteinRule', 'nf-highlight', '', 'dailyValueSugar'
//$localSettings valueIndex unitIndex naIndex attributeText itemPropValue topDivClass showPercentageCode roundFunctionName roundFunctionRuleName labelClass valueClass dailyValueIndex
$this.settings, 'valueSugars', 'unitSugars', 'naSugars', 'textSugars', 'sugarContent', 'nf-line', $this.settings.showDailySugars, 'roundCarbFiberSugarProtein', 'roundCarbFiberSugarProteinRule', 'nf-highlight', '', 'dailyValueSugar'
);
} else {
nutritionLabel += generateAttributeHtml2018Version(
//$localSettings valueIndex unitIndex naIndex attributeText itemPropValue topDivClass showPercentageCode roundFunctionName roundFunctionRuleName labelClass valueClass dailyValueIndex
$this.settings, 'valueSugars', 'unitSugars', 'naSugars', 'textSugars', 'sugarContent', 'nf-line nf-indent', false, 'roundCarbFiberSugarProtein', 'roundCarbFiberSugarProteinRule', '', '', 'dailyValueSugar'
//$localSettings valueIndex unitIndex naIndex attributeText itemPropValue topDivClass showPercentageCode roundFunctionName roundFunctionRuleName labelClass valueClass dailyValueIndex
$this.settings, 'valueSugars', 'unitSugars', 'naSugars', 'textSugars', 'sugarContent', 'nf-line nf-indent', $this.settings.showDailySugars, 'roundCarbFiberSugarProtein', 'roundCarbFiberSugarProteinRule', '', '', 'dailyValueSugar'
);
}
}
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "nutrition-label-jquery-plugin",
"version": "11.0.11",
"version": "11.0.12",
"description": "To be able to create a FDA-style nutrition label with any nutrition data source",
"main": "nutritionLabel-min.js",
"dependencies": {},
Expand Down

0 comments on commit 3939077

Please sign in to comment.