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
$(window).bind('hashchange', function(){ | |
if (window.location.hash.match('users')) { | |
setTimeout(function() { | |
console.log('Showing Contact QR-Code...'); | |
var data = ""; |
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
alert('lol'); |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="UTF-8"> | |
<title>Test</title> | |
<script type="text/javascript" src="http://192.168.3.2/assets/javascript/app.js"></script> | |
<script type="text/javascript" src="./monkeypatch.js"></script> | |
</head> | |
<body> |
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
class SelectableList extends React.Component { | |
onClickItem(event, index) { | |
this.state.setState({ | |
selected: [ | |
...this.state.selected, | |
index | |
] | |
}); | |
} |
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
class CartItem extends React.Component { | |
onClickRemove () { | |
// Go to your store and remove item | |
} | |
render() { | |
const { item } = this.props; | |
const isPremium = item.premium ? 'premium' : ''; | |
return ( |
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
.selectable-list { | |
border: 1px solid #ddd; | |
} | |
.selectable-list li { | |
padding-bottom: 10px; /* margin to padding ;) */ | |
} | |
.selectable-list .selected { | |
background-color: blue; | |
} |
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
<ul> | |
<li> | |
<div> | |
<header>Item 1</header> | |
<p>Lorem ipsum dolor sit amet, consectetur adipiscing.</p> | |
<button>Remove from cart</button> | |
</div> | |
</li> | |
<li class="selected"> <!-- More clear responsibilities (SelectList) --> | |
<div class="premium"> <!-- More clear responsibilities (CartItem) --> |
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
class CartList extends React.Component { | |
onClickItem(event, index) { | |
this.state.setState({ | |
selected: [ | |
...this.state.selected, | |
index | |
] | |
}); | |
} |
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
<ul class="cart"> | |
<li> | |
<header>Item 1</header> | |
<p>Lorem ipsum dolor sit amet, consectetur adipiscing.</p> | |
<button>Remove from cart</button> | |
</li> | |
<li class="premium selected"> | |
<header>Item 2</header> | |
<p>Fusce vel neque sit amet felis fermentum cursus vitae.</p> | |
<button>Remove from cart</button> |
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
.cart { | |
border: 1px solid #ddd; | |
} | |
.cart li { | |
margin-bottom: 10px; | |
border: 1px solid red; | |
} | |
.cart li.selected { |
OlderNewer