暂时去掉 工具栏聚焦和不聚焦的时候 的隐藏和显示控制
This commit is contained in:
parent
98ba28ab3d
commit
5f8d21f1cb
|
@ -9,9 +9,7 @@ module RailsKindeditor
|
||||||
output << text_area_tag(name, content, input_html)
|
output << text_area_tag(name, content, input_html)
|
||||||
output << javascript_tag(js_replace(id, options.merge(window_onload: 'true',
|
output << javascript_tag(js_replace(id, options.merge(window_onload: 'true',
|
||||||
:autoHeightMode=>true,
|
:autoHeightMode=>true,
|
||||||
afterCreate: 'eval(function(){enablePasteImg(self);this.loadPlugin("autoheight");$(this.toolbar.div).hide();})',
|
afterCreate: 'eval(function(){enablePasteImg(self);this.loadPlugin("autoheight")})'
|
||||||
afterFocus:'eval(function(){$(this.toolbar.div).show(); })',
|
|
||||||
afterBlur:'eval(function(){if(this.edit.html().trim() == "" ){$(this.toolbar.div).hide();}})'
|
|
||||||
)))
|
)))
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -23,9 +21,7 @@ module RailsKindeditor
|
||||||
output_buffer << build_text_area_tag(name, method, self, options, input_html)
|
output_buffer << build_text_area_tag(name, method, self, options, input_html)
|
||||||
output_buffer << javascript_tag(js_replace(input_html['id'],options.merge(window_onload: 'true',
|
output_buffer << javascript_tag(js_replace(input_html['id'],options.merge(window_onload: 'true',
|
||||||
:autoHeightMode=>true,
|
:autoHeightMode=>true,
|
||||||
afterCreate: 'eval(function(){enablePasteImg(self);this.loadPlugin("autoheight");$(this.toolbar.div).hide();})',
|
afterCreate: 'eval(function(){enablePasteImg(self);this.loadPlugin("autoheight")})'
|
||||||
afterFocus:' eval(function(){$(this.toolbar.div).show(); })',
|
|
||||||
afterBlur:'eval(function(){if(this.edit.html().trim() == ""){$(this.toolbar.div).hide();}})'
|
|
||||||
)))
|
)))
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -3931,8 +3931,6 @@ _extend(KToolbar, KWidget, {
|
||||||
pdiv = $("#define",container);
|
pdiv = $("#define",container);
|
||||||
}else if(!$("#full",container).is(':hidden')){
|
}else if(!$("#full",container).is(':hidden')){
|
||||||
pdiv = $("#full",container);
|
pdiv = $("#full",container);
|
||||||
}else{ //都隐藏的情况下
|
|
||||||
pdiv = $("#define",container);
|
|
||||||
}
|
}
|
||||||
return (this._itemMap[name] = K('span.ke-icon-' + name, pdiv).parent());
|
return (this._itemMap[name] = K('span.ke-icon-' + name, pdiv).parent());
|
||||||
},
|
},
|
||||||
|
@ -4730,17 +4728,11 @@ function _bindTabEvent() {
|
||||||
function _bindFocusEvent() {
|
function _bindFocusEvent() {
|
||||||
var self = this;
|
var self = this;
|
||||||
K(self.edit.textarea[0], self.edit.win).focus(function(e) {
|
K(self.edit.textarea[0], self.edit.win).focus(function(e) {
|
||||||
if(typeof self.afterFocus == 'string'){
|
if (self.afterFocus) {
|
||||||
self.afterFocus = eval(self.afterFocus);
|
|
||||||
}
|
|
||||||
if ( typeof self.afterFocus == 'function') {
|
|
||||||
self.afterFocus.call(self, e);
|
self.afterFocus.call(self, e);
|
||||||
}
|
}
|
||||||
}).blur(function(e) {
|
}).blur(function(e) {
|
||||||
if(typeof self.afterBlur == 'string'){
|
if (self.afterBlur) {
|
||||||
self.afterBlur = eval(self.afterBlur);
|
|
||||||
}
|
|
||||||
if ( typeof self.afterBlur == 'function') {
|
|
||||||
self.afterBlur.call(self, e);
|
self.afterBlur.call(self, e);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue