This commit is contained in:
Marcin Kurczewski 2013-10-25 09:56:55 +02:00
parent d3eaf27bdc
commit 89826a0be9
2 changed files with 17 additions and 20 deletions

View file

@ -45,6 +45,7 @@ $(function()
$('#url-handler-wrapper button').click(function(e)
{
var urls = $('#url-handler-wrapper textarea').val().split(/\s+/);
$('#url-handler-wrapper textarea').val('');
handleURLs(urls);
});
@ -198,28 +199,25 @@ $(function()
function handleInputs(inputs, callback)
{
$('#upload-step1').fadeOut(function()
for (var i = 0; i < inputs.length; i ++)
{
for (var i = 0; i < inputs.length; i ++)
{
var input = inputs[i];
var postDom = $('#post-template').clone(true);
postDom.find('form').submit(false);
postDom.removeAttr('id');
var input = inputs[i];
var postDom = $('#post-template').clone(true);
postDom.find('form').submit(false);
postDom.removeAttr('id');
$('.posts').append(postDom);
$('.posts').append(postDom);
postDom.show();
var tagItOptions = getTagItOptions();
tagItOptions.availableTags = tags;
tagItOptions.placeholderText = $('.tags input').attr('placeholder');
$('.tags input', postDom).tagit(tagItOptions);
postDom.show();
var tagItOptions = getTagItOptions();
tagItOptions.availableTags = tags;
tagItOptions.placeholderText = $('.tags input').attr('placeholder');
$('.tags input', postDom).tagit(tagItOptions);
callback(postDom, input);
}
$('#upload-step2').fadeIn(function()
{
});
callback(postDom, input);
}
$('#upload-step2').fadeIn(function()
{
});
}
});

View file

@ -47,7 +47,7 @@
<div id="url-handler">
<textarea placeholder="You can also paste some URLs." name="urls"></textarea>
</div>
<button type="submit">Submit</button>
<button type="submit">Add</button>
</div>
</div>
@ -118,7 +118,6 @@
<div id="upload-no-posts">
<p class="alert alert-warning">Well, that&rsquo;s disappointing&hellip;</p>
<p><a href="<?php echo \Chibi\UrlHelper::route('post', 'list') ?>">Back to post list</a> or <a href="<?php echo \Chibi\UrlHelper::route('post', 'upload') ?>">try uploading again</a>.</p>
</div>
</div>