fixed newexercise labels, added body to single workout page, added delete function for workouts

This commit is contained in:
2013-04-07 12:42:48 -04:00
parent 55a51ad1e1
commit 8dd478bbe2
24 changed files with 147 additions and 538 deletions

1
.idea/.name generated
View File

@@ -1 +0,0 @@
DemoApp

10
.idea/DemoApp.iml generated
View File

@@ -1,10 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<module type="WEB_MODULE" version="4">
<component name="NewModuleRootManager">
<content url="file://$MODULE_DIR$" />
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="library" name="Node.js v0.6.18 Core Modules" level="application" />
</component>
</module>

View File

@@ -1,3 +0,0 @@
<component name="ProjectDictionaryState">
<dictionary name="fbleagh" />
</component>

5
.idea/encodings.xml generated
View File

@@ -1,5 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="Encoding" useUTFGuessing="true" native2AsciiForPropertiesFiles="false" />
</project>

View File

@@ -1,45 +0,0 @@
<component name="InspectionProjectProfileManager">
<profile version="1.0" is_locked="false">
<option name="myName" value="Project Default" />
<option name="myLocal" value="false" />
<inspection_tool class="CheckDtdRefs" enabled="false" level="ERROR" enabled_by_default="false" />
<inspection_tool class="CheckNodeTest" enabled="false" level="WARNING" enabled_by_default="false" />
<inspection_tool class="CheckTagEmptyBody" enabled="false" level="WARNING" enabled_by_default="false" />
<inspection_tool class="CheckXmlFileWithXercesValidator" enabled="false" level="ERROR" enabled_by_default="false" />
<inspection_tool class="CoffeeScriptInfiniteLoop" enabled="false" level="WARNING" enabled_by_default="false" />
<inspection_tool class="CoffeeScriptSillyAssignment" enabled="false" level="WARNING" enabled_by_default="false" />
<inspection_tool class="CoffeeScriptSwitchStatementWithNoDefaultBranch" enabled="false" level="WARNING" enabled_by_default="false" />
<inspection_tool class="CoffeeScriptUnusedLocalSymbols" enabled="false" level="WARNING" enabled_by_default="false" />
<inspection_tool class="CucumberUndefinedStep" enabled="false" level="WARNING" enabled_by_default="false" />
<inspection_tool class="HardwiredNamespacePrefix" enabled="false" level="WARNING" enabled_by_default="false" />
<inspection_tool class="ImplicitTypeConversion" enabled="false" level="WARNING" enabled_by_default="false">
<option name="BITS" value="1720" />
<option name="FLAG_EXPLICIT_CONVERSION" value="true" />
<option name="IGNORE_NODESET_TO_BOOLEAN_VIA_STRING" value="true" />
</inspection_tool>
<inspection_tool class="IndexZeroUsage" enabled="false" level="WARNING" enabled_by_default="false" />
<inspection_tool class="LessUnresolvedImport" enabled="false" level="WARNING" enabled_by_default="false" />
<inspection_tool class="LessUnresolvedVariable" enabled="false" level="WARNING" enabled_by_default="false" />
<inspection_tool class="RedundantTypeConversion" enabled="false" level="WARNING" enabled_by_default="false">
<option name="CHECK_ANY" value="false" />
</inspection_tool>
<inspection_tool class="SassUnresolvedFunction" enabled="false" level="WARNING" enabled_by_default="false" />
<inspection_tool class="SassUnresolvedImport" enabled="false" level="WARNING" enabled_by_default="false" />
<inspection_tool class="SassUnresolvedMixin" enabled="false" level="WARNING" enabled_by_default="false" />
<inspection_tool class="SassUnresolvedPlaceholderSelector" enabled="false" level="WARNING" enabled_by_default="false" />
<inspection_tool class="SassUnresolvedVariable" enabled="false" level="WARNING" enabled_by_default="false" />
<inspection_tool class="SpellCheckingInspection" enabled="false" level="TYPO" enabled_by_default="false">
<option name="processCode" value="true" />
<option name="processLiterals" value="true" />
<option name="processComments" value="true" />
</inspection_tool>
<inspection_tool class="XmlDuplicatedId" enabled="false" level="ERROR" enabled_by_default="false" />
<inspection_tool class="XmlUnboundNsPrefix" enabled="false" level="WARNING" enabled_by_default="false" />
<inspection_tool class="XmlUnusedNamespaceDeclaration" enabled="false" level="WARNING" enabled_by_default="false" />
<inspection_tool class="XmlWrongRootElement" enabled="false" level="ERROR" enabled_by_default="false" />
<inspection_tool class="XsltDeclarations" enabled="false" level="ERROR" enabled_by_default="false" />
<inspection_tool class="XsltTemplateInvocation" enabled="false" level="ERROR" enabled_by_default="false" />
<inspection_tool class="XsltUnusedDeclaration" enabled="false" level="WARNING" enabled_by_default="false" />
<inspection_tool class="XsltVariableShadowing" enabled="false" level="WARNING" enabled_by_default="false" />
</profile>
</component>

View File

@@ -1,7 +0,0 @@
<component name="InspectionProjectProfileManager">
<settings>
<option name="PROJECT_PROFILE" value="Project Default" />
<option name="USE_PROJECT_PROFILE" value="true" />
<version value="1.0" />
</settings>
</component>

View File

@@ -1,7 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="JavaScriptLibraryMappings">
<file url="PROJECT" libraries="{Node.js v0.6.18 Core Modules}" />
</component>
</project>

View File

@@ -1,8 +0,0 @@
<component name="libraryTable">
<library name="sass-stdlib">
<CLASSES />
<SOURCES>
<root url="file://$APPLICATION_HOME_DIR$/plugins/sass/lib/stubs/sass_functions.scss" />
</SOURCES>
</library>
</component>

8
.idea/misc.xml generated
View File

@@ -1,8 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectResources">
<default-html-doctype>jar:file:\C:\Program Files (x86)\JetBrains\WebStorm 5.0.4\lib\webide.jar!\resources\html5-schema\html5.rnc</default-html-doctype>
</component>
<component name="ProjectRootManager" version="2" />
</project>

9
.idea/modules.xml generated
View File

@@ -1,9 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectModuleManager">
<modules>
<module fileurl="file://$PROJECT_DIR$/.idea/DemoApp.iml" filepath="$PROJECT_DIR$/.idea/DemoApp.iml" />
</modules>
</component>
</project>

View File

@@ -1,5 +0,0 @@
<component name="DependencyValidationManager">
<state>
<option name="SKIP_IMPORT_STATEMENTS" value="false" />
</state>
</component>

7
.idea/vcs.xml generated
View File

@@ -1,7 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="VcsDirectoryMappings">
<mapping directory="$PROJECT_DIR$" vcs="Git" />
</component>
</project>

358
.idea/workspace.xml generated
View File

@@ -1,358 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ChangeListManager">
<list default="true" id="a826c73a-963a-4a01-8b35-09246ddcc87b" name="Default" comment="" />
<ignored path="DemoApp.iws" />
<ignored path=".idea/workspace.xml" />
<option name="TRACKING_ENABLED" value="true" />
<option name="SHOW_DIALOG" value="false" />
<option name="HIGHLIGHT_CONFLICTS" value="true" />
<option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
<option name="LAST_RESOLUTION" value="IGNORE" />
</component>
<component name="ChangesViewManager" flattened_view="true" show_ignored="false" />
<component name="CreatePatchCommitExecutor">
<option name="PATCH_PATH" value="" />
</component>
<component name="DaemonCodeAnalyzer">
<disable_hints />
</component>
<component name="ExecutionTargetManager" SELECTED_TARGET="default_target" />
<component name="FileEditorManager">
<leaf>
<file leaf-file-name="app.js" pinned="false" current="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/app.js">
<provider selected="true" editor-type-id="text-editor">
<state line="7" column="29" selection-start="121" selection-end="121" vertical-scroll-proportion="0.0">
<folding />
</state>
</provider>
</entry>
</file>
<file leaf-file-name="workouts.js" pinned="false" current="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/routes/workouts.js">
<provider selected="true" editor-type-id="text-editor">
<state line="85" column="0" selection-start="2234" selection-end="2234" vertical-scroll-proportion="0.0">
<folding>
<element signature="n#!!doc" expanded="true" />
</folding>
</state>
</provider>
</entry>
</file>
<file leaf-file-name="scripts.js" pinned="false" current="true" current-in-tab="true">
<entry file="file://$PROJECT_DIR$/public/javascripts/scripts.js">
<provider selected="true" editor-type-id="text-editor">
<state line="241" column="36" selection-start="10447" selection-end="10447" vertical-scroll-proportion="0.7928994">
<folding />
</state>
</provider>
</entry>
</file>
</leaf>
</component>
<component name="FindManager">
<FindUsagesManager>
<setting name="OPEN_NEW_TAB" value="false" />
</FindUsagesManager>
</component>
<component name="Git.Settings">
<option name="RECENT_GIT_ROOT_PATH" value="$PROJECT_DIR$" />
</component>
<component name="IdeDocumentHistory">
<option name="changedFiles">
<list>
<option value="$PROJECT_DIR$/routes/workouts.js" />
</list>
</option>
</component>
<component name="ProjectFrameBounds">
<option name="x" value="-9" />
<option name="y" value="-9" />
<option name="width" value="1938" />
<option name="height" value="1050" />
</component>
<component name="ProjectInspectionProfilesVisibleTreeState">
<entry key="Project Default">
<profile-state>
<expanded-state>
<State>
<id />
</State>
<State>
<id>SASS/SCSS</id>
</State>
<State>
<id>Spelling</id>
</State>
<State>
<id>XSLT</id>
</State>
</expanded-state>
<selected-state>
<State>
<id>XSLT</id>
</State>
</selected-state>
</profile-state>
</entry>
</component>
<component name="ProjectLevelVcsManager" settingsEditedManually="false">
<OptionsSetting value="true" id="Add" />
<OptionsSetting value="true" id="Remove" />
<OptionsSetting value="true" id="Checkout" />
<OptionsSetting value="true" id="Update" />
<OptionsSetting value="true" id="Status" />
<OptionsSetting value="true" id="Edit" />
<ConfirmationsSetting value="0" id="Add" />
<ConfirmationsSetting value="0" id="Remove" />
</component>
<component name="ProjectReloadState">
<option name="STATE" value="0" />
</component>
<component name="ProjectView">
<navigator currentView="ProjectPane" proportions="" version="1" splitterProportion="0.5">
<flattenPackages />
<showMembers />
<showModules />
<showLibraryContents ProjectPane="true" />
<hideEmptyPackages />
<abbreviatePackageNames />
<autoscrollToSource />
<autoscrollFromSource />
<sortByType />
</navigator>
<panes>
<pane id="Scope" />
<pane id="ProjectPane">
<subPane>
<PATH>
<PATH_ELEMENT>
<option name="myItemId" value="DemoApp" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
</PATH_ELEMENT>
</PATH>
<PATH>
<PATH_ELEMENT>
<option name="myItemId" value="DemoApp" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
</PATH_ELEMENT>
<PATH_ELEMENT>
<option name="myItemId" value="DemoApp" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
</PATH_ELEMENT>
</PATH>
<PATH>
<PATH_ELEMENT>
<option name="myItemId" value="DemoApp" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
</PATH_ELEMENT>
<PATH_ELEMENT>
<option name="myItemId" value="DemoApp" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
</PATH_ELEMENT>
<PATH_ELEMENT>
<option name="myItemId" value="routes" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
</PATH_ELEMENT>
</PATH>
<PATH>
<PATH_ELEMENT>
<option name="myItemId" value="DemoApp" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
</PATH_ELEMENT>
<PATH_ELEMENT>
<option name="myItemId" value="DemoApp" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
</PATH_ELEMENT>
<PATH_ELEMENT>
<option name="myItemId" value="public" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
</PATH_ELEMENT>
</PATH>
<PATH>
<PATH_ELEMENT>
<option name="myItemId" value="DemoApp" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
</PATH_ELEMENT>
<PATH_ELEMENT>
<option name="myItemId" value="DemoApp" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
</PATH_ELEMENT>
<PATH_ELEMENT>
<option name="myItemId" value="public" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
</PATH_ELEMENT>
<PATH_ELEMENT>
<option name="myItemId" value="javascripts" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
</PATH_ELEMENT>
</PATH>
</subPane>
</pane>
</panes>
</component>
<component name="PropertiesComponent">
<property name="options.splitter.main.proportions" value="0.3" />
<property name="WebServerToolWindowFactoryState" value="false" />
<property name="options.lastSelected" value="fileTemplates" />
<property name="options.searchVisible" value="true" />
<property name="options.splitter.details.proportions" value="0.2" />
</component>
<component name="RunManager">
<list size="0" />
</component>
<component name="ShelveChangesManager" show_recycled="false" />
<component name="SvnConfiguration" maxAnnotateRevisions="500" myUseAcceleration="nothing" myAutoUpdateAfterCommit="false" cleanupOnStartRun="false">
<option name="USER" value="" />
<option name="PASSWORD" value="" />
<option name="mySSHConnectionTimeout" value="30000" />
<option name="mySSHReadTimeout" value="30000" />
<option name="LAST_MERGED_REVISION" />
<option name="MERGE_DRY_RUN" value="false" />
<option name="MERGE_DIFF_USE_ANCESTRY" value="true" />
<option name="UPDATE_LOCK_ON_DEMAND" value="false" />
<option name="IGNORE_SPACES_IN_MERGE" value="false" />
<option name="DETECT_NESTED_COPIES" value="true" />
<option name="CHECK_NESTED_FOR_QUICK_MERGE" value="false" />
<option name="IGNORE_SPACES_IN_ANNOTATE" value="true" />
<option name="SHOW_MERGE_SOURCES_IN_ANNOTATE" value="true" />
<option name="FORCE_UPDATE" value="false" />
<option name="IGNORE_EXTERNALS" value="false" />
<myIsUseDefaultProxy>false</myIsUseDefaultProxy>
</component>
<component name="TaskManager">
<task active="true" id="Default" summary="Default task">
<created>1359841287134</created>
<updated>1359841287134</updated>
</task>
<servers />
</component>
<component name="ToolWindowManager">
<frame x="-9" y="-9" width="1938" height="1050" extended-state="6" />
<editor active="false" />
<layout>
<window_info id="Changes" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="-1" side_tool="false" content_ui="tabs" />
<window_info id="TODO" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="6" side_tool="false" content_ui="tabs" />
<window_info id="Structure" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.25" sideWeight="0.5" order="1" side_tool="true" content_ui="tabs" />
<window_info id="Project" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" weight="0.24986821" sideWeight="0.9977401" order="0" side_tool="false" content_ui="combo" />
<window_info id="Debug" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.4" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
<window_info id="Favorites" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="-1" side_tool="true" content_ui="tabs" />
<window_info id="Event Log" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="-1" side_tool="true" content_ui="tabs" />
<window_info id="Run" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="2" side_tool="false" content_ui="tabs" />
<window_info id="Version Control" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="-1" side_tool="false" content_ui="tabs" />
<window_info id="Cvs" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.25" sideWeight="0.5" order="4" side_tool="false" content_ui="tabs" />
<window_info id="Message" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="0" side_tool="false" content_ui="tabs" />
<window_info id="Find" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
<window_info id="Ant Build" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.25" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
<window_info id="Commander" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.4" sideWeight="0.5" order="0" side_tool="false" content_ui="tabs" />
<window_info id="Inspection" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.4" sideWeight="0.5" order="5" side_tool="false" content_ui="tabs" />
<window_info id="Hierarchy" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.25" sideWeight="0.5" order="2" side_tool="false" content_ui="combo" />
</layout>
</component>
<component name="VcsContentAnnotationSettings">
<option name="myLimit" value="2678400000" />
</component>
<component name="VcsManagerConfiguration">
<option name="OFFER_MOVE_TO_ANOTHER_CHANGELIST_ON_PARTIAL_COMMIT" value="true" />
<option name="CHECK_CODE_SMELLS_BEFORE_PROJECT_COMMIT" value="true" />
<option name="CHECK_NEW_TODO" value="true" />
<option name="myTodoPanelSettings">
<value>
<are-packages-shown value="false" />
<are-modules-shown value="false" />
<flatten-packages value="false" />
<is-autoscroll-to-source value="false" />
</value>
</option>
<option name="PERFORM_UPDATE_IN_BACKGROUND" value="true" />
<option name="PERFORM_COMMIT_IN_BACKGROUND" value="true" />
<option name="PERFORM_EDIT_IN_BACKGROUND" value="true" />
<option name="PERFORM_CHECKOUT_IN_BACKGROUND" value="true" />
<option name="PERFORM_ADD_REMOVE_IN_BACKGROUND" value="true" />
<option name="PERFORM_ROLLBACK_IN_BACKGROUND" value="false" />
<option name="CHECK_LOCALLY_CHANGED_CONFLICTS_IN_BACKGROUND" value="false" />
<option name="CHANGED_ON_SERVER_INTERVAL" value="60" />
<option name="SHOW_ONLY_CHANGED_IN_SELECTION_DIFF" value="true" />
<option name="CHECK_COMMIT_MESSAGE_SPELLING" value="true" />
<option name="DEFAULT_PATCH_EXTENSION" value="patch" />
<option name="SHORT_DIFF_HORISONTALLY" value="true" />
<option name="SHORT_DIFF_EXTRA_LINES" value="2" />
<option name="SOFT_WRAPS_IN_SHORT_DIFF" value="true" />
<option name="INCLUDE_TEXT_INTO_PATCH" value="false" />
<option name="INCLUDE_TEXT_INTO_SHELF" value="false" />
<option name="SHOW_FILE_HISTORY_DETAILS" value="true" />
<option name="SHOW_VCS_ERROR_NOTIFICATIONS" value="true" />
<option name="FORCE_NON_EMPTY_COMMENT" value="false" />
<option name="CLEAR_INITIAL_COMMIT_MESSAGE" value="false" />
<option name="LAST_COMMIT_MESSAGE" />
<option name="MAKE_NEW_CHANGELIST_ACTIVE" value="false" />
<option name="OPTIMIZE_IMPORTS_BEFORE_PROJECT_COMMIT" value="false" />
<option name="CHECK_FILES_UP_TO_DATE_BEFORE_COMMIT" value="false" />
<option name="REFORMAT_BEFORE_PROJECT_COMMIT" value="false" />
<option name="REFORMAT_BEFORE_FILE_COMMIT" value="false" />
<option name="FILE_HISTORY_DIALOG_COMMENTS_SPLITTER_PROPORTION" value="0.8" />
<option name="FILE_HISTORY_DIALOG_SPLITTER_PROPORTION" value="0.5" />
<option name="ACTIVE_VCS_NAME" />
<option name="UPDATE_GROUP_BY_PACKAGES" value="false" />
<option name="UPDATE_GROUP_BY_CHANGELIST" value="false" />
<option name="SHOW_FILE_HISTORY_AS_TREE" value="false" />
<option name="FILE_HISTORY_SPLITTER_PROPORTION" value="0.6" />
</component>
<component name="XDebuggerManager">
<breakpoint-manager />
</component>
<component name="XSLT-Support.FileAssociations.UIState">
<PATH>
<PATH_ELEMENT>
<option name="myItemId" value="DemoApp" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
</PATH_ELEMENT>
<PATH_ELEMENT>
<option name="myItemId" value="DemoApp" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
</PATH_ELEMENT>
</PATH>
</component>
<component name="editorHistoryManager">
<entry file="file://$PROJECT_DIR$/app.js">
<provider selected="true" editor-type-id="text-editor">
<state line="7" column="29" selection-start="121" selection-end="121" vertical-scroll-proportion="0.0">
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/routes/workouts.js">
<provider selected="true" editor-type-id="text-editor">
<state line="85" column="0" selection-start="2234" selection-end="2234" vertical-scroll-proportion="0.0">
<folding>
<element signature="n#!!doc" expanded="true" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/public/javascripts/scripts.js">
<provider selected="true" editor-type-id="text-editor">
<state line="241" column="36" selection-start="10447" selection-end="10447" vertical-scroll-proportion="0.7928994">
<folding />
</state>
</provider>
</entry>
</component>
<component name="masterDetails">
<states>
<state key="ScopeChooserConfigurable.UI">
<settings>
<splitter-proportions>
<option name="proportions">
<list>
<option value="0.2" />
</list>
</option>
</splitter-proportions>
</settings>
</state>
</states>
</component>
</project>

View File

@@ -1,13 +1,49 @@
$(document).ready(function() {
//makes buttons buttons
$("button").button();
//makes datepickers
$( ".datepicker" ).datepicker();
$('.datepicker').datepicker('setDate', new Date());
//just everything works better when synchro
$.ajax({async:false});
// $.widget( "ui.timespinner", $.ui.spinner, {
// options: {
// // seconds
// step: 60 * 1000,
// // hours
// page: 60,
// culture: "en-US",
// spin : function(event, ui) {
// console.log("SPINN!");
// return false;
// },
// change: function( event, ui ) {
// console.log("change!");
// return false;
// }
// }
// _parse: function( value ) {
// if ( typeof value === "string" ) {
// // already a timestamp
// if ( Number( value ) == value ) {
// return Number( value );
// }
// return +Globalize.parseDate( value );
// }
// return value;
// },
// _format: function( value ) {
// return Globalize.format( new Date(value), "t" );
// }
// });
// $( "#culture" ).change(function() {
// var current = $( "#spinner" ).timespinner( "value" );
// Globalize.culture( $(this).val() );
// $( "#spinner" ).timespinner( "value", current );
// });
// });
jQuery.extend({
getValues: function(url) {
@@ -81,7 +117,7 @@ $(document).ready(function() {
});
$(document).on('click', '.addSet',(function() {
var newElem = $('<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>');
var newElem = $('<li class="set"><label for="element" name="elements[0][splits][0][reps]">Reps</label><input name="elements[0][splits][0][reps]" class="element"><label for="element" name="elements[0][splits][0][weight]">Weight</label><input name="elements[0][splits][0][weight]" class="element"><button type="button" class="delete">Delete Set</button></li>');
$(this).siblings('ul.sets').append(newElem);
$("button").button();
$("ul.sets").sortable({
@@ -108,40 +144,7 @@ $(document).ready(function() {
$("#newworkout").bind('sortupdate', function(event, ui) {
$('#exercises > li').each(function(){
var itemindex= $(this).index();
$(this).find('input, select').each(function() {
var newname = $(this).attr('name').replace(/elements\[[0-9]*\]/,'elements[' + itemindex + ']');
$(this).attr('name', newname);
});
$(this).find('ul li').each(function(){
var itemindex2= $(this).index();
$(this).children('input').each(function(){
var newname2 = $(this).attr('name').replace(/\[splits\]\[[0-9]*\]/,'[splits][' + itemindex2 + ']');
newname2 = newname2.replace(/elements\[[0-9]*\]/,'elements[' + itemindex + ']');
$(this).attr('name', newname2);
});
$(this).children('label').each(function(){
var newname2 = 'Set '+ (itemindex2 + 1 ) + '';
$(this).html(newname2);
});
//Only show delete if more than 1 set
if ( $(this).siblings('.set').length > 0 ) {
$(this).children('.delete').show();
} else {
$(this).children('.delete').hide();
}
});
});
});
@@ -162,7 +165,52 @@ $(document).ready(function() {
$("#Leftpane").delegate("button.newex-link", "click",function () {
var id = $(this).attr('value');
$('div#Rightpane').empty().load(id);
$('div#Rightpane').empty().load(id, function(){
//$( "#timespinner" ).timespinner();
//makes datepickers
$( ".datepicker" ).datepicker();
$('.datepicker').datepicker('setDate', new Date());
$("#newworkout").bind('sortupdate', function(event, ui) {
console.log('sortupdate called');
$('#exercises > li').each(function(){
var itemindex= $(this).index();
$(this).find('input, select').each(function() {
var newname = $(this).attr('name').replace(/elements\[[0-9]*\]/,'elements[' + itemindex + ']');
$(this).attr('name', newname);
});
$(this).find('ul li').each(function(){
var itemindex2= $(this).index();
$(this).children('input').each(function(){
var newname2 = $(this).attr('name').replace(/\[splits\]\[[0-9]*\]/,'[splits][' + itemindex2 + ']');
newname2 = newname2.replace(/elements\[[0-9]*\]/,'elements[' + itemindex + ']');
$(this).attr('name', newname2);
});
// $(this).children('label').each(function(){
// var newname2 = 'Set '+ (itemindex2 + 1 ) + '';
// $(this).html(newname2);
// });
//Only show delete if more than 1 set
if ( $(this).siblings('.set').length > 0 ) {
$(this).children('.delete').show();
} else {
$(this).children('.delete').hide();
}
});
});
});
});
$('div#Leftpane').empty().load("/workouts/filters", function(){
$('span.SVGBODYFilter').empty().load("/images/BlankBody.svg", function(){
//$("button").button();
@@ -193,6 +241,7 @@ $(document).ready(function() {
$("button").button();
$('span.SVGBODY').empty().load("/images/BlankBody.svg", function(){
});
LoadBodyHistory();
});
$('div#Leftpane').empty().load("/users/"+ id + "/sidebar", function(){
$("button").button();
@@ -203,7 +252,9 @@ $(document).ready(function() {
var id = $(this).attr('href');
$('div#Rightpane').empty().load(id , function(){
$("button").button();
LoadBodyHistory();
});
return false;
});
@@ -212,12 +263,13 @@ $(document).ready(function() {
$('div#Rightpane').empty().load(id , function(){
$("button").button();
$( ".buttonset" ).buttonset();
});
});
$(document).on('click', '.addthisExercise',(function() {
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]">Reps</label><input name="elements[0][splits][0][reps]" class="element"><label for="element" name="elements[0][splits][0][weight]">Weight</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('musclearrayMod', $(this).closest('li').data('musclearrayMod'));
$(newElem).appendTo('ul#exercises');

View File

@@ -39,6 +39,9 @@ li.floatleft {
float: left;
}
.workoutentry {
width: 250px;
}
#Leftpane {
display: block;
@@ -52,7 +55,7 @@ li.floatleft {
display: block;
float: left;
overflow: hidden;
width: 80%;
wxxxidth: 80%;
}
#userphoto {

View File

@@ -17,7 +17,7 @@ module.exports = function(app) {
app.get('/admin', loggedIn, isAdmin, function(req, res){
res.render('admin/index', { title: 'Admin' });
});
});
app.get('/admin/users', loggedIn, isAdmin, function(req, res, next){
var page = req.query.page && parseInt(req.query.page, 10) || 0;
@@ -130,9 +130,13 @@ app.get('/admin/exercises', loggedIn, isAdmin, function(req, res, next){
});
app.post('/admin/exercises/:_id', function(req, res, next){
console.log("Upsert data " + JSON.stringify(req.body));
var exercise = req.body;
console.log("Upsert exercise " + JSON.stringify(exercise));
var docid = req.body._id;
console.log("DOCID " + docid);
delete exercise["_id"];
console.log("Upsert document " + JSON.stringify(exercise));
Exercise.findByIdAndUpdate(docid, exercise, {upsert: false}, function(err) {
if (err) {
if (err.code === 11000) {
@@ -150,9 +154,6 @@ app.get('/admin/exercises', loggedIn, isAdmin, function(req, res, next){
}
res.redirect('/admin/exercises');
});
});

View File

@@ -11,6 +11,7 @@ var restrictUserToSelf = require('./middleware/restrict_user_to_self');
var maxUsersPerPage = 5;
var maxWorkoutsPerPage = 5;
var Workout = require('../data/models/workout');
var Moment = require('moment');
module.exports = function(app) {
@@ -78,8 +79,12 @@ module.exports = function(app) {
var workouts = results[1];
var lastPage = (page + 1) * maxWorkoutsPerPage >= count;
workouts.forEach(function (thisworkout) {
console.log("thisworkouts " + JSON.stringify(thisworkout));
thisworkout.PrettyDate = Moment.utc(thisworkout.workoutDate).format("ddd, hA");
console.log("time" + Moment.utc(thisworkout.workoutDate).format("ddd, hA"));
console.log("thisworkouts " + JSON.stringify(thisworkout.PrettyDate));
});
res.render('users/profile', {
title: 'User profile',

View File

@@ -52,6 +52,15 @@ module.exports = function(app) {
var lastPage = (page + 1) * maxWorkoutsPerPage >= count;
console.log("workouts- " + JSON.stringify(workouts));
//console.log("time" + Moment.utc(req.workout.workoutDate).format("ddd, hA"));
//foreach
//json[0].workoutDate
workouts.forEach(function (thisworkout) {
console.log("thisworkouts " + JSON.stringify(thisworkout));
thisworkout.PrettyDate = Moment.utc(thisworkout.workoutDate).format("ddd, hA");
console.log("time" + Moment.utc(thisworkout.workoutDate).format("ddd, hA"));
console.log("thisworkouts " + JSON.stringify(thisworkout.PrettyDate));
});
res.render('workouts/recent', {
recentworkouts: workouts,

View File

@@ -2,6 +2,9 @@ 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://jzaefferer.github.com/jquery-validation/jquery.validate.js')
//script(src='/javascripts/jquery.svg.min.js')
script(src='/javascripts/globalize.js')
script(src='/javascripts/cultures/globalize.culture.en-US.js')
script(src='/javascripts/scripts.js')
//script(src='/javascripts/livevalidation_standalone.compressed.js')

View File

@@ -1,11 +1,11 @@
div#top
- if (session.user)
span
b UserName&nbsp;
span= session.user.name
button.home-link(value= encodeURIComponent(session.user.name)) Home
button.home-link(value= encodeURIComponent(session.user.username)) Home
span
b &nbspUserID&nbsp;
span= session.user._id

View File

@@ -6,11 +6,11 @@ h2= user.name
- if (session.user.username === requested)
h2 Private View
div
button.recent-link(value= encodeURIComponent(session.user.name) ) Recent workouts
button.recent-link(value= encodeURIComponent(session.user.username) ) Recent workouts
div
button.newex-link(value="/workouts/new") Create new workout
div
button.map-link(value="/users/admin/edit") Edit User
button.map-link(value="/users/" + encodeURIComponent(session.user.username) + "/edit") Edit User
div
button Placeholder2
- else

View File

@@ -1,19 +1,18 @@
h1 New workout
h1 New workouty
form#newworkout(method="POST", action="/workouts")
ul
li
label(for="title", value="UserID") UserID
input#title(name="userID", value=session.user._id)
input#title(name="userID", value=session.user.name)
li
label(for="datepicker", value="Date") workoutDate
input.datepicker(name="workoutDate")
li
label(for="timepicker", value="Time") workoutTime
select(name="workoutTime")
option(value='0100') 1 AM
option(value='0130') 1:30 AM
option(value='0200') 2 AM
input#timespinner(name="workoutTime", value="08:30 PM" )
ul#exercises

View File

@@ -3,7 +3,7 @@ h3 Recent workouts:
- recentworkouts.forEach(function(workout) {
li.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.PrettyDate
each element in workout.elements
p(class="workoutelement", data-musclearray=element.exerciseID.musclearray)= element.exerciseID.name
ol

View File

@@ -1,9 +1,19 @@
h1= workout.title
ul
li Time: #{workouttime}
each element in workout.elements
li= element.exerciseID.name
ul
each split in element.splits
li Reps: #{split.reps} Weight: #{split.weight}
li.floatleft
span(class="floatleft workoutentry")
a(class="map-link", href="/workouts/" + encodeURIComponent(workout._id))= workout.PrettyDate
each element in workout.elements
p(class="workoutelement", data-musclearray=element.exerciseID.musclearray)= element.exerciseID.name
ol
each split in element.splits
li Reps: #{split.reps} Weight: #{split.weight}
span(class="floatleft SVGBODY")
//include ../../public/images/BlankBody.svg
span(class="clearright")
form(action="/workouts/" + encodeURIComponent(workout._id), method="POST")
input(name="_method", type="hidden", value="DELETE")
input(type="submit", value="Delete")