ok
Direktori : /home2/selectio/www/mm-tailor-billing/themes/default/assets/dist/js/maps/ |
Current File : /home2/selectio/www/mm-tailor-billing/themes/default/assets/dist/js/maps/scripts.min.js.map |
{"version":3,"sources":["all.js","custom.js"],"names":["cActions","Settings","rtl","$","select2","minimumResultsForSearch","dir","iCheck","checkboxClass","radioClass","increaseArea","redactor","formatting","minHeight","maxHeight","linebreaks","tabAsSpaces","dragImageUpload","dragFileUpload","filestyle","formValidation","framework","excluded","generateCardNo","x","achars","no","i","rnum","Math","floor","random","length","substring","roundNumber","number","toref","rn","formatDecimal","round","ceil","getNumber","accounting","unformat","formatQuantity","formatNumber","qty_decimals","formatQuantity2","d","decimals","sac","formatSA","parseFloat","toFixed","thousands_sep","decimals_sep","formatMoney","symbol","display_symbol","fmoney","inclusiveTax","price","rate","exlusiveTax","is_valid_discount","mixed_var","is_numeric","test","indexOf","slice","isNaN","is_float","isFinite","currencyFormat","quantityFormat","afterPoint","toString","lastThree","otherNumbers","replace","cf","pf","read_card","keypress","e","payid","this","attr","id","substr","TrackData","val","keyCode","preventDefault","p","SwipeParserObj","hasTrack1","CardType","ccn1","account","charAt","account_name","exp_month","exp_year","focus","blur","get","name","Storage","localStorage","getItem","alert","store","setItem","remove","removeItem","hrsd","sdate","date","dateformat","strtotime","hrld","ldate","timeformat","Now","Date","getTime","document","on","event","href","data","html","modal","backdrop","click","stamp","time","text","window","setInterval","each","index","open","velocity","hide","show","ajaxStart","ajaxStop","ready","link","done","bootbox","confirm","lang","r_u_sure","result","location","register_open_alert"],"mappings":"AAAA,SAAAA,WACA,GAAAC,SAAAC,IACAC,EAAA,2BAAAC,QAAA,CAAAC,wBAAA,EAAAC,IAAA,QAEAH,EAAA,2BAAAC,QAAA,CAAAC,wBAAA,IAEAF,EAAA,SAAAI,OAAA,CACAC,cAAA,wBACAC,WAAA,qBACAC,aAAA,QAEAP,EAAA,aAAAQ,SAAA,CACAC,WAAA,CAAA,IAAA,aAAA,KAAA,KAAA,OACAC,UAAA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EAAA,aAAAoI,MAAA,SAAAnD,GACAA,EAAAS,iBACA,IAAAqC,EAAA/H,EAAAmF,MAAAC,KAAA,QAMA,OALAiE,QAAAC,QAAA,WAAAC,KAAAI,oBAAA,YAAA,SAAAF,GACA,GAAAA,IACAjB,OAAAkB,SAAA3B,KAAAA,MAGA","file":"../scripts.min.js","sourcesContent":["function cActions() {\n if (Settings.rtl == 1) {\n $(\".modal-content .select2\").select2({minimumResultsForSearch:6, dir: \"rtl\"});\n } else {\n $(\".modal-content .select2\").select2({minimumResultsForSearch:6});\n }\n $('input').iCheck({\n checkboxClass: 'icheckbox_square-blue',\n radioClass: 'iradio_square-blue',\n increaseArea: '20%'\n });\n $('.redactor').redactor({\n formatting: ['p', 'blockquote', 'h3', 'h4', 'pre'],\n minHeight: 150,\n maxHeight: 500,\n linebreaks: true,\n tabAsSpaces: 4,\n dragImageUpload: false,\n dragFileUpload: false,\n //plugins: ['newbuttons']\n });\n $(\":file\").filestyle();\n $('.validation').formValidation({ framework: 'bootstrap', excluded: ':disabled' });\n}\n\n$(function () {\n\n cActions();\n if (Settings.rtl == 1) {\n $(\".select2\").select2({minimumResultsForSearch:6, dir: \"rtl\"});\n } else {\n $(\".select2\").select2({minimumResultsForSearch:6});\n }\n\n $(document).on('click', '[data-toggle=\"ajax\"]', function(event) {\n event.preventDefault();\n var href = $(this).attr('href');\n $.get(href, function( data ) {\n $(\"#posModal\").html(data);\n $(\"#posModal\").modal({backdrop:'static'});\n cActions();\n return false;\n });\n });\n\n $(document).on('click', '[data-toggle=\"ajax2\"]', function(event) {\n event.preventDefault();\n var href = $(this).attr('href');\n $.get(href, function( data ) { return data; });\n });\n\n $('.clock').click( function(e){\n e.preventDefault();\n return false;\n });\n function Now() { return new Date().getTime(); }\n var stamp = Math.floor(Now() / 1000);\n var time = date(dateformat+' '+timeformat, stamp);\n $('.clock').text(time);\n\n window.setInterval(function(){\n var stamp = Math.floor(Now() / 1000);\n var time = date(dateformat+' '+timeformat, stamp);\n $('.clock').text(time);\n }, 10000);\n\n // $('#myModal, #posModal').on('shown.bs.modal', function (e) {\n // cActions();\n // });\n\n $( \".modal\" ).each(function(index) {\n $(this).on('show.bs.modal', function (e) {\n var open = $(this).attr('data-easein');\n $('.modal-dialog').velocity('transition.' + open);\n });\n });\n\n $(document).on('click', '.ajax-pagination a', function(event) {\n event.preventDefault();\n var href = $(this).attr('href');\n $.get(href, function( data ) {\n $(\"#posModal\").html(data);\n $(\"#posModal\").modal({backdrop:'static'});\n return false;\n });\n });\n\n $(document).on('change', '#group', function(event) {\n if ($(this).val() == 1) {\n $('#store_id').val('');\n $('#store_id').select2('val', '');\n $('.store-con').hide();\n } else {\n $('.store-con').show();\n }\n });\n});\n","function generateCardNo(x) {\n if (!x) {\n x = 16;\n }\n var achars = '1234567890',\n no = '';\n for (var i = 0; i < x; i++) {\n var rnum = Math.floor(Math.random() * achars.length);\n no += achars.substring(rnum, rnum + 1);\n }\n return no;\n}\nfunction roundNumber(number, toref) {\n switch (toref) {\n case 1:\n var rn = formatDecimal(Math.round(number * 20) / 20);\n break;\n case 2:\n var rn = formatDecimal(Math.round(number * 2) / 2);\n break;\n case 3:\n var rn = formatDecimal(Math.round(number));\n break;\n case 4:\n var rn = formatDecimal(Math.ceil(number));\n break;\n default:\n var rn = number;\n }\n return rn;\n}\nfunction getNumber(x) {\n return accounting.unformat(x);\n}\nfunction formatQuantity(x) {\n return x != null ? '<div class=\"text-center\">' + formatNumber(x, Settings.qty_decimals) + '</div>' : '';\n}\nfunction formatQuantity2(x) {\n return x != null ? formatNumber(x, Settings.qty_decimals) : '';\n}\nfunction formatNumber(x, d) {\n if (!d && d != 0) {\n d = Settings.decimals;\n }\n if (Settings.sac == 1) {\n return formatSA(parseFloat(x).toFixed(d));\n }\n return accounting.formatNumber(x, d, Settings.thousands_sep == 0 ? ' ' : Settings.thousands_sep, Settings.decimals_sep);\n}\nfunction formatMoney(x, symbol) {\n if (!symbol) {\n symbol = '';\n }\n if (Settings.sac == 1) {\n return (\n (Settings.display_symbol == 1 ? Settings.symbol : '') +\n '' +\n formatSA(parseFloat(x).toFixed(Settings.decimals)) +\n (Settings.display_symbol == 2 ? Settings.symbol : '')\n );\n }\n var fmoney = accounting.formatMoney(\n x,\n symbol,\n Settings.decimals,\n Settings.thousands_sep == 0 ? ' ' : Settings.thousands_sep,\n Settings.decimals_sep,\n '%s%v'\n );\n return (Settings.display_symbol == 1 ? Settings.symbol : '') + fmoney + (Settings.display_symbol == 2 ? Settings.symbol : '');\n}\nfunction formatDecimal(x, d) {\n if (!d) {\n d = Settings.decimals;\n }\n return parseFloat(accounting.formatNumber(x, d, '', '.'));\n}\nfunction inclusiveTax(price, rate) {\n // return formatDecimal((parseFloat(price) * (arseFloat(rate) / 100)), 4);\n return formatDecimal((parseFloat(price) * parseFloat(rate)) / (100 + parseFloat(rate)), 4);\n}\nfunction exlusiveTax(price, rate) {\n return formatDecimal((parseFloat(price) * parseFloat(rate)) / 100, 4);\n}\nfunction is_valid_discount(mixed_var) {\n return is_numeric(mixed_var) || /([0-9]%)/i.test(mixed_var) ? true : false;\n}\nfunction is_numeric(mixed_var) {\n var whitespace = ' \\n\\r\\t\\f\\x0b\\xa0\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u200b\\u2028\\u2029\\u3000';\n return (\n (typeof mixed_var === 'number' || (typeof mixed_var === 'string' && whitespace.indexOf(mixed_var.slice(-1)) === -1)) &&\n mixed_var !== '' &&\n !isNaN(mixed_var)\n );\n}\nfunction is_float(mixed_var) {\n return +mixed_var === mixed_var && (!isFinite(mixed_var) || !!(mixed_var % 1));\n}\nfunction currencyFormat(x) {\n if (x != null) {\n return '<div class=\"text-right\">' + formatMoney(x) + '</div>';\n } else {\n return '<div class=\"text-right\">0</div>';\n }\n}\nfunction quantityFormat(x) {\n if (x != null) {\n return '<div class=\"text-center\">' + formatQuantity(x) + '</div>';\n } else {\n return '<div class=\"text-center\">0</div>';\n }\n}\nfunction formatSA(x) {\n x = x.toString();\n var afterPoint = '';\n if (x.indexOf('.') > 0) afterPoint = x.substring(x.indexOf('.'), x.length);\n x = Math.floor(x);\n x = x.toString();\n var lastThree = x.substring(x.length - 3);\n var otherNumbers = x.substring(0, x.length - 3);\n if (otherNumbers != '') lastThree = ',' + lastThree;\n var res = otherNumbers.replace(/\\B(?=(\\d{2})+(?!\\d))/g, ',') + lastThree + afterPoint;\n return res;\n}\n\nfunction cf(x) {\n return currencyFormat(x);\n}\nfunction pf(x) {\n return parseFloat(x);\n}\n\nfunction read_card() {\n $('.swipe')\n .keypress(function(e) {\n var payid = $(this).attr('id'),\n id = payid.substr(payid.length - 1);\n var TrackData = $(this).val();\n if (e.keyCode == 13) {\n e.preventDefault();\n\n var p = new SwipeParserObj(TrackData);\n\n if (p.hasTrack1) {\n // Populate form fields using track 1 data\n var CardType = null;\n var ccn1 = p.account.charAt(0);\n if (ccn1 == 4) CardType = 'Visa';\n else if (ccn1 == 5) CardType = 'MasterCard';\n else if (ccn1 == 3) CardType = 'Amex';\n else if (ccn1 == 6) CardType = 'Discover';\n else CardType = 'Visa';\n\n $('#pcc_no_' + id).val(p.account);\n $('#pcc_holder_' + id).val(p.account_name);\n $('#pcc_month_' + id).val(p.exp_month);\n $('#pcc_year_' + id).val(p.exp_year);\n $('#pcc_cvv2_' + id).val('');\n $('#pcc_type_' + id).val(CardType);\n } else {\n $('#pcc_no_' + id).val('');\n $('#pcc_holder_' + id).val('');\n $('#pcc_month_' + id).val('');\n $('#pcc_year_' + id).val('');\n $('#pcc_cvv2_' + id).val('');\n $('#pcc_type_' + id).val('');\n }\n\n $('#pcc_cvv2_' + id).focus();\n }\n })\n .blur(function(e) {\n $(this).val('');\n })\n .focus(function(e) {\n $(this).val('');\n });\n}\n\nfunction get(name) {\n if (typeof Storage !== 'undefined') {\n return localStorage.getItem(name);\n } else {\n alert('Please use a modern browser as this site needs localstroage!');\n }\n}\n\nfunction store(name, val) {\n if (typeof Storage !== 'undefined') {\n localStorage.setItem(name, val);\n } else {\n alert('Please use a modern browser as this site needs localstroage!');\n }\n}\n\nfunction remove(name) {\n if (typeof Storage !== 'undefined') {\n localStorage.removeItem(name);\n } else {\n alert('Please use a modern browser as this site needs localstroage!');\n }\n}\n\nfunction hrsd(sdate) {\n if (sdate !== null) {\n return date(dateformat, strtotime(sdate));\n }\n return sdate;\n}\n\nfunction hrld(ldate) {\n if (ldate !== null) {\n return date(dateformat + ' ' + timeformat, strtotime(ldate));\n }\n return ldate;\n}\n\n$(document)\n .ajaxStart(function() {\n $('#ajaxCall').show();\n })\n .ajaxStop(function() {\n $('#ajaxCall').hide();\n });\n\n$(document).ready(function() {\n // $('[data-toggle=\"ajax-modal\"]').click(function (e) {\n $(document).on('click', '[data-toggle=\"ajax-modal\"]', function(e) {\n e.preventDefault();\n var link = $(this).attr('href');\n $.get(link).done(function(data) {\n $('#myModal')\n .html(data)\n // .append(\"<script src='\"+assets+\"js/modal.js' />\")\n .modal({ backdrop: 'static' });\n });\n return false;\n });\n $('.load_suspended').click(function(event) {\n event.preventDefault();\n var href = $(this).attr('href');\n if (get('spositems')) {\n bootbox.confirm(lang.r_u_sure, function(result) {\n if (result == true) {\n window.location.href = href;\n }\n });\n return false;\n } else {\n window.location.href = href;\n }\n });\n $('.sign_out').click(function(e) {\n e.preventDefault();\n var href = $(this).attr('href');\n bootbox.confirm('<strong>' + lang.register_open_alert + '</strong>', function(result) {\n if (result == true) {\n window.location.href = href;\n }\n });\n return false;\n });\n});\n"]}