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
$.extend($.fn, { | |
spin: function (opts, callback) { | |
this.each(function() { | |
var $this = $(this), | |
data = $this.data(); | |
if (opts !== false) { | |
data.spinner = new Spinner(opts).spin(this); | |
$this.trigger('spin'); |
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
// Save this as a seperate file & execute it before the second file | |
// It will collect all the links and store them in a file | |
module.exports = { | |
'Collect all the links': function (test) { | |
test.open('http://google.com') | |
// load all the links | |
.execute(function () { | |
var links = document.getElementsByTagName('a'); | |
var data = []; | |
for (var i = 0; i <= links.length; i++) { |
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.exports = { | |
'A lot of screenshots': function (test) { | |
var resolutions = [{width: 1280, height: 1024}, {width: 1024, height: 768}, {width: 800, height: 600}]; | |
var pages = ['http://facebook.com', 'http://twitter.com', 'http://dalekjs.com']; | |
resolutions.forEach(function (res) { | |
pages.forEach(function (page) { | |
test.open(page) | |
.resize(res) |
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
.select2-container .select2-choice { | |
border: 2px solid #dce4ec; | |
font-family: "Lato", sans-serif; | |
font-size: 14px; | |
text-indent: 1px; | |
-webkit-border-radius: 6px; | |
-moz-border-radius: 6px; | |
border-radius: 6px; | |
-webkit-box-shadow: none; | |
-moz-box-shadow: none; |
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
/* | |
# Usage in html template: | |
"xxx | nl2br" | |
<div ng-bind-html=" YourString | nl2br "></div> | |
or: |
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
/* | |
# Usage in html template: | |
"xxx | HTML2TXT" | |
<div ng-bind-html=" YourString | HTML2TXT "></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
.gform_wrapper { | |
ul { | |
@extend .list-unstyled; | |
} | |
li { | |
@extend .form-group; | |
} |
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
angular.module('utils.filters', []) | |
.filter('wrapText', wrapText); | |
function wrapText($sce) { | |
return function (source, needle, wrap, strict) { | |
var regex; | |
if (typeof needle === 'string') { | |
regex = new RegExp(needle, "gi"); | |
} else { |
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'; | |
(function() { | |
var mod = angular.module("App.services", []); | |
//register other services here... | |
/* pubsub - based on https://github.com/phiggins42/bloody-jquery-plugins/blob/master/pubsub.js*/ | |
mod.factory('pubsub', function() { | |
var cache = {}; |
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
.blur { | |
-webkit-filter: blur(4px); | |
filter: url('data:image/svg+xmlutf8,<svg xmlns="http://www.w3.org/2000/svg"><filter id="filter"><feGaussianBlur stdDeviation="4" /></filter></svg>#filter'); | |
filter: blur(4px); | |
} |
OlderNewer