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