Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Miykael_xxm
amazeui
提交
de60f23d
A
amazeui
项目概览
Miykael_xxm
/
amazeui
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
A
amazeui
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
de60f23d
编写于
12月 16, 2014
作者:
M
Minwe
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Popover plugin add color modifiers
上级
ecacd7bc
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
73 addition
and
7 deletion
+73
-7
CHANGELOG.md
CHANGELOG.md
+8
-0
js/ui.popover.js
js/ui.popover.js
+13
-4
less/ui.popover.less
less/ui.popover.less
+52
-3
未找到文件。
CHANGELOG.md
浏览文件 @
de60f23d
# Amaze UI Change Log
# Amaze UI Change Log
---
---
### 2014.12 W3
**JS:**
-
`NEW`
#283 添加表单验证插件;
-
`IMPROVED`
Popover 增加大小、颜色样式;
### 2014.12 W2
### 2014.12 W2
**CSS:**
**CSS:**
...
...
js/ui.popover.js
浏览文件 @
de60f23d
...
@@ -19,6 +19,7 @@ var Popover = function(element, options) {
...
@@ -19,6 +19,7 @@ var Popover = function(element, options) {
};
};
Popover
.
DEFAULTS
=
{
Popover
.
DEFAULTS
=
{
theme
:
undefined
,
trigger
:
'
click
'
,
trigger
:
'
click
'
,
content
:
''
,
content
:
''
,
open
:
false
,
open
:
false
,
...
@@ -182,12 +183,20 @@ Popover.prototype.close = function() {
...
@@ -182,12 +183,20 @@ Popover.prototype.close = function() {
Popover
.
prototype
.
getPopover
=
function
()
{
Popover
.
prototype
.
getPopover
=
function
()
{
var
uid
=
UI
.
utils
.
generateGUID
(
'
am-popover
'
);
var
uid
=
UI
.
utils
.
generateGUID
(
'
am-popover
'
);
return
$
(
this
.
options
.
tpl
).
attr
(
'
id
'
,
uid
);
var
theme
=
[];
if
(
this
.
options
.
theme
)
{
$
.
each
(
this
.
options
.
theme
.
split
(
'
,
'
),
function
(
i
,
item
)
{
theme
.
push
(
'
am-popover-
'
+
$
.
trim
(
item
));
});
}
return
$
(
this
.
options
.
tpl
).
attr
(
'
id
'
,
uid
).
addClass
(
theme
.
join
(
'
'
));
};
};
Popover
.
prototype
.
setContent
=
function
()
{
Popover
.
prototype
.
setContent
=
function
(
content
)
{
content
=
content
||
this
.
options
.
content
;
this
.
$popover
&&
this
.
$popover
.
find
(
'
.am-popover-inner
'
).
empty
().
this
.
$popover
&&
this
.
$popover
.
find
(
'
.am-popover-inner
'
).
empty
().
html
(
this
.
options
.
content
);
html
(
content
);
};
};
Popover
.
prototype
.
events
=
function
()
{
Popover
.
prototype
.
events
=
function
()
{
...
@@ -222,7 +231,7 @@ function Plugin(option) {
...
@@ -222,7 +231,7 @@ function Plugin(option) {
}
}
if
(
typeof
option
==
'
string
'
)
{
if
(
typeof
option
==
'
string
'
)
{
data
[
option
]();
data
[
option
]
&&
data
[
option
]
();
}
}
});
});
}
}
...
...
less/ui.popover.less
浏览文件 @
de60f23d
...
@@ -25,6 +25,9 @@
...
@@ -25,6 +25,9 @@
@popover-color: @white;
@popover-color: @white;
@popover-border-radius: @global-radius;
@popover-border-radius: @global-radius;
@popover-duration: 300ms;
@popover-duration: 300ms;
@popover-font-size: @global-font-size;
@popover-sm-font-size: @font-size-sm;
@popover-lg-font-size: @font-size-lg;
/* ==========================================================================
/* ==========================================================================
...
@@ -42,9 +45,9 @@
...
@@ -42,9 +45,9 @@
color: @popover-color;
color: @popover-color;
border: 1px solid @popover-border;
border: 1px solid @popover-border;
display: none;
display: none;
font-size: @popover-font-size;
z-index: @z-index-popover;
z-index: @z-index-popover;
opacity: 0;
opacity: 0;
transform: none;
transition: opacity @popover-duration;
transition: opacity @popover-duration;
.hook-popover;
.hook-popover;
...
@@ -57,7 +60,7 @@
...
@@ -57,7 +60,7 @@
.@{ns}popover-inner {
.@{ns}popover-inner {
position: relative;
position: relative;
background: @popover-bg;
background: @popover-bg;
padding:
10
px;
padding:
8
px;
z-index: 110;
z-index: 110;
.scrollable();
.scrollable();
.hook-popover-inner;
.hook-popover-inner;
...
@@ -70,7 +73,6 @@
...
@@ -70,7 +73,6 @@
z-index: 100;
z-index: 100;
.caret-up(8px, @popover-bg);
.caret-up(8px, @popover-bg);
overflow: hidden;
overflow: hidden;
.hook-popover-caret;
.hook-popover-caret;
.@{ns}popover-top & {
.@{ns}popover-top & {
...
@@ -98,6 +100,53 @@
...
@@ -98,6 +100,53 @@
}
}
// Modifiers
// =============================================================================
.@{ns}popover-sm {
font-size: @popover-sm-font-size;
.@{ns}popover-inner {
padding: 5px;
}
}
.@{ns}popover-lg {
font-size: @popover-lg-font-size;
}
.popover-color-variant(@bg-color: @global-primary) {
border-color: @bg-color;
.@{ns}popover-inner {
background: @bg-color;
}
.@{ns}popover-caret {
border-bottom-color: @bg-color;
}
};
.@{ns}popover-secondary {
.popover-color-variant(@global-primary);
}
.@{ns}popover-secondary {
.popover-color-variant(@global-secondary);
}
.@{ns}popover-success {
.popover-color-variant(@global-success);
}
.@{ns}popover-warning {
.popover-color-variant(@global-warning);
}
.@{ns}popover-danger {
.popover-color-variant(@global-danger);
}
// Hooks
// Hooks
// =============================================================================
// =============================================================================
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录