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
Private LastActiveControl As Control = Me ' initialize on form creation | |
Protected Overrides Sub UpdateDefaultButton() | |
' Just added a IsNot condition to clarity | |
If (LastActiveControl Is txtNumberOfDrinks) AndAlso | |
((ActiveControl Is btnClear) OrElse (ActiveControl Is btnExit)) Then | |
' Only problem is that it tries to validate twice upon tabbing away (only once on click) | |
ElseIf (LastActiveControl Is txtNumberOfDrinks) AndAlso | |
((ActiveControl IsNot btnClear) OrElse (ActiveControl IsNot btnExit)) Then | |
validateForm() |
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
///////////////////////////////////////////////////////////////////////////// | |
// Is Element In View? | |
// If object's position cannot be determined, no event will fire. | |
// Define callback argument as a function or object with in and out params | |
// as listeners for each event. | |
///////////////////////////////////////////////////////////////////////////// | |
HTMLElement.prototype.inView = function(cb){ | |
var err; | |
// Get Window Atribs | |
var getViewFrame = function(){ return {w: window.innerWidth, h: window.innerHeight, y: window.scrollY }; }; |
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 id="output"> | |
</div> |
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 app = angular.module('app', ['backand']) | |
.controller('appCtrl', function($scope, $http, Backand) { | |
$scope.message = "Loaded"; | |
$scope.appCtrl = $scope; | |
var self = this; | |
self.getUsers = function() { | |
$http({ | |
method: 'GET', |
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($){ | |
$.fn.animateRotate = function(angle, duration, easing, complete) { | |
return this.each(function() { | |
var $elem = $(this); | |
$({ | |
deg: 0 | |
}).animate({ | |
deg: angle | |
}, { |
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
.factory('$authservice', ['$window', '$localstorage', '$state', function($window, $localstorage, $state) { | |
// Access local storage for existing user info | |
var SHIFT = $localstorage.getObject("Shift") | |
// Does session exist? | |
if (SHIFT && SHIFT.session.token) { | |
console.log("$authservice: Existing Session found: ", [SHIFT]) | |
} else { | |
console.log("$authservice: No session found.") | |
SHIFT = { | |
session: { |
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
// Ionic Starter App | |
// angular.module is a global place for creating, registering and retrieving Angular modules | |
// 'starter' is the name of this angular module example (also set in a <body> attribute in index.html) | |
// the 2nd parameter is an array of 'requires' | |
// 'starter.controllers' is found in controllers.js | |
angular.module('starter', ['ionic', 'starter.controllers', 'starter.services', 'ngCordova']) | |
.run(function($ionicPlatform, $rootScope, $cordovaNetwork, $state, $authservice) { | |
$ionicPlatform.ready(function() { |
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
///////////////////////////////////////////////////////////////////////////// | |
///////////////////////////////////////////////////////////////////////////// | |
// Browserify Shims | |
///////////////////////////////////////////////////////////////////////////// | |
///////////////////////////////////////////////////////////////////////////// | |
// var paths = require('./paths'); // Require Your Paths.JS file | |
module.exports = { | |
angular: { |
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
define(function (require) { | |
// Function Executes with window[your-module.namespace] | |
// && selector of div to hold alerts eg: <div id='alert'></div> | |
// || <div class="alert"></div> | |
return (function(m, selector) { | |
// Define The Module To Be Instantiated | |
var that; | |
var AlertSystem = that = new m.constructor({ | |
name: 'AlertSystem', | |
state: { |
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(m, eId) { | |
// Define The Module To Be Instantiated | |
var AlertSystem = new m.constructor({ | |
name: 'AlertSystem', | |
state: { | |
current: "Dom Module Initialized", | |
last: m.getModuleProperty('state').prototype.memory | |
}, | |
init: this.init | |
}); |