Created
March 18, 2015 18:31
-
-
Save JonnyFunFun/00d94e1f413152cd25c8 to your computer and use it in GitHub Desktop.
comment reverse mashup
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
/* | |
* Placeholder: footerPlaceholder | |
*/ | |
tau.mashups | |
.addDependency("jQuery") | |
.addDependency('app.bus') | |
.addMashup(function($, $deferred, config) { | |
/* our reused placement function */ | |
$deferred.then(function(bus) { | |
bus.on('afterRender', $.proxy(function(e, obj, data) { | |
try { | |
if ($(obj.element[0]).is('.ui-comments-control')) { | |
setTimeout(function() { | |
$('div.ui-comments-content').append($('div.ui-comments-content').children('div.ui-comment').get().reverse()); | |
}, 500); | |
} | |
} catch (e) { console.log(e); } | |
}, this)); | |
}); | |
} | |
); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment