mirror of
https://github.com/bodyrep/DemoApp.git
synced 2026-01-25 14:43:00 +00:00
fixing a few bits
This commit is contained in:
File diff suppressed because it is too large
Load Diff
|
Before Width: | Height: | Size: 128 KiB After Width: | Height: | Size: 128 KiB |
@@ -1,14 +1,11 @@
|
|||||||
$(document).ready(function() {
|
$(document).ready(function() {
|
||||||
//makes buttons buttons
|
//makes buttons buttons
|
||||||
$("button").button();
|
$("button").button();
|
||||||
console.log('document ready');
|
|
||||||
//makes datepickers
|
//makes datepickers
|
||||||
$( ".datepicker" ).datepicker();
|
$( ".datepicker" ).datepicker();
|
||||||
//$('#newworkout').find('input.datepicker').datepicker();
|
|
||||||
$('.datepicker').datepicker('setDate', new Date());
|
$('.datepicker').datepicker('setDate', new Date());
|
||||||
//$('.datepicker').datepicker("hide");
|
|
||||||
|
|
||||||
//jsut everything work better
|
//just everything works better when synchro
|
||||||
$.ajax({async:false});
|
$.ajax({async:false});
|
||||||
|
|
||||||
jQuery.extend({
|
jQuery.extend({
|
||||||
@@ -28,33 +25,53 @@ $(document).ready(function() {
|
|||||||
});
|
});
|
||||||
|
|
||||||
originalExerciselist = $.getValues("/api/exerciselist");
|
originalExerciselist = $.getValues("/api/exerciselist");
|
||||||
//*[@id="F_x5F_Pectorals"]
|
var musclesearcharray = [];
|
||||||
|
var muscleSVGmap = ['Triceps','Forearms','Biceps','Deltoids','Back','Lats','Glutes','Hamstrings','Calves','Traps','Abs','Quads','Shins','Pectorals'];
|
||||||
|
|
||||||
// $('div#SVG1').empty().load("/images/BlankBody.svg", function(){
|
function LoadBodyHistory() {
|
||||||
// console.log('svg loaded');
|
$('span.SVGBODY').empty().load("/images/BlankBody.svg", function(){
|
||||||
// });
|
workoutmusclesum = [0,0,0,0,0,0,0,0,0,0,0,0,0,0];
|
||||||
|
var currentsvg = $(this).first('svg#Layer_1');
|
||||||
|
$(this).siblings('.workoutentry').each(function(){
|
||||||
|
$(this).children('p.workoutelement').each(function(){
|
||||||
|
exercisemusculearray = $(this).data("musclearray");
|
||||||
|
|
||||||
// $('div#SVG1').svg({
|
jQuery.each(exercisemusculearray, function(index, element) {
|
||||||
// loadURL: '/images/BlankBody.svg', // External document to load
|
//console.log('marray'+index +'=' + element);
|
||||||
// onLoad: null, // Callback once loaded
|
workoutmusclesum[index] = workoutmusclesum[index] + element; });
|
||||||
// settings: {width: '10cm', height: '5cm'}, // Additional settings for SVG element
|
});
|
||||||
// initPath: ''});
|
//console.log('Tarray= '+workoutmusclesum);
|
||||||
|
|
||||||
$('span.SVGBODY').empty().load("/images/BlankBody.svg", function(){
|
jQuery.each(workoutmusclesum, function(index, element) {
|
||||||
//$("button").button();
|
console.log('color='+ muscleSVGmap[index] +'=' + (element/5));
|
||||||
});
|
$(currentsvg).find('g#' + muscleSVGmap[index]).children().css("opacity",(element/5));
|
||||||
|
$(currentsvg).find('g#' + muscleSVGmap[index]).children().css("fill",'#0AADE3');
|
||||||
|
});
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
LoadBodyHistory();
|
||||||
var colors = "0f0 0ff f60 f0f 00f f00".split(' '), i=0;
|
var colors = "0f0 0ff f60 f0f 00f f00".split(' '), i=0;
|
||||||
|
|
||||||
$(document).on('click', '.SVGBODYFilter g',(function() {
|
$(document).on('click', '.SVGBODYFilter g',(function() {
|
||||||
console.log('click ' + this.id);
|
if ($(this).data('Clicked') === 'True') {
|
||||||
$(this).children('path').css("fill",'#'+colors[i++%colors.length] +'');
|
$(this).data('Clicked', 'False');
|
||||||
})
|
$(this).children('path').css("fill",'#0AADE3');
|
||||||
|
musclesearcharray.splice(musclesearcharray.indexOf(this.id),1);
|
||||||
|
filterarray();
|
||||||
|
} else {
|
||||||
|
$(this).data('Clicked', 'True');
|
||||||
|
$(this).children('path').css("fill",'#00ff00');
|
||||||
|
musclesearcharray.push(this.id);
|
||||||
|
filterarray();
|
||||||
|
}
|
||||||
|
})
|
||||||
);
|
);
|
||||||
|
|
||||||
$("button#addExercise").click(function() {
|
$("button#addExercise").click(function() {
|
||||||
console.log("click!");
|
|
||||||
var newElem = $('<li class=ui-state-default ><label for="element">elements[0][exerciseID]<br /></label><input name="elements[][exerciseID]" class="element"><button type="button" class="addSet">Add Set</button><button type="button" class="delete">Delete Exercise</button><ul class="sets"></ul></li>');
|
var newElem = $('<li class=ui-state-default ><label for="element">elements[0][exerciseID]<br /></label><input name="elements[][exerciseID]" class="element"><button type="button" class="addSet">Add Set</button><button type="button" class="delete">Delete Exercise</button><ul class="sets"></ul></li>');
|
||||||
$(newElem).appendTo('ul#exercises');
|
$(newElem).appendTo('ul#exercises');
|
||||||
$("button").button();
|
$("button").button();
|
||||||
@@ -93,20 +110,10 @@ $(document).ready(function() {
|
|||||||
$("#newworkout").bind('sortupdate', function(event, ui) {
|
$("#newworkout").bind('sortupdate', function(event, ui) {
|
||||||
$('#exercises > li').each(function(){
|
$('#exercises > li').each(function(){
|
||||||
var itemindex= $(this).index();
|
var itemindex= $(this).index();
|
||||||
// var newname = $(this).find('input, select').attr('name').replace(/elements\[[0-9]*\]/,'elements[' + itemindex + ']');
|
|
||||||
$(this).find('input, select').each(function() {
|
$(this).find('input, select').each(function() {
|
||||||
var newname = $(this).attr('name').replace(/elements\[[0-9]*\]/,'elements[' + itemindex + ']');
|
var newname = $(this).attr('name').replace(/elements\[[0-9]*\]/,'elements[' + itemindex + ']');
|
||||||
$(this).attr('name', newname);
|
$(this).attr('name', newname);
|
||||||
});
|
});
|
||||||
// $(this).find('label').each(function() {
|
|
||||||
// var value = $(this).attr('href');
|
|
||||||
// console.log ('value -' + value);
|
|
||||||
// $(this).attr('href', value.replace(/elements\[[0-9]*\]/,'elements[' + itemindex + ']'));
|
|
||||||
|
|
||||||
// //var newname = $(this).html.replace(/elements\[[0-9]*\]/,'elements[' + itemindex + ']');
|
|
||||||
// //$(this).html(newname);
|
|
||||||
// });
|
|
||||||
|
|
||||||
$(this).find('ul li').each(function(){
|
$(this).find('ul li').each(function(){
|
||||||
var itemindex2= $(this).index();
|
var itemindex2= $(this).index();
|
||||||
|
|
||||||
@@ -117,8 +124,6 @@ $(document).ready(function() {
|
|||||||
});
|
});
|
||||||
|
|
||||||
$(this).children('label').each(function(){
|
$(this).children('label').each(function(){
|
||||||
//var newname2 = $(this).attr('name').replace(/\[splits\]\[[0-9]*\]/,'[splits][' + itemindex2 + ']');
|
|
||||||
//newname2 = newname2.replace(/elements\[[0-9]*\]/,'elements[' + itemindex + ']');
|
|
||||||
var newname2 = 'Set '+ (itemindex2 + 1 ) + '';
|
var newname2 = 'Set '+ (itemindex2 + 1 ) + '';
|
||||||
$(this).html(newname2);
|
$(this).html(newname2);
|
||||||
});
|
});
|
||||||
@@ -135,19 +140,18 @@ $(document).ready(function() {
|
|||||||
|
|
||||||
|
|
||||||
});
|
});
|
||||||
//return false;
|
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
$("#Leftpane").delegate("button.recent-link", "click",function () {
|
$("#Leftpane").delegate("button.recent-link", "click",function () {
|
||||||
var id = $(this).attr('value');
|
var id = $(this).attr('value');
|
||||||
$('div#Rightpane').empty().load("/workouts/"+ id + "/recent/", function(){
|
$('div#Rightpane').empty().load("/workouts/"+ id + "/recent/", function(){
|
||||||
$("button").button();
|
$("button").button();
|
||||||
$('span.SVGBODY').empty().load("/images/BlankBody.svg", function(){
|
//$('span.SVGBODY').empty().load("/images/BlankBody.svg", function(){
|
||||||
//$("button").button();
|
//$("button").button();
|
||||||
});
|
//});
|
||||||
|
LoadBodyHistory();
|
||||||
});
|
});
|
||||||
$('div#Leftpane').empty().load("/users/"+ id + "/sidebar", function(){
|
$('div#Leftpane').empty().load("/users/"+ id + "/sidebar", function(){
|
||||||
$("button").button();
|
$("button").button();
|
||||||
@@ -182,30 +186,24 @@ $(document).ready(function() {
|
|||||||
});
|
});
|
||||||
|
|
||||||
$("#top").delegate("button.home-link", "click",function() {
|
$("#top").delegate("button.home-link", "click",function() {
|
||||||
//$("#top").delegate("button.home-link", "click",function () {
|
|
||||||
// window.location = this.id;
|
|
||||||
|
|
||||||
var id = $(this).attr('value');
|
var id = $(this).attr('value');
|
||||||
$('div#Rightpane').empty().load("/workouts/"+ id + "/recent/", function(){
|
$('div#Rightpane').empty().load("/workouts/"+ id + "/recent/", function(){
|
||||||
$("button").button();
|
$("button").button();
|
||||||
console.log('here');
|
$('span.SVGBODY').empty().load("/images/BlankBody.svg", function(){
|
||||||
$('span.SVGBODY').empty().load("/images/BlankBody.svg", function(){
|
});
|
||||||
//$("button").button();
|
});
|
||||||
|
$('div#Leftpane').empty().load("/users/"+ id + "/sidebar", function(){
|
||||||
|
$("button").button();
|
||||||
});
|
});
|
||||||
});
|
|
||||||
$('div#Leftpane').empty().load("/users/"+ id + "/sidebar", function(){
|
|
||||||
$("button").button();
|
|
||||||
});
|
|
||||||
});
|
});
|
||||||
|
|
||||||
$("#Rightpane").delegate("a", "click",function() {
|
$("#Rightpane").delegate("a", "click",function() {
|
||||||
console.log("yup yup" + $(this).attr('href'));
|
var id = $(this).attr('href');
|
||||||
var id = $(this).attr('href');
|
$('div#Rightpane').empty().load(id , function(){
|
||||||
$('div#Rightpane').empty().load(id , function(){
|
$("button").button();
|
||||||
$("button").button();
|
});
|
||||||
});
|
return false;
|
||||||
// Stop regular handling of "click" in IE (and some others)
|
|
||||||
return false;
|
|
||||||
});
|
});
|
||||||
|
|
||||||
$("#Leftpane").delegate("button.map-link", "click",function () {
|
$("#Leftpane").delegate("button.map-link", "click",function () {
|
||||||
@@ -215,8 +213,6 @@ $(document).ready(function() {
|
|||||||
});
|
});
|
||||||
|
|
||||||
$(document).on('click', '.addthisExercise',(function() {
|
$(document).on('click', '.addthisExercise',(function() {
|
||||||
// $("button.addthisExercise").click(function() {
|
|
||||||
console.log("This exercise name li" + JSON.stringify($(this).closest('li').data()));
|
|
||||||
var newElem = $('<li class=ui-state-default ><label for="element">Name</label><input name="exercisename" class="element" value="' + $(this).closest('li').data('name') + '"><input name="elements[][exerciseID]" class="hiddenelement" value="' + $(this).closest('li').data('exid') + '"><input name="elements[][Modifier]" class="element" value="' + $(this).closest('li').data('musclearrayMod') + '"><button type="button" class="addSet">Add Set</button><button type="button" class="delete">Delete Exercise</button><ul class="sets"><li class="set"><label for="element" name="elements[0][splits][0][reps]">elements[0][splits][0][reps]<br /></label><input name="elements[0][splits][0][reps]" class="element"><label for="element" name="elements[0][splits][0][weight]"><br />elements[0][splits][0][weight]<br /></label><input name="elements[0][splits][0][weight]" class="element"><button type="button" class="delete">Delete Set</button></li></ul></li>');
|
var newElem = $('<li class=ui-state-default ><label for="element">Name</label><input name="exercisename" class="element" value="' + $(this).closest('li').data('name') + '"><input name="elements[][exerciseID]" class="hiddenelement" value="' + $(this).closest('li').data('exid') + '"><input name="elements[][Modifier]" class="element" value="' + $(this).closest('li').data('musclearrayMod') + '"><button type="button" class="addSet">Add Set</button><button type="button" class="delete">Delete Exercise</button><ul class="sets"><li class="set"><label for="element" name="elements[0][splits][0][reps]">elements[0][splits][0][reps]<br /></label><input name="elements[0][splits][0][reps]" class="element"><label for="element" name="elements[0][splits][0][weight]"><br />elements[0][splits][0][weight]<br /></label><input name="elements[0][splits][0][weight]" class="element"><button type="button" class="delete">Delete Set</button></li></ul></li>');
|
||||||
$(newElem).data('musclearray', $(this).closest('li').data('musclearray'));
|
$(newElem).data('musclearray', $(this).closest('li').data('musclearray'));
|
||||||
$(newElem).data('musclearrayMod', $(this).closest('li').data('musclearrayMod'));
|
$(newElem).data('musclearrayMod', $(this).closest('li').data('musclearrayMod'));
|
||||||
@@ -229,12 +225,10 @@ $(document).ready(function() {
|
|||||||
})
|
})
|
||||||
);
|
);
|
||||||
|
|
||||||
//filteredExerciseArray = filterarray(originalExerciselist);
|
|
||||||
//PopulateExerciseList(arr);
|
|
||||||
|
|
||||||
$(document).on('click', '.filter', function(){
|
$(document).on('click', '.filter', function(){
|
||||||
filterarray();
|
filterarray();
|
||||||
});
|
});
|
||||||
|
|
||||||
$(document).on('keyup', '#searchbox', function(){
|
$(document).on('keyup', '#searchbox', function(){
|
||||||
filterarray();
|
filterarray();
|
||||||
@@ -255,44 +249,36 @@ $(document).ready(function() {
|
|||||||
|
|
||||||
if ($(".filter:checked").length > 0)
|
if ($(".filter:checked").length > 0)
|
||||||
{
|
{
|
||||||
// any one is checked
|
|
||||||
var len = $('.filter').length;
|
var len = $('.filter').length;
|
||||||
$(".filter").each(function(index, element) {
|
$(".filter").each(function(index, element) {
|
||||||
|
if ($(this).is (':checked')){
|
||||||
if ($(this).is (':checked'))
|
|
||||||
{
|
|
||||||
// Do stuff
|
|
||||||
keyREGEX += '('+ $(this).val() +')';
|
keyREGEX += '('+ $(this).val() +')';
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
//keyREGEX += "'";
|
|
||||||
keyREGEX = keyREGEX.replace(/\)\(/g, ")|(");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (musclesearcharray.length > 0 ){
|
||||||
|
jQuery.each(musclesearcharray, function(index, element) {
|
||||||
|
keyREGEX += '('+ this +')';
|
||||||
|
});
|
||||||
|
}
|
||||||
|
keyREGEX = keyREGEX.replace(/\)\(/g, ")|(");
|
||||||
console.log("Regex= " + keyREGEX);
|
console.log("Regex= " + keyREGEX);
|
||||||
//filteredExerciseArray = filterarray(originalExerciselist, keyREGEX);
|
|
||||||
//PopulateExerciseList(filteredExerciseArray);
|
|
||||||
|
|
||||||
$("#exerciselist li").each(function(){
|
$("#exerciselist li").each(function(){
|
||||||
//var keywordarray = $(this).data('keywords');
|
|
||||||
var keyworddata = $(this).data('keywords').toString();
|
var keyworddata = $(this).data('keywords').toString();
|
||||||
if(jQuery.trim(searchstring).length > 0) {
|
if(jQuery.trim(searchstring).length > 0) {
|
||||||
if ( ($(this).text().search(new RegExp(keyREGEX,'i')) > -1) && (keyworddata.search(new RegExp(keyREGEX,'ig')) > -1) ) {
|
if ( ($(this).text().search(new RegExp(keyREGEX,'i')) > -1) && (keyworddata.search(new RegExp(keyREGEX,'ig')) > -1) ) {
|
||||||
console.log("search" + $(this).text() + " " + keyREGEX);
|
|
||||||
$(this).show();
|
$(this).show();
|
||||||
console.log('thisshow1 ' + $(this).text() + ' ' + keyworddata.search(new RegExp(keyREGEX,'ig')) );
|
|
||||||
} else {
|
} else {
|
||||||
console.log('thishide1 ' + $(this).text() + ' ' + keyworddata.search(new RegExp(keyREGEX,'ig')));
|
|
||||||
$(this).hide();
|
$(this).hide();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (keyworddata.search(new RegExp(keyREGEX,'ig')) > -1)
|
else if (keyworddata.search(new RegExp(keyREGEX,'ig')) > -1)
|
||||||
{
|
{
|
||||||
console.log('thisshow ' + $(this).text() + ' ' + keyworddata + ' ' + keyworddata.search(new RegExp(keyREGEX,'ig')));
|
|
||||||
$(this).show();
|
$(this).show();
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
console.log('thishide ' + $(this).text() + ' ' + keyworddata + ' ' + keyworddata.search(new RegExp(keyREGEX,'ig')));
|
|
||||||
$(this).hide();
|
$(this).hide();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@@ -301,6 +287,38 @@ $(document).ready(function() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// function filterarrayMuscles(){
|
||||||
|
// console.time('FilterMuscles');
|
||||||
|
// var keyREGEX= "";
|
||||||
|
// if (musclesearcharray.length > 0 ){
|
||||||
|
// jQuery.each(musclesearcharray, function(index, element) {
|
||||||
|
// keyREGEX += '('+ this +')';
|
||||||
|
// });
|
||||||
|
// }
|
||||||
|
// keyREGEX = keyREGEX.replace(/\)\(/g, ")|(");
|
||||||
|
// console.log("Regex= " + keyREGEX);
|
||||||
|
|
||||||
|
// $("#exerciselist li").each(function(){
|
||||||
|
// var keyworddata = $(this).data('keywords').toString();
|
||||||
|
// if(jQuery.trim(searchstring).length > 0) {
|
||||||
|
// if ( ($(this).text().search(new RegExp(keyREGEX,'i')) > -1) && (keyworddata.search(new RegExp(keyREGEX,'ig')) > -1) ) {
|
||||||
|
// $(this).show();
|
||||||
|
// } else {
|
||||||
|
// $(this).hide();
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// else if (keyworddata.search(new RegExp(keyREGEX,'ig')) > -1)
|
||||||
|
// {
|
||||||
|
// $(this).show();
|
||||||
|
// }
|
||||||
|
// else {
|
||||||
|
// $(this).hide();
|
||||||
|
// }
|
||||||
|
// });
|
||||||
|
|
||||||
|
// console.timeEnd('Filter');
|
||||||
|
// }
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -331,7 +349,6 @@ function PopulateExerciseList(exerciselist) {
|
|||||||
console.time('PopulateExList');
|
console.time('PopulateExList');
|
||||||
var newExerciselist = $('<div></div>');
|
var newExerciselist = $('<div></div>');
|
||||||
$.each(exerciselist, function (i, item) {
|
$.each(exerciselist, function (i, item) {
|
||||||
//console.log("Exercisename = " + item.name);
|
|
||||||
var newElem = $('<li>'+item.name + ' - ' + item.description + '<button type="button" class="addthisExercise">+</li>');
|
var newElem = $('<li>'+item.name + ' - ' + item.description + '<button type="button" class="addthisExercise">+</li>');
|
||||||
$(newElem).data('name', item.name);
|
$(newElem).data('name', item.name);
|
||||||
$(newElem).data('exid', item._id);
|
$(newElem).data('exid', item._id);
|
||||||
@@ -341,7 +358,6 @@ function PopulateExerciseList(exerciselist) {
|
|||||||
$(newElem).data('datafields', item.datafields);
|
$(newElem).data('datafields', item.datafields);
|
||||||
newExerciselist.append(newElem);
|
newExerciselist.append(newElem);
|
||||||
});
|
});
|
||||||
console.log("newexlist outside= " + newExerciselist);
|
|
||||||
$('#exerciselist').empty();
|
$('#exerciselist').empty();
|
||||||
$(newExerciselist).appendTo('#exerciselist');
|
$(newExerciselist).appendTo('#exerciselist');
|
||||||
$("button").button();
|
$("button").button();
|
||||||
@@ -351,10 +367,3 @@ function PopulateExerciseList(exerciselist) {
|
|||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -35,10 +35,11 @@ form(id="newexercise", method="POST", action="/admin/exercises/" + encodeURIComp
|
|||||||
label(for="type") Exercise Difficulty<br />
|
label(for="type") Exercise Difficulty<br />
|
||||||
input#difficulty(name="difficulty", value= exercise.difficulty)
|
input#difficulty(name="difficulty", value= exercise.difficulty)
|
||||||
i = 0
|
i = 0
|
||||||
- for (i ; i < 10; ++i) {
|
marraymap = ['Triceps','Forearms','Biceps','Deltoids','Back','Lats','Glutes','Hamstrings','Calves','Traps','Abs','Quads','Shins','Pectorals']
|
||||||
|
- for (i ; i < 14; ++i) {
|
||||||
marray = "musclearray[" + i + "]"
|
marray = "musclearray[" + i + "]"
|
||||||
li
|
li
|
||||||
label(for="type") Muscle data #{i}
|
label(for="type") Muscle data #{marraymap[i]}
|
||||||
input(name= marray, class="musclearray", id= marray, value= exercise.musclearray[i])
|
input(name= marray, class="musclearray", id= marray, value= exercise.musclearray[i])
|
||||||
- }
|
- }
|
||||||
li
|
li
|
||||||
|
|||||||
@@ -24,5 +24,5 @@ ul
|
|||||||
- }
|
- }
|
||||||
|
|
||||||
- if (! lastPage) {
|
- if (! lastPage) {
|
||||||
a(href="?page=" + (page + 1)) Next
|
a(href="/admin/exercises?page=" + (page + 1)) Next
|
||||||
- }
|
- }
|
||||||
@@ -15,10 +15,11 @@ form(id="newexercise", method="POST", action="/admin/exercises/new")
|
|||||||
label(for="type") Exercise Difficulty<br />
|
label(for="type") Exercise Difficulty<br />
|
||||||
input#difficulty(name="difficulty")
|
input#difficulty(name="difficulty")
|
||||||
i = 0
|
i = 0
|
||||||
- for (i ; i < 10; ++i) {
|
marraymap = ['Triceps','Forearms','Biceps','Deltoids','Back','Lats','Glutes','Hamstrings','Calves','Traps','Abs','Quads','Shins','Pectorals']
|
||||||
|
- for (i ; i < 14; ++i) {
|
||||||
marray = "musclearray[" + i + "]"
|
marray = "musclearray[" + i + "]"
|
||||||
li
|
li
|
||||||
label(for="type") Muscle data #{i}
|
label(for="type") Muscle data #{marraymap[i]}
|
||||||
input(name= marray, class="musclearray", id= marray)
|
input(name= marray, class="musclearray", id= marray)
|
||||||
- }
|
- }
|
||||||
li
|
li
|
||||||
|
|||||||
@@ -2,10 +2,10 @@ h3 Recent workouts:
|
|||||||
ul
|
ul
|
||||||
- recentworkouts.forEach(function(workout) {
|
- recentworkouts.forEach(function(workout) {
|
||||||
li.floatleft
|
li.floatleft
|
||||||
span(class="floatleft")
|
span(class="floatleft workoutentry")
|
||||||
a(class="map-link", href="/workouts/" + encodeURIComponent(workout._id))= workout._id
|
a(class="map-link", href="/workouts/" + encodeURIComponent(workout._id))= workout._id
|
||||||
each element in workout.elements
|
each element in workout.elements
|
||||||
p= element.exerciseID.name
|
p(class="workoutelement", data-musclearray=element.exerciseID.musclearray)= element.exerciseID.name
|
||||||
ol
|
ol
|
||||||
each split in element.splits
|
each split in element.splits
|
||||||
li Reps: #{split.reps} Weight: #{split.weight}
|
li Reps: #{split.reps} Weight: #{split.weight}
|
||||||
|
|||||||
Reference in New Issue
Block a user