mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-07-20 18:18:56 +00:00
refactor(menu) getItem: getStrSmallFirst -> toLowerCase
This commit is contained in:
parent
f44e89d3a4
commit
b0f6807ba7
2 changed files with 1 additions and 13 deletions
|
|
@ -99,7 +99,7 @@ var CloudCmd, Util, DOM, CloudFunc, $;
|
|||
*/
|
||||
function getItem(pName, pCallBack) {
|
||||
var name = pName,
|
||||
icon = Util.getStrSmallFirst(name),
|
||||
icon = name && name.toLowerCase(),
|
||||
lRet = {
|
||||
name : pName,
|
||||
icon : icon
|
||||
|
|
|
|||
12
lib/util.js
12
lib/util.js
|
|
@ -381,18 +381,6 @@
|
|||
return lRet;
|
||||
};
|
||||
|
||||
this.getStrSmallFirst = function(pStr) {
|
||||
var lRet;
|
||||
|
||||
if (Util.isString(pStr) && pStr.length > 0)
|
||||
lRet = pStr[0].toLowerCase() +
|
||||
pStr.substring(1);
|
||||
else
|
||||
lRet = pStr;
|
||||
|
||||
return lRet;
|
||||
};
|
||||
|
||||
/**
|
||||
* function returns is pStr1 contains pStr2
|
||||
* @param pStr1
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue