Thunder: Use the SingleMediaContentItemDialog
You can use a widget designer, generated by Sitefinity CMS Thunder, with document, image, or a video selector. You can further modify the designer and media selector to use the SingleMediaContentItemDialog instead of the EditorContentManagerDialog.
To do so:
- Open the template of your widget designer.
- In the .asax file, replace sf:EditorContentManagerDialog with sf:SingleMediaContentItemDialog
- In the .cs file, replace the EditorContentManagerDialog property with SingleMediaContentItemDialog
- In the .js file, locate the initialize method and increase the width of the dialog from 655 to 930.
- In the .js file, locate the following _selectButton<PropertyName>Clicked method and:
- Remove the following code line:
jQuery(
this
._selector<PropertyName>.get_uploaderView().get_settingsPanel()).hide();
- Replace
this
._ <PropertyName>Dialog.dialog().parent().css(
"min-width"
,
"655px"
);
with:
this
._ <PropertyName>Dialog.dialog().parent().css(
"min-width"
,
"930px"
);
- Remove the following code block:
try
{
this
._selector<PropertyName>.get_uploaderView().get_altTextField().set_value(
""
);
}
catch
(ex) { }