Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
superrain51
apollo
提交
0211a1f2
apollo
项目概览
superrain51
/
apollo
与 Fork 源项目一致
从无法访问的项目Fork
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
apollo
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
0211a1f2
编写于
12月 17, 2018
作者:
乐
乐兜
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
edit config value in fullscreen
上级
152b0323
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
238 addition
and
1 deletion
+238
-1
apollo-portal/src/main/resources/static/config.html
apollo-portal/src/main/resources/static/config.html
+2
-0
apollo-portal/src/main/resources/static/scripts/directive/item-modal-directive.js
...esources/static/scripts/directive/item-modal-directive.js
+2
-0
apollo-portal/src/main/resources/static/vendor/jquery-plugin/jquery.textareafullscreen.js
.../static/vendor/jquery-plugin/jquery.textareafullscreen.js
+199
-0
apollo-portal/src/main/resources/static/vendor/jquery-plugin/textareafullscreen.css
...ources/static/vendor/jquery-plugin/textareafullscreen.css
+34
-0
apollo-portal/src/main/resources/static/views/component/item-modal.html
...src/main/resources/static/views/component/item-modal.html
+1
-1
未找到文件。
apollo-portal/src/main/resources/static/config.html
浏览文件 @
0211a1f2
...
...
@@ -8,6 +8,7 @@
<link
rel=
"stylesheet"
type=
"text/css"
href=
"vendor/bootstrap/css/bootstrap.min.css"
>
<link
rel=
"stylesheet"
type=
"text/css"
href=
"vendor/angular/angular-toastr-1.4.1.min.css"
>
<link
rel=
"stylesheet"
type=
"text/css"
href=
"vendor/select2/select2.min.css"
>
<link
rel=
"stylesheet"
type=
"text/css"
href=
"vendor/jquery-plugin/textareafullscreen.css"
>
<link
rel=
"stylesheet"
type=
"text/css"
media=
'all'
href=
"vendor/angular/loading-bar.min.css"
>
<link
rel=
"stylesheet"
type=
"text/css"
href=
"styles/common-style.css"
>
</head>
...
...
@@ -364,6 +365,7 @@
<script
src=
"vendor/jquery.min.js"
type=
"text/javascript"
></script>
<script
src=
"vendor/select2/select2.min.js"
type=
"text/javascript"
></script>
<script
src=
"vendor/jquery-plugin/jquery.textareafullscreen.js"
type=
"text/javascript"
></script>
<!--lodash.js-->
<script
src=
"vendor/lodash.min.js"
type=
"text/javascript"
></script>
...
...
apollo-portal/src/main/resources/static/scripts/directive/item-modal-directive.js
浏览文件 @
0211a1f2
...
...
@@ -30,6 +30,8 @@ function itemModalDirective(toastr, $sce, AppUtil, EventManager, ConfigService)
scope
.
valueWithHiddenChars
=
$sce
.
trustAsHtml
(
''
);
});
$
(
"
#valueEditor
"
).
textareafullscreen
();
function
doItem
()
{
if
(
!
scope
.
item
.
value
)
{
...
...
apollo-portal/src/main/resources/static/vendor/jquery-plugin/jquery.textareafullscreen.js
0 → 100755
浏览文件 @
0211a1f2
/*
jQuery Textarea Fullscreen Editor v1.0
Fullscreen text editor plugin for jQuery.
:For more details visit http://github.com/CreoArt/jquery.textareafullscreen
- CreoArt <support@creoart.org>
- http://github.com/CreoArt
Licensed under Apache - https://raw.githubusercontent.com/CreoArt/jquery.textareafullscreen/master/LICENSE
*/
(
function
(
$
)
{
"
use strict
"
;
var
isFullscreen
=
false
,
$el
,
$wrapper
,
$editor
,
$icon
,
$overlay
,
transitionDuration
=
300
,
sourceWidth
,
sourceHeight
,
settings
=
{
overlay
:
true
,
maxWidth
:
''
,
maxHeight
:
''
};
var
methods
=
{
init
:
function
(
opts
)
{
settings
=
settings
||
{};
$
.
extend
(
true
,
settings
,
settings
);
$
.
extend
(
true
,
settings
,
opts
);
$el
=
$
(
this
);
if
(
!
$el
.
is
(
'
textarea
'
))
{
$
.
error
(
'
Error initializing Textarea Fullscreen Editor Plugin. It can only work on <textarea> element.
'
);
return
;
}
var
content
=
'
<div class="tx-editor-wrapper"><div class="tx-editor"><a href="#" class="tx-icon"></a></div></div>
'
;
var
$wrapper
=
$
(
content
).
insertAfter
(
this
);
$editor
=
$wrapper
.
find
(
'
.tx-editor
'
);
$icon
=
$editor
.
find
(
'
.tx-icon
'
);
$editor
.
append
(
$el
);
$el
.
css
({
'
width
'
:
'
100%
'
,
'
height
'
:
'
100%
'
,
'
resize
'
:
'
none
'
});
// ESC = closes the fullscreen mode
$
(
window
).
on
(
"
keyup.txeditor
"
,
function
(
e
)
{
if
(
e
.
keyCode
==
27
)
{
isFullscreen
?
methods
.
minimize
()
:
''
;
}
});
// fullscreen icon click event
$icon
.
on
(
'
click.txeditor.icon
'
,
function
(
e
)
{
e
.
preventDefault
();
methods
[
isFullscreen
?
"
minimize
"
:
"
expand
"
]();
});
return
this
;
},
showOverlay
:
function
()
{
$
(
'
<div class="tx-editor-overlay" />
'
).
appendTo
(
'
body
'
)
.
fadeTo
(
0
,
1
)
.
click
(
function
()
{
methods
.
minimize
();
});
return
this
;
},
removeOverlay
:
function
()
{
var
$overlay
=
$
(
'
.tx-editor-overlay
'
);
if
(
$overlay
.
length
)
{
$overlay
.
fadeTo
(
0
,
0
,
function
()
{
$
(
this
).
remove
();
});
}
return
this
;
},
expand
:
function
()
{
settings
.
maxWidth
?
$editor
.
css
(
'
max-width
'
,
settings
.
maxWidth
)
:
''
;
settings
.
maxHeight
?
$editor
.
css
(
'
max-height
'
,
settings
.
maxHeight
)
:
''
;
if
(
settings
.
overlay
)
{
methods
.
showOverlay
();
}
$
(
window
).
on
(
'
resize.txeditor
'
,
function
()
{
maxRelocate
(
$editor
);
});
$editor
.
addClass
(
'
expanded
'
);
transitions
();
return
this
;
},
minimize
:
function
()
{
$
(
window
).
off
(
'
resize.txeditor
'
,
relocate
(
$editor
))
$editor
.
removeClass
(
'
expanded
'
)
.
css
({
'
max-width
'
:
'
none
'
,
'
max-height
'
:
'
none
'
});
if
(
settings
.
overlay
)
{
methods
.
removeOverlay
();
}
transitions
();
return
this
;
},
destroy
:
function
()
{
methods
.
removeOverlay
();
$wrapper
.
insertBefore
(
$el
);
$wrapper
.
remove
();
$
(
window
).
off
(
'
keyup.txeditor
'
)
.
off
(
'
resize.txeditor
'
);
return
this
;
},
};
var
transitions
=
function
()
{
if
(
isFullscreen
)
{
$el
.
focus
();
isFullscreen
=
false
;
relocate
(
$editor
);
}
else
{
$el
.
focus
();
$editor
.
css
(
'
opacity
'
,
1
);
isFullscreen
=
true
;
maxRelocate
(
$editor
);
}
return
;
};
var
inited
=
false
;
function
maxRelocate
(
el
)
{
if
(
!
inited
)
{
sourceWidth
=
el
.
width
();
sourceHeight
=
el
.
height
()
/
2
;
inited
=
true
;
}
var
yPos
=
0
|
(((
$
(
window
).
height
()
-
el
.
height
())
/
2
));
var
xPos
=
0
|
((
$
(
window
).
width
()
-
el
.
width
())
/
2
);
el
.
css
({
'
top
'
:
-
10
,
'
left
'
:
120
-
xPos
,
'
width
'
:
$
(
window
).
width
()
-
50
,
'
height
'
:
$
(
window
).
height
()
-
40
});
}
function
relocate
(
el
)
{
var
yPos
=
0
|
(((
$
(
window
).
height
()
-
el
.
height
())
/
2
));
var
xPos
=
0
|
((
$
(
window
).
width
()
-
el
.
width
())
/
2
);
el
.
css
({
'
top
'
:
yPos
,
'
left
'
:
xPos
,
'
width
'
:
sourceWidth
,
'
height
'
:
sourceHeight
});
}
$
.
fn
.
textareafullscreen
=
function
(
method
)
{
$
.
extend
(
methods
,
transitions
);
if
(
methods
[
method
])
{
return
methods
[
method
].
apply
(
this
,
Array
.
prototype
.
slice
.
call
(
arguments
,
1
));
}
else
if
(
typeof
method
===
'
object
'
||
!
method
)
{
return
methods
.
init
.
apply
(
this
,
arguments
);
}
else
{
$
.
error
(
'
Method
'
+
method
+
'
does not exist on jQuery.textareafullscreen
'
);
}
};
})(
jQuery
);
apollo-portal/src/main/resources/static/vendor/jquery-plugin/textareafullscreen.css
0 → 100755
浏览文件 @
0211a1f2
.tx-editor-wrapper
{
position
:
relative
;
}
.tx-editor-wrapper
.tx-editor.expanded
{
position
:
fixed
;
top
:
0
;
left
:
0
;
width
:
80%
;
height
:
80%
;
z-index
:
500
;
}
.tx-editor-wrapper
.tx-editor
{
height
:
140px
;
}
.tx-editor-wrapper
.tx-editor
.tx-icon
{
position
:
absolute
;
right
:
5px
;
top
:
5px
;
width
:
18px
;
height
:
16px
;
background-image
:
url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAAQCAYAAAAbBi9cAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAABV0RVh0Q3JlYXRpb24gVGltZQA4LzE2LzEzspl6ugAAABx0RVh0U29mdHdhcmUAQWRvYmUgRmlyZXdvcmtzIENTNui8sowAAAB7SURBVDiN7ZOxCsAgDESvxXyhi5P/Fif/0i6NGJH2KIUufVOUJB45s6lqw0DOGQylFHfeqSqCYEGMESJCF6aUAAC1Vt9IRPolixtDG1DVxjLnhtVL8yAvlZy8Nuy/0T1L19g1cY3Mavupd9bPWL5T9ERJV2SBrcfn238A3whjoYEPESwAAAAASUVORK5CYII=')
;
cursor
:
pointer
;
z-index
:
3
;
}
.tx-editor-overlay
{
position
:
fixed
;
top
:
0
;
left
:
0
;
right
:
0
;
bottom
:
0
;
background
:
rgba
(
255
,
255
,
255
,
0.7
);
z-index
:
2
;
opacity
:
0
;
}
apollo-portal/src/main/resources/static/views/component/item-modal.html
浏览文件 @
0211a1f2
...
...
@@ -31,7 +31,7 @@
Value
</label>
<div
class=
"col-sm-10"
valdr-form-group
>
<textarea
name=
"value"
class=
"form-control"
rows=
"6"
tabindex=
"2"
<textarea
id=
"valueEditor"
name=
"value"
class=
"form-control"
rows=
"6"
tabindex=
"2"
ng-required=
"true"
ng-model=
"item.value"
>
</textarea>
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录