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
function printI(url, msg, ascale) { | |
var scale = ascale || 0.5; | |
var img = new Image(); | |
img.onload = function imageOnload() { | |
var h = this.height * scale; | |
var w = this.width * scale; | |
console.log('%c+', 'color:transparent;font-size:0.1px;background:url('+url+');background-size:'+w+'px '+h+'px;padding:'+h+'px '+w+'px 0 0;'); | |
console.log(msg || ''); | |
}; | |
img.src = url; |
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
(function() { | |
function load() { | |
var scripts = document.getElementsByClassName("js-defer"); | |
var i; | |
for (i = 0; i < scripts.length; i++) { | |
var scriptElement = document.createElement("script"); | |
scriptElement.src =scripts[i].href; | |
document.body.appendChild(scriptElement); | |
} | |
} |
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
(function(window, document) { | |
function bindReady(handler) { | |
var called = false | |
function ready() { | |
if (called) return | |
called = true | |
handler() | |
} |
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
<link rel="import" href="../core-icon-button/core-icon-button.html"> | |
<link rel="import" href="../core-toolbar/core-toolbar.html"> | |
<polymer-element name="my-element"> | |
<template> | |
<style> | |
:host { | |
position: absolute; | |
width: 100%; |
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
/*global define:false */ | |
define([ | |
'underscore', | |
'jquery', | |
'backbone', | |
'marionette', | |
'./templates/TableViewTmpl', | |
'./templates/TableRowTmpl', | |
'vendor/downloadify/swfobject', | |
'vendor/downloadify/downloadify', |
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 bootstrapDatepicker = function($cell) { | |
var $minDateField = $('<div class="input-prepend minDateFilterField"><span class="add-on"><i data-time-icon="icon-chevron-right" data-date-icon="icon-chevron-right"></i></span><input class="forceHide" type="text"></div>').appendTo($cell); | |
$minDateField.datetimepicker({ | |
pickDate: true, | |
pickTime: false, | |
format : "dd-MM-yyyy" | |
}); | |
var minDatePicker = $minDateField.find('input'); | |
var $input = $('<input type="text" class="dateFilterField"/>').appendTo($cell); |
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
/*global require*/ | |
'use strict'; | |
require.config({ | |
paths: { | |
'mixpanel' : '//cdn.mxpnl.com/libs/mixpanel-2.2.min', | |
}, | |
shim: { | |
mixpanel: { |
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([ | |
'underscore', | |
'backbone', | |
'backbone-forms', | |
'form-template', | |
'select2' | |
], function (_, Backbone) { | |
return Backbone.Form.editors.Select.extend({ | |
attributes : {multiple : 'multiple'}, |
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 Model = Backbone.Model.extend({ | |
/** | |
* Override main attribute getter to handle mutators. | |
* Looks for an object on the model called 'mutators', keyed by key name, | |
* with values of either the getter function or an object like: | |
* { get: function() {}, set: function() {} } | |
*/ | |
get: function(attr) { | |
var val, |