Start
This commit is contained in:
15
ts/ajax_requests.ts
Normal file
15
ts/ajax_requests.ts
Normal file
@@ -0,0 +1,15 @@
|
||||
export function decode_entities_for_select2( encoded: any ){
|
||||
|
||||
let text_area = document.createElement("textarea");
|
||||
text_area.innerHTML = encoded;
|
||||
return text_area.value;
|
||||
|
||||
}
|
||||
|
||||
export function format_state_for_select2( state: any ){
|
||||
|
||||
if( !state.id )
|
||||
return state.text;
|
||||
return jQuery('<span>' + decode_entities_for_select2( state.text ) + '</span>');
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user