if (!req.params.name) | if (!req.params.name) | ||||
return; | return; | ||||
var name = req.params.name.toLowerCase(); | |||||
var name = req.params.name.toLowerCase().trim(); | |||||
db.list.push(name); | db.list.push(name); | ||||
events.emit("add", { name: name, index: db.list.length - 1 }); | events.emit("add", { name: name, index: db.list.length - 1 }); |
#add { | #add { | ||||
margin-top: 12px; | margin-top: 12px; | ||||
} | } | ||||
#add .name, | |||||
#add .submit { | |||||
-webkit-appearance: none; | |||||
font-size: 16px; | |||||
border: 1px solid #aaa; | |||||
border-radius: 5px; | |||||
background-color: #fff; | |||||
} | |||||
#add .name { | #add .name { | ||||
width: 80%; | width: 80%; | ||||
height: 30px; | height: 30px; | ||||
border-top-right-radius: 0px; | |||||
border-bottom-right-radius: 0px; | |||||
} | } | ||||
#add .submit { | #add .submit { | ||||
width: 10%; | width: 10%; | ||||
height: 30px; | height: 30px; | ||||
background-color: #eee; | |||||
border-top-left-radius: 0px; | |||||
border-bottom-left-radius: 0px; | |||||
} | } | ||||
#add .name, | |||||
#add .submit { | |||||
font-size: 16px; | |||||
#add .submit:hover { | |||||
background-color: #ddd; | |||||
} | } | ||||
#add .suggestions { | #add .suggestions { | ||||
transition: opacity 0.2s; | transition: opacity 0.2s; | ||||
border-radius: 100px; | border-radius: 100px; | ||||
background-color: #eee; | background-color: #eee; | ||||
} | } | ||||
#list .elem .ok:hover { | |||||
background-color: #ddd; | |||||
} |