knockout-sortable

Knockout nested sortable lists

青春壹個敷衍的年華 提交于 2019-12-12 18:26:03
问题 I need to build a web page that has two lists that can be swapped around. The lists have items that can also be swapped or moved from one list to the other. I used knockoutjs and knockoutjs-sortable to implement this. HTML <ul class="Tasks" data-bind="sortable: TaskLists"> <li class="taskList"> <span data-bind="text: Title" style='background: lightgray;'></span> <ul data-bind="sortable: Tasks"> <li class="item"> <span class="taskName" href="#" data-bind="text: name"></span> </li> </ul> </li>

knockout draggable sortable mapping clone alteration

巧了我就是萌 提交于 2019-12-11 07:14:42
问题 I am trying to use knockout-sortable, with the mapping plugin, to drag a list of products to another list. Here is a very stripped-back fiddle to try and show what I'm getting at. What I want is for the products in the 'cart' to reference, not clone, the products on the 'shelf'. I have managed to calculate the name of the items in the cart by referencing those on the shelf, but I am having trouble in getting the products in the cart to only have the data they need to make this reference,

Custom binding for cleditor fails after sorting elements through knockout sortable

本秂侑毒 提交于 2019-12-11 06:51:42
问题 First up: check this fiddle. I have sortable array of elements created with the Knockout sortable library. When I initially apply the binding the cleditor initializes fine. However, when sortable elements are sorted, the cleditor fails to re-initialize (I'm not sure what happens but cleditor fails). The cleditor just displays "true" instead of actual value in Firefox, and nothing in all other browsers. I'm trying to figure out where the problem is, whether it is on the custom binding, or

Knockout sortable drag and drop from outside

五迷三道 提交于 2019-12-08 08:34:46
问题 maybe someone can help me. I got a large view in a webapp. There is a list of products on the left and a list of categories on the right side. The products should be dragged inside the categories. The list of products was an observableArray. Now we got performance problems (especially on IE) when the list has more than 1000 entries. So cause the products itself does not change, we took them out of the knockout binding, concat them in a string and append only one node. Now of course, the

Add one last tab to a sortable tabbed list

ぃ、小莉子 提交于 2019-12-07 22:42:48
问题 I'm using twitter bootstrap, knockout, knockout-sortable, and JQuery UI (also haml but it's inconsequential to the question). I display a tabbed list like the following. It adds a final tab with a button inside. %ul.nav.nav-tabs /ko foreach: pages %li %span{ "data-bind" => "text: name()" } / /ko %li %button.btn %i.icon-plus I'm trying to make the tabs sortable (via dragging) but I'm running into problems with the button: %ul.nav.nav-tabs{ "data-bind" => "sortable: pages" } %li %span{ "data

Knockout.js nested sortable bindings

安稳与你 提交于 2019-12-07 02:10:31
问题 I am working with the knockout.js sortable plugin; however, I ran into a problem that I have so far been unable to solve. I have two sortable bindings, one for buckets and another for bucketItems. I am able to reorder bucketItems between buckets; however, I am unable to reorder buckets. Would you have any idea why this would be? I am also using nested with bindings, but as far as I can tell, this is not what is causing problems. I would greatly appreciate any insight you have to offer. 回答1: I

Knockout “if” binding doesn't work with expression in a sortable list?

房东的猫 提交于 2019-12-07 00:05:53
问题 I just run into another problem with my To-do-like sortable list made with Knockout and Knockout-sortable plugin. I need to put a red delimiter under the element placed in the current time and cancel the sort if a element is dropped before that delimiter. I tried with a "visible" binding and it works in some way, but the visibile binding just hide the DOM element and it mess up the sortable arrayIndex, adding unnecessary element to it. <div class="delimiter" data-bind="visible: time() ==

Add one last tab to a sortable tabbed list

倾然丶 夕夏残阳落幕 提交于 2019-12-06 09:37:03
I'm using twitter bootstrap, knockout, knockout-sortable, and JQuery UI (also haml but it's inconsequential to the question). I display a tabbed list like the following. It adds a final tab with a button inside. %ul.nav.nav-tabs /ko foreach: pages %li %span{ "data-bind" => "text: name()" } / /ko %li %button.btn %i.icon-plus I'm trying to make the tabs sortable (via dragging) but I'm running into problems with the button: %ul.nav.nav-tabs{ "data-bind" => "sortable: pages" } %li %span{ "data-bind" => "text: name()" } /%li / %button.btn / %i.icon-plus I can't use /ko sortable: pages because it

Knockout.js nested sortable bindings

倾然丶 夕夏残阳落幕 提交于 2019-12-05 06:27:25
I am working with the knockout.js sortable plugin; however, I ran into a problem that I have so far been unable to solve. I have two sortable bindings, one for buckets and another for bucketItems. I am able to reorder bucketItems between buckets; however, I am unable to reorder buckets. Would you have any idea why this would be? I am also using nested with bindings, but as far as I can tell, this is not what is causing problems. I would greatly appreciate any insight you have to offer. I don't know your exact structure, but you can use the connectClass option to control which sortable lists

Knockout “if” binding doesn't work with expression in a sortable list?

╄→尐↘猪︶ㄣ 提交于 2019-12-05 06:16:43
I just run into another problem with my To-do-like sortable list made with Knockout and Knockout-sortable plugin. I need to put a red delimiter under the element placed in the current time and cancel the sort if a element is dropped before that delimiter. I tried with a "visible" binding and it works in some way, but the visibile binding just hide the DOM element and it mess up the sortable arrayIndex, adding unnecessary element to it. <div class="delimiter" data-bind="visible: time() == $root.limit()"></div> The "if" binding would be better because it insert DOM element only if necessary, but