Skip to content

Instantly share code, notes, and snippets.

View farmerbradllc's full-sized avatar

Bradley Wood farmerbradllc

View GitHub Profile
@farmerbradllc
farmerbradllc / blog.md
Last active December 24, 2018 11:42
Guide to upgrade Liferay themes from 6.1 to 6.2

Guide to upgrade Liferay themes from 6.1 to 6.2

Recently I have had the opprotunity to upgrade some client themes from 6.1 to 6.2. The purpose of this post is to help you avoid some issues that I ran into during the process.

Great UI Features in 6.2

  • Responsive out of the box
  • Uses Twitter bootstrap 2.3.2
  • Uses Alloy UI 2.0
  • SASS (been around since 6.1 but still great)
  • mixing (respond-to)
@farmerbradllc
farmerbradllc / sitemap.vm
Created February 2, 2015 14:38
Current Page and children Sitemap ADT
#set ($specialPlid = "")
#if ($layout.getParentPlid() == 0)
#set ($specialPlid = $layout.getPlid())
#else
#set ($specialPlid = $layout.getParentPlid())
#end
<div class="nav-menu nav-menu-style-">
#if (!$entries.isEmpty())
@farmerbradllc
farmerbradllc / greeting.js
Created December 24, 2014 18:47
Christmas Greeting
var message = "Merry Christmas",
today= new Date(),
year = today.getFullYear();
today = today.toLocaleDateString();
if (today == "12/24/"+ year){
console.log(message + " Eve");
}
@farmerbradllc
farmerbradllc / aui.js
Last active August 29, 2015 14:11
Current Date
AUI().ready(
'aui-base','datatype-date',
function(A) {
var curDate = A.DataType.Date.format(new Date(), {format:"%B %d, %Y"});
A.all('.current-date').html(curDate);
});
@farmerbradllc
farmerbradllc / main.js
Created November 12, 2014 16:13
Liferay 6.2 Navigation with responsive toggle
AUI().ready(
'liferay-hudcrumbs', 'liferay-navigation-interaction', 'liferay-sign-in-modal',
function(A) {
var navigation = A.one('#navigation');
var menu_toggle = navigation.one('#nav_toggle');
if (navigation) {
navigation.plug(Liferay.NavigationInteraction);
@farmerbradllc
farmerbradllc / main.js
Last active August 29, 2015 14:08
Additional Code to Force Dropdown display on click and mouseleave
AUI.add(
'liferay-navigation-interaction-click',
function(A) {
A.mix(
Liferay.NavigationInteraction.prototype,
{
_initChildMenuHandlers: function(navigation) {
var instance = this;
if (navigation) {
@farmerbradllc
farmerbradllc / navigation.html
Created October 23, 2014 20:58
navigation html
<nav class="navbar" id="navigation">
<div class="navbar-inner">
<a class="btn btn-navbar" id="menu-toggler" data-navId="navigation">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</a>
<div class="collapse.nav-collapse">
<ul class="nav nav-collapse">
<li class="lfr-nav-item selected" aria-selected="true" role="presentation">
<%--
/**
* Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
*
* The contents of this file are subject to the terms of the Liferay Enterprise
* Subscription License ("License"). You may not use this file except in
* compliance with the License. You can obtain a copy of the License by
* contacting Liferay, Inc. See the License for the specific language governing
* permissions and limitations under the License, including but not limited to
* distribution rights of the Software.
@farmerbradllc
farmerbradllc / layout.vm
Created September 19, 2014 19:36
Velocity Variables Dump
Color Scheme: $colorScheme
Company: $company
Layout: $layout
Layout Type Portlet: $layoutTypePortlet
Locale: $locale
Plid: $plid
Portlet Display: $portletDisplay
Portlet Group Id: $portletGroupId
Real User: $realUser
Request: $request
/*
AngularJS v1.2.0
(c) 2010-2012 Google, Inc. http://angularjs.org
License: MIT
*/
(function(W,O,s){'use strict';function L(b){return function(){var a=arguments[0],c,a="["+(b?b+":":"")+a+"] http://errors.angularjs.org/undefined/"+(b?b+"/":"")+a;for(c=1;c<arguments.length;c++)a=a+(1==c?"?":"&")+"p"+(c-1)+"="+encodeURIComponent("function"==typeof arguments[c]?arguments[c].toString().replace(/ \{[\s\S]*$/,""):"undefined"==typeof arguments[c]?"undefined":"string"!=typeof arguments[c]?JSON.stringify(arguments[c]):arguments[c]);return Error(a)}}function pb(b){if(null==b||ya(b))return!1;
var a=b.length;return 1===b.nodeType&&a?!0:D(b)||J(b)||0===a||"number"===typeof a&&0<a&&a-1 in b}function q(b,a,c){var d;if(b)if(B(b))for(d in b)"prototype"!=d&&("length"!=d&&"name"!=d&&b.hasOwnProperty(d))&&a.call(c,b[d],d);else if(b.forEach&&b.forEach!==q)b.forEach(a,c);else if(pb(b))for(d=0;d<b.length;d++)a.call(c,b[d],d);else for(d in b)b.hasOwnProperty(d)&&a.call(c,b[d],d);return b}function Nb(b){var a=[],c;for(c in b)b.has