Advertisement
ogre_x

Smutsig

Apr 7th, 2017
95
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.           var qStr = document.location.search.replace(/\?/g, '');
  2.           var fullUrl = document.location.href;
  3.           var actionString = '';
  4.           if (qStr.indexOf('orderCreated=1') !== -1) {
  5.             actionString = 'orderCreated=1';
  6.             ehm.modal.present({
  7.               title: "#{msgs['phk.orders.created.heading']}",
  8.               body: "#{msgs['phk.orders.created.text']}"
  9.             });
  10.           } else if (qStr.indexOf('orderCancelled=1') !== -1) {
  11.             actionString = 'orderCancelled=1';
  12.             ehm.modal.present({
  13.               body: "#{msgs['phk.orders.cancelled.message']}"
  14.             });
  15.           } else if (qStr.indexOf('orderAlreadyCreated=1') !== -1) {
  16.             actionString = 'orderAlreadyCreated=1';
  17.             ehm.modal.present({
  18.               body: "#{msgs['phk.orders.order-already-exist']}"
  19.             });
  20.           } else if (qStr.indexOf('synchronizationStarted=1') !== -1) {
  21.             actionString = 'synchronizationStarted=1';
  22.             ehm.modal.present({
  23.               body: "#{msgs['phk.orders.synchronization-started']}"
  24.             });
  25.           }
  26.           if (actionString !== '') {
  27.             window.history.pushState({}, '', fullUrl.split(actionString).join(''));
  28.           }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement