|
28 | 28 | {
|
29 | 29 | <div class="btn-group">
|
30 | 30 | @RenderLink(Model, true, false)
|
31 |
| - @if (Model.IsSplitDropdown) |
| 31 | + @if (Model.DropdownCaret == GriddlyDropdownCaret.Split) |
32 | 32 | {
|
33 | 33 | <button type="button" class="btn btn-default dropdown-toggle @GriddlySettings.DefaultButtonClassName" data-toggle="dropdown">
|
34 | 34 | <span class="caret"></span>
|
|
57 | 57 | @helper RenderLink(GriddlyButton button, bool isDropdown, bool isMenuItem)
|
58 | 58 | {
|
59 | 59 | string href = null;
|
60 |
| - if (button.Action != GriddlyButtonAction.Modal && (button.Action != GriddlyButtonAction.Navigate || (isDropdown && !button.IsSplitDropdown))) |
| 60 | + if (button.Action != GriddlyButtonAction.Modal && (button.Action != GriddlyButtonAction.Navigate || (isDropdown && button.DropdownCaret != GriddlyDropdownCaret.Split))) |
61 | 61 | {
|
62 | 62 | href = "javascript:void(0)";
|
63 | 63 | }
|
64 |
| - else if ((button.Action == GriddlyButtonAction.Navigate && (!isDropdown || button.IsSplitDropdown)) || (button.Action == GriddlyButtonAction.Modal && !string.IsNullOrWhiteSpace(button.Target))) |
| 64 | + else if ((button.Action == GriddlyButtonAction.Navigate && (!isDropdown || button.DropdownCaret == GriddlyDropdownCaret.Split)) || (button.Action == GriddlyButtonAction.Modal && !string.IsNullOrWhiteSpace(button.Target))) |
65 | 65 | {
|
66 | 66 | href = button.Argument;
|
67 | 67 | }
|
|
72 | 72 |
|
73 | 73 | bool clearSelectionOnAction = button.ClearSelectionOnAction ?? (button.Action == GriddlyButtonAction.Ajax || button.Action == GriddlyButtonAction.AjaxBulk);
|
74 | 74 |
|
75 |
| - <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(button.Icon) ? "btn-with-icon" : null)" |
| 75 | + <a data-role="griddly-button" class="@(!isMenuItem ? "btn btn-default" : null) @(isDropdown && button.DropdownCaret != GriddlyDropdownCaret.Split ? "dropdown-toggle" : null) @(!button.Enabled || button.EnableOnSelection == true ? "disabled" : null) @button.ClassName @(!string.IsNullOrWhiteSpace(button.Icon) ? "btn-with-icon" : null)" |
76 | 76 | @*onclick="@(button.Action == GriddlyButtonAction.Javascript ? button.Argument : null)"*@
|
77 | 77 | title="@button.Title"
|
78 | 78 | @Html.AttributeIf("target", button.Action == GriddlyButtonAction.Navigate && !string.IsNullOrWhiteSpace(button.Target), button.Target)
|
79 | 79 | @Html.AttributeIf("href", href != null, href)
|
80 | 80 | @Html.AttributeIf("data-toggle", button.Action != GriddlyButtonAction.Navigate && button.Action != GriddlyButtonAction.Javascript, button.Action.ToString().ToLower())
|
81 |
| - @Html.AttributeIf("data-toggle", isDropdown && !button.IsSplitDropdown, "dropdown") |
| 81 | + @Html.AttributeIf("data-toggle", isDropdown && button.DropdownCaret != GriddlyDropdownCaret.Split, "dropdown") |
82 | 82 | @Html.AttributeIf("data-onclick", button.Action == GriddlyButtonAction.Javascript && !string.IsNullOrWhiteSpace(button.Argument), button.Argument)
|
83 | 83 | @Html.AttributeIf("data-url", button.Action == GriddlyButtonAction.Ajax || button.Action == GriddlyButtonAction.AjaxBulk || button.Action == GriddlyButtonAction.Post || button.Action == GriddlyButtonAction.PostCriteria, button.Argument)
|
84 | 84 | @Html.AttributeIf("data-target", button.Action != GriddlyButtonAction.Navigate && !string.IsNullOrWhiteSpace(button.Target), button.Target)
|
|
102 | 102 |
|
103 | 103 | @button.Text
|
104 | 104 |
|
105 |
| - @if (isDropdown && !button.IsSplitDropdown) |
| 105 | + @if (isDropdown && button.DropdownCaret == GriddlyDropdownCaret.Inline) |
106 | 106 | {
|
107 | 107 | <span class="caret"></span>
|
108 | 108 | }
|
|
0 commit comments