Changed post upload to select first, not last row
This commit is contained in:
parent
c6d5a130e4
commit
428a1ae18c
2 changed files with 11 additions and 5 deletions
1
TODO
1
TODO
|
@ -2,7 +2,6 @@ This is transient file that lists functionalities to be implemented before
|
|||
first major release.
|
||||
|
||||
- autocomplete: don't show items that are already used in tag list (unsure)
|
||||
- posts/upload: when adding multiple files, select first one, not last one
|
||||
- posts/upload: better hotkeys for going to next post
|
||||
- posts/upload: get rid of suggested tags after selecting next post
|
||||
- posts/upload: ability to paste many urls (unsure)
|
||||
|
|
|
@ -107,12 +107,18 @@ App.Presenters.PostUploadPresenter = function(
|
|||
}
|
||||
}
|
||||
$input.val('');
|
||||
addPostFromUrl(url);
|
||||
var post = addPostFromUrl(url);
|
||||
selectPostTableRow(post);
|
||||
}
|
||||
|
||||
function fileHandlerChanged(files) {
|
||||
for (var i = 0; i < files.length; i ++) {
|
||||
addPostFromFile(files[i]);
|
||||
if (files.length > 0) {
|
||||
var posts = [];
|
||||
for (var i = 0; i < files.length; i ++) {
|
||||
var post = addPostFromFile(files[i]);
|
||||
posts.push(post);
|
||||
}
|
||||
selectPostTableRow(_.first(posts));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -251,6 +257,7 @@ App.Presenters.PostUploadPresenter = function(
|
|||
});
|
||||
|
||||
postAdded(post);
|
||||
return post;
|
||||
}
|
||||
|
||||
function addPostFromUrl(url) {
|
||||
|
@ -266,6 +273,7 @@ App.Presenters.PostUploadPresenter = function(
|
|||
post.thumbnail = url;
|
||||
postThumbnailLoaded(post);
|
||||
}
|
||||
return post;
|
||||
}
|
||||
|
||||
function createPostTableRow(post) {
|
||||
|
@ -286,7 +294,6 @@ App.Presenters.PostUploadPresenter = function(
|
|||
|
||||
postChanged(post);
|
||||
|
||||
selectPostTableRow(post);
|
||||
showOrHidePostsTable();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue