Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
A
apollo
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
apollo
Commits
0211a1f2
Commit
0211a1f2
authored
Dec 17, 2018
by
乐兜
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
edit config value in fullscreen
parent
152b0323
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
238 additions
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
No files found.
apollo-portal/src/main/resources/static/config.html
View file @
0211a1f2
...
@@ -8,6 +8,7 @@
...
@@ -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/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/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/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"
media=
'all'
href=
"vendor/angular/loading-bar.min.css"
>
<link
rel=
"stylesheet"
type=
"text/css"
href=
"styles/common-style.css"
>
<link
rel=
"stylesheet"
type=
"text/css"
href=
"styles/common-style.css"
>
</head>
</head>
...
@@ -364,6 +365,7 @@
...
@@ -364,6 +365,7 @@
<script
src=
"vendor/jquery.min.js"
type=
"text/javascript"
></script>
<script
src=
"vendor/jquery.min.js"
type=
"text/javascript"
></script>
<script
src=
"vendor/select2/select2.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-->
<!--lodash.js-->
<script
src=
"vendor/lodash.min.js"
type=
"text/javascript"
></script>
<script
src=
"vendor/lodash.min.js"
type=
"text/javascript"
></script>
...
...
apollo-portal/src/main/resources/static/scripts/directive/item-modal-directive.js
View file @
0211a1f2
...
@@ -30,6 +30,8 @@ function itemModalDirective(toastr, $sce, AppUtil, EventManager, ConfigService)
...
@@ -30,6 +30,8 @@ function itemModalDirective(toastr, $sce, AppUtil, EventManager, ConfigService)
scope
.
valueWithHiddenChars
=
$sce
.
trustAsHtml
(
''
);
scope
.
valueWithHiddenChars
=
$sce
.
trustAsHtml
(
''
);
});
});
$
(
"
#valueEditor
"
).
textareafullscreen
();
function
doItem
()
{
function
doItem
()
{
if
(
!
scope
.
item
.
value
)
{
if
(
!
scope
.
item
.
value
)
{
...
...
apollo-portal/src/main/resources/static/vendor/jquery-plugin/jquery.textareafullscreen.js
0 → 100755
View file @
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
View file @
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
View file @
0211a1f2
...
@@ -31,7 +31,7 @@
...
@@ -31,7 +31,7 @@
Value
Value
</label>
</label>
<div
class=
"col-sm-10"
valdr-form-group
>
<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-required=
"true"
ng-model=
"item.value"
>
ng-model=
"item.value"
>
</textarea>
</textarea>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment