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
   ajax.post("ajax.php?action=preview","form" + postid, function(response) {
153
   ajax.post("ajax.php?action=preview","form" + postid, function(response) {
154
     $('#preview' + postid).raw().innerHTML = response;
154
     $('#preview' + postid).raw().innerHTML = response;
155
     $('#editbox' + postid).ghide();
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
       $('#preview' + postid).raw().innerHTML = response;
171
       $('#preview' + postid).raw().innerHTML = response;
171
       $('#editbox' + postid).ghide();
172
       $('#editbox' + postid).ghide();
172
       $('#pmbox' + postid).ghide();
173
       $('#pmbox' + postid).ghide();
174
+      if ($('#editbox' + postid).raw().previousSibling.className == 'bbcode_bar') $($('#editbox' + postid).raw().previousSibling).ghide();
173
     });
175
     });
174
   } else {
176
   } else {
175
     ajax.post("comments.php?action=take_edit","form" + postid, function (response) {
177
     ajax.post("comments.php?action=take_edit","form" + postid, function (response) {
177
       $('#preview' + postid).raw().innerHTML = response;
179
       $('#preview' + postid).raw().innerHTML = response;
178
       $('#editbox' + postid).ghide();
180
       $('#editbox' + postid).ghide();
179
       $('#pmbox' + postid).ghide();
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
   overflow: auto;
207
   overflow: auto;
208
 }
208
 }
209
 
209
 
210
-.hidden {
211
-  display: none;
212
-}
213
-
214
 .disable_grouping {
210
 .disable_grouping {
215
   display: none;
211
   display: none;
216
 }
212
 }
937
 #lightbox > img {
933
 #lightbox > img {
938
   max-width: 100%;
934
   max-width: 100%;
939
 }
935
 }
936
+
937
+.hidden {
938
+  display: none;
939
+}

Loading…
Cancel
Save