Various fixes

- Upload form: outlook
- Upload form: removed no files warning
- Upload form: fixed pasting empty text
- Forms: width of form elements
- Users: restored missing stylesheet
This commit is contained in:
Marcin Kurczewski 2013-10-25 14:55:18 +02:00
parent 7d6bab9590
commit febf22a667
5 changed files with 42 additions and 39 deletions

View file

@ -280,8 +280,11 @@ form.aligned input[type=checkbox] {
.input-wrapper input,
.input-wrapper textarea,
.input-wrapper select {
width: 80%;
max-width: 80%;
width: 100%;
max-width: 100%;
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
}
label {

View file

@ -8,6 +8,13 @@
float: left;
}
.tab {
margin-bottom: 1em;
}
.tab.url {
display: none;
}
#file-handler-wrapper {
display: table;
width: 100%;
@ -17,7 +24,7 @@
font-size: 150%;
text-align: center;
vertical-align: middle;
height: 300px;
height: 8em;
display: table-cell;
border: 3px dashed #ddd;
}
@ -27,8 +34,9 @@
}
#url-handler textarea {
width: 50%;
height: 6em;
width: 100%;
height: 10em;
margin-bottom: 0.5em;
}
.post .thumbnail {
@ -42,18 +50,17 @@
text-align: center;
display: block;
float: left;
margin-right: 1em;
margin-right: 10px;
}
.post .alert,
#upload-step2,
#upload-no-posts,
#post-template {
display: none;
}
.post {
margin-bottom: 4em;
margin: 2em 0;
}
.post .ops {
@ -107,7 +114,8 @@
}
.post label.left {
display: inline-block;
width: 4em;
width: 60px;
padding-right: 10px;
float: left;
}
.post .safety label:not(.left) {
@ -140,23 +148,10 @@ ul.tagit {
font-size: 1em;
}
.submit-wrapper {
text-align: center;
}
#theSubmit {
margin: 0 auto;
#the-submit {
margin: 0 0 0 205px;
}
.post .form-wrapper {
overflow: hidden;
}
.tab.url {
display: none;
}
.tab {
margin-bottom: 1em;
}
.tab textarea {
margin-bottom: 0.5em;
}

View file

@ -44,7 +44,14 @@ $(function()
$('#url-handler-wrapper button').click(function(e)
{
var urls = $('#url-handler-wrapper textarea').val().split(/\s+/);
var urls = [];
$.each($('#url-handler-wrapper textarea').val().split(/\s+/), function(i, url)
{
url = url.replace(/^\s+|\s+$/, '');
if (url == '')
return;
urls.push(url);
});
$('#url-handler-wrapper textarea').val('');
handleURLs(urls);
});
@ -65,12 +72,8 @@ $(function()
$(this).parents('.post').slideUp(function()
{
$(this).remove();
handleInputs([]);
});
if ($('#upload-step2 .post').length == 1)
{
$('#upload-step2').slideUp();
$('#upload-no-posts').slideDown();
}
});
@ -231,8 +234,9 @@ $(function()
callback(postDom, input);
}
$('#upload-step2').fadeIn(function()
{
});
if ($('.posts .post').length == 0)
$('#upload-step2').fadeOut();
else
$('#upload-step2').fadeIn();
}
});

View file

@ -184,6 +184,7 @@ class UserController
$this->context->transport->user = $user;
$this->context->transport->tab = 'delete';
$this->context->viewName = 'user-view';
$this->context->stylesheets []= 'tabs.css';
$this->context->stylesheets []= 'user-view.css';
$this->context->subTitle = $name;
@ -230,6 +231,7 @@ class UserController
$this->context->transport->user = $user;
$this->context->transport->tab = 'settings';
$this->context->viewName = 'user-view';
$this->context->stylesheets []= 'tabs.css';
$this->context->stylesheets []= 'user-view.css';
$this->context->subTitle = $name;
@ -266,6 +268,7 @@ class UserController
$this->context->transport->user = $user;
$this->context->transport->tab = 'edit';
$this->context->viewName = 'user-view';
$this->context->stylesheets []= 'tabs.css';
$this->context->stylesheets []= 'user-view.css';
$this->context->subTitle = $name;

View file

@ -37,7 +37,7 @@
<div id="file-handler-wrapper">
<div id="file-handler">
Drop files here!<br>
Or just click on this box.<br><br>
Or just click on this box.
</div>
</div>
</div>
@ -45,7 +45,7 @@
<div class="tab url">
<div id="url-handler-wrapper">
<div id="url-handler">
<textarea placeholder="You can also paste some URLs." name="urls"></textarea>
<div class="input-wrapper"><textarea placeholder="Paste some URLs here, one per line." name="urls"></textarea></div>
</div>
<button type="submit">Add</button>
</div>
@ -55,6 +55,8 @@
</div>
<div id="upload-step2" data-redirect-url="<?php echo \Chibi\UrlHelper::route('post', 'list') ?>">
<hr>
<div class="posts">
</div>
@ -115,10 +117,6 @@
</form>
</div>
</div>
<div id="upload-no-posts">
<p class="alert alert-warning">Well, that&rsquo;s disappointing&hellip;</p>
</div>
</div>
<?php endif ?>