Browse Source

Add abp.message.prompt method with warning

Introduces abp.message.prompt to display a browser prompt and invoke a callback with the result. Logs a warning indicating the method is not fully implemented.
pull/23915/head
enisn 4 months ago
parent
commit
0661d1a091
No known key found for this signature in database GPG Key ID: A052619F04155D1C
  1. 11
      npm/packs/core/src/abp.js

11
npm/packs/core/src/abp.js

@ -340,6 +340,17 @@ var abp = abp || {};
callback && callback(result);
};
abp.message.prompt = function (message, titleOrOptionsOrCallback, callback) {
abp.log.warn('abp.message.prompt is not properly implemented!');
if (titleOrOptionsOrCallback && !(typeof titleOrOptionsOrCallback == 'string')) {
callback = titleOrOptionsOrCallback;
}
var result = prompt(message);
callback && callback(result);
};
/* UI *******************************************************/
abp.ui = abp.ui || {};

Loading…
Cancel
Save