Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
leizi929
Sortable
提交
43d2b4cc
S
Sortable
项目概览
leizi929
/
Sortable
与 Fork 源项目一致
从无法访问的项目Fork
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
S
Sortable
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
43d2b4cc
编写于
1月 20, 2016
作者:
L
Lebedev Konstantin
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #742 from why520crazy/master
new PR for
https://github.com/RubaXa/Sortable/pull/741
上级
504f868d
d1356e16
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
57 addition
and
13 deletion
+57
-13
CONTRIBUTING.md
CONTRIBUTING.md
+1
-1
Sortable.js
Sortable.js
+7
-1
knockout-sortable.js
knockout-sortable.js
+49
-11
未找到文件。
CONTRIBUTING.md
浏览文件 @
43d2b4cc
...
...
@@ -3,7 +3,7 @@
### Issue
1.
Try
[
dev
](
https://github.com/RubaXa/Sortable/tree/dev/
)
-branch, perhaps the problem has been solved;
2.
[
Use the search
](
https://github.com/RubaXa/Sortable/search?q=problem
)
, maybe already have an answer;
2.
[
Use the search
](
https://github.com/RubaXa/Sortable/search?
type=Issues&
q=problem
)
, maybe already have an answer;
3.
If not found, create example on
[
jsbin.com (draft)
](
http://jsbin.com/zunibaxada/1/edit?html,js,output
)
and describe the problem.
---
...
...
Sortable.js
浏览文件 @
43d2b4cc
...
...
@@ -24,6 +24,12 @@
})(
function
()
{
"
use strict
"
;
if
(
typeof
window
==
"
undefined
"
||
typeof
window
.
document
==
"
undefined
"
)
{
return
function
()
{
throw
new
Error
(
"
Sortable.js requires a window with a document
"
);
}
}
var
dragEl
,
parentEl
,
ghostEl
,
...
...
@@ -363,7 +369,7 @@
_this
.
_disableDelayedDrag
();
// Make the element draggable
dragEl
.
draggable
=
tru
e
;
dragEl
.
draggable
=
_this
.
nativeDraggabl
e
;
// Chosen item
_toggleClass
(
dragEl
,
_this
.
options
.
chosenClass
,
true
);
...
...
knockout-sortable.js
浏览文件 @
43d2b4cc
(
function
(
factory
)
{
"
use strict
"
;
if
(
typeof
define
===
"
function
"
&&
define
.
amd
)
{
// AMD anonymous module
define
([
"
knockout
"
,
"
./Sortable
"
],
factory
);
}
else
if
(
typeof
require
===
"
function
"
&&
typeof
exports
===
"
object
"
&&
typeof
module
===
"
object
"
)
{
// CommonJS module
var
ko
=
require
(
"
knockout
"
);
var
Sortable
=
require
(
'
./Sortable
'
);
factory
(
ko
,
Sortable
);
}
else
{
// No module loader (plain <script> tag) - put directly in global namespace
factory
(
window
.
ko
,
window
.
Sortable
);
//get ko ref via global or require
var
koRef
;
if
(
typeof
ko
!==
'
undefined
'
)
{
//global ref already defined
koRef
=
ko
;
}
else
if
(
typeof
require
===
'
function
'
&&
typeof
exports
===
'
object
'
&&
typeof
module
===
'
object
'
)
{
//commonjs / node.js
koRef
=
require
(
'
knockout
'
);
}
//get sortable ref via global or require
var
sortableRef
;
if
(
typeof
Sortable
!==
'
undefined
'
)
{
//global ref already defined
sortableRef
=
Sortable
;
}
else
if
(
typeof
require
===
'
function
'
&&
typeof
exports
===
'
object
'
&&
typeof
module
===
'
object
'
)
{
//commonjs / node.js
sortableRef
=
require
(
'
sortablejs
'
);
}
//use references if we found them
if
(
koRef
!==
undefined
&&
sortableRef
!==
undefined
)
{
factory
(
koRef
,
sortableRef
);
}
//if both references aren't found yet, get via AMD if available
else
if
(
typeof
define
===
'
function
'
&&
define
.
amd
){
//we may have a reference to only 1, or none
if
(
koRef
!==
undefined
&&
sortableRef
===
undefined
)
{
define
([
'
./Sortable
'
],
function
(
amdSortableRef
){
factory
(
koRef
,
amdSortableRef
);
});
}
else
if
(
koRef
===
undefined
&&
sortableRef
!==
undefined
)
{
define
([
'
knockout
'
],
function
(
amdKnockout
){
factory
(
amdKnockout
,
sortableRef
);
});
}
else
if
(
koRef
===
undefined
&&
sortableRef
===
undefined
)
{
define
([
'
knockout
'
,
'
./Sortable
'
],
factory
);
}
}
//no more routes to get references
else
{
//report specific error
if
(
koRef
!==
undefined
&&
sortableRef
===
undefined
)
{
throw
new
Error
(
'
knockout-sortable could not get reference to Sortable
'
);
}
else
if
(
koRef
===
undefined
&&
sortableRef
!==
undefined
)
{
throw
new
Error
(
'
knockout-sortable could not get reference to Knockout
'
);
}
else
if
(
koRef
===
undefined
&&
sortableRef
===
undefined
)
{
throw
new
Error
(
'
knockout-sortable could not get reference to Knockout or Sortable
'
);
}
}
})(
function
(
ko
,
Sortable
)
{
"
use strict
"
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录