added autocomplete to select user form

This commit is contained in:
Sacha Greif 2013-07-19 12:17:49 +09:00
parent 2fe94d611f
commit c866cb6238
8 changed files with 71 additions and 5 deletions

View file

@ -1552,6 +1552,16 @@ input[type="submit"], button, .button, .auth-buttons #login-buttons #login-butto
width: 80%;
display: block; }
/* line 127, ../sass/modules/_forms.scss */
.ui-autocomplete {
background: white;
width: 200px!important;
padding: 10px;
font-size: 14px;
-webkit-box-shadow: 0 1px 1px rgba(0, 0, 0, 0.15);
-moz-box-shadow: 0 1px 1px rgba(0, 0, 0, 0.15);
box-shadow: 0 1px 1px rgba(0, 0, 0, 0.15); }
/* line 1, ../sass/modules/_dialogs.scss */
.dialog {
margin-bottom: 10px; }

17
client/js/jquery-ui-autocomplete.js vendored Normal file

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View file

@ -123,4 +123,11 @@ input[type="submit"], button, .button, .btn{
float:left;
width:80%;
display:block;
}
.ui-autocomplete{
background: white;
width: 200px!important;
padding:10px;
font-size:14px;
@include box-shadow(0 1px 1px black(0.15));
}

View file

@ -67,6 +67,9 @@ Template.post_edit.rendered = function(){
$('#submitted_date').datepicker();
}
$("#postUser").selectToAutocomplete();
}
Template.post_edit.events = {

View file

@ -21,6 +21,9 @@ Template.post_submit.rendered = function(){
$('#submitted').datepicker().on('changeDate', function(ev){
$('#submitted_hidden').val(moment(ev.date).valueOf());
});
$("#postUser").selectToAutocomplete();
}
Template.post_submit.events = {

View file

@ -50,10 +50,6 @@ getDateRange= function(pageNumber){
// // some of the post's categories weren't found in the database
// return _.filter(postCategories, function(e){return e});
// }
getDomain = function(url){
urlObject = Npm.require('url');
return urlObject.parse(url).hostname;
}
// ---------------------------------- URL Helper Functions ----------------------------------- //
getPostUrl = function(id){
return Meteor.absoluteUrl()+'posts/'+id;
@ -81,6 +77,10 @@ slugify = function(text) {
getShortUrl = function(post){
return post.shortUrl ? post.shortUrl : post.url;
}
getDomain = function(url){
urlObject = Npm.require('url');
return urlObject.parse(url).hostname;
}
// ---------------------------------- String Helper Functions ----------------------------------- //
cleanUp = function(s){

View file

@ -2,7 +2,7 @@
"meteor": {},
"packages": {
"router": {},
"moment": {},
"momentjs": {},
"database-forms": {
"git":"git://github.com/SachaG/database-forms.git"
},