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
# Start tmux shells with right hooks | |
set-option -g default-command "reattach-to-user-namespace -l zsh" | |
# vi keys | |
setw -g mode-keys vi | |
# Setup 'v' to begin selection as in Vim | |
bind-key -t vi-copy v begin-selection | |
bind-key -t vi-copy y copy-pipe "/usr/local/bin/reattach-to-user-namespace pbcopy" |
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
angular.module('stateMock',[]); | |
angular.module('stateMock').service("$state", function($q){ | |
this.expectedTransitions = []; | |
this.transitionTo = function(stateName){ | |
if(this.expectedTransitions.length > 0){ | |
var expectedState = this.expectedTransitions.shift(); | |
if(expectedState !== stateName){ | |
throw Error("Expected transition to state: " + expectedState + " but transitioned to " + stateName ); | |
} | |
}else{ |
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.config(function($stateProvider, BaseSettingsService, PrintSettingsService) { | |
$stateProvider | |
// All app states loaded in index.html | |
.state('app', { | |
abstract: true, | |
templateUrl: 'views/app.html', | |
controller: 'AppCtrl', | |
resolve: { | |
baseSettings: settings: function(BaseSettingsService) { |
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 ModalInstanceCtrl = function ($scope, $modalInstance, heading, messages, size, extraParams) { | |
extraParams = extraParams || {}; | |
$scope.heading = heading; | |
$scope.messages = messages; | |
$scope.size = size; | |
angular.extend($scope, extraParams); | |
$scope.ok = function () { |
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
angular.module('services').factory('ModalService', | |
function ($modal, $timeout) { | |
/** | |
* Provides a thin wrapper around a $modalInstance to help | |
* navigate around double-dismiss cases. | |
* @param the $modalInstance to wrap | |
* @constructor | |
*/ | |
function Modal(instance) { | |
this.instance = instance; |
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
// This modal will automatically close after the short timeout (i.e. 15 secs) | |
var modal = ModalService.open({ | |
templateUrl: 'views/core/purchase/notifications/processing-timeout.html', | |
size: 'medium', | |
timeout: 15000 | |
}); | |
modal.instance.result.then(function() { | |
// No additional actions for dismiss | |
}, function() { | |
$scope.resetApp(); |
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 notification = | |
{ | |
title: 'We\'re sorry - we are unable to read your info!', | |
messages: [ | |
{ text: 'Please see a representative.', className: 'lead' }, | |
{ text: 'This screen will automatically timeout in 30 seconds.' }, | |
{ text: 'Thank you for visiting.' } | |
] | |
} |
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
define([ | |
'angularUiRouter', | |
'core/modules/states/a', | |
'core/modules/states/b', | |
'core/controllers/home', | |
'core/controllers/logs', | |
'core/services/settings' | |
], function() { |
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
define([ | |
'angularUiRouter', | |
'core/controllers/a' | |
], function() { | |
'use strict'; | |
angular.module('core.states.a', [ |
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
define([ | |
'angularMocks', | |
'core/modules/states/app' | |
], function () { | |
'use strict'; | |
describe('core.states.app spec', function () { | |
var $rootScope, $state, $injector, settingsShimService; |
OlderNewer