input/form switching cleanup
This commit is contained in:
parent
4a7604daa2
commit
03b8a065cf
|
@ -21,7 +21,7 @@
|
|||
#new>ul>li { height:20px; margin:.3em; padding-left:2em; padding-bottom:0.1em;
|
||||
background-repeat:no-repeat; cursor:pointer; }
|
||||
#new>ul>li>p { cursor:pointer; }
|
||||
#new>ul>li>input { padding:0.3em; margin:-0.3em; }
|
||||
#new>ul>li>form>input { padding:0.3em; margin:-0.3em; }
|
||||
|
||||
#upload {
|
||||
height:27px; padding:0; margin-left:0.2em; overflow:hidden;
|
||||
|
|
|
@ -477,7 +477,7 @@ $(document).ready(function() {
|
|||
$('#new').removeClass('active');
|
||||
$('#new li').each(function(i,element){
|
||||
if($(element).children('p').length==0){
|
||||
$(element).children('input').remove();
|
||||
$(element).children('form').remove();
|
||||
$(element).append('<p>'+$(element).data('text')+'</p>');
|
||||
}
|
||||
});
|
||||
|
@ -505,8 +505,8 @@ $(document).ready(function() {
|
|||
var text=$(this).children('p').text();
|
||||
$(this).data('text',text);
|
||||
$(this).children('p').remove();
|
||||
var input=$('<input>');
|
||||
var form=$('<form></form>');
|
||||
var input=$('<input>');
|
||||
form.append(input);
|
||||
$(this).append(form);
|
||||
input.focus();
|
||||
|
|
Loading…
Reference in New Issue