Merge pull request #1292 from patricknelson/issue-1288-button-type

FIX (partial) for #1288 where non-submit buttons are being activated on "enter" key press.
This commit is contained in:
Damian Mooyman 2015-10-07 12:13:07 +13:00
commit c963706a88
3 changed files with 5 additions and 4 deletions

View File

@ -122,6 +122,7 @@
updateURLFromTitle = $('<button />', { updateURLFromTitle = $('<button />', {
'class': 'update ss-ui-button-small', 'class': 'update ss-ui-button-small',
'text': ss.i18n._t('URLSEGMENT.UpdateURL'), 'text': ss.i18n._t('URLSEGMENT.UpdateURL'),
'type': 'button',
'click': function(e) { 'click': function(e) {
e.preventDefault(); e.preventDefault();
self.updateURLSegment(self.val()); self.updateURLSegment(self.val());

View File

@ -3,7 +3,7 @@
<a class="ss-ui-button cms-content-addpage-button tool-button font-icon-plus" href="$LinkPageAdd" data-url-addpage="{$LinkPageAdd('', 'ParentID=%s')}"><% _t('CMSMain.AddNewButton', 'Add new') %></a> <a class="ss-ui-button cms-content-addpage-button tool-button font-icon-plus" href="$LinkPageAdd" data-url-addpage="{$LinkPageAdd('', 'ParentID=%s')}"><% _t('CMSMain.AddNewButton', 'Add new') %></a>
<% if $View == 'Tree' %> <% if $View == 'Tree' %>
<button class="cms-content-batchactions-button tool-button font-icon-check-mark-2" data-toolid="batch-actions"> <button type="button" class="cms-content-batchactions-button tool-button font-icon-check-mark-2" data-toolid="batch-actions">
<% _t("CMSPagesController_ContentToolbar_ss.MULTISELECT","Batch actions") %> <% _t("CMSPagesController_ContentToolbar_ss.MULTISELECT","Batch actions") %>
</button> </button>
<% end_if %> <% end_if %>

View File

@ -2,16 +2,16 @@
<a class="preview" href="$URL" target="_blank"> <a class="preview" href="$URL" target="_blank">
$URL $URL
</a> </a>
<button class="ss-ui-button ss-ui-button-small edit"> <button type="button" class="ss-ui-button ss-ui-button-small edit">
<% _t('URLSegmentField.Edit', 'Edit') %> <% _t('URLSegmentField.Edit', 'Edit') %>
</button> </button>
</div> </div>
<div class="edit-holder"> <div class="edit-holder">
<input $AttributesHTML /> <input $AttributesHTML />
<button class="update ss-ui-button-small"> <button type="button" class="update ss-ui-button-small">
<% _t('URLSegmentField.OK', 'OK') %> <% _t('URLSegmentField.OK', 'OK') %>
</button> </button>
<button class="cancel ss-ui-button-small ss-ui-action-minor"> <button type="button" class="cancel ss-ui-button-small ss-ui-action-minor">
<% _t('URLSegmentField.Cancel', 'Cancel') %> <% _t('URLSegmentField.Cancel', 'Cancel') %>
</button> </button>
<% if $HelpText %><p class="help">$HelpText</p><% end_if %> <% if $HelpText %><p class="help">$HelpText</p><% end_if %>