diff --git a/perfectSteak.css b/perfectSteak.css
index 029e174..1dda4e1 100644
--- a/perfectSteak.css
+++ b/perfectSteak.css
@@ -18,6 +18,18 @@
.btnBar{
}
+.header{
+ margin:0px!important;
+}
+.inputTable{
+ margin:0px!important;
+}
+.inputTableContainer{
+ height:100px;
+ overflow-y:auto;
+ overflow-x:hidden;
+}
+
.mytog {
display: none;
}
diff --git a/perfectSteak.js b/perfectSteak.js
index bc9bde4..f28d073 100644
--- a/perfectSteak.js
+++ b/perfectSteak.js
@@ -355,13 +355,15 @@ var perfectSteak = function (div) {
var meatInp = $("");
var switcheroo = $('');
var mytog2 = $("");
+ var inputTableContainer=$("
");
var inputTable = $("");
+ inputTableContainer.append(inputTable)
var tabPane = $("")
- var inpTabHeader = $("
");
+ var inpTabHeader = $("");
var containerm = $("");
- inputTable.append(inpTabHeader)
+ inputTableContainer.append(inputTable);
switcheroo.append(mytog2);
- tabPaneActive.append( meatInp,thickInpDiv,tempInp,inputTable);
+ tabPaneActive.append( meatInp,thickInpDiv,tempInp,inpTabHeader,inputTableContainer);
tabPane.append(containerm);
tabContent.append(tabPaneActive, tabPane);
@@ -448,7 +450,7 @@ var perfectSteak = function (div) {
model.numRowsChange(model.currentInfo['recipe'][name3].length);
buildTable();
buildDisplay();
- graph();
+ graph(false, $('.mytog:checked').attr('id'));
@@ -557,10 +559,11 @@ var perfectSteak = function (div) {
var nameInp = $('');
var okModal = $('');
- cookButt.on("click", function () {
+ cookButt.on("click", function () {
if ($("#recipeInput").closest(".tab-pane").hasClass("active")) {
var recipeString = $("#recipeInput").val();
model.parseRecipe(recipeString);
+
} else {
model.checkDiv();
updateTime();
@@ -582,13 +585,18 @@ var perfectSteak = function (div) {
$(".span3").append(cookButt);
addDropdown();
}
- var sumtime = 0;
+
var time = $("#row" + i + "time").val().replace(':', '.').split('.');
+ if (time.length > 1) {
+ var sumtime = parseFloat(time[1]);
- for (var k = 0; k < time.length; k++) {
- sumtime += parseFloat(time[k]);
+ sumtime += parseFloat(60 * time[0]);
+ } else {
+ var sumtime = parseFloat(time[0]);
}
+
+
if (len == 0 || len == 1000) {
inp1.val(180);
@@ -662,6 +670,7 @@ var perfectSteak = function (div) {
$("#inp2_" + l).attr("id", String("inp2_" + parseInt(l - 1)));
$("#addButton" + l).attr("id", String("addButton" + parseInt(l - 1)));
}
+
})
row.append(durationi, rowiside1, rowiside2);
@@ -673,6 +682,10 @@ var perfectSteak = function (div) {
model.numRowsPlus();
console.log("just added a row" + model.currentInfo['numRows']);
addRow($(".inputTable"));
+ $(".inputTableContainer").animate({
+ scrollTop: 100
+ }, 300);
+
});
inputTable.append(addButton);
@@ -697,9 +710,7 @@ var perfectSteak = function (div) {
model.buildData();
model.numRowsPlus();
addRow($(".inputTable"));
- $('#table').stop().animate({
- scrollTop: $("#table")[0].scrollHeight
- }, 8000);
+
});
};