Dialog Customization
Dialog Customization
This chapter contains the following topics:
- Customize Dialog's background color, font...
- Customize Dialog's size
- Remove items from individual dialogs
- Remove 'General' and 'Style Builder' tabs from tag dialogs
- Change the default sort order in file browser dialog
- Customize Dialog's Z-index
CuteSoft_Client\CuteEditor\Themes\ThemeName\dialog.css
CuteSoft_Client\CuteEditor\Scripts\Constant.js
For example, if you want to modify the size of Insert Emotion dialog, you need to modify the following code:
// Default window ornaments for the Emotion dialog
editorconstant._emotionDialogFeature = "resizable:0;dialogWidth:280px;dialogHeight:300px;";
The following instruction shows you how to remove the browse button from insert link dialog.
Open Tag_A.ascx file and change the following code:
<button id="btnbrowse">[[Browse]]</button>
to:
<button id="btnbrowse" style="display:none">[[Browse]]</button>
Please open CuteEditorWeb\CuteSoft_Client\CuteEditor\Dialogs\tag.config.
To turn off the general tab, remove this line:
<add pattern="*" tab="Common" text="[[Common]]" control="Tag_Common.ascx" />
To turn off the style builder tab, remove this line:
<add pattern="*" tab="Style" text="[[StyleBuilder]]" control="Tag_Style.ascx" />
Please find the file browser dialog your want to change, for example, insertimage.aspx. Change the following code:
protected override void GetFiles(ArrayList files)
{
...
}
to:
protected override void GetFiles(ArrayList files)
{
...
files.Sort(new FileDateComparer());
}
public class FileDateComparer : IComparer
{
public int Compare(object x, object y)
{
DateTime a=System.IO.File.GetCreationTime((string)x);
DateTime b=System.IO.File.GetCreationTime((string)y);
long val=a.Ticks-b.Ticks;
if(val==0)
return 0;
if(val>0)
return 1;
return -1;
}
}
CuteSoft_Client\CuteEditor\Scripts\Constant.js
And modify the following code:
//Default dialog's z-index
editorconstant.DialogZIndex=8888;