PluginProbe ʕ •ᴥ•ʔ
Appointment Booking Calendar / 1.3.71
Appointment Booking Calendar v1.3.71
1.4.04 1.4.03 1.4.02 trunk 1.3.51 1.3.52 1.3.53 1.3.54 1.3.55 1.3.56 1.3.57 1.3.58 1.3.59 1.3.60 1.3.61 1.3.62 1.3.63 1.3.64 1.3.65 1.3.66 1.3.67 1.3.68 1.3.69 1.3.70 1.3.71 1.3.72 1.3.73 1.3.74 1.3.75 1.3.76 1.3.77 1.3.78 1.3.79 1.3.80 1.3.81 1.3.82 1.3.83 1.3.84 1.3.85 1.3.86 1.3.87 1.3.88 1.3.89 1.3.90 1.3.91 1.3.92 1.3.93 1.3.94 1.3.95 1.3.96 1.3.97 1.3.98 1.3.99 1.4.01
appointment-booking-calendar / mv / js / Common.js
appointment-booking-calendar / mv / js Last commit date
images 3 years ago Common.js 3 years ago jquery.alert.js 3 years ago jquery.calendar.js 3 years ago jquery.cleditor.css 3 years ago jquery.cleditor.js 3 years ago jquery.colorselect.js 3 years ago jquery.dropdown.js 3 years ago jquery.form.js 3 years ago jquery.validate.js 3 years ago multiview.js 3 years ago multiview.public.js 3 years ago repeat.js 3 years ago rrule.js 3 years ago underscore.js 3 years ago widget.admin.js 3 years ago
Common.js
134 lines
1 (function($) {
2 $.cpeoplebrowser = {};
3 uaMatch= function(ua) {
4 var ret = { browser: "" };
5
6 ua = ua.toLowerCase();
7
8 if (/webkit/.test(ua)) {
9 ret = { browser: "webkit", version: /webkit[\/ ]([\w.]+)/ };
10
11 } else if (/opera/.test(ua)) {
12 ret = { browser: "opera", version: /version/.test(ua) ? /version[\/ ]([\w.]+)/ : /opera[\/ ]([\w.]+)/ };
13
14 } else if (/msie/.test(ua)) {
15 ret = { browser: "msie", version: /msie ([\w.]+)/ };
16
17 } else if (/mozilla/.test(ua) && !/compatible/.test(ua)) {
18 ret = { browser: "mozilla", version: /rv:([\w.]+)/ };
19 }
20
21 ret.version = (ret.version && ret.version.exec(ua) || [0, "0"])[1];
22
23 return ret;
24 };
25 browserMatch = uaMatch(navigator.userAgent);
26 if (browserMatch.browser) {
27 $.cpeoplebrowser[browserMatch.browser] = true;
28 $.cpeoplebrowser.version = browserMatch.version;
29 }
30
31 // Deprecated, use jQuery.browser.webkit instead
32 if ($.cpeoplebrowser.webkit) {
33 $.cpeoplebrowser.safari = true;
34 }
35 })(jQuery);
36 try { document.execCommand("BackgroundImageCache", false, true); } catch (e) { }
37 var popUpWin;
38 function PopUpCenterWindow(URLStr, width, height, newWin, scrollbars) {
39 var popUpWin = 0;
40 if (typeof (newWin) == "undefined") {
41 newWin = false;
42 }
43 if (typeof (scrollbars) == "undefined") {
44 scrollbars = 0;
45 }
46 if (typeof (width) == "undefined") {
47 width = 800;
48 }
49 if (typeof (height) == "undefined") {
50 height = 600;
51 }
52 var left = 0;
53 var top = 0;
54 if (screen.width >= width) {
55 left = Math.floor((screen.width - width) / 2);
56 }
57 if (screen.height >= height) {
58 top = Math.floor((screen.height - height) / 2);
59 }
60 if (newWin) {
61 open(URLStr, '', 'toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=' + scrollbars + ',resizable=yes,copyhistory=yes,width=' + width + ',height=' + height + ',left=' + left + ', top=' + top + ',screenX=' + left + ',screenY=' + top + '');
62 return;
63 }
64
65 if (popUpWin) {
66 if (!popUpWin.closed) popUpWin.close();
67 }
68 popUpWin = open(URLStr, 'popUpWin', 'toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=' + scrollbars + ',resizable=yes,copyhistory=yes,width=' + width + ',height=' + height + ',left=' + left + ', top=' + top + ',screenX=' + left + ',screenY=' + top + '');
69 popUpWin.focus();
70 }
71
72 function OpenModelWindow(url, option) {
73 var fun;
74 try {
75 if (parent != null && parent.$ != null && parent.$.ShowIfrmDailog != undefined) {
76 fun = parent.$.ShowIfrmDailog
77 }
78 else {
79 fun = $.ShowIfrmDailog;
80 }
81 }
82 catch (e) {
83 fun = $.ShowIfrmDailog;
84 }
85
86 fun(url, option);
87 }
88 function CloseModelWindow(callback, dooptioncallback) {
89 parent.$.closeIfrm(callback, dooptioncallback);
90 }
91 function fomartTimeAMPM(h,m,__MilitaryTime) {
92 if (__MilitaryTime)
93 var tmp = ((h < 10) ? "0" : "") + h + ":" + ((m < 10)?"0":"") + m ;
94 else
95 {
96 var tmp = ((h%12) < 10) && h!=12 ? "0" + (h%12) : (h==12?"12":(h%12)) ;
97 tmp += ":" + ((m < 10)?"0":"") + m + ((h>=12)?"pm":"am");
98
99 }
100 return tmp ;
101 }
102
103 function StrFormat(temp, dataarry) {
104 return temp.replace(/\{([\d]+)\}/g, function(s1, s2) { var s = dataarry[s2]; if (typeof (s) != "undefined") { if (s instanceof (Date)) { return (s.getMonth()+1)+"/"+s.getDate()+"/"+s.getFullYear()+" "+s.getHours()+":"+s.getMinutes() } else { return encodeURIComponent(s) } } else { return "" } });
105 }
106 function StrFormatNoEncode(temp, dataarry) {
107 return temp.replace(/\{([\d]+)\}/g, function(s1, s2) { var s = dataarry[s2]; if (typeof (s) != "undefined") { if (s instanceof (Date)) { return (s.getMonth()+1)+"/"+s.getDate()+"/"+s.getFullYear()+" "+s.getHours()+":"+s.getMinutes() } else { return (s); } } else { return ""; } });
108 }
109 function getiev($) {
110 var userAgent = window.navigator.userAgent.toLowerCase();
111 $.cpeoplebrowser.msie8 = $.cpeoplebrowser.msie && /msie 8\.0/i.test(userAgent);
112 $.cpeoplebrowser.msie7 = $.cpeoplebrowser.msie && /msie 7\.0/i.test(userAgent);
113 $.cpeoplebrowser.msie6 = !$.cpeoplebrowser.msie8 && !$.cpeoplebrowser.msie7 && $.cpeoplebrowser.msie && /msie 6\.0/i.test(userAgent);
114 var v;
115 if ($.cpeoplebrowser.msie8) {
116 v = 8;
117 }
118 else if ($.cpeoplebrowser.msie7) {
119 v = 7;
120 }
121 else if ($.cpeoplebrowser.msie6) {
122 v = 6;
123 }
124 else { v = -1; }
125 return v;
126 }
127 jQuery(document).ready(function($) {
128 var v = getiev($);
129 if (v > 0) {
130 $(document.body).addClass("ie ie" + v);
131 }
132
133 });
134