ogre_x icon

Smutsig

ogre_x | PRO | 04/07/17 12:06:54 PM UTC | 0 ⭐ | 281 👁️ | Never ⏰ | []
JavaScript |

1.25 KB

|

None

|

0 👍

/

0 👎

          var qStr = document.location.search.replace(/\?/g, '');
          var fullUrl = document.location.href;
          var actionString = '';
          if (qStr.indexOf('orderCreated=1') !== -1) {
            actionString = 'orderCreated=1';
            ehm.modal.present({
              title: "#{msgs['phk.orders.created.heading']}",
              body: "#{msgs['phk.orders.created.text']}"
            });
          } else if (qStr.indexOf('orderCancelled=1') !== -1) {
            actionString = 'orderCancelled=1';
            ehm.modal.present({
              body: "#{msgs['phk.orders.cancelled.message']}"
            });
          } else if (qStr.indexOf('orderAlreadyCreated=1') !== -1) {
            actionString = 'orderAlreadyCreated=1';
            ehm.modal.present({
              body: "#{msgs['phk.orders.order-already-exist']}"
            });
          } else if (qStr.indexOf('synchronizationStarted=1') !== -1) {
            actionString = 'synchronizationStarted=1';
            ehm.modal.present({
              body: "#{msgs['phk.orders.synchronization-started']}"
            });
          }
          if (actionString !== '') {
            window.history.pushState({}, '', fullUrl.split(actionString).join(''));
          }

Comments