[BUGFIX] Remove needless "x " on TER-search 18/19318/2
authorStefan Neufeind <typo3.neufeind@speedpartner.de>
Wed, 28 Nov 2012 19:38:15 +0000 (20:38 +0100)
committerChristian Kuhn <lolli@schwarzbu.ch>
Tue, 26 Mar 2013 20:40:57 +0000 (21:40 +0100)
Keep input field after search for easy re-search.

Change-Id: I658657c89a91e5196ca5a2997d76bc0bba52c820
Fixes: #43410
Releases: 6.0, 6.1
Reviewed-on: https://review.typo3.org/19318
Reviewed-by: Christian Kuhn
Tested-by: Christian Kuhn
typo3/sysext/extensionmanager/Resources/Private/Language/locallang.xlf
typo3/sysext/extensionmanager/Resources/Private/Scss/page/_manage.scss
typo3/sysext/extensionmanager/Resources/Private/Templates/List/Ter.html
typo3/sysext/extensionmanager/Resources/Public/Css/main.css
typo3/sysext/extensionmanager/Resources/Public/JavaScript/ter.js

index d5a67a2..54b0bf5 100644 (file)
                                <source>Author</source>
                        </trans-unit>
                        <trans-unit id="searchTemplate.submitButton" xml:space="preserve">
-                               <source>Submit</source>
+                               <source>Search</source>
                        </trans-unit>
                        <trans-unit id="searchTemplate.resetSearchButton" xml:space="preserve">
                                <source>Reset Search</source>
                        <trans-unit id="searchTemplate.yourSearch" xml:space="preserve">
                                <source>Your search</source>
                        </trans-unit>
+                       <trans-unit id="searchTemplate.searchAgain" xml:space="preserve">
+                               <source>Search again</source>
+                       </trans-unit>
                        <trans-unit id="uploadTemplate.uploadButton" xml:space="preserve">
                                <source>Upload!</source>
                        </trans-unit>
index 06422fe..b1b1e99 100644 (file)
@@ -1,6 +1,21 @@
 
 .typo3-extensionmanager-headerRowLeft {
        display: inline-block;
+
+       .typo3-extensionmanager-searchTerFieldWrapper {
+               display: inline-block;
+               position: relative;
+
+               input {
+                       height: 15px;
+               }
+
+               .t3-icon-input-clear {
+                       position: absolute;
+                       right: 3px;
+                       top: 4px;
+               }
+       }
 }
 
 // Upload extension
index 6d72570..90ec50f 100644 (file)
@@ -6,34 +6,31 @@
 <f:section name="docHeaderRow2">
 </f:section>
 <f:section name="Content">
+       <div class="headerRow">
+               <div class="typo3-extensionmanager-headerRowLeft">
+                       <f:form class="typo3-extensionmanager-searchTerForm" action="ter">
+                               <div class="typo3-extensionmanager-searchTerFieldWrapper">
+                                       <f:form.textfield name="search" value="{search}" />
+                                       <span class="t3-icon t3-icon-actions t3-icon-actions-input t3-icon-input-clear t3-tceforms-input-clearer"></span>
+                               </div>
+                               <f:form.submit value="{f:translate(key:'searchTemplate.submitButton')}"/>
+                       </f:form>
+               </div>
+               <div class="typo3-extensionmanager-headerRowRight">
+                       <f:render partial="List/UpdateFromTer" />
+               </div>
+       </div>
        <f:if condition="{search}">
                <f:then>
-                       <div class="headerRow">
-                               <div class="typo3-extensionmanager-headerRowLeft">
-                                       <f:translate key="searchTemplate.yourSearch"/>: <f:link.action action="ter" controller="List"><span class="pill">x {search}</span></f:link.action>
-                               </div>
-                       </div>
                        <table id="terSearchTable" class="typo3-extension-list">
                                <f:render partial="List/TerTable" arguments="{paginatedExtensions:extensions, availableAndInstalled:availableAndInstalled}" />
                        </table>
                </f:then>
                <f:else>
-                       <div class="headerRow">
-                               <div class="typo3-extensionmanager-headerRowLeft">
-                                       <f:form action="ter">
-                                               <f:form.textfield name="search" value="{search}" />
-                                               <f:form.submit value="{f:translate(key:'searchTemplate.submitButton')}"/>
-                                       </f:form>
-                               </div>
-                               <div class="typo3-extensionmanager-headerRowRight">
-                                       <f:render partial="List/UpdateFromTer" />
-                               </div>
-                       </div>
                        <div id="terTableWrapper">
                                <f:render partial="List/TerPaginator" arguments="{extensions:extensions, showVersionList:showVersionList,  availableAndInstalled:availableAndInstalled}" />
                                <div class="splash-receivedata x-mask-loading"><div class="spinner"><f:translate key="extensionList.updateFromTer.label"/></div></div>
                        </div>
-
                </f:else>
        </f:if>
 
index 46e93c5..039c378 100644 (file)
@@ -1633,6 +1633,15 @@ button.ui-button::-moz-focus-inner {
 
 .typo3-extensionmanager-headerRowLeft {
   display: inline-block; }
+  .typo3-extensionmanager-headerRowLeft .typo3-extensionmanager-searchTerFieldWrapper {
+    display: inline-block;
+    position: relative; }
+    .typo3-extensionmanager-headerRowLeft .typo3-extensionmanager-searchTerFieldWrapper input {
+      height: 15px; }
+    .typo3-extensionmanager-headerRowLeft .typo3-extensionmanager-searchTerFieldWrapper .t3-icon-input-clear {
+      position: absolute;
+      right: 3px;
+      top: 4px; }
 
 .typo3-extensionmanager-headerRowRight {
   float: right; }
index 64ac68d..3eb40c2 100644 (file)
@@ -39,7 +39,9 @@
                        "bSort": false,
                        "fnDrawCallback": bindDownload
                });
+
                bindDownload();
+               bindSearchFieldResetter();
        });
 
        function bindDownload() {
                        $('.typo3-extension-manager').unmask();
                }
        }
+
+       function bindSearchFieldResetter() {
+               var $searchFieldWrapper = $('.typo3-extensionmanager-searchTerFieldWrapper');
+               var $searchField = $searchFieldWrapper.find('input[type="text"]');
+               var $resetter = $searchFieldWrapper.find('.t3-tceforms-input-clearer');
+
+               $searchFieldWrapper.mouseover(function() {
+                       if ('' !== $searchField.val()) {
+                               $resetter.show();
+                       }
+               });
+
+               $searchFieldWrapper.mouseout(function() {
+                       $resetter.hide();
+               });
+
+               $resetter.click(function() {
+                       $searchField.val('');
+                       $searchField.focus()
+               });
+               $resetter.hide();
+       }
 }(jQuery));