PageSourceSearch

https://bangkok-hotels.com/assets/js/custom.js

js bangkok-hotels.com collected 2026-10-10 01:36:27 UTC 1,156 bytes, 46 lines download raw bytes

1/* Write here your custom javascript codes */
2function booleanFormatter(value, row) {
3    if (value == null) {
4        return 'No';
5    }
6    return value ? 'Yes' : 'No';
7}
8
9function checkFileExtension(elem, textBoxName) {
10    var filePath = elem.value;
11
12    if (filePath.indexOf('.') == -1)
13        return false;
14
15    var ext = filePath.substring(filePath.lastIndexOf('.') + 1).toLowerCase();
16
17    if (ext == 'jpg' || ext == 'png') {
18        $('#MainContent_' + textBoxName).val(filePath.substring(filePath.lastIndexOf('\\') + 1).toLowerCase());
19        return true;
20    }
21
22    alert('The file extension ' + ext.toUpperCase() + ' is not allowed!');
23    return false;
24}
25
26function priceFormatter(value, row) {
27    if (value == null) {
28        return '';
29    }
30    var dplaces = value == parseInt(value, 10) ? 0 : 2;
31    return '$' + value.toFixed(dplaces);
32}
33
34function statusFormatter(value, row) {
35    if (value == null) {
36        return 'Inactive';
37    }
38    return value ? 'Active' : 'Inactive';
39}
40
41function stringFormatter(value, row) {
42    if (value == null) {
43        return '';
44    }
45    return value;
46}

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.