Skip to content

Instantly share code, notes, and snippets.

View jbalsas's full-sized avatar

Chema Balsas jbalsas

View GitHub Profile
@jbalsas
jbalsas / aui_html5_shiv_success.html
Last active December 21, 2015 19:09
Example of using Alloy html5 shiv to fix markup for <IE9
<html>
<head>
<title>AUI HTML5 shiv Test</title>
<script src="http://cdn.alloyui.com/2.0.0pr6/aui/aui-min.js"></script>
<script src="http://cdn.alloyui.com/2.0.0pr6/aui-base-html5-shiv/aui-base-html5-shiv.js"></script>
<script type="text/javascript">
YUI.Env.core.push('aui-base-html5-shiv');
@jbalsas
jbalsas / aui_html5_shiv_fail.html
Created August 27, 2013 11:54
Expected usage of aui for HTML5 in IE8
<html>
<head>
<title>AUI HTML5 shiv Test</title>
<script src="http://cdn.alloyui.com/2.0.0pr6/aui/aui-min.js"></script>
<script type="text/javascript">
new YUI().use('aui-base');
</script>
YUI.add('dom-move-xy-test', function(Y) {
Y.DOM._testXY = function() {
var Assert = Y.Assert,
ArrayAssert = Y.ArrayAssert,
tests = {name: 'Y.DOM.xy'},
sel = '.node',
nodes = Y.Selector.query(sel);
function testXY(expected, actual) {
@jbalsas
jbalsas / Editor.js
Created January 9, 2017 08:53
AlloyEditor Metal Component
import Component from 'metal-component';
import Soy from 'metal-soy';
import templates from './Editor.soy';
class Editor extends Component {
attached() {
AlloyEditor.editable(this.divId, {imageScaleResize: 'scale'});
}
};
@jbalsas
jbalsas / LexiconDropdown.js
Created June 22, 2017 16:24
A Lexicon Dropdown using metal-dropdown
import core from 'metal/src/core';
import MetalDropdown from 'metal-dropdown';
import Soy from 'metal-soy';
import templates from './LexiconDropdown.soy';
/**
* Implementation of the Lexicon Dropdown.
* @see {@link http://liferay.github.io/lexicon/content/dropdowns/|Lexicon Definition}
*/