Skip to content

Instantly share code, notes, and snippets.

@farmerbradllc
Created September 19, 2011 18:45
Show Gist options
  • Save farmerbradllc/1227240 to your computer and use it in GitHub Desktop.
Save farmerbradllc/1227240 to your computer and use it in GitHub Desktop.
Theme .js - Change Default Column to add portlets
AUI().ready(
/*
This function gets loaded when all the HTML, not including the portlets, is
loaded.
*/
function(A) {
var layoutWithNav = A.one('.columns-3-1');
if(layoutWithNav){
A.Do.before(function(option) {
console.log(option.placeHolder, option);
if (!option.placeHolder) {
option.placeHolder = A.Node.create('<div class="loading-animation"></div>');
}
option.placeHolder.prependTo('#column-2');
}, Liferay.Portlet, 'add', Liferay.Portlet);
}
}
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment