Skip to content

Commit

Permalink
Afform Gui - Use af-gui-menu for efficiency
Browse files Browse the repository at this point in the history
  • Loading branch information
colemanw committed Mar 13, 2022
1 parent e7e1e02 commit 07a5eac
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions ext/afform/admin/ang/afAdmin/afAdminList.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,15 @@ <h1 crm-page-title>{{:: ts('Form Builder') }}</h1>
<div class="form-inline">
<label for="afform-list-filter">{{:: ts('Filter:') }}</label>
<input class="form-control" type="search" id="afform-list-filter" ng-model="$ctrl.searchAfformList" placeholder="&#xf002">
<div class="btn-group pull-right" ng-if="types[$ctrl.tab].options !== false">
<div class="btn-group pull-right" ng-if="types[$ctrl.tab].options !== false" af-gui-menu>
<a ng-if="types[$ctrl.tab].default" href="{{ types[$ctrl.tab].default }}" class="btn btn-primary">
{{ ts('New %1', {1: types[$ctrl.tab].label }) }}
</a>
<button type="button" ng-click="$ctrl.createLinks()" class="btn btn-primary dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
<span ng-class="{'sr-only': types[$ctrl.tab].default}">{{ ts('New %1', {1: types[$ctrl.tab].label }) }}</span>
<span class="caret"></span>
</button>
<ul class="dropdown-menu">
<ul class="dropdown-menu" ng-if="menu.open">
<li ng-class="{disabled: !types[$ctrl.tab].options || !types[$ctrl.tab].options.length}">
<input ng-if="types[$ctrl.tab].options && types[$ctrl.tab].options.length" type="search" class="form-control" placeholder="&#xf002" ng-model="searchCreateLinks.label">
<a href ng-if="!types[$ctrl.tab].options"><i class="crm-i fa-spinner fa-spin"></i></a>
Expand Down
8 changes: 4 additions & 4 deletions ext/afform/admin/ang/afGuiEditor/afGuiEditorPalette.html
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,11 @@
<span>{{ display.settings.label }}</span>
</a>
</li>
<li role="presentation" class="dropdown" ng-if="editor.allowEntityConfig" title="{{:: ts('Add Entity') }}">
<li role="presentation" class="dropdown" ng-if="editor.allowEntityConfig" title="{{:: ts('Add Entity') }}" af-gui-menu>
<a href class="dropdown-toggle" data-toggle="dropdown">
<i class="crm-i fa-plus"></i>
</a>
<ul class="dropdown-menu">
<ul class="dropdown-menu" ng-if="menu.open">
<li ng-repeat="(entityName, entity) in editor.meta.entities" ng-if="entity.defaults">
<a href ng-click="editor.addEntity(entityName, true)">
<i class="crm-i {{:: entity.icon }}"></i>
Expand All @@ -35,11 +35,11 @@
</li>
</ul>
</li>
<li role="presentation" class="dropdown" ng-if="editor.getFormType() === 'search'" title="{{:: ts('Add Search') }}">
<li role="presentation" class="dropdown" ng-if="editor.getFormType() === 'search'" title="{{:: ts('Add Search') }}" af-gui-menu>
<a href class="dropdown-toggle" data-toggle="dropdown" ng-click="editor.getSearchDisplaySelector();">
<i class="crm-i fa-plus"></i>
</a>
<ul class="dropdown-menu">
<ul class="dropdown-menu" ng-if="menu.open">
<li ng-class="{disabled: !editor.searchOptions || !editor.searchOptions.length}">
<input ng-if="editor.searchOptions && editor.searchOptions.length" type="search" class="form-control" placeholder="&#xf002" ng-model="searchDisplayListFilter.label">
<a href ng-if="!editor.searchOptions"><i class="crm-i fa-spinner fa-spin"></i></a>
Expand Down

0 comments on commit 07a5eac

Please sign in to comment.