mirror of
https://github.com/ONLYOFFICE/web-apps.git
synced 2026-07-25 12:18:47 +08:00
[DE] Caption Dialog (saving labels in json)
This commit is contained in:
@ -170,8 +170,7 @@ define([
|
||||
arr = Common.localStorage.getItem("de-settings-captions") || '';
|
||||
Common.Utils.InternalSettings.set("de-settings-captions", arr);
|
||||
}
|
||||
arr = arr ? arr.split(';') : [];
|
||||
arr = _.map(arr, function(str){ return { displayValue: str, value: str, type: 1 }; });
|
||||
arr = arr ? JSON.parse(arr) : [];
|
||||
|
||||
// 0 - not removable
|
||||
this.arrLabel = arr.concat([{ displayValue: this.textEquation, value: this.textEquation, type: 0 },
|
||||
@ -352,9 +351,10 @@ define([
|
||||
},
|
||||
|
||||
close: function() {
|
||||
var val = _.pluck(_.where(this.arrLabel, {type: 1}), 'displayValue').join(';');
|
||||
Common.localStorage.setItem("de-settings-captions", val);
|
||||
Common.Utils.InternalSettings.set("de-settings-captions", val);
|
||||
var val = _.where(this.arrLabel, {type: 1}),
|
||||
valJson = JSON.stringify(val);
|
||||
Common.localStorage.setItem("de-settings-captions", valJson);
|
||||
Common.Utils.InternalSettings.set("de-settings-captions", valJson);
|
||||
|
||||
Common.Views.AdvancedSettingsWindow.prototype.close.apply(this, arguments);
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user