This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Vue from 'vue' | |
export default class extends Vue { | |
constructor() { | |
super({ | |
data() { | |
return { | |
scrollY: 0 | |
} | |
}, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Recursively flattens arbitrarily nested arrays. | |
* | |
* @param {Array} array The array to flatten. | |
* @param {Array} [result=[]] The initial result value. | |
* @returns {Array} Returns the new flattened array. | |
*/ | |
function flattenArray(array, result = []) { | |
if (!Array.isArray(array)) throw new TypeError('Called on non-array.'); | |
array.forEach(item => { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!doctype html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<title></title> | |
<meta name="viewport" content="width=device-width, initial-scale=1"> | |
<link rel="stylesheet" href="/bower_components/rrssb/css/rrssb.css" /> | |
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.6/css/bootstrap.css"> | |
</head> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var _pageConfirm = { | |
include: 'partials/buyer/rfp-detail/send-confirmation.html', | |
header: 'Confirmation', | |
primary_button: { | |
label: "Done", | |
css_classes: "btn-success" | |
}, | |
do_load: function() { | |
return (($scope.recipientsToNotify.length > 0) || ($scope.recipientsToUpdate.length > 0)); | |
}, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
it('can export budget level', inject(function(DownloadGeneratedFile, TestToolbox) { | |
var token = 123, | |
downloadUrl = DownloadGeneratedFile.budgetLevel(PROPOSAL_ID, BUDGET_1_ID).url; | |
scope.start_loader = angular.noop; | |
$httpBackend.expectGET(downloadUrl).respond({status: 'pending', token: token}); | |
scope.downloadBudgetLevel(BUDGET_1_ID); | |
TestToolbox.httpBackendFlush($httpBackend); | |
// TODO: Should add more expectations when the DownloadManager is reworked. | |
// expect(_downloader.downloaded.url).toEqualData(); | |
// expect(_mixpanel.analytics.track.eventName).toEqualData('Proposal: download budget level'); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Vendor dependencies */ | |
@import 'flatui/config'; | |
@import "flatui/flat-ui"; | |
/* Authored dependencies */ | |
@import 'config'; // overrides flat ui config | |
@import "mixins"; | |
/* Patterns / components */ | |
@import 'base'; // base styling (elements, no classes/components) -- also overrides flat ui and deprecates erfpFlatUi.less |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// <div ng-controller="MyCtrl"></div> | |
function MyCtrl ($scope) { | |
// my init code here | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
app.factory('notification', function ($document, $templateCache, $compile) { | |
return { | |
show: function (message) { | |
// Compile template. | |
var template = $templateCache.get('template/notification.html'); | |
console.log('tpl', $compile(template)); // This breaks | |
// Append notifications to DOM element. | |
// $document.find('#notifications').append(el); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$rootScope.$on('auction:finished', function (event, auction) { | |
// If current user won, show win modal. | |
if (auction.winner.facebookId !== $scope.user.facebookId) { | |
return; | |
} | |
$scope.wonAuction = auction; | |
// If playing for tokens, update user tokens. | |
if (auction.bidType !== $scope.AUCTION_TYPE_TOKENS) { | |
return; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- wonAuction.bidType = 'token'; --> | |
<!-- AUCTION_TYPE_CREDITS = 'credit'; --> | |
<div class="win-popup" ng-show="wonAuction" ng-switch="wonAuction.bidType == AUCTION_TYPE_CREDITS"> | |
<div class="title"> | |
<img src="{% static 'images/tokens-won-title.png' %}" ng-switch-when="false"> | |
<img src="{% static 'images/item-won-title.png' %}" ng-switch-when="true"> | |
</div> | |
</div> |
NewerOlder