mirror of
https://codeberg.org/artfulrobot/contactcats.git
synced 2025-06-26 22:47:19 +02:00
SK/FB work
This commit is contained in:
parent
16f2b6235d
commit
a4c9251f5e
10 changed files with 163 additions and 233 deletions
|
@ -36,7 +36,7 @@
|
|||
<button ng-if="$ctrl.moveIdx === null && row.deleted" ng-click="row.deleted = false;$ctrl.dirty = 'dirty';">
|
||||
<i class="fa-trash crm-i"></i> {{ts('Un-Delete')}}
|
||||
</button>
|
||||
<button ng-if="$ctrl.moveIdx === null && !row.deleted" ng-click="$ctrl.moveIdx = idx"
|
||||
<button ng-if="$ctrl.moveIdx === null && !row.deleted && row.search_type !== 'default'" ng-click="$ctrl.moveIdx = idx"
|
||||
class="btn"
|
||||
ng-disabled="$ctrl.categoryDefinitions.length === 1"
|
||||
>
|
||||
|
@ -48,7 +48,7 @@
|
|||
<i class="fa-circle-xmark crm-i"></i> {{ts('Cancel Move')}}
|
||||
</button>
|
||||
<button ng-click="$ctrl.moveTo(idx+1)" ng-show="$ctrl.moveIdx !== null && (idx === 0 && $ctrl.moveIdx > 0)" ><i class="fa-sort-up crm-i" ></i>{{ts('Before this')}}</button>
|
||||
<button ng-click="$ctrl.moveTo(idx+1)" ng-show="$ctrl.moveIdx !== null && (idx + 1 < $ctrl.moveIdx || idx > $ctrl.moveIdx)"><i class="fa-sort-down crm-i" ></i>{{ts('After this')}}</button>
|
||||
<button ng-click="$ctrl.moveTo(idx+1)" ng-show="$ctrl.moveIdx !== null && row.search_type !== 'default' && (idx + 1 < $ctrl.moveIdx || idx > $ctrl.moveIdx)"><i class="fa-sort-down crm-i" ></i>{{ts('After this')}}</button>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -102,66 +102,66 @@
|
|||
/>
|
||||
</div>
|
||||
|
||||
<div crm-ui-field="{name: 'cc.color', title: ts('Color')}" >
|
||||
<input
|
||||
crm-ui-id="ci.color"
|
||||
name="color"
|
||||
type="color"
|
||||
ng-model="$ctrl.categoryToEdit.color"
|
||||
class="crm-form-color"
|
||||
/>
|
||||
</div>
|
||||
<div crm-ui-field="{name: 'cc.color', title: ts('Color')}" >
|
||||
<input
|
||||
crm-ui-id="ci.color"
|
||||
name="color"
|
||||
type="color"
|
||||
ng-model="$ctrl.categoryToEdit.color"
|
||||
class="crm-form-color"
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div crm-ui-field="{name: 'cc.icon', title: ts('Icon')}" >
|
||||
<input
|
||||
crm-ui-id="cc.icon"
|
||||
crm-ui-icon-picker
|
||||
ng-model="$ctrl.categoryToEdit.icon"
|
||||
/>
|
||||
</div>
|
||||
<div crm-ui-field="{name: 'cc.icon', title: ts('Icon')}" >
|
||||
<!-- this seems buggy, doesn't update to show the icon given. -->
|
||||
<input
|
||||
crm-ui-id="cc.icon"
|
||||
crm-ui-icon-picker
|
||||
ng-model="$ctrl.categoryToEdit.icon"
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div crm-ui-field="{name: 'cc.description', title: ts('Description')}" >
|
||||
<input
|
||||
crm-ui-id="ci.description"
|
||||
name="description"
|
||||
ng-model="$ctrl.categoryToEdit.description"
|
||||
class="crm-form-textarea"
|
||||
style="width: 100%"
|
||||
/>
|
||||
</div>
|
||||
<div crm-ui-field="{name: 'cc.description', title: ts('Description')}" >
|
||||
<input
|
||||
crm-ui-id="ci.description"
|
||||
name="description"
|
||||
ng-model="$ctrl.categoryToEdit.description"
|
||||
class="crm-form-textarea"
|
||||
style="width: 100%"
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div crm-ui-field="{name: 'cc.search_type', title: ts('How are contacts identified?')}" >
|
||||
<select
|
||||
crm-ui-id="ci.search_type"
|
||||
name="search_type"
|
||||
ng-model="$ctrl.categoryToEdit.search_type"
|
||||
ng-change="$ctrl.fixSearchData()"
|
||||
>
|
||||
<option value="search" >{{ts('Search Kit search')}}</option>
|
||||
<option value="group" >{{ts('Group')}}</option>
|
||||
<!-- future? <option value="sql_template" >{{ts('SQL template')}}</option> -->
|
||||
</select>
|
||||
</div>
|
||||
<div ng-if="cc.search_type !== 'default'" crm-ui-field="{name: 'cc.search_type', title: ts('How are contacts identified?')}" >
|
||||
<select
|
||||
crm-ui-id="ci.search_type"
|
||||
name="search_type"
|
||||
ng-model="$ctrl.categoryToEdit.search_type"
|
||||
ng-change="$ctrl.fixSearchData()"
|
||||
>
|
||||
<option value="search" >{{ts('Search Kit search')}}</option>
|
||||
<option value="group" >{{ts('Group')}}</option>
|
||||
<!-- future? <option value="sql_template" >{{ts('SQL template')}}</option> -->
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<!-- fields for search kit -->
|
||||
<div ng-if="$ctrl.categoryToEdit.search_type === 'search'" crm-ui-field="{name:'cc.saved_search_id', title: ts('Search Kit search')}" >
|
||||
<input crm-ui-id='cc.saved_search_id' crm-entityref="{entity: 'SavedSearch', select: {allowClear:false}}"
|
||||
ng-model="$ctrl.categoryToEdit.search_data.saved_search_id" />
|
||||
</div>
|
||||
<!-- fields for search kit -->
|
||||
<div ng-if="$ctrl.categoryToEdit.search_type === 'search'" crm-ui-field="{name:'cc.saved_search_id', title: ts('Search Kit search')}" >
|
||||
<input crm-ui-id='cc.saved_search_id' crm-entityref="{entity: 'SavedSearch', select: {allowClear:false}}"
|
||||
ng-model="$ctrl.categoryToEdit.search_data.saved_search_id" />
|
||||
</div>
|
||||
|
||||
<!-- fields for groups -->
|
||||
<div ng-if="$ctrl.categoryToEdit.search_type === 'group'" crm-ui-field="{name:'cc.group_id', title: ts('Group')}" >
|
||||
<input crm-ui-id='cc.group_id' crm-entityref="{entity: 'Group', select: {allowClear:false}}"
|
||||
ng-model="$ctrl.categoryToEdit.search_data.group_id" />
|
||||
</div>
|
||||
<!-- fields for groups -->
|
||||
<div ng-if="$ctrl.categoryToEdit.search_type === 'group'" crm-ui-field="{name:'cc.group_id', title: ts('Group')}" >
|
||||
<input crm-ui-id='cc.group_id' crm-entityref="{entity: 'Group', select: {allowClear:false}}"
|
||||
ng-model="$ctrl.categoryToEdit.search_data.group_id" />
|
||||
</div>
|
||||
|
||||
|
||||
<!-- type=button means when you hit Enter in an input above this button is skipped while it looks for the first submit button. -->
|
||||
<button type=button ng-click="$ctrl.view = 'list'"
|
||||
class="btn btn-secondary"
|
||||
>Cancel</button>
|
||||
<button ng-click="$ctrl.updateEditedThing()" >Done</button>
|
||||
|
||||
<!-- type=button means when you hit Enter in an input above this button is skipped while it looks for the first submit button. -->
|
||||
<button type=button ng-click="$ctrl.view = 'list'"
|
||||
class="btn btn-secondary"
|
||||
>Cancel</button>
|
||||
<button ng-click="$ctrl.updateEditedThing()" >Done</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue