Browse Source

BBcode Toolbar: Hide after edit

spaghetti 8 years ago
parent
commit
239a8d59f8
2 changed files with 7 additions and 4 deletions
  1. 3
    0
      static/functions/comments.js
  2. 4
    4
      static/styles/global.css

+ 3
- 0
static/functions/comments.js View File

@@ -153,6 +153,7 @@ function Preview_Edit(postid) {
153 153
   ajax.post("ajax.php?action=preview","form" + postid, function(response) {
154 154
     $('#preview' + postid).raw().innerHTML = response;
155 155
     $('#editbox' + postid).ghide();
156
+    if ($('#editbox' + postid).raw().previousSibling.className == 'bbcode_bar') $($('#editbox' + postid).raw().previousSibling).ghide();
156 157
   });
157 158
 }
158 159
 
@@ -170,6 +171,7 @@ function Save_Edit(postid) {
170 171
       $('#preview' + postid).raw().innerHTML = response;
171 172
       $('#editbox' + postid).ghide();
172 173
       $('#pmbox' + postid).ghide();
174
+      if ($('#editbox' + postid).raw().previousSibling.className == 'bbcode_bar') $($('#editbox' + postid).raw().previousSibling).ghide();
173 175
     });
174 176
   } else {
175 177
     ajax.post("comments.php?action=take_edit","form" + postid, function (response) {
@@ -177,6 +179,7 @@ function Save_Edit(postid) {
177 179
       $('#preview' + postid).raw().innerHTML = response;
178 180
       $('#editbox' + postid).ghide();
179 181
       $('#pmbox' + postid).ghide();
182
+      if ($('#editbox' + postid).raw().previousSibling.className == 'bbcode_bar') $($('#editbox' + postid).raw().previousSibling).ghide();
180 183
     });
181 184
   }
182 185
 }

+ 4
- 4
static/styles/global.css View File

@@ -207,10 +207,6 @@ pre {
207 207
   overflow: auto;
208 208
 }
209 209
 
210
-.hidden {
211
-  display: none;
212
-}
213
-
214 210
 .disable_grouping {
215 211
   display: none;
216 212
 }
@@ -937,3 +933,7 @@ input[type="search"] {
937 933
 #lightbox > img {
938 934
   max-width: 100%;
939 935
 }
936
+
937
+.hidden {
938
+  display: none;
939
+}

Loading…
Cancel
Save