Patternslib / Patterns

Library for quickly applying rich interaction patterns without the need to write any JavaScript.
http://patternslib.com
Other
104 stars 43 forks source link

groupby pattern - thought in progress #25

Closed chaoflow closed 9 years ago

chaoflow commented 12 years ago

All elements are loaded, setting/changing the data-groupby attribute results in regrouping:

<foo data-group-titles="a=GroupA!b=GroupB>
  <bar data-groupable="g1=a!g2=a">  1  </bar>
  <bar data-groupable="g1=a!g2=b">  2  </bar>
  <bar data-groupable="g1=b!g2=a">  3  </bar>
  <bar data-groupable="g1=b!g2=b">  4  </bar>
  <bar data-groupable="g1=a!g2=a">  5  </bar>
  <bar data-groupable="g1=a!g2=b">  6  </bar>
  <bar data-groupable="g1=b!g2=a">  7  </bar>
  <bar data-groupable="g1=b!g2=b">  8  </bar>
</foo>

data-groupby is set by setattribute from somwhere or was set while loading:

<foo data-group-titles="a=GroupA!b=GroupB" data-groupby="g2:#g2_template g1:#g1_template">
  <x>
    <y>
  <bar data-groupable="g1=a!g2=a">  1  </bar>
  <bar data-groupable="g1=a!g2=a">  5  </bar>
    </y>
  </x>
  <x>
    <y>
  <bar data-groupable="g1=b!g2=a">  3  </bar>
  <bar data-groupable="g1=b!g2=a">  7  </bar>
    </y>
  </x>
  <x>
    <y>  
  <bar data-groupable="g1=a!g2=b">  2  </bar>
  <bar data-groupable="g1=a!g2=b">  6  </bar>
    </y>
  </x>
  <x>
    <y>  
  <bar data-groupable="g1=b!g2=b">  4  </bar>
  <bar data-groupable="g1=b!g2=b">  8  </bar>
    </y>
  </x>
</foo>
cornae commented 12 years ago

You're thinking about doing grouping (and sorting?) all client side instead of re-injecting and server side?

jcbrand commented 9 years ago

Closing this ticket due to inactivity of over 3 years.