Changeset 778d53d in OpenWorkouts-current for bin


Ignore:
Timestamp:
Mar 5, 2019, 11:45:32 PM (5 years ago)
Author:
Borja Lopez <borja@…>
Branches:
current
Children:
aa6dcaf
Parents:
35953eb
Message:

(#7) Show per-sport stats in the profile page:

  • Show a dropdown list of sports for which the user has activities. By default we choose the sport with most activities.
  • Show a dropdown list of years for which the user has activities. By default we show stats for the current year. If the user picks up a different year, we show the totals (distance, time, elevation, number of workouts) for that year.
  • Show the totals of all time for the chosen sport
File:
1 edited

Legend:

Unmodified
Added
Removed
  • bin/js_deps

    r35953eb r778d53d  
    251251}
    252252
     253jquery_dropdown() {
     254    # We need version "master", as the latest release does not work properly
     255    NAME="jquery-dropdown"
     256    VERSION=master
     257    URL=https://github.com/soundasleep/${NAME}/archive/${VERSION}.tar.gz
     258    check_cache ${NAME} ${VERSION}
     259    in_cache=$?
     260    if [ ${in_cache} -eq 0 -a ${REINSTALL} -eq 1 ]; then
     261        echo "${NAME}-${VERSION} $ALREADY_INSTALLED"
     262    else
     263        echo "> Installing ${NAME} ${VERSION}"
     264        if [ -d ${COMPONENTS}/${NAME} ]; then
     265            # Clean up, delete previous install before installing
     266            rm -r ${COMPONENTS}/${NAME}
     267        fi
     268        mkdir ${COMPONENTS}/${NAME}
     269        cd ${TMP}
     270        ${GET} ${URL}
     271        ${TAR} ${VERSION}.tar.gz
     272        cd ${CURRENT}
     273        mv ${TMP}/${NAME}-${VERSION}/jquery.dropdown.{css,js} ${COMPONENTS}/${NAME}
     274        echo "${NAME}-${VERSION}" >> ${CACHE}
     275        echo "< Installed ${NAME} ${VERSION}"
     276    fi
     277}
     278
    253279
    254280echo "Installing JS dependencies in ${COMPONENTS}"
     
    261287pickadate
    262288d3
     289jquery_dropdown
    263290
    264291
Note: See TracChangeset for help on using the changeset viewer.