Accepting numeric values on common labels
This commit is contained in:
parent
15f04a5790
commit
6fdfd27fe5
@ -17,4 +17,4 @@ Template.registerHelper('concat', (...args) => {
|
||||
});
|
||||
|
||||
// Encode any string into a safe format for HTML id attribute
|
||||
Template.registerHelper('encodeId', string => OHIF.string.encodeId(string));
|
||||
Template.registerHelper('encodeId', OHIF.string.encodeId);
|
||||
|
||||
@ -35,7 +35,9 @@ OHIF.string.search = (object, query, property=null, result=[]) => {
|
||||
};
|
||||
|
||||
// Encode any string into a safe format for HTML id attribute
|
||||
OHIF.string.encodeId = string => {
|
||||
OHIF.string.encodeId = input => {
|
||||
const string = input && input.toString ? input.toString() : input;
|
||||
|
||||
// Return an underscore if the given string is empty or if it's not a string
|
||||
if (string === '' || typeof string !== 'string') {
|
||||
return '_';
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
import { OHIF } from 'meteor/ohif:core';
|
||||
import { Meteor } from 'meteor/meteor';
|
||||
import { Template } from 'meteor/templating';
|
||||
import { _ } from 'meteor/underscore';
|
||||
import { Tracker } from 'meteor/tracker';
|
||||
|
||||
Template.selectTreeCommon.events({
|
||||
'click .select-tree-common label'(event, instance) {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user