Merge branch 'szzh' of http://repository.trustie.net/xianbo/trustie2 into szzh
This commit is contained in:
commit
48cb07c453
|
@ -141,7 +141,7 @@
|
|||
image.wrap(element);
|
||||
}
|
||||
}
|
||||
$('#activity_description_<%= user_activity_id %> a').colorbox({rel:'nofollow', close: "关闭"});
|
||||
$('#activity_description_<%= user_activity_id %> a').colorbox({rel:'nofollow', close: "关闭", returnFocus: false});
|
||||
});
|
||||
|
||||
</script>
|
|
@ -9,7 +9,6 @@
|
|||
span.ke-icon-emoticons:hover{background-position:-79px -671px;width:50px;height:26px;}
|
||||
div.ke-toolbar .ke-outline{border:none;}
|
||||
.ke-inline-block{display: none;}
|
||||
.ke-container{height: 30px !important;}
|
||||
</style>
|
||||
<% user_activities.each do |user_activity|
|
||||
if user_activities %>
|
||||
|
|
|
@ -17,7 +17,8 @@ module RailsKindeditor
|
|||
output_buffer = ActiveSupport::SafeBuffer.new
|
||||
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',
|
||||
afterCreate: 'eval(function(){enablePasteImg(self);})')))
|
||||
:autoHeightMode=>true,
|
||||
afterCreate: 'eval(function(){enablePasteImg(self);this.loadPlugin("autoheight")})')))
|
||||
end
|
||||
|
||||
def kindeditor_upload_json_path(*args)
|
||||
|
|
|
@ -1,14 +1,31 @@
|
|||
function init_editor(params){
|
||||
var minHeight;
|
||||
var editor = params.kindutil.create(params.textarea, {
|
||||
resizeType : 1,minWidth:"1px",width:"100%",height:"80px",
|
||||
resizeType : 1,minWidth:"1px",width:"100%",height:"30px",minHeight:"30px",
|
||||
items:['emoticons'],
|
||||
afterChange:function(){//按键事件
|
||||
nh_check_field({content:this,contentmsg:params.contentmsg,textarea:params.textarea});
|
||||
var edit = this.edit;
|
||||
var body = edit.doc.body;
|
||||
edit.iframe.height(minHeight);
|
||||
this.resize(null, Math.max((params.kindutil.IE ? body.scrollHeight : body.offsetHeight) + 30, minHeight));
|
||||
},
|
||||
afterCreate:function(){
|
||||
var toolbar = $("div[class='ke-toolbar']",params.div_form);
|
||||
$(".ke-outline>.ke-toolbar-icon",toolbar).append('表情');
|
||||
params.toolbar_container.append(toolbar);
|
||||
//init
|
||||
var edit = this.edit;
|
||||
var body = edit.doc.body;
|
||||
edit.iframe[0].scroll = 'no';
|
||||
body.style.overflowY = 'hidden';
|
||||
//reset height
|
||||
var edit = this.edit;
|
||||
var body = edit.doc.body;
|
||||
minHeight = params.kindutil.removeUnit(this.height);
|
||||
edit.iframe.height(minHeight);
|
||||
this.resize(null, Math.max((params.kindutil.IE ? body.scrollHeight : body.offsetHeight)+ 30 , minHeight));
|
||||
|
||||
}
|
||||
}).loadPlugin('paste');
|
||||
return editor;
|
||||
|
|
Loading…
Reference in New Issue