Blame view

frontend/web/js/Oziris.js 4.15 KB
c420c609   alex   first commit
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
  /**
   * Created by timur on 20.06.17.
   */
  jQuery(function() {
  
      jQuery('.Oziris_dialog')
          .dialog({
              autoOpen: false,
              width: 840,
              height: 600,
              modal: true,
              dialogClass: 'ui-custom-dialog'
          });
  });
  function Oziris_open() {
      var params = "";
      var IsPromo = (jQuery('.Oziris_dialog')
                         .attr('ProductCode') == 'ECREDIT') ? true : false;
      if (jQuery('.Oziris_dialog')
              .attr('ProductCode') != null) {
          params += (params != "" ? "&" : "") + "ProductCode=" + jQuery('.Oziris_dialog')
                  .attr('ProductCode');
      }
      if (jQuery('.Oziris_dialog')
              .attr('Amount') != null) {
          params += (params != "" ? "&" : "") + "Amount=" + jQuery('.Oziris_dialog')
                  .attr('Amount');
      }
      if (jQuery('.Oziris_dialog')
              .attr('SourceId') != null) {
          params += (params != "" ? "&" : "") + "SourceId=" + jQuery('.Oziris_dialog')
                  .attr('SourceId');
      }
      if (jQuery('.Oziris_dialog')
              .attr('SourceCode') != null) {
          params += (params != "" ? "&" : "") + "SourceCode=" + jQuery('.Oziris_dialog')
                  .attr('SourceCode');
      }
      if (jQuery('.Oziris_dialog')
              .attr('SourceEmail') != null) {
          params += (params != "" ? "&" : "") + "SourceEmail=" + jQuery('.Oziris_dialog')
                  .attr('SourceEmail');
      }
      if (jQuery('.Oziris_dialog')
              .attr('SourceEmailCC') != null) {
          params += (params != "" ? "&" : "") + "SourceEmailCC=" + jQuery('.Oziris_dialog')
                  .attr('SourceEmailCC');
      }
      if (jQuery('.Oziris_dialog')
              .attr('SourceEmailBCC') != null) {
          params += (params != "" ? "&" : "") + "SourceEmailBCC=" + jQuery('.Oziris_dialog')
                  .attr('SourceEmailBCC');
      }
  
      if (jQuery('.Oziris_dialog')
              .attr('ExtOrderId') != null) {
          params += (params != "" ? "&" : "") + "ExtOrderId=" + jQuery('.Oziris_dialog')
                  .attr('ExtOrderId');
      }
  
      if (jQuery('.Oziris_dialog')
              .attr('Line0Code') != null) {
          params += (params != "" ? "&" : "") + "Line0Code=" + encodeURIComponent(jQuery('.Oziris_dialog')
                  .attr('Line0Code'));
      }
      if (jQuery('.Oziris_dialog')
              .attr('Line0Title') != null) {
          params += (params != "" ? "&" : "") + "Line0Title=" + encodeURIComponent(jQuery('.Oziris_dialog')
                  .attr('Line0Title'));
      }
      var line0Price = jQuery('.Oziris_dialog')
          .attr('Line0Price');
      if (line0Price != null && line0Price != undefined) {
          params += (params != "" ? "&" : "") + "Line0Price=" + line0Price.toString()
                                                                          .replace(",", ".");
      }
  
      if (jQuery('.Oziris_dialog')
              .attr('Line1Code') != null) {
          params += (params != "" ? "&" : "") + "Line1Code=" + encodeURIComponent(jQuery('.Oziris_dialog')
                  .attr('Line1Code'));
      }
      if (jQuery('.Oziris_dialog')
              .attr('Line1Title') != null) {
          params += (params != "" ? "&" : "") + "Line1Title=" + encodeURIComponent(jQuery('.Oziris_dialog')
                  .attr('Line1Title'));
      }
      var line1Price = jQuery('.Oziris_dialog')
          .attr('Line1Price');
      if (line1Price != null && line1Price != undefined) {
          params += (params != "" ? "&" : "") + "Line1Price=" + line1Price.toString()
                                                                          .replace(",", ".");
      }
  
      if (IsPromo) {
          jQuery('.Oziris_dialog')
              .css('padding', '0 0 0 6px');
          jQuery('.Oziris_dialog')
              .html("<iframe class='noborder' style='width:100%;height:520px;background-color:white;border:none;' src='//xkasa.com.ua/Content/Oziris/3/?" + params + "'></iframe>");
      } else {
          jQuery('.Oziris_dialog')
              .html("<iframe class='noborder' style='width:100%;height:520px;background-color:white;border:none;margin-top:10px;' src='//xkasa.com.ua/Content/Oziris/1/?" + params + "'></iframe>");
      }
  
      jQuery(".Oziris_dialog")
          .dialog("open");
      return false;
  };