Online телефонный справочник из 1С: Зарплата и управление персоналом
13.03.17 00:54

?? ?????? ???????????? ???????????? ?????????? ??????????? ???????????. ??????? ? ??? ??? ???????? ???????? ???????, ????????????? ? ????????? ????????? ???????. ?? ?????????? ??? ????? ?????????, ??? ?????????? ??? ???????????, ????? ???????? ? ????????, ? ????? ???????????? ???????????? ?? 10 ?? 25 ????. ? ?????, ???????? ????? ???????, ? ??????? ??????? ?????????? ???? ?? ????. ????? ?????????? ??????????????? ? ??????????? ?????? ? Excel. ??? ???? ??? ??? ????????? ???????: ???????? ?????, ???????? ??????????. ?? ???????????????? ?????????? ??????????? ???, ???????? ??-?? ????????? ?????, ? ???????? ??-?? ????????? ?????????? ?????????? ????????? ???????????. ? ????? ?? ???????? ??? ?????? ? ???? ???????.  ??????????? ?????? ?? ?????? ????????,  ? ???????, ??? online ?????????? ?????????? ? ??? ?????????? ? ?????????????? LDAP ??? PHP+MySQL. ??? ?? ??????????? ?????? ?????????? ?? ???? ??????:

  • ??? ????????????? LDAP ???????? ?? ???????? ? ???? ???????? ?????, ??????? ?? ?????????? ????????????? ????? ??????;
  • ??? ????????????? LDAP ??? ??????????? ??????????? ?????????? ???????? ????-?? ?? ??????????? ?????? ?????? ? ???????, ? ?????? ? ?????????????? ?????? LDAP;
  • ??? ????????????? PHP+MySQL ?????????? ???? ?? ?????? ? ?????????, ? ?????????? ????? ? ????, ???? ?????????????? ????????? ????????? ??? ???? ?????. ?????????, ? ?? ????? ? PHP, ?? ????????????? ?????? ??????? ?? ????.

? ????? ? ????? ???????????? ? ???????? ???????? ? ????????? ?????? 1C, ? ??? ???????? ?????? HTML ? JavaScript. 

?????? ??????????? ?? 3 ?????:

1. ?????????? ????????? ?????, ?.?.  ??????????? HTTP-?????? ??? ???????????? 1?: ???

2.  ?????????? ?????????? ?????. ??? ??? ??? ???? ???? ??????? ?????, ????????? HTML ? JavaScript ? ???? ?????? ??? ?? ??????? ??????.

3. ?????????? ?? web-???????. ?? ???? ? ? ?????? ?????? ?? ????, ????????? ?????????? ? ?????????, ?? ? ?? infostart.ru ????? ?? ????? ???????.

? ?????????? ?????????? ??????? ???????????? ?????????? ?????? ? ??????????? ? ?? ????????? ??? ????????. ???? ??????.

?????????? ????????? ?????

??? ?????? ??????? ??????????, ??? ???????? ?  HTTP-????????? ? 1?. HTTP-??????? ???????????? ??????????? HTTP-???????? ?? ????????????? URL. URL HTTP-??????? ???????????? ???????????, ????????:


http://<????? ???????>/<??? ????>/hs/<???????? URL>/<????????????? URL>

???

  • ????? ??????? - ??? ????? ???????? ?????????? ???? 1?;
  • ??? ???? - ??? ???????? ???? ?????? ???????????? 1?;
  • hs - ????????? ?? ??, ??? ?? ?????????? ? HTTP-???????;
  • ???????? URL - ??? ?????? ????????, ?????????? ????? ???????. ??????????? ? ????????? HTTP-???????;
  • ????????????? URL - ??? ??? ??????, ??????? ????? ?????????????? ?? ??????? ? ??????????? ? ??????? ?????? URL.

??? ??????????? ??????????? ?????????? ???????? URL - person, ? ????????????? URL ????????? (??????? 1):

  1. personList - ????????? ?????? ???????????;
  2. personInfo - ????????? ?????????? ?????????? ?? ??????????;
  3. birthdayList - ????????? ?????? ???? ???????? ? ???? ?????????? ?? ????.
??? ????????? HTTP-??????? ?????????? ?????? ? ???????? URL, ??????? ??????????? ? ?????? HTTP-??????? ? ?????????. ? ?????? HTTP-??????? ????? 3 ??????? getPersonList, getPersonInfo, getBirthdayList.
???????????? 1?: ???
??????? 1. HTTP-?????? ? ??????? URL
????????? ???? ??????? ????? ????? ? ???????? ? ??????:
  1. ????????? ???????? HTTP-???????;
  2. ?????????? ?????? ? ???? ??????
  3. ???????????? ?????????? ???? ?????? ? ??????? ?????? ? ?????????
  4. ????????? ?? ?????????? ???????? ????????????????? ?????? JSON
  5. ????????? ????? ? ?????????? ??????? ???????

?????????, ????????? ?????, ?? ????????? ?????? ??????? personList, ???? ?? ??????? ??? ???????? ??? ???????, ?? ??????????? ? ??????? ?? ???????? ?????. ??? ???????????? HTTP-?????? ?? ??????? JSON ??????, ? ??????? ????? ??????????? ?????? ??? ???????????.  

??? ?????? ???????? ?????? HTTP??????????? ? ???????? ??????????, ??????????????? ???? HTTP-????????? ? ?????? ??? ???????????? ?????? (javascript). ????? ????????? ??? ???? HTTP ????????? ????? ???????? ???.


????? = ????? HTTP???????????(200);
?????.?????????.????????("Content-type","application/javascript");

???? ?????? ? ???????? HTTP??????????? ?????????. ??? ????, ????? ???????? ????????? ?? ??????? ?? ???????????? ?????? ??????? ????????, ?????????? ???????? ???? ???????? ?????????:


????????????????? = ?(??????.????????????????.????????("fired") = "0", ????????????.???????????????????.??????????, ????????????);

? ?????? ??????, ???????? ????????? ????????? ?? ????????? ??????????: ?????? ??? ???. ?????????, ??????????? ?????? ????????? ?????????? ?????? ????????? ???????????, ? ????? ??????????? ?????? ???????????.

?????? ?? ?????????? ?????? ? ???? ?????? ? ??????????:


??????????? = ????? ??????;
	???????????.?????????.????????("?????????",?????????????????);
	???????????.????? = "???????
	                    |	???????????????????????????.?????????.??? ??? ?????????????,
	                    |	???????????????????????????.?????????????.???????????? ??? ?????????????,
	                    |	???????????????????????????.?????????????.??? ??? ????????????????,
	                    |	???????????????????????????.??????????????.??????? ??? ???????,
	                    |	???????????????????????????.??????????????.??? ??? ???,
	                    |	???????????????????????????.??????????????.???????? ??? ????????
	                    |??
	                    |	???????????????.??????????????????????????? ??? ???????????????????????????
	                    |		?????????? ?????????? ???????????????.????????????????????.????????????? ??? ?????????????????????????????????
	                    |		?? ???????????????????????????.?????????.?????? = ?????????????????????????????????.?????????.??????
	                    |???
	                    |	???????????????????????????.?????????????.???????????? <> """"
	                    |	? ?????????????????????????????????.?????????.?????? <> &?????????
	                    |
	                    |????????????? ??
	                    |	???????????????????????????.?????????????.????????????,
	                    |	???????????????????????????.?????????.???,
	                    |	???????????????????????????.?????????????.???,
	                    |	???????????????????????????.??????????????.???????,
	                    |	???????????????????????????.??????????????.???,
	                    |	???????????????????????????.??????????????.????????
	                    |
	                    |??????????? ??
	                    |	?????????????,
	                    |	???????
	                    |?????
	                    |	????????(?????????????),
	                    |	????????(?????????????)
	                    |??
	                    |	????????????????";
	????????? = ???????????.?????????();

????????? ???????? ?? ?????? ?? ?????, ????????? ? ?????? ??????? ?? ????, ???? ?????????? ?????? ????????? ? ???????? ? ??????? ??????? ? ????????? ??????????? ???????:


???????????????????? = ?????????.???????(??????????????????????.??????????????,"????????????????");
??????????????????? = ????? ??????;
???? ????????????????????.?????????() ????
	????????????? = ????? ?????????;
	?????????????.????????("id",??????(????????????????????.????????????????));
	?????????????.????????("open","true");	
	?????????????.????????("value",??????(????????????????????.?????????????));
	????????????????? = ????? ??????;
	????????????????? = ????????????????????.???????();
	???? ?????????????????.?????????() ????
		????????? = ????? ?????????;
		??? = ?????????????????.??????? + " " + ???( ?????????????????.???, 1) + ". " + ???( ?????????????????.????????, 1) + ".";
		?????????.????????("id",??????(?????????????????.?????????????));
		?????????.????????("value",??????(???));
		?????????????????.????????(?????????);		
	??????????; 	
	?????????????.????????("data",?????????????????);
	???????????????????.????????(?????????????);
??????????; 

??? ????????? ?????????? ??????????? ?????? ?????????????, ????????? ?? ??????? ???????? ?????????????. ????????????? ???????? ? ???? ??? ?????????????, ???????????? ? ?????? ???????????. ? ????????????? ????? ???? ???? open, ??????? ? ?????????? ? ??????? ????? ????????? ?? ????????? ??????? ??????. ????????? ????????? ??????? ?? ???????? ? ?????????.  ???? ? ?????????? ??????????? ?? ?????????? ?????, ????? ? ?????????? ?? ???????? ??????? ??? ????????? ???????.


????? = ????? ??????JSON;
?????.????????????????();
????????? = ????? ?????????????????????JSON;
????????JSON(?????, ???????????????????,?????????);
??????????????? = ?????.???????(); 	
?????.??????????????????????(???????????????,???????????????.UTF8);
??????? ?????;

??? ???????????? JSON ??????????? ?????? ? its.1c.ru

??? ??????? GetPersonsList

??????? GetPersonsList(??????)
	????? = ????? HTTP???????????(200);
	?????.?????????.????????("Content-type","application/javascript");
	????????????????? = ?(??????.????????????????.????????("fired") = "0", ????????????.???????????????????.??????????, ????????????); 

	??????????? = ????? ??????;
	???????????.?????????.????????("?????????",?????????????????);
	???????????.????? = "???????
	                    |	???????????????????????????.?????????.??? ??? ?????????????,
	                    |	???????????????????????????.?????????????.???????????? ??? ?????????????,
	                    |	???????????????????????????.?????????????.??? ??? ????????????????,
	                    |	???????????????????????????.??????????????.??????? ??? ???????,
	                    |	???????????????????????????.??????????????.??? ??? ???,
	                    |	???????????????????????????.??????????????.???????? ??? ????????
	                    |??
	                    |	???????????????.??????????????????????????? ??? ???????????????????????????
	                    |		?????????? ?????????? ???????????????.????????????????????.????????????? ??? ?????????????????????????????????
	                    |		?? ???????????????????????????.?????????.?????? = ?????????????????????????????????.?????????.??????
	                    |???
	                    |	???????????????????????????.?????????????.???????????? <> """"
	                    |	? ?????????????????????????????????.?????????.?????? <> &?????????
	                    |
	                    |????????????? ??
	                    |	???????????????????????????.?????????????.????????????,
	                    |	???????????????????????????.?????????.???,
	                    |	???????????????????????????.?????????????.???,
	                    |	???????????????????????????.??????????????.???????,
	                    |	???????????????????????????.??????????????.???,
	                    |	???????????????????????????.??????????????.????????
	                    |
	                    |??????????? ??
	                    |	?????????????,
	                    |	???????
	                    |?????
	                    |	????????(?????????????),
	                    |	????????(?????????????)
	                    |??
	                    |	????????????????";
	????????? = ???????????.?????????();
	???????????????????? = ?????????.???????(??????????????????????.??????????????,"????????????????");
	??????????????????? = ????? ??????;
	???? ????????????????????.?????????() ????
		????????????? = ????? ?????????;
		?????????????.????????("id",??????(????????????????????.????????????????));
		?????????????.????????("open","true");	
		?????????????.????????("value",??????(????????????????????.?????????????));
		????????????????? = ????? ??????;
		????????????????? = ????????????????????.???????();
		???? ?????????????????.?????????() ????
			????????? = ????? ?????????;
			??? = ?????????????????.??????? + " " + ???( ?????????????????.???, 1) + ". " + ???( ?????????????????.????????, 1) + ".";
			?????????.????????("id",??????(?????????????????.?????????????));
			?????????.????????("value",??????(???));
			?????????????????.????????(?????????);		
		??????????; 	
		?????????????.????????("data",?????????????????);
		???????????????????.????????(?????????????);
	??????????; 
	????? = ????? ??????JSON;
	?????.????????????????();
	????????? = ????? ?????????????????????JSON;
	????????JSON(?????, ???????????????????,?????????);
	??????????????? = ?????.???????(); 	
	?????.??????????????????????(???????????????,???????????????.UTF8);
	??????? ?????;
????????????
??? ??????? GetPersonInfo

??????? GetPersonInfo(??????)
	????? = ????? HTTP???????????(200);
	?????.?????????.????????("Content-type","application/javascript");
	?????????? = ??????.????????????????.????????("id");

	??????????? = ????? ??????;
	???????????.?????????.????????("??????????",??????????);
	???????????????????????? = ????? ??????;
	????????????????????????.????????(???????????.????????????????????????.???????????????????("????????? ???????").??????);
	????????????????????????.????????(???????????.????????????????????????.???????????????????("Email").??????);
	????????????????????????.????????(???????????.????????????????????????.???????????????????("???????? ???????").??????);
	????????????????????????.????????(???????????.????????????????????????.???????????????????("??????? ???????").??????);
	????????????????????????.????????(???????????.????????????????????????.???????????????????("????? ????? ??????????").??????);
	???????????.??????????????????("?????????????",????????????????????????);
	???????????.????? = "??????? ???????????
	                    |	??????????????????????????????????.???,
	                    |	??????????????????????????????????.?????????????,
	                    |	??????????????????????????????????.??????.?????? ??? ?????????????
	                    |????????? ????????
	                    |??
	                    |	??????????.??????????????.???????????????????? ??? ??????????????????????????????????
	                    |???
	                    |	??????????????????????????????????.??? ?(&?????????????)
	                    |;
	                    |
	                    |////////////////////////////////////////////////////////////////////////////////
	                    |???????
	                    |	???????????????????????????.??????????????.??? ??? ???,
	                    |	???????????????????????????.??????????????.???????????? ??? ????????????,
	                    |	???????????????????????????.?????????.???????????? ??? ?????????,
	                    |	????????.??? ??? ???????????,
	                    |	????????.????????????? ??? ???????
	                    |??
	                    |	???????? ??? ????????
	                    |		?????????? ?????????? ???????????????.??????????????????????????? ??? ???????????????????????????
	                    |		?? ????????.????????????? = ???????????????????????????.??????????????.??????
	                    |???
	                    |	???????????????????????????.?????????.??? = &??????????
	                    |	? ???????????????????????????.?????????.???????????? <> """"
	                    |
	                    |????????????? ??
	                    |	???????????????????????????.??????????????.???,
	                    |	???????????????????????????.??????????????.????????????,
	                    |	???????????????????????????.?????????.????????????,
	                    |	????????.???,
	                    |	????????.?????????????
	                    |
	                    |??????????? ??
	                    |	???
	                    |????? ??
	                    |	???";
	????????? = ???????????.?????????();
	???????????????? = ?????????.???????(??????????????????????.??????????????,"???");
	???? ????????????????.?????????() ????
		????????? = ????? ?????????;
		?????????.????????("fio",??????(????????????????.???));
		??????????????? = ????? ??????;
		???????????????? = ????????????????.???????();
		???? ????????????????.?????????() ????
			??????? = ????? ?????????;
			???????.????????("type",??????(????????????????.???????????));
			???????.????????("value",??????(????????????????.???????));
			?????????.????????("birthday",??????(???(????????????????.????????????,10)));	
			?????????.????????("who",??????(????????????????.?????????));
			???????????????.????????(???????);		
		??????????; 	
		?????????.????????("contacts",???????????????);;
	??????????; 
	????? = ????? ??????JSON;
	?????.????????????????();
	????????? = ????? ?????????????????????JSON;
	????????JSON(?????, ?????????, ?????????);
	??????????????? = ?????.???????(); 	
	?????.??????????????????????(???????????????,???????????????.UTF8);
	??????? ?????;
	
????????????
??? ??????? GetBirthdayList

??????? GetBirthdayList(??????)
	????? = ????? HTTP???????????(200);
	?????????????? = ??????.????????????????.????????("days");
	??????????? = ????? ??????();
	???????????.?????????.????????("????", ?????(??????????????));
	???????????.?????????.????????("???????", ???????????());
	???????????.????? = "???????
	                    |	???????????????????????????.??????????????.???????????? ??? ???,
	                    |	???????????????????????????.??????????????.???????????? ??? ????????????,
	                    |	????????(???????????????????????????.??????????????.????????????) - ????????(&???????) ??? ?????????????
	                    |??
	                    |	???????????????.??????????????????????????? ??? ???????????????????????????
	                    |???
	                    |	????????(???????????????????????????.??????????????.????????????) - ????????(&???????) <= &????
	                    |	? ????????(???????????????????????????.??????????????.????????????) - ????????(&???????) > 0
	                    |
	                    |????????????? ??
	                    |	???????????????????????????.??????????????.????????????,
	                    |	???????????????????????????.??????????????.????????????
	                    |
	                    |??????????? ??
	                    |	?????????????";
	????????? = ???????????.?????????();
	???????????????? = ?????????.???????();
	????????????????? = ????? ??????;
	???? ????????????????.?????????() ????
		????????? = ????? ?????????;
		?????????.????????("fio",??????(????????????????.???));
		?????????.????????("days",??????(????????????????.?????????????));	
		?????????.????????("birthday",??????(???(????????????????.????????????,10)));	
		?????????????????.????????(?????????);
	??????????; 
	????? = ????? ??????JSON;
	?????.????????????????();
	????????? = ????? ?????????????????????JSON;
	????????JSON(?????, ?????????????????, ?????????);
	??????????????? = ?????.???????(); 	
	?????.??????????????????????(???????????????,???????????????.UTF8);
	??????? ?????;
????????????

???????? ????????? ??????? ??????????. ????????? ? ?????????? ?????????? ?????

?????????? ?????????? ?????

??? ?????????? ?????????? ????? ? ??????????? ?????????? Webix. ?????? ?????????? ????????? ???????? ?????????? ?????????? ? ??? ????????? ??????, ? ????? ????????? ?????????? ????? ??? ????????? ????.

?? ????????????? ?????????? Webix ? ???????? ??? ??????? ?????????, ?? ?????????? ????? ?????? ?? ?????. ??? ????????? ?????? ?????? ? ????? ?????????:

?? ????????????? Webix UI

??????? 2. ????????? ?? ????????????? Webix UI

Webix UI

??????? 3. ????????????? Webix UI

?????? ?????? ?????????? ?????????? ?????, ??????? ??  ????????? ??????:

  • index.html - ????? ?????, ?????? ?? ??? ???????? ???????? ?????? ? ? ??? ??? ???????????? logic.js ? ui.js
  • logic.js - ???? ??????????? ?????? ??????????: ???????? ??? ??????? ?? ????????, ??????? ? ??????? ? ?. ?.
  • ui.js - ???? ??????????? ??? ?????????.
??? ui.js

var ui_scheme = {
	id:"phonebook",
	rows: [
	{view: "toolbar", cols: [
	{view: "label", label: "?????????? ??????????", align:"left"},
	{},
	{view: "label", label: "?????????? ?????????: ", align:"right"},
	{view: "toggle", id:"fired", offLabel:"???", onLabel:"??", width:50},
	{view: "icon", id:"birthday", icon:"birthday-cake"}
	]},
	{cols:[
		{
			width: 300,
			rows:[
			{view: "search",id:"search", placeholder:"?????..."},
			{view: "tree", select:"true", id:"list_person"}
			]},
			{   
				id: "info",
				hidden:true ,
				width: "800",
				rows:[
				{view:"template", id:"main_info", template:"<h1>#fio#</h1><h3>?????????: #who#</h3><h5>???? ????????: #birthday#</h5>",  autoheight:true},
				{
					view:"datatable", 
					id: "contact_info",
					header:false,
					autowidth:true,
					columns:[
					{ id:"type",    header:"", width:200},
					{ id:"value",   header:"", width:600}
					],
					fixedRowHeight:false,  rowLineHeight:25, rowHeight:25
				}
				]            
			}
			]}
			]
		};

		var win_birthday = {
			view:"window",
			id:"wBirthday",
			position: "center",
			modal: "true",
			resize: "true",
			move: "true",
			width: 500,
			head:{
				view: "toolbar", cols: [
				{view: "label", label: "????????? ??? ????????"},
				{view: "icon", icon:"close", id:"win_close", align: "right", click:"$$('wBirthday').hide();"}
				]
			},
			body:{
				rows:[
				{view:"counter", id:"days", label:"?? ??? ????????", labelWidth: 150, step:1, value:14, min:4, max:365},
				{view:"list", id: "birthday_persons",  template:"#fio# - #birthday# (#days#)", hidden:true, width:400}
				]
			}
		};

????????? ???????? (ui_scheme) ???????????? ????? ??????? ??????,? ??????????? ?? ??? ?????:

  • ?????? ???????????? ? ??????? ?????, ?? ??????? ??????????? ?????????, ?????? ??????????? ????????? ??????????? ? ?????? ??????????? ?????? ???? ????????;
  • ?????? ????????????? ? ??????????? ? ????? ?????;
  • ?????????? ? ?????????? ? ?????? ?????.

?????? ????????????? ? ??????????? - ??? ????????????? ?????? ??? ?????????? ???????? ?????????????, ? ???????????? ???????? ??????????.

????? ??????? ???? (win_birthday), ??????? ??????? ?? ????????? ????, ?????? ??????? ? ?????? ??????????? ? ????????? ???? ???????? ? ???? ?? ??? ????????. ??????? ? ????????? ???? ????? ???????? ? ??? ???????? ?????????.

??? logic.js

function update_list()
{
	var url = "/../zup3/hs/person/personList?fired="+$$('fired').getValue();
	var auth = 'Basic ' + btoa(unescape(encodeURIComponent("web:web")))
	var res = null;
	webix.attachEvent("onBeforeAjax", 
		function(mode, url, data, request, headers, files, promise){
			headers["Authorization"]= auth;
		});
	webix.ajax(url,{
		error:function(text, data, XmlHttpRequest){
			alert("?????? ?????? ? ????????");
		},
		success:function(text, data, XmlHttpRequest){
			$$("list_person").clearAll();
			$$("phonebook").disable();
			$$("phonebook").showProgress({
				type:"icon",
				delay:100,
				hide:true
			});
			setTimeout(function(){
				$$("list_person").parse(data.json());
				$$("phonebook").enable();
			}, 100);
		}
	});
}

function update_info(id)
{
	var url = "/../zup3/hs/person/personInfo?id="+id;
	var auth = 'Basic ' + btoa(unescape(encodeURIComponent("web:web")))
	var res = null;
	webix.attachEvent("onBeforeAjax", 
		function(mode, url, data, request, headers, files, promise){
			headers["Authorization"]= auth;
		});
	webix.ajax(url,{
		error:function(text, data, XmlHttpRequest){
			alert("?????? ?????? ? ????????");
		},
		beforeSend:function(req) {
				req.setRequestHeader('Authorization', auth);
		},
		success:function(text, data, XmlHttpRequest){
		$$("phonebook").disable();
		$$("phonebook").showProgress({
			type:"icon",
			delay:100,
			hide:true
		});
		setTimeout(function(){
			$$("main_info").parse(data.json());
			$$("contact_info").clearAll();
			$$("contact_info").parse(data.json().contacts);
			$$("contact_info").adjustRowHeight("value", true); 
            $$("contact_info").render();
			$$("phonebook").enable();
			$$("info").show();
		}, 100);
	}
	});
}


function update_birthday(days)
{
	var url = "/../zup3/hs/person/birthdayList?days="+days;
	var auth = 'Basic ' + btoa(unescape(encodeURIComponent("web:web")))
	var res = null;
	webix.attachEvent("onBeforeAjax", 
		function(mode, url, data, request, headers, files, promise){
			headers["Authorization"]= auth;
		});
	webix.ajax(url,{
		error:function(text, data, XmlHttpRequest){
			alert("?????? ?????? ? ????????");
		},
		beforeSend:function(req) {
				req.setRequestHeader('Authorization', auth);
		},
		success:function(text, data, XmlHttpRequest){
		$$("birthday_persons").disable();
		$$("birthday_persons").showProgress({
			type:"icon",
			delay:100,
			hide:true
		});
		setTimeout(function(){
			$$("birthday_persons").clearAll();
			$$("birthday_persons").parse(data.json());
			$$("birthday_persons").enable();
			$$("birthday_persons").show();
		}, 100);
	}
	});
}

webix.ready(function(){
	webix.ui(ui_scheme);
	webix.ui(win_birthday);
	webix.extend($$("phonebook"), webix.ProgressBar);
	webix.extend($$("birthday_persons"), webix.ProgressBar);
	update_list();
	$$('fired').attachEvent("onItemClick", function(){
		update_list();
	})
	$$('list_person').attachEvent("onItemClick", function(id, e, node){
		if ($$('list_person').isBranch(id) == false)
			update_info(id);
	})
	$$('birthday').attachEvent("onItemClick", function(){
		$$("wBirthday").show();
		update_birthday($$('days').getValue());
	})

	$$("days").attachEvent("onChange",function(){
		update_birthday(this.getValue());
	})

	$$("search").attachEvent("onTimedKeyPress",function(){
		$$("list_person").filter("#value#",this.getValue());
	})

})


????? ??????????? ???? logic.js, ?? ????????? ????????? ? ?????????? ????????? ????????


webix.ui(ui_scheme);
webix.ui(win_birthday);
webix.extend($$("phonebook"), webix.ProgressBar);
webix.extend($$("birthday_persons"), webix.ProgressBar);

????? ?????????? ??????? update_list(), ??????? ????????? ?????? ??????????? ? ?????????????, ????????? ?????? ?? ??????. ????? ???? ??????????? ??????? ? ????????? ????????


$$('fired').attachEvent("onItemClick", function(){
		update_list();
	})

??? ??????? ?? ??????? "?????????? ????????? ???????????" ?????????? ?????????? ?????? ????????????? ? ???????????


$$('list_person').attachEvent("onItemClick", function(id, e, node){
		if ($$('list_person').isBranch(id) == false)
			update_info(id);
	})

??? ??????? ?? ???????? ?????? ????????????? ? ??????????? ???????????, ???????? ?? ???? ??????? ??????????? ??? ?????????????? (????? ?? ???????? ???????), ???? ?????????, ?? ??????????? ??????? ??????????.


$$('birthday').attachEvent("onItemClick", function(){
		$$("wBirthday").show();
		update_birthday($$('days').getValue());
	})

??? ??????? ?? ?????? "???? ????????" ???????????? ???? ? ??????????? ?????? ??????????? ? ??? ???????? ? ?????? ????.


$$("search").attachEvent("onTimedKeyPress",function(){
?? ??? ?$$("list_person").filter("#value#",this.getValue());
?? ?})

??? ????????? ???????? "?? ??? ????????" ??????????? ?????? ??????????? ? ??? ????????


$$("search").attachEvent("onTimedKeyPress",function(){
?? ??? ?$$("list_person").filter("#value#",this.getValue());
?? ?})

???? ???? search ????? ???????? ?? ??????????? ?????? ? ?????? ????????????? ? ???????????.

????????? ?????????? ?????????? ? ???????????, ?????????????? ? ??? ???????? ????? ?????:

  1. ??????????? URL ??? ???????
  2. ??????????? ?????? ???????????
  3. ?? ???????? ??????? ???????????? ?????? ???????????
  4. ???????????? ?????? ?? ??????
  5. ?????????????? ????????? ? ???????? ? ??????? ????????.

? ???????, ??? ?????? ???????? ??? ????????? ? ??????? ??? ????????. ? ???????? ?????? ?? ??????? ? ???????????? ? ???????? ??????? ?? ??????? ?????????.

Read Full Article