padding-top: 5px;
}
-#crm-container a.crm-link-action {
- cursor: pointer;
- cursor: hand;
-}
-
#crm-container span.crm-custom-greeting {
font-size: 9px;
}
<tr>
<td>{ts}Email{/ts}
{if $actualBlockCount lt 5 }
- <span id="add-more-email" title="{ts}click to add more{/ts}"><a class="crm-link-action add-more-inline">{ts}add{/ts}</a></span>
+ <span id="add-more-email" title="{ts}click to add more{/ts}"><a class="crm-hover-button action-item add-more-inline" href="#">{ts}add{/ts}</a></span>
{/if}
</td>
<td>{ts}On Hold?{/ts}</td>
<td align="center" class="crm-email-is_primary">{$form.email.$blockId.is_primary.1.html}</td>
<td>
{if $blockId gt 1}
- <a title="{ts}delete email block{/ts}" class="crm-delete-inline crm-link-action">{ts}delete{/ts}</a>
+ <a title="{ts}Delete Email{/ts}" class="crm-delete-inline crm-hover-button" href="#"><span class="icon delete-icon"></span></a>
{/if}
</td>
</tr>
<tr>
<td>{ts}Instant Messenger{/ts}
{if $actualBlockCount lt 5 }
- <span id="add-more-im" title="{ts}click to add more{/ts}"><a class="crm-link-action add-more-inline">{ts}add{/ts}</a></span>
+ <span id="add-more-im" title="{ts}click to add more{/ts}"><a class="crm-hover-button action-item add-more-inline" href="#">{ts}add{/ts}</a></span>
{/if}
</td>
<td>{ts}IM Location{/ts}</td>
<td align="center" class="crm-im-is_primary">{$form.im.$blockId.is_primary.1.html}</td>
<td>
{if $blockId gt 1}
- <a class="crm-delete-inline crm-link-action" title="{ts}delete im block{/ts}">{ts}delete{/ts}</a>
+ <a class="crm-delete-inline crm-hover-button" href="#" title="{ts}Delete IM{/ts}"><span class="icon delete-icon"></span></a>
{/if}
</td>
</tr>
<tr>
<td>{ts}Open ID{/ts}
{if $actualBlockCount lt 5 }
- <span id="add-more-openid" title="{ts}click to add more{/ts}"><a class="crm-link-action add-more-inline">{ts}add{/ts}</a></span>
+ <span id="add-more-openid" title="{ts}click to add more{/ts}"><a class="crm-hover-button action-item add-more-inline" href="#">{ts}add{/ts}</a></span>
{/if}
</td>
<td>{ts}Open ID Location{/ts}</td>
<td align="center" id="OpenID-Primary-html" class="crm-openid-is_primary">{$form.openid.$blockId.is_primary.1.html}</td>
<td>
{if $blockId gt 1}
- <a class="crm-delete-inline crm-link-action" title="{ts}Delete OpenID Block{/ts}">{ts}delete{/ts}</a>
+ <a class="crm-delete-inline crm-hover-button" href="#" title="{ts}Delete OpenID{/ts}"><span class="icon delete-icon"></span></a>
{/if}
</td>
</tr>
<tr>
<td>{ts}Phone{/ts}
{if $actualBlockCount lt 5 }
- <span id="add-more-phone" title="{ts}click to add more{/ts}"><a class="crm-link-action add-more-inline">{ts}add{/ts}</a></span>
+ <span id="add-more-phone" title="{ts}click to add more{/ts}"><a class="crm-hover-button action-item add-more-inline" href="#">{ts}add{/ts}</a></span>
{/if}
</td>
<td>{ts}Phone Location{/ts}</td>
<td align="center" class="crm-phone-is_primary">{$form.phone.$blockId.is_primary.1.html}</td>
<td>
{if $blockId gt 1}
- <a class="crm-delete-inline crm-link-action" title="{ts}delete phone block{/ts}">{ts}delete{/ts}</a>
+ <a class="crm-delete-inline crm-hover-button\" href="#" title="{ts}Delete phone{/ts}"><span class="icon delete-icon"></span></a>
{/if}
</td>
</tr>
<td>{ts}Website{/ts}
{help id="id-website" file="CRM/Contact/Form/Contact.hlp"}
{if $actualBlockCount lt 5 }
- <span id="add-more-website" title="{ts}click to add more{/ts}"><a class="crm-link-action add-more-inline">{ts}add{/ts}</a></span>
+ <span id="add-more-website" title="{ts}click to add more{/ts}"><a class="crm-hover-button action-item add-more-inline" href="#">{ts}add{/ts}</a></span>
{/if}
</td>
<td>{ts}Website Type{/ts}</td>
<td>{$form.website.$blockId.website_type_id.html}</td>
<td>
{if $blockId > 1}
- <a class="crm-delete-inline crm-link-action" title="{ts}delete website block{/ts}">{ts}delete{/ts}</a>
+ <a class="crm-delete-inline crm-hover-button action-item" href="#" title="{ts}Delete Website{/ts}"><span class="icon delete-icon"></span></a>
{/if}
</td>
</tr>
}
})
// handle delete link within blocks
- .on('click', '.crm-delete-inline', function() {
+ .on('click', '.crm-delete-inline', function(e) {
var row = $(this).closest('tr');
var form = $(this).closest('form');
- row.addClass('hiddenElement');
+ row.hide();
$('input', row).val('');
//if the primary is checked for deleted block
//unset and set first as primary
$('[class$=is_primary] input:first', form).prop('checked', true );
}
$('.add-more-inline', form).show();
+ e.preventDefault();
})
// Delete an address
.on('click', '.crm-inline-edit.address .delete-button', function() {
return false;
})
// add more and set focus to new row
- .on('click', '.add-more-inline', function() {
+ .on('click', '.add-more-inline', function(e) {
var form = $(this).closest('form');
var row = $('tr[class="hiddenElement"]:first', form);
row.removeClass('hiddenElement');
if ($('tr[class="hiddenElement"]').length < 1) {
$(this).hide();
}
+ e.preventDefault();
});
// Trigger cancel button on esc keypress
$(document).keydown(function(key) {