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
import Component from 'can-component'; | |
import DefineMap from 'can-define/map/'; | |
import './form.less'; | |
import view from './form.stache'; | |
export const FormViewModel = DefineMap.extend({ | |
lastModified: { | |
type: 'date', | |
value: new Date() | |
}, |
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
steal('can/component', | |
/* ...*/, | |
function(Component) { | |
var timestampComparator = function(ascending) { | |
return function(modelA, modelB) { | |
var timeStampA = modelA.attr('call.state.timestamp-connect'), | |
timeStampB = modelB.attr('call.state.timestamp-connect'), | |
callModel; |
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
st-example { | |
div { | |
background-color: red; | |
} | |
.dragenetered { | |
backround-color: orange !important; | |
} | |
} |
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 WindowState = Construct.extend({ }, { | |
/* | |
Example usage: | |
WindowState.close('preferences'); | |
WindowState.close('debug', true); | |
WindowState.close('notification', true, function(win) { |
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 WindowState = Construct.extend({ }, { | |
close: function(win, force, predicate) { | |
if(this[win]) { | |
if(can.isArray(this[win])) { | |
// if no predicate is defined, _.filter will return the entire list | |
_.filter(this[win], predicate).forEach(this.proxy(function(item) { | |
var index = this[win].indexOf(item); | |
item.close(true); | |
this[win].splice(index, 1); |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta name="description" content="CanJS jQuery"> | |
<meta charset="utf-8"> | |
<!-- | |
Created using JS Bin | |
http://jsbin.com | |
Copyright (c) 2015 by anonymous (http://jsbin.com/riqekazexa/1/edit) |
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
/*! | |
* CanJS - 2.1.3 | |
* http://canjs.us/ | |
* Copyright (c) 2014 Bitovi | |
* Mon, 25 Aug 2014 21:51:38 GMT | |
* Licensed MIT | |
* Includes: can/map/define | |
* Download from: http://canjs.com | |
*/ | |
(function(undefined) { |
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 Example = Map.extend({ }, { | |
define: { | |
name: { | |
value: 'Nailed it' | |
} | |
} | |
}); | |
var NestedMap = Map.extend({ }, { | |
define: { |
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 logs = ['log', 'debug', 'info', 'warn', 'error']; | |
logs.forEach(function(log) { | |
var func = console[log]; | |
console[log] = function() { | |
var str = JSON.stringify(arguments); | |
// Run default version of console function | |
func.apply(console, arguments); | |
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
* { | |
font: 13px/16px "Helvetica Neue", Arial, Helvetica, Geneva, sans-serif; | |
color: #333; | |
} | |
table { | |
margin: 5px auto; | |
margin-bottom: 15px; | |
width: 95%; | |
} | |
td { |
NewerOlder