Is there any way to set the default behavior for reloading the editor dialogs? I know that you can set the "ReloadOnShow" property for the "DialogDefinition" class but i cant find a way to set it for the editor dialogs.
Thank you
1 Answer, 1 is accepted
0
Ianko
Telerik team
answered on 24 Apr 2014, 12:06 PM
Hello Ido,
I can suggest achieving that via client-side approach and set the ReloadOnShow property with the dialog's API.
I can propose two available implementations:
Setting the ReloadOnShow to true to all dialogs that can be set with this property:
var dialogs = editor.get_dialogOpener()._dialogContainers;
var dialog = dialogs[command];
if (dialog) {
var dialogName = command;
switch (dialogName) {
case "ImageManager":
if (dialog && dialog.get_reloadOnShow && !dialog.get_reloadOnShow())
dialog.set_reloadOnShow(true);
break;
case "DocumentManager":
if (dialog && dialog.get_reloadOnShow && !dialog.get_reloadOnShow())
dialog.set_reloadOnShow(true);
break;
//You can set further the desired dialogs as the above logic
default:
break;
}
}
}
</script>
Regards,
Ianko
Telerik
Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.