This file contains 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("should parse cpl character printing command and render correctly in canvas", function(done) { | |
//fs is shimmed by browserify | |
var buff = fs.readFileSync(__dirname + '/../fixtures/helloworld.png'); | |
/* | |
node-canvas impl exports Canvas.Image constructor function | |
browserify canvas shim does not support Canvas.Image | |
*/ | |
var expected = new Canvas.Image(); |
This file contains 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
describe('services', function() { | |
beforeEach(module('ibeApp')); | |
var $injector; | |
var SessionService; | |
var mockLocalStorage; | |
beforeEach(function($provide) { | |
mockLocalStorage = { | |
setItem: function(key, value){}, |
This file contains 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
//Load module and configure providers | |
beforeEach(module("factfind", function($provide) { | |
$provide.value("customer", { | |
getPersonalDetails: sinon.stub(), | |
getRetirementDetails: sinon.stub(), | |
setPersonalDetails: sinon.spy(), | |
setRetirementDetails: sinon.spy() | |
}); | |
$provide.value("engine", {}) |
This file contains 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 sf-array="form" class="schema-form-array {{form.htmlClass}}" | |
ng-model="$$value$$" ng-model-options="form.ngModelOptions"> | |
<h3 ng-show="form.title && form.notitle !== true">{{ form.title }}</h3> | |
<div ng-show="form.description" ng-bind-html="form.description"></div> | |
<accordion ng-model="modelArray" ww-collection="{{form}}" ng-form="{{form.key.slice(-1)[0]}}"> | |
<accordion-group heading="{{group.title}}" ng-form="{{form.key.slice(-1)[0]}}_{{$index}}" | |
ng-repeat="item in modelArray track by $index" ww-collection-item > |
This file contains 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
function validateOnCollapse(){ | |
var accordionScope = accordionCtrl.groups[scope.$index]; | |
accordionScope.$watch('isOpen', function(newVal, oldVal) { | |
if(newVal === false){ //closing | |
$rootScope.$broadcast('schemaFormValidate', obj); | |
} | |
if(accordionForm.$invalid){ | |
accordionScope.isOpen = true; |
This file contains 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
<QuestionGroup key="parent"> | |
<CollapsablePanelContainer> | |
<Panel> | |
<PanelHeaderLayout> | |
<PanelHeader /> | |
</PanelHeaderLayout> | |
<PanelContentLayout> | |
<Question key="child" /> // should render out as parent.child | |
</PanelContentLayout> | |
</Panel> |
This file contains 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
function LibraryCtrl($scope, LibraryService, artists) { //assumming you're favoring $scope over this | |
$scope.artists = artists || []; //defensive | |
$scope.albums = []; | |
$scope.selectedArtist = null; | |
activate(); //I like to put my activation logic in a function, and call it | |
function activate() { | |
$scope.selectedArtist = LibraryService.getSelectedArtist(); | |
This file contains 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
<Accordion> | |
<PanelHeader>Your Risk Illustration</PanelHeader> | |
<PanelContent> | |
<Illustration id="risk" /> { /* Dynamically load widget from CDN. Different "house view" loads different widget */ } | |
</PanelContent> | |
</Accordion> |
This file contains 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 RadioGroupControl=exports.RadioGroupControl=function(props){ |
This file contains 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
'use strict'; | |
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); | |
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } | |
var Exemplar = function () { | |
function Exemplar() { | |
_classCallCheck(this, Exemplar); | |
} |
OlderNewer