(e, dialog, callback)
| 1129 | |
| 1130 | // Handle the invoked dialog callback |
| 1131 | function processCallback(e, dialog, callback) { |
| 1132 | e.stopPropagation(); |
| 1133 | e.preventDefault(); |
| 1134 | |
| 1135 | // By default we assume a callback will get rid of the dialog, although it is given the opportunity to override this |
| 1136 | |
| 1137 | // If the callback can be invoked and it *explicitly returns false*, then we'll set a flag to keep the dialog active... |
| 1138 | let preserveDialog = typeof callback === 'function' && callback.call(dialog, e) === false; |
| 1139 | |
| 1140 | // ... otherwise we'll bin it |
| 1141 | if (!preserveDialog) { |
| 1142 | dialog.modal('hide'); |
| 1143 | } |
| 1144 | } |
| 1145 | |
| 1146 | // Validate `min` and `max` values based on the current `inputType` value |
| 1147 | function minAndMaxAreValid(type, min, max) { |
no outgoing calls
no test coverage detected
searching dependent graphs…