Skip to content
This repository was archived by the owner on Mar 4, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
80d8325
SUP-280, Add Sorting to My Challenges and SRM tables on Member Dashboard
vikasrohit May 11, 2015
ddb574b
SUP-280, Add Sorting to My Challenges and SRM tables on Member Dashboard
vikasrohit May 14, 2015
bdf17a5
Merge pull request #76 from appirio-tech/vikas-quick-stories
vikasrohit May 19, 2015
06321d6
dev nginx doesn't support always
thabofletcher May 19, 2015
53e5c3c
Merge pull request #77 from appirio-tech/vikas-sup-463-cleanup-dashboard
vikasrohit May 20, 2015
bce872d
SUP-560, Change endpoint base url for member cert service
vikasrohit May 20, 2015
efd096c
Merge pull request #79 from appirio-tech/vikas-sup-560-memberCert
vikasrohit May 20, 2015
29c3438
Merge pull request #80 from appirio-tech/vikas-sup-463-cleanup-dashboard
vikasrohit May 21, 2015
784c5e3
http => https for photo base url
vikasrohit May 21, 2015
1f214bc
Merge branch 'dev' into vikas-sup-280-sorting-challenges-srm
vikasrohit May 21, 2015
a2d8e71
SUP-591, Add client side paging support for mychallenges and srm widgets
vikasrohit May 21, 2015
fa87c34
SUP-280, Add Sorting to My Challenges and SRM tables on Member Dashboard
vikasrohit May 21, 2015
ed45d79
Merge pull request #82 from appirio-tech/vikas-sup-280-sorting-challe…
vikasrohit May 21, 2015
c728e3c
Merge branch 'dev' into vikas-sup-591-clientside-paging-dashboard
vikasrohit May 21, 2015
cda46f7
SUP-591, Add client side paging support for mychallenges and srm widgets
vikasrohit May 21, 2015
30f04cf
Merge pull request #84 from appirio-tech/vikas-sup-591-clientside-pag…
vikasrohit May 21, 2015
8bdef0c
Merge branch 'dev' into vikas-quick-stories
vikasrohit May 22, 2015
6eaa617
SUP-545, Link scorecard on peer review challenge page to new scorecar…
vikasrohit May 22, 2015
239dc13
SUP-244, For PEER review challenge "UML tool" section is still visible
vikasrohit May 22, 2015
bead668
Merge pull request #86 from appirio-tech/vikas-quick-stories
vikasrohit May 22, 2015
29c30f1
Change base url for photo url to https://www.topcoder-dev.com from ht…
vikasrohit May 26, 2015
c7caa94
Merge pull request #87 from appirio-tech/vikas-dashboard-userimage-fix
vikasrohit May 26, 2015
7e5a73d
SUP-545, Link scorecard on peer review challenge page to new scorecar…
vikasrohit May 27, 2015
68b8538
Merge pull request #88 from appirio-tech/vikas-quick-stories
vikasrohit May 27, 2015
23658c2
SUP-627, Clean up badges
vikasrohit May 28, 2015
3eac256
Merge pull request #89 from appirio-tech/vikas-sup-627-cleanup-dashbo…
vikasrohit May 28, 2015
4c2bd92
Merge branch 'master' of https://github.com/appirio-tech/tc-site into…
thabofletcher May 28, 2015
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ module.exports = function(grunt) {
cbURL: grunt.option('cb-url') || 'https://coderbits.com',

blogRSSFeedURL: grunt.option('blog-rss-feed') || 'https://www.topcoder.com/feed/?post_type=blog',
photoLinkBaseURL: grunt.option('photo-link-base') || 'http://community.topcoder.com',
photoLinkBaseURL: grunt.option('photo-link-base') || 'https://www.topcoder.com',

marketingMessageMyDashURL: grunt.option('marketing-message-my-dash-url') || 'https://banners-r-us.herokuapp.com/serve?size=650x150'
};
Expand Down
2 changes: 1 addition & 1 deletion src/conf/build-dev.sh
Original file line number Diff line number Diff line change
@@ -1 +1 @@
grunt --main-url=https://www.topcoder-dev.com --auth-main-url=topcoder-dev.auth0.com --auth-client-id=JFDo7HMkf0q2CkVFHojy3zHWafziprhT --auth-callback-url=https://www.topcoder-dev.com/reg2/callback.action --api-url=https://api.topcoder-dev.com/v2 --lc-url=https://dev-lc1-ext-challenge-service.herokuapp.com --lc-discussion-url=https://dev-lc1-discussion-service.herokuapp.com --lc-user-url=https://dev-lc1-user-service.herokuapp.com --lc-site-url=https://dev-lc1-challenge-app.herokuapp.com --my-filters-url=https://staging-user-settings-service.herokuapp.com --community-url=//community.topcoder-dev.com --photo-link-base=http://community.topcoder-dev.com --review-app-url=software.topcoder-dev.com/review --help-app-url=help.topcoder-dev.com --forums-app-url=forums.topcoder-dev.com --swift-program-id=3445 --blog-rss-feed="https://www.topcoder-dev.com/feed/?post_type=blog" --api3-url=https://api.topcoder-dev.com/v3 --use-cdn=1 --use-min=1
grunt --main-url=https://www.topcoder-dev.com --auth-main-url=topcoder-dev.auth0.com --auth-client-id=JFDo7HMkf0q2CkVFHojy3zHWafziprhT --auth-callback-url=https://www.topcoder-dev.com/reg2/callback.action --api-url=https://api.topcoder-dev.com/v2 --lc-url=https://dev-lc1-ext-challenge-service.herokuapp.com --lc-discussion-url=https://dev-lc1-discussion-service.herokuapp.com --lc-user-url=https://dev-lc1-user-service.herokuapp.com --lc-site-url=https://dev-lc1-challenge-app.herokuapp.com --my-filters-url=https://staging-user-settings-service.herokuapp.com --community-url=//community.topcoder-dev.com --photo-link-base=https://www.topcoder-dev.com --review-app-url=software.topcoder-dev.com/review --help-app-url=help.topcoder-dev.com --forums-app-url=forums.topcoder-dev.com --swift-program-id=3445 --blog-rss-feed="https://www.topcoder-dev.com/feed/?post_type=blog" --api3-url=https://api.topcoder-dev.com/v3 --use-cdn=1 --use-min=1
2 changes: 1 addition & 1 deletion src/conf/build-qa.sh
Original file line number Diff line number Diff line change
@@ -1 +1 @@
grunt --main-url=https://www.topcoder-qa.com --auth-main-url=topcoder-qa.auth0.com --auth-client-id=EVOgWZlCtIFlbehkq02treuRRoJk12UR --auth-callback-url="https://www.topcoder-qa.com/reg2/callback.action" --api-url=https://api.topcoder-qa.com/v2 --lc-url=https://qa-lc1-ext-challenge-service.herokuapp.com --lc-discussion-url=https://qa-lc1-discussion-service.herokuapp.com --lc-user-url=https://qa-lc1-user-service.herokuapp.com --lc-site-url=https://qa-lc1-challenge-app.herokuapp.com --my-filters-url=https://staging-user-settings-service.herokuapp.com --community-url=//community.topcoder-qa.com --photo-link-base=http://community.topcoder-qa.com --review-app-url=software.topcoder-qa.com/review --help-app-url=help.topcoder-qa.com --forums-app-url=forums.topcoder-qa.com --swift-program-id=3445 --blog-rss-feed="https://www.topcoder-qa.com/feed/?post_type=blog" --api3-url=https://api.topcoder-qa.com/v3 --use-cdn=1 --use-min=1
grunt --main-url=https://www.topcoder-qa.com --auth-main-url=topcoder-qa.auth0.com --auth-client-id=EVOgWZlCtIFlbehkq02treuRRoJk12UR --auth-callback-url="https://www.topcoder-qa.com/reg2/callback.action" --api-url=https://api.topcoder-qa.com/v2 --lc-url=https://qa-lc1-ext-challenge-service.herokuapp.com --lc-discussion-url=https://qa-lc1-discussion-service.herokuapp.com --lc-user-url=https://qa-lc1-user-service.herokuapp.com --lc-site-url=https://qa-lc1-challenge-app.herokuapp.com --my-filters-url=https://staging-user-settings-service.herokuapp.com --community-url=//community.topcoder-qa.com --photo-link-base=https://www.topcoder-qa.com --review-app-url=software.topcoder-qa.com/review --help-app-url=help.topcoder-qa.com --forums-app-url=forums.topcoder-qa.com --swift-program-id=3445 --blog-rss-feed="https://www.topcoder-qa.com/feed/?post_type=blog" --api3-url=https://api.topcoder-qa.com/v3 --use-cdn=1 --use-min=1
2 changes: 1 addition & 1 deletion src/conf/tc-nginx.conf
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ server {
}

location ~ ^/fonts/ {
add_header 'Access-Control-Allow-Origin' "$http_origin" always;
add_header 'Access-Control-Allow-Origin' "$http_origin";
add_header 'Access-Control-Allow-Headers' "Content-Type,Accept,Origin,User-Agent,DNT,Cache-Control,X-Mx-ReqToken,Keep-Alive,X-Requested-With,If-Modified-Since" always;
root $root_base/dist;
}
Expand Down
8 changes: 8 additions & 0 deletions src/css/base.css
Original file line number Diff line number Diff line change
Expand Up @@ -215,6 +215,14 @@ sub, sup {
margin-bottom: 5px;
}

.margin-left-1x {
margin-left: 5px;
}

.margin-right-1x {
margin-right: 5px;
}

.margin-vert-1x {
margin-top: 5px;
margin-bottom: 5px;
Expand Down
64 changes: 54 additions & 10 deletions src/css/my-dashboard.css
Original file line number Diff line number Diff line change
Expand Up @@ -223,12 +223,12 @@
}

.member-program-content .panel-body {
/*background: -webkit-linear-gradient(360deg, rgb(15, 16, 31), rgb(101,220,85), rgb(164, 13, 62));*/
height: 377px;
/*margin-left: 50px;*/
overflow: hidden;
background: url('../i/swift_background_hpattern.jpg') repeat-x center center;
color: #eeeeee;
}

.member-program-content img[rel="program-logo"] {
height: 80px;
}

.member-program-content .display-image {
Expand All @@ -241,8 +241,7 @@
}

.member-program-content .description {
/*float: left;
width: 50%;*/
text-align: justify;
}

.member-program-content .signup {
Expand Down Expand Up @@ -296,15 +295,18 @@
}

.member-program-content *[rel="badges"] *[rel="badge-status"] {
padding-left: 20px;
margin-top: 5px;
}
.member-program-content *[rel="badges"] *[rel="badge-status"] *[rel="image"] {
width: 20px;
height: 20px;
}

.member-program-content *[rel="badges"] *[rel="badge-status"].pending {
.member-program-content *[rel="badges"] *[rel="badge-status"].pending *[rel="image"] {
background: url("../i/check-box.png") no-repeat 0 0px;
}

.member-program-content *[rel="badges"] *[rel="badge-status"].completed {
.member-program-content *[rel="badges"] *[rel="badge-status"].completed *[rel="image"] {
background: url("../i/check-box.png") no-repeat 0 -20px;
}

Expand Down Expand Up @@ -360,8 +362,30 @@
background: url("../i/ico-track-design.png") no-repeat center center;
}

.my-challenges th {
.my-challenges table > thead > tr > th {
text-align: center;
white-space: nowrap;
padding-left: 13px;
padding-right: 13px;
}

.my-challenges th .sort,
.my-challenges th .sort-icon-place {
width: 100%;
height: 12px;

}

.my-challenges th[rel="sortable"] {
cursor: pointer;
}

.my-challenges th .sort.asc {
background: #f5f5f5 url("../i/sort-arrows.png") no-repeat center -94px;
}

.my-challenges th .sort.desc {
background: #f5f5f5 url("../i/sort-arrows.png") no-repeat center 6px;
}

.my-challenges table > tbody> tr > td {
Expand All @@ -376,6 +400,7 @@

.my-challenges td[rel="challenge-name"] {
text-align: left;
/*max-width: 320px;*/
}

.my-challenges td[rel="challenge-name"] > a {
Expand Down Expand Up @@ -403,6 +428,25 @@
text-align: center;
}

.upcoming-srms-div th .sort,
.upcoming-srms-div th .sort-icon-place {
width: 100%;
height: 12px;

}

.upcoming-srms-div th[rel="sortable"] {
cursor: pointer;
}

.upcoming-srms-div th .sort.asc {
background: #f5f5f5 url("../i/sort-arrows.png") no-repeat center -94px;
}

.upcoming-srms-div th .sort.desc {
background: #f5f5f5 url("../i/sort-arrows.png") no-repeat center 6px;
}

.upcoming-srms-div table > tbody> tr > td {
padding-top: 20px;
padding-bottom: 20px;
Expand Down
4 changes: 2 additions & 2 deletions src/js/app/challenge-details/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -381,14 +381,14 @@ <h3>Challenge Links:</h3>
Scorecard</a></p>

<p ng-show="!CD.isDesign && CD.challenge.reviewScorecardId"><a
href="http://software.topcoder.com/review/actions/ViewScorecard.do?method=viewScorecard&scid={{CD.challenge.reviewScorecardId}}">Review
href="{{CD.reviewScorecardLink}}" target="_blank">Review
Scorecard</a></p>
</div>

</div>

</li>
<li ng-hide="CD.isDesign" class="slide">
<li ng-hide="CD.isDesign || CD.isPeerReviewed" class="slide">

<div class="umltoolLinks slideBox">
<h3>Get the UML Tool:</h3>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -237,6 +237,7 @@

// Global variable available from ng-page-challenge-details.php
challengeName = challenge.challengeName;
var reviewScorecardId = challenge.reviewScorecardId;
vm.isDesign = (challengeType === 'design');
vm.allowDownloads = challenge.currentPhaseName === 'Registration' || challenge.currentPhaseName === 'Submission';

Expand Down Expand Up @@ -363,9 +364,11 @@
if (vm.challenge.reviewType == 'PEER') {
vm.reviewStyle = 'Peer Review';
vm.reviewStyleTooltip = 'Your peers performs a thorough review based on scorecards.';
vm.reviewScorecardLink = '/reviews/index.html#/scorecard/' + reviewScorecardId;
} else {
vm.reviewStyle = 'Community Review Board';
vm.reviewStyleTooltip = 'Community Review Board performs a thorough review based on scorecards.';
vm.reviewScorecardLink = 'http://software.topcoder.com/review/actions/ViewScorecard.do?method=viewScorecard&scid=' + reviewScorecardId;
}

vm.hasCheckpoints = vm.numCheckpointSubmissions > 0;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<div rel="action" ng-bind="CD.phaseProgram.nextStepAction" class="margin-top-2x"></div>
</div>
<div rel="badge">
<h5 rel="title" class="center-align-text">Recognition Award</h5>
<h5 rel="title" class="center-align-text">Peer Review Award</h5>
<img ng-src="{{CD.phaseProgram.nextBadgeImg}}" alt="{{CD.phaseProgram.nextBadgeTitle}}" />
</div>
<div class="clear"></div>
Expand Down
4 changes: 2 additions & 2 deletions src/js/app/my-dashboard/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -40,15 +40,15 @@
<div class="my-dashboard-container container-fluid" >
<div class="clearfix visible-md-block visible-lg-block"></div>
<div class="row">
<div class="col-xs-12 col-sm-9 col-sm-push-3">
<div class="col-xs-12 col-sm-8 col-sm-push-4 col-md-9 col-md-push-3">
<!--<div class="my-dashboard-widget marketing-message" ng-include="vm.getTemplateURL('marketing-message.html')">
</div>-->
<div class="my-dashboard-widget my-challenges" ng-include="vm.getTemplateURL('my-challenges.html')">
</div>
<div class="my-dashboard-widget srm-gadget" ng-include="vm.getTemplateURL('upcaming-srms.html')">
</div>
</div>
<div class="col-xs-12 col-sm-3 col-sm-pull-9">
<div class="col-xs-12 col-sm-4 col-sm-pull-8 col-md-3 col-md-pull-9">
<div class="my-dashboard-widget member-program" ng-include="vm.getTemplateURL('member-program.html')">
</div>
<div class="my-dashboard-widget helpful-links" ng-include="vm.getTemplateURL('helpful-links.html')">
Expand Down
95 changes: 83 additions & 12 deletions src/js/app/my-dashboard/js/controllers/my-challenges-controller.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
/**
* Copyright (C) 2014 TopCoder Inc., All Rights Reserved.
* @author mdesiderio
* @author vikas.agarwal@appirio.com
* @version 1.0
*
* Controller for the my challenges widget
Expand Down Expand Up @@ -30,8 +31,12 @@
function MyChallengesCtrl($scope, AuthService, ChallengeService) {
var vm = this;
vm.loading = true;
vm.myChallenges = [];
vm.visibleChallenges = [];
vm.pageIndex = 1;
vm.pageSize = 5;
vm.sortColumn = 'submissionEndDate';
vm.sortOrder = 'asc';
vm.totalPages = 1;
vm.totalRecords = vm.totalPages * vm.pageSize;
vm.firstRecordIndex = (vm.pageIndex - 1) * vm.pageSize + 1;
Expand All @@ -42,49 +47,115 @@
vm.changePage = changePage;
vm.isCurrentPage = isCurrentPage;
vm.getCurrentPageClass = getCurrentPageClass;
vm.sort = sort;

// activate controller
if (AuthService.isLoggedIn === true) {
activate();
getChallenges();
} else {
return false;
}

function activate() {
/**
* getChallenges Fetches user's active challenges from the API
*
* @return {Object} promise of API call
*/
function getChallenges() {
initPaging();
var searchRequest = {pageIndex: vm.pageIndex, pageSize: vm.pageSize};
var searchRequest = {
pageIndex: vm.pageIndex,
pageSize: vm.pageSize,
sortColumn: vm.sortColumn,
sortOrder: vm.sortOrder
};
// show loading icon
vm.loading = true;
// remove following if block when API supports paging
if (vm.pageIndex > 1) {
processChallengesResponse(vm.myChallenges);
vm.loading = false;
return;
}
// Fetch my active
return ChallengeService.getMyActiveChallenges(searchRequest)
.then(function(data) {
if (data.pagination) {
vm.totalPages = Math.ceil(data.pagination.total / vm.pageSize);
vm.totalRecords = data.pagination.total;
vm.firstRecordIndex = (vm.pageIndex - 1) * vm.pageSize + 1;
vm.lastRecordIndex = vm.pageIndex * vm.pageSize;
vm.lastRecordIndex = vm.lastRecordIndex > vm.totalRecords ? vm.totalRecords : vm.lastRecordIndex;
}
vm.myChallenges = data;
processChallengesResponse(data);
// stop loading icon
vm.loading = false;

});
}

function processChallengesResponse(data) {
if (data.pagination) {
vm.totalPages = Math.ceil(data.pagination.total / vm.pageSize);
vm.totalRecords = data.pagination.total;
vm.firstRecordIndex = (vm.pageIndex - 1) * vm.pageSize + 1;
vm.lastRecordIndex = vm.pageIndex * vm.pageSize;
vm.lastRecordIndex = vm.lastRecordIndex > vm.totalRecords ? vm.totalRecords : vm.lastRecordIndex;
}
vm.myChallenges = data;
// uncomment following line when API supports paging
// vm.visibleChallenges = data;
// remove following line when API supports paging
vm.visibleChallenges = data.slice(vm.firstRecordIndex - 1, vm.lastRecordIndex);
}

/**
* changePage changes page in the result set
*
* @param {JSON} pageLink page link object
*
* @return {Object} promise of API call with updated pageIndex
*/
function changePage(pageLink) {
vm.pageIndex = pageLink.val;
activate();
getChallenges();
}

/**
* isCurrentPage checks if the give page link is the current page
*
* @param {JSON} pageLink page link object
*
* @return {Boolean} true if the given page is the current page, false otherwise
*/
function isCurrentPage (pageLink) {
return pageLink.val === vm.pageIndex;
}

/**
* getCurrentPageClass Identifies the css class to be used for the given page link
*
* @param {JSON} pageLink page link object
*
* @return {String}
*/
function getCurrentPageClass(pageLink) {
return isCurrentPage(pageLink) ? 'current-page' : '';
}

/**
* sort sorts the results based on the given column
*
* @param {String} column page link object
*
* @return {Object} promise of API call with updated sort params
*/
function sort(column) {
if (vm.sortColumn === column) {
vm.sortOrder = vm.sortOrder === 'desc' ? 'asc' : 'desc';
} else {
vm.sortOrder = 'desc';
}
vm.sortColumn = column;
activate();
}

/**
* initPaging Initializes the paging
*/
function initPaging() {
vm.pageLinks = [
{text: "Prev", val: vm.pageIndex - 1},
Expand Down
Loading