From da15391910d9566c394b5dfbc07fa18712e832ec Mon Sep 17 00:00:00 2001 From: Alon Levy Date: Wed, 8 Apr 2015 00:59:31 +0300 Subject: client: item_view: make type dropdown domain based --- src/client/util.js | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/client/util.js') diff --git a/src/client/util.js b/src/client/util.js index 763623af..88226a4d 100644 --- a/src/client/util.js +++ b/src/client/util.js @@ -228,6 +228,12 @@ define(['jquery'], function($) { return ret; } + // String utilities + function capitalize(word) { + if (word.length == 0) return ''; + return word.slice(0, 1).toUpperCase() + word.slice(1, word.length); + } + // logging helpers function log_error(msg) { console.log('error: ' + msg); @@ -248,6 +254,8 @@ define(['jquery'], function($) { setSelection: setSelection, selectionStart: selectionStart, + capitalize: capitalize, + log_error: log_error, }; }); -- cgit v1.3.1