Skip to content

Instantly share code, notes, and snippets.

View farmerbradllc's full-sized avatar

Bradley Wood farmerbradllc

View GitHub Profile
function FirstCtrl($scope){
$scope.data = {message: "Hello"};
}
@farmerbradllc
farmerbradllc / main.js
Last active August 29, 2015 14:05
Session Clicks
AUI().ready(
'liferay-store',
function(A) {
Liferay.Store.set('cssClass', 'sample');
console.log(Liferay.Store.get('cssClass'));
}
);
@farmerbradllc
farmerbradllc / init.vm
Last active August 29, 2015 14:05
Theme Velocity Changes from 6.1.x to 6.2.x
## ---------- Common variables ---------- ##
#set ($theme_display = $themeDisplay)
#set ($portlet_display = $portletDisplay)
#set ($theme_timestamp = $themeDisplay.getTheme().getTimestamp())
#set ($theme_settings = $themeDisplay.getThemeSettings())
#set ($root_css_class = "aui " + $languageUtil.get($locale, "lang.dir"))
#set ($css_class = $theme_display.getColorScheme().getCssClass() + " yui3-skin-sam")
<!DOCTYPE html>
#parse ($init)
<html class="$root_css_class" dir="#language ("lang.dir")" lang="$w3c_language_id">
<head>
<title>$the_title - $company_name</title>
<meta content="initial-scale=1.0, width=device-width" name="viewport" />
<html ng-app>
<head>
<script src='https://ajax.googleapis.com/ajax/libs/angularjs/1.0.7/angular.min.js'></script>
</head>
<body>
{{"hello"+" world"}}
</body>
</html>
@farmerbradllc
farmerbradllc / fb.xml
Last active April 17, 2018 22:28
Open Social
<?xml version="1.0" encoding="utf-8"?>
<!-- ***************************************************************** -->
<!-- -->
<!-- Copyright 2013, IBM Corp. -->
<!-- Licensed under the Apache License, Version 2.0 (the "License"); -->
<!-- you may not use this file except in compliance with the License. -->
<!-- You may obtain a copy of the License at -->
<!-- -->
<!-- http://www.apache.org/licenses/LICENSE-2.0 -->
<!-- -->
## ---------- Check for Web Form Portlet ---------- ##
#set ($portletLocalServiceUtil = $portal.getClass().forName("com.liferay.portal.service.PortletLocalServiceUtil"))
#set ($webformPortletId = "1_WAR_webformportlet")
#if ($portletLocalServiceUtil.hasPortlet($company_id, $webformPortletId) == true)
#set ($hasWebFormPortlet = true)
#end
@farmerbradllc
farmerbradllc / webcontent.vm
Last active December 25, 2015 22:29
Liferay Velocity Web Content helper variables
#set ($theme_display = $request.get("theme-display"))
#set ($theme_image_path = $theme_display.get("path-theme-images"))
#set ($theme_js_path = $theme_image_path.replace("images", "js"))
#set ($theme_css_path = $theme_image_path.replace("images", "css"))
<div class="aui-field-wrapper-content lfr-forms-field-wrapper">
<span class="aui-field aui-field-text aui-w50 aui-w50" id="aui_3_4_0_1_281">
<span class="aui-field-content" id="aui_3_4_0_1_280">
<label class="aui-field-label" for="_20_11040legal-address-city">City
<span class="aui-label-required">(Required)</span>
</label>
<span class="aui-field-element " id="aui_3_4_0_1_279">
<input class="aui-field-input aui-field-input-text" id="_20_11040legal-address-city" name="_20_11040legal-address-city" type="text" value="">
</span>
</span>
@farmerbradllc
farmerbradllc / layout.vm
Created September 23, 2013 20:42
Work in progress
#macro (layoutfetch $lay $level)
#if ($level != 0)
$lay
#set ($lay = $lay.getChildren())
#set ($newLevel = $level - 1)
#layoutfetch($lay $newLevel)
$level
$lay.getName($locale)