mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2025-10-15 19:54:57 +08:00
@@ -65,6 +65,8 @@ namespace Orchard.MediaProcessing.Controllers {
|
||||
filter.ImageProfilePartRecord.Filters.Remove(filter);
|
||||
_filterRepository.Delete(filter);
|
||||
|
||||
_signals.Trigger("MediaProcessing_Saved_" + filter.ImageProfilePartRecord.Name);
|
||||
|
||||
Services.Notifier.Information(T("Filter deleted"));
|
||||
|
||||
return RedirectToAction("Edit", "Admin", new {id});
|
||||
@@ -134,7 +136,7 @@ namespace Orchard.MediaProcessing.Controllers {
|
||||
// set profile as updated
|
||||
profile.ModifiedUtc = DateTime.UtcNow;
|
||||
profile.FileNames.Clear();
|
||||
_signals.Trigger("MediaProcessing_" + profile.Name + "_Saved");
|
||||
_signals.Trigger("MediaProcessing_Saved_" + profile.Name);
|
||||
|
||||
return RedirectToAction("Edit", "Admin", new {id});
|
||||
}
|
||||
|
@@ -59,7 +59,7 @@ namespace Orchard.MediaProcessing.Services {
|
||||
|
||||
private IDictionary<string, string> GetProfileCache(string profile) {
|
||||
return _cacheManager.Get("MediaProcessing_" + profile, ctx => {
|
||||
ctx.Monitor(_signals.When("MediaProcessing_" + profile + "_Saved"));
|
||||
ctx.Monitor(_signals.When("MediaProcessing_Saved_" + profile));
|
||||
var dictionary = new Dictionary<string, string>();
|
||||
|
||||
var profilePart = _imageProfileService.GetImageProfileByName(profile);
|
||||
|
@@ -11,14 +11,17 @@ namespace Orchard.MediaProcessing.Services {
|
||||
private readonly IContentManager _contentManager;
|
||||
private readonly ICacheManager _cacheManager;
|
||||
private readonly IRepository<FilterRecord> _filterRepository;
|
||||
private readonly ISignals _signals;
|
||||
|
||||
public ImageProfileService(
|
||||
IContentManager contentManager,
|
||||
ICacheManager cacheManager,
|
||||
IRepository<FilterRecord> filterRepository) {
|
||||
IRepository<FilterRecord> filterRepository,
|
||||
ISignals signals) {
|
||||
_contentManager = contentManager;
|
||||
_cacheManager = cacheManager;
|
||||
_filterRepository = filterRepository;
|
||||
_signals = signals;
|
||||
}
|
||||
|
||||
public Localizer T { get; set; }
|
||||
@@ -80,6 +83,8 @@ namespace Orchard.MediaProcessing.Services {
|
||||
.OrderByDescending(x => x.Position)
|
||||
.FirstOrDefault();
|
||||
|
||||
_signals.Trigger("MediaProcessing_Saved_" + filter.ImageProfilePartRecord.Name);
|
||||
|
||||
// nothing to do if already at the top
|
||||
if (previous == null) {
|
||||
return;
|
||||
|
Reference in New Issue
Block a user