MCPcopy Create free account
hub / github.com/EasyIME/PIME / jQueryDialogAlert

Function jQueryDialogAlert

python/input_methods/chewing/js/user_phrase.js:299–335  ·  view source on GitHub ↗
(options)

Source from the content-addressed store, hash-verified

297}
298
299function jQueryDialogAlert(options) {
300 let title = (options.title !== undefined) ? options.title : "";
301 switch (options.icon) {
302 case "error":
303 options.title = `❌ ${title}`;
304 break;
305 case "warning":
306 options.title = `⚠️ ${title}`;
307 break;
308 case "success":
309 options.title = `✔️ ${title}`;
310 break;
311 default:
312 options.title = `📘 ${title}`;
313 break;
314 }
315 $("#jquery_alert").html(options.message).dialog({
316 show: {
317 effect: "scale",
318 duration: 300
319 },
320 hide: {
321 effect: "scale",
322 duration: 300
323 },
324 width: 600,
325 resizable: false,
326 modal: true,
327 title: title,
328 buttons: {
329 'Ok': function() {
330 $(this).dialog('close');
331 }
332 },
333 ...options
334 });
335}
336
337// jQuery ready
338$(function() {

Callers 3

onAddPhraseFunction · 0.85
onRemovePhraseFunction · 0.85
onImportPhraseFunction · 0.85

Calls 1

$Function · 0.70

Tested by

no test coverage detected