Fix rib-doc-name
This commit is contained in:
parent
1ddc70848d
commit
a8df71a54c
|
@ -352,8 +352,8 @@ define([
|
|||
var name = me.labelDocName.val();
|
||||
if ( e.keyCode == Common.UI.Keys.RETURN ) {
|
||||
name = name.trim();
|
||||
me.isSaveDocName =true;
|
||||
if ( !_.isEmpty(name) && me.cutDocName(me.documentCaption) !== name ) {
|
||||
me.isSaveDocName =true;
|
||||
if ( /[\t*\+:\"<>?|\\\\/]/gim.test(name) ) {
|
||||
_.defer(function() {
|
||||
Common.UI.error({
|
||||
|
@ -378,7 +378,6 @@ define([
|
|||
}
|
||||
|
||||
} else {
|
||||
|
||||
Common.NotificationCenter.trigger('edit:complete', me);
|
||||
}
|
||||
} else
|
||||
|
@ -660,10 +659,6 @@ define([
|
|||
this.isModified && (value += '*');
|
||||
if ( this.labelDocName ) {
|
||||
this.setDocTile( value );
|
||||
// this.labelDocName.attr('size', value.length);
|
||||
//this.setCanRename(this.options.canRename);
|
||||
|
||||
//this.setCanRename(true);
|
||||
}
|
||||
return value;
|
||||
},
|
||||
|
@ -709,7 +704,6 @@ define([
|
|||
|
||||
setCanRename: function (rename) {
|
||||
//rename = true; //comment out for merge
|
||||
|
||||
var me = this;
|
||||
me.options.canRename = rename;
|
||||
if ( me.labelDocName ) {
|
||||
|
@ -734,7 +728,8 @@ define([
|
|||
'paste': function (e) {
|
||||
setTimeout(function() {
|
||||
var name = me.cutDocName(me.labelDocName.val());
|
||||
me.setDocTile(name); });
|
||||
me.setDocTile(name);
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
|
|
|
@ -94,6 +94,7 @@
|
|||
flex-grow: 1;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
padding: 4px 0px;
|
||||
}
|
||||
|
||||
#rib-doc-name {
|
||||
|
@ -102,13 +103,20 @@
|
|||
overflow: hidden;
|
||||
min-width: 50px;
|
||||
text-align: center;
|
||||
|
||||
color: @text-toolbar-header-ie;
|
||||
color: @text-toolbar-header;
|
||||
background-color: transparent;
|
||||
border: 0 none;
|
||||
padding: 1px 5px;
|
||||
cursor: default;
|
||||
line-height: 32px;
|
||||
line-height: 24px;
|
||||
|
||||
&:hover,&:focus {
|
||||
box-shadow: 0 0 0 1px @highlight-header-button-hover-ie;
|
||||
box-shadow: 0 0 0 1px @highlight-header-button-hover;
|
||||
border-radius: 1px;
|
||||
cursor: text;
|
||||
}
|
||||
}
|
||||
|
||||
#rib-save-status {
|
||||
|
|
Loading…
Reference in a new issue