本文介绍了如果我启用精简程序并应用,则SharePoint字母筛选器不起作用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

限时删除!!

如果我有一个没有任何参数的searchresult.aspx页面,下面的html控件就可以了。如果我首先启用精简程序并单击精简程序,然后单击任何这些字母表,则根本不起作用。我相信这是因为alpha
控件只是传递"k"。假设搜索结果页面加载时没有任何参数,参数过滤器值。如果存在具有精炼值的参数,我如何传递/重置网址?

The following html control works just fine if I have a searchresult.aspx page without any parameter. If I enable the refiners and click refiners first and then clicking any of these alphabets doesn't work at all. I believe this is because the alpha control just pass "k" parameter filter values assuming the search result page is loaded without any parameter. How can I pass/reset the url if there is a parameter with refiner values?

< div class =" alpha-controls" id =" alpha-controls">

 < div class =" letter" ID = QUOT;参见-所有" onclick =" alpha.search('');">参见全部< / div>

<div class="alpha-controls" id="alpha-controls">
 <div class="letter" id="see-all" onclick="alpha.search('');">See All</div>

< div class =" letter" ID = QUOT;信-A" onclick =" alpha.search('a');"> a< / div>  ...
$
< / div>

<div class="letter" id="letter-a" onclick="alpha.search('a');">a</div> ...
</div>

< script>

(function(){

<script>
(function() {

window.alpha = window.alpha || {};

window.alpha = window.alpha || {};

alpha.globals = {

 " alphaControlsId":" alpha-controls",

 " alphaActiveLetterAttr":" data-active-字母"

}

alpha.globals = {
 "alphaControlsId": "alpha-controls",
 "alphaActiveLetterAttr": "data-active-letter"
}

alpha.clearSelectedLetter = function(){

  var alphaControls = document.getElementById(alpha.globals .alphaControlsId);
$
  var activeLetterId = alphaControls.getAttribute(alpha.globals.alphaActiveLetterAttr);

  if(activeLetterId){

   var activeLetter = document.getElementById(activeLetterId);

   if(activeLetter){

    activeLetter.className = activeLetter.className.split('')[0]; 

  }

 }

};

alpha.clearSelectedLetter = function () {
 var alphaControls = document.getElementById(alpha.globals.alphaControlsId);
 var activeLetterId = alphaControls.getAttribute(alpha.globals.alphaActiveLetterAttr);
 if(activeLetterId) {
  var activeLetter = document.getElementById(activeLetterId);
  if(activeLetter) {
   activeLetter.className = activeLetter.className.split(' ')[0]; 
  }
 }
};

alpha.search = function(letter){

  var alphaControls = document.getElementById(alpha.globals.alphaControlsId);

 

  var currentLetterId =" letter-" + letter;

  var activeLetterId = alphaControls.getAttribute(alpha.globals.alphaActiveLetterAttr);

 

  var searchKeyword, searchKeywordDefaultValue,searchFilter,searchBoxInput,updateParts,filter;

alpha.search = function(letter) {
 var alphaControls = document.getElementById(alpha.globals.alphaControlsId);
 
 var currentLetterId = "letter-" + letter;
 var activeLetterId = alphaControls.getAttribute(alpha.globals.alphaActiveLetterAttr);
 
 var searchKeyword, searchKeywordDefaultValue, searchFilter, searchBoxInput, updateParts, filter;

  alpha.clearSelectedLetter();

 alpha.clearSelectedLetter();

  if(letter ===" " || letter.length === 0 || currentLetterId === activeLetterId){

   filter ="" ;;

   ; alphaControls.setAttribute(alpha.globals.alphaActiveLetterAttr,"");

 }

  else {

    //如果不是相同的字母 - 设置一个新的字母

   var currentLetter = document.getElementById(currentLetterId);

   currentLetter。 className = currentLetter.className +"有效" ;;

   alphaControls.setAttribute(alpha.globals.alphaActiveLetterAttr,currentLetterId);
$
   filter =" LastName:" +字母+" *" ;;

 }

 if(letter === "" || letter.length === 0 || currentLetterId === activeLetterId) {
  filter = "";
  alphaControls.setAttribute(alpha.globals.alphaActiveLetterAttr, "");
 }
 else {
  //if not the same letter - set a new letter
  var currentLetter = document.getElementById(currentLetterId);
  currentLetter.className = currentLetter.className + " active";
  alphaControls.setAttribute(alpha.globals.alphaActiveLetterAttr, currentLetterId);
  filter = "LastName:" + letter + "*";
 }

    updateParts = {k:filter,s:"" }; b $ b    ajaxNavigate.update(null,updateParts);

}

    updateParts = { k: filter, s: "" };
    ajaxNavigate.update(null, updateParts);
}

})();

< / script>< html的xmlns:MSO = QUOT;瓮:架构 - 微软-COM:办公室:办公室" xmlns:msdt =" uuid:C2F41010-65B3-11d1-A29F-00AA00C14882">< head>

<! - [if gte mso 9]>< xml>

< mso:CustomDocumentProperties>

< mso:i0352c37ab274162b438da5dfcdbe0a6 msdt:dt =" string"> Document | 4d0ce455-6d67-44a6-90b4-85260c7c194c< / mso :i0352c37ab274162b438da5dfcdbe0a6>
$
< mso:TaxCatchAll msdt:dt =" string"> 5; #Document | 4d0ce455-6d67-44a6-90b4-85260c7c194c< / mso:TaxCatchAll>


< / mso:CustomDocumentProperties>

< / xml><![endif] - >

< title> alpha< / title> ;< / head>

})();
</script><html xmlns:mso="urn:schemas-microsoft-com:office:office" xmlns:msdt="uuid:C2F41010-65B3-11d1-A29F-00AA00C14882"><head>
<!--[if gte mso 9]><xml>
<mso:CustomDocumentProperties>
<mso:i0352c37ab274162b438da5dfcdbe0a6 msdt:dt="string">Document|4d0ce455-6d67-44a6-90b4-85260c7c194c</mso:i0352c37ab274162b438da5dfcdbe0a6>
<mso:TaxCatchAll msdt:dt="string">5;#Document|4d0ce455-6d67-44a6-90b4-85260c7c194c</mso:TaxCatchAll>
</mso:CustomDocumentProperties>
</xml><![endif]-->
<title>alpha</title></head>

推荐答案

你最好用网络调试它浏览器首先缩小您的问题范围。

you'd better debug it using web browser first to narrow the scope of your issue.


这篇关于如果我启用精简程序并应用,则SharePoint字母筛选器不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

1403页,肝出来的..

09-08 16:59