You've already forked baupm-core
Initial commit
This commit is contained in:
20
assets/javascripts/baupm.js
Normal file
20
assets/javascripts/baupm.js
Normal file
@@ -0,0 +1,20 @@
|
||||
$(document).ready(function() {
|
||||
$('#wrapper').append('<div id="fb-wrapper"></div>');
|
||||
var findLinks = function() {
|
||||
var elements = [];
|
||||
|
||||
$('#new-object').closest('li').find('.menu-children a').each(function() {
|
||||
elements.push({
|
||||
url: $(this).prop('href'),
|
||||
icon: '<i class="fb-icon icon-' + $(this).prop('class') + '" title="' + $(this).text() + '"></i>'
|
||||
});
|
||||
});
|
||||
elements.push({
|
||||
icon: '<i class="fb-icon icon-add"></i>'
|
||||
});
|
||||
return elements.reverse();
|
||||
};
|
||||
if ($('#new-object').get(0)) {
|
||||
$('#fb-wrapper').jqueryFab(findLinks(), {});
|
||||
}
|
||||
});
|
||||
Reference in New Issue
Block a user