bit more improvement on dynamic title
This commit is contained in:
parent
f1c7db593c
commit
dbb5955469
3 changed files with 17 additions and 2 deletions
|
@ -117,8 +117,19 @@ function initEditor(cb){
|
|||
$("#jot-title").mouseout(function() {
|
||||
$("#jot-title").hide();
|
||||
var ttl = $("#jot-title").val();
|
||||
$("#jot-title-desc").html((ttl.length) ? "<strong>" + ttl + "</strong>" : addtitle );
|
||||
$("#jot-title-desc").show();
|
||||
$('#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() {
|
||||
|
|
|
@ -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>
|
||||
|
||||
|
|
|
@ -276,6 +276,9 @@ div.wall-item-content-wrapper.shiny {
|
|||
#jot-title-wrapper {
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
#jot-title-display {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
#jot-title {
|
||||
border: 1px solid #cccccc;
|
||||
|
|
Loading…
Reference in a new issue