Commit 322e9f88 authored by Leigh Stoller's avatar Leigh Stoller

More bug fixes.

parent 1fd2f79f
......@@ -129,7 +129,7 @@ function (_, sup, filesize, ShowImagingModal,
// Show the hidden buttons (in new profile mode)
$('#showtopo_modal_button').removeClass("invisible");
$('#show_rspec_textarea_button').removeClass("invisible");
$('#show_rspec_modal_button').removeClass("invisible");
//
// We do not throw away the old rspec until we parse
......@@ -150,6 +150,8 @@ function (_, sup, filesize, ShowImagingModal,
ShowRspecTopo($('#profile_rspec_textarea').val());
});
$('#show_rspec_modal_button').click(function (event) {
// Sync up the steps when toggling the edit button.
SyncSteps();
$('#modal_profile_rspec_textarea').val(
$('#profile_rspec_textarea').val());
$('#rspec_modal').modal({'backdrop':'static','keyboard':false});
......@@ -176,13 +178,6 @@ function (_, sup, filesize, ShowImagingModal,
$(this).select();
});
//
// Sync up the steps when toggling the edit button.
//
$('#show_rspec_textarea_button').click(function (event) {
SyncSteps();
});
//
// Delete confirmed.
//
......@@ -316,6 +311,7 @@ function (_, sup, filesize, ShowImagingModal,
}
else {
EnableButtons();
modified = false;
DisableButton("profile_submit_button");
if (window.UPDATED) {
initNotifyUpdate();
......@@ -323,6 +319,23 @@ function (_, sup, filesize, ShowImagingModal,
}
}
//
// Gack, initializing the steps table causes the ProfileModified
// callbacks to get triggered, which is fine except that when the
// page is first loaded, it happens AFTER the above initialize()
// function has finished. How the hell is that? Anyway, this kludge
// makes sure we start with the profile not appearin modified.
//
var initialized = false;
function StepsTableLoaded()
{
if (!initialized) {
modified = false;
DisableButton("profile_submit_button");
}
initialized = true;
}
// Formatter for the form. This did not work out nicely at all!
function formatter(fieldString, errors)
{
......@@ -413,6 +426,7 @@ function (_, sup, filesize, ShowImagingModal,
hideButtons: {
removeLast: true
},
dataLoaded: function (caller) { StepsTableLoaded(); },
columns: [
{ name: 'Type', display: 'Type', type: 'select',
ctrlAttr: { maxlength: 100 },
......
......@@ -140,6 +140,7 @@ function Do_DeleteProfile()
# is deleted.
#
SPITAJAX_RESPONSE("myprofiles.php");
return;
}
$uuid = $profile->uuid();
SPITAJAX_RESPONSE("manage_profile.php?uuid=$uuid&action=edit");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment