0

特定の日時で Thunderbrid-lightning-create イベント ダイアログを開きたいと思います。現在私は持っています:

window.open("chrome://calendar/content/calendar-event-dialog.xul",
                      "xulschoolhello-some-window",
                      "chrome,centerscreen")

期待どおりにダイアログが開きます。日付と時刻を設定するにはどうすればよいですか?

4

1 に答える 1

0

手動で行う場合は、434 行目でいくつかのウィンドウ引数も定義しているopenEventDialog関数を確認してください。

/**
 * Opens the event dialog with the given item (task OR event)
 *
 * @param calendarItem      The item to open the dialog with
 * @param calendar          The calendar to open the dialog with.
 * @param mode              The operation the dialog should do ("new", "modify")
 * @param callback          The callback to call when the dialog has completed.
 * @param job               (optional) The job object for the modification.
 * @param initialDate       (optional) The initial date for new task datepickers
 */
function openEventDialog(calendarItem, calendar, mode, callback, job, initialDate) 

この関数は、Thunderbird のメイン ウィンドウの window オブジェクトで直接呼び出すことができます。これは、たとえば、最終的にこの関数を呼び出すスクリプト ブロックを持つウィンドウに XUL オーバーレイを追加することによって実行できます。

于 2016-11-27T13:30:50.627 に答える