]> git.mxchange.org Git - friendica.git/commitdiff
Use placeholder attribute for Share message
authorHypolite Petovan <mrpetovan@gmail.com>
Sat, 7 Jan 2017 15:06:03 +0000 (02:06 +1100)
committerHypolite Petovan <mrpetovan@gmail.com>
Sat, 7 Jan 2017 15:06:03 +0000 (02:06 +1100)
view/templates/jot.tpl
view/theme/frio/js/textedit.js
view/theme/frio/templates/jot.tpl
view/theme/frost-mobile/templates/jot.tpl
view/theme/frost/templates/jot.tpl
view/theme/quattro/templates/jot.tpl
view/theme/smoothly/templates/jot.tpl

index a3600c3ff5fb1cc9d6c26f6c8b976a0beecc6209..e4692a8bba69fb389289f8f913a0b483d51cd9b3 100644 (file)
@@ -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">
index 2423171ec4d72c26eb8d40f9f0a94bee871161e3..73f7c9ec91b644978915b5ac7db4a01bc0f9bdbf 100644 (file)
@@ -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"));
index bcf00213233d3fe9213b47ee7587fa4e7cb4261b..90d17f6c4707a2a32c01a6ae6e9d182c018f585b 100644 (file)
@@ -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>
 
index b883dfa0b1be2b362f018799608377d45212063e..0c31681b82705a393df7ea9bfc5a27931887673b 100644 (file)
@@ -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">
index b0301476a367b25f2b89069f403be8fc28b0d201..c0ba9b0457a3c42c9301724d5d689086dd17fdbd 100644 (file)
@@ -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">
index 41d633b25c3191f01ee65fd43123862091180602..97fb0c24ff917f101cae7e35d62c8b24f9dc38d3 100644 (file)
@@ -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>
index e3e6294f0c81938222eb55d124de8ac6d4273b26..26578dafceed3cf7180bb0039613883485953700 100644 (file)
@@ -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>