Skip to content

Commit 6f2d611

Browse files
author
bkraul
committed
Added issue image picker. Closes #20.
1 parent 9beac09 commit 6f2d611

File tree

8 files changed

+369
-166
lines changed

8 files changed

+369
-166
lines changed

Diff for: BBCodePlus/BBCodePlus.php

+12-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ function register() {
2222
$this->name = plugin_lang_get( 'title' );
2323
$this->description = plugin_lang_get( 'description' );
2424
$this->page = 'config';
25-
$this->version = '2.1.15';
25+
$this->version = '2.1.16';
2626

2727
$this->requires['MantisCore'] = '2.0.0';
2828
# this plugin can coexist with MantisCoreFormatting.
@@ -89,6 +89,17 @@ function content_begin() {
8989
} else {
9090
$output = '';
9191
}
92+
# add image picker modal.
93+
$output .= '<div id="bbcodeplus-image-picker" class="bbcodeplus modal">';
94+
$output .= '<div class="bbcodeplus modal-content widget-box widget-color-blue2">';
95+
$output .= '<div class="widget-header widget-header-small">';
96+
$output .= '<h4 class="widget-title lighter bbcodeplus"><i class="ace-icon fa fa-image"></i>Images attached to issue</h4>';
97+
$output .= '<div class="widget-toolbar"><a href="#" id="bbcodeplus-image-picker-close" class="bbcodeplus modal-close"><i class="ace-icon fa fa-close"></a></i></div>';
98+
$output .= '</div>';
99+
$output .= '<div id="bbcodeplus-image-picker-body" class="bbcodeplus modal-body"></div>';
100+
$output .= '</div>';
101+
$output .= '</div>';
102+
92103
return $output;
93104
}
94105
//-------------------------------------------------------------------

Diff for: BBCodePlus/files/bbcodeplus.css

+102-15
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,116 @@
11
.bbcodeplus.pre {
2-
border: 1px solid silver;
3-
margin: 0 0 1.5em 0;
4-
overflow: auto;
5-
padding-left: 10px;
6-
border-radius: 4px;
2+
border: 1px solid silver;
3+
margin: 0 0 1.5em 0;
4+
overflow: auto;
5+
padding-left: 10px;
6+
border-radius: 4px;
77
}
88

99
.bbcodeplus.code span {
10-
font-family: Consolas,Monaco,"Andale Mono","Ubuntu Mono",monospace;
11-
font-size: 1em;
10+
font-family: Consolas,Monaco,"Andale Mono","Ubuntu Mono",monospace;
11+
font-size: 1em;
1212
}
1313

1414
.bbcodeplus.table td {
15-
border: 0 !important;
15+
border: 0 !important;
1616
}
1717

1818
.bbcodeplus.table-bordered td, .bbcodeplus.table-bordered tr, .bbcodeplus.table-bordered th {
19-
border: 1px solid silver !important;
19+
border: 1px solid silver !important;
2020
}
2121

2222
.bbcodeplus.blockquote {
23-
border: solid #c0c0c0 1px;
24-
border-left: solid #c0c0c0 5px;
25-
padding: 10px;
26-
font-size: 1em;
27-
background-color: #f5f2f0;
28-
border-radius: 4px;
23+
border: solid #c0c0c0 1px;
24+
border-left: solid #c0c0c0 5px;
25+
padding: 10px;
26+
font-size: 1em;
27+
background-color: #f5f2f0;
28+
border-radius: 4px;
2929
}
30+
31+
.bbcodeplus.modal {
32+
display: none;
33+
position: fixed;
34+
z-index: 1030;
35+
padding-top: 100px;
36+
left: 0;
37+
top: 0;
38+
width: 100%;
39+
height: 100%;
40+
overflow: auto;
41+
background-color: rgb(0,0,0);
42+
background-color: rgba(0,0,0,0.4);
43+
}
44+
45+
.bbcodeplus.modal-close {
46+
color: white;
47+
}
48+
49+
.bbcodeplus.modal-close:hover,
50+
.bbcodeplus.modal-close:focus {
51+
color: #000;
52+
text-decoration: none;
53+
cursor: pointer;
54+
}
55+
56+
.bbcodeplus.modal-content {
57+
position: relative;
58+
background-color: #fefefe;
59+
margin: auto;
60+
padding: 0;
61+
border: 1px solid #888;
62+
width: 50%;
63+
max-height: 50%px;
64+
overflow: auto;
65+
z-index: 1031;
66+
box-shadow: 0 4px 8px 0 rgba(0,0,0,0.2),0 6px 20px 0 rgba(0,0,0,0.19);
67+
animation-name: animatetop;
68+
animation-duration: 0.4s
69+
}
70+
71+
.bbcodeplus.image-picker ul {
72+
margin: 1em 0;
73+
padding: 0;
74+
list-style: none;
75+
display: grid;
76+
grid: auto-flow / repeat(auto-fit, minmax(100px, 1fr));
77+
align-items: baseline;
78+
grid-gap: 10px;
79+
gap: 10px;
80+
}
81+
82+
.bbcodeplus.image-picker li {
83+
width: 100px;
84+
height: 100px;
85+
min-height: 100px;
86+
display: -moz-inline-stack;
87+
display: inline-block;
88+
vertical-align: middle;
89+
margin: 5px;
90+
zoom: 1;
91+
*display: inline;
92+
}
93+
94+
.bbcodeplus.image-picker li img {
95+
width: 100%;
96+
padding: 5px;
97+
border: 1px solid rgba(221,221,221,1);
98+
border-radius: 5px;
99+
max-width: 100%;
100+
}
101+
102+
.bbcodeplus.image-picker li img:hover {
103+
filter: brightness(80%);
104+
background-color: rgba(221,221,221,1);
105+
}
106+
107+
/* Add Animation */
108+
@-webkit-keyframes animatetop {
109+
from {top:-300px; opacity:0}
110+
to {top:0; opacity:1}
111+
}
112+
113+
@keyframes animatetop {
114+
from {top:-300px; opacity:0}
115+
to {top:0; opacity:1}
116+
}

Diff for: BBCodePlus/files/markitup/sets/default/style.css

+1
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
.markItUp .markItUpButton6 a {
2323
background-image:url(images/picture.png);
2424
}
25+
2526
.markItUp .markItUpButton7 a {
2627
background-image:url(images/link.png);
2728
}
821 Bytes
Loading

0 commit comments

Comments
 (0)