Welcome to IOPWiki, Commander.
We are searching for editors to complete gameplay topics in all games. You can contribute without an account. Learn how to contribute and join our Discord server.

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
Changed the css class
Setting indicator for active button
Line 24: Line 24:
});
});


function orderByName() {
function orderByName(currentButton) {
  tdollSorterActiveButton(currentButton);
 
   var comparer = function (a, b) {
   var comparer = function (a, b) {
     var nameA=$(a).data('name').toLowerCase();
     var nameA=$(a).data('name').toLowerCase();
Line 72: Line 74:
}
}


function orderByRarityClassName() {
function orderByRarityClassName(currentButton) {
  tdollSorterActiveButton(currentButton);
 
   var comparer = function (a, b) {
   var comparer = function (a, b) {
       var contentA = getSortKeyForRarityClassName($(a));
       var contentA = getSortKeyForRarityClassName($(a));
Line 82: Line 86:
}
}


function orderByClassRarityName() {
function orderByClassRarityName(currentButton) {
  tdollSorterActiveButton(currentButton);
 
   var comparer = function (a, b) {
   var comparer = function (a, b) {
       var contentA = getSortKeyForClassRarityName($(a));
       var contentA = getSortKeyForClassRarityName($(a));
Line 139: Line 145:
}
}


function orderByIndex() {
function orderByIndex(currentButton) {
  tdollSorterActiveButton(currentButton);
 
   var comparer = function (a, b) {
   var comparer = function (a, b) {
       var contentA = parseInt($(a).data('index'));
       var contentA = parseInt($(a).data('index'));
Line 169: Line 177:
    
    
   tdollSorter(comparer, grouper);
   tdollSorter(comparer, grouper);
}
function tdollSorterActiveButton(butt) {
  $('[data-tdollsortbutton="true"]').removeClass("enabled");
  $(butt).addClass("enabled");
}
}


Line 189: Line 202:
}
}
</script><div style="display:inline-block">
</script><div style="display:inline-block">
<button class="gf-button" onclick="orderByName();">By Name</button>
<button class="gf-button" data-tdollsortbutton="true" onclick="orderByName(this);">By Name</button>
<button class="gf-button" onclick="orderByClassRarityName();">By Class&gt;Rarity&gt;Name</button>
<button class="gf-button" data-tdollsortbutton="true" onclick="orderByClassRarityName(this);">By Class&gt;Rarity&gt;Name</button>
<button class="gf-button" onclick="orderByRarityClassName();">By Rarity&gt;Class&gt;Name</button>
<button class="gf-button" data-tdollsortbutton="true" onclick="orderByRarityClassName(this);">By Rarity&gt;Class&gt;Name</button>
<button class="gf-button" onclick="orderByIndex();">By Index</button></div>
<button class="gf-button" data-tdollsortbutton="true" onclick="orderByIndex(this);">By Index</button></div>
</includeonly>
</includeonly>



Revision as of 15:44, 1 May 2018


 

Released on this server:

Some heading