Fixed and closed #418: Same & Continue now properly handles attachment upload controls activation. Also fixed issue in redirect on cancel.
This commit is contained in:
parent
123c1755ff
commit
3eb812dfd4
3 changed files with 18 additions and 10 deletions
|
@ -16,5 +16,5 @@ using System.Reflection;
|
||||||
//
|
//
|
||||||
// You can specify all the values or you can default the Revision and Build Numbers
|
// You can specify all the values or you can default the Revision and Build Numbers
|
||||||
// by using the '*' as shown below:
|
// by using the '*' as shown below:
|
||||||
[assembly: AssemblyVersion("3.0.1.428")]
|
[assembly: AssemblyVersion("3.0.1.429")]
|
||||||
[assembly: AssemblyFileVersion("3.0.1.428")]
|
[assembly: AssemblyFileVersion("3.0.1.429")]
|
||||||
|
|
|
@ -70,14 +70,7 @@ namespace ScrewTurn.Wiki {
|
||||||
}
|
}
|
||||||
|
|
||||||
DetectPermissions();
|
DetectPermissions();
|
||||||
|
SetupControls();
|
||||||
// Setup buttons and controls
|
|
||||||
if(!canUpload) {
|
|
||||||
btnUpload.Enabled = false;
|
|
||||||
}
|
|
||||||
if(!canDelete) {
|
|
||||||
chkOverwrite.Enabled = false;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
@ -101,6 +94,18 @@ namespace ScrewTurn.Wiki {
|
||||||
lstProviders.Visible = isAdmin;
|
lstProviders.Visible = isAdmin;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Sets up buttons and controls using the permissions.
|
||||||
|
/// </summary>
|
||||||
|
private void SetupControls() {
|
||||||
|
if(!canUpload) {
|
||||||
|
btnUpload.Enabled = false;
|
||||||
|
}
|
||||||
|
if(!canDelete) {
|
||||||
|
chkOverwrite.Enabled = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or sets the PageInfo object.
|
/// Gets or sets the PageInfo object.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -113,6 +118,7 @@ namespace ScrewTurn.Wiki {
|
||||||
btnUpload.Enabled = value != null;
|
btnUpload.Enabled = value != null;
|
||||||
lblNoUpload.Visible = !btnUpload.Enabled;
|
lblNoUpload.Visible = !btnUpload.Enabled;
|
||||||
DetectPermissions();
|
DetectPermissions();
|
||||||
|
SetupControls();
|
||||||
rptItems.DataBind();
|
rptItems.DataBind();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -426,6 +426,7 @@ namespace ScrewTurn.Wiki {
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void btnCancel_Click(object sender, EventArgs e) {
|
protected void btnCancel_Click(object sender, EventArgs e) {
|
||||||
|
if(currentPage == null && txtName.Visible) currentPage = Pages.FindPage(NameTools.GetFullName(DetectNamespace(), txtName.Text));
|
||||||
if(currentPage != null) UrlTools.Redirect(Tools.UrlEncode(currentPage.FullName) + Settings.PageExtension);
|
if(currentPage != null) UrlTools.Redirect(Tools.UrlEncode(currentPage.FullName) + Settings.PageExtension);
|
||||||
else UrlTools.Redirect(UrlTools.BuildUrl("Default.aspx"));
|
else UrlTools.Redirect(UrlTools.BuildUrl("Default.aspx"));
|
||||||
}
|
}
|
||||||
|
@ -566,6 +567,7 @@ namespace ScrewTurn.Wiki {
|
||||||
Pages.CreatePage(DetectNamespaceInfo(), txtName.Text, provider);
|
Pages.CreatePage(DetectNamespaceInfo(), txtName.Text, provider);
|
||||||
pg = Pages.FindPage(NameTools.GetFullName(DetectNamespace(), txtName.Text), provider);
|
pg = Pages.FindPage(NameTools.GetFullName(DetectNamespace(), txtName.Text), provider);
|
||||||
saveMode = SaveMode.Normal;
|
saveMode = SaveMode.Normal;
|
||||||
|
attachmentManager.CurrentPage = pg;
|
||||||
}
|
}
|
||||||
Log.LogEntry("Page update requested for " + txtName.Text, EntryType.General, username);
|
Log.LogEntry("Page update requested for " + txtName.Text, EntryType.General, username);
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue