Skip to content
Browse files

Fixed an issue causing the tax and scale flags to be wrong when inven…

…tory is created. Moved some of bootstrap to load via requirejs.
  • Loading branch information...
1 parent eccf94d commit 4cdc7f9dd1f64924c99003fbe73187a9edb9ff55 @maxolasersquad committed Apr 4, 2014
Showing with 5 additions and 19 deletions.
  1. +4 −16 static/js/inventory.js
  2. +1 −1 static/js/register.js
  3. +0 −1 templates/inventory/index.html
  4. +0 −1 templates/register/index.html
View
20 static/js/inventory.js
@@ -1,4 +1,4 @@
-require(['jquery'], function($) {
+require(['jquery', 'bootstrap.min'], function($) {
$('.vendor-name').each(function() {
$(this).click(function() {
@@ -212,21 +212,9 @@ require(['jquery'], function($) {
return;
}
- var scalable;
- if ($('#input_scalable').html() == 'Scalable') {
- scalable = false;
- }
- else {
- scalable = true;
- }
-
- var taxable;
- if ($('#input_taxable').html() == 'Taxable') {
- taxable = false;
- }
- else {
- taxable = true;
- }
+ var scalable, taxable;
+ scalable = $('#input_scalable').html() == 'Scalable';
+ taxable = $('#input_taxable').html() == 'Taxable';
post_args = {
upc: $('#input_upc > input').val(),
View
2 static/js/register.js
@@ -1,4 +1,4 @@
-require(['jquery'], function($) {
+require(['jquery', 'bootstrap.min'], function($) {
var input_mode = 'upc';
View
1 templates/inventory/index.html
@@ -25,7 +25,6 @@
<link rel="stylesheet" href="/static/css/font-awesome.css">
<link rel="stylesheet" href="/static/css/bootstrap.min.css">
<link rel="stylesheet" href="/static/css/bootstrap-theme.min.css">
- <script src="/static/js/bootstrap.min.js"></script>
<link rel='stylesheet' type='text/css' href='/static/css/inventory.css' />
<meta charset="UTF-8"/>
</head>
View
1 templates/register/index.html
@@ -25,7 +25,6 @@
<link rel="stylesheet" href="/static/css/font-awesome.css">
<link rel="stylesheet" href="/static/css/bootstrap.min.css">
<link rel="stylesheet" href="/static/css/bootstrap-theme.min.css">
- <script src="/static/js/bootstrap.min.js"></script>
<link rel='stylesheet' type='text/css' href='/static/css/register.css' />
<meta charset="UTF-8">
</head>

0 comments on commit 4cdc7f9

Please sign in to comment.
Something went wrong with that request. Please try again.