mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-14 13:33:14 +00:00
Add notification for editing search / replace
This commit is contained in:
@@ -95,6 +95,7 @@ class Language implements ControllerProviderInterface
|
||||
$out['FeedBackDuration'] = _('Time for feedback (days)');
|
||||
$out['send'] = _('Send');
|
||||
$out['Recept'] = _('Accuse de reception');
|
||||
$out['nFieldsChanged'] = _('%d fields have been updated');
|
||||
$out['FeedBackNoUsersSelected'] = _('No users selected');
|
||||
|
||||
$Serializer = $app['Core']['Serializer'];
|
||||
|
@@ -446,9 +446,11 @@
|
||||
console.error('Unable to set a value to a readonly field');
|
||||
}
|
||||
|
||||
return;
|
||||
return 0;
|
||||
}
|
||||
|
||||
var n = 0;
|
||||
|
||||
for(d in this.datas)
|
||||
{
|
||||
if(this.datas[d].getVocabularyId() !== null)
|
||||
@@ -463,6 +465,9 @@
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
n++;
|
||||
|
||||
this.removeValue(value);
|
||||
|
||||
if(!this.hasValue(replacedValue))
|
||||
@@ -473,11 +478,7 @@
|
||||
this.options.dirty = true;
|
||||
}
|
||||
|
||||
/**
|
||||
* cleanup and remove duplicates
|
||||
*/
|
||||
|
||||
return this;
|
||||
return n;
|
||||
},
|
||||
exportDatas : function() {
|
||||
|
||||
|
@@ -1454,7 +1454,7 @@ function replace()
|
||||
|
||||
search = new RegExp(r_search, commut);
|
||||
|
||||
var r, f;
|
||||
var r, f, n = 0;
|
||||
for(r in p4.edit.T_records)
|
||||
{
|
||||
if(!p4.edit.T_records[r]._selected)
|
||||
@@ -1463,10 +1463,13 @@ function replace()
|
||||
{
|
||||
if(field == '' || field==f)
|
||||
{
|
||||
p4.edit.T_records[r].fields[f].replaceValue(search, replace);
|
||||
n += p4.edit.T_records[r].fields[f].replaceValue(search, replace);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
humane.info($.sprintf(language.nFieldsChanged, n));
|
||||
|
||||
updateEditSelectedRecords(null);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user