【问题标题】:How can I position a jQuery dialog, using htmlService如何使用 htmlService 定位 jQuery 对话框
【发布时间】:2014-11-21 18:26:24
【问题描述】:

jQuery 位置使用 caja 中不支持的“Fixed”,因此简单的 position: {my: "top", at: "top", of: $("#here")} 将无法与 htmlService 一起使用。所以要移动我的小部件,我必须使用 css 并将位置更改为绝对位置。

有什么方法可以让我使用 htmlService 获得与position: {my: "top", at: "top", of: $("#here")} 相同的效果?

或者我可以使用 jQuery 对话框的替代方法吗?当有人在不离开侧边栏的情况下单击按钮时,我会打开一个简单的提示。

【问题讨论】:

  • 我放弃了,只是使用 htmlService 创建了单独的对话框,而不是尝试使用 jQuery 对话框功能。

标签: jquery css google-apps-script google-caja


【解决方案1】:

我看到您希望在单击按钮时出现一个对话框。为此,您可以参考以下这些文档:

  1. https://developers.google.com/apps-script/guides/ui-service#CustomHTML

  2. https://developers.google.com/apps-script/guides/dialogs#alert_dialogs

希望有帮助!

【讨论】:

  • 感谢您的回复,我过去使用过那些,对于附加组件,我们被要求使用 htmlService 而不是 ui-service。而且 alert_dialogs 也不符合公共插件所需的 UI 样式。
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 2011-01-05
  • 1970-01-01
  • 1970-01-01
  • 2011-12-22
  • 1970-01-01
  • 1970-01-01
  • 2012-04-11
相关资源
最近更新 更多