silverstripe-framework/javascript/dist/InlineFormAction.js
David Craig 2140025c20 Implement RFC-7 JavaScript module loader
- Adds ES6 support via Babel
- Transforms existing JavaScript to UMD modules
- Adds module bundling via Browserify
- Existing JavaScript converted to UMD modules
- lib.js and leftandmain.js are bundled using browserify
- JavaScript minifying of bundles handed by gulp
2016-01-26 11:39:20 +13:00

29 lines
716 B
JavaScript

'use strict';
(function (global, factory) {
if (typeof define === "function" && define.amd) {
define('ss.InlineFormAction', [], factory);
} else if (typeof exports !== "undefined") {
factory();
} else {
var mod = {
exports: {}
};
factory();
global.ssInlineFormAction = mod.exports;
}
})(this, function () {
Behaviour.register({
'div.inlineformaction input#$ID': {
onclick: function onclick() {
var url = jQuery('base').attr('href') + 'admin-custom/' + this.name.substring(7) + '?ID=' + document.getElementById('Form_EditForm_ID').value + '&ajax=1';
jQuery.ajax({
'url': url,
success: Ajax.Evaluator,
success: Ajax.Evaluator
});
return false;
}
}
});
});