Use placeholder attribute for Share message
This commit is contained in:
parent
daa8e4f901
commit
b6ce646d71
7 changed files with 9 additions and 19 deletions
|
@ -25,7 +25,7 @@
|
|||
{{/if}}
|
||||
<div id="jot-text-wrap">
|
||||
<img id="profile-jot-text-loading" src="images/rotator.gif" alt="{{$wait}}" title="{{$wait}}" style="display: none;" />
|
||||
<textarea rows="5" cols="64" class="profile-jot-text" id="profile-jot-text" name="body" >{{if $content}}{{$content}}{{else}}{{$share}}{{/if}}</textarea>
|
||||
<textarea rows="5" cols="64" class="profile-jot-text" id="profile-jot-text" name="body" placeholder="{{$share}}">{{if $content}}{{$content}}{{/if}}</textarea>
|
||||
</div>
|
||||
|
||||
<div id="profile-jot-submit-wrapper" class="jothidden">
|
||||
|
|
|
@ -119,21 +119,16 @@ function commentCloseUI(obj, id) {
|
|||
$(document).bind( "click.commentClose", handler );
|
||||
}
|
||||
|
||||
// test if there is default content in the jot text box and remove it
|
||||
function jotTextOpenUI(obj) {
|
||||
if(obj.value == aStr.share) {
|
||||
obj.value = '';
|
||||
if (obj.value == '') {
|
||||
$(".modal-body #profile-jot-text").addClass("profile-jot-text-full").removeClass("profile-jot-text-empty");
|
||||
// initiale autosize for the jot
|
||||
autosize($(".modal-body #profile-jot-text"));
|
||||
}
|
||||
}
|
||||
|
||||
// insert default content into the jot text box
|
||||
// if it's empty
|
||||
function jotTextCloseUI(obj) {
|
||||
if(obj.value === '') {
|
||||
obj.value = aStr.share;
|
||||
if (obj.value === '') {
|
||||
$(".modal-body #profile-jot-text").removeClass("profile-jot-text-full").addClass("profile-jot-text-empty");
|
||||
// destroy the automatic textarea resizing
|
||||
autosize.destroy($(".modal-body #profile-jot-text"));
|
||||
|
|
|
@ -62,7 +62,7 @@
|
|||
|
||||
{{* The jot text field in which the post text is inserted *}}
|
||||
<div id="jot-text-wrap">
|
||||
<textarea rows="2" cols="64" class="profile-jot-text form-control text-autosize" id="profile-jot-text" name="body" onFocus="jotTextOpenUI(this);" onBlur="jotTextCloseUI(this);" style="min-width:100%; max-width:100%;">{{if $content}}{{$content}}{{else}}{{$share}}{{/if}}</textarea>
|
||||
<textarea rows="2" cols="64" class="profile-jot-text form-control text-autosize" id="profile-jot-text" name="body" placeholder="{{$share}}" onFocus="jotTextOpenUI(this);" onBlur="jotTextCloseUI(this);" style="min-width:100%; max-width:100%;">{{if $content}}{{$content}}{{/if}}</textarea>
|
||||
</div>
|
||||
|
||||
<ul id="profile-jot-submit-wrapper" class="jothidden nav nav-pills">
|
||||
|
@ -123,9 +123,5 @@ can load different content into the jot moadl (e.g. the item edit jot)
|
|||
$('iframe').load(function() {
|
||||
this.style.height = this.contentWindow.document.body.offsetHeight + 'px';
|
||||
});
|
||||
|
||||
// insert new object with value to aStr
|
||||
// function jotTextOpenUI does make use of it
|
||||
aStr.share = "{{$share}}";
|
||||
</script>
|
||||
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
{{/if}}
|
||||
<div id="jot-text-wrap">
|
||||
{{*<!--<img id="profile-jot-text-loading" src="images/rotator.gif" alt="{{$wait}}" title="{{$wait}}" style="display: none;" />-->*}}
|
||||
<textarea rows="5" cols="64" class="profile-jot-text" id="profile-jot-text" name="body" >{{if $content}}{{$content}}{{else}}{{$share}}{{/if}}</textarea>
|
||||
<textarea rows="5" cols="64" class="profile-jot-text" id="profile-jot-text" name="body" placeholder="{{$share}}">{{if $content}}{{$content}}{{/if}}</textarea>
|
||||
</div>
|
||||
|
||||
<div id="profile-jot-submit-wrapper" class="jothidden">
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
{{/if}}
|
||||
<div id="jot-text-wrap">
|
||||
<img id="profile-jot-text-loading" src="images/rotator.gif" alt="{{$wait}}" title="{{$wait}}" style="display: none;" />
|
||||
<textarea rows="5" cols="64" class="profile-jot-text" id="profile-jot-text" name="body" >{{if $content}}{{$content}}{{else}}{{$share}}{{/if}}</textarea>
|
||||
<textarea rows="5" cols="64" class="profile-jot-text" id="profile-jot-text" name="body" placeholder="{{$share}}">{{if $content}}{{$content}}{{/if}}</textarea>
|
||||
</div>
|
||||
|
||||
<div id="profile-jot-submit-wrapper" class="jothidden">
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
<input type="hidden" name="contact_allow[]" value="<{{$notes_cid}}>" />
|
||||
{{/if}}
|
||||
|
||||
<textarea rows="5" cols="64" class="profile-jot-text" id="profile-jot-text" name="body" >{{if $content}}{{$content}}{{else}}{{$share}}{{/if}}</textarea>
|
||||
<textarea rows="5" cols="64" class="profile-jot-text" id="profile-jot-text" name="body" placeholder="{{$share}}">{{if $content}}{{$content}}{{/if}}</textarea>
|
||||
|
||||
<ul id="jot-tools" class="jothidden" style="display:none">
|
||||
<li><a href="#" onclick="return false;" id="wall-image-upload" title="{{$upload}}">{{$shortupload}}</a></a></li>
|
||||
|
|
|
@ -26,9 +26,8 @@
|
|||
{{/if}}
|
||||
<div id="jot-text-wrap">
|
||||
<img id="profile-jot-text-loading" src="images/rotator.gif" alt="{{$wait}}" title="{{$wait}}" style="display: none;" /><br>
|
||||
<textarea rows="5" cols="80" class="profile-jot-text" id="profile-jot-text" name="body" >
|
||||
{{if $content}}{{$content}}{{else}}{{$share}}
|
||||
{{/if}}
|
||||
<textarea rows="5" cols="80" class="profile-jot-text" id="profile-jot-text" name="body" placeholder="{{$share}}">
|
||||
{{if $content}}{{$content}}{{/if}}
|
||||
</textarea>
|
||||
</div>
|
||||
|
||||
|
|
Loading…
Reference in a new issue