Skip to content

Commit a837bda

Browse files
committed
support actionable-options data option in element and pass it create ajax modal
1 parent 58e9038 commit a837bda

File tree

3 files changed

+8
-5
lines changed

3 files changed

+8
-5
lines changed

dist/bootstrap-actionable.min.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

js/bootstrap-actionable.js

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,15 +38,18 @@
3838
event.preventDefault();
3939
var actionType = $(this).attr("actionType") ? $(this).attr("actionType") : "ajax";
4040
var actionScope = $(this).attr("actionScope") ? $(this).attr("actionScope") : "html";
41+
var actionableOptionsData = $(this).data("actionableOptions");
4142
if (actionType === "ajax-model") {
4243
var href = $(this).attr("href") ? $(this).attr("href") : $(this).attr("actionLink");
43-
BootstrapModalWrapperFactory.createAjaxModal({
44+
var defaultAjaxModelOptions = {
4445
message: $this.options.loadingHtml,
4546
dataType: $this.options.dataType,
4647
httpMethod: $this.options.ajaxHttpMethod,
4748
ajaxContainerReadyEventName: $this.options.ajaxContainerReady,
4849
url: href
49-
});
50+
};
51+
$.extend(true, defaultAjaxModelOptions, actionableOptionsData);
52+
BootstrapModalWrapperFactory.createAjaxModal(defaultAjaxModelOptions);
5053
} else if (actionType === "action-ref") {
5154
var actionRefName = $(this).attr("action-ref-by-name") ? $(this).attr("action-ref-by-name") : "";
5255
if ($(actionScope + " [action-name='" + actionRefName + "']").length > 0) {

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "bootstrap-actionable",
3-
"version": "1.0.7",
3+
"version": "1.0.8",
44
"description": "Actionable plugin is a small Javascript code that help implement click actions for a and button tags by declarative way and provide functionalities to load AJAX content in Bootstrap Modal Wrapper instance.",
55
"keywords": [
66
"bootstrap",

0 commit comments

Comments
 (0)