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();
});
$("#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").hide();
$("#jot-title").show();
$("#jot-title").focus();
});
var uploader = new window.AjaxUpload(

View File

@ -17,6 +17,7 @@
<input type="hidden" name="post_id" value="$post_id" />
<div id="jot-title-wrapper">
<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;" />
</div>

View File

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

View File

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

View File

@ -15,6 +15,7 @@
<input type="hidden" name="post_id" value="$post_id" />
<div id="jot-title-wrapper">
<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;" />
</div>

View File

@ -124,11 +124,30 @@ function initEditor(cb) {
initEditor();
});
$("#jot-title-desc").click(function() {
$("#jot-title-desc").hide();
$("#jot-title").show();
});
$("#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").hide();
$("#jot-title").show();
$("#jot-title").focus();
});
var uploader = new window.AjaxUpload(
'wall-image-upload',

View File

@ -18,6 +18,7 @@
<div id="jot-title-wrapper">
<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;" />
</div>

View File

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