Jump to content

V7 Admin intelligent search without pressing Enter


minadreapta

Recommended Posts

Hello,

 

i recently upgraded WHMCS to v7 and the Intelligent Search from the admin header are is not working anymore. It only works if i press enter.

The one in the Client Profile dropdown works thou without pressing enter key.

 

I tried the solutions from here: https://forum.whmcs.com/showthread.php?106674-Admin-Area-Intelligent-Search-While-Typing&highlight=intelligent+search

it didn't work.

 

i tried reuploading the admin files but that didn't help.

 

any ideea what should i do to make the header Intelligent search work?

 

thanks.

Link to comment
Share on other sites

i recently upgraded WHMCS to v7 and the Intelligent Search from the admin header are is not working anymore. It only works if i press enter.

The one in the Client Profile dropdown works thou without pressing enter key.

 

I tried the solutions from here: https://forum.whmcs.com/showthread.php?106674-Admin-Area-Intelligent-Search-While-Typing&highlight=intelligent+search

it didn't work.

in fairness, that solution was for v6 - v7 doesn't even use head.js any more, so it's no surprise it didn't work.

 

http://docs.whmcs.com/WHMCS_7.1_Asset_Changes

 

i tried reuploading the admin files but that didn't help.

any idea what should i do to make the header Intelligent search work?

it would work if you added the code from that thread into header.tpl - either directly in the template or using an action hook...

 

<?php

function admin_searchbar_hook($vars) {

   $head_return = '<script>
   /* Intelligent Search On Typing */
   $(document).ready(function(){
   $("#intellisearchval").on("keyup", function() {
       $("#intellisearchval").css("background-image","url(\'images/loading.gif\')");
       $.post("search.php", $("#frmintellisearch").serialize(),
       function(data){
           $("#searchresultsscroller").html(data);
           $("#searchresults").slideDown("slow",function(){
                   $("#intellisearchval").css("background-image","url(\'images/icons/search.png\')");
               });
       });
   });
});</script>';
   return $head_return;
}
add_hook("AdminAreaHeadOutput",1,"admin_searchbar_hook");

Link to comment
Share on other sites

thanks Brian, adding that js snippet into header.tpl did the trick.

bear in mind that if you've added it directly to the template, the WHMCS Automatic Updater might remove it during a future update - if you've used the hook method, it won't matter.

 

"v7 doesn't even use head.js any more, so it's no surprise it didn't work." - well, the search form is still there, isn't it? in a fresh whmcs v7 installation.

the code from head.js still exists - it's just that it's incorporated into script.min.js now.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated