views: 4832 times


Topic: http://forum.mootools.net/viewtopic.php?pid=21090
And an author Tom said,
ALSO, I backup the links and demo here,
ENJOY IT :-)
ps. Javascript Compressor Tool, http://javascriptcompressor.com/
ps2. Special thanks, Evelin, who correct my pool poor English.(XD)
* sortable floats (finally!) - Automatically enabled, you dont need any special parameters or anything to allow for the sorting floated list items or floated elements... Just lay your items out however you want and initialize your Sortable.This script is very powerful ajax sortable tool created from mootools. And there are the links and demo here,
* dragging between lists - You can allow as many lists as you want to be sortable with just a single Sortables instance. There's no complex setup or defining of relationships, just pass your lists ids' (or the lists themselves) in an array to the constructor and voila.
* sorting positioned lists - You can now even create a Sortables list that you've positioned with CSS or JavaScript. This allows for some crazy possibilities like draggable sortables!
* enhanced serialization - The serialize function is now much more powerful, allowing you to tweak the output to be just how you want... You can serialize just one, or all of the lists in a single call to the function, and you can optionally pass your own function to return exactly the data from each element that you want.
* sorting overflown lists - You can sort items that are in a container with a scrollbar, and you can even do advanced things like scroll the list up and down as the mouse gets near the edge of the scrollable container.
* cloning, ghosting, and revert effects - You can read more about these options in the source code.
And an author Tom said,
Keep in mind, these sortables, as well as the rest of version 1.2dev of mootools is still in development, so I wouldnt go using them in a production environment just yet. I will try to move the demos into demos.mootools.net soon, but until then, have fun, and be sure to let us know if you find any bugs or have any suggestions.When you use this tool, you have to download the mootools script file first. I picked up the script file here(You can choose the components by yourself.) and I hoped it could not confuse you in choosing the components.
ALSO, I backup the links and demo here,
- Sortable.js
- mootools svn download (You can use my script file here.)
- demo 1
- demo 2
ENJOY IT :-)
ps. Javascript Compressor Tool, http://javascriptcompressor.com/
ps2. Special thanks, Evelin, who correct my pool poor English.(XD)
Trackback URL : http://hina.ushiisland.net/blog/hinablue/trackback/289
-
[語法]mootools 排序 Delete
2007/11/08 19:11 Tracked fromMesak\'s Life移動排序:http://hina.ushiisland.net/blog/289自動排序:http://clientside.cnet.com/wiki/cnet-libraries/05-mootoolsextensions/02-effectshttp://clientside.cnet.com/cnet.gf/docs/files/mootools-extended/Effects/Fx-Sort-js.html為了專題做準備!
mootools_sortable_tool_by_tom.zip




Leave your greetings.
只有管理員能看到的回覆。
2007/11/08 00:29 [ Permalink : Modify/Delete : Reply ]serialize 後面的數字,是多個排序元件的 key
2007/11/08 07:34 [ Permalink : Modify/Delete ]demo 2 裡面有三個元件可以排序
若你只要輸出其中一個元件的排序內容
假設你要輸出第一個,那麼就使用 serialize(0)
第二個就是 serialize(1) 依此類推
如果不加數字或是使用 false 就是全部都輸出
了解了,謝謝你 :D,不小心勾到隱藏回覆....
2007/11/08 10:07 [ Permalink : Modify/Delete : Reply ]不好意思再請教的問題 :P
2007/11/09 13:22 [ Permalink : Modify/Delete : Reply ]clone、revert、constrain 這三個設定項,有什麼作用??
這三個選項在單一排序元件中可能看不出效果
2007/11/09 18:05 [ Permalink : Modify/Delete ]如果你不介意研究一下它的 source code 的話,上面就有說了
constrain - whether or not to constrain the element being dragged to its parent element. defaults to false.
clone - whether or not to display a copy of the actual element while dragging. defaults to true.
revert - whether or not to use an effect to slide the element into its final location after sorting. If you pass an object it will be treated as true and used as aditional options for the revert effect. defaults to false.
這個,簡單的解釋就是
constrain: 限制元素在元件內排序,也就是若你有 A, B 兩個排序元件,A 與 B 之中所擁有的排序元素無法互相交換的意思。
clone: 顯示元素的 ghosting,意思就是,你在拖曳元素 A 的時候,元素 A 原本的位置上會有一個半透明的 ghosting(鬼魂?),直到你放開元素為止。
revert: 這是一個 slide 特效,元素轉移位置或是所屬元件的時候,會產生滑動效果,這些效果可透過修改程式來改變成其他效果。
非常感謝你的回答,沒想到這個 plugin 還能夠 跨越不同的排序元件....
2007/11/09 21:04 [ Permalink : Modify/Delete : Reply ]說明文件我有看到,但是 英文太破了..... 一時之前 沒法理解,謝謝你!
對了,不知道這個 plugin能不能獨立出來? 在MOOTOOLS 需要用到什麼組件呢? 因為我還有一個 FANCYUPLOAD 通通放一起又覺得太大了,所以想分開組件來放...