mirror of
https://github.com/lxsang/antd-web-apps
synced 2024-12-28 02:08:22 +01:00
commit
47eab0a1dc
@ -56,6 +56,7 @@
|
|||||||
$(document).ready(function() {
|
$(document).ready(function() {
|
||||||
var options = {
|
var options = {
|
||||||
target: "quick_talk_comment_thread",
|
target: "quick_talk_comment_thread",
|
||||||
|
page: "desktop",
|
||||||
api_uri: "https://chat.iohub.dev/comment",
|
api_uri: "https://chat.iohub.dev/comment",
|
||||||
uri: "<?=url?>",
|
uri: "<?=url?>",
|
||||||
author: {
|
author: {
|
||||||
|
@ -4,6 +4,9 @@ class QuickTalk {
|
|||||||
if (typeof this.options.target === "string") {
|
if (typeof this.options.target === "string") {
|
||||||
this.options.target = document.getElementById(this.options.target);
|
this.options.target = document.getElementById(this.options.target);
|
||||||
}
|
}
|
||||||
|
if (typeof this.options.page && typeof this.options.page === "string") {
|
||||||
|
this.options.page = document.getElementById(this.options.page);
|
||||||
|
}
|
||||||
this.preview_on = false;
|
this.preview_on = false;
|
||||||
this.instant_compose = undefined;
|
this.instant_compose = undefined;
|
||||||
let editor = document.createElement("div");
|
let editor = document.createElement("div");
|
||||||
@ -196,6 +199,9 @@ class QuickTalk {
|
|||||||
container.appendChild(preview);
|
container.appendChild(preview);
|
||||||
container.appendChild(footer);
|
container.appendChild(footer);
|
||||||
at.appendChild(container);
|
at.appendChild(container);
|
||||||
|
if (this.options.page) {
|
||||||
|
this.options.page.scrollTop = this.options.page.scrollHeight;
|
||||||
|
}
|
||||||
//container.scrollIntoView();
|
//container.scrollIntoView();
|
||||||
return container;
|
return container;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user