Skip to content
This repository has been archived by the owner on May 4, 2022. It is now read-only.

Commit

Permalink
Merge pull request #444 from UW-Madison-DoIT/wiscardWidget
Browse files Browse the repository at this point in the history
Wiscard widget
  • Loading branch information
vertein committed Apr 4, 2016
2 parents 790ed8f + 1c3c749 commit 6d0e5ec
Show file tree
Hide file tree
Showing 4 changed files with 192 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -53,3 +53,7 @@ wiscedusearch.uri=http://ajax.googleapis.com/ajax/services/search/web
uwrfsearch.uri=https://www.googleapis.com/customsearch/v1element

rss2json.uri=https://rss2json.com/api.json

#wiscard feed
wiscard.uri=http://localhost:8080/web/staticFeeds/wiscard.json

100 changes: 100 additions & 0 deletions angularjs-portal-home/src/main/webapp/staticFeeds/wiscard.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
{
"code": 1,
"status": 200,
"data": [
{
"account": "13",
"name": "Print Account",
"balance": 0,
"credit": 0,
"active": 1
},
{
"account": "103",
"name": "Wiscard Account",
"balance": 22,
"credit": 0,
"active": 1
},
{
"account": 11,
"name": "Campus Cash",
"active": 0
},
{
"account": 12,
"name": "2012-13 Housing Food",
"active": 0
},
{
"account": 14,
"name": "Union Copy",
"active": 0
},
{
"account": 15,
"name": "Red Union Guest",
"active": 0
},
{
"account": 16,
"name": "UW Colleges Meal Plan",
"active": 0
},
{
"account": 17,
"name": "Housing Conference Laundry",
"active": 0
},
{
"account": 18,
"name": "Housing Guest Card",
"active": 0
},
{
"account": 19,
"name": "Housing Res Life-Admin",
"active": 0
},
{
"account": 20,
"name": "Housing Laundry Maintenance",
"active": 0
},
{
"account": 21,
"name": "Housing Conference Food",
"active": 0
},
{
"account": 23,
"name": "Union Test Account",
"active": 0
},
{
"account": 91,
"name": "Union Gift Card",
"active": 0
},
{
"account": 111,
"name": "Blue Union Guest",
"active": 0
},
{
"account": 1,
"name": "Union Meal",
"active": 0
},
{
"account": 81,
"name": "2013-14 Housing Food",
"active": 0
},
{
"account": 102,
"name": "Babcock Gift Card",
"active": 0
}
]
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,49 @@
{
"portlets": [
{
"canAdd": true,
"layoutObject": {
"nodeId": "-1",
"title": "Wiscard Balance",
"description": "See your wiscard balance, make a deposit, or request money.",
"url": "https://online.wiscard.wisc.edu/login.php?cid=120",
"iconUrl": null,
"faIcon": "fa-credit-card-alt",
"fname": "wiscard-balance",
"target": "_blank",
"widgetURL": "/web/api/wiscard",
"widgetType": "generic",
"widgetTemplate": "\n <div class='widget-body'>\n <loading-gif data-object='content' data-empty='isEmpty'></loading-gif>\n <div ng-if=\"content && (content.data | filter: account=103).length > 0\" class='center' style='padding:20px;'>\n <span style='font-size: 35px; color:#b70101'> {{ (content.data | filter: account=103)[0].balance | currency:\"$\":2}}</span>\n </div>\n <div ng-if='isEmpty' style='padding: 20px; font-size: 14px;'>\n <i class='fa fa-exclamation-triangle fa-3x pull-left' style='color: #b70101;'></i>\n <span>Balance unavailable, please try again later</span>\n </div>\n <div class=\"center\">\n <i class=\"fa fa-credit-card-alt fa-5x\" style=\"color: #cbcbcb;\"></i>\n </div>\n </div>\n <a class='btn btn-default launch-app-button' href='https://online.wiscard.wisc.edu/login.php?cid=120'>Manage my Wiscard</a>\n ",
"widgetConfig": {
"evalString": "!$scope.content.data || ($scope.content.data | filter: account=103).length === 0"
},
"staticContent": "\n \n <a href=\"https://online.wiscard.wisc.edu/login.php?cid=120\">Access your Wiscard account.</a>\n \n ",
"pithyStaticContent": null,
"altMaxUrl": true,
"renderOnWeb": false
},
"fname": "wiscard-balance",
"lifecycleState": "PUBLISHED",
"rating": 0,
"relatedPortlets": [],
"renderUrl": "https://online.wiscard.wisc.edu/login.php?cid=120",
"portletWebAppName": "/SimpleContentPortlet",
"faIcon": "fa-credit-card-alt",
"maxUrl": "https://online.wiscard.wisc.edu/login.php?cid=120",
"portletReleaseNotes": {},
"shortUrl": null,
"userRated": 0,
"marketplaceScreenshots": [],
"title": "Wiscard Balance",
"portletName": "cms",
"categories": [],
"keywords": [],
"description": "See your wiscard balance, make a deposit, or request money.",
"name": "Wiscard Balance",
"id": "5996",
"type": "Portlet",
"target": "_blank"
},
{
"canAdd": false,
"layoutObject": {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,49 @@
{
"portlets": [
{
"canAdd": true,
"layoutObject": {
"nodeId": "-1",
"title": "Wiscard Balance",
"description": "See your wiscard balance, make a deposit, or request money.",
"url": "https://online.wiscard.wisc.edu/login.php?cid=120",
"iconUrl": null,
"faIcon": "fa-credit-card-alt",
"fname": "wiscard-balance",
"target": "_blank",
"widgetURL": "/web/api/wiscard",
"widgetType": "generic",
"widgetTemplate": "\n <div class='widget-body'>\n <loading-gif data-object='content' data-empty='isEmpty'></loading-gif>\n <div ng-if=\"content && (content.data | filter: account=103).length > 0\" class='center' style='padding:20px;'>\n <span style='font-size: 35px; color:#b70101'> {{ (content.data | filter: account=103)[0].balance | currency:\"$\":2}}</span>\n </div>\n <div ng-if='isEmpty' style='padding: 20px; font-size: 14px;'>\n <i class='fa fa-exclamation-triangle fa-3x pull-left' style='color: #b70101;'></i>\n <span>Balance unavailable, please try again later</span>\n </div>\n <div class=\"center\">\n <i class=\"fa fa-credit-card-alt fa-5x\" style=\"color: #cbcbcb;\"></i>\n </div>\n </div>\n <a class='btn btn-default launch-app-button' href='https://online.wiscard.wisc.edu/login.php?cid=120'>Manage my Wiscard</a>\n ",
"widgetConfig": {
"evalString": "!$scope.content.data || ($scope.content.data | filter: account=103).length === 0"
},
"staticContent": "\n \n <a href=\"https://online.wiscard.wisc.edu/login.php?cid=120\">Access your Wiscard account.</a>\n \n ",
"pithyStaticContent": null,
"altMaxUrl": true,
"renderOnWeb": false
},
"fname": "wiscard-balance",
"lifecycleState": "PUBLISHED",
"rating": 0,
"relatedPortlets": [],
"renderUrl": "https://online.wiscard.wisc.edu/login.php?cid=120",
"portletWebAppName": "/SimpleContentPortlet",
"faIcon": "fa-credit-card-alt",
"maxUrl": "https://online.wiscard.wisc.edu/login.php?cid=120",
"portletReleaseNotes": {},
"shortUrl": null,
"userRated": 0,
"marketplaceScreenshots": [],
"title": "Wiscard Balance",
"portletName": "cms",
"categories": [],
"keywords": [],
"description": "See your wiscard balance, make a deposit, or request money.",
"name": "Wiscard Balance",
"id": "5996",
"type": "Portlet",
"target": "_blank"
},
{
"canAdd": true,
"layoutObject": {
Expand Down

0 comments on commit 6d0e5ec

Please sign in to comment.