PageSourceSearch

https://www.dentway.se/includes/AIR_ibutik_Arbetsyta.js?132834

js dentway.se collected 2026-10-08 17:13:05 UTC 5,574 bytes, 148 lines download raw bytes

1function AIR_debugTillConsole(dataAttLogga)
2{
3    if (window.console != undefined)
4    {
5        console.log(arguments.callee.caller.toString()+' : '+dataAttLogga);
6    }
7}function AIR_modalDialogruta(txtTitel,txtText,intPxX,intPxY)
8{
9	if (!(txtTitel))
10	{
11		txtTitel = 'Info!';
12	}
13
14	if (!(txtText))
15	{
16		txtText = '?';
17	}
18
19	txtText = '<div class=\'AIR_Modalbox\'>'+txtText+'</div>';
20
21	
22	if (!(intPxX))
23	{
24		intPxX = 500;
25	}
26	
27	if (!(intPxY))
28	{
29		intPxY = 300;
30	}
31
32	if(typeof(Modalbox) !== 'undefined') 
33	{
34		Modalbox.show(txtText,{title: txtTitel, width: intPxX, height: intPxY});
35	}
36	else
37	{
38		AIR_debugTillConsole('Funktionen kräver Modalbox för popup-utskrift');
39	}
40}function kontrolleraAntalsFalt(frm) 
41{
42	var antalet = jQuery("[name='"+frm+"'] [name='antal']").val();
43	if (antalet == "")
44	{
45		jQuery("[name='"+frm+"'] [name='antal']").css('border','2px solid #EE0000');
46	}
47	else
48	{
49		jQuery("[name='"+frm+"'] [name='antal']").css('border','1px solid #f1f1f1');
50	}
51}function validate_contracts (location, form, callback) {
52
53  var valid = summarize_contracts(form);
54  
55  var uri   = 'funk=validate_contracts&location=' + location,
56 xhr     = new XMLHttpRequest();
57
58 if (xhr) { 
59   uri += "&data=" + document[form].querySelector("input[name='contract_data_json']").value;
60
61   xhr.open('POST', '/shop');
62
63    xhr.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
64
65    xhr.onreadystatechange = function() {
66     if (xhr.readyState === XMLHttpRequest.DONE)
67     {
68       if (xhr.status === 200) {
69         valid = parseInt(xhr.responseText);
70       }
71
72       if (typeof callback === 'function' ) {
73          callback(valid);
74        }
75     }
76   };
77  
78    xhr.send(encodeURI(uri));
79 }
80 else {
81    callback(valid);
82  }
83}function summarize_contracts (form) {
84
85 var all_contracts    = document[form].querySelectorAll('input[type="checkbox"][data-component="contract"]');
86  var required_contracts = document[form].querySelectorAll('input[type="checkbox"][data-component="contract"]:required');
87 var all_radio_contracts = document[form].querySelectorAll(".contract_radio_wrapper");
88
89 var contracts = {};
90 var valid = 1;
91
92  for (var i = 0; i < all_contracts.length; i++)
93  {
94   if (!all_contracts[i].required || (all_contracts[i].required && all_contracts[i].checked))
95    {
96     if (!all_contracts.hasOwnProperty(i) && typeof(all_contracts[i]) !== 'undefined') continue;
97
98     var revision = all_contracts[i].getAttribute('data-revision');
99      var contract = all_contracts[i].getAttribute('data-id');
100
101      contracts[contract] = {
102       revision: revision,
103       signed: all_contracts[i].checked ? 1 : 0
104      };
105    }
106 }
107
108 for (var i = 0; i < required_contracts.length; i++)
109 {
110   if (!required_contracts.hasOwnProperty(i) && typeof(required_contracts[i]) !== 'undefined') continue;
111
112   var revision = required_contracts[i].getAttribute('data-revision');
113   var contract = required_contracts[i].getAttribute('data-id');
114
115   if (!contracts[contract])
116   {
117     contracts[contract] = {
118       revision: revision,
119       signed: 0
120     };
121
122      valid = 0;
123    }
124 }
125 if(all_radio_contracts.length > 0){
126   for(var r = 0; r < all_radio_contracts.length; r++){
127      var this_elem = all_radio_contracts[r];
128     var checked_elem = document.querySelector("input[type=\"radio\"][name=\"" + this_elem.dataset.for + "\"]:checked");
129     if(checked_elem !== null){
130        contracts[this_elem.dataset.id] = {
131         revision: this_elem.dataset.revision,
132         signed: checked_elem.value,
133         radio_contract: "1"
134       };
135      }
136   }
137 }
138 document[form].querySelector("input[name='contract_data_json']").value = JSON.stringify(contracts);
139
140 return valid;
141}/*!
142 * JavaScript Cookie v2.2.0
143 * https://github.com/js-cookie/js-cookie
144 *
145 * Copyright 2006, 2015 Klaus Hartl & Fagner Brack
146 * Released under the MIT license
147 */
148!function(e){var n=!1;if("function"==typeof define&&define.amd&&(define(e),n=!0),"object"==typeof exports&&(module.exports=e(),n=!0),!n){var o=window.Cookies,t=window.Cookies=e();t.noConflict=function(){return window.Cookies=o,t}}}(function(){function e(){for(var e=0,n={};e<arguments.length;e++){var o=arguments[e];for(var t in o)n[t]=o[t]}return n}return function n(o){function t(n,r,i){var c;if("undefined"!=typeof document){if(arguments.length>1){if("number"==typeof(i=e({path:"/"}
vendor: 1,205 bytes, line 148
148,t.defaults,i)).expires){var a=new Date;a.setMilliseconds(a.getMilliseconds()+864e5*i.expires),i.expires=a}i.expires=i.expires?i.expires.toUTCString():"";try{c=JSON.stringify(r),/^[\{\[]/.test(c)&&(r=c)}catch(e){}r=o.write?o.write(r,n):encodeURIComponent(String(r)).replace(/%(23|24|26|2B|3A|3C|3E|3D|2F|3F|40|5B|5D|5E|60|7B|7D|7C)/g,decodeURIComponent),n=(n=(n=encodeURIComponent(String(n))).replace(/%(23|24|26|2B|5E|60|7C)/g,decodeURIComponent)).replace(/[\(\)]/g,escape);var s="";for(var f in i)i[f]&&(s+="; "+f,!0!==i[f]&&(s+="="+i[f]));return document.cookie=n+"="+r+s}n||(c={});for(var p=document.cookie?document.cookie.split("; "):[],d=/(%[0-9A-Z]{2})+/g,u=0;u<p.length;u++){var l=p[u].split("="),C=l.slice(1).join("=");this.json||'"'!==C.charAt(0)||(C=C.slice(1,-1));try{var g=l[0].replace(d,decodeURIComponent);if(C=o.read?o.read(C,g):o(C,g)||C.replace(d,decodeURIComponent),this.json)try{C=JSON.parse(C)}catch(e){}if(n===g){c=C;break}n||(c[g]=C)}catch(e){}}return c}}return t.set=t,t.get=function(e){return t.call(t,e)},t.getJSON=function(){return t.apply({json:!0},[].slice.call(arguments))},t.defaults={},t.remove=function(n,o){t(n,"",e(o,{expires:-1}))},t.withConverter=n,t}(function(){})});

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.