fix ordering of ui-dialog buttons and make primary ones blue again

our old jquery ui theme css was float:right'ing these
which means to have them show up in the right order
you would have to create them in the wrong order.
we fixed that with the new jquery-ui-theme but now
we need to fix places where they were in the wrong
order in code.

also the class name to make them blue has changed
so I fixed that too

Change-Id: If0cbebce4788b0c68cd71a08cd2880076e139bc0
Reviewed-on: https://gerrit.instructure.com/12214
Reviewed-by: Joe Tanner <joe@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
This commit is contained in:
Ryan Shaw 2012-07-12 20:31:35 -06:00
parent 6221e9c3bb
commit 73e6d19108
6 changed files with 25 additions and 27 deletions

View File

@ -33,12 +33,12 @@ define [
]
else
[
text: I18n.t 'save_and_publish', 'Save & Publish'
'class' : 'ui-button-primary'
click: @appointmentGroupsForm.saveClick
,
text: I18n.t 'save', 'Save'
click: @appointmentGroupsForm.saveWithoutPublishingClick
,
text: I18n.t 'save_and_publish', 'Save & Publish'
'class' : 'btn-primary'
click: @appointmentGroupsForm.saveClick
]
dialog.dialog('option', 'buttons', buttons).dialog('open')

View File

@ -57,14 +57,14 @@ define [
width: 450
buttons: if error.reschedulable
[
text: I18n.t 'do_nothing', 'Do Nothing'
click: -> $dialog.dialog('close')
,
text: I18n.t 'reschedule', 'Reschedule'
'class': 'ui-button-primary'
'class': 'btn-primary'
click: =>
$dialog.disableWhileLoading @reserveEvent({cancel_existing:true}).always ->
$dialog.dialog('close')
,
text: I18n.t 'do_nothing', 'Do Nothing'
click: -> $dialog.dialog('close')
]
else
[

View File

@ -542,14 +542,12 @@ define [
width: 510
title: I18n.t('title.forward_messages', 'Forward Messages')
buttons: [
{
text: I18n.t('buttons.send_message', 'Send')
click: -> $(this).submit()
}
{
text: I18n.t('#buttons.cancel', 'Cancel')
click: -> $(this).dialog('close')
}
text: I18n.t('#buttons.cancel', 'Cancel')
click: -> $(this).dialog('close')
,
text: I18n.t('buttons.send_message', 'Send')
click: -> $(this).submit()
class: 'btn-primary'
]
open: =>
@$forwardForm.attr action: '/conversations?' + $.param(@conversations.baseData())

View File

@ -49,12 +49,12 @@ define [
createCourseForm.dialog
title: I18n.t('creating_course', 'Creating a course...')
buttons: [
text: I18n.t 'create', 'Create'
'class' : 'ui-button-primary'
click: -> createCourseForm.submit()
,
text: I18n.t 'cancel', 'Cancel'
click: -> createCourseForm.data('dialog').close()
,
text: I18n.t 'create', 'Create'
'class' : 'btn-primary'
click: -> createCourseForm.submit()
]
dialog = createCourseForm.data('dialog')
createCourseForm.formSubmit

View File

@ -135,12 +135,12 @@ define([
close: onContinue,
buttons: [
{
text: I18n.t('#buttons.delete', 'Delete'),
'class': 'ui-button-primary',
click: function() { result = true; $(this).dialog('close'); }
}, {
text: I18n.t('#buttons.cancel', 'Cancel'),
click: function() { $(this).dialog('close'); } // ; onContinue();
}, {
text: I18n.t('#buttons.delete', 'Delete'),
'class': 'btn-primary',
click: function() { result = true; $(this).dialog('close'); }
}
]
}, dialog_options));

View File

@ -41,7 +41,7 @@ describe "scheduler" do
end
def submit_appointment_group_form(publish = true)
save_and_publish, save = ff('.ui-dialog-buttonset .ui-button')
save, save_and_publish = ff('.ui-dialog-buttonset .ui-button')
if publish
save_and_publish.click
else
@ -154,7 +154,7 @@ describe "scheduler" do
open_edit_dialog
edit_form = f('#edit_appointment_form')
keep_trying_until { edit_form.should be_displayed }
f('.ui-dialog-buttonset .ui-button-primary').click
f('.ui-dialog-buttonset .btn-primary').click
wait_for_ajaximations
new_appointment_group.reload
new_appointment_group.workflow_state.should == 'active'
@ -427,7 +427,7 @@ describe "scheduler" do
section_box.click
course_box[:checked].should be_true
f('.ui-dialog-buttonset .ui-button-primary').click
f('.ui-dialog-buttonset .btn-primary').click
wait_for_ajaximations
ag = AppointmentGroup.first
ag.contexts.should include course1