Created
September 19, 2011 18:45
-
-
Save farmerbradllc/1227240 to your computer and use it in GitHub Desktop.
Theme .js - Change Default Column to add portlets
This file contains 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().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