more title stuff

This commit is contained in:
friendica 2012-01-04 20:43:38 -08:00
parent dbb5955469
commit c5d27c48f5
8 changed files with 54 additions and 4 deletions

View file

@ -102,9 +102,28 @@ function initEditor(cb) {
initEditor(); initEditor();
}); });
$("#jot-title").mouseout(function() {
$("#jot-title").hide();
var ttl = $("#jot-title").val();
$('#jot-title-display').html(ttl);
if(ttl.length) {
$("#jot-title-display").show();
}
else {
$("#jot-title-desc").show();
}
});
$("#jot-title-display").click(function() {
$("#jot-title-display").hide();
$("#jot-title").show();
$("#jot-title").focus();
});
$("#jot-title-desc").click(function() { $("#jot-title-desc").click(function() {
$("#jot-title-desc").hide(); $("#jot-title-desc").hide();
$("#jot-title").show(); $("#jot-title").show();
$("#jot-title").focus();
}); });
var uploader = new window.AjaxUpload( var uploader = new window.AjaxUpload(

View file

@ -17,6 +17,7 @@
<input type="hidden" name="post_id" value="$post_id" /> <input type="hidden" name="post_id" value="$post_id" />
<div id="jot-title-wrapper"> <div id="jot-title-wrapper">
<span id="jot-title-desc" style="display: none;">$addtitle</span> <span id="jot-title-desc" style="display: none;">$addtitle</span>
<span id="jot-title-display" style="display: none;"></span>
<input type="text" name="title" id="jot-title" value="" style="display: none;" /> <input type="text" name="title" id="jot-title" value="" style="display: none;" />
</div> </div>

View file

@ -354,6 +354,9 @@ aside #viewcontacts { text-align: right;}
border: 1px solid #cccccc; border: 1px solid #cccccc;
width: 530px; width: 530px;
} }
#jot-title-display {
font-weight: bold;
}
/** /**

View file

@ -144,6 +144,9 @@ blockquote:before {
width: 530px; width: 530px;
} }
#jot-title-display {
font-weight: bold;
}
.fakelink, .fakelink:visited { .fakelink, .fakelink:visited {
color: #15607B; color: #15607B;

View file

@ -15,6 +15,7 @@
<input type="hidden" name="post_id" value="$post_id" /> <input type="hidden" name="post_id" value="$post_id" />
<div id="jot-title-wrapper"> <div id="jot-title-wrapper">
<span id="jot-title-desc" style="display: none;">$addtitle</span> <span id="jot-title-desc" style="display: none;">$addtitle</span>
<span id="jot-title-display" style="display: none;"></span>
<input type="text" name="title" id="jot-title" value="" style="display: none;" /> <input type="text" name="title" id="jot-title" value="" style="display: none;" />
</div> </div>

View file

@ -124,12 +124,31 @@ function initEditor(cb) {
initEditor(); initEditor();
}); });
$("#jot-title").mouseout(function() {
$("#jot-title").hide();
var ttl = $("#jot-title").val();
$('#jot-title-display').html(ttl);
if(ttl.length) {
$("#jot-title-display").show();
}
else {
$("#jot-title-desc").show();
}
});
$("#jot-title-display").click(function() {
$("#jot-title-display").hide();
$("#jot-title").show();
$("#jot-title").focus();
});
$("#jot-title-desc").click(function() { $("#jot-title-desc").click(function() {
$("#jot-title-desc").hide(); $("#jot-title-desc").hide();
$("#jot-title").show(); $("#jot-title").show();
$("#jot-title").focus();
}); });
var uploader = new window.AjaxUpload( var uploader = new window.AjaxUpload(
'wall-image-upload', 'wall-image-upload',
{ action: 'wall_upload/$nickname', { action: 'wall_upload/$nickname',

View file

@ -18,6 +18,7 @@
<div id="jot-title-wrapper"> <div id="jot-title-wrapper">
<span id="jot-title-desc" style="display: none;">$addtitle</span> <span id="jot-title-desc" style="display: none;">$addtitle</span>
<span id="jot-title-display" style="display: none;"></span>
<input type="text" name="title" id="jot-title" value="" style="display: none;" /> <input type="text" name="title" id="jot-title" value="" style="display: none;" />
</div> </div>

View file

@ -757,6 +757,9 @@ ul .sidebar-group-li .icon{
width: 460px; width: 460px;
} }
#jot-title-display {
font-weight: bold;
}
#profile-jot-perms, #profile-jot-submit { #profile-jot-perms, #profile-jot-submit {
width: 60px; width: 60px;