指定した場所に拡張機能の新しいiframeインスタンスを作成します。
zohobugtracker.invoke('modal.create',modal_location);
| 引数名 | データ型 | 説明 |
| action | 文字列 | 'modal.create' - モーダルボックスを作成または開きます。 |
| modal_location | オブジェクト | 呼び出すHTMLファイルの相対パスです。例:{'url':'/app/choosefiles.html'}; |
ウィジェットIDと文字列定数が出力として生成されます。
指定した場所ですでに開かれている拡張機能のiframeインスタンスを閉じます。
zohobugtracker.invoke('modal.close',modalInfo.widgetID);
| 引数名 | データ型 | 説明 |
| action | 文字列 | 'modal.close' - 開いているモーダルボックスを閉じます。 |
| widgetID | オブジェクト | 'modal.create'の出力として生成されたwidgetIDをこちらに渡す必要があります。 |
拡張機能のiframeインスタンスを指定したサイズに変更します。
zohobugtracker.invoke('modal.resize', resize_modal);
| 引数名 | データ型 | 説明 |
| action | 文字列 | 'modal.resize' - モーダルボックスの初期サイズを拡大します。 |
| resize_modal | オブジェクト | 呼び出すHTMLファイルの相対パスです。例:{'width': 600, 'height': 400}; 許容される高さの最小値と最大値:380px、450px。 許容される幅の最小値と最大値:550px、850px。 |
ウィジェットIDと文字列定数が出力として生成されます。
指定した場所に拡張機能に関連する通知を表示します。現在はバグタブでのみサポートされています。
zohobugtracker.invoke('showNotification', notification_details);
| 引数名 | データ型 | 説明 |
| action | 文字列 | 'showNotification' |
| notification_details | オブジェクト |
例:{notificationData:'5'} このキーに対応付けられた値が通知として表示されます。 |
ファイルを添付するために指定した場所で開かれた拡張機能のiframeインスタンスを閉じます。
zohobugtracker.invoke('attachment_picker.close');
特定のウィジェットのインスタンスを作成します。
zohobugtracker.instance(widget_ID);
| 引数名 | データ型 | 説明 |
| ID | 文字列 | invokeメソッドから生成されたウィジェットIDです。 |
現在の場所からデータを送信します。
zohobugtracker.emit('KeyforMyListener', data);
emitメソッドからのデータを待ち受ける、または受信します。
zohobugtracker.on('KeyforMyListener', data);
var modal_location={'url':'/apps/file.html'};
zohobugtracker.invoke('modal.create',modal_location).then(function(modalInfo){
var modalInstance=zohobugtracker.instance(modalInfo.widgetID);
modalInstance.on('modal.opened', function(){ /* This code listens for the status 'modal.opened' from the child HTML - file.html */
var data = {org: '1234'};
modalInstance.emit('submit', data);
});/* This code throws a status 'submit' along with an object to the child HTML - file.html*/
modalInstance.on('submitted',function(data){
/*This code listens for a status with the key 'submitted' from the child HTML*/
zohobugtracker.invoke('modal.close', modalInfo.widgetID);
});
var filedetails = {'filename': 'abc'};
zohobugtracker.on('submit', function (data) {});
/*This code listens for an event with the key 'submit' from the parent file index.html */
zohobugtracker.emit('submitted', filedetails);
/* This code throws a status 'submitted' along with an object to the parent file index.html */
成功または失敗のアラートを設定して表示します。
zohobugtracker.invoke('alert', {
type: 'success', //or 'failure'
data: 'Permission granted successfully'
});