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(angular, $) { | |
var module = angular.module('net.enzey.bindonce', []); | |
var ctrlBind = function($parse) { | |
return function($scope) { | |
$scope.$watch = function(varExpression, func) { | |
// varExpression.exp is passed as the 'old' value | |
// so that angular can remove the expression text from an | |
// element's attributes, such as when using an expression for the class. |
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 in row template for AutoComplete hints. | |
module.directive('grouping', function($timeout) { | |
return { | |
restrict: 'AE', | |
link: function (scope, element, attr) { | |
$timeout(function() { | |
var groupClass = scope.groupClass; | |
var groupLabel = scope.groupLabel; | |
var newElem = angular.element('<div class="' + groupClass + '">' + groupLabel + '</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
<IfModule mod_headers.c> | |
SetEnvIf Origin "http(s)?://(www\.)?(myhost.com|myhos2,net):(80|8080)" AccessControlAllowOrigin=$0$1 | |
Header set Access-Control-Allow-Origin %{AccessControlAllowOrigin}e env=AccessControlAllowOrigin | |
Header set Access-Control-Allow-Credentials true | |
</IfModule> |
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
module.directive("wrapper", function( $compile ) { | |
var priority = 123456; | |
return { | |
restrict: "A", | |
terminal: true, | |
priority: priority, | |
compile: function( $element, $attrs ) { | |
var directiveName = this.name; |
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 escapeRegexpSpecialChars = function(str) { | |
return str.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&"); | |
} | |
var funcModder = function(func, replacements) { | |
var funcStr = func.toString(); | |
Object.keys(replacements).forEach(function(replaceKey) { | |
var escappedReplacement = escapeRegexpSpecialChars(replaceKey); | |
funcStr = funcStr.replace(new RegExp(escappedReplacement, 'g'), replacements[replaceKey]); | |
}); | |
return (function() {eval('var fn = ' + funcStr); return fn;})().toString(); // jshint ignore:line |
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 (angular) { | |
"use strict"; | |
var mod; | |
try { | |
mod = angular.module(!*ANGULAR_PACKAGE*!); | |
} catch(e) {} | |
if (mod) { | |
mod.config(function ($translateProvider) { | |
var i18nValues = !*LOCALE_MAP*!; | |
$translateProvider.translations(!*LOCALE_CODE*!, i18nValues); |
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 setProp :: | |
* | |
* nMask is a bitmask: | |
* flag 0x1: property is enumerable, | |
* flag 0x2: property is configurable, | |
* flag 0x4: property is writable (only applies if no setterFn is passed), | |
* obj is the object on which to define the property; | |
* propName is the name of the property to be defined or modified; | |
* getterVal is the value or getter function to assign; |
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
document.createTreeWalker(root, whatToShow, filter, entityReferenceExpansion); | |
CSS.supports(prop, value) | |
performance.timing |
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 isCommandKey = function (keycode) { | |
if (keycode < 47) { | |
// Most Command Keys | |
return true; | |
} else if (keycode === 91 || keycode === 92 || keycode === 93) { | |
// Windows keys | |
return true; | |
} else if (keycode === 144 || keycode === 145) { | |
// Scroll Lock / Num Lock |
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
[flexy], | |
[flexy=h] { | |
flex-wrap: nowrap; | |
display: flex; | |
> * { | |
flex: 1 1 auto; | |
display: block; |
OlderNewer