Merge branch 'feature/long_title' of https://github.com/ONLYOFFICE/web-apps into feature/long_title

This commit is contained in:
Maxim Kadushkin 2022-04-25 17:56:28 +03:00
commit 2e04f94434

View file

@ -657,9 +657,9 @@ define([
this.fileExtention = this.documentCaption.substring(idx); this.fileExtention = this.documentCaption.substring(idx);
this.isModified && (value += '*'); this.isModified && (value += '*');
if ( this.labelDocName ) { if ( this.labelDocName ) {
this.labelDocName.val( value ); this.setDocTile( value );
// this.labelDocName.attr('size', value.length); // this.labelDocName.attr('size', value.length);
this.setCanRename(this.options.canRename); //this.setCanRename(this.options.canRename);
//this.setCanRename(true); //this.setCanRename(true);
} }
@ -676,7 +676,7 @@ define([
var _name = this.documentCaption; var _name = this.documentCaption;
changed && (_name += '*'); changed && (_name += '*');
this.labelDocName.val(_name); this.setDocTile(_name);
}, },
setCanBack: function (value, text) { setCanBack: function (value, text) {
@ -749,7 +749,7 @@ define([
}, },
cutDocName: function(name) { cutDocName: function(name) {
if(name.length <= this.fileExtention.length) return; if(name.length <= this.fileExtention.length) return name;
var idx =name.length - this.fileExtention.length; var idx =name.length - this.fileExtention.length;
return (name.substring(idx) == this.fileExtention) ? name.substring(0, idx) : name ; return (name.substring(idx) == this.fileExtention) ? name.substring(0, idx) : name ;