Skip to content

Commit

Permalink
worked on task #78
Browse files Browse the repository at this point in the history
  • Loading branch information
majin22 committed Aug 5, 2017
1 parent d0b2188 commit 12bf105
Show file tree
Hide file tree
Showing 14 changed files with 36 additions and 28 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": "7.0.10",
"version": "7.0.11",
"homepage": "https://github.com/nutritionix/nutrition-label",
"authors": [
"Leo Joseph Gajitos <[email protected]>",
Expand Down
11 changes: 11 additions & 0 deletions changelog.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,15 @@

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
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 7.0.10 |
* @current version 7.0.11 |
* @stable version 7.0.5 |
* @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.

9 changes: 4 additions & 5 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 7.0.10 |
* @current version 7.0.11 |
* @stable version 7.0.5 |
* @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 @@ -341,8 +341,7 @@
textMonoFat : 'Monounsaturated Fat',
textCholesterol : 'Cholesterol',
textSodium : 'Sodium',
textPotassium : 'Potassium', //this is for the legacy version
textPotassium_2018 : 'Potas.', //this is for the 2018 version
textPotassium : 'Potassium',
textTotalCarb : 'Total Carbohydrates',
textFibers : 'Dietary Fiber',
textSugars : 'Sugars',
Expand All @@ -351,7 +350,7 @@
textProteins : 'Protein',
textVitaminA : 'Vitamin A',
textVitaminC : 'Vitamin C',
textVitaminD : 'Vit. D',
textVitaminD : 'Vitamin D',
textCalcium : 'Calcium',
textIron : 'Iron',
ingredientList : 'None',
Expand Down Expand Up @@ -2223,7 +2222,7 @@
if ($this.settings.showPotassium_2018){
nutritionLabel += tab3 + generateHtmlAndComputeValueGivenThePercentage(
//$localSettings, valueIndex, dailyValueIndex, unitIndex_base, unitIndex_percent, naIndex, attributeTexts
$this.settings, 'valuePotassium_2018', 'dailyValuePotassium_2018', 'unitPotassium_base', 'unitPotassium_percent', 'naPotassium_2018', 'textPotassium_2018'
$this.settings, 'valuePotassium_2018', 'dailyValuePotassium_2018', 'unitPotassium_base', 'unitPotassium_percent', 'naPotassium_2018', 'textPotassium'
);
}

Expand Down
11 changes: 5 additions & 6 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 7.0.10 |
* @current version 7.0.11 |
* @stable version 7.0.5 |
* @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">
<div class="hero-unit">
<h1>Nutrition Label version 7.0.10</h1>
<h1>Nutrition Label version 7.0.11</h1>
<h4>from Nutritionix</h4>
<h4><a href="http://github.com/nutritionix/nutrition-label" target="_newDemo">Homepage</a></h4>
<p>
Expand Down Expand Up @@ -273,7 +273,7 @@ <h4><a href="http://github.com/nutritionix/nutrition-label" target="_newDemo">Ho
unitProteins : 'g',
unitVitaminA : '%',
unitVitaminC : '%',
unitVitaminD_base : 'mg', //this is for the 2018 version
unitVitaminD_base : 'mcg', //this is for the 2018 version
unitVitaminD_percent : '%', //this is for the 2018 version
unitCalcium : '%',
unitCalcium_base : 'mg', //this is for the 2018 version
Expand Down Expand Up @@ -315,8 +315,7 @@ <h4><a href="http://github.com/nutritionix/nutrition-label" target="_newDemo">Ho
textMonoFat : 'Monounsaturated Fat',
textCholesterol : 'Cholesterol',
textSodium : 'Sodium',
textPotassium : 'Potassium', //this is for the legacy version
textPotassium_2018 : 'Potas.', //this is for the 2018 version
textPotassium : 'Potassium',
textTotalCarb : 'Total Carbohydrates',
textFibers : 'Dietary Fiber',
textSugars : 'Sugars',
Expand All @@ -325,7 +324,7 @@ <h4><a href="http://github.com/nutritionix/nutrition-label" target="_newDemo">Ho
textProteins : 'Protein',
textVitaminA : 'Vitamin A',
textVitaminC : 'Vitamin C',
textVitaminD : 'Vit. D',
textVitaminD : 'Vitamin D',
textCalcium : 'Calcium',
textIron : 'Iron',
ingredientList : 'None',
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-stable-ver-7.0.5.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 7.0.10 |
* @current version 7.0.11 |
* @stable version 7.0.5 |
* @supported browser Firefox, Chrome, IE8+ |
* @description To be able to create a FDA-style nutrition label with any nutrition data source |
Expand Down
2 changes: 1 addition & 1 deletion nutritionLabel-stable-ver-7.0.5.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 7.0.10 |
* @current version 7.0.11 |
* @stable version 7.0.5 |
* @supported browser Firefox, Chrome, IE8+ |
* @description To be able to create a FDA-style nutrition label with any nutrition data source |
Expand Down
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 7.0.10 |
* @current version 7.0.11 |
* @stable version 7.0.5 |
* @supported browser Firefox, Chrome, IE8+ |
* @description To be able to create a FDA-style nutrition label with any nutrition data source |
Expand Down
9 changes: 4 additions & 5 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 7.0.10 |
* @current version 7.0.11 |
* @stable version 7.0.5 |
* @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 @@ -341,8 +341,7 @@
textMonoFat : 'Monounsaturated Fat',
textCholesterol : 'Cholesterol',
textSodium : 'Sodium',
textPotassium : 'Potassium', //this is for the legacy version
textPotassium_2018 : 'Potas.', //this is for the 2018 version
textPotassium : 'Potassium',
textTotalCarb : 'Total Carbohydrates',
textFibers : 'Dietary Fiber',
textSugars : 'Sugars',
Expand All @@ -351,7 +350,7 @@
textProteins : 'Protein',
textVitaminA : 'Vitamin A',
textVitaminC : 'Vitamin C',
textVitaminD : 'Vit. D',
textVitaminD : 'Vitamin D',
textCalcium : 'Calcium',
textIron : 'Iron',
ingredientList : 'None',
Expand Down Expand Up @@ -2223,7 +2222,7 @@
if ($this.settings.showPotassium_2018){
nutritionLabel += tab3 + generateHtmlAndComputeValueGivenThePercentage(
//$localSettings, valueIndex, dailyValueIndex, unitIndex_base, unitIndex_percent, naIndex, attributeTexts
$this.settings, 'valuePotassium_2018', 'dailyValuePotassium_2018', 'unitPotassium_base', 'unitPotassium_percent', 'naPotassium_2018', 'textPotassium_2018'
$this.settings, 'valuePotassium_2018', 'dailyValuePotassium_2018', 'unitPotassium_base', 'unitPotassium_percent', 'naPotassium_2018', 'textPotassium'
);
}

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": "7.0.10",
"version": "7.0.11",
"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 12bf105

Please sign in to comment.