Renamed the uikit lib folders. Resolved the gh-188 by updateing the note. Resolved gh-92 by implementation of the library manager in the compiler.
This commit is contained in:
44
admin/custom/footable-v2/js/footable.plugin.template.js
Normal file
44
admin/custom/footable-v2/js/footable.plugin.template.js
Normal file
@@ -0,0 +1,44 @@
|
||||
(function ($, w, undefined) {
|
||||
if (w.footable === undefined || w.foobox === null)
|
||||
throw new Error('Please check and make sure footable.js is included in the page and is loaded prior to this script.');
|
||||
|
||||
var defaults = {
|
||||
/*
|
||||
Plugin options here, example:
|
||||
|
||||
var defaults = {
|
||||
myPlugin: {
|
||||
enabled: true
|
||||
}
|
||||
};
|
||||
|
||||
This would allow you to access this option using ft.options.myPlugin.enabled
|
||||
*/
|
||||
};
|
||||
|
||||
function MyPlugin() {
|
||||
var p = this;
|
||||
p.name = 'Footable MyPlugin';
|
||||
p.init = function(ft) {
|
||||
$(ft.table).bind({
|
||||
/*
|
||||
Bind to relevant events here to modify/add functionality to Footable, example:
|
||||
|
||||
$(ft.table).bind({
|
||||
'footable_initialized': function(e){
|
||||
if (e.ft.options.myPlugin.enabled === true){
|
||||
alert('Hello World');
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
This would listen for the 'footable_initialized' event and when called check if the plugin is enabled
|
||||
and if it is alert 'Hello World' to the user.
|
||||
*/
|
||||
});
|
||||
};
|
||||
}
|
||||
|
||||
w.footable.plugins.register(MyPlugin, defaults);
|
||||
|
||||
})(jQuery, window);
|
Reference in New Issue
Block a user