|
30 | 30 | @RenderLink(Model, true, false)
|
31 | 31 | @if (Model.IsSplitDropdown)
|
32 | 32 | {
|
33 |
| - <button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown"> |
| 33 | + <button type="button" class="btn btn-default dropdown-toggle @GriddlySettings.DefaultButtonClassName" data-toggle="dropdown"> |
34 | 34 | <span class="caret"></span>
|
35 | 35 | </button>
|
36 | 36 | }
|
|
67 | 67 | }
|
68 | 68 |
|
69 | 69 | <a data-role="griddly-button" class="@(!isMenuItem ? "btn btn-default" : null) @(isDropdown && !button.IsSplitDropdown ? "dropdown-toggle" : null) @(!button.Enabled || button.EnableOnSelection == true ? "disabled" : null) @button.ClassName @(!string.IsNullOrWhiteSpace(Model.Icon) ? "btn-with-icon" : null)"
|
70 |
| - @*onclick="@(button.Action == GriddlyButtonAction.Javascript ? button.Argument : null)"*@ |
71 |
| - title="@button.Title" |
72 |
| - @Html.AttributeIf("target", button.Action == GriddlyButtonAction.Navigate && !string.IsNullOrWhiteSpace(button.Target), button.Target) |
73 |
| - @Html.AttributeIf("href", href != null, href) |
74 |
| - @Html.AttributeIf("data-toggle", button.Action != GriddlyButtonAction.Navigate && button.Action != GriddlyButtonAction.Javascript, button.Action.ToString().ToLower()) |
75 |
| - @Html.AttributeIf("data-toggle", isDropdown && !button.IsSplitDropdown, "dropdown") |
76 |
| - @Html.AttributeIf("data-onclick", button.Action == GriddlyButtonAction.Javascript && button.Argument != null, button.Argument) |
77 |
| - @Html.AttributeIf("data-url", button.Action == GriddlyButtonAction.Ajax || button.Action == GriddlyButtonAction.AjaxBulk || button.Action == GriddlyButtonAction.Post || button.Action == GriddlyButtonAction.PostCriteria, button.Argument) |
78 |
| - @Html.AttributeIf("data-target", button.Action != GriddlyButtonAction.Navigate && !string.IsNullOrWhiteSpace(button.Target), button.Target) |
79 |
| - @Html.AttributeIf("data-enable-on-selection", button.EnableOnSelection, button.EnableOnSelection.ToString().ToLower()) |
80 |
| - @Html.AttributeIf("data-confirm-message", button.ConfirmMessage != null, button.ConfirmMessage) |
81 |
| - @Html.AttributeIf("data-rowids", button.RowIds != null, button.RowIds != null ? Html.AttributeEncode(Json.Encode(button.RowIds.Select(x => x.ToLower()).ToArray())) : null) |
82 |
| - @Html.AttributeIf("data-append-rowids-to-url", (button.Action == GriddlyButtonAction.Modal || button.Action == GriddlyButtonAction.Navigate) && button.AppendRowIdsToUrl, "")> |
| 70 | + @*onclick="@(button.Action == GriddlyButtonAction.Javascript ? button.Argument : null)"*@ |
| 71 | + title="@button.Title" |
| 72 | + @Html.AttributeIf("target", button.Action == GriddlyButtonAction.Navigate && !string.IsNullOrWhiteSpace(button.Target), button.Target) |
| 73 | + @Html.AttributeIf("href", href != null, href) |
| 74 | + @Html.AttributeIf("data-toggle", button.Action != GriddlyButtonAction.Navigate && button.Action != GriddlyButtonAction.Javascript, button.Action.ToString().ToLower()) |
| 75 | + @Html.AttributeIf("data-toggle", isDropdown && !button.IsSplitDropdown, "dropdown") |
| 76 | + @Html.AttributeIf("data-onclick", button.Action == GriddlyButtonAction.Javascript && button.Argument != null, button.Argument) |
| 77 | + @Html.AttributeIf("data-url", button.Action == GriddlyButtonAction.Ajax || button.Action == GriddlyButtonAction.AjaxBulk || button.Action == GriddlyButtonAction.Post || button.Action == GriddlyButtonAction.PostCriteria, button.Argument) |
| 78 | + @Html.AttributeIf("data-target", button.Action != GriddlyButtonAction.Navigate && !string.IsNullOrWhiteSpace(button.Target), button.Target) |
| 79 | + @Html.AttributeIf("data-enable-on-selection", button.EnableOnSelection, button.EnableOnSelection.ToString().ToLower()) |
| 80 | + @Html.AttributeIf("data-confirm-message", button.ConfirmMessage != null, button.ConfirmMessage) |
| 81 | + @Html.AttributeIf("data-rowids", button.RowIds != null, button.RowIds != null ? Html.AttributeEncode(Json.Encode(button.RowIds.Select(x => x.ToLower()).ToArray())) : null) |
| 82 | + @Html.AttributeIf("data-append-rowids-to-url", (button.Action == GriddlyButtonAction.Modal || button.Action == GriddlyButtonAction.Navigate) && button.AppendRowIdsToUrl, "") |
| 83 | + @if (button.HtmlAttributes != null) |
| 84 | + { |
| 85 | + foreach (var attr in button.HtmlAttributes) |
| 86 | + { |
| 87 | + <text>@attr.Key="@attr.Value"</text> |
| 88 | + } |
| 89 | + }> |
83 | 90 |
|
84 | 91 | @if (!string.IsNullOrWhiteSpace(Model.Icon) && GriddlySettings.IconTemplate != null)
|
85 | 92 | {
|
|
0 commit comments