Skip to content

Instantly share code, notes, and snippets.

View ryanschuhler's full-sized avatar

Ryan Schuhler ryanschuhler

View GitHub Profile
var toggleAction = function (event) {
body.toggleClass('nav-show');
html.toggleClass('no-scroll');
navContent.all('ul ul .selected').each(
function (e) {
e.ancestor('ul').removeClass('aui-helper-hidden');
e.ancestor('.selected').one('.has-child-marker').addClass('child-show');
}
#set ($portlet_bean_locator = $portal.getClass().forName('com.liferay.portal.kernel.bean.PortletBeanLocatorUtil'))
#set ($hs_contact_local_service = $portlet_bean_locator.locate("hubspot-portlet", "com.liferay.hubspot.service.HSContactLocalService.velocity"))
#set ($hsutk = "$request.attributes.OSB_HUBSPOT_UTK")
#set ($hs_contact = $hs_contact_local_service.fetchHSContactByUserToken($hsutk))
#set ($hs_contact_object = $hs_contact.getHSContactJSONObject().getJSONObject("properties"))
#set ($hs_form_local_service = $portlet_bean_locator.locate("hubspot-portlet", "com.liferay.hubspot.service.HSFormLocalService.velocity"))
@ryanschuhler
ryanschuhler / osb_height_equalizer.js
Last active November 16, 2015 18:36
osb_height_equalizer.js
AUI.add(
'osb-height-equalizer',
function(A) {
var OSBHeightEqualizer = A.Component.create(
{
ATTRS: {
container: {
value: '.equal-height-container'
},
<!DOCTYPE html>
#parse ($init)
<html class="#language ("lang.dir")" dir="#language ("lang.dir")" lang="$w3c_language_id">
<head>
<title>$the_title - $company_name</title>
<meta content="minimum-scale=1.0, width=device-width" name="viewport" />
@import "compass";
@import "mixins";
$primary-color: #478ECC;
$secondary-color: #E7E8E9;
.primary-background-color {
background: $primary-color;
}
@ryanschuhler
ryanschuhler / gist:8223383
Last active January 2, 2016 00:29
class-toggle-carousel
AUI().use(
'anim',
'transition',
function(A) {
A.all('.animate-scroll').on(
'click',
function(event) {
event.preventDefault();
var node = event.currentTarget;
@ryanschuhler
ryanschuhler / translations.jsp
Created November 23, 2013 02:15
An asset publisher view for translations
<%--
/**
* Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
*
* This library is free software; you can redistribute it and/or modify it under
* the terms of the GNU Lesser General Public License as published by the Free
* Software Foundation; either version 2.1 of the License, or (at your option)
* any later version.
*
* This library is distributed in the hope that it will be useful, but WITHOUT
#!/bin/zsh
# uses imagemagick to stich together all images in a folder and
# then writes a css file with the correct offsets along with a
# test html page for verification that its all good
# Original script is from jaymz
# https://gist.github.com/jaymzcd/342399
#
# Modifications :
@ryanschuhler
ryanschuhler / animate-scroll.js
Last active December 21, 2015 04:49
Easy scroll navigation
AUI().use(
'anim',
function(A) {
A.all('.animate-scroll').on(
'click',
function(event) {
event.preventDefault();
var section = A.one(event.currentTarget.get('hash'));
var scrollTo = section.getY();
@ryanschuhler
ryanschuhler / gist:6242014
Created August 15, 2013 15:57
Skinny Web implementation
<script>
var searchUrl = "http://www.liferay.com/skinny-web/api/jsonws/skinny/get-skinny-journal-articles?inst=welcomeContent&companyId=1&groupName=Guest&journalStructureId=27308142&locale=en_US%22";
var head = document.getElementsByTagName('head')[0];
var script = document.createElement('script');
script.type = 'text/javascript';
script.src = searchUrl;
head.appendChild(script);
var A = AUI();
A.on(