Aralot (aralot) wrote in changelog,
Aralot
aralot
changelog

[ljcom] r10961: LJSUP-9710: Dublicate error when try to ...

Committer: szhirkov
LJSUP-9710: Dublicate error when try to promote incorrect post
U   trunk/templates/Shop/Error.tmpl
U   trunk/templates/Shop/SelfPromo.tmpl
Modified: trunk/templates/Shop/Error.tmpl
===================================================================
--- trunk/templates/Shop/Error.tmpl	2011-09-05 07:32:44 UTC (rev 10960)
+++ trunk/templates/Shop/Error.tmpl	2011-09-06 03:46:57 UTC (rev 10961)
@@ -1,5 +1,5 @@
 <TMPL_IF errors_occured>
-    <div class="errorbar">
+    <div class="errorbar errorbar-from-reload">
         <p><strong><TMPL_VAR expr="ml('error.procrequest')"></strong></p>
 		<TMPL_LOOP name="errors">
             <p><TMPL_VAR error></p>

Modified: trunk/templates/Shop/SelfPromo.tmpl
===================================================================
--- trunk/templates/Shop/SelfPromo.tmpl	2011-09-05 07:32:44 UTC (rev 10960)
+++ trunk/templates/Shop/SelfPromo.tmpl	2011-09-06 03:46:57 UTC (rev 10961)
@@ -101,13 +101,23 @@
                     'entry_link': $("#entry_link").val()
                 },
                 function(data) {
+					var errorBlock;
+
                     if ( data.result == 'success' ) {
                         $("#selfpromo-preview-errors").hide();
                         $("#selfpromo-preview").parent().show();
                         $("#selfpromo-preview").html(data.html);
                     } else if ( data.result == 'error' ) {
-                        $("#selfpromo-preview-errors").show();
-                        $("#selfpromo-preview-errors").html(data.html);
+						if ( $(".errorbar-from-reload").length ) {
+							errorBlock = $( ".errorbar-from-reload" );
+						} else {
+							errorBlock = $( "#selfpromo-preview-errors" );
+						}
+
+                        errorBlock
+							.html(data.html)
+							.show();
+
                         $("#selfpromo-preview").parent().hide();
                     }
                 },

Tags: aralot, ljcom, tmpl
Subscribe
  • Post a new comment

    Error

    Anonymous comments are disabled in this journal

    default userpic

    Your reply will be screened

    Your IP address will be recorded 

  • 0 comments