nested-sortable

nestedsortable dynamic item not collapsing

[亡魂溺海] 提交于 2019-12-25 16:44:45
问题 I am using this nested sortable plugin mjsarfatti.com/sandbox/nestedSortable and the only issue I have so far is when I dynamically add an item to the "tree", I am not able to expand or collapse the item(s). I am just using the sample code so far, and adding to that. How I am adding the items dynamically: $('#new-button').on('click', function() { var nextId = $('ol.sortable').nestedSortable('nextId'); var $li = $("<li id=\"list_" + nextId + "\"><div><span class=\"disclose\"><span></span> <

KnockoutJS: Make nested sortable automatically expand when adding a child

不想你离开。 提交于 2019-12-25 05:50:42
问题 In the attached example I have a nested sortable that is capable of displaying tree structures. The goal is to make the structure expand when new child is added to make the change visible. A function automatically expands the structure when a new item is being added, but it only expands after adding 2nd child , it should expand immediately after adding 1st child. Something is probably wrong with the template, or a simple jQuery+CSS trick could solve the problem, but I can't find the right one

Nest jQuery UI sortables

放肆的年华 提交于 2019-12-18 04:52:35
问题 Is there a way to have nested jQuery sortables? As in nested containers, not in the sense of a nested list. <div class="container"> <div class="item"></div> <div class="item"></div> <div class="item"></div> </div> <div class="container"> <div class="item"></div> <div class="container"> <div class="item"></div> <div class="item"></div> <div class="item"></div> </div> <div class="item"></div> </div> $('.container').sortable({ connectWith: '.container' }); http://jsfiddle.net/ExLqv/2/ That

jQueryUI sortable list in combination with Knockout - nested sortable lists

若如初见. 提交于 2019-12-12 10:02:18
问题 I am new to Knockout (a couple of days) and am attempting to rework a page that has nested sortable lists to use it. I found a great answer to using sortable lists with Knockout here: Knockout custom binding for jQuery UI Sortable - strange behavior However, I can't get it to work with nested sortable lists. Attempting to click and drag any item below the root list has the effect of dragging the associated root item. In other words, the nested lists don't work at all. The second option in the

Jquery nestedSortable block the drag of an element to the top level

a 夏天 提交于 2019-12-10 11:12:58
问题 I have two problem, This nestedSortable is not working in this code, where's the problem ? I want to block a user to drag an sub-element to the top level (base), i know the library does not allow it, is there a tweak ? Here is all my code : <html> <head> <style> html { background-color: #eee; } body { color: #333; background-color: #fff; font-size: 13px; font-family: "Helvetica Neue", Corbel, "Nimbus Sans L", Helvetica, Arial, sans-serif; padding: 2em 4em; width: 860px; margin: 0 auto; } pre,

jQueryUI sortable list in combination with Knockout - nested sortable lists

我的梦境 提交于 2019-12-06 08:21:20
I am new to Knockout (a couple of days) and am attempting to rework a page that has nested sortable lists to use it. I found a great answer to using sortable lists with Knockout here: Knockout custom binding for jQuery UI Sortable - strange behavior However, I can't get it to work with nested sortable lists. Attempting to click and drag any item below the root list has the effect of dragging the associated root item. In other words, the nested lists don't work at all. The second option in the aforementioned solution is what I went with. It seemed the simplest and clearest to me. Is there a

Jquery nestedSortable block the drag of an element to the top level

天涯浪子 提交于 2019-12-06 05:11:54
I have two problem, This nestedSortable is not working in this code, where's the problem ? I want to block a user to drag an sub-element to the top level (base), i know the library does not allow it, is there a tweak ? Here is all my code : <html> <head> <style> html { background-color: #eee; } body { color: #333; background-color: #fff; font-size: 13px; font-family: "Helvetica Neue", Corbel, "Nimbus Sans L", Helvetica, Arial, sans-serif; padding: 2em 4em; width: 860px; margin: 0 auto; } pre, code { font-size: 12px; } pre { width: 100%; overflow: auto; } small { font-size: 90%; } small code {

Pandas pivot table Nested Sorting

久未见 提交于 2019-11-29 15:38:58
Given this data frame and pivot table: import pandas as pd df=pd.DataFrame({'A':['x','y','z','x','y','z'], 'B':['one','one','one','two','two','two'], 'C':[7,5,3,4,1,6]}) df A B C 0 x one 7 1 y one 5 2 z one 3 3 x two 4 4 y two 1 5 z two 6 table = pd.pivot_table(df, index=['A', 'B'],aggfunc=np.sum) table A B x one 7 two 4 y one 5 two 1 z one 3 two 6 Name: C, dtype: int64 I want to sort the pivot table such that the order of 'A' is z, x, y and the order of 'B' is based on the descendingly-sorted values from data frame column 'C'. Like this: A B z two 6 one 3 x one 7 two 4 y one 5 two 1 Name: C,

Nest jQuery UI sortables

狂风中的少年 提交于 2019-11-29 06:55:05
Is there a way to have nested jQuery sortables? As in nested containers, not in the sense of a nested list. <div class="container"> <div class="item"></div> <div class="item"></div> <div class="item"></div> </div> <div class="container"> <div class="item"></div> <div class="container"> <div class="item"></div> <div class="item"></div> <div class="item"></div> </div> <div class="item"></div> </div> $('.container').sortable({ connectWith: '.container' }); http://jsfiddle.net/ExLqv/2/ That example pretty much works, but when I drop the nested container I get an error: Uncaught

Pandas pivot table Nested Sorting

﹥>﹥吖頭↗ 提交于 2019-11-28 10:38:56
问题 Given this data frame and pivot table: import pandas as pd df=pd.DataFrame({'A':['x','y','z','x','y','z'], 'B':['one','one','one','two','two','two'], 'C':[7,5,3,4,1,6]}) df A B C 0 x one 7 1 y one 5 2 z one 3 3 x two 4 4 y two 1 5 z two 6 table = pd.pivot_table(df, index=['A', 'B'],aggfunc=np.sum) table A B x one 7 two 4 y one 5 two 1 z one 3 two 6 Name: C, dtype: int64 I want to sort the pivot table such that the order of 'A' is z, x, y and the order of 'B' is based on the descendingly