mirror of
https://github.com/bodyrep/DemoApp.git
synced 2026-02-13 19:07:25 +00:00
little man
This commit is contained in:
@@ -28,7 +28,26 @@ $(document).ready(function() {
|
|||||||
});
|
});
|
||||||
|
|
||||||
originalExerciselist = $.getValues("/api/exerciselist");
|
originalExerciselist = $.getValues("/api/exerciselist");
|
||||||
|
//*[@id="F_x5F_Pectorals"]
|
||||||
|
|
||||||
|
// $('div#SVG1').empty().load("/images/BlankBody.svg", function(){
|
||||||
|
// console.log('svg loaded');
|
||||||
|
// });
|
||||||
|
|
||||||
|
$('div#SVG1').svg({
|
||||||
|
loadURL: '/images/BlankBody.svg', // External document to load
|
||||||
|
onLoad: null, // Callback once loaded
|
||||||
|
settings: {width: '10cm', height: '5cm'}, // Additional settings for SVG element
|
||||||
|
initPath: ''});
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
var colors = "0f0 0ff f60 f0f 00f f00".split(' '), i=0;
|
||||||
|
$(document).on('click', 'g',(function() {
|
||||||
|
console.log('click ' + this.id);
|
||||||
|
this.find('path').style.fill = "#"+colors[i++%colors.length];
|
||||||
|
})
|
||||||
|
);
|
||||||
|
|
||||||
$("button#addExercise").click(function() {
|
$("button#addExercise").click(function() {
|
||||||
console.log("click!");
|
console.log("click!");
|
||||||
@@ -149,6 +168,7 @@ $(document).ready(function() {
|
|||||||
|
|
||||||
});
|
});
|
||||||
$("button").button();
|
$("button").button();
|
||||||
|
$(document).on('click', 'path#F_x5F_Pectorals', function(){alert('hello2');});
|
||||||
});
|
});
|
||||||
|
|
||||||
$("#top").delegate("button.home-link", "click",function() {
|
$("#top").delegate("button.home-link", "click",function() {
|
||||||
|
|||||||
@@ -86,7 +86,6 @@ module.exports = function(app) {
|
|||||||
|
|
||||||
app.get('/workouts/:_id', loggedIn, loadWorkout, function(req, res, next){
|
app.get('/workouts/:_id', loggedIn, loadWorkout, function(req, res, next){
|
||||||
console.log("time" + Moment.utc(req.workout.workoutDate).format("ddd, hA"));
|
console.log("time" + Moment.utc(req.workout.workoutDate).format("ddd, hA"));
|
||||||
console.log('output - ' + JSON.stringify(output));
|
|
||||||
res.render('workouts/workout', {title: req.workout.title,
|
res.render('workouts/workout', {title: req.workout.title,
|
||||||
workout: req.workout,
|
workout: req.workout,
|
||||||
workouttime: Moment.utc(req.workout.workoutDate).format("ddd, hA")
|
workouttime: Moment.utc(req.workout.workoutDate).format("ddd, hA")
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
script(src='http://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js')
|
script(src='http://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js')
|
||||||
script(src='http://ajax.googleapis.com/ajax/libs/jqueryui/1.9.2/jquery-ui.min.js')
|
script(src='http://ajax.googleapis.com/ajax/libs/jqueryui/1.9.2/jquery-ui.min.js')
|
||||||
script(src='http://jzaefferer.github.com/jquery-validation/jquery.validate.js')
|
script(src='http://jzaefferer.github.com/jquery-validation/jquery.validate.js')
|
||||||
|
script(src='/javascripts/jquery.svg.min.js')
|
||||||
script(src='/javascripts/scripts.js')
|
script(src='/javascripts/scripts.js')
|
||||||
|
|
||||||
//script(src='/javascripts/livevalidation_standalone.compressed.js')
|
//script(src='/javascripts/livevalidation_standalone.compressed.js')
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ extends ../layout
|
|||||||
// script(src='/javascripts/workout.js')
|
// script(src='/javascripts/workout.js')
|
||||||
|
|
||||||
block content
|
block content
|
||||||
|
div#SVG1(style="width: 500px; height: 400px;")
|
||||||
div#Leftpane
|
div#Leftpane
|
||||||
include ./sidebar
|
include ./sidebar
|
||||||
|
|
||||||
|
|||||||
@@ -14,7 +14,6 @@ form#newworkout(method="POST", action="/workouts")
|
|||||||
option(value='0100') 1 AM
|
option(value='0100') 1 AM
|
||||||
option(value='0130') 1:30 AM
|
option(value='0130') 1:30 AM
|
||||||
option(value='0200') 2 AM
|
option(value='0200') 2 AM
|
||||||
|
|
||||||
ul#exercises
|
ul#exercises
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ h1= workout.title
|
|||||||
ul
|
ul
|
||||||
li Time: #{workouttime}
|
li Time: #{workouttime}
|
||||||
each element in workout.elements
|
each element in workout.elements
|
||||||
li= element.exerciseID
|
li= element.exerciseID.name
|
||||||
ul
|
ul
|
||||||
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