Welcome to IOPWiki, Commander.
With the release of the Global Beta, we encourage contributions to topics related to Girls' Frontline 2. Learn how to contribute and join our Discord server to discuss major changes.

Widget:indexSorterGrouper: Difference between revisions

Welcome to IOP Wiki. This website is maintained by the Girls' Frontline community and is free to edit by anyone.
Jump to navigation Jump to search
Different approach of creating an element
Damn you, MediaWiki!
 
Line 73: Line 73:
         var groupHeaderText = nextElementLetter.toUpperCase() + "...";
         var groupHeaderText = nextElementLetter.toUpperCase() + "...";
         if (groupHeaderText.trim() != "...") {
         if (groupHeaderText.trim() != "...") {
           var groupHeader = $("<h3 />").text(groupHeaderText).addClass("addedbysorter");
           var groupHeader = $(document.createElement("h3")).text(groupHeaderText).addClass("addedbysorter");
           groupHeader.insertAfter(element);
           groupHeader.insertAfter(element);
         }
         }
Line 150: Line 150:
   if (currentKey !== nextElementKey) {
   if (currentKey !== nextElementKey) {
     var groupHeaderText = $(nextElement).data('classification') + " " + getNumberForRarity(nextElement) + "-Star";
     var groupHeaderText = $(nextElement).data('classification') + " " + getNumberForRarity(nextElement) + "-Star";
     var groupHeader = $("<h3 />").text(groupHeaderText).addClass("addedbysorter");
     var groupHeader = $(document.createElement("h3")).text(groupHeaderText).addClass("addedbysorter");
     groupHeader.insertAfter(element1);
     groupHeader.insertAfter(element1);
   }
   }
Line 225: Line 225:
     var firstTen = Math.ceil(parseInt(firstIndex) / 10) * 10;
     var firstTen = Math.ceil(parseInt(firstIndex) / 10) * 10;
     if (sortOrder == -1) { firstTen -= 9; }
     if (sortOrder == -1) { firstTen -= 9; }
     var groupHeader = $("<h3 />").text(getNumberText(firstIndex) + "..." + getNumberText(firstTen)).addClass("addedbysorter");
     var groupHeader = $(document.createElement("h3")).text(getNumberText(firstIndex) + "..." + getNumberText(firstTen)).addClass("addedbysorter");
     groupHeader.insertBefore(elements.first());
     groupHeader.insertBefore(elements.first());
      
      
Line 264: Line 264:
       var groupHeaderText = getNumberText(currentIdxShow) + "..." + getNumberText(nextElementTen);
       var groupHeaderText = getNumberText(currentIdxShow) + "..." + getNumberText(nextElementTen);
        
        
       var groupHeader = $("<h3 />").text(groupHeaderText).addClass("addedbysorter");
       var groupHeader = $(document.createElement("h3")).text(groupHeaderText).addClass("addedbysorter");
       groupHeader.insertAfter(element);
       groupHeader.insertAfter(element);
     }
     }

Latest revision as of 00:40, 27 July 2024


 

Released on this server:

Some heading