Index: trunk/extensions/WikiBhasha/src/js/core/paneManagement.js |
— | — | @@ -186,10 +186,12 @@ |
187 | 187 | var composedContent = new String(wbPublishDisplayPane.getWikiTextareaElement().val()); |
188 | 188 | var summeryContent = new String(wbPublishDisplayPane.getWikiSummeryFieldElement().val()); |
189 | 189 | |
190 | | - //insert the snippet to the summery field'. |
191 | | - summeryContent = wbGlobalSettings.snippet + " " + summeryContent; |
192 | | - // update the summery field content with the snippet. |
193 | | - wbPublishDisplayPane.getWikiSummeryFieldElement().val(summeryContent); |
| 190 | + if(summeryContent.length > 0 && !(summeryContent.indexOf(wbGlobalSettings.snippet) > -1) ){ |
| 191 | + //insert the snippet to the summery field'. |
| 192 | + summeryContent = wbGlobalSettings.snippet + " " + summeryContent; |
| 193 | + // update the summery field content with the snippet. |
| 194 | + wbPublishDisplayPane.getWikiSummeryFieldElement().val(summeryContent); |
| 195 | + } |
194 | 196 | |
195 | 197 | // call the method to check and insert the interwiki link |
196 | 198 | composedContent = wbPublishDisplayPane.insertInterWikiLink(composedContent); |