]> git.mxchange.org Git - friendica.git/commitdiff
Add RTL support to many input fields
authorHypolite Petovan <hypolite@mrpetovan.com>
Thu, 20 May 2021 12:37:45 +0000 (08:37 -0400)
committerHypolite Petovan <hypolite@mrpetovan.com>
Thu, 20 May 2021 12:39:37 +0000 (08:39 -0400)
- Compose page
- Post jot
- Comment form
- Event form

17 files changed:
view/templates/comment_item.tpl
view/templates/field_input.tpl
view/templates/field_select.tpl
view/templates/field_textarea.tpl
view/templates/field_themeselect.tpl
view/templates/item/compose.tpl
view/templates/jot.tpl
view/theme/duepuntozero/templates/comment_item.tpl
view/theme/frio/templates/comment_item.tpl
view/theme/frio/templates/event_form.tpl
view/theme/frio/templates/jot.tpl
view/theme/frio/templates/prv_message.tpl
view/theme/quattro/templates/comment_item.tpl
view/theme/quattro/templates/jot.tpl
view/theme/smoothly/templates/jot.tpl
view/theme/vier/templates/comment_item.tpl
view/theme/vier/templates/event_form.tpl

index 02d34c47e6b6f70ba19ebce8e1d137a8c87c72d8..fe8d28a2f4e7d12713bb018021dd7f9313cf0d40 100644 (file)
@@ -15,7 +15,7 @@
                                        <a class="comment-edit-photo-link" href="{{$mylink}}" title="{{$mytitle}}"><img class="my-comment-photo" src="{{$myphoto}}" alt="{{$mytitle}}" title="{{$mytitle}}" /></a>
                                </div>
                                <div class="comment-edit-photo-end"></div>
-                               <textarea id="comment-edit-text-{{$id}}" class="comment-edit-text-empty" name="body" placeholder="{{$comment}}" onFocus="commentOpen(this,{{$id}});" onBlur="commentClose(this,{{$id}});">{{if $threaded != false}}{{$default}}{{/if}}</textarea>
+                               <textarea id="comment-edit-text-{{$id}}" class="comment-edit-text-empty" name="body" placeholder="{{$comment}}" onFocus="commentOpen(this,{{$id}});" onBlur="commentClose(this,{{$id}});" dir="auto">{{if $threaded != false}}{{$default}}{{/if}}</textarea>
                                {{if $qcomment}}
                                        <select id="qcomment-select-{{$id}}" name="qcomment-{{$id}}" class="qcomment" onchange="qCommentInsert(this,{{$id}});">
                                        <option value=""></option>
index ec2de2a4ab0f95eee979fd9a7e58df9a18d6cbe2..3455891b9dc4020aec9c6b65e898c7640826c99d 100644 (file)
@@ -1,7 +1,7 @@
        
        <div class="field input" id="wrapper_{{$field.0}}">
                <label for="id_{{$field.0}}">{{$field.1}}{{if $field.4}} <span class="required" title="{{$field.4}}">*</span>{{/if}}</label>
-               <input type="{{$field.6|default:'text'}}" name="{{$field.0}}" id="id_{{$field.0}}" value="{{$field.2}}"{{if $field.4}} required{{/if}}{{if $field.5 eq "autofocus"}} autofocus{{elseif $field.5}} {{$field.5 nofilter}}{{/if}} aria-describedby="{{$field.0}}_tip">
+               <input type="{{$field.6|default:'text'}}" name="{{$field.0}}" id="id_{{$field.0}}" value="{{$field.2}}"{{if $field.4}} required{{/if}}{{if $field.5 eq "autofocus"}} autofocus{{elseif $field.5}} {{$field.5 nofilter}}{{/if}} aria-describedby="{{$field.0}}_tip" dir="auto">
        {{if $field.3}}
                <span class="field_help" role="tooltip" id="{{$field.0}}_tip">{{$field.3 nofilter}}</span>
        {{/if}}
index c174078e21aa11339d9cf903d1f89edd07a41e46..16a796a444befe7ad668c93665c9071b4cf96a1f 100644 (file)
@@ -1,9 +1,9 @@
 
-       <div class='field select'>
-               <label for='id_{{$field.0}}'>{{$field.1}}</label>
-               <select name='{{$field.0}}' id='id_{{$field.0}}' aria-describedby='{{$field.0}}_tip'>
+       <div class="field select">
+               <label for="id_{{$field.0}}">{{$field.1}}</label>
+               <select name="{{$field.0}}" id="id_{{$field.0}}" aria-describedby="{{$field.0}}_tip">
        {{foreach $field.4 as $opt=>$val}}
-                       <option value="{{$opt}}" {{if $opt==$field.2}}selected="selected"{{/if}}>{{$val}}</option>
+                       <option value="{{$opt}}" dir="auto"{{if $opt==$field.2}} selected="selected"{{/if}}>{{$val}}</option>
        {{/foreach}}
                </select>
        {{if $field.3}}
index 5f93ca91117afb542983742e4c8cc02d45153116..edd48d1d0fd448ea8ec10de902003f3f7180a155 100644 (file)
@@ -1,7 +1,7 @@
 
        <div class="field textarea">
                <label for="id_{{$field.0}}">{{$field.1}}{{if $field.4}} <span class="required" title="{{$field.4}}">*</span>{{/if}}</label>
-               <textarea name="{{$field.0}}" id="id_{{$field.0}}"{{if $field.4}} required{{/if}} aria-describedby="{{$field.0}}_tip">{{$field.2}}</textarea>
+               <textarea name="{{$field.0}}" id="id_{{$field.0}}"{{if $field.4}} required{{/if}} aria-describedby="{{$field.0}}_tip" dir="auto">{{$field.2}}</textarea>
        {{if $field.3}}
                <span class="field_help" role="tooltip" id="{{$field.0}}_tip">{{$field.3 nofilter}}</span>
        {{/if}}
index 922797eb2d3badaf58838886d1088a5ed0cf75e9..60676e5d1fc9ecb79bd28c7e984248ab036c2fa5 100644 (file)
@@ -6,7 +6,7 @@
                <label for="id_{{$field.0}}">{{$field.1}}</label>
                <select name="{{$field.0}}" id="id_{{$field.0}}" {{if $field.5}}onchange="previewTheme(this);"{{/if}} aria-describedby="{{$field.0}}_tip">
        {{foreach $field.4 as $opt=>$val}}
-                       <option value="{{$opt}}" {{if $opt==$field.2}}selected="selected"{{/if}}>{{$val}}</option>
+                       <option value="{{$opt}}" dir="auto"{{if $opt==$field.2}} selected="selected"{{/if}}>{{$val}}</option>
        {{/foreach}}
                </select>
        {{if $field.3}}
index 8b7414fd6780694c4338786aa687b2789a36d87d..df48a1323e08613f2f396db2239d4ca5e7139974 100644 (file)
@@ -8,11 +8,11 @@
                        <input type="hidden" name="wall" value="{{$wall}}" />
 
                        <div id="jot-title-wrap">
-                               <input type="text" name="title" id="jot-title" class="jothidden jotforms form-control" placeholder="{{$placeholdertitle}}" title="{{$placeholdertitle}}" value="{{$title}}" tabindex="1"/>
+                               <input type="text" name="title" id="jot-title" class="jothidden jotforms form-control" placeholder="{{$placeholdertitle}}" title="{{$placeholdertitle}}" value="{{$title}}" tabindex="1" dir="auto" />
                        </div>
                    {{if $placeholdercategory}}
                                <div id="jot-category-wrap">
-                                       <input name="category" id="jot-category" class="jothidden jotforms form-control" type="text" placeholder="{{$placeholdercategory}}" title="{{$placeholdercategory}}" value="{{$category}}" tabindex="2"/>
+                                       <input name="category" id="jot-category" class="jothidden jotforms form-control" type="text" placeholder="{{$placeholdercategory}}" title="{{$placeholdercategory}}" value="{{$category}}" tabindex="2" dir="auto" />
                                </div>
                    {{/if}}
 
@@ -44,7 +44,7 @@
                                </span>
                        </p>
                        <p>
-                               <textarea id="comment-edit-text-{{$id}}" class="comment-edit-text form-control text-autosize" name="body" placeholder="{{$default}}" rows="7" tabindex="3">{{$body}}</textarea>
+                               <textarea id="comment-edit-text-{{$id}}" class="comment-edit-text form-control text-autosize" name="body" placeholder="{{$default}}" rows="7" tabindex="3" dir="auto" dir="auto">{{$body}}</textarea>
                        </p>
 
                        <p class="comment-edit-submit-wrapper">
index 167e47da52cb051ba0fb706ea3d7a94d7cba8775..73d341aae724610c92bc0c8904c0a894202ecac8 100644 (file)
                {{if $notes_cid}}
                <input type="hidden" name="contact_allow[]" value="<{{$notes_cid}}>" />
                {{/if}}
-               <div id="jot-title-wrap"><input name="title" id="jot-title" type="text" placeholder="{{$placeholdertitle}}" value="{{$title}}" class="jothidden" style="display:none"></div>
+               <div id="jot-title-wrap"><input name="title" id="jot-title" type="text" placeholder="{{$placeholdertitle}}" value="{{$title}}" class="jothidden" style="display:none" dir="auto"></div>
                {{if $placeholdercategory}}
-               <div id="jot-category-wrap"><input name="category" id="jot-category" type="text" placeholder="{{$placeholdercategory}}" value="{{$category}}" class="jothidden" style="display:none" /></div>
+               <div id="jot-category-wrap"><input name="category" id="jot-category" type="text" placeholder="{{$placeholdercategory}}" value="{{$category}}" class="jothidden" style="display:none" dir="auto"></div>
                {{/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" placeholder="{{$share}}">{{if $content}}{{$content nofilter}}{{/if}}</textarea>
+               <textarea rows="5" cols="64" class="profile-jot-text" id="profile-jot-text" name="body" placeholder="{{$share}}" dir="auto">{{if $content}}{{$content nofilter}}{{/if}}</textarea>
                </div>
 
 <div id="profile-jot-submit-wrapper" class="jothidden">
index 1d416fdf1afa93ec3e18e4a2789e99d5061ccccc..3afbac126010a31daf283601a8ce1553ca15e965 100644 (file)
@@ -42,7 +42,7 @@
                                                data-role="insert-formatting" data-bbcode="video" data-id="{{$id}}"></a></li>
                                </ul>
                                <div class="comment-edit-bb-end"></div>
-                               <textarea id="comment-edit-text-{{$id}}" class="comment-edit-text-empty" name="body" placeholder="{{$comment}}" onFocus="commentOpen(this,{{$id}});cmtBbOpen(this, {{$id}});" onBlur="commentClose(this,{{$id}});cmtBbClose(this,{{$id}});">{{if $threaded != false}}{{$default}}{{/if}}</textarea>
+                               <textarea id="comment-edit-text-{{$id}}" class="comment-edit-text-empty" name="body" placeholder="{{$comment}}" onFocus="commentOpen(this,{{$id}});cmtBbOpen(this, {{$id}});" onBlur="commentClose(this,{{$id}});cmtBbClose(this,{{$id}});" dir="auto">{{if $threaded != false}}{{$default}}{{/if}}</textarea>
                                {{if $qcomment}}
                                        <select id="qcomment-select-{{$id}}" name="qcomment-{{$id}}" class="qcomment" onchange="qCommentInsert(this,{{$id}});">
                                        <option value=""></option>
index aab6aee94388976bed2899de1eed27d3d56bcd21..bece95e7835855a1123cecb8f2f3c42f6163890a 100644 (file)
@@ -39,7 +39,7 @@
                        </span>
                </p>
                <p>
-                       <textarea id="comment-edit-text-{{$id}}" class="comment-edit-text-empty form-control text-autosize" name="body" placeholder="{{$comment}}" rows="3" data-default="{{$default}}">{{$default}}</textarea>
+                       <textarea id="comment-edit-text-{{$id}}" class="comment-edit-text-empty form-control text-autosize" name="body" placeholder="{{$comment}}" rows="3" data-default="{{$default}}" dir="auto">{{$default}}</textarea>
                </p>
 {{if $qcomment}}
                <p>
index 54dad004791f6b729376650cc5103c1ab0f716e9..e1befe6a4f4312d909a9483f3ced7444342be58e 100644 (file)
@@ -75,7 +75,7 @@
                        {{* The textarea for the event description *}}
                        <div class="form-group">
                                <div id="event-desc-text"><b>{{$d_text}}</b></div>
-                               <textarea id="comment-edit-text-desc" class="form-control text-autosize" name="desc">{{$d_orig}}</textarea>
+                               <textarea id="comment-edit-text-desc" class="form-control text-autosize" name="desc" dir="auto">{{$d_orig}}</textarea>
                                <ul id="event-desc-text-edit-bb" class="comment-edit-bb comment-icon-list nav nav-pills hidden-xs pull-left">
                                        {{* commented out because it isn't implemented yet
                                        <li>
                        {{* The textarea for the event location *}}
                        <div class="form-group">
                                <div id="event-location-text"><b>{{$l_text}}</b></div>
-                               <textarea id="comment-edit-text-loc" class="form-control text-autosize" name="location">{{$l_orig}}</textarea>
+                               <textarea id="comment-edit-text-loc" class="form-control text-autosize" name="location" dir="auto">{{$l_orig}}</textarea>
                                <ul id="comment-tools-loc" class="comment-edit-bb comment-icon-list nav nav-pills hidden-xs pull-left">
                                        {{* commented out because it isn't implemented yet
                                        <li>
index 4ecf6a7c3f302b65d66042e9ef06dc504dcf8dfb..a7f63f2db66e7373371234e75de842e258d9f312 100644 (file)
                                        {{if $notes_cid}}
                                        <input type="hidden" name="contact_allow[]" value="<{{$notes_cid}}>" />
                                        {{/if}}
-                                       <div id="jot-title-wrap"><input name="title" id="jot-title" class="jothidden jotforms form-control" type="text" placeholder="{{$placeholdertitle}}" title="{{$placeholdertitle}}" value="{{$title}}" style="display:block;" /></div>
+                                       <div id="jot-title-wrap"><input name="title" id="jot-title" class="jothidden jotforms form-control" type="text" placeholder="{{$placeholdertitle}}" title="{{$placeholdertitle}}" value="{{$title}}" style="display:block;" dir="auto" /></div>
                                        {{if $placeholdercategory}}
-                                       <div id="jot-category-wrap"><input name="category" id="jot-category" class="jothidden jotforms form-control" type="text" placeholder="{{$placeholdercategory}}" title="{{$placeholdercategory}}" value="{{$category}}" /></div>
+                                       <div id="jot-category-wrap"><input name="category" id="jot-category" class="jothidden jotforms form-control" type="text" placeholder="{{$placeholdercategory}}" title="{{$placeholdercategory}}" value="{{$category}}" dir="auto" /></div>
                                        {{/if}}
 
                                        {{* 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" placeholder="{{$share}}" onFocus="jotTextOpenUI(this);" onBlur="jotTextCloseUI(this);" style="min-width:100%; max-width:100%;">{{if $content}}{{$content nofilter}}{{/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%;" dir="auto">{{if $content}}{{$content nofilter}}{{/if}}</textarea>
                                        </div>
 
                                        <ul id="profile-jot-submit-wrapper" class="jothidden nav nav-pills">
index 741116bb10b2e57e6fd1bf89b07276a237d41d08..ce61ffbe8c48768139b1e1d157a43f045dba1949 100644 (file)
@@ -19,7 +19,7 @@
        {{* The message input field which contains the message text *}}
        <div id="prvmail-message-label" class="form-group">
                <label for="comment-edit-text-input">{{$yourmessage}}</label>
-               <textarea rows="8" cols="72" class="prvmail-text form-control text-autosize" id="comment-edit-text-input" name="body" tabindex="12">{{$text}}</textarea>
+               <textarea rows="8" cols="72" class="prvmail-text form-control text-autosize" id="comment-edit-text-input" name="body" tabindex="12" dir="auto">{{$text}}</textarea>
        </div>
 
        <ul id="prvmail-text-edit-bb" class="comment-edit-bb comment-icon-list nav nav-pills hidden-xs pull-left">
index cb6f4ad2fffcc8e70a62f31490722978bb60bc5c..c83a05be62ae02aeee1296253c8fffd78d9be7d3 100644 (file)
@@ -40,7 +40,8 @@
                                        class="comment-edit-text-empty"
                                        name="body"
                                        placeholder="{{$comment}}"
-                                       onFocus="commentOpen(this,{{$id}}) && cmtBbOpen({{$id}});">{{if $threaded != false}}{{$default}}{{/if}}</textarea>
+                                       onFocus="commentOpen(this,{{$id}}) && cmtBbOpen({{$id}});"
+                                       dir="auto">{{if $threaded != false}}{{$default}}{{/if}}</textarea>
                                {{if $qcomment}}
                                        <select id="qcomment-select-{{$id}}" name="qcomment-{{$id}}" class="qcomment" onchange="qCommentInsert(this,{{$id}});">
                                        <option value=""></option>
index 0c232440814ee7fca0b088f82cfd2bf0d6b12e70..2edd821b8fe480170c8eb6739d4f54b4a5ceaf2f 100644 (file)
@@ -1,9 +1,9 @@
 <form id="profile-jot-form" action="{{$action}}" method="post">
        <div id="jot">
                <div id="profile-jot-desc" class="jothidden">&nbsp;</div>
-               <input name="title" id="jot-title" type="text" placeholder="{{$placeholdertitle}}" title="{{$placeholdertitle}}" value="{{$title}}" class="jothidden" style="display:none" />
+               <input name="title" id="jot-title" type="text" placeholder="{{$placeholdertitle}}" title="{{$placeholdertitle}}" value="{{$title}}" class="jothidden" style="display:none" dir="auto" />
                {{if $placeholdercategory}}
-               <input name="category" id="jot-category" type="text" placeholder="{{$placeholdercategory}}" title="{{$placeholdercategory}}" value="{{$category}}" class="jothidden" style="display:none" />
+               <input name="category" id="jot-category" type="text" placeholder="{{$placeholdercategory}}" title="{{$placeholdercategory}}" value="{{$category}}" class="jothidden" style="display:none" dir="auto" />
                {{/if}}
                <div id="character-counter" class="grey jothidden"></div>
                <input type="hidden" name="wall" value="{{$wall}}" />
@@ -19,7 +19,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" placeholder="{{$share}}">{{if $content}}{{$content nofilter}}{{/if}}</textarea>
+               <textarea rows="5" cols="64" class="profile-jot-text" id="profile-jot-text" name="body" placeholder="{{$share}}" dir="auto">{{if $content}}{{$content nofilter}}{{/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 61d6b5b014d0844cefced7116e249c9376aef430..f2e4f2f0d0d3a94ee5e8fa4a78ddca2d5589233c 100644 (file)
                <input type="hidden" name="preview" id="jot-preview" value="0" />
                <input type="hidden" name="post_id_random" value="{{$rand_num}}" />
                <div id="jot-title-wrap">
-                       <input name="title" id="jot-title" type="text" placeholder="{{$placeholdertitle}}" value="{{$title}}" class="jothidden" style="display:none">
+                       <input name="title" id="jot-title" type="text" placeholder="{{$placeholdertitle}}" value="{{$title}}" class="jothidden" style="display:none" dir="auto">
                </div>
                {{if $placeholdercategory}}
                <div id="jot-category-wrap">
-                       <input name="category" id="jot-category" type="text" placeholder="{{$placeholdercategory}}" value="{{$category}}" class="jothidden" style="display:none" />
+                       <input name="category" id="jot-category" type="text" placeholder="{{$placeholdercategory}}" value="{{$category}}" class="jothidden" style="display:none" dir="auto" />
                </div>
                {{/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" placeholder="{{$share}}">
+                       <textarea rows="5" cols="80" class="profile-jot-text" id="profile-jot-text" name="body" placeholder="{{$share}}" dir="auto">
                        {{if $content}}{{$content nofilter}}{{/if}}
                        </textarea>
                </div>
index ef48ac7ef237eebc98204579f7eca6a18fa1d75d..8caf0d54c33c123340e02a5129b7afc20f9c4bbe 100644 (file)
@@ -15,7 +15,7 @@
                                        <a class="comment-edit-photo-link" href="{{$mylink}}" title="{{$mytitle}}"><img class="my-comment-photo" src="{{$myphoto}}" alt="{{$mytitle}}" title="{{$mytitle}}" /></a>
                                </div>
                                <div class="comment-edit-photo-end"></div>
-                               <textarea id="comment-edit-text-{{$id}}" class="comment-edit-text-empty" name="body" placeholder="{{$comment}}" onFocus="commentOpen(this,{{$id}});">{{if $threaded != false}}{{$default}}{{/if}}</textarea>
+                               <textarea id="comment-edit-text-{{$id}}" class="comment-edit-text-empty" name="body" placeholder="{{$comment}}" onFocus="commentOpen(this,{{$id}});" dir="auto">{{if $threaded != false}}{{$default}}{{/if}}</textarea>
                                {{if $qcomment}}
                                        <select id="qcomment-select-{{$id}}" name="qcomment-{{$id}}" class="qcomment" onchange="qCommentInsert(this,{{$id}});">
                                        <option value=""></option>
index e93de71c6fe06b7a4a29fa05d0f5583a6eb96534..a5604d9292f264ad299d8cde4a39ef3ec38180a0 100644 (file)
@@ -25,7 +25,7 @@
 
 
 <div id="event-desc-text">{{$d_text}}</div>
-<textarea id="comment-edit-text-desc" rows="8" cols="64" name="desc" autocomplete="off">{{$d_orig}}</textarea>
+<textarea id="comment-edit-text-desc" rows="8" cols="64" name="desc" autocomplete="off" dir="auto">{{$d_orig}}</textarea>
 <div id="event-desc-text-edit-bb" class="comment-edit-bb">
        <a title="{{$edimg}}" data-role="insert-formatting" data-bbcode="img" data-id="desc"><i class="icon-picture"></i></a>
        <a title="{{$edurl}}" data-role="insert-formatting" data-bbcode="url" data-id="desc"><i class="icon-link"></i></a>
@@ -38,7 +38,7 @@
 </div>
 
 <div id="event-location-text">{{$l_text}}</div>
-<textarea id="comment-edit-text-location" rows="4" cols="64" name="location">{{$l_orig}}</textarea>
+<textarea id="comment-edit-text-location" rows="4" cols="64" name="location" dir="auto">{{$l_orig}}</textarea>
 <div id="event-location-text-edit-bb" class="comment-edit-bb">
        <a title="{{$edimg}}" data-role="insert-formatting" data-bbcode="img" data-id="location"><i class="icon-picture"></i></a>
        <a title="{{$edurl}}" data-role="insert-formatting" data-bbcode="url" data-id="location"><i class="icon-link"></i></a>