Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision f09ed6e1

Von Moritz Bunkus vor fast 14 Jahren hinzugefügt

  • ID f09ed6e1d77eb113db14e8f4a00afc09531a43d8
  • Vorgänger d31c7de4
  • Nachfolger 04854ac2

Automatisches Sortieren der Liste

Unterschiede anzeigen:

js/jquery.multiselect2side.js
118 118

  
119 119
        // FIRST HIDE ALL
120 120
        div.find(".RemoveOne, .MoveUp, .MoveDown, .MoveTop, .MoveBottom, .SelSort").addClass('ms2side__hide');
121
        if (selectDx.size() > 1)
122
          div.find(".SelSort").removeClass('ms2side__hide');
121
        // if (selectDx.size() > 1)
122
          // div.find(".SelSort").removeClass('ms2side__hide');
123 123
        if (selectedDx.size() > 0) {
124 124
          div.find(".RemoveOne").removeClass('ms2side__hide');
125
          // ALL SELECTED - NO MOVE
126
          if (selectedDx.size() < selectDx.size()) {    // FOR NOW (JOE) && selectedDx.size() == 1
127
            if (selectedDx.val() != selectDx.val())     // FIRST OPTION, NO UP AND TOP BUTTON
128
              div.find(".MoveUp, .MoveTop").removeClass('ms2side__hide');
129
            if (selectedDx.last().val() != selectDx.last().val())       // LAST OPTION, NO DOWN AND BOTTOM BUTTON
130
              div.find(".MoveDown, .MoveBottom").removeClass('ms2side__hide');
131
          }
125
          // // ALL SELECTED - NO MOVE
126
          // if (selectedDx.size() < selectDx.size()) {    // FOR NOW (JOE) && selectedDx.size() == 1
127
          //   if (selectedDx.val() != selectDx.val())     // FIRST OPTION, NO UP AND TOP BUTTON
128
          //     div.find(".MoveUp, .MoveTop").removeClass('ms2side__hide');
129
          //   if (selectedDx.last().val() != selectDx.last().val())       // LAST OPTION, NO DOWN AND BOTTOM BUTTON
130
          //     div.find(".MoveDown, .MoveBottom").removeClass('ms2side__hide');
131
          // }
132 132
        }
133 133

  
134 134
        if (selectSx.size() == 0 || (o.maxSelected >= 0 && selectSx.size() >= o.maxSelected))
......
140 140
          div.find(".RemoveAll").addClass('ms2side__hide');
141 141
        else
142 142
          div.find(".RemoveAll").removeClass('ms2side__hide');
143

  
144
        leftSel.sortOptions();
145
        rightSel.sortOptions();
143 146
      });
144 147

  
145 148
      // DOUBLE CLICK ON LEFT SELECT OPTION

Auch abrufbar als: Unified diff