AnonSec Shell
Server IP : 85.193.89.191  /  Your IP : 3.145.170.176
Web Server : Apache
System : Linux 956367-cx40159.tmweb.ru 3.10.0-1160.105.1.el7.x86_64 #1 SMP Thu Dec 7 15:39:45 UTC 2023 x86_64
User : bitrix ( 600)
PHP Version : 8.1.27
Disable Function : NONE
MySQL : OFF  |  cURL : OFF  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : ON  |  Pkexec : ON
Directory :  /home/bitrix/www/bitrix/components/bitrix/main.field.date/templates/main.view/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ HOME ]     

Current File : /home/bitrix/www/bitrix/components/bitrix/main.field.date/templates/main.view/mobile.min.js
this.BX=this.BX||{};this.BX.Mobile=this.BX.Mobile||{};this.BX.Mobile.Field=this.BX.Mobile.Field||{};(function(t,e){"use strict";var i=window.BX,a=window.BXMobileApp;var s=function(){var t=function t(e,a,s,o){this.type=a;this.node=e;this.container=s;this.click=i.delegate(this.click,this);this.callback=i.delegate(this.callback,this);i.bind(this.container,"click",this.click);i.bind(this.container.parentNode,"click",this.click);this.format={inner:{datetime:"dd.MM.yyyy H:mm",time:"H:mm",date:"dd.MM.yyyy"},bitrix:{datetime:null,time:null,date:null},visible:{datetime:null,time:null,date:null}};this.init(o)};t.prototype={click:function t(e){i.eventCancelBubble(e);this.show();return i.PreventDefault(e)},show:function t(){var e={type:this.type,start_date:this.getStrDate(this.node.value),format:this.format.inner[this.type],callback:this.callback};if(e["start_date"]==""){delete e["start_date"]}a.UI.DatePicker.setParams(e);a.UI.DatePicker.show()},callback:function t(e){var a=this.makeDate(e);this.node.value=i.date.format(this.format.bitrix[this.type],a);var s=i.date.format(i.clone(this.format.visible[this.type]),a);if(!i.type.isNotEmptyString(s)){s=this.container.getAttribute("placeholder")||" "}this.container.innerHTML=s;if(this.delButton){this.delButton.style.display="inline-block"}i.onCustomEvent(this,"onChange",[this,this.node])},makeDate:function t(e){var a=new Date;if(i.type.isNotEmptyString(e)){var s=new RegExp("(\\d{2}).(\\d{2}).(\\d{4})"),o=new RegExp("(\\d{1,2}):(\\d{1,2})"),n;if(s.test(e)&&(n=s.exec(e))&&n){a.setDate(n[1]);a.setMonth(n[2]-1);a.setFullYear(n[3])}if(o.test(e)&&(n=o.exec(e))&&n){a.setHours(n[1]);a.setMinutes(n[2]);a.setSeconds(0)}}return a},getStrDate:function t(e){var a=i.parseDate(e),s="";if(a!==null){if(this.type=="date"||this.type=="datetime"){s=i.util.str_pad_left(a.getDate().toString(),2,"0")+"."+i.util.str_pad_left((a.getMonth()+1).toString(),2,"0")+"."+a.getFullYear().toString()}if(this.type=="datetime"){s+=" "}if(this.type=="time"||this.type=="datetime"){s+=i.util.str_pad_left(a.getHours().toString(),2,"0")+":"+a.getMinutes().toString()}}return s},init:function t(a){var s=i.date.convertBitrixFormat(e.Loc.getMessage("FORMAT_DATETIME")),o=i.date.convertBitrixFormat(e.Loc.getMessage("FORMAT_DATE")),n;if(s.substr(0,o.length)==o){n=i.util.trim(s.substr(o.length))}else{n=i.date.convertBitrixFormat(s.indexOf("T")>=0?"H:MI:SS T":"HH:MI:SS")}this.format.bitrix.datetime=s;this.format.bitrix.date=o;this.format.bitrix.time=n;a=a||{};this.format.visible.datetime=a["datetime"]||s.replace(":s","");this.format.visible.date=a["date"]||o;this.format.visible.time=a["time"]||n.replace(":s","");this.format.visible.datetime=[["today","today, "+this.format.visible.time],["tommorow","tommorow, "+this.format.visible.time],["yesterday","yesterday, "+this.format.visible.time],["",this.format.visible.datetime]];this.format.visible.date=[["today","today"],["tommorow","tommorow"],["yesterday","yesterday"],["",this.format.visible.date]];this.delButton=i("".concat(this.node.id,"_del"));if(this.delButton){i.bind(this.delButton,"click",i.proxy(this.drop,this))}},drop:function t(e){if(e){i.eventCancelBubble(e);i.PreventDefault(e)}this.node.value="";this.container.innerHTML=this.container.getAttribute("placeholder");if(this.delButton){this.delButton.style.display="none"}i.onCustomEvent(this,"onChange",[this,this.node]);return false}};return t}();window.app.exec("enableCaptureKeyboard",true);i.Mobile.Field.Date=function(t){this.init(t)};i.Mobile.Field.Date.prototype={__proto__:i.Mobile.Field.prototype,bindElement:function t(e){var a=null;if(i(e)){var o=e.hasAttribute("data-bx-type")?e.getAttribute("data-bx-type").toLowerCase():"";a=new s(e,o,i("".concat(e.id,"_container")),this.format)}return a}}})(this.BX.Mobile.Field.Date=this.BX.Mobile.Field.Date||{},BX);
//# sourceMappingURL=mobile.map.js

Anon7 - 2022
AnonSec Team