mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-07-20 18:18:56 +00:00
feature(menu) getItem: add icon processing
This commit is contained in:
parent
e1d22955af
commit
9cb4c28840
1 changed files with 11 additions and 6 deletions
|
|
@ -98,12 +98,17 @@ var CloudCmd, Util, DOM, CloudFunc, $;
|
|||
* get menu item
|
||||
*/
|
||||
function getItem(pName, pCallBack) {
|
||||
var name = pName,
|
||||
icon = name && name.toLowerCase(),
|
||||
lRet = {
|
||||
name : pName,
|
||||
icon : icon
|
||||
};
|
||||
var lRet,
|
||||
name = pName,
|
||||
icon = name && name.toLowerCase();
|
||||
|
||||
icon = Util.removeStr(icon, ['(', ')']);
|
||||
icon = Util.replaceStr(icon, ' ', '-');
|
||||
|
||||
lRet = {
|
||||
name : pName,
|
||||
icon : icon
|
||||
};
|
||||
|
||||
if (Util.isFunction(pCallBack))
|
||||
lRet.callback = pCallBack;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue