Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
知鸟1号
AdminLTE
提交
2c372a2c
A
AdminLTE
项目概览
知鸟1号
/
AdminLTE
与 Fork 源项目一致
从无法访问的项目Fork
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
A
AdminLTE
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
2c372a2c
编写于
3月 04, 2017
作者:
A
Abdullah Almsaeed
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Create direct chat plugin
上级
b04a9946
变更
4
展开全部
隐藏空白更改
内联
并排
Showing
4 changed file
with
141 addition
and
2 deletion
+141
-2
Gruntfile.js
Gruntfile.js
+2
-1
build/js/DirectChat.js
build/js/DirectChat.js
+68
-0
dist/js/adminlte.js
dist/js/adminlte.js
+70
-0
dist/js/adminlte.min.js
dist/js/adminlte.min.js
+1
-1
未找到文件。
Gruntfile.js
浏览文件 @
2c372a2c
...
@@ -138,7 +138,8 @@ module.exports = function (grunt) { // jshint ignore:line
...
@@ -138,7 +138,8 @@ module.exports = function (grunt) { // jshint ignore:line
'
build/js/Tree.js
'
,
'
build/js/Tree.js
'
,
'
build/js/ControlSidebar.js
'
,
'
build/js/ControlSidebar.js
'
,
'
build/js/BoxWidget.js
'
,
'
build/js/BoxWidget.js
'
,
'
build/js/TodoList.js
'
'
build/js/TodoList.js
'
,
'
build/js/DirectChat.js
'
],
],
dest
:
'
dist/js/adminlte.js
'
dest
:
'
dist/js/adminlte.js
'
}
}
...
...
build/js/DirectChat.js
0 → 100644
浏览文件 @
2c372a2c
/* DirectChat()
* ===============
* Toggles the state of the control sidebar
*
* @Usage: $('#my-chat-box').directChat(options)
* or add [data-widget="direct-chat"] to the trigger
* Pass any option as data-option="value"
*/
+
function
(
$
)
{
'
use strict
'
var
DataKey
=
'
lte.directchat
'
var
Selector
=
{
data
:
'
[data-widget="chat-pane-toggle"]
'
,
box
:
'
.direct-chat
'
}
var
ClassName
=
{
open
:
'
direct-chat-contacts-open
'
}
// DirectChat Class Definition
// ===========================
var
DirectChat
=
function
(
element
)
{
this
.
element
=
element
}
DirectChat
.
prototype
.
toggle
=
function
()
{
var
box
=
$
(
this
).
parents
(
Selector
.
box
).
first
();
box
.
toggleClass
(
ClassName
.
open
);
}
// Plugin Definition
// =================
function
Plugin
(
option
)
{
return
this
.
each
(
function
()
{
var
$this
=
$
(
this
)
var
data
=
$this
.
data
(
DataKey
)
if
(
!
data
)
{
$this
.
data
(
DataKey
,
(
data
=
new
DirectChat
(
$this
)))
}
if
(
typeof
option
==
'
string
'
)
data
.
toggle
()
})
}
var
old
=
$
.
fn
.
directChat
$
.
fn
.
directChat
=
Plugin
$
.
fn
.
directChat
.
Constructor
=
DirectChat
// No Conflict Mode
// ================
$
.
fn
.
directChat
.
noConflict
=
function
()
{
$
.
fn
.
directChat
=
old
return
this
}
// DirectChat Data API
// ===================
$
(
document
).
on
(
'
click
'
,
Selector
.
data
,
function
(
event
)
{
if
(
event
)
event
.
preventDefault
()
Plugin
.
call
(
$
(
this
),
'
toggle
'
)
})
}(
jQuery
)
dist/js/adminlte.js
浏览文件 @
2c372a2c
...
@@ -923,3 +923,73 @@ throw new Error('AdminLTE requires jQuery')
...
@@ -923,3 +923,73 @@ throw new Error('AdminLTE requires jQuery')
})
})
}(
jQuery
)
}(
jQuery
)
/* DirectChat()
* ===============
* Toggles the state of the control sidebar
*
* @Usage: $('#my-chat-box').directChat(options)
* or add [data-widget="direct-chat"] to the trigger
* Pass any option as data-option="value"
*/
+
function
(
$
)
{
'
use strict
'
var
DataKey
=
'
lte.directchat
'
var
Selector
=
{
data
:
'
[data-widget="chat-pane-toggle"]
'
,
box
:
'
.direct-chat
'
}
var
ClassName
=
{
open
:
'
direct-chat-contacts-open
'
}
// DirectChat Class Definition
// ===========================
var
DirectChat
=
function
(
element
)
{
this
.
element
=
element
}
DirectChat
.
prototype
.
toggle
=
function
()
{
var
box
=
$
(
this
).
parents
(
Selector
.
box
).
first
();
box
.
toggleClass
(
ClassName
.
open
);
}
// Plugin Definition
// =================
function
Plugin
(
option
)
{
return
this
.
each
(
function
()
{
var
$this
=
$
(
this
)
var
data
=
$this
.
data
(
DataKey
)
if
(
!
data
)
{
$this
.
data
(
DataKey
,
(
data
=
new
DirectChat
(
$this
)))
}
if
(
typeof
option
==
'
string
'
)
data
.
toggle
()
})
}
var
old
=
$
.
fn
.
directChat
$
.
fn
.
directChat
=
Plugin
$
.
fn
.
directChat
.
Constructor
=
DirectChat
// No Conflict Mode
// ================
$
.
fn
.
directChat
.
noConflict
=
function
()
{
$
.
fn
.
directChat
=
old
return
this
}
// DirectChat Data API
// ===================
$
(
document
).
on
(
'
click
'
,
Selector
.
data
,
function
(
event
)
{
if
(
event
)
event
.
preventDefault
()
Plugin
.
call
(
$
(
this
),
'
toggle
'
)
})
}(
jQuery
)
dist/js/adminlte.min.js
浏览文件 @
2c372a2c
此差异已折叠。
点击以展开。
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录