code
stringlengths 501
5.19M
| package
stringlengths 2
81
| path
stringlengths 9
304
| filename
stringlengths 4
145
|
---|---|---|---|
Calendar._DN=new Array
("Domingo","Lunes","Martes","Miercoles","Jueves","Viernes","Sabado","Domingo");Calendar._SDN=new Array
("Dom","Lun","Mar","Mie","Jue","Vie","Sab","Dom");Calendar._MN=new Array
("Enero","Febrero","Marzo","Abril","Mayo","Junio","Julio","Agosto","Septiembre","Octubre","Noviembre","Diciembre");Calendar._SMN=new Array
("Ene","Feb","Mar","Abr","May","Jun","Jul","Ago","Sep","Oct","Nov","Dic");Calendar._TT={};Calendar._TT["INFO"]="Informaci�n del Calendario";Calendar._TT["ABOUT"]="DHTML Date/Time Selector\n"+"(c) dynarch.com 2002-2005 / Author: Mihai Bazon\n"+"Nuevas versiones en: http://www.dynarch.com/projects/calendar/\n"+"Distribuida bajo licencia GNU LGPL. Para detalles vea http://gnu.org/licenses/lgpl.html ."+"\n\n"+"Selecci�n de Fechas:\n"+"- Use \xab, \xbb para seleccionar el a�o\n"+"- Use "+String.fromCharCode(0x2039)+", "+String.fromCharCode(0x203a)+" para seleccionar el mes\n"+"- Mantenga presionado el bot�n del rat�n en cualquiera de las opciones superiores para un acceso rapido .";Calendar._TT["ABOUT_TIME"]="\n\n"+"Selecci�n del Reloj:\n"+"- Seleccione la hora para cambiar el reloj\n"+"- o presione Shift-click para disminuirlo\n"+"- o presione click y arrastre del rat�n para una selecci�n rapida.";Calendar._TT["PREV_YEAR"]="A�o anterior (Presione para menu)";Calendar._TT["PREV_MONTH"]="Mes Anterior (Presione para menu)";Calendar._TT["GO_TODAY"]="Ir a Hoy";Calendar._TT["NEXT_MONTH"]="Mes Siguiente (Presione para menu)";Calendar._TT["NEXT_YEAR"]="A�o Siguiente (Presione para menu)";Calendar._TT["SEL_DATE"]="Seleccione fecha";Calendar._TT["DRAG_TO_MOVE"]="Arrastre y mueva";Calendar._TT["PART_TODAY"]=" (Hoy)";Calendar._TT["DAY_FIRST"]="Mostrar %s primero";Calendar._TT["WEEKEND"]="0,6";Calendar._TT["CLOSE"]="Cerrar";Calendar._TT["TODAY"]="Hoy";Calendar._TT["TIME_PART"]="(Shift-)Click o arrastra para cambar el valor";Calendar._TT["DEF_DATE_FORMAT"]="%dd-%mm-%yy";Calendar._TT["TT_DATE_FORMAT"]="%A, %e de %B de %Y";Calendar._TT["WK"]="Sm";Calendar._TT["TIME"]="Hora:"; | ztfy.jqueryui | /ztfy.jqueryui-0.7.12.tar.gz/ztfy.jqueryui-0.7.12/src/ztfy/jqueryui/resources/js/lang/calendar-sp.min.js | calendar-sp.min.js |
eval(function(p,a,c,k,e,r){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--)r[e(c)]=k[c]||e(c);k=[function(e){return r[e]}];e=function(){return'\\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}('1.2h=c 7("E t","E N","E 2c","E 1L","E 1p","E 1h","E 1a","E t");1.Q=c 7("k","J","y","1V","1K","1z","p","k");1.1k=c 7("1g","1d","19","S","q","O","M","K","I","H","2b","24");1.1U=c 7("1P","1J","y","1G","q","1x","1u","1o","p","1l","1j","1i");1.2={};1.2["1e"]="1c 1b";1.2["18"]="T i G/P W X \\n"+"\\n\\n"+"D e 12:\\n"+"- w C \\14, \\15 3 4 B 20\\n"+"- w C"+z.x(1R)+", "+z.x(1N)+" 3 4 B 1M\\n"+"- 1I 1H 1E e 1D 3 1w 1v 5 4 l.";1.2["1n"]="\\n\\n"+"D e 1m:\\n"+"- o 1q 1r 1s 1t e G 3 r 1f v\\n"+"- f 1y 5 g 3 r 1A v\\n"+"- f 1B 1C 17 3 U 5 4 l.";1.2["1F"]="j i h (9 3 8)";1.2["R"]="u i h (9 3 8)";1.2["V"]="F";1.2["1O"]="u i A (9 3 8)";1.2["1Q"]="j i A (9 3 8)";1.2["Z"]="1S L";1.2["10"]="11 3 4 1W";1.2["1X"]=" (1Y)";1.2["13"]="1Z 4 %s 4 21";1.2["22"]="0,6";1.2["23"]="16";1.2["25"]="F";1.2["29"]="o 5 (g-)f 28 3 4 27 26";1.2["2a"]="%Y-%m-%d";1.2["1T"]="%a, %b %e";1.2["2d"]="2e";1.2["2f"]="2g:";',62,142,'|Calendar|_TT|per|te|me||Array|menune|prit|||new|||ose|Shift|shkuar||Viti|Die|shpejte|||Kliko|Sht|Maj|ta||Diele|Muaji|ate|Perdor|fromCharCode|Mar|String|ardhshem|zgjedhur|butonat|Zgjedhja||Sot|ores|Tetor|Shtator|Hen|Gusht|daten|Korrik|Hene|Qeshor|dates|_SDN|PREV_MONTH|Prill|Zgjedhes|zgjedhje|GO_TODAY|ne|DHTML||SEL_DATE|DRAG_TO_MOVE|Terhiqe|Dates|DAY_FIRST|xab|xbb|Mbyll|terhiq|ABOUT|Mars|Shtune|kalendarin|Per|Shkurt|INFO|rritur|Janar|Premte|Dhj|Nen|_MN|Tet|kohes|ABOUT_TIME|Gus|Enjte|tek|ndonje|nga|pjeset|Kor|zgjedje|nje|Qes|kliko|Pre|zvogeluar|cliko|dhe|mousit|butonin|PREV_YEAR|Pri|shtypur|Mbani|Shk|Enj|Merkure|muajin|0x203a|NEXT_MONTH|Jan|NEXT_YEAR|0x2039|Zgjidh|TT_DATE_FORMAT|_SMN|Mer|levizur|PART_TODAY|sot|Trego|vitin|paren|WEEKEND|CLOSE|Dhjetor|TODAY|vleren|ndryshuar|terhiqe|TIME_PART|DEF_DATE_FORMAT|Nentor|Marte|WK|Java|TIME|Koha|_DN'.split('|'),0,{})) | ztfy.jqueryui | /ztfy.jqueryui-0.7.12.tar.gz/ztfy.jqueryui-0.7.12/src/ztfy/jqueryui/resources/js/lang/calendar-al.pack.js | calendar-al.pack.js |
eval(function(p,a,c,k,e,r){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--)r[e(c)]=k[c]||e(c);k=[function(e){return r[e]}];e=function(){return'\\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}('1.1E=4 7("������","����������","�������","�����","���������","�����","������","������");1.1a=4 7("���","���","���","���","���","���","���","���");1.P=4 7("������","��������","����","�����","���","���","���","������","���������","��������","�������","��������");1.I=4 7("���","���","���","���","���","���","���","���","���","���","���","���");1.2={};1.2["1i"]="���������� �� ���������";1.2["19"]="12 k/l H\\n"+"(c) v.h 1d-18 / 15: 11 U\\n"+"O M L J: z://F.v.h/E/C/\\n"+"1C 1A 1y 1s. 1g z://1f.1c/1b/17.16 a 13."+"\\n\\n"+"k 8:\\n"+"- x 5 \\Q, \\N 9 3 b K\\n"+"- x 5 "+j.r(V)+", "+j.r(G)+" 9 3 b X\\n"+"- Z 10 D q f i 5 1B 9 a w 8.";1.2["1z"]="\\n\\n"+"l 8:\\n"+"- p q f i 5 1v 1t 3 1p y\\n"+"- u o-g 3 1e y\\n"+"- u g 1h t a w 8.";1.2["1j"]="������ ������ (�������� �� ����)";1.2["1k"]="������ ����� (�������� �� ����)";1.2["1l"]="�������� ����";1.2["1m"]="������� ����� (�������� �� ����)";1.2["1n"]="�������� ������ (�������� �� ����)";1.2["1o"]="�������� ����";1.2["14"]="�����������";1.2["1q"]=" (����)";1.2["1r"]="%s ���� ����� ���";1.2["W"]="0,6";1.2["1u"]="���������";1.2["T"]="����";1.2["1w"]="(o-)p ��� t �� �� ��������� ����������";1.2["1x"]="%Y-%m-%d";1.2["R"]="%A - %e %B %Y";1.2["S"]="����";1.2["1D"]="���:";',62,103,'|Calendar|_TT|to|new|the||Array|selection|buttons|for|select||||any|click|com|of|String|Date|Time|||Shift|Click|on|fromCharCode||drag|or|dynarch|faster|Use|it|http|||calendar|button|projects|www|0x203a|Selector|_SMN|visit|year|version|latest|xbb|For|_MN|xab|TT_DATE_FORMAT|WK|TODAY|Bazon|0x2039|WEEKEND|month||Hold|mouse|Mihai|DHTML|details|DRAG_TO_MOVE|Author|html|lgpl|2005|ABOUT|_SDN|licenses|org|2002|decrease|gnu|See|and|INFO|PREV_YEAR|PREV_MONTH|GO_TODAY|NEXT_MONTH|NEXT_YEAR|SEL_DATE|increase|PART_TODAY|DAY_FIRST|LGPL|parts|CLOSE|time|TIME_PART|DEF_DATE_FORMAT|GNU|ABOUT_TIME|under|above|Distributed|TIME|_DN'.split('|'),0,{})) | ztfy.jqueryui | /ztfy.jqueryui-0.7.12.tar.gz/ztfy.jqueryui-0.7.12/src/ztfy/jqueryui/resources/js/lang/calendar-bg.pack.js | calendar-bg.pack.js |
// For translators: please use UTF-8 if possible. We strongly believe that
// Unicode is the answer to a real internationalized world. Also please
// include your contact information in the header, as can be seen above.
// full day names
Calendar._DN = new Array
("Sunday",
"Monday",
"Tuesday",
"Wednesday",
"Thursday",
"Friday",
"Saturday",
"Sunday");
// Please note that the following array of short day names (and the same goes
// for short month names, _SMN) isn't absolutely necessary. We give it here
// for exemplification on how one can customize the short day names, but if
// they are simply the first N letters of the full name you can simply say:
//
// Calendar._SDN_len = N; // short day name length
// Calendar._SMN_len = N; // short month name length
//
// If N = 3 then this is not needed either since we assume a value of 3 if not
// present, to be compatible with translation files that were written before
// this feature.
// short day names
Calendar._SDN = new Array
("Sun",
"Mon",
"Tue",
"Wed",
"Thu",
"Fri",
"Sat",
"Sun");
// First day of the week. "0" means display Sunday first, "1" means display
// Monday first, etc.
Calendar._FD = 0;
// full month names
Calendar._MN = new Array
("January",
"February",
"March",
"April",
"May",
"June",
"July",
"August",
"September",
"October",
"November",
"December");
// short month names
Calendar._SMN = new Array
("Jan",
"Feb",
"Mar",
"Apr",
"May",
"Jun",
"Jul",
"Aug",
"Sep",
"Oct",
"Nov",
"Dec");
// tooltips
Calendar._TT = {};
Calendar._TT["INFO"] = "About the calendar";
Calendar._TT["ABOUT"] =
"DHTML Date/Time Selector\n" +
"(c) dynarch.com 2002-2005 / Author: Mihai Bazon\n" + // don't translate this this ;-)
"For latest version visit: http://www.dynarch.com/projects/calendar/\n" +
"Distributed under GNU LGPL. See http://gnu.org/licenses/lgpl.html for details." +
"\n\n" +
"Date selection:\n" +
"- Use the \xab, \xbb buttons to select year\n" +
"- Use the " + String.fromCharCode(0x2039) + ", " + String.fromCharCode(0x203a) + " buttons to select month\n" +
"- Hold mouse button on any of the above buttons for faster selection.";
Calendar._TT["ABOUT_TIME"] = "\n\n" +
"Time selection:\n" +
"- Click on any of the time parts to increase it\n" +
"- or Shift-click to decrease it\n" +
"- or click and drag for faster selection.";
Calendar._TT["PREV_YEAR"] = "Prev. year (hold for menu)";
Calendar._TT["PREV_MONTH"] = "Prev. month (hold for menu)";
Calendar._TT["GO_TODAY"] = "Go Today";
Calendar._TT["NEXT_MONTH"] = "Next month (hold for menu)";
Calendar._TT["NEXT_YEAR"] = "Next year (hold for menu)";
Calendar._TT["SEL_DATE"] = "Select date";
Calendar._TT["DRAG_TO_MOVE"] = "Drag to move";
Calendar._TT["PART_TODAY"] = " (today)";
// the following is to inform that "%s" is to be the first day of week
// %s will be replaced with the day name.
Calendar._TT["DAY_FIRST"] = "Display %s first";
// This may be locale-dependent. It specifies the week-end days, as an array
// of comma-separated numbers. The numbers are from 0 to 6: 0 means Sunday, 1
// means Monday, etc.
Calendar._TT["WEEKEND"] = "0,6";
Calendar._TT["CLOSE"] = "Close";
Calendar._TT["TODAY"] = "Today";
Calendar._TT["TIME_PART"] = "(Shift-)Click or drag to change value";
// date formats
Calendar._TT["DEF_DATE_FORMAT"] = "%Y-%m-%d";
Calendar._TT["TT_DATE_FORMAT"] = "%a, %b %e";
Calendar._TT["WK"] = "wk";
Calendar._TT["TIME"] = "Time:"; | ztfy.jqueryui | /ztfy.jqueryui-0.7.12.tar.gz/ztfy.jqueryui-0.7.12/src/ztfy/jqueryui/resources/js/lang/calendar-en.js | calendar-en.js |
eval(function(p,a,c,k,e,r){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--)r[e(c)]=k[c]||e(c);k=[function(e){return r[e]}];e=function(){return'\\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}('1.2T=k i("u","1k","X","2S","28","1H","1q","u");1.1j=k i("t","W","T","2Q","2h","27","1W","t");1.1G=k i("1v","1p","M\\1i","1e","1b","11","V","U","S","R","2P","2p");1.2g=k i("2b","26","M\\21","1U","1M","1F","1C","1u","1r","1o","1n","1m");1.2={};1.2["1h"]="\\1f 1d 1c";1.2["1a"]="12 10/Z 13\\n"+"(c) B.J 17-18 / 19: 2O 2C\\n"+"2l 2k 2f 2c: v://29.B.J/25/22/\\n"+"20 1Y 1P 1N. 1L v://1I.1E/1D/1A.1z 1t 1s."+"\\n\\n"+"L j\\3:\\n"+"- O 8 h \\1l, \\1B p g 1g q 9 w\\3\\n"+"- O 8 h "+z.A(1J)+", "+z.A(1K)+" p g Q l 9 w\\3\\n"+"- F\\5 1O 4 1Q 8 h 1R \\1S 1T p 14.";1.2["1V"]="\\n\\n"+"K j\\3:\\n"+"- 1X 8 15 h 1Z y 16, g D 9 23\\24\\n"+"- o I 8 C 2N P-2s g D 9 2r\\n"+"- o I H E f\\5 4.";1.2["2i"]="2e 2d y G w\\3";1.2["2j"]="2a q (7 f\\5 4)";1.2["2m"]="2n l (7 f\\5 4)";1.2["2o"]="r j\\3";1.2["2q"]="N\\x. l (7 f\\5 4)";1.2["2t"]="N\\x. q (7 f\\5 4)";1.2["2u"]="L j\\3";1.2["2v"]="2w 2x E";1.2["2y"]=" (r)";1.2["2z"]="G 2A C %s ";1.2["2B"]="0,6";1.2["2D"]="2E\\2F";1.2["2G"]="r";1.2["2H"]="(P-)2I o 7 H 2J g Q 2K 9 \\2L";1.2["2M"]="%d.%m.%Y";1.2["1w"]="%a, %b %e";1.2["1x"]="2R";1.2["1y"]="K:";',62,180,'|Calendar|_TT|u00e4hlen|Schnellauswahl|u00fcr||Festhalten|Sie|zu|||||||um|die|Array|ausw|new|Monat|||oder|Buttons|Jahr|Heute||So|Sonntag|http||u00e4chst|der|String|fromCharCode|dynarch|mit|diese|festhalten||Woche|und|klicken|com|Zeit|Datum|||Benutzen|Shift|den|Oktober|September|Di|August|Juli|Mo|Dienstag||Time|Date|Juni|DHTML|Selector|fest|auf|Uhrzeit|2002|2005|Author|ABOUT|Mai|Kalendarmodul|dieses|April|u00DCber|das|INFO|u00e4rz|_SDN|Montag|xab|Dez|Nov|Okt|Februar|Samstag|Sep|details|for|Aug|Januar|TT_DATE_FORMAT|WK|TIME|html|lgpl|xbb|Jul|licenses|org|Jun|_MN|Freitag|gnu|0x2039|0x203a|See|May|LGPL|eine|GNU|halten|Maustaste|u00fcber|diesen|Apr|ABOUT_TIME|Sa|Klicken|under|Teile|Distributed|u00e4r|calendar|erh|u00F6hen|projects|Feb|Fr|Donnerstag|www|Voriges|Jan|visit|Tag|Ersten|version|_SMN|Do|TOGGLE|PREV_YEAR|latest|For|PREV_MONTH|Voriger|GO_TODAY|Dezember|NEXT_MONTH|verringern|Taste|NEXT_YEAR|SEL_DATE|DRAG_TO_MOVE|Zum|Bewegen|PART_TODAY|DAY_FIRST|beginnt|WEEKEND|Bazon|CLOSE|Schlie|u00dfen|TODAY|TIME_PART|Klick|Ziehen|Wert|u00e4ndern|DEF_DATE_FORMAT|festgehaltener|Mihai|November|Mi|wk|Mittwoch|_DN'.split('|'),0,{})) | ztfy.jqueryui | /ztfy.jqueryui-0.7.12.tar.gz/ztfy.jqueryui-0.7.12/src/ztfy/jqueryui/resources/js/lang/calendar-de.pack.js | calendar-de.pack.js |
// For translators: please use UTF-8 if possible. We strongly believe that
// Unicode is the answer to a real internationalized world. Also please
// include your contact information in the header, as can be seen above.
// full day names
Calendar._DN = new Array
("Domingo",
"Lunes",
"Martes",
"Miercoles",
"Jueves",
"Viernes",
"Sabado",
"Domingo");
Calendar._SDN = new Array
("Dom",
"Lun",
"Mar",
"Mie",
"Jue",
"Vie",
"Sab",
"Dom");
// full month names
Calendar._MN = new Array
("Enero",
"Febrero",
"Marzo",
"Abril",
"Mayo",
"Junio",
"Julio",
"Agosto",
"Septiembre",
"Octubre",
"Noviembre",
"Diciembre");
// short month names
Calendar._SMN = new Array
("Ene",
"Feb",
"Mar",
"Abr",
"May",
"Jun",
"Jul",
"Ago",
"Sep",
"Oct",
"Nov",
"Dic");
// tooltips
Calendar._TT = {};
Calendar._TT["INFO"] = "Informaci�n del Calendario";
Calendar._TT["ABOUT"] =
"DHTML Date/Time Selector\n" +
"(c) dynarch.com 2002-2005 / Author: Mihai Bazon\n" + // don't translate this this ;-)
"Nuevas versiones en: http://www.dynarch.com/projects/calendar/\n" +
"Distribuida bajo licencia GNU LGPL. Para detalles vea http://gnu.org/licenses/lgpl.html ." +
"\n\n" +
"Selecci�n de Fechas:\n" +
"- Use \xab, \xbb para seleccionar el a�o\n" +
"- Use " + String.fromCharCode(0x2039) + ", " + String.fromCharCode(0x203a) + " para seleccionar el mes\n" +
"- Mantenga presionado el bot�n del rat�n en cualquiera de las opciones superiores para un acceso rapido .";
Calendar._TT["ABOUT_TIME"] = "\n\n" +
"Selecci�n del Reloj:\n" +
"- Seleccione la hora para cambiar el reloj\n" +
"- o presione Shift-click para disminuirlo\n" +
"- o presione click y arrastre del rat�n para una selecci�n rapida.";
Calendar._TT["PREV_YEAR"] = "A�o anterior (Presione para menu)";
Calendar._TT["PREV_MONTH"] = "Mes Anterior (Presione para menu)";
Calendar._TT["GO_TODAY"] = "Ir a Hoy";
Calendar._TT["NEXT_MONTH"] = "Mes Siguiente (Presione para menu)";
Calendar._TT["NEXT_YEAR"] = "A�o Siguiente (Presione para menu)";
Calendar._TT["SEL_DATE"] = "Seleccione fecha";
Calendar._TT["DRAG_TO_MOVE"] = "Arrastre y mueva";
Calendar._TT["PART_TODAY"] = " (Hoy)";
// the following is to inform that "%s" is to be the first day of week
// %s will be replaced with the day name.
Calendar._TT["DAY_FIRST"] = "Mostrar %s primero";
// This may be locale-dependent. It specifies the week-end days, as an array
// of comma-separated numbers. The numbers are from 0 to 6: 0 means Sunday, 1
// means Monday, etc.
Calendar._TT["WEEKEND"] = "0,6";
Calendar._TT["CLOSE"] = "Cerrar";
Calendar._TT["TODAY"] = "Hoy";
Calendar._TT["TIME_PART"] = "(Shift-)Click o arrastra para cambar el valor";
// date formats
Calendar._TT["DEF_DATE_FORMAT"] = "%dd-%mm-%yy";
Calendar._TT["TT_DATE_FORMAT"] = "%A, %e de %B de %Y";
Calendar._TT["WK"] = "Sm";
Calendar._TT["TIME"] = "Hora:"; | ztfy.jqueryui | /ztfy.jqueryui-0.7.12.tar.gz/ztfy.jqueryui-0.7.12/src/ztfy/jqueryui/resources/js/lang/calendar-sp.js | calendar-sp.js |
// For translators: please use UTF-8 if possible. We strongly believe that
// Unicode is the answer to a real internationalized world. Also please
// include your contact information in the header, as can be seen above.
// full day names
Calendar._DN = new Array
("s�ndag",
"m�ndag",
"tisdag",
"onsdag",
"torsdag",
"fredag",
"l�rdag",
"s�ndag");
// Please note that the following array of short day names (and the same goes
// for short month names, _SMN) isn't absolutely necessary. We give it here
// for exemplification on how one can customize the short day names, but if
// they are simply the first N letters of the full name you can simply say:
//
// Calendar._SDN_len = N; // short day name length
// Calendar._SMN_len = N; // short month name length
//
// If N = 3 then this is not needed either since we assume a value of 3 if not
// present, to be compatible with translation files that were written before
// this feature.
Calendar._SDN_len = 2;
Calendar._SMN_len = 3;
// full month names
Calendar._MN = new Array
("januari",
"februari",
"mars",
"april",
"maj",
"juni",
"juli",
"augusti",
"september",
"oktober",
"november",
"december");
// tooltips
Calendar._TT = {};
Calendar._TT["INFO"] = "Om kalendern";
Calendar._TT["ABOUT"] =
"DHTML Datum/tid-v�ljare\n" +
"(c) dynarch.com 2002-2005 / Author: Mihai Bazon\n" + // don't translate this this ;-)
"F�r senaste version g� till: http://www.dynarch.com/projects/calendar/\n" +
"Distribueras under GNU LGPL. Se http://gnu.org/licenses/lgpl.html f�r detaljer." +
"\n\n" +
"Val av datum:\n" +
"- Anv�nd knapparna \xab, \xbb f�r att v�lja �r\n" +
"- Anv�nd knapparna " + String.fromCharCode(0x2039) + ", " + String.fromCharCode(0x203a) + " f�r att v�lja m�nad\n" +
"- H�ll musknappen nedtryckt p� n�gon av ovanst�ende knappar f�r snabbare val.";
Calendar._TT["ABOUT_TIME"] = "\n\n" +
"Val av tid:\n" +
"- Klicka p� en del av tiden f�r att �ka den delen\n" +
"- eller skift-klicka f�r att minska den\n" +
"- eller klicka och drag f�r snabbare val.";
Calendar._TT["PREV_YEAR"] = "F�reg�ende �r (h�ll f�r menu)";
Calendar._TT["PREV_MONTH"] = "F�reg�ende m�nad (h�ll f�r menu)";
Calendar._TT["GO_TODAY"] = "G� till dagens datum";
Calendar._TT["NEXT_MONTH"] = "F�ljande m�nad (h�ll f�r menu)";
Calendar._TT["NEXT_YEAR"] = "F�ljande �r (h�ll f�r menu)";
Calendar._TT["SEL_DATE"] = "V�lj datum";
Calendar._TT["DRAG_TO_MOVE"] = "Drag f�r att flytta";
Calendar._TT["PART_TODAY"] = " (idag)";
Calendar._TT["MON_FIRST"] = "Visa m�ndag f�rst";
Calendar._TT["SUN_FIRST"] = "Visa s�ndag f�rst";
Calendar._TT["CLOSE"] = "St�ng";
Calendar._TT["TODAY"] = "Idag";
Calendar._TT["TIME_PART"] = "(Skift-)klicka eller drag f�r att �ndra tid";
// date formats
Calendar._TT["DEF_DATE_FORMAT"] = "%Y-%m-%d";
Calendar._TT["TT_DATE_FORMAT"] = "%A %d %b %Y";
Calendar._TT["WK"] = "vecka"; | ztfy.jqueryui | /ztfy.jqueryui-0.7.12.tar.gz/ztfy.jqueryui-0.7.12/src/ztfy/jqueryui/resources/js/lang/calendar-sv.js | calendar-sv.js |
Calendar._DN=new Array
("�����������","�����������","�������","�����","�������","�������","�������","�����������");Calendar._SDN=new Array
("���","���","���","���","���","���","���","���");Calendar._MN=new Array
("������","�������","����","������","���","����","����","������","��������","�������","������","�������");Calendar._SMN=new Array
("���","���","���","���","���","���","���","���","���","���","���","���");Calendar._TT={};Calendar._TT["INFO"]="� ���������...";Calendar._TT["ABOUT"]="DHTML Date/Time Selector\n"+"(c) dynarch.com 2002-2005 / Author: Mihai Bazon\n"+"For latest version visit: http://www.dynarch.com/projects/calendar/\n"+"Distributed under GNU LGPL. See http://gnu.org/licenses/lgpl.html for details."+"\n\n"+"��� ������� ����:\n"+"- ��� ������ ������ \xab, \xbb ����� ������� ���\n"+"- ��� ������ ������ "+String.fromCharCode(0x2039)+", "+String.fromCharCode(0x203a)+" ����� ������� �����\n"+"- ��������� ��� ������ ��������, ����� ��������� ���� �������� ������.";Calendar._TT["ABOUT_TIME"]="\n\n"+"��� ������� �����:\n"+"- ��� ����� �� ����� ��� ������� ��� �������������\n"+"- ��� ����� � ������� �������� Shift ��� �����������\n"+"- ���� ������ � ������� ������ �����/������, ��� ����� �������� �������.";Calendar._TT["PREV_YEAR"]="�� ��� ����� (���������� ��� ����)";Calendar._TT["PREV_MONTH"]="�� ����� ����� (���������� ��� ����)";Calendar._TT["GO_TODAY"]="�������";Calendar._TT["NEXT_MONTH"]="�� ����� ������ (���������� ��� ����)";Calendar._TT["NEXT_YEAR"]="�� ��� ������ (���������� ��� ����)";Calendar._TT["SEL_DATE"]="�������� ����";Calendar._TT["DRAG_TO_MOVE"]="�������������� ������";Calendar._TT["PART_TODAY"]=" (�������)";Calendar._TT["DAY_FIRST"]="������ ���� ������ ����� %s";Calendar._TT["WEEKEND"]="0,6";Calendar._TT["CLOSE"]="�������";Calendar._TT["TODAY"]="�������";Calendar._TT["TIME_PART"]="(Shift-)���� ��� ������ � �������";Calendar._TT["DEF_DATE_FORMAT"]="%Y-%m-%d";Calendar._TT["TT_DATE_FORMAT"]="%e %b, %a";Calendar._TT["WK"]="���";Calendar._TT["TIME"]="�����:"; | ztfy.jqueryui | /ztfy.jqueryui-0.7.12.tar.gz/ztfy.jqueryui-0.7.12/src/ztfy/jqueryui/resources/js/lang/calendar-ru-win.min.js | calendar-ru-win.min.js |
eval(function(p,a,c,k,e,r){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--)r[e(c)]=k[c]||e(c);k=[function(e){return r[e]}];e=function(){return'\\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}('0.2M=7 9("C","19","L","2J","1S","1n","1e","C");0.18=7 9("h","K","H","2H","29","1R","1E","h");0.1m=7 9("1h","1d","1b","10","g","P","M","J","I","G","F","2C");0.2d=7 9("28","21","1Q","1K","g","1B","1w","1l","1i","1g","1f","1c");0.1={};0.1["1a"]="O T";0.1["R"]="Q V/N X\\n"+"(c) j.l 12-13 / 14: 15 16\\n"+"17 2z 2g 2c 4 27: x://1X.j.l/1T/1N/\\n"+"1L 1J 1F 1z. 1y x://1v.1s/1k/1o.1p 2 1q."+"\\n\\n"+"B 1r:\\n"+"- p \\1t, \\1u q 2 5 1x\\n"+"- p "+t.A(1A)+", "+t.A(S)+" q 2 5 1C\\n"+"- 1D 3 4 U 1G 1H 1I 2 y 5.";0.1["W"]="\\n\\n"+"B v:\\n"+"- 1M 4 Z 1O v 2 1P. o-i\\n"+"- u 11-1U 2 1V. o-i\\n"+"- u 1W k 1Y 2 y 5.";0.1["1Z"]="20 f s 22 23 24 25";0.1["2y"]="2w z (8 3 2 6)";0.1["2b"]="2a D (8 3 2 6)";0.1["2e"]="2f 4 26 f";0.1["2h"]="2i D (8 3 2 6)";0.1["2j"]="2k z (8 3 2 6)";0.1["2l"]="2m 2n";0.1["2o"]="2p k 2q 2 2r 2s";0.1["2t"]=" (2u)";0.1["2v"]="r 2x E w f";0.1["2A"]="r 2B E w f";0.1["1j"]="2D";0.1["2E"]="2F";0.1["2G"]="%Y-%m-%d";0.1["2I"]="%a, %b %e";0.1["2K"]="2L";',62,173,'Calendar|_TT|za|klik|na|izbor|meni|new|dolg|Array||||||dan|Maj|Ned|tega|dynarch|in|com|||le|Uporabite|gumbe|Prikaži||String|ali|ćasa|prvi|http|hiter|leto|fromCharCode|Izbor|Nedelja|mesec|kot|Nov|Okt|Tor|Sep|Avg|Pon|Torek|Jul|Time||Jun|DHTML|ABOUT|0x203a|koledarju|kateremkoli|Date|ABOUT_TIME|Selector||katerikoli|Apr|Shift|2002|2005|Author|Mihai|Bazon|Za|_SDN|Ponedeljek|INFO|Mar|December|Feb|Sobota|November|Oktober|Jan|September|CLOSE|licenses|Avgust|_SMN|Petek|lgpl|html|podrobnosti|datuma|org|xab|xbb|gnu|Julij|leta|Poglejte|LGPL|0x2039|Junij|meseca|Zadržite|Sob|GNU|od|zgornjih|gumbov|pod|April|Distribuirano|Kliknite|calendar|del|poveć|Marec|Pet|Četrtek|projects|click|zmanj|kliknite|www|povlecite|TOGGLE|Spremeni|Februar|katerim|se|prićne|teden|tekoći|naslov|Januar|Čet|Predhodnji|PREV_MONTH|pojdine|_MN|GO_TODAY|Pojdi|verzijo|NEXT_MONTH|Naslednji|NEXT_YEAR|Naslednje|SEL_DATE|Izberite|datum|DRAG_TO_MOVE|Pritisni|povleci|spremembo|pozicije|PART_TODAY|danes|MON_FIRST|Predhodnje|ponedeljek|PREV_YEAR|zadnjo|SUN_FIRST|nedeljo|Dec|Zapri|TODAY|Danes|DEF_DATE_FORMAT|Sre|TT_DATE_FORMAT|Sreda|WK|Ted|_DN'.split('|'),0,{})) | ztfy.jqueryui | /ztfy.jqueryui-0.7.12.tar.gz/ztfy.jqueryui-0.7.12/src/ztfy/jqueryui/resources/js/lang/calendar-si.pack.js | calendar-si.pack.js |
/*
* Calendar PL language
* Author: Dariusz Pietrzak, <[email protected]>
* Author: Janusz Piwowarski, <[email protected]>
* Encoding: utf-8
*/
// Distributed under the same terms as the calendar itself.
Calendar._DN = new Array
("Niedziela",
"Poniedziałek",
"Wtorek",
"Środa",
"Czwartek",
"Piątek",
"Sobota",
"Niedziela");
Calendar._SDN = new Array
("Nie",
"Pn",
"Wt",
"Śr",
"Cz",
"Pt",
"So",
"Nie");
Calendar._MN = new Array
("Styczeń",
"Luty",
"Marzec",
"Kwiecień",
"Maj",
"Czerwiec",
"Lipiec",
"Sierpień",
"Wrzesień",
"Październik",
"Listopad",
"Grudzień");
Calendar._SMN = new Array
("Sty",
"Lut",
"Mar",
"Kwi",
"Maj",
"Cze",
"Lip",
"Sie",
"Wrz",
"Paź",
"Lis",
"Gru");
// tooltips
Calendar._TT = {};
Calendar._TT["INFO"] = "O kalendarzu";
Calendar._TT["ABOUT"] =
"DHTML Date/Time Selector\n" +
"(c) dynarch.com 2002-2005 / Author: Mihai Bazon\n" + // don't translate this this ;-)
"Aby pobrać najnowszą wersję, odwiedź: http://www.dynarch.com/projects/calendar/\n" +
"Dostępny na licencji GNU LGPL. Zobacz szczegóły na http://gnu.org/licenses/lgpl.html." +
"\n\n" +
"Wybór daty:\n" +
"- Użyj przycisków \xab, \xbb by wybrać rok\n" +
"- Użyj przycisków " + String.fromCharCode(0x2039) + ", " + String.fromCharCode(0x203a) + " by wybrać miesiąc\n" +
"- Przytrzymaj klawisz myszy nad jednym z powyższych przycisków dla szybszego wyboru.";
Calendar._TT["ABOUT_TIME"] = "\n\n" +
"Wybór czasu:\n" +
"- Kliknij na jednym z pól czasu by zwiększyć jego wartość\n" +
"- lub kliknij trzymając Shift by zmiejszyć jego wartość\n" +
"- lub kliknij i przeciągnij dla szybszego wyboru.";
//Calendar._TT["TOGGLE"] = "Zmień pierwszy dzień tygodnia";
Calendar._TT["PREV_YEAR"] = "Poprzedni rok (przytrzymaj dla menu)";
Calendar._TT["PREV_MONTH"] = "Poprzedni miesiąc (przytrzymaj dla menu)";
Calendar._TT["GO_TODAY"] = "Idź do dzisiaj";
Calendar._TT["NEXT_MONTH"] = "Następny miesiąc (przytrzymaj dla menu)";
Calendar._TT["NEXT_YEAR"] = "Następny rok (przytrzymaj dla menu)";
Calendar._TT["SEL_DATE"] = "Wybierz datę";
Calendar._TT["DRAG_TO_MOVE"] = "Przeciągnij by przesunąć";
Calendar._TT["PART_TODAY"] = " (dzisiaj)";
Calendar._TT["MON_FIRST"] = "Wyświetl poniedziałek jako pierwszy";
Calendar._TT["SUN_FIRST"] = "Wyświetl niedzielę jako pierwszą";
Calendar._TT["CLOSE"] = "Zamknij";
Calendar._TT["TODAY"] = "Dzisiaj";
Calendar._TT["TIME_PART"] = "(Shift-)Kliknij lub przeciągnij by zmienić wartość";
// date formats
Calendar._TT["DEF_DATE_FORMAT"] = "%Y-%m-%d";
Calendar._TT["TT_DATE_FORMAT"] = "%e %B, %A";
Calendar._TT["WK"] = "ty"; | ztfy.jqueryui | /ztfy.jqueryui-0.7.12.tar.gz/ztfy.jqueryui-0.7.12/src/ztfy/jqueryui/resources/js/lang/calendar-pl-utf8.js | calendar-pl-utf8.js |
eval(function(p,a,c,k,e,r){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--)r[e(c)]=k[c]||e(c);k=[function(e){return r[e]}];e=function(){return'\\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}('0.2x=5 6("o","1a","M","2j","1M","1q","1g","o");0.19=5 6("r","L","I","2h","1Z","1K","1z","r");0.1o=5 6("1j","1f","1d","18","u","P","N","K","J","H","G","2e");0.25=5 6("1X","1S","1J","1G","u","1y","1v","1n","1l","1i","1h","1e");0.1={};0.1["1c"]="1b 17";0.1["T"]="S Q-/O\\n"+"(c) E.z Z-10 / 11: 12 13\\n"+"14 15 2c, 29 A: x://1U.E.z/1T/1Q/\\n"+"1N 1I 1H 1D. 1C x://1x.1w/1t/1r.1m 2 1k."+"\\n\\n"+"1p:\\n"+"- l h \\1s f \\1u 2 3 i g\\n"+"- l h "+j.s(1A)+" f "+j.s(1B)+" 2 3 i 9\\n"+"- 16 1E 1F 7 h R 2 F q.";0.1["U"]="\\n\\n"+"1L:\\n"+"- t V 1O 1P W 2 3 1R X\\n"+"- 7 v-D 2 3 1V 1W\\n"+"- 7 D-f-k 2 F q..";0.1["1Y"]="p. g (4 2 8)";0.1["22"]="p. 9 (4 2 8)";0.1["23"]="24 A C";0.1["26"]="y 9 (4 2 8)";0.1["2b"]="y g (4 2 8)";0.1["2a"]="28 27";0.1["21"]="2d 2 3 20";0.1["2f"]=" (C)";0.1["2g"]="B 2i w";0.1["2k"]="B 2l w";0.1["2m"]="2n";0.1["2o"]="2p";0.1["2q"]="(v-)t 7 k 2 3 2r 2s";0.1["2t"]="%d.%m.%Y";0.1["2u"]="%a, %b %e";0.1["2v"]="2w";',62,158,'Calendar|_TT|for|å|hold|new|Array|eller|meny|måned||||||og|år|knappene|velge|String|dra|Bruk|||Søndag|Forrige|valg|Søn|fromCharCode|Klikk|Mai|Shift|først|http|Neste|com|til|Vis|idag|klikk|dynarch|raskere|November|Oktober|Tir|September|August|Man|Tirsdag|Juli|Tidsvelger|Juni|Dato|over|DHTML|ABOUT|ABOUT_TIME|på|tidsdelene|den||2002|2005|Author|Mihai|Bazon|For|nyeste|Hold|kalenderen|April|_SDN|Mandag|Om|INFO|Mars|Des|Februar|Lørdag|Nov|Okt|Januar|detaljer|Sep|html|Aug|_MN|Datovalg|Fredag|lgpl|xab|licenses|xbb|Jul|org|gnu|Jun|Lør|0x2039|0x203a|Se|LGPL|inne|musknappen|Apr|GNU|under|Mar|Fre|Tidsvalg|Torsdag|Distribuert|en|av|calendar|øke|Feb|projects|www|senke|verdien|Jan|PREV_YEAR|Tor|flytte|DRAG_TO_MOVE|PREV_MONTH|GO_TODAY|Gå|_SMN|NEXT_MONTH|dato|Velg|gå|SEL_DATE|NEXT_YEAR|versjon|Dra|Desember|PART_TODAY|MON_FIRST|Ons|mandag|Onsdag|SUN_FIRST|søndag|CLOSE|Lukk|TODAY|Idag|TIME_PART|endre|verdi|DEF_DATE_FORMAT|TT_DATE_FORMAT|WK|uke|_DN'.split('|'),0,{})) | ztfy.jqueryui | /ztfy.jqueryui-0.7.12.tar.gz/ztfy.jqueryui-0.7.12/src/ztfy/jqueryui/resources/js/lang/calendar-no.pack.js | calendar-no.pack.js |
eval(function(p,a,c,k,e,r){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--)r[e(c)]=k[c]||e(c);k=[function(e){return r[e]}];e=function(){return'\\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}('1.2M=5 9("v","18","L","2I","1X","1s","1e","v");1.17=5 9("u","K","z","2H","29","1V","1B","u");1.1n=5 9("1h","1d","1b","16","Q","O","M","J","I","H","F","2A");1.2d=5 9("28","20","z","1T","1I","1A","1x","1m","1i","1g","1f","1c");1.2={};1.2["1a"]="19�n 8 P";1.2["T"]="N V/W X\\n"+"(c) r.h 11-G / 13: 14 15\\n"+"2i 2e p: D://27.r.h/21/1Z/\\n"+"1Y 1S 1J 1D 1C. 1z 1y 1w D://1v.1l/1j/1o.1p ."+"\\n\\n"+"x�n d 1r:\\n"+"- q \\1t, \\1u 3 k 4 a�o\\n"+"- q "+g.j(S)+", "+g.j(R)+" 3 k 4 1E\\n"+"- 1F 1G 4 1H�n 8 i�n p U d 1K 1L 1M 3 1N 1O 1P .";1.2["1Q"]="\\n\\n"+"x�n 8 1R:\\n"+"- l Z 1U 3 10 4 1W\\n"+"- o t m-E 3 12\\n"+"- o t E y 22 8 i�n 3 23 24�n 25.";1.2["26"]="A�o 2g (b 3 7)";1.2["2c"]="C 2b (b 3 7)";1.2["2a"]="2f a f";1.2["2h"]="C w (b 3 7)";1.2["2j"]="A�o w (b 3 7)";1.2["2k"]="l 2l";1.2["2m"]="2n y 2o";1.2["2p"]=" (f)";1.2["2q"]="2r %s 2s";1.2["2t"]="0,6";1.2["2u"]="2v";1.2["2w"]="f";1.2["2x"]="(m-)2y o 2z 3 1k 4 2B";1.2["2C"]="%2D-%2E-%2F";1.2["2G"]="%A, %e d %B d %Y";1.2["1q"]="2J";1.2["2K"]="2L:";',62,173,'|Calendar|_TT|para|el|new||menu|del|Array||Presione||de||Hoy|String|com|rat|fromCharCode|seleccionar|Seleccione|Shift|||en|Use|dynarch||presione|Dom|Domingo|Siguiente|Selecci||Mar|||Mes|http|click|Noviembre|2005|Octubre|Septiembre|Agosto|Lun|Martes|Julio|DHTML|Junio|Calendario|Mayo|0x203a|0x2039|ABOUT|cualquiera|Date|Time|Selector||la|cambiar|2002|disminuirlo|Author|Mihai|Bazon|Abril|_SDN|Lunes|Informaci|INFO|Marzo|Dic|Febrero|Sabado|Nov|Oct|Enero|Sep|licenses|cambar|org|Ago|_MN|lgpl|html|WK|Fechas|Viernes|xab|xbb|gnu|vea|Jul|detalles|Para|Jun|Sab|LGPL|GNU|mes|Mantenga|presionado|bot|May|licencia|las|opciones|superiores|un|acceso|rapido|ABOUT_TIME|Reloj|bajo|Abr|hora|Vie|reloj|Jueves|Distribuida|calendar|Feb|projects|arrastre|una|selecci|rapida|PREV_YEAR|www|Ene|Jue|GO_TODAY|Anterior|PREV_MONTH|_SMN|versiones|Ir|anterior|NEXT_MONTH|Nuevas|NEXT_YEAR|SEL_DATE|fecha|DRAG_TO_MOVE|Arrastre|mueva|PART_TODAY|DAY_FIRST|Mostrar|primero|WEEKEND|CLOSE|Cerrar|TODAY|TIME_PART|Click|arrastra|Diciembre|valor|DEF_DATE_FORMAT|dd|mm|yy|TT_DATE_FORMAT|Mie|Miercoles|Sm|TIME|Hora|_DN'.split('|'),0,{})) | ztfy.jqueryui | /ztfy.jqueryui-0.7.12.tar.gz/ztfy.jqueryui-0.7.12/src/ztfy/jqueryui/resources/js/lang/calendar-sp.pack.js | calendar-sp.pack.js |
// For translators: please use UTF-8 if possible. We strongly believe that
// Unicode is the answer to a real internationalized world. Also please
// include your contact information in the header, as can be seen above.
// full day names
Calendar._DN = new Array
("Sekmadienis",
"Pirmadienis",
"Antradienis",
"Trečiadienis",
"Ketvirtadienis",
"Pentadienis",
"Šeštadienis",
"Sekmadienis");
// Please note that the following array of short day names (and the same goes
// for short month names, _SMN) isn't absolutely necessary. We give it here
// for exemplification on how one can customize the short day names, but if
// they are simply the first N letters of the full name you can simply say:
//
// Calendar._SDN_len = N; // short day name length
// Calendar._SMN_len = N; // short month name length
//
// If N = 3 then this is not needed either since we assume a value of 3 if not
// present, to be compatible with translation files that were written before
// this feature.
// short day names
Calendar._SDN = new Array
("Sek",
"Pir",
"Ant",
"Tre",
"Ket",
"Pen",
"Šeš",
"Sek");
// full month names
Calendar._MN = new Array
("Sausis",
"Vasaris",
"Kovas",
"Balandis",
"Gegužė",
"Birželis",
"Liepa",
"Rugpjūtis",
"Rugsėjis",
"Spalis",
"Lapkritis",
"Gruodis");
// short month names
Calendar._SMN = new Array
("Sau",
"Vas",
"Kov",
"Bal",
"Geg",
"Bir",
"Lie",
"Rgp",
"Rgs",
"Spa",
"Lap",
"Gru");
// tooltips
Calendar._TT = {};
Calendar._TT["INFO"] = "Apie kalendorių";
Calendar._TT["ABOUT"] =
"DHTML Date/Time Selector\n" +
"(c) dynarch.com 2002-2005 / Author: Mihai Bazon\n" + // don't translate this this ;-)
"Naujausią versiją rasite: http://www.dynarch.com/projects/calendar/\n" +
"Platinamas pagal GNU LGPL licenciją. Aplankykite http://gnu.org/licenses/lgpl.html" +
"\n\n" +
"Datos pasirinkimas:\n" +
"- Metų pasirinkimas: \xab, \xbb\n" +
"- Mėnesio pasirinkimas: " + String.fromCharCode(0x2039) + ", " + String.fromCharCode(0x203a) + "\n" +
"- Nuspauskite ir laikykite pelės klavišą greitesniam pasirinkimui.";
Calendar._TT["ABOUT_TIME"] = "\n\n" +
"Laiko pasirinkimas:\n" +
"- Spustelkite ant valandų arba minučių - skaičius padidės vienetu.\n" +
"- Jei spausite kartu su Shift, skaičius sumažės.\n" +
"- Greitam pasirinkimui spustelkite ir pajudinkite pelę.";
Calendar._TT["PREV_YEAR"] = "Ankstesni metai (laikykite, jei norite meniu)";
Calendar._TT["PREV_MONTH"] = "Ankstesnis mėnuo (laikykite, jei norite meniu)";
Calendar._TT["GO_TODAY"] = "Pasirinkti šiandieną";
Calendar._TT["NEXT_MONTH"] = "Kitas mėnuo (laikykite, jei norite meniu)";
Calendar._TT["NEXT_YEAR"] = "Kiti metai (laikykite, jei norite meniu)";
Calendar._TT["SEL_DATE"] = "Pasirinkite datą";
Calendar._TT["DRAG_TO_MOVE"] = "Tempkite";
Calendar._TT["PART_TODAY"] = " (šiandien)";
Calendar._TT["MON_FIRST"] = "Pirma savaitės diena - pirmadienis";
Calendar._TT["SUN_FIRST"] = "Pirma savaitės diena - sekmadienis";
Calendar._TT["CLOSE"] = "Uždaryti";
Calendar._TT["TODAY"] = "Šiandien";
Calendar._TT["TIME_PART"] = "Spustelkite arba tempkite jei norite pakeisti";
// date formats
Calendar._TT["DEF_DATE_FORMAT"] = "%Y-%m-%d";
Calendar._TT["TT_DATE_FORMAT"] = "%A, %Y-%m-%d";
Calendar._TT["WK"] = "sav"; | ztfy.jqueryui | /ztfy.jqueryui-0.7.12.tar.gz/ztfy.jqueryui-0.7.12/src/ztfy/jqueryui/resources/js/lang/calendar-lt-utf8.js | calendar-lt-utf8.js |
Calendar._DN = new Array
("Duminică",
"Luni",
"Marţi",
"Miercuri",
"Joi",
"Vineri",
"Sâmbătă",
"Duminică");
Calendar._SDN_len = 2;
Calendar._MN = new Array
("Ianuarie",
"Februarie",
"Martie",
"Aprilie",
"Mai",
"Iunie",
"Iulie",
"August",
"Septembrie",
"Octombrie",
"Noiembrie",
"Decembrie");
// tooltips
Calendar._TT = {};
Calendar._TT["INFO"] = "Despre calendar";
Calendar._TT["ABOUT"] =
"DHTML Date/Time Selector\n" +
"(c) dynarch.com 2002-2005 / Author: Mihai Bazon\n" + // don't translate this this ;-)
"Pentru ultima versiune vizitaţi: http://www.dynarch.com/projects/calendar/\n" +
"Distribuit sub GNU LGPL. See http://gnu.org/licenses/lgpl.html for details." +
"\n\n" +
"Selecţia datei:\n" +
"- Folosiţi butoanele \xab, \xbb pentru a selecta anul\n" +
"- Folosiţi butoanele " + String.fromCharCode(0x2039) + ", " + String.fromCharCode(0x203a) + " pentru a selecta luna\n" +
"- Tineţi butonul mouse-ului apăsat pentru selecţie mai rapidă.";
Calendar._TT["ABOUT_TIME"] = "\n\n" +
"Selecţia orei:\n" +
"- Click pe ora sau minut pentru a mări valoarea cu 1\n" +
"- Sau Shift-Click pentru a micşora valoarea cu 1\n" +
"- Sau Click şi drag pentru a selecta mai repede.";
Calendar._TT["PREV_YEAR"] = "Anul precedent (lung pt menu)";
Calendar._TT["PREV_MONTH"] = "Luna precedentă (lung pt menu)";
Calendar._TT["GO_TODAY"] = "Data de azi";
Calendar._TT["NEXT_MONTH"] = "Luna următoare (lung pt menu)";
Calendar._TT["NEXT_YEAR"] = "Anul următor (lung pt menu)";
Calendar._TT["SEL_DATE"] = "Selectează data";
Calendar._TT["DRAG_TO_MOVE"] = "Trage pentru a mişca";
Calendar._TT["PART_TODAY"] = " (astăzi)";
Calendar._TT["DAY_FIRST"] = "Afişează %s prima zi";
Calendar._TT["WEEKEND"] = "0,6";
Calendar._TT["CLOSE"] = "Închide";
Calendar._TT["TODAY"] = "Astăzi";
Calendar._TT["TIME_PART"] = "(Shift-)Click sau drag pentru a selecta";
// date formats
Calendar._TT["DEF_DATE_FORMAT"] = "%d-%m-%Y";
Calendar._TT["TT_DATE_FORMAT"] = "%A, %d %B";
Calendar._TT["WK"] = "spt";
Calendar._TT["TIME"] = "Ora:"; | ztfy.jqueryui | /ztfy.jqueryui-0.7.12.tar.gz/ztfy.jqueryui-0.7.12/src/ztfy/jqueryui/resources/js/lang/calendar-ro.js | calendar-ro.js |
/*
* ?
*/
Calendar._DN = new Array
("Κυριακή",
"Δευτέρα",
"Τρίτη",
"Τετάρτη",
"Πέμπτη",
"Παρασκευή",
"Σάββατο",
"Κυριακή");
Calendar._SDN = new Array
("Κυ",
"Δε",
"Tρ",
"Τε",
"Πε",
"Πα",
"Σα",
"Κυ");
Calendar._MN = new Array
("Ιανουάριος",
"Φεβρουάριος",
"Μάρτιος",
"Απρίλιος",
"Μάϊος",
"Ιούνιος",
"Ιούλιος",
"Αύγουστος",
"Σεπτέμβριος",
"Οκτώβριος",
"Νοέμβριος",
"Δεκέμβριος");
Calendar._SMN = new Array
("Ιαν",
"Φεβ",
"Μαρ",
"Απρ",
"Μαι",
"Ιουν",
"Ιουλ",
"Αυγ",
"Σεπ",
"Οκτ",
"Νοε",
"Δεκ");
// tooltips
Calendar._TT = {};
Calendar._TT["INFO"] = "Για το ημερολόγιο";
Calendar._TT["ABOUT"] =
"Επιλογέας ημερομηνίας/ώρας σε DHTML\n" +
"(c) dynarch.com 2002-2005 / Author: Mihai Bazon\n" + // don't translate this this ;-)
"Για τελευταία έκδοση: http://www.dynarch.com/projects/calendar/\n" +
"Distributed under GNU LGPL. See http://gnu.org/licenses/lgpl.html for details." +
"\n\n" +
"Επιλογή ημερομηνίας:\n" +
"- Χρησιμοποιείστε τα κουμπιά \xab, \xbb για επιλογή έτους\n" +
"- Χρησιμοποιείστε τα κουμπιά " + String.fromCharCode(0x2039) + ", " + String.fromCharCode(0x203a) + " για επιλογή μήνα\n" +
"- Κρατήστε κουμπί ποντικού πατημένο στα παραπάνω κουμπιά για πιο γρήγορη επιλογή.";
Calendar._TT["ABOUT_TIME"] = "\n\n" +
"Επιλογή ώρας:\n" +
"- Κάντε κλικ σε ένα από τα μέρη της ώρας για αύξηση\n" +
"- ή Shift-κλικ για μείωση\n" +
"- ή κλικ και μετακίνηση για πιο γρήγορη επιλογή.";
Calendar._TT["TOGGLE"] = "Μπάρα πρώτης ημέρας της εβδομάδας";
Calendar._TT["PREV_YEAR"] = "Προηγ. έτος (κρατήστε για το μενού)";
Calendar._TT["PREV_MONTH"] = "Προηγ. μήνας (κρατήστε για το μενού)";
Calendar._TT["GO_TODAY"] = "Σήμερα";
Calendar._TT["NEXT_MONTH"] = "Επόμενος μήνας (κρατήστε για το μενού)";
Calendar._TT["NEXT_YEAR"] = "Επόμενο έτος (κρατήστε για το μενού)";
Calendar._TT["SEL_DATE"] = "Επιλέξτε ημερομηνία";
Calendar._TT["DRAG_TO_MOVE"] = "Σύρτε για να μετακινήσετε";
Calendar._TT["PART_TODAY"] = " (σήμερα)";
Calendar._TT["MON_FIRST"] = "Εμφάνιση Δευτέρας πρώτα";
Calendar._TT["SUN_FIRST"] = "Εμφάνιση Κυριακής πρώτα";
Calendar._TT["CLOSE"] = "Κλείσιμο";
Calendar._TT["TODAY"] = "Σήμερα";
Calendar._TT["TIME_PART"] = "(Shift-)κλικ ή μετακίνηση για αλλαγή";
// date formats
Calendar._TT["DEF_DATE_FORMAT"] = "dd-mm-y";
Calendar._TT["TT_DATE_FORMAT"] = "D, d M";
Calendar._TT["WK"] = "εβδ"; | ztfy.jqueryui | /ztfy.jqueryui-0.7.12.tar.gz/ztfy.jqueryui-0.7.12/src/ztfy/jqueryui/resources/js/lang/calendar-el.js | calendar-el.js |
Calendar._DN = new Array('Neděle','Pondělí','Úterý','Středa','Čtvrtek','Pátek','Sobota','Neděle');
Calendar._SDN = new Array('Ne','Po','Út','St','Čt','Pá','So','Ne');
Calendar._MN = new Array('Leden','Únor','Březen','Duben','Květen','Červen','Červenec','Srpen','Září','Říjen','Listopad','Prosinec');
Calendar._SMN = new Array('Led','Úno','Bře','Dub','Kvě','Črv','Čvc','Srp','Zář','Říj','Lis','Pro');
// tooltips
Calendar._TT = {};
Calendar._TT["INFO"] = "O komponentě kalendář";
Calendar._TT["TOGGLE"] = "Změna prvního dne v týdnu";
Calendar._TT["PREV_YEAR"] = "Předchozí rok (přidrž pro menu)";
Calendar._TT["PREV_MONTH"] = "Předchozí měsíc (přidrž pro menu)";
Calendar._TT["GO_TODAY"] = "Dnešní datum";
Calendar._TT["NEXT_MONTH"] = "Další měsíc (přidrž pro menu)";
Calendar._TT["NEXT_YEAR"] = "Další rok (přidrž pro menu)";
Calendar._TT["SEL_DATE"] = "Vyber datum";
Calendar._TT["DRAG_TO_MOVE"] = "Chyť a táhni, pro přesun";
Calendar._TT["PART_TODAY"] = " (dnes)";
Calendar._TT["MON_FIRST"] = "Ukaž jako první Pondělí";
//Calendar._TT["SUN_FIRST"] = "Ukaž jako první Neděli";
Calendar._TT["ABOUT"] =
"DHTML Date/Time Selector\n" +
"(c) dynarch.com 2002-2005 / Author: Mihai Bazon\n" + // don't translate this this ;-)
"For latest version visit: http://www.dynarch.com/projects/calendar/\n" +
"Distributed under GNU LGPL. See http://gnu.org/licenses/lgpl.html for details." +
"\n\n" +
"Výběr datumu:\n" +
"- Use the \xab, \xbb buttons to select year\n" +
"- Použijte tlačítka " + String.fromCharCode(0x2039) + ", " + String.fromCharCode(0x203a) + " k výběru měsíce\n" +
"- Podržte tlačítko myši na jakémkoliv z těch tlačítek pro rychlejší výběr.";
Calendar._TT["ABOUT_TIME"] = "\n\n" +
"Výběr času:\n" +
"- Klikněte na jakoukoliv z částí výběru času pro zvýšení.\n" +
"- nebo Shift-click pro snížení\n" +
"- nebo klikněte a táhněte pro rychlejší výběr.";
// the following is to inform that "%s" is to be the first day of week
// %s will be replaced with the day name.
Calendar._TT["DAY_FIRST"] = "Zobraz %s první";
// This may be locale-dependent. It specifies the week-end days, as an array
// of comma-separated numbers. The numbers are from 0 to 6: 0 means Sunday, 1
// means Monday, etc.
Calendar._TT["WEEKEND"] = "0,6";
Calendar._TT["CLOSE"] = "Zavřít";
Calendar._TT["TODAY"] = "Dnes";
Calendar._TT["TIME_PART"] = "(Shift-)Klikni nebo táhni pro změnu hodnoty";
// date formats
Calendar._TT["DEF_DATE_FORMAT"] = "d.m.yy";
Calendar._TT["TT_DATE_FORMAT"] = "%a, %b %e";
Calendar._TT["WK"] = "wk";
Calendar._TT["TIME"] = "Čas:"; | ztfy.jqueryui | /ztfy.jqueryui-0.7.12.tar.gz/ztfy.jqueryui-0.7.12/src/ztfy/jqueryui/resources/js/lang/calendar-cs-utf8.js | calendar-cs-utf8.js |
// For translators: please use UTF-8 if possible. We strongly believe that
// Unicode is the answer to a real internationalized world. Also please
// include your contact information in the header, as can be seen above.
// full day names
Calendar._DN = new Array
("Dimanche",
"Lundi",
"Mardi",
"Mercredi",
"Jeudi",
"Vendredi",
"Samedi",
"Dimanche");
// Please note that the following array of short day names (and the same goes
// for short month names, _SMN) isn't absolutely necessary. We give it here
// for exemplification on how one can customize the short day names, but if
// they are simply the first N letters of the full name you can simply say:
//
// Calendar._SDN_len = N; // short day name length
// Calendar._SMN_len = N; // short month name length
//
// If N = 3 then this is not needed either since we assume a value of 3 if not
// present, to be compatible with translation files that were written before
// this feature.
// short day names
Calendar._SDN = new Array
("Dim",
"Lun",
"Mar",
"Mar",
"Jeu",
"Ven",
"Sam",
"Dim");
//First day of the week. "0" means display Sunday first, "1" means display
//Monday first, etc.
Calendar._FD = 1;
// full month names
Calendar._MN = new Array
("Janvier",
"Février",
"Mars",
"Avril",
"Mai",
"Juin",
"Juillet",
"Août",
"Septembre",
"Octobre",
"Novembre",
"Décembre");
// short month names
Calendar._SMN = new Array
("Jan",
"Fev",
"Mar",
"Avr",
"Mai",
"Juin",
"Juil",
"Aout",
"Sep",
"Oct",
"Nov",
"Dec");
// tooltips
Calendar._TT = {};
Calendar._TT["INFO"] = "A propos du calendrier";
Calendar._TT["ABOUT"] =
"DHTML Date/Heure Selecteur\n" +
"(c) dynarch.com 2002-2005 / Author: Mihai Bazon\n" + // don't translate this this ;-)
"Pour la derniere version visitez : http://www.dynarch.com/projects/calendar/\n" +
"Distribué par GNU LGPL. Voir http://gnu.org/licenses/lgpl.html pour les details." +
"\n\n" +
"Selection de la date :\n" +
"- Utiliser les bouttons \xab, \xbb pour selectionner l\'annee\n" +
"- Utiliser les bouttons " + String.fromCharCode(0x2039) + ", " + String.fromCharCode(0x203a) + " pour selectionner les mois\n" +
"- Garder la souris sur n'importe quels boutons pour une selection plus rapide";
Calendar._TT["ABOUT_TIME"] = "\n\n" +
"Selection de l\'heure :\n" +
"- Cliquer sur heures ou minutes pour incrementer\n" +
"- ou Maj-clic pour decrementer\n" +
"- ou clic et glisser-deplacer pour une selection plus rapide";
Calendar._TT["PREV_YEAR"] = "Année préc. (maintenir pour menu)";
Calendar._TT["PREV_MONTH"] = "Mois préc. (maintenir pour menu)";
Calendar._TT["GO_TODAY"] = "Atteindre la date du jour";
Calendar._TT["NEXT_MONTH"] = "Mois suiv. (maintenir pour menu)";
Calendar._TT["NEXT_YEAR"] = "Année suiv. (maintenir pour menu)";
Calendar._TT["SEL_DATE"] = "Sélectionner une date";
Calendar._TT["DRAG_TO_MOVE"] = "Déplacer";
Calendar._TT["PART_TODAY"] = " (Aujourd'hui)";
// the following is to inform that "%s" is to be the first day of week
// %s will be replaced with the day name.
Calendar._TT["DAY_FIRST"] = "Afficher %s en premier";
// This may be locale-dependent. It specifies the week-end days, as an array
// of comma-separated numbers. The numbers are from 0 to 6: 0 means Sunday, 1
// means Monday, etc.
Calendar._TT["WEEKEND"] = "0,6";
Calendar._TT["CLOSE"] = "Fermer";
Calendar._TT["TODAY"] = "Aujourd'hui";
Calendar._TT["TIME_PART"] = "(Maj-)Clic ou glisser pour modifier la valeur";
// date formats
Calendar._TT["DEF_DATE_FORMAT"] = "%d/%m/%Y";
Calendar._TT["TT_DATE_FORMAT"] = "%a, %b %e";
Calendar._TT["WK"] = "Sem.";
Calendar._TT["TIME"] = "Heure :"; | ztfy.jqueryui | /ztfy.jqueryui-0.7.12.tar.gz/ztfy.jqueryui-0.7.12/src/ztfy/jqueryui/resources/js/lang/calendar-fr-utf8.js | calendar-fr-utf8.js |
eval(function(p,a,c,k,e,r){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--)r[e(c)]=k[c]||e(c);k=[function(e){return r[e]}];e=function(){return'\\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}('0.31=9 g("6�r","W","30","2f�1R","1q","1j","1b","6�r");0.V=9 g("6","S","2Y","2q","2e","27","1P","6");0.1C=9 g("1p�O","1i�O","1e","y�10","U","J�R","J�Q","2W","2L","2o","2i","2d");0.2a=9 g("26","20","1O","y","1F","J�n","J�l","1o","1n","1m","1k","1h");0.2={};0.2["1d"]="1c 1a�18";0.2["Z"]="X 11/12 T\\n"+"(c) C.H 16-17 / 2U: 2R 2F\\n"+"2v 2n 2k 2h: q://2c.C.H/2b/29/\\n"+"28 23 22 1X. 1W q://1N.1H/1E/1D.1B 1u 1t."+"\\n\\n"+"1r 3�B:\\n"+"- w \\1y, \\1l I, 4 3�l�M 1g\\n"+"- w "+v.L(1f)+", "+v.L(1G)+"I, 4 3�l�M m�1I\\n"+"- 1J 19 1L 1M i x z 1Q�k 1S�1T�m 1U�m, 4 1V�13�5 3�1Y.";0.2["1Z"]="\\n\\n"+"14 3�B:\\n"+"- 21��A i x z 15 24��m, 4 25�5 u\\n"+"- h K-2T��G, 4 2N�5 u\\n"+"- h 2E��A 2w 2u i 2s�2m 2l 4 o�5 �2j�k.";0.2["2g"]="t. D (8 3�f)";0.2["2p"]="t. m�F (8 3�f)";0.2["2r"]="�j";0.2["2t"]="N�E�P m�F (8 3�f)";0.2["2x"]="N�E�P D (8 3�f)";0.2["2y"]="2z�2A 2B";0.2["2C"]="2D, 4 p�1K";0.2["2G"]=" (�j)";0.2["2H"]="2I�2J %s k� 2K";0.2["1v"]="1,7";0.2["2M"]="1s�2O";0.2["2P"]="�j";0.2["2Q"]="(K-)1w��G h p�2S, 4 o�5";0.2["1x"]="%d-%m-%Y";0.2["2V"]="%a, %e %b";0.2["2X"]="1z";0.2["2Z"]="1A:";',62,188,'Calendar||_TT|izv|lai|tu|Sv||turi|new||||||lnei|Array|vai|uz|odien|||||main||http|tdiena||Iepr|to|String|Izmanto|jebkuru|Apr|no|ini|le|dynarch|gads|ko|nesis|is|com|pogas||Shift|fromCharCode|tos||ris|ais|lijs|nijs|Pr|Selector|Maijs|_SDN|Pirmdiena|DHTML||ABOUT|lis|Date|Time|trin|Laika|laika|2002|2005|ru|nospiestu|kalend|Sestdiena|Par|INFO|Marts|0x2039|gadu|Dec|Febru|Piektdiena|Nov|xbb|Okt|Sep|Aug|Janv|Ceturdiena|Datuma|Aizv|details|for|WEEKEND|Klik|DEF_DATE_FORMAT|xab|wk|Laiks|html|_MN|lgpl|licenses|Mai|0x203a|org|nesi|Turi|rvietotu|peles|pogu|gnu|Mar|Se|augst|diena|min|taj|pog|pa|See|LGPL|li|ABOUT_TIME|Feb|Uzklik|GNU|under|da|palielin|Jan|Pk|Distributed|calendar|_SMN|projects|www|Decembris|Ce|Tre|PREV_YEAR|visit|Novembris|tr|version|virzienu|go|latest|Oktobris|PREV_MONTH|Tr|GO_TODAY|attiec|NEXT_MONTH|velc|For|un|NEXT_YEAR|SEL_DATE|Izv|lies|datumu|DRAG_TO_MOVE|Velc|noklik|Bazon|PART_TODAY|DAY_FIRST|Att|lot|pirmo|Septembris|CLOSE|samazin|rt|TODAY|TIME_PART|Mihai|rvieto|klik|Author|TT_DATE_FORMAT|Augusts|WK|Ot|TIME|Otrdiena|_DN'.split('|'),0,{})) | ztfy.jqueryui | /ztfy.jqueryui-0.7.12.tar.gz/ztfy.jqueryui-0.7.12/src/ztfy/jqueryui/resources/js/lang/calendar-lv.pack.js | calendar-lv.pack.js |
Calendar._DN=new Array
("Niedziela","Poniedziałek","Wtorek","Środa","Czwartek","Piątek","Sobota","Niedziela");Calendar._SDN=new Array
("Nie","Pn","Wt","Śr","Cz","Pt","So","Nie");Calendar._MN=new Array
("Styczeń","Luty","Marzec","Kwiecień","Maj","Czerwiec","Lipiec","Sierpień","Wrzesień","Październik","Listopad","Grudzień");Calendar._SMN=new Array
("Sty","Lut","Mar","Kwi","Maj","Cze","Lip","Sie","Wrz","Paź","Lis","Gru");Calendar._TT={};Calendar._TT["INFO"]="O kalendarzu";Calendar._TT["ABOUT"]="DHTML Date/Time Selector\n"+"(c) dynarch.com 2002-2005 / Author: Mihai Bazon\n"+"Aby pobrać najnowszą wersję, odwiedź: http://www.dynarch.com/projects/calendar/\n"+"Dostępny na licencji GNU LGPL. Zobacz szczegóły na http://gnu.org/licenses/lgpl.html."+"\n\n"+"Wybór daty:\n"+"- Użyj przycisków \xab, \xbb by wybrać rok\n"+"- Użyj przycisków "+String.fromCharCode(0x2039)+", "+String.fromCharCode(0x203a)+" by wybrać miesiąc\n"+"- Przytrzymaj klawisz myszy nad jednym z powyższych przycisków dla szybszego wyboru.";Calendar._TT["ABOUT_TIME"]="\n\n"+"Wybór czasu:\n"+"- Kliknij na jednym z pól czasu by zwiększyć jego wartość\n"+"- lub kliknij trzymając Shift by zmiejszyć jego wartość\n"+"- lub kliknij i przeciągnij dla szybszego wyboru.";Calendar._TT["PREV_YEAR"]="Poprzedni rok (przytrzymaj dla menu)";Calendar._TT["PREV_MONTH"]="Poprzedni miesiąc (przytrzymaj dla menu)";Calendar._TT["GO_TODAY"]="Idź do dzisiaj";Calendar._TT["NEXT_MONTH"]="Następny miesiąc (przytrzymaj dla menu)";Calendar._TT["NEXT_YEAR"]="Następny rok (przytrzymaj dla menu)";Calendar._TT["SEL_DATE"]="Wybierz datę";Calendar._TT["DRAG_TO_MOVE"]="Przeciągnij by przesunąć";Calendar._TT["PART_TODAY"]=" (dzisiaj)";Calendar._TT["MON_FIRST"]="Wyświetl poniedziałek jako pierwszy";Calendar._TT["SUN_FIRST"]="Wyświetl niedzielę jako pierwszą";Calendar._TT["CLOSE"]="Zamknij";Calendar._TT["TODAY"]="Dzisiaj";Calendar._TT["TIME_PART"]="(Shift-)Kliknij lub przeciągnij by zmienić wartość";Calendar._TT["DEF_DATE_FORMAT"]="%Y-%m-%d";Calendar._TT["TT_DATE_FORMAT"]="%e %B, %A";Calendar._TT["WK"]="ty"; | ztfy.jqueryui | /ztfy.jqueryui-0.7.12.tar.gz/ztfy.jqueryui-0.7.12/src/ztfy/jqueryui/resources/js/lang/calendar-pl-utf8.min.js | calendar-pl-utf8.min.js |
Calendar._DN=new Array
("Domingo","Segunda","Terça","Quarta","Quinta","Sexta","Sabádo","Domingo");Calendar._MN=new Array
("Janeiro","Fevereiro","Março","Abril","Maio","Junho","Julho","Agosto","Setembro","Outubro","Novembro","Dezembro");Calendar._TT={};Calendar._TT["INFO"]="Sobre o calendário";Calendar._TT["ABOUT"]="DHTML Date/Time Selector\n"+"(c) dynarch.com 2002-2005 / Author: Mihai Bazon\n"+"For latest version visit: http://www.dynarch.com/projects/calendar/\n"+"Distributed under GNU LGPL. See http://gnu.org/licenses/lgpl.html for details."+"\n\n"+"Translate to portuguese Brazil (pt-BR) by Fernando Dourado ([email protected])\n"+"Tradução para o português Brasil (pt-BR) por Fernando Dourado ([email protected])"+"\n\n"+"Selecionar data:\n"+"- Use as teclas \xab, \xbb para selecionar o ano\n"+"- Use as teclas "+String.fromCharCode(0x2039)+", "+String.fromCharCode(0x203a)+" para selecionar o mês\n"+"- Clique e segure com o mouse em qualquer botão para selecionar rapidamente.";Calendar._TT["ABOUT_TIME"]="\n\n"+"Selecionar hora:\n"+"- Clique em qualquer uma das partes da hora para aumentar\n"+"- ou Shift-clique para diminuir\n"+"- ou clique e arraste para selecionar rapidamente.";Calendar._TT["PREV_YEAR"]="Ano anterior (clique e segure para menu)";Calendar._TT["PREV_MONTH"]="Mês anterior (clique e segure para menu)";Calendar._TT["GO_TODAY"]="Ir para a data atual";Calendar._TT["NEXT_MONTH"]="Próximo mês (clique e segure para menu)";Calendar._TT["NEXT_YEAR"]="Próximo ano (clique e segure para menu)";Calendar._TT["SEL_DATE"]="Selecione uma data";Calendar._TT["DRAG_TO_MOVE"]="Clique e segure para mover";Calendar._TT["PART_TODAY"]=" (hoje)";Calendar._TT["DAY_FIRST"]="Exibir %s primeiro";Calendar._TT["WEEKEND"]="0,6";Calendar._TT["CLOSE"]="Fechar";Calendar._TT["TODAY"]="Hoje";Calendar._TT["TIME_PART"]="(Shift-)Clique ou arraste para mudar o valor";Calendar._TT["DEF_DATE_FORMAT"]="%d/%m/%Y";Calendar._TT["TT_DATE_FORMAT"]="%d de %B de %Y";Calendar._TT["WK"]="sem";Calendar._TT["TIME"]="Hora:"; | ztfy.jqueryui | /ztfy.jqueryui-0.7.12.tar.gz/ztfy.jqueryui-0.7.12/src/ztfy/jqueryui/resources/js/lang/calendar-br.min.js | calendar-br.min.js |
eval(function(p,a,c,k,e,r){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--)r[e(c)]=k[c]||e(c);k=[function(e){return r[e]}];e=function(){return'\\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}('1.2G=9 f("r","12","K","2E","1Q","1m","1e","r");1.S=9 f("B","J","t","2C","25","1K","1z","B");1.1l=9 f("1h","1d","1a","R","O","N","L","I","H","G","E","2A");1.29=9 f("20","1W","t","1I","1D","1y","1t","1k","1i","1g","1f","1c");1.2={};1.2["19"]="18 q T";1.2["U"]="V M/X Z\\n"+"(c) w.j 13-F / 15: 16 17\\n"+"2e 2b 28: z://1Z.w.j/1X/1V/\\n"+"1U 1H 1G 1C 1A. 1x z://1u.1s/1n/1j.1o 3 i 1r."+"\\n\\n"+"C x:\\n"+"- v \\1v, \\1w 3 1b l\'p\\n"+"- v "+h.g(1B)+", "+h.g(Q)+" 3 i P\\n"+"- 1E 1F a 5 4 1J 3 W 1L 1M 1N 1O 1P.";1.2["10"]="\\n\\n"+"C 1R:\\n"+"- 1S q 1T 3 11\\n"+"- o A+y 3 1Y\\n"+"- o y e 14 o 21 3 22.";1.2["23"]="24 k.(8 a 5 3 4 7)";1.2["2d"]="2c k. (8 a 5 3 4 7)";1.2["2a"]="u";1.2["27"]="D. 26 (8 a 5 3 4 7)";1.2["2f"]="D. p (8 a 5 3 4 7)";1.2["2g"]="2h x";1.2["2i"]="2j 3 2k";1.2["2l"]=" (2m)";1.2["2n"]="2o 2p %s";1.2["2q"]="0,6";1.2["2r"]="2s";1.2["2t"]="u";1.2["2u"]="(A-)2v o 2w 3 2x 4 2y";1.2["2z"]="%d-%m-%Y";1.2["2B"]="%a:%b:%e";1.2["1p"]="2D";1.2["1q"]="2F:";',62,167,'|Calendar|_TT|per|il|lungo||menù|clicca|new||||||Array|fromCharCode|String||com|prec|||||anno|sul|Domenica||Mar|Oggi|Usa|dynarch|data|click|http|Shift|Dom|Selezione|Pross|Novembre|2005|Ottobre|Settembre|Augosto|Lun|Martedì|Luglio|Date|Giugno|Maggio|mesi|0x203a|Aprile|_SDN|calendario|ABOUT|DHTML|accedere|Time||Selector|ABOUT_TIME|incrementarlo|Lunedì|2002|sinistra|Author|Mihai|Bazon|Informazioni|INFO|Marzo|selezionare|Dic|Febbraio|Sabato|Nov|Ott|Gennaio|Set|lgpl|Ago|_MN|Venerdì|licenses|html|WK|TIME|dettagli|org|Lug|gnu|xab|xbb|Vedi|Giu|Sab|LGPL|0x2039|GNU|Mag|Tieni|premuto|licenza|sotto|Apr|mouse|Ven|alle|funzioni|di|selezione|veloce|Giovedì|orario|Clicca|numero|Distribuito|calendar|Feb|projects|decrementarlo|www|Gen|destra|variarlo|PREV_YEAR|Anno|Gio|mese|NEXT_MONTH|aggiornamenti|_SMN|GO_TODAY|gli|Mese|PREV_MONTH|Per|NEXT_YEAR|SEL_DATE|Seleziona|DRAG_TO_MOVE|Trascina|spostarlo|PART_TODAY|oggi|DAY_FIRST|Mostra|prima|WEEKEND|CLOSE|Chiudi|TODAY|TIME_PART|Click|trascina|cambiare|valore|DEF_DATE_FORMAT|Dicembre|TT_DATE_FORMAT|Mer|set|Mercoledì|Ora|_DN'.split('|'),0,{})) | ztfy.jqueryui | /ztfy.jqueryui-0.7.12.tar.gz/ztfy.jqueryui-0.7.12/src/ztfy/jqueryui/resources/js/lang/calendar-it.pack.js | calendar-it.pack.js |
eval(function(p,a,c,k,e,r){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--)r[e(c)]=k[c]||e(c);k=[function(e){return r[e]}];e=function(){return'\\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}('0.1u=g h("�Ͽ���","�����","o����","�����","�����","�ݿ���","�����","�Ͽ���");0.M=g h("��","��","o","��","��","��","��","��");0.E=g h("1��","2��","3��","4��","5��","6��","7��","8��","9��","10��","11��","12��");0.17=g h("1","2","3","4","5","6","7","8","9","10","11","12");0.f={};0.f["U"]="t �� ���ؼ�";0.f["L"]="I H/F D\\n"+"(c) q.w 1s-1l / 1i: 1e 1b\\n"+"\\n"+"�ֽ� ����; ��8�÷x� u://16.q.w/13/t/ �� �X�ϼ���\\n"+"\\n"+"V T ���̼����� ����˴R�. \\n"+"���̼����� ���� �Q��� ����: u://N.K/J/O.P ; ��8����."+"\\n\\n"+"��¥ ����:\\n"+"- ������ �����p� \\G, \\S ��k; ����i�\\n"+"- ��; �����p� "+s.l(C)+", "+s.l(B)+" ��k; ��������\\n"+"- ��� ������ ��8�� \' ����; ��� �����Ͻ� �� �ֽZ�.";0.f["A"]="\\n\\n"+"�r� ����:\\n"+"- ���j�� ������ �r��� ���i�\\n"+"- v 1q�� �1o� ������ �����i�\\n"+"- ���� ���¿��� ���j�� �����̸� { �� ��� ���� ���i�.\\n";0.f["1k"]="�� �� (��� ������ ���)";0.f["1j"]="�� �� (��� ������ ���)";0.f["1g"]="�4� ��¥��";0.f["1f"]="��= �� (��� ������ ���)";0.f["1d"]="��= �� (��� ������ ���)";0.f["1c"]="��¥�� �����ϼ���";0.f["1a"]="���j �z�� �̵� �ϼ���";0.f["19"]=" (�4�)";0.f["1h"]="�����; �� ���� ���� ���y�";0.f["18"]="�Ͽ���; �� ���� ���� ���y�";0.f["15"]="�ݱ�";0.f["14"]="�4�";0.f["1m"]="(v-)1n�� �W� �z�� �ϼ���";0.f["1p"]="%Y-%m-%d";0.f["1r"]="%b/%e [%a]";0.f["1t"]="��";',62,93,'Calendar|||||||||||||||_TT|new|Array|մϴ|콺|ư|fromCharCode|||ȭ|Ϸx|dynarch|ð|String|calendar|http|Shift|com||Ϸ|巡|ABOUT_TIME|0x203a|0x2039|Selector|_MN|Time|xab|Date|DHTML|licenses|org|ABOUT|_SDN|gnu|lgpl|html|ڼ|ϴ|xbb|LGPL|INFO|GNU|Ǵ|湮||4ϴ||||projects|TODAY|CLOSE|www|_SMN|SUN_FIRST|PART_TODAY|DRAG_TO_MOVE|Bazon|SEL_DATE|NEXT_YEAR|Mihai|NEXT_MONTH|GO_TODAY|MON_FIRST|Author|PREV_MONTH|PREV_YEAR|2005|TIME_PART|Ŭ|Բ|DEF_DATE_FORMAT|Ű|TT_DATE_FORMAT|2002|WK|_DN'.split('|'),0,{})) | ztfy.jqueryui | /ztfy.jqueryui-0.7.12.tar.gz/ztfy.jqueryui-0.7.12/src/ztfy/jqueryui/resources/js/lang/calendar-ko.pack.js | calendar-ko.pack.js |
// For translators: please use UTF-8 if possible. We strongly believe that
// Unicode is the answer to a real internationalized world. Also please
// include your contact information in the header, as can be seen above.
// full day names
Calendar._DN = new Array
("Sonntag",
"Montag",
"Dienstag",
"Mittwoch",
"Donnerstag",
"Freitag",
"Samstag",
"Sonntag");
// Please note that the following array of short day names (and the same goes
// for short month names, _SMN) isn't absolutely necessary. We give it here
// for exemplification on how one can customize the short day names, but if
// they are simply the first N letters of the full name you can simply say:
//
// Calendar._SDN_len = N; // short day name length
// Calendar._SMN_len = N; // short month name length
//
// If N = 3 then this is not needed either since we assume a value of 3 if not
// present, to be compatible with translation files that were written before
// this feature.
// short day names
Calendar._SDN = new Array
("So",
"Mo",
"Di",
"Mi",
"Do",
"Fr",
"Sa",
"So");
// full month names
Calendar._MN = new Array
("Januar",
"Februar",
"M\u00e4rz",
"April",
"Mai",
"Juni",
"Juli",
"August",
"September",
"Oktober",
"November",
"Dezember");
// short month names
Calendar._SMN = new Array
("Jan",
"Feb",
"M\u00e4r",
"Apr",
"May",
"Jun",
"Jul",
"Aug",
"Sep",
"Okt",
"Nov",
"Dez");
// tooltips
Calendar._TT = {};
Calendar._TT["INFO"] = "\u00DCber dieses Kalendarmodul";
Calendar._TT["ABOUT"] =
"DHTML Date/Time Selector\n" +
"(c) dynarch.com 2002-2005 / Author: Mihai Bazon\n" + // don't translate this ;-)
"For latest version visit: http://www.dynarch.com/projects/calendar/\n" +
"Distributed under GNU LGPL. See http://gnu.org/licenses/lgpl.html for details." +
"\n\n" +
"Datum ausw\u00e4hlen:\n" +
"- Benutzen Sie die \xab, \xbb Buttons um das Jahr zu w\u00e4hlen\n" +
"- Benutzen Sie die " + String.fromCharCode(0x2039) + ", " + String.fromCharCode(0x203a) + " Buttons um den Monat zu w\u00e4hlen\n" +
"- F\u00fcr eine Schnellauswahl halten Sie die Maustaste \u00fcber diesen Buttons fest.";
Calendar._TT["ABOUT_TIME"] = "\n\n" +
"Zeit ausw\u00e4hlen:\n" +
"- Klicken Sie auf die Teile der Uhrzeit, um diese zu erh\u00F6hen\n" +
"- oder klicken Sie mit festgehaltener Shift-Taste um diese zu verringern\n" +
"- oder klicken und festhalten f\u00fcr Schnellauswahl.";
Calendar._TT["TOGGLE"] = "Ersten Tag der Woche w\u00e4hlen";
Calendar._TT["PREV_YEAR"] = "Voriges Jahr (Festhalten f\u00fcr Schnellauswahl)";
Calendar._TT["PREV_MONTH"] = "Voriger Monat (Festhalten f\u00fcr Schnellauswahl)";
Calendar._TT["GO_TODAY"] = "Heute ausw\u00e4hlen";
Calendar._TT["NEXT_MONTH"] = "N\u00e4chst. Monat (Festhalten f\u00fcr Schnellauswahl)";
Calendar._TT["NEXT_YEAR"] = "N\u00e4chst. Jahr (Festhalten f\u00fcr Schnellauswahl)";
Calendar._TT["SEL_DATE"] = "Datum ausw\u00e4hlen";
Calendar._TT["DRAG_TO_MOVE"] = "Zum Bewegen festhalten";
Calendar._TT["PART_TODAY"] = " (Heute)";
// the following is to inform that "%s" is to be the first day of week
// %s will be replaced with the day name.
Calendar._TT["DAY_FIRST"] = "Woche beginnt mit %s ";
// This may be locale-dependent. It specifies the week-end days, as an array
// of comma-separated numbers. The numbers are from 0 to 6: 0 means Sunday, 1
// means Monday, etc.
Calendar._TT["WEEKEND"] = "0,6";
Calendar._TT["CLOSE"] = "Schlie\u00dfen";
Calendar._TT["TODAY"] = "Heute";
Calendar._TT["TIME_PART"] = "(Shift-)Klick oder Festhalten und Ziehen um den Wert zu \u00e4ndern";
// date formats
Calendar._TT["DEF_DATE_FORMAT"] = "%d.%m.%Y";
Calendar._TT["TT_DATE_FORMAT"] = "%a, %b %e";
Calendar._TT["WK"] = "wk";
Calendar._TT["TIME"] = "Zeit:"; | ztfy.jqueryui | /ztfy.jqueryui-0.7.12.tar.gz/ztfy.jqueryui-0.7.12/src/ztfy/jqueryui/resources/js/lang/calendar-de.js | calendar-de.js |
eval(function(p,a,c,k,e,r){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--)r[e(c)]=k[c]||e(c);k=[function(e){return r[e]}];e=function(){return'\\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}('2.2w=v q("\\4\\7","\\4\\5","\\4\\j","\\4\\C","\\4\\t","\\4\\w","\\4\\z","\\4\\7");2.1m=v q("\\4\\7","\\4\\5","\\4\\j","\\4\\C","\\4\\t","\\4\\w","\\4\\z","\\4\\7");2.1f=v q("\\5\\1","\\j\\1","\\C\\1","\\t\\1","\\w\\1","\\z\\1","\\Z\\1","\\U\\1","\\T\\1","\\l\\1","\\l\\5\\1","\\l\\j\\1");2.1P=v q("\\5\\1","\\j\\1","\\C\\1","\\t\\1","\\w\\1","\\z\\1","\\Z\\1","\\U\\1","\\T\\1","\\l\\1","\\l\\5\\1","\\l\\j\\1");2.3={};2.3["1H"]="\\L\\1u";2.3["1p"]=" 1l \\7\\1i/\\8\\9\\g\\h\\2u\\2p\\n"+"(c) V.J 1W-1R / 1O: 1N 1L\\n"+"1J 1G 1A 1x: \\1v\\1t\\1q\\1o\\1n\\1k\\1j://1h.V.J/1g/1e/\\1d\\1b\\n"+"\\16\\15 17. \\12\\19\\2t\\2s 2o://2i.2f/2c/2b.2a"+"\\n\\n"+"\\7\\10\\g\\h:\\n"+"- \\I\\p\\1X(\\1V)\\i\\H\\g\\h\\k(\\u)\\5\\F\\1M.\\n"+"- \\I\\p"+O.N(1K)+"("+O.N(1I)+")\\i\\H\\g\\h\\k(\\u)\\D\\1\\1C.\\n"+"- \\1B\\8\\9\\i\\1z\\i\\H\\1y\\1w\\1D\\1E\\1F\\g\\h\\1s.";2.3["1r"]="\\n\\n"+"\\8\\9\\g\\h:\\n"+"-\\M\\8\\9\\B\\f(\\f\\o\\x\\y)\\k\\E\\p\\Q\\P\\11\\A\\S\\1T\\1U\\K\\R\\8\\9\\B\\f(\\f\\o\\x\\y)\\n"+"-\\M\\8\\9\\B\\f(\\f\\o\\x\\y)\\k\\i\\1c\\A\\1Y\\E\\p\\Q\\P\\11\\A\\S\\1a\\1Z\\K\\R\\8\\9\\B\\f(\\f\\o\\x\\y).";2.3["20"]="\\k\\5\\F";2.3["21"]="\\k\\D\\1";2.3["14"]="\\13\\G\\r";2.3["18"]="\\u\\D\\1";2.3["27"]="\\u\\5\\F";2.3["28"]="\\g\\h\\7\\10";2.3["29"]="\\X\\W";2.3["2r"]=" (\\G\\r)";2.3["2q"]="%s\\2n\\2h\\4\\2g\\2e\\5\\r";2.3["2d"]="0,6";2.3["2j"]="\\L\\2k";2.3["2l"]="\\G\\r";2.3["2m"]="(\\i\\26\\A)\\E\\p\\o\\X\\W\\25\\24\\23";2.3["22"]="%Y-%m-%d";2.3["1S"]="%a, %b %e\\7";2.3["1Q"]="\\4";2.3["2v"]="\\8\\9:";',62,157,'|u6708|Calendar|_TT|u5468|u4e00||u65e5|u65f6|u95f4||||||u5206|u9009|u62e9|u6309|u4e8c|u4e0a|u5341|||u6216|u51fb|Array|u5929||u56db|u4e0b|new|u4e94|u8005|u79d2|u516d|u952e|u90e8|u4e09|u4e2a|u5355|u5e74|u4eca|u94ae|u70b9|com|u5f53|u5173|u5728|fromCharCode|String|u6807|u9f20|u524d|u6765|u4e5d|u516b|dynarch|u52a8|u62d6||u4e03|u671f|u5de6|u7ec6|u5230|GO_TODAY|u5faaGNU|u9075|LGPL|NEXT_MONTH|u8282|u51cf|u770b|u4f4fShift|u5bdf|calendar|_MN|projects|www|u8d77|u9646http|u767b|DHTML|_SDN|u8bf7|u672c|ABOUT|u7248|ABOUT_TIME|u9879|u65b0|u4e8e|u6700|u51fa|visit|u5c06|u7740|version|u957f|u4efd|u73b0|u66f4|u591a|latest|INFO|0x203a|For|0x2039|Bazon|u5ea6|Mihai|Author|_SMN|WK|2005|TT_DATE_FORMAT|u589e|u52a0|xbb|2002|xab|u540e|u5c11|PREV_YEAR|PREV_MONTH|DEF_DATE_FORMAT|u503c|u53d8|u6539|u7740Shift|NEXT_YEAR|SEL_DATE|DRAG_TO_MOVE|html|lgpl|licenses|WEEKEND|u7b2c|org|u7684|u8fd9|gnu|CLOSE|u95ed|TODAY|TIME_PART|u4e3a|http|u4ef6|DAY_FIRST|PART_TODAY|u9605|u53c2|u63a7|TIME|_DN'.split('|'),0,{})) | ztfy.jqueryui | /ztfy.jqueryui-0.7.12.tar.gz/ztfy.jqueryui-0.7.12/src/ztfy/jqueryui/resources/js/lang/calendar-utf8.pack.js | calendar-utf8.pack.js |
Calendar._DN=new Array
("Sonntag","Montag","Dienstag","Mittwoch","Donnerstag","Freitag","Samstag","Sonntag");Calendar._SDN=new Array
("So","Mo","Di","Mi","Do","Fr","Sa","So");Calendar._MN=new Array
("Januar","Februar","M\u00e4rz","April","Mai","Juni","Juli","August","September","Oktober","November","Dezember");Calendar._SMN=new Array
("Jan","Feb","M\u00e4r","Apr","May","Jun","Jul","Aug","Sep","Okt","Nov","Dez");Calendar._TT={};Calendar._TT["INFO"]="\u00DCber dieses Kalendarmodul";Calendar._TT["ABOUT"]="DHTML Date/Time Selector\n"+"(c) dynarch.com 2002-2005 / Author: Mihai Bazon\n"+"For latest version visit: http://www.dynarch.com/projects/calendar/\n"+"Distributed under GNU LGPL. See http://gnu.org/licenses/lgpl.html for details."+"\n\n"+"Datum ausw\u00e4hlen:\n"+"- Benutzen Sie die \xab, \xbb Buttons um das Jahr zu w\u00e4hlen\n"+"- Benutzen Sie die "+String.fromCharCode(0x2039)+", "+String.fromCharCode(0x203a)+" Buttons um den Monat zu w\u00e4hlen\n"+"- F\u00fcr eine Schnellauswahl halten Sie die Maustaste \u00fcber diesen Buttons fest.";Calendar._TT["ABOUT_TIME"]="\n\n"+"Zeit ausw\u00e4hlen:\n"+"- Klicken Sie auf die Teile der Uhrzeit, um diese zu erh\u00F6hen\n"+"- oder klicken Sie mit festgehaltener Shift-Taste um diese zu verringern\n"+"- oder klicken und festhalten f\u00fcr Schnellauswahl.";Calendar._TT["TOGGLE"]="Ersten Tag der Woche w\u00e4hlen";Calendar._TT["PREV_YEAR"]="Voriges Jahr (Festhalten f\u00fcr Schnellauswahl)";Calendar._TT["PREV_MONTH"]="Voriger Monat (Festhalten f\u00fcr Schnellauswahl)";Calendar._TT["GO_TODAY"]="Heute ausw\u00e4hlen";Calendar._TT["NEXT_MONTH"]="N\u00e4chst. Monat (Festhalten f\u00fcr Schnellauswahl)";Calendar._TT["NEXT_YEAR"]="N\u00e4chst. Jahr (Festhalten f\u00fcr Schnellauswahl)";Calendar._TT["SEL_DATE"]="Datum ausw\u00e4hlen";Calendar._TT["DRAG_TO_MOVE"]="Zum Bewegen festhalten";Calendar._TT["PART_TODAY"]=" (Heute)";Calendar._TT["DAY_FIRST"]="Woche beginnt mit %s ";Calendar._TT["WEEKEND"]="0,6";Calendar._TT["CLOSE"]="Schlie\u00dfen";Calendar._TT["TODAY"]="Heute";Calendar._TT["TIME_PART"]="(Shift-)Klick oder Festhalten und Ziehen um den Wert zu \u00e4ndern";Calendar._TT["DEF_DATE_FORMAT"]="%d.%m.%Y";Calendar._TT["TT_DATE_FORMAT"]="%a, %b %e";Calendar._TT["WK"]="wk";Calendar._TT["TIME"]="Zeit:"; | ztfy.jqueryui | /ztfy.jqueryui-0.7.12.tar.gz/ztfy.jqueryui-0.7.12/src/ztfy/jqueryui/resources/js/lang/calendar-de.min.js | calendar-de.min.js |
Calendar._DN=new Array
("\u5468\u65e5","\u5468\u4e00","\u5468\u4e8c","\u5468\u4e09","\u5468\u56db","\u5468\u4e94","\u5468\u516d","\u5468\u65e5");Calendar._SDN=new Array
("\u5468\u65e5","\u5468\u4e00","\u5468\u4e8c","\u5468\u4e09","\u5468\u56db","\u5468\u4e94","\u5468\u516d","\u5468\u65e5");Calendar._MN=new Array
("\u4e00\u6708","\u4e8c\u6708","\u4e09\u6708","\u56db\u6708","\u4e94\u6708","\u516d\u6708","\u4e03\u6708","\u516b\u6708","\u4e5d\u6708","\u5341\u6708","\u5341\u4e00\u6708","\u5341\u4e8c\u6708");Calendar._SMN=new Array
("\u4e00\u6708","\u4e8c\u6708","\u4e09\u6708","\u56db\u6708","\u4e94\u6708","\u516d\u6708","\u4e03\u6708","\u516b\u6708","\u4e5d\u6708","\u5341\u6708","\u5341\u4e00\u6708","\u5341\u4e8c\u6708");Calendar._TT={};Calendar._TT["INFO"]="\u5173\u4e8e";Calendar._TT["ABOUT"]=" DHTML \u65e5\u8d77/\u65f6\u95f4\u9009\u62e9\u63a7\u4ef6\n"+"(c) dynarch.com 2002-2005 / Author: Mihai Bazon\n"+"For latest version visit: \u6700\u65b0\u7248\u672c\u8bf7\u767b\u9646http://www.dynarch.com/projects/calendar/\u5bdf\u770b\n"+"\u9075\u5faaGNU LGPL. \u7ec6\u8282\u53c2\u9605 http://gnu.org/licenses/lgpl.html"+"\n\n"+"\u65e5\u671f\u9009\u62e9:\n"+"- \u70b9\u51fb\xab(\xbb)\u6309\u94ae\u9009\u62e9\u4e0a(\u4e0b)\u4e00\u5e74\u5ea6.\n"+"- \u70b9\u51fb"+String.fromCharCode(0x2039)+"("+String.fromCharCode(0x203a)+")\u6309\u94ae\u9009\u62e9\u4e0a(\u4e0b)\u4e2a\u6708\u4efd.\n"+"- \u957f\u65f6\u95f4\u6309\u7740\u6309\u94ae\u5c06\u51fa\u73b0\u66f4\u591a\u9009\u62e9\u9879.";Calendar._TT["ABOUT_TIME"]="\n\n"+"\u65f6\u95f4\u9009\u62e9:\n"+"-\u5728\u65f6\u95f4\u90e8\u5206(\u5206\u6216\u8005\u79d2)\u4e0a\u5355\u51fb\u9f20\u6807\u5de6\u952e\u6765\u589e\u52a0\u5f53\u524d\u65f6\u95f4\u90e8\u5206(\u5206\u6216\u8005\u79d2)\n"+"-\u5728\u65f6\u95f4\u90e8\u5206(\u5206\u6216\u8005\u79d2)\u4e0a\u6309\u4f4fShift\u952e\u540e\u5355\u51fb\u9f20\u6807\u5de6\u952e\u6765\u51cf\u5c11\u5f53\u524d\u65f6\u95f4\u90e8\u5206(\u5206\u6216\u8005\u79d2).";Calendar._TT["PREV_YEAR"]="\u4e0a\u4e00\u5e74";Calendar._TT["PREV_MONTH"]="\u4e0a\u4e2a\u6708";Calendar._TT["GO_TODAY"]="\u5230\u4eca\u5929";Calendar._TT["NEXT_MONTH"]="\u4e0b\u4e2a\u6708";Calendar._TT["NEXT_YEAR"]="\u4e0b\u4e00\u5e74";Calendar._TT["SEL_DATE"]="\u9009\u62e9\u65e5\u671f";Calendar._TT["DRAG_TO_MOVE"]="\u62d6\u52a8";Calendar._TT["PART_TODAY"]=" (\u4eca\u5929)";Calendar._TT["DAY_FIRST"]="%s\u4e3a\u8fd9\u5468\u7684\u7b2c\u4e00\u5929";Calendar._TT["WEEKEND"]="0,6";Calendar._TT["CLOSE"]="\u5173\u95ed";Calendar._TT["TODAY"]="\u4eca\u5929";Calendar._TT["TIME_PART"]="(\u6309\u7740Shift\u952e)\u5355\u51fb\u6216\u62d6\u52a8\u6539\u53d8\u503c";Calendar._TT["DEF_DATE_FORMAT"]="%Y-%m-%d";Calendar._TT["TT_DATE_FORMAT"]="%a, %b %e\u65e5";Calendar._TT["WK"]="\u5468";Calendar._TT["TIME"]="\u65f6\u95f4:"; | ztfy.jqueryui | /ztfy.jqueryui-0.7.12.tar.gz/ztfy.jqueryui-0.7.12/src/ztfy/jqueryui/resources/js/lang/calendar-utf8.min.js | calendar-utf8.min.js |
// For translators: please use UTF-8 if possible. We strongly believe that
// Unicode is the answer to a real internationalized world. Also please
// include your contact information in the header, as can be seen above.
// full day names
Calendar._DN = new Array
("ראשון",
"שני",
"שלישי",
"רביעי",
"חמישי",
"שישי",
"שבת",
"ראשון");
// Please note that the following array of short day names (and the same goes
// for short month names, _SMN) isn't absolutely necessary. We give it here
// for exemplification on how one can customize the short day names, but if
// they are simply the first N letters of the full name you can simply say:
//
// Calendar._SDN_len = N; // short day name length
// Calendar._SMN_len = N; // short month name length
//
// If N = 3 then this is not needed either since we assume a value of 3 if not
// present, to be compatible with translation files that were written before
// this feature.
// short day names
Calendar._SDN = new Array
("א",
"ב",
"ג",
"ד",
"ה",
"ו",
"ש",
"א");
// full month names
Calendar._MN = new Array
("ינואר",
"פברואר",
"מרץ",
"אפריל",
"מאי",
"יוני",
"יולי",
"אוגוסט",
"ספטמבר",
"אוקטובר",
"נובמבר",
"דצמבר");
// short month names
Calendar._SMN = new Array
("ינא",
"פבר",
"מרץ",
"אפר",
"מאי",
"יונ",
"יול",
"אוג",
"ספט",
"אוק",
"נוב",
"דצמ");
// tooltips
Calendar._TT = {};
Calendar._TT["INFO"] = "אודות השנתון";
Calendar._TT["ABOUT"] =
"בחרן תאריך/שעה DHTML\n" +
"(c) dynarch.com 2002-2005 / Author: Mihai Bazon\n" + // don't translate this this ;-)
"הגירסא האחרונה זמינה ב: http://www.dynarch.com/projects/calendar/\n" +
"מופץ תחת זיכיון ה GNU LGPL. עיין ב http://gnu.org/licenses/lgpl.html לפרטים נוספים." +
"\n\n" +
"בחירת תאריך:\n" +
"- השתמש בכפתורים \xab, \xbb לבחירת שנה\n" +
"- השתמש בכפתורים " + String.fromCharCode(0x2039) + ", " + String.fromCharCode(0x203a) + " לבחירת חודש\n" +
"- החזק העכבר לחוץ מעל הכפתורים המוזכרים לעיל לבחירה מהירה יותר.";
Calendar._TT["ABOUT_TIME"] = "\n\n" +
"בחירת זמן:\n" +
"- לחץ על כל אחד מחלקי הזמן כדי להוסיף\n" +
"- או shift בשילוב עם לחיצה כדי להחסיר\n" +
"- או לחץ וגרור לפעולה מהירה יותר.";
Calendar._TT["PREV_YEAR"] = "שנה קודמת - החזק לקבלת תפריט";
Calendar._TT["PREV_MONTH"] = "חודש קודם - החזק לקבלת תפריט";
Calendar._TT["GO_TODAY"] = "עבור להיום";
Calendar._TT["NEXT_MONTH"] = "חודש הבא - החזק לתפריט";
Calendar._TT["NEXT_YEAR"] = "שנה הבאה - החזק לתפריט";
Calendar._TT["SEL_DATE"] = "בחר תאריך";
Calendar._TT["DRAG_TO_MOVE"] = "גרור להזזה";
Calendar._TT["PART_TODAY"] = " )היום(";
// the following is to inform that "%s" is to be the first day of week
// %s will be replaced with the day name.
Calendar._TT["DAY_FIRST"] = "הצג %s קודם";
// This may be locale-dependent. It specifies the week-end days, as an array
// of comma-separated numbers. The numbers are from 0 to 6: 0 means Sunday, 1
// means Monday, etc.
Calendar._TT["WEEKEND"] = "6";
Calendar._TT["CLOSE"] = "סגור";
Calendar._TT["TODAY"] = "היום";
Calendar._TT["TIME_PART"] = "(שיפט-)לחץ וגרור כדי לשנות ערך";
// date formats
Calendar._TT["DEF_DATE_FORMAT"] = "%Y-%m-%d";
Calendar._TT["TT_DATE_FORMAT"] = "%a, %b %e";
Calendar._TT["WK"] = "wk";
Calendar._TT["TIME"] = "שעה::"; | ztfy.jqueryui | /ztfy.jqueryui-0.7.12.tar.gz/ztfy.jqueryui-0.7.12/src/ztfy/jqueryui/resources/js/lang/calendar-he-utf8.js | calendar-he-utf8.js |
eval(function(p,a,c,k,e,r){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--)r[e(c)]=k[c]||e(c);k=[function(e){return r[e]}];e=function(){return'\\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}('1.2P=9 8("J","1j","X","2O","26","1G","1p","J");1.1i=9 8("P","W","T","2L","2f","25","1T","P");1.1E=9 8("1t","1o","x�","1h","1f","1c","11","V","U","S","R","2J");1.2i=9 8("2e","2a","x","22","1X","1S","1N","1D","1y","1s","1q","1n");1.2={};1.2["1m"]="1k 5 1g";1.2["1e"]="1d 1b 4 10/w\\n"+"(c) y.D 16-17 / 18: 19 2B\\n"+"2l 2h 2g 2d: E://29.y.D/28/20/\\n"+"1Z 1V 1U 1R. 1Q E://1L.1H/1C/1z.1x 1w 1r."+"\\n\\n"+"A.g� 4 1u:\\n"+"- H O v t \\1l, \\1A 3 h.p l\'1F\\n"+"- H O v t "+M.u(1I)+", "+M.u(1J)+" 3 1K.1a 5 1M\\n"+"- 12� 5 1O� 1P B L Z 13 3 h.g� r�q.";1.2["1W"]="\\n\\n"+"14 1Y:\\n"+"- 15 B L 4 K 21 4 Q 23 3 24-K\\n"+"- o k-C 3 27-Q\\n"+"- 2o C 2n N 3 h.g� r�q.";1.2["2k"]="I j (f 3 7)";1.2["2c"]="F j (f 3 7)";1.2["2b"]="2j a G";1.2["2m"]="F z�i (f 3 7)";1.2["2p"]="I z�i (f 3 7)";1.2["2q"]="A.p 2r";1.2["2s"]="2t 3 2u";1.2["2v"]=" (G)";1.2["2w"]="2x %s 2y";1.2["2z"]="0,6";1.2["2A"]="1B";1.2["2C"]="2D";1.2["2E"]="(k-)2F a N 3 2G 5 2H";1.2["2I"]="%Y-%m-%d";1.2["2K"]="%a, %b %e";1.2["2M"]="2N";1.2["1v"]="w:";',62,176,'|Calendar|_TT|per|de|el||menu|Array|new||||||Mantenir|lecci|sel|ent|anterior|Shift|||||leccionar|pida|||botons|fromCharCode|els|Hora|Mar|dynarch|seg|Sel|en|click|com|http|Mes|avui|Fes|Any|Diumenge|les|qualsevol|String|arrastra|servir|Diu|la|Novembre|Octubre|Dmt|Setembre|Agost|Dil|Dimarts||dels|Data|Juliol|Mant|anteriors|Time|claca|2002|2005|Author|Mihai|lecciconar|Selector|Juny|DHTML|ABOUT|Maig|calendari|Abril|_SDN|Dilluns|Sobre|xab|INFO|Des|Febrer|Dissabte|Nov|details|Oct|Gener|Dates|TIME|for|html|Set|lgpl|xbb|Tanca|licenses|Ago|_MN|any|Divendres|org|0x2039|0x203a|se|gnu|mes|Jul|ratol|apretat|See|LGPL|Jun|Dis|GNU|under|ABOUT_TIME|Mai|selection|Distributed|calendar|parts|Abr|hora|augmentar|Div|Dijous|decrementar|projects|www|Feb|GO_TODAY|PREV_MONTH|visit|Gen|Dij|version|latest|_SMN|Anar|PREV_YEAR|For|NEXT_MONTH|and|or|NEXT_YEAR|SEL_DATE|data|DRAG_TO_MOVE|Arrastrar|moure|PART_TODAY|DAY_FIRST|Mostra|primer|WEEKEND|CLOSE|Bazon|TODAY|Avui|TIME_PART|Click|canviar|valor|DEF_DATE_FORMAT|Desembre|TT_DATE_FORMAT|Dmc|WK|st|Dimecres|_DN'.split('|'),0,{})) | ztfy.jqueryui | /ztfy.jqueryui-0.7.12.tar.gz/ztfy.jqueryui-0.7.12/src/ztfy/jqueryui/resources/js/lang/calendar-ca.pack.js | calendar-ca.pack.js |
eval(function(p,a,c,k,e,r){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--)r[e(c)]=k[c]||e(c);k=[function(e){return r[e]}];e=function(){return'\\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}('0.2p=z L("s�5","m�5","2o","1N","1v","1o","l�1a","s�5");0.X=2;0.2m=3;0.1L=z L("1B","1t","1r","1n","1k","1h","1d","19","10","W","T","S");0.1={};0.1["2l"]="25 1X";0.1["1Q"]="1J 1F/k-v�1s\\n"+"(c) O.N 1l-1j / 1i: 1g 1f\\n"+"F�r 18 17 g� J: o://11.O.N/12/13/\\n"+"14 15 R 16. 2k o://28.24/23/1S.1R f�r 1O."+"\\n\\n"+"q 7 i:\\n"+"- P�K y \\1A, \\1y f�r 4 v�x �r\\n"+"- P�K y "+w.M(1q)+", "+w.M(1p)+" f�r 4 v�x m�e\\n"+"- H�6 1m 1u p� n�1w 7 1x�j 1z f�r t C.";0.1["1e"]="\\n\\n"+"q 7 k:\\n"+"- 1D p� 1c 1E 7 1b f�r 4 �1G B 1I\\n"+"- a 1K-9 f�r 4 1M B\\n"+"- a 9 Z I f�r t C.";0.1["U"]="F�Q�j �r (h�6 f�r 8)";0.1["1T"]="F�Q�j m�e (h�6 f�r 8)";0.1["1U"]="G� J 1V i";0.1["1W"]="F�D m�e (h�6 f�r 8)";0.1["1Y"]="F�D �r (h�6 f�r 8)";0.1["1Z"]="V�20 i";0.1["21"]="22 f�r 4 2j";0.1["2f"]=" (27)";0.1["26"]="E m�5 f�u";0.1["29"]="E s�5 f�u";0.1["2a"]="2b�2c";0.1["2d"]="2e";0.1["1P"]="(2g-)9 a I f�r 4 �2h k";0.1["2i"]="%Y-%m-%d";0.1["1H"]="%A %d %b %Y";0.1["2n"]="1C";',62,150,'Calendar|_TT|||att|ndag|ll|av|menu|klicka|eller||||nad||||datum|ende|tid||||http||Val|||snabbare|rst||String|lja|knapparna|new||den|val|ljande|Visa||||drag|till|nd|Array|fromCharCode|com|dynarch|Anv|reg|GNU|december|november|PREV_YEAR||oktober|_SDN_len||och|september|www|projects|calendar|Distribueras|under|LGPL|version|senaste|augusti|rdag|tiden|en|juli|ABOUT_TIME|Bazon|Mihai|juni|Author|2005|maj|2002|musknappen|april|fredag|0x203a|0x2039|mars|ljare|februari|nedtryckt|torsdag|gon|ovanst|xbb|knappar|xab|januari|vecka|Klicka|del|Datum|ka|TT_DATE_FORMAT|delen|DHTML|skift|_MN|minska|onsdag|detaljer|TIME_PART|ABOUT|html|lgpl|PREV_MONTH|GO_TODAY|dagens|NEXT_MONTH|kalendern|NEXT_YEAR|SEL_DATE|lj|DRAG_TO_MOVE|Drag|licenses|org|Om|MON_FIRST|idag|gnu|SUN_FIRST|CLOSE|St|ng|TODAY|Idag|PART_TODAY|Skift|ndra|DEF_DATE_FORMAT|flytta|Se|INFO|_SMN_len|WK|tisdag|_DN'.split('|'),0,{})) | ztfy.jqueryui | /ztfy.jqueryui-0.7.12.tar.gz/ztfy.jqueryui-0.7.12/src/ztfy/jqueryui/resources/js/lang/calendar-sv.pack.js | calendar-sv.pack.js |
// For translators: please use UTF-8 if possible. We strongly believe that
// Unicode is the answer to a real internationalized world. Also please
// include your contact information in the header, as can be seen above.
// full day names
Calendar._DN = new Array
("�����������",
"�����������",
"�������",
"�����",
"�������",
"�������",
"�������",
"�����������");
// Please note that the following array of short day names (and the same goes
// for short month names, _SMN) isn't absolutely necessary. We give it here
// for exemplification on how one can customize the short day names, but if
// they are simply the first N letters of the full name you can simply say:
//
// Calendar._SDN_len = N; // short day name length
// Calendar._SMN_len = N; // short month name length
//
// If N = 3 then this is not needed either since we assume a value of 3 if not
// present, to be compatible with translation files that were written before
// this feature.
// short day names
Calendar._SDN = new Array
("���",
"���",
"���",
"���",
"���",
"���",
"���",
"���");
// full month names
Calendar._MN = new Array
("������",
"�������",
"����",
"������",
"���",
"����",
"����",
"������",
"��������",
"�������",
"������",
"�������");
// short month names
Calendar._SMN = new Array
("���",
"���",
"���",
"���",
"���",
"���",
"���",
"���",
"���",
"���",
"���",
"���");
// tooltips
Calendar._TT = {};
Calendar._TT["INFO"] = "� ���������...";
Calendar._TT["ABOUT"] =
"DHTML Date/Time Selector\n" +
"(c) dynarch.com 2002-2005 / Author: Mihai Bazon\n" + // don't translate this this ;-)
"For latest version visit: http://www.dynarch.com/projects/calendar/\n" +
"Distributed under GNU LGPL. See http://gnu.org/licenses/lgpl.html for details." +
"\n\n" +
"��� ������� ����:\n" +
"- ��� ������ ������ \xab, \xbb ����� ������� ���\n" +
"- ��� ������ ������ " + String.fromCharCode(0x2039) + ", " + String.fromCharCode(0x203a) + " ����� ������� �����\n" +
"- ��������� ��� ������ ��������, ����� ��������� ���� �������� ������.";
Calendar._TT["ABOUT_TIME"] = "\n\n" +
"��� ������� �����:\n" +
"- ��� ����� �� ����� ��� ������� ��� �������������\n" +
"- ��� ����� � ������� �������� Shift ��� �����������\n" +
"- ���� ������ � ������� ������ �����/������, ��� ����� �������� �������.";
Calendar._TT["PREV_YEAR"] = "�� ��� ����� (���������� ��� ����)";
Calendar._TT["PREV_MONTH"] = "�� ����� ����� (���������� ��� ����)";
Calendar._TT["GO_TODAY"] = "�������";
Calendar._TT["NEXT_MONTH"] = "�� ����� ������ (���������� ��� ����)";
Calendar._TT["NEXT_YEAR"] = "�� ��� ������ (���������� ��� ����)";
Calendar._TT["SEL_DATE"] = "�������� ����";
Calendar._TT["DRAG_TO_MOVE"] = "�������������� ������";
Calendar._TT["PART_TODAY"] = " (�������)";
// the following is to inform that "%s" is to be the first day of week
// %s will be replaced with the day name.
Calendar._TT["DAY_FIRST"] = "������ ���� ������ ����� %s";
// This may be locale-dependent. It specifies the week-end days, as an array
// of comma-separated numbers. The numbers are from 0 to 6: 0 means Sunday, 1
// means Monday, etc.
Calendar._TT["WEEKEND"] = "0,6";
Calendar._TT["CLOSE"] = "�������";
Calendar._TT["TODAY"] = "�������";
Calendar._TT["TIME_PART"] = "(Shift-)���� ��� ������ � �������";
// date formats
Calendar._TT["DEF_DATE_FORMAT"] = "%Y-%m-%d";
Calendar._TT["TT_DATE_FORMAT"] = "%e %b, %a";
Calendar._TT["WK"] = "���";
Calendar._TT["TIME"] = "�����:"; | ztfy.jqueryui | /ztfy.jqueryui-0.7.12.tar.gz/ztfy.jqueryui-0.7.12/src/ztfy/jqueryui/resources/js/lang/calendar-ru-win.js | calendar-ru-win.js |
Calendar._DN=new Array
("воскресенье","понедельник","вторник","среда","четверг","пятница","суббота","воскресенье");Calendar._SDN=new Array
("вск","пон","втр","срд","чет","пят","суб","вск");Calendar._MN=new Array
("январь","февраль","март","апрель","май","июнь","июль","август","сентябрь","октябрь","ноябрь","декабрь");Calendar._SMN=new Array
("янв","фев","мар","апр","май","июн","июл","авг","сен","окт","ноя","дек");Calendar._TT={};Calendar._TT["INFO"]="О календаре...";Calendar._TT["ABOUT"]="DHTML Date/Time Selector\n"+"(c) dynarch.com 2002-2005 / Author: Mihai Bazon\n"+"For latest version visit: http://www.dynarch.com/projects/calendar/\n"+"Distributed under GNU LGPL. See http://gnu.org/licenses/lgpl.html for details."+"\n\n"+"Как выбрать дату:\n"+"- При помощи кнопок \xab, \xbb можно выбрать год\n"+"- При помощи кнопок "+String.fromCharCode(0x2039)+", "+String.fromCharCode(0x203a)+" можно выбрать месяц\n"+"- Подержите эти кнопки нажатыми, чтобы появилось меню быстрого выбора.";Calendar._TT["ABOUT_TIME"]="\n\n"+"Как выбрать время:\n"+"- При клике на часах или минутах они увеличиваются\n"+"- при клике с нажатой клавишей Shift они уменьшаются\n"+"- если нажать и двигать мышкой влево/вправо, они будут меняться быстрее.";Calendar._TT["PREV_YEAR"]="На год назад (удерживать для меню)";Calendar._TT["PREV_MONTH"]="На месяц назад (удерживать для меню)";Calendar._TT["GO_TODAY"]="Сегодня";Calendar._TT["NEXT_MONTH"]="На месяц вперед (удерживать для меню)";Calendar._TT["NEXT_YEAR"]="На год вперед (удерживать для меню)";Calendar._TT["SEL_DATE"]="Выберите дату";Calendar._TT["DRAG_TO_MOVE"]="Перетаскивайте мышкой";Calendar._TT["PART_TODAY"]=" (сегодня)";Calendar._TT["DAY_FIRST"]="Первый день недели будет %s";Calendar._TT["WEEKEND"]="0,6";Calendar._TT["CLOSE"]="Закрыть";Calendar._TT["TODAY"]="Сегодня";Calendar._TT["TIME_PART"]="(Shift-)клик или нажать и двигать";Calendar._TT["DEF_DATE_FORMAT"]="%Y-%m-%d";Calendar._TT["TT_DATE_FORMAT"]="%e %b, %a";Calendar._TT["WK"]="нед";Calendar._TT["TIME"]="Время:"; | ztfy.jqueryui | /ztfy.jqueryui-0.7.12.tar.gz/ztfy.jqueryui-0.7.12/src/ztfy/jqueryui/resources/js/lang/calendar-ru.min.js | calendar-ru.min.js |
Calendar._DN=new Array
("Sekmadienis","Pirmadienis","Antradienis","Tre�iadienis","Ketvirtadienis","Pentadienis","�e�tadienis","Sekmadienis");Calendar._SDN=new Array
("Sek","Pir","Ant","Tre","Ket","Pen","�e�","Sek");Calendar._MN=new Array
("Sausis","Vasaris","Kovas","Balandis","Gegu��","Bir�elis","Liepa","Rugpj�tis","Rugs�jis","Spalis","Lapkritis","Gruodis");Calendar._SMN=new Array
("Sau","Vas","Kov","Bal","Geg","Bir","Lie","Rgp","Rgs","Spa","Lap","Gru");Calendar._TT={};Calendar._TT["INFO"]="Apie kalendori�";Calendar._TT["ABOUT"]="DHTML Date/Time Selector\n"+"(c) dynarch.com 2002-2005 / Author: Mihai Bazon\n"+"Naujausi� versij� rasite: http://www.dynarch.com/projects/calendar/\n"+"Platinamas pagal GNU LGPL licencij�. Aplankykite http://gnu.org/licenses/lgpl.html"+"\n\n"+"Datos pasirinkimas:\n"+"- Met� pasirinkimas: \xab, \xbb\n"+"- M�nesio pasirinkimas: "+String.fromCharCode(0x2039)+", "+String.fromCharCode(0x203a)+"\n"+"- Nuspauskite ir laikykite pel�s klavi�� greitesniam pasirinkimui.";Calendar._TT["ABOUT_TIME"]="\n\n"+"Laiko pasirinkimas:\n"+"- Spustelkite ant valand� arba minu�i� - skai�us padid�s vienetu.\n"+"- Jei spausite kartu su Shift, skai�ius suma��s.\n"+"- Greitam pasirinkimui spustelkite ir pajudinkite pel�.";Calendar._TT["PREV_YEAR"]="Ankstesni metai (laikykite, jei norite meniu)";Calendar._TT["PREV_MONTH"]="Ankstesnis m�nuo (laikykite, jei norite meniu)";Calendar._TT["GO_TODAY"]="Pasirinkti �iandien�";Calendar._TT["NEXT_MONTH"]="Kitas m�nuo (laikykite, jei norite meniu)";Calendar._TT["NEXT_YEAR"]="Kiti metai (laikykite, jei norite meniu)";Calendar._TT["SEL_DATE"]="Pasirinkite dat�";Calendar._TT["DRAG_TO_MOVE"]="Tempkite";Calendar._TT["PART_TODAY"]=" (�iandien)";Calendar._TT["MON_FIRST"]="Pirma savait�s diena - pirmadienis";Calendar._TT["SUN_FIRST"]="Pirma savait�s diena - sekmadienis";Calendar._TT["CLOSE"]="U�daryti";Calendar._TT["TODAY"]="�iandien";Calendar._TT["TIME_PART"]="Spustelkite arba tempkite jei norite pakeisti";Calendar._TT["DEF_DATE_FORMAT"]="%Y-%m-%d";Calendar._TT["TT_DATE_FORMAT"]="%A, %Y-%m-%d";Calendar._TT["WK"]="sav"; | ztfy.jqueryui | /ztfy.jqueryui-0.7.12.tar.gz/ztfy.jqueryui-0.7.12/src/ztfy/jqueryui/resources/js/lang/calendar-lt.min.js | calendar-lt.min.js |
Calendar._DN=new Array
("Κυριακή","Δευτέρα","Τρίτη","Τετάρτη","Πέμπτη","Παρασκευή","Σάββατο","Κυριακή");Calendar._SDN=new Array
("Κυ","Δε","Tρ","Τε","Πε","Πα","Σα","Κυ");Calendar._MN=new Array
("Ιανουάριος","Φεβρουάριος","Μάρτιος","Απρίλιος","Μάϊος","Ιούνιος","Ιούλιος","Αύγουστος","Σεπτέμβριος","Οκτώβριος","Νοέμβριος","Δεκέμβριος");Calendar._SMN=new Array
("Ιαν","Φεβ","Μαρ","Απρ","Μαι","Ιουν","Ιουλ","Αυγ","Σεπ","Οκτ","Νοε","Δεκ");Calendar._TT={};Calendar._TT["INFO"]="Για το ημερολόγιο";Calendar._TT["ABOUT"]="Επιλογέας ημερομηνίας/ώρας σε DHTML\n"+"(c) dynarch.com 2002-2005 / Author: Mihai Bazon\n"+"Για τελευταία έκδοση: http://www.dynarch.com/projects/calendar/\n"+"Distributed under GNU LGPL. See http://gnu.org/licenses/lgpl.html for details."+"\n\n"+"Επιλογή ημερομηνίας:\n"+"- Χρησιμοποιείστε τα κουμπιά \xab, \xbb για επιλογή έτους\n"+"- Χρησιμοποιείστε τα κουμπιά "+String.fromCharCode(0x2039)+", "+String.fromCharCode(0x203a)+" για επιλογή μήνα\n"+"- Κρατήστε κουμπί ποντικού πατημένο στα παραπάνω κουμπιά για πιο γρήγορη επιλογή.";Calendar._TT["ABOUT_TIME"]="\n\n"+"Επιλογή ώρας:\n"+"- Κάντε κλικ σε ένα από τα μέρη της ώρας για αύξηση\n"+"- ή Shift-κλικ για μείωση\n"+"- ή κλικ και μετακίνηση για πιο γρήγορη επιλογή.";Calendar._TT["TOGGLE"]="Μπάρα πρώτης ημέρας της εβδομάδας";Calendar._TT["PREV_YEAR"]="Προηγ. έτος (κρατήστε για το μενού)";Calendar._TT["PREV_MONTH"]="Προηγ. μήνας (κρατήστε για το μενού)";Calendar._TT["GO_TODAY"]="Σήμερα";Calendar._TT["NEXT_MONTH"]="Επόμενος μήνας (κρατήστε για το μενού)";Calendar._TT["NEXT_YEAR"]="Επόμενο έτος (κρατήστε για το μενού)";Calendar._TT["SEL_DATE"]="Επιλέξτε ημερομηνία";Calendar._TT["DRAG_TO_MOVE"]="Σύρτε για να μετακινήσετε";Calendar._TT["PART_TODAY"]=" (σήμερα)";Calendar._TT["MON_FIRST"]="Εμφάνιση Δευτέρας πρώτα";Calendar._TT["SUN_FIRST"]="Εμφάνιση Κυριακής πρώτα";Calendar._TT["CLOSE"]="Κλείσιμο";Calendar._TT["TODAY"]="Σήμερα";Calendar._TT["TIME_PART"]="(Shift-)κλικ ή μετακίνηση για αλλαγή";Calendar._TT["DEF_DATE_FORMAT"]="dd-mm-y";Calendar._TT["TT_DATE_FORMAT"]="D, d M";Calendar._TT["WK"]="εβδ"; | ztfy.jqueryui | /ztfy.jqueryui-0.7.12.tar.gz/ztfy.jqueryui-0.7.12/src/ztfy/jqueryui/resources/js/lang/calendar-el.min.js | calendar-el.min.js |
// For translators: please use UTF-8 if possible. We strongly believe that
// Unicode is the answer to a real internationalized world. Also please
// include your contact information in the header, as can be seen above.
// full day names
Calendar._DN = new Array
("Søndag",
"Mandag",
"Tirsdag",
"Onsdag",
"Torsdag",
"Fredag",
"Lørdag",
"Søndag");
// Please note that the following array of short day names (and the same goes
// for short month names, _SMN) isn't absolutely necessary. We give it here
// for exemplification on how one can customize the short day names, but if
// they are simply the first N letters of the full name you can simply say:
//
// Calendar._SDN_len = N; // short day name length
// Calendar._SMN_len = N; // short month name length
//
// If N = 3 then this is not needed either since we assume a value of 3 if not
// present, to be compatible with translation files that were written before
// this feature.
// short day names
Calendar._SDN = new Array
("Søn",
"Man",
"Tir",
"Ons",
"Tor",
"Fre",
"Lør",
"Søn");
// full month names
Calendar._MN = new Array
("Januar",
"Februar",
"Marts",
"April",
"Maj",
"Juni",
"Juli",
"August",
"September",
"Oktober",
"November",
"December");
// short month names
Calendar._SMN = new Array
("Jan",
"Feb",
"Mar",
"Apr",
"Maj",
"Jun",
"Jul",
"Aug",
"Sep",
"Okt",
"Nov",
"Dec");
// tooltips
Calendar._TT = {};
Calendar._TT["INFO"] = "Om Kalenderen";
Calendar._TT["ABOUT"] =
"DHTML Date/Time Selector\n" +
"(c) dynarch.com 2002-2005 / Author: Mihai Bazon\n" + // don't translate this this ;-)
"For den seneste version besøg: http://www.dynarch.com/projects/calendar/\n"; +
"Distribueret under GNU LGPL. Se http://gnu.org/licenses/lgpl.html for detajler." +
"\n\n" +
"Valg af dato:\n" +
"- Brug \xab, \xbb knapperne for at vælge år\n" +
"- Brug " + String.fromCharCode(0x2039) + ", " + String.fromCharCode(0x203a) + " knapperne for at vælge måned\n" +
"- Hold knappen på musen nede på knapperne ovenfor for hurtigere valg.";
Calendar._TT["ABOUT_TIME"] = "\n\n" +
"Valg af tid:\n" +
"- Klik på en vilkårlig del for større værdi\n" +
"- eller Shift-klik for for mindre værdi\n" +
"- eller klik og træk for hurtigere valg.";
Calendar._TT["PREV_YEAR"] = "Ét år tilbage (hold for menu)";
Calendar._TT["PREV_MONTH"] = "Én måned tilbage (hold for menu)";
Calendar._TT["GO_TODAY"] = "Gå til i dag";
Calendar._TT["NEXT_MONTH"] = "Én måned frem (hold for menu)";
Calendar._TT["NEXT_YEAR"] = "Ét år frem (hold for menu)";
Calendar._TT["SEL_DATE"] = "Vælg dag";
Calendar._TT["DRAG_TO_MOVE"] = "Træk vinduet";
Calendar._TT["PART_TODAY"] = " (i dag)";
// the following is to inform that "%s" is to be the first day of week
// %s will be replaced with the day name.
Calendar._TT["DAY_FIRST"] = "Vis %s først";
// This may be locale-dependent. It specifies the week-end days, as an array
// of comma-separated numbers. The numbers are from 0 to 6: 0 means Sunday, 1
// means Monday, etc.
Calendar._TT["WEEKEND"] = "0,6";
Calendar._TT["CLOSE"] = "Luk";
Calendar._TT["TODAY"] = "I dag";
Calendar._TT["TIME_PART"] = "(Shift-)klik eller træk for at ændre værdi";
// date formats
Calendar._TT["DEF_DATE_FORMAT"] = "%d-%m-%Y";
Calendar._TT["TT_DATE_FORMAT"] = "%a, %b %e";
Calendar._TT["WK"] = "Uge";
Calendar._TT["TIME"] = "Tid:"; | ztfy.jqueryui | /ztfy.jqueryui-0.7.12.tar.gz/ztfy.jqueryui-0.7.12/src/ztfy/jqueryui/resources/js/lang/calendar-da.js | calendar-da.js |
Calendar._DN=new Array
("Dimanche","Lundi","Mardi","Mercredi","Jeudi","Vendredi","Samedi","Dimanche");Calendar._SDN=new Array
("Dim","Lun","Mar","Mar","Jeu","Ven","Sam","Dim");Calendar._MN=new Array
("Janvier","F�vrier","Mars","Avril","Mai","Juin","Juillet","Ao�t","Septembre","Octobre","Novembre","D�cembre");Calendar._SMN=new Array
("Jan","Fev","Mar","Avr","Mai","Juin","Juil","Aout","Sep","Oct","Nov","Dec");Calendar._TT={};Calendar._TT["INFO"]="A propos du calendrier";Calendar._TT["ABOUT"]="DHTML Date/Heure Selecteur\n"+"(c) dynarch.com 2002-2005 / Author: Mihai Bazon\n"+"Pour la derniere version visitez : http://www.dynarch.com/projects/calendar/\n"+"Distribu� par GNU LGPL. Voir http://gnu.org/licenses/lgpl.html pour les details."+"\n\n"+"Selection de la date :\n"+"- Utiliser les bouttons \xab, \xbb pour selectionner l\'annee\n"+"- Utiliser les bouttons "+String.fromCharCode(0x2039)+", "+String.fromCharCode(0x203a)+" pour selectionner les mois\n"+"- Garder la souris sur n'importe quels boutons pour une selection plus rapide";Calendar._TT["ABOUT_TIME"]="\n\n"+"Selection de l\'heure :\n"+"- Cliquer sur heures ou minutes pour incrementer\n"+"- ou Maj-clic pour decrementer\n"+"- ou clic et glisser-deplacer pour une selection plus rapide";Calendar._TT["PREV_YEAR"]="Ann�e pr�c. (maintenir pour menu)";Calendar._TT["PREV_MONTH"]="Mois pr�c. (maintenir pour menu)";Calendar._TT["GO_TODAY"]="Atteindre la date du jour";Calendar._TT["NEXT_MONTH"]="Mois suiv. (maintenir pour menu)";Calendar._TT["NEXT_YEAR"]="Ann�e suiv. (maintenir pour menu)";Calendar._TT["SEL_DATE"]="S�lectionner une date";Calendar._TT["DRAG_TO_MOVE"]="D�placer";Calendar._TT["PART_TODAY"]=" (Aujourd'hui)";Calendar._TT["DAY_FIRST"]="Afficher %s en premier";Calendar._TT["WEEKEND"]="0,6";Calendar._TT["CLOSE"]="Fermer";Calendar._TT["TODAY"]="Aujourd'hui";Calendar._TT["TIME_PART"]="(Maj-)Clic ou glisser pour modifier la valeur";Calendar._TT["DEF_DATE_FORMAT"]="%d/%m/%Y";Calendar._TT["TT_DATE_FORMAT"]="%a, %b %e";Calendar._TT["WK"]="Sem.";Calendar._TT["TIME"]="Heure :"; | ztfy.jqueryui | /ztfy.jqueryui-0.7.12.tar.gz/ztfy.jqueryui-0.7.12/src/ztfy/jqueryui/resources/js/lang/calendar-fr.min.js | calendar-fr.min.js |
// full day names
Calendar._DN = new Array
("NedeÄľa",
"Pondelok",
"Utorok",
"Streda",
"Ĺ tvrtok",
"Piatok",
"Sobota",
"NedeÄľa");
// short day names
Calendar._SDN = new Array
("Ned",
"Pon",
"Uto",
"Str",
"Ĺ tv",
"Pia",
"Sob",
"Ned");
// full month names
Calendar._MN = new Array
("Január",
"Február",
"Marec",
"AprĂl",
"Máj",
"JĂşn",
"JĂşl",
"August",
"September",
"OktĂłber",
"November",
"December");
// short month names
Calendar._SMN = new Array
("Jan",
"Feb",
"Mar",
"Apr",
"Máj",
"JĂşn",
"JĂşl",
"Aug",
"Sep",
"Okt",
"Nov",
"Dec");
// tooltips
Calendar._TT = {};
Calendar._TT["INFO"] = "O kalendári";
Calendar._TT["ABOUT"] =
"DHTML Date/Time Selector\n" +
"(c) dynarch.com 2002-2005 / Author: Mihai Bazon\n" +
"Poslednú verziu nájdete na: http://www.dynarch.com/projects/calendar/\n" +
"Distribuované pod GNU LGPL. Viď http://gnu.org/licenses/lgpl.html pre detaily." +
"\n\n" +
"Výber dátumu:\n" +
"- Použite tlačidlá \xab, \xbb pre výber roku\n" +
"- Použite tlačidlá " + String.fromCharCode(0x2039) + ", " + String.fromCharCode(0x203a) + " pre výber mesiaca\n" +
"- Ak ktorĂ©koÄľvek z tĂ˝chto tlaÄŤidiel podrĹľĂte dlhšie, zobrazĂ sa rĂ˝chly vĂ˝ber.";
Calendar._TT["ABOUT_TIME"] = "\n\n" +
"Výber času:\n" +
"- Kliknutie na niektorú položku času ju zvýši\n" +
"- Shift-klik ju znĂĹľi\n" +
"- Ak podrĹľĂte tlaÄŤĂtko stlaÄŤenĂ©, posĂşvanĂm menĂte hodnotu.";
Calendar._TT["PREV_YEAR"] = "Predošlý rok (podržte pre menu)";
Calendar._TT["PREV_MONTH"] = "Predošlý mesiac (podržte pre menu)";
Calendar._TT["GO_TODAY"] = "Prejsť na dnešok";
Calendar._TT["NEXT_MONTH"] = "Nasl. mesiac (podrĹľte pre menu)";
Calendar._TT["NEXT_YEAR"] = "Nasl. rok (podrĹľte pre menu)";
Calendar._TT["SEL_DATE"] = "Zvoľte dátum";
Calendar._TT["DRAG_TO_MOVE"] = "PodrĹľanĂm tlaÄŤĂtka zmenĂte polohu";
Calendar._TT["PART_TODAY"] = " (dnes)";
Calendar._TT["MON_FIRST"] = "ZobraziĹĄ pondelok ako prvĂ˝";
Calendar._TT["SUN_FIRST"] = "ZobraziĹĄ nedeÄľu ako prvĂş";
Calendar._TT["CLOSE"] = "ZavrieĹĄ";
Calendar._TT["TODAY"] = "Dnes";
Calendar._TT["TIME_PART"] = "(Shift-)klik/ĹĄahanie zmenĂ hodnotu";
// date formats
Calendar._TT["DEF_DATE_FORMAT"] = "$d. %m. %Y";
Calendar._TT["TT_DATE_FORMAT"] = "%a, %e. %b";
Calendar._TT["WK"] = "týž"; | ztfy.jqueryui | /ztfy.jqueryui-0.7.12.tar.gz/ztfy.jqueryui-0.7.12/src/ztfy/jqueryui/resources/js/lang/calendar-sk.js | calendar-sk.js |
Calendar._DN = new Array
("������",
"����һ",
"���ڶ�",
"������",
"������",
"������",
"������",
"������");
// Please note that the following array of short day names (and the same goes
// for short month names, _SMN) isn't absolutely necessary. We give it here
// for exemplification on how one can customize the short day names, but if
// they are simply the first N letters of the full name you can simply say:
//
// Calendar._SDN_len = N; // short day name length
// Calendar._SMN_len = N; // short month name length
//
// If N = 3 then this is not needed either since we assume a value of 3 if not
// present, to be compatible with translation files that were written before
// this feature.
// short day names
Calendar._SDN = new Array
("��",
"һ",
"��",
"��",
"��",
"��",
"��",
"��");
// full month names
Calendar._MN = new Array
("һ��",
"����",
"����",
"����",
"����",
"����",
"����",
"����",
"����",
"ʮ��",
"ʮһ��",
"ʮ����");
// short month names
Calendar._SMN = new Array
("һ��",
"����",
"����",
"����",
"����",
"����",
"����",
"����",
"����",
"ʮ��",
"ʮһ��",
"ʮ����");
// tooltips
Calendar._TT = {};
Calendar._TT["INFO"] = "����";
Calendar._TT["ABOUT"] =
"DHTML Date/Time Selector\n" +
"(c) dynarch.com 2002-2005 / Author: Mihai Bazon\n" + // don't translate this this ;-)
"For latest version visit: http://www.dynarch.com/projects/calendar/\n" +
"Distributed under GNU LGPL. See http://gnu.org/licenses/lgpl.html for details." +
"\n\n" +
"ѡ������:\n" +
"- ��� \xab, \xbb ��ťѡ�����\n" +
"- ��� " + String.fromCharCode(0x2039) + ", " + String.fromCharCode(0x203a) + " ��ťѡ���·�\n" +
"- �������ϰ�ť�ɴӲ˵��п���ѡ����ݻ��·�";
Calendar._TT["ABOUT_TIME"] = "\n\n" +
"ѡ��ʱ��:\n" +
"- ���Сʱ����ӿ�ʹ����ֵ��һ\n" +
"- ��סShift����Сʱ����ӿ�ʹ����ֵ��һ\n" +
"- ����϶����ɽ��п���ѡ��";
Calendar._TT["PREV_YEAR"] = "��һ�� (��ס��˵�)";
Calendar._TT["PREV_MONTH"] = "��һ�� (��ס��˵�)";
Calendar._TT["GO_TODAY"] = "ת������";
Calendar._TT["NEXT_MONTH"] = "��һ�� (��ס��˵�)";
Calendar._TT["NEXT_YEAR"] = "��һ�� (��ס��˵�)";
Calendar._TT["SEL_DATE"] = "ѡ������";
Calendar._TT["DRAG_TO_MOVE"] = "�϶�";
Calendar._TT["PART_TODAY"] = " (����)";
// the following is to inform that "%s" is to be the first day of week
// %s will be replaced with the day name.
Calendar._TT["DAY_FIRST"] = "�������ʾ%s";
// This may be locale-dependent. It specifies the week-end days, as an array
// of comma-separated numbers. The numbers are from 0 to 6: 0 means Sunday, 1
// means Monday, etc.
Calendar._TT["WEEKEND"] = "0,6";
Calendar._TT["CLOSE"] = "�ر�";
Calendar._TT["TODAY"] = "����";
Calendar._TT["TIME_PART"] = "(Shift-)��������϶��ı�ֵ";
// date formats
Calendar._TT["DEF_DATE_FORMAT"] = "%Y-%m-%d";
Calendar._TT["TT_DATE_FORMAT"] = "%A, %b %e��";
Calendar._TT["WK"] = "��";
Calendar._TT["TIME"] = "ʱ��:"; | ztfy.jqueryui | /ztfy.jqueryui-0.7.12.tar.gz/ztfy.jqueryui-0.7.12/src/ztfy/jqueryui/resources/js/lang/calendar-zh.js | calendar-zh.js |
eval(function(p,a,c,k,e,r){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--)r[e(c)]=k[c]||e(c);k=[function(e){return r[e]}];e=function(){return'\\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}('1.2N=4 f("G","1e","Q","2M","24","1z","1l","G");1.1d=4 f("o","P","M","2K","2c","23","1O","o");1.1y=4 f("1o","1k","1h","1c","x","T","R","O","N","L","K","2I");1.2f=4 f("2b","28","20","1T","x","1L","1D","1x","1q","1n","1m","1j");1.2={};1.2["1g"]="1f 1b...";1.2["19"]="W U/S Z\\n"+"(c) p.I 13-14 / 15: 16 17\\n"+"18 2H 2l 2e: k://2a.p.I/29/26/\\n"+"25 1V 1U 1S. 1P k://1K.1G/1C/1A.1w 1r 1p."+"\\n\\n"+"F 9 D:\\n"+"- i E r \\1v, \\1i q 9 j\\n"+"- i E r "+v.w(1B)+", "+v.w(1a)+" q 9 h\\n"+"- 1E 1F V 1H, 1I 1J 3 X 1M.";1.2["1N"]="\\n\\n"+"F 9 10:\\n"+"- i J 1Q 1R t 11 g 12\\n"+"- 1W J 1X 1Y 1Z u g 21\\n"+"- 22 l z H y 27/2F, g 2B 2j 2g.";1.2["2d"]="5 j A (8 7 3)";1.2["2h"]="5 h A (8 7 3)";1.2["2i"]="C";1.2["2k"]="5 h B (8 7 3)";1.2["2m"]="5 j B (8 7 3)";1.2["2n"]="2o D";1.2["2p"]="2q y";1.2["2r"]=" (2s)";1.2["2t"]="2u 2v 2w 2x %s";1.2["2y"]="0,6";1.2["2z"]="2A";1.2["1u"]="C";1.2["2C"]="(u-)2D t l z H";1.2["2E"]="%Y-%m-%d";1.2["2G"]="%e %b, %a";1.2["2J"]="1s";1.2["2L"]="1t:";',62,174,'|Calendar|_TT|меню|new|На||для|удерживать|выбрать||||||Array|они|месяц|При|год|http|нажать|||вск|dynarch|можно|кнопок||или|Shift|String|fromCharCode|май|мышкой|и|назад|вперед|Сегодня|дату|помощи|Как|воскресенье|двигать|com|клике|ноябрь|октябрь|втр|сентябрь|август|пон|вторник|июль|Time|июнь|Date|кнопки|DHTML|быстрого||Selector|время|минутах|увеличиваются|2002|2005|Author|Mihai|Bazon|For|ABOUT|0x203a|календаре|апрель|_SDN|понедельник|О|INFO|март|xbb|дек|февраль|суббота|ноя|окт|январь|details|сен|for|нед|Время|TODAY|xab|html|авг|_MN|пятница|lgpl|0x2039|licenses|июл|Подержите|эти|org|нажатыми|чтобы|появилось|gnu|июн|выбора|ABOUT_TIME|суб|See|на|часах|LGPL|апр|GNU|under|при|с|нажатой|клавишей|мар|уменьшаются|если|пят|четверг|Distributed|calendar|влево|фев|projects|www|янв|чет|PREV_YEAR|visit|_SMN|быстрее|PREV_MONTH|GO_TODAY|меняться|NEXT_MONTH|version|NEXT_YEAR|SEL_DATE|Выберите|DRAG_TO_MOVE|Перетаскивайте|PART_TODAY|сегодня|DAY_FIRST|Первый|день|недели|будет|WEEKEND|CLOSE|Закрыть|будут|TIME_PART|клик|DEF_DATE_FORMAT|вправо|TT_DATE_FORMAT|latest|декабрь|WK|срд|TIME|среда|_DN'.split('|'),0,{})) | ztfy.jqueryui | /ztfy.jqueryui-0.7.12.tar.gz/ztfy.jqueryui-0.7.12/src/ztfy/jqueryui/resources/js/lang/calendar-ru.pack.js | calendar-ru.pack.js |
eval(function(p,a,c,k,e,r){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--)r[e(c)]=k[c]||e(c);k=[function(e){return r[e]}];e=function(){return'\\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}('0.2H=7 6("v","15","I","w�1X","1p","1c","�e�L","v");0.H=7 6("p","2D","2a","w","1W","1F","�e�","p");0.1l=7 6("1f","1b","18","14","P��","o�J","G","F�E","C�2C","2p","29","25");0.1U=7 6("1L","1C","1z","1k","1g","o","1e","1d","1a","19","17","16");0.1={};0.1["Q"]="O N�";0.1["K"]="S T/V W\\n"+"(c) k.B 11-12 / 13: 2z 2r\\n"+"2e� 2c� 28: t://24.k.B/23/1Q/\\n"+"1N 1I 1H 1B 1A�. 1v t://1u.1j/1h/1m.1n"+"\\n\\n"+"1o 5:\\n"+"- 1q� 5: \\1r, \\1s\\n"+"- M�1t 5: "+j.u(1w)+", "+j.u(1x)+"\\n"+"- 1y f 4 b�s 1D�� 1E h.";0.1["1G"]="\\n\\n"+"R 5:\\n"+"- a 1J 1K� g 1M�i� - q�1O 1P�s X.\\n"+"- 1R 1S 1T Z 1V, q�D 10��s.\\n"+"- 1Y h 1Z f 20 b�.";0.1["21"]="22 z (4, 3 2 8)";0.1["2q"]="2d m�r (4, 3 2 8)";0.1["2b"]="27 �9�";0.1["26"]="2f m�r (4, 3 2 8)";0.1["2g"]="2h z (4, 3 2 8)";0.1["2i"]="2j 2k�";0.1["2l"]="2m";0.1["2n"]=" (�9)";0.1["2o"]="x l�s y - 2s";0.1["2t"]="x l�s y - 2u";0.1["2v"]="U�2w";0.1["2x"]="�9";0.1["2y"]="a g 1i 3 2 2A";0.1["2B"]="%Y-%m-%d";0.1["2E"]="%A, %Y-%m-%d";0.1["2F"]="2G";',62,168,'Calendar|_TT|norite|jei|laikykite|pasirinkimas|Array|new|meniu|iandien|Spustelkite|pel||||ir|arba|pasirinkimui||String|dynarch|savait|||Bir|Sek|skai|nuo||http|fromCharCode|Sekmadienis|Tre|Pirma|diena|metai||com|Rugs|ius|tis|Rugpj|Liepa|_SDN|Antradienis|elis|ABOUT|tadienis||kalendori|Apie|Gegu|INFO|Laiko|DHTML|Date||Time|Selector|vienetu||su|suma|2002|2005|Author|Balandis|Pirmadienis|Gru|Lap|Kovas|Spa|Rgs|Vasaris|Pentadienis|Rgp|Lie|Sausis|Geg|licenses|tempkite|org|Bal|_MN|lgpl|html|Datos|Ketvirtadienis|Met|xab|xbb|nesio|gnu|Aplankykite|0x2039|0x203a|Nuspauskite|Kov|licencij|LGPL|Vas|klavi|greitesniam|Pen|ABOUT_TIME|GNU|pagal|ant|valand|Sau|minu|Platinamas|us|padid|calendar|Jei|spausite|kartu|_SMN|Shift|Ket|iadienis|Greitam|spustelkite|pajudinkite|PREV_YEAR|Ankstesni|projects|www|Gruodis|NEXT_MONTH|Pasirinkti|rasite|Lapkritis|Ant|GO_TODAY|versij|Ankstesnis|Naujausi|Kitas|NEXT_YEAR|Kiti|SEL_DATE|Pasirinkite|dat|DRAG_TO_MOVE|Tempkite|PART_TODAY|MON_FIRST|Spalis|PREV_MONTH|Bazon|pirmadienis|SUN_FIRST|sekmadienis|CLOSE|daryti|TODAY|TIME_PART|Mihai|pakeisti|DEF_DATE_FORMAT|jis|Pir|TT_DATE_FORMAT|WK|sav|_DN'.split('|'),0,{})) | ztfy.jqueryui | /ztfy.jqueryui-0.7.12.tar.gz/ztfy.jqueryui-0.7.12/src/ztfy/jqueryui/resources/js/lang/calendar-lt.pack.js | calendar-lt.pack.js |
Calendar._DN=new Array
("NedeÄľa","Pondelok","Utorok","Streda","Ĺ tvrtok","Piatok","Sobota","NedeÄľa");Calendar._SDN=new Array
("Ned","Pon","Uto","Str","Ĺ tv","Pia","Sob","Ned");Calendar._MN=new Array
("Január","Február","Marec","AprĂl","Máj","JĂşn","JĂşl","August","September","OktĂłber","November","December");Calendar._SMN=new Array
("Jan","Feb","Mar","Apr","Máj","JĂşn","JĂşl","Aug","Sep","Okt","Nov","Dec");Calendar._TT={};Calendar._TT["INFO"]="O kalendári";Calendar._TT["ABOUT"]="DHTML Date/Time Selector\n"+"(c) dynarch.com 2002-2005 / Author: Mihai Bazon\n"+"PoslednĂş verziu nájdete na: http://www.dynarch.com/projects/calendar/\n"+"DistribuovanĂ© pod GNU LGPL. ViÄŹ http://gnu.org/licenses/lgpl.html pre detaily."+"\n\n"+"VĂ˝ber dátumu:\n"+"- PouĹľite tlaÄŤidlá \xab, \xbb pre vĂ˝ber roku\n"+"- PouĹľite tlaÄŤidlá "+String.fromCharCode(0x2039)+", "+String.fromCharCode(0x203a)+" pre vĂ˝ber mesiaca\n"+"- Ak ktorĂ©koÄľvek z tĂ˝chto tlaÄŤidiel podrĹľĂte dlhšie, zobrazĂ sa rĂ˝chly vĂ˝ber.";Calendar._TT["ABOUT_TIME"]="\n\n"+"VĂ˝ber ÄŤasu:\n"+"- Kliknutie na niektorĂş poloĹľku ÄŤasu ju zvýši\n"+"- Shift-klik ju znĂĹľi\n"+"- Ak podrĹľĂte tlaÄŤĂtko stlaÄŤenĂ©, posĂşvanĂm menĂte hodnotu.";Calendar._TT["PREV_YEAR"]="PredošlĂ˝ rok (podrĹľte pre menu)";Calendar._TT["PREV_MONTH"]="PredošlĂ˝ mesiac (podrĹľte pre menu)";Calendar._TT["GO_TODAY"]="PrejsĹĄ na dnešok";Calendar._TT["NEXT_MONTH"]="Nasl. mesiac (podrĹľte pre menu)";Calendar._TT["NEXT_YEAR"]="Nasl. rok (podrĹľte pre menu)";Calendar._TT["SEL_DATE"]="ZvoÄľte dátum";Calendar._TT["DRAG_TO_MOVE"]="PodrĹľanĂm tlaÄŤĂtka zmenĂte polohu";Calendar._TT["PART_TODAY"]=" (dnes)";Calendar._TT["MON_FIRST"]="ZobraziĹĄ pondelok ako prvĂ˝";Calendar._TT["SUN_FIRST"]="ZobraziĹĄ nedeÄľu ako prvĂş";Calendar._TT["CLOSE"]="ZavrieĹĄ";Calendar._TT["TODAY"]="Dnes";Calendar._TT["TIME_PART"]="(Shift-)klik/ĹĄahanie zmenĂ hodnotu";Calendar._TT["DEF_DATE_FORMAT"]="$d. %m. %Y";Calendar._TT["TT_DATE_FORMAT"]="%a, %e. %b";Calendar._TT["WK"]="týž"; | ztfy.jqueryui | /ztfy.jqueryui-0.7.12.tar.gz/ztfy.jqueryui-0.7.12/src/ztfy/jqueryui/resources/js/lang/calendar-sk.min.js | calendar-sk.min.js |
=====================
ztfy.jqueryui package
=====================
.. contents::
What is ztfy.jqueryui ?
=======================
ztfy.jqueryui is a set of javascript resources (and their dependencies) allowing any application to easily
use a set of JQuery plug-ins; when possible, all CSS and JavaScript resources are already minified
via Yahoo 'yui-compressor' tool.
Most of these plug-ins are used by default ZTFY skins and packages.
Currently available plug-ins include :
- the JQuery engine
- jquery-alerts
- jquery-colorpicker
- jquery-cookie
- jquery-datatables
- jquery-datetime
- jquery-easing
- jquery-fancybox
- jquery-form
- jquery-i18n
- jqeury-imgareaselect
- jqeury-jscrollpane
- jquery-jsonrpc
- jquery-jtip
- jquery-layout
- jquery-liquidcarousel
- jquery-multiselect
- jquery-progressbar
- jquery-tipsy
- jquery-tools
- jquery-treetable
- jquery-ui
How to use ztfy.jqueryui ?
==========================
All JQuery resources are just defined as Fanstatic libraries. ZCML registration is not required.
Using a given plug-in is as simple as using the following syntax in any HTML view: ::
>>> from ztfy.jqueryui import jquery
>>> jquery.need()
Given that, all plug-in dependencies will automatically be included into resulting HTML page.
A single resource can be required several times for a single page, but the resulting resources will
be included only one via the Fanstatic machinery.
When available, a minified version as well as a "clear source" version are defined. When using
ZTFY.webapp package, the first one is used in "deployment" mode while the second one is automatically
used in "development" mode to make debugging very easy.
Requiring plugins through templates
===================================
If, for example, you want to call resources from a site's layout for which you don't have any Python
class, you can call it directly from a page template, like this: ::
<tal:var replace="fanstatic:ztfy.jqueryui#jquery" />
The "fanstatic:" expression is provided by ztfy.utils package.
| ztfy.jqueryui | /ztfy.jqueryui-0.7.12.tar.gz/ztfy.jqueryui-0.7.12/docs/README.txt | README.txt |
# import standard packages
import ldap
# import Zope3 interfaces
# import local interfaces
from ldapadapter.interfaces import ILDAPAdapter
from ldappas.interfaces import ILDAPAuthentication
from ztfy.mail.interfaces import IPrincipalMailInfo
from ztfy.ldap.auth.interfaces import ILDAPGroupInfo, ILDAPPrincipalInfo, ILDAPAuthenticationPlugin
# import Zope3 packages
from zope.component import adapts, queryUtility, getAllUtilitiesRegisteredFor
from zope.interface import implements
# import local packages
class LDAPPrincipalMailInfo(object):
"""LDAP principal mail info adapte"""
adapts(ILDAPPrincipalInfo)
implements(IPrincipalMailInfo)
def __init__(self, context):
self.context = context
def getAddresses(self):
"""Get mail address of adapted principal"""
id = self.context.id
for plugin in getAllUtilitiesRegisteredFor(ILDAPAuthentication):
if not id.startswith(plugin.principalIdPrefix):
continue
internal_id = id[len(plugin.principalIdPrefix):]
da = queryUtility(ILDAPAdapter, name=plugin.adapterName)
if da is None:
continue
try:
conn = da.connect()
filter = ldap.filter.filter_format('(%s=%s)', (plugin.idAttribute, internal_id))
res = conn.search(plugin.searchBase, plugin.searchScope,
filter=filter,
attrs=[plugin.titleAttribute, 'mail'])
dn, entry = res[0]
return [ (entry[plugin.titleAttribute][0],
entry['mail'][0]) ]
except:
return None
class LDAPGroupMailInfo(object):
"""LDAPGroup mail info adapter"""
adapts(ILDAPGroupInfo)
implements(IPrincipalMailInfo)
def __init__(self, context):
self.context = context
def getAddresses(self):
"""Get mail addresses of adapted group"""
result = None
plugin = self.context.plugin
if plugin.mailMode == u'none':
result = []
for principal_id in plugin.getPrincipalsForGroup(self.context.id):
for auth_plugin in getAllUtilitiesRegisteredFor(ILDAPAuthenticationPlugin):
principal_info = auth_plugin.principalInfo(principal_id)
if principal_info is not None:
info = IPrincipalMailInfo(principal_info, None)
if info is not None:
result.extend(info.getAddresses())
break
return result
auth = plugin.authenticator
if auth is None:
return None
internal_id = self.context.id[len(plugin.groupIdPrefix):]
if plugin.mailMode == u'internal':
# Use internal group attribute
res = plugin._search({ auth.groupIdAttribute: internal_id },
attrs=[plugin.titleAttribute, plugin.mailAttribute],
queryType='group')
try:
_dn, entry = res[0]
return [ (entry[plugin.titleAttribute][0],
entry[plugin.mailAttribute][0]) ]
except:
return result
elif plugin.mailMode == u'redirect':
# Use another group attribute in another LDAP branch
res = plugin._search({ auth.groupIdAttribute: internal_id },
attrs=[auth.groupIdAttribute],
queryType='group')
try:
dn, _entry = res[0]
except:
return result
else:
source, target = plugin.dnReplaceExpression.split('|')
target_dn = dn.replace(source, target)
res = plugin._search({ 'objectClass': '*' },
base=target_dn,
scope=ldap.SCOPE_BASE,
attrs=[plugin.titleAttribute, plugin.mailAttribute],
queryType=None)
try:
_dn, entry = res[0]
return [ (entry[plugin.titleAttribute][0],
entry[plugin.mailAttribute][0]) ]
except:
return result | ztfy.ldap | /ztfy.ldap-0.1.3.tar.gz/ztfy.ldap-0.1.3/src/ztfy/ldap/auth/mail.py | mail.py |
# import standard packages
from persistent import Persistent
# import Zope3 interfaces
from zope.app.authentication.groupfolder import IGroupInformation
from zope.app.authentication.interfaces import IAuthenticatorPlugin, IQueriableAuthenticator, \
IQuerySchemaSearch, IPrincipalInfo, \
IAuthenticatedPrincipalCreated
from zope.security.interfaces import IGroupAwarePrincipal
# import local interfaces
from ldap import LDAPError
from ldapadapter.interfaces import ServerDown, NoSuchObject
from ldappas.interfaces import ILDAPAuthentication
from ztfy.cache.metadirectives import ICacheProxyHandlerBase
from ztfy.ldap.auth.interfaces import ILDAPGroupsFolder, ILDAPGroupsMailInfo, ILDAPGroupSearchSchema, \
ILDAPGroupInfo
# import Zope3 packages
from zope.component import adapter, queryUtility
from zope.container.contained import Contained
from zope.interface import implements
from zope.schema.fieldproperty import FieldProperty
# import local packages
class LDAPGroupInformation(object):
"""LDAP group information"""
implements(ILDAPGroupInfo, IPrincipalInfo, IGroupInformation)
def __init__(self, plugin, id, title, description):
self.plugin = plugin
self.id = id
self.title = title
self.description = description
@property
def principals(self):
return self.plugin.getPrincipalsForGroup(self.id)
def __repr__(self):
return 'LDAPGroupInformation(%r)' % self.id
def __eq__(self, other):
return self.id == other.id
class LDAPGroupsFolder(Persistent, Contained):
"""LDAP groups folder authentication plug-in"""
implements(IAuthenticatorPlugin, ILDAPGroupsFolder, ILDAPGroupsMailInfo,
IQueriableAuthenticator, IQuerySchemaSearch)
_authenticatorName = FieldProperty(ILDAPGroupsFolder['authenticatorName'])
groupIdPrefix = FieldProperty(ILDAPGroupsFolder['groupIdPrefix'])
titleAttribute = FieldProperty(ILDAPGroupsFolder['titleAttribute'])
descriptionAttribute = FieldProperty(ILDAPGroupsFolder['descriptionAttribute'])
groupRequiredClass = FieldProperty(ILDAPGroupsFolder['groupRequiredClass'])
principalRequiredClass = FieldProperty(ILDAPGroupsFolder['principalRequiredClass'])
queryMode = FieldProperty(ILDAPGroupsFolder['queryMode'])
groupPrincipalsAttribute = FieldProperty(ILDAPGroupsFolder['groupPrincipalsAttribute'])
groupModeQueryFilter = FieldProperty(ILDAPGroupsFolder['groupModeQueryFilter'])
principalGroupsAttribute = FieldProperty(ILDAPGroupsFolder['principalGroupsAttribute'])
principalModeQueryFilter = FieldProperty(ILDAPGroupsFolder['principalModeQueryFilter'])
cacheProxyName = FieldProperty(ILDAPGroupsFolder['cacheProxyName'])
mailMode = FieldProperty(ILDAPGroupsMailInfo['mailMode'])
dnReplaceExpression = FieldProperty(ILDAPGroupsMailInfo['dnReplaceExpression'])
mailAttribute = FieldProperty(ILDAPGroupsMailInfo['mailAttribute'])
def __init__(self, auth='', prefix=''):
super(LDAPGroupsFolder, self).__init__()
if auth:
self.authenticatorName = auth
if prefix:
self.groupIdPrefix = prefix
@property
def authenticatorName(self):
return self._authenticatorName
@authenticatorName.setter
def authenticatorName(self, value):
self._authenticatorName = value
if hasattr(self, '_v_auth'):
delattr(self, '_v_auth')
@property
def authenticator(self):
if not hasattr(self, '_v_auth'):
self._v_auth = queryUtility(ILDAPAuthentication, self.authenticatorName)
return self._v_auth
# IAuthenticatorPlugin interface methods
def authenticateCredentials(self, credentials):
"""Group folder doesn't authenticate !"""
pass
def principalInfo(self, id):
auth = self.authenticator
if id.startswith(self.groupIdPrefix):
id = id[len(self.groupIdPrefix):]
res = self._search({auth.groupIdAttribute: id},
attrs=[auth.groupIdAttribute,
self.titleAttribute,
self.descriptionAttribute],
queryType='group')
if res and (len(res) == 1):
dn, entry = res[0]
id_attr = auth.groupIdAttribute
if id_attr == 'dn':
id = dn
elif entry.get(id_attr):
id = entry[id_attr][0]
else:
raise KeyError
id = self.groupIdPrefix + id
return self._getGroupInfoFromEntry(id, entry)
# IQuerySearchSchema interface methods
schema = ILDAPGroupSearchSchema
def search(self, query, start=None, batch_size=None):
auth = self.authenticator
res = self._search(query, attrs=[auth.groupIdAttribute], queryType='group')
infos = []
for dn, entry in res:
try:
infos.append(self.groupIdPrefix + entry[auth.groupIdAttribute][0])
except (KeyError, IndexError):
pass
if start is None:
start = 0
if batch_size is not None:
return infos[start:start + batch_size]
else:
return infos[start:]
# ILDAPGroupsFolder interface methods
def getGroupsForPrincipal(self, principal_id):
"""Get principal groups"""
auth = self.authenticator
if auth is None:
return None
groups = []
internal_id = principal_id[len(auth.principalIdPrefix):]
# Start to get principal's DN
try:
attrs = [auth.idAttribute]
if self.queryMode == 'principal':
attrs.append(self.principalGroupsAttribute)
res = self._search({ auth.idAttribute: internal_id },
attrs=attrs, queryType='principal')
user_dn, user_entry = res[0]
except (KeyError, IndexError):
return None
# Check for query filter
if self.queryMode == 'group':
attr, value = self.groupModeQueryFilter.split('=')
else:
attr, value = self.principalModeQueryFilter.split('=')
if '%(dn)s' in value:
dn = user_dn
elif '%(uid)s' in value:
uid = internal_id
value = value % locals()
if self.queryMode == 'group':
# In 'group' query mode, we only have to search for
# groups containing given principal as member
res = self._search({ attr: value },
attrs=[auth.groupIdAttribute],
queryType='group')
for dn, entry in res:
groups.append(self.groupIdPrefix + entry[auth.groupIdAttribute][0])
else:
# In 'principal' query mode, we have to search for each
# group given in principalGroupsAttribute and, for each group,
# query it's DN and get it's ID attribute
try:
for dn in user_entry[self.principalGroupsAttribute]:
res = self._search({}, base=dn, attrs=[auth.groupIdAttribute], queryType='group')
for _dn, entry in res:
groups.append(self.groupIdPrefix + entry[auth.groupIdAttribute][0])
except:
pass
return groups
def getPrincipalsForGroup(self, group_id):
"""Get group principals"""
auth = self.authenticator
if auth is None:
return None
principals = []
internal_id = group_id[len(self.groupIdPrefix):]
if self.queryMode == 'group':
# In 'group' query mode, we have to:
# - search for the group
# - search for each principal in group's members attribute
res = self._search({ auth.groupIdAttribute: internal_id },
attrs=[self.groupPrincipalsAttribute],
queryType='group')
try:
_dn, entry = res[0]
for dn in entry[self.groupPrincipalsAttribute]:
res = self._search({ 'objectClass': '*' },
base=dn,
attrs=[auth.idAttribute],
queryType='principal')
for _dn, entry in res:
principals.append(auth.principalIdPrefix + entry[auth.idAttribute][0])
except:
pass
else:
# In 'principal' mode, we only have to search for
# principals based on their own 'memberOf' attribute
res = self._search({ self.principalGroupsAttribute: internal_id },
attrs=[auth.idAttribute],
queryType='principal')
for dn, entry in res:
principals.append(auth.principalIdPrefix + entry[auth.idAttribute][0])
return principals
# private methods
def _search(self, query={}, base=None, scope=None, attrs=None, queryType='group'):
"""Execute search through LDAP authenticator"""
auth = self.authenticator
if auth is None:
return None
# connect
da = auth.getLDAPAdapter()
if da is None:
return []
try:
conn = da.connect()
except ServerDown:
return []
# build query filter
if not base:
base = (queryType == 'group') and auth.groupsSearchBase or auth.searchBase
if not scope:
scope = (queryType == 'group') and auth.groupsSearchScope or auth.searchScope
filter_elems = []
for key, value in query.items():
if not value:
continue
filter_elems.append('(%s=%s)' % (key, value))
if (queryType == 'group'):
if self.groupRequiredClass:
filter_elems.append('(objectClass=%s)' % self.groupRequiredClass)
elif (queryType == 'principal'):
if self.principalRequiredClass:
filter_elems.append('(objectClass=%s)' % self.principalRequiredClass)
filter = ''.join(filter_elems)
if len(filter_elems) > 1:
filter = '(&%s)' % filter
if not filter:
filter = '(objectClass=*)'
# execute search
try:
res = conn.search(base, scope, filter=filter, attrs=attrs)
except (NoSuchObject, LDAPError):
return []
else:
return res
def _getGroupInfoFromEntry(self, id, entry):
return LDAPGroupInformation(self, id, entry[self.titleAttribute][0],
self.descriptionAttribute and entry.get(self.descriptionAttribute, [''])[0] or '')
LDAP_CACHE_NAMESPACE = 'ztfy.ldap.groups'
LDAP_CACHE_MARKER = object()
@adapter(IAuthenticatedPrincipalCreated)
def setGroupsForPrincipal(event):
"""Set principal groups when it is created"""
principal = event.principal
if not IGroupAwarePrincipal.providedBy(principal):
return
auth = event.authentication
cache = None
groups = []
principal_id = principal.id
for name, plugin in auth.getAuthenticatorPlugins():
if not ILDAPGroupsFolder.providedBy(plugin):
continue
prefix = auth.prefix + plugin.groupIdPrefix
if principal_id.startswith(prefix) or not principal_id.startswith(plugin.authenticator.principalIdPrefix):
continue
if plugin.cacheProxyName:
cache_proxy = queryUtility(ICacheProxyHandlerBase, plugin.cacheProxyName)
if cache_proxy is not None:
cache = cache_proxy.getCache()
if cache is not None:
cached_groups = cache.query('%s::%s' % (LDAP_CACHE_NAMESPACE, name),
principal_id, LDAP_CACHE_MARKER)
if cached_groups is not LDAP_CACHE_MARKER:
principal.groups.extend(cached_groups)
continue
cached_groups = [ auth.prefix + p_id
for p_id in plugin.getGroupsForPrincipal(principal.id)]
if cache is not None:
cache.set('%s::%s' % (LDAP_CACHE_NAMESPACE, name), principal_id, cached_groups)
groups.extend(cached_groups)
principal.groups.extend(groups) | ztfy.ldap | /ztfy.ldap-0.1.3.tar.gz/ztfy.ldap-0.1.3/src/ztfy/ldap/auth/group.py | group.py |
# import standard packages
# import Zope3 interfaces
from zope.schema.interfaces import IVocabularyFactory
# import local interfaces
from ldappas.interfaces import ILDAPAuthentication
# import Zope3 packages
from zope.component import adapter
from zope.componentvocabulary.vocabulary import UtilityVocabulary
from zope.i18n import translate
from zope.interface import classProvides, alsoProvides
from zope.schema.vocabulary import SimpleVocabulary, SimpleTerm
# import local packages
from ztfy.utils.request import queryRequest
from ztfy.ldap import _
from zope.pluggableauth.interfaces import IFoundPrincipalCreated
from ztfy.ldap.auth.interfaces import ILDAPPrincipalInfo, ILDAPGroupInfo
class LDAPAuthenticatorVocabulary(UtilityVocabulary):
classProvides(IVocabularyFactory)
interface = ILDAPAuthentication
nameOnly = True
QUERY_MODES = {
u'group': _("Use group attribute containing it's members list"),
u'principal': _("Use principal attribute containing it's groups list")
}
class QueryModesVocabulary(SimpleVocabulary):
"""Query modes vocabulary"""
classProvides(IVocabularyFactory)
def __init__(self, *args, **kw):
request = queryRequest()
terms = [SimpleTerm(v, title=translate(t, context=request)) for v, t in QUERY_MODES.iteritems()]
super(QueryModesVocabulary, self).__init__(terms)
GROUP_MAIL_MODES = {
u'none': _("None (only use members own mail address)"),
u'internal': _("Use group internal attribute"),
u'redirect': _("Use another group internal attribute")
}
class GroupMailModesVocabulary(SimpleVocabulary):
"""Groups mail modes vocabulary"""
classProvides(IVocabularyFactory)
def __init__(self, *args, **kw):
request = queryRequest()
terms = [SimpleTerm(v, title=translate(t, context=request)) for v, t in GROUP_MAIL_MODES.iteritems()]
terms.sort(key=lambda x: x.title)
super(GroupMailModesVocabulary, self).__init__(terms)
@adapter(IFoundPrincipalCreated)
def createLDAPPrincipal(event):
if ILDAPGroupInfo.providedBy(event.info):
alsoProvides(event.principal, ILDAPGroupInfo)
elif ILDAPPrincipalInfo.providedBy(event.info):
alsoProvides(event.principal, ILDAPPrincipalInfo) | ztfy.ldap | /ztfy.ldap-0.1.3.tar.gz/ztfy.ldap-0.1.3/src/ztfy/ldap/auth/__init__.py | __init__.py |
# import standard packages
import re
# import Zope3 interfaces
from zope.pluggableauth.interfaces import IPrincipalInfo
# import local interfaces
# import Zope3 packages
from zope.interface import Interface, Attribute
from zope.schema import TextLine, Choice
# import local packages
from ztfy.ldap import _
class ILDAPPrincipalInfo(IPrincipalInfo):
"""LDAP principal marker interface"""
class ILDAPGroupInfo(ILDAPPrincipalInfo):
"""Marker interface for an LDAP group principal"""
plugin = Attribute(_("LDAP groups folder authentication plug-in"))
class ILDAPGroupSearchSchema(Interface):
"""LDAP schema from groups searching"""
uid = TextLine(title=u'uid',
required=False)
cn = TextLine(title=u'cn',
required=False)
class ILDAPAuthenticationPlugin(Interface):
"""Marker interface for an LDAP authentication plug-in"""
def principalInfo(self, id):
"""Get principal info"""
class ILDAPGroupsFolder(ILDAPAuthenticationPlugin):
"""LDAP GroupsFolder plug-in interface for Pluggable Authentication"""
authenticatorName = Choice(title=_("LDAP authenticator name"),
description=_("Name of the LDAP authenticator plug-in used to authenticate users"),
vocabulary="LDAP authenticator names",
required=True)
groupIdPrefix = TextLine(title=_("Group ID prefix"),
description=_("Prefix to add to all groups ids"),
required=True)
titleAttribute = TextLine(title=_("Group title attribute"),
description=_("LDAP attribute used to identify group's title"),
constraint=re.compile("[a-zA-Z][-a-zA-Z0-9]*$").match,
required=True,
default=u'cn')
descriptionAttribute = TextLine(title=_("Group description attribute"),
description=_("LDAP attribute used to identify group's description"),
constraint=re.compile("[a-zA-Z][-a-zA-Z0-9]*$").match,
required=True,
default=u'description')
groupRequiredClass = TextLine(title=_("Group required class"),
description=_("LDAP class required on groups"),
constraint=re.compile("[a-zA-Z][-a-zA-Z0-9]*$").match,
required=True,
default=u'group')
principalRequiredClass = TextLine(title=_("Principal required class"),
description=_("LDAP class required on pincipals"),
constraint=re.compile("[a-zA-Z][-a-zA-Z0-9]*$").match,
required=True,
default=u'person')
queryMode = Choice(title=_("Group members query mode"),
description=_("Query mode used to find members of a group and groups of a principal"),
vocabulary="ZTFY LDAP groups query mode",
required=True,
default=u'group')
groupPrincipalsAttribute = TextLine(title=_("Group principals attribute"),
description=_("Name of LDAP's group attribute containing it's principals"),
constraint=re.compile("[a-zA-Z][-a-zA-Z0-9]*$").match,
required=False,
default=u'uniqueMember')
groupModeQueryFilter = TextLine(title=_("'group' mode query filter"),
description=_("LDAP query used to find principals and groups in 'group' mode"),
required=False,
default=u'uniqueMember=%(dn)s')
principalGroupsAttribute = TextLine(title=_("Principal groups attribute"),
description=_("Name of LDAP's principal attribute containing it's groups"),
constraint=re.compile("[a-zA-Z][-a-zA-Z0-9]*$").match,
required=False,
default=u'memberOf')
principalModeQueryFilter = TextLine(title=_("'principal' mode query filter"),
description=_("LDAP query used to find principals and groups in 'principal' mode"),
required=False,
default=u'memberOf=%(dn)s')
cacheProxyName = Choice(title=_("Cache proxy name"),
description=_("Use given cache to store principals groups"),
required=False,
vocabulary='ZTFY cache proxy handlers')
def getGroupsForPrincipal(self, principal_id):
"""Get list of groups for given principal"""
def getPrincipalsForGroup(self, group_id):
"""Get list of principals for given group"""
class ILDAPGroupsMailInfo(Interface):
"""LDAP GroupsFolder mail info extension"""
mailMode = Choice(title=_("Group mail mode"),
description=_("Mail mode defines how a mail can be send to group members"),
vocabulary="ZTFY LDAP groups mail mode",
required=True,
default='none')
dnReplaceExpression = TextLine(title=_("DN replace expression"),
description=_("In 'redirect' mode, enter DN source and target value parts, separated by a '|'"),
constraint=re.compile("[a-zA-Z0-9-=,]+|[a-zA-Z0-9-=,]+").match,
default=u'ou=access|ou=lists')
mailAttribute = TextLine(title=_("Group mail attribute"),
description=_("Name of LDAP's group attribute containing mail address"),
constraint=re.compile("[a-zA-Z][-a-zA-Z0-9]*$").match,
required=True,
default=u'mail') | ztfy.ldap | /ztfy.ldap-0.1.3.tar.gz/ztfy.ldap-0.1.3/src/ztfy/ldap/auth/interfaces/__init__.py | __init__.py |
=================
ztfy.ldap package
=================
.. contents::
What is ztfy.ldap ?
===================
ztfy.ldap is a small set of utilities and classes to make LDAP interaction
easier within a ZTK/ZopeApp based application.
The main class is LDAPGroupsFolder, which is an authentication plug-in used
to enable LDAP groups as authentication principals. This class is extending
ZTFY.security package so that LDAP groups can be used everywhere where a
principal can be selected to grant a role.
LDAPGroupsFolder code is mainly based on "ldapgroups" package, which seems
actually unmaintained.
Based on ldappool package, ztfy.ldap also provides a pooled LDAP adapter, which
stores it's connections within a pool.
Adapters for some of **ztfy.mail** interfaces are also provided.
How to use ztfy.ldap ?
======================
ztfy.ldap usages will be described on `ZTFY home page`_
.. _`ZTFY home page`: http://www.ztfy.org
| ztfy.ldap | /ztfy.ldap-0.1.3.tar.gz/ztfy.ldap-0.1.3/docs/README.txt | README.txt |
# import standard packages
# import Zope3 interfaces
# import local interfaces
# import Zope3 packages
from zope.interface import Interface, Attribute
from zope.schema import Choice, TextLine
# import local packages
from ztfy.utils.schema import StringLine
from ztfy.lock import _
class ILockingUtility(Interface):
"""Locking utility interface"""
policy = Choice(title=_("Locking policy"),
description=_("Locking policy can be used to create locks in multi-processes and/or multi-hosts environments"),
vocabulary="ZTFY locking helpers",
required=False)
def getLock(self, target, wait=False):
"""Try to get lock for given object"""
def releaseLock(self, lock):
"""Release given lock
Input value is the one returned by getLock()
"""
class ILockingHelper(Interface):
"""Base interface for locker informations"""
marker_interface = Attribute(_("Class name of lock helper target marker interface"))
def getLock(self, utility, target):
"""Try to get lock for given object"""
def releaseLock(self, lock):
"""Release given lock
Input value is the one returned by getLock()
"""
#
# File locking interfaces
#
class IFileLockingInfo(Interface):
"""File locking info"""
locks_path = TextLine(title=_("Locks base path"),
description=_("Full path of server's directory storing locks"),
required=True,
default=u'/var/lock')
class IFileLockingHelper(ILockingHelper):
"""File locking utility"""
class IFileLockingTarget(Interface):
"""Marker interface for lockers using file locking"""
#
# Memcached locking interfaces
#
class IMemcachedLockingInfo(Interface):
"""Memcached locker info"""
memcached_client = TextLine(title=_("Memcached client"),
description=_("Name of memcached client connection"),
required=True)
locks_namespace = StringLine(title=_("Locks namespace"),
description=_("Memcached namespace used to define locks"),
required=True,
default='ztfy.lock')
class IMemcachedLockingHelper(ILockingHelper):
"""Memcached locking helper utility"""
class IMemcachedLockingTarget(Interface):
"""Marker interface for lockers using memcached locking""" | ztfy.lock | /ztfy.lock-0.1.2.tar.gz/ztfy.lock-0.1.2/src/ztfy/lock/interfaces.py | interfaces.py |
# import standard packages
import os
from persistent import Persistent
from threading import Lock
# import Zope3 interfaces
from lovely.memcached.interfaces import IMemcachedClient
from zope.annotation.interfaces import IAnnotations
from zope.schema.interfaces import IVocabularyFactory
# import local interfaces
from ztfy.lock.interfaces import ILockingHelper, \
IFileLockingInfo, IFileLockingHelper, IFileLockingTarget, \
IMemcachedLockingInfo, IMemcachedLockingHelper, IMemcachedLockingTarget
# import Zope3 packages
from zc.lockfile import LockFile, LockError
from zope.component import adapter, queryUtility
from zope.componentvocabulary.vocabulary import UtilityVocabulary
from zope.interface import implementer, implements, classProvides
from zope.schema.fieldproperty import FieldProperty
# import local packages
from ztfy.utils.catalog import getIntIdUtility
from ztfy.lock import _
#
# Inner process locking
#
_ThreadLocks = {}
class ThreadLockingHelper(object):
"""Thread locking helper"""
implements(ILockingHelper)
marker_interface = None
def getLock(self, utility, target):
intids = getIntIdUtility()
oid = intids.register(target)
if oid in _ThreadLocks:
return None
lock = _ThreadLocks[oid] = Lock()
lock.acquire(blocking=False)
return (oid, lock)
def releaseLock(self, lock):
assert isinstance(lock, tuple)
oid, lock = lock
assert isinstance(lock, Lock)
if oid in _ThreadLocks:
lock.release()
del _ThreadLocks[oid]
ThreadLockingHelper = ThreadLockingHelper()
#
# File locking classes
#
FILE_LOCKING_INFO_KEY = 'ztfy.lock.lockfile'
class FileLockingInfo(Persistent):
"""File locking infos"""
implements(IFileLockingInfo)
locks_path = FieldProperty(IFileLockingInfo['locks_path'])
@adapter(IFileLockingTarget)
@implementer(IFileLockingInfo)
def FileLockingInfoFactory(context):
"""File locker info factory"""
annotations = IAnnotations(context)
helper = annotations.get(FILE_LOCKING_INFO_KEY)
if helper is None:
helper = annotations[FILE_LOCKING_INFO_KEY] = FileLockingInfo()
return helper
class FileLockingHelper(object):
"""File locking helper"""
implements(IFileLockingHelper)
marker_interface = IFileLockingTarget
def getLock(self, utility, target):
info = IFileLockingInfo(utility, None)
if (info is None) or (not info.locks_path):
raise Exception(_("Locking utility is not configured to use file locking !"))
intids = getIntIdUtility()
lock_path = os.path.join(info.locks_path, 'uid-%d.lock' % intids.register(target))
try:
return LockFile(lock_path)
except LockError:
return None
def releaseLock(self, lock):
assert isinstance(lock, LockFile)
lock.close()
if os.path.exists(lock._path):
os.unlink(lock._path)
FileLockingHelper = FileLockingHelper()
#
# Memcached locking classes
#
MEMCACHED_LOCKING_INFO_KEY = 'ztfy.lock.memcached'
class MemcachedLockingInfo(Persistent):
"""Memcached locking infos"""
implements(IMemcachedLockingInfo)
memcached_client = FieldProperty(IMemcachedLockingInfo['memcached_client'])
locks_namespace = FieldProperty(IMemcachedLockingInfo['locks_namespace'])
@adapter(IMemcachedLockingTarget)
@implementer(IMemcachedLockingInfo)
def MemcachedLockingInfoFactory(context):
"""Memcached locking info factory"""
annotations = IAnnotations(context)
helper = annotations.get(MEMCACHED_LOCKING_INFO_KEY)
if helper is None:
helper = annotations[MEMCACHED_LOCKING_INFO_KEY] = MemcachedLockingInfo()
return helper
class MemcachedLockingHelper(object):
"""Memcached locking helper"""
implements(IMemcachedLockingHelper)
marker_interface = IMemcachedLockingTarget
def getLock(self, utility, target):
info = IMemcachedLockingInfo(utility, None)
if (info is None) or (not info.memcached_client):
raise Exception(_("Locking utility is not configured to use memcached locking !"))
memcached = queryUtility(IMemcachedClient, info.memcached_client)
if memcached is None:
raise Exception(_("Memcached client '%s' can't be found !") % info.memcached_client)
intids = getIntIdUtility()
key = 'uid-%d.lock' % intids.register(target)
result = memcached.client.add(key, 'LOCKED')
if not result:
return None
else:
return (memcached, key)
def releaseLock(self, lock):
assert isinstance(lock, tuple)
memcached, key = lock
memcached.client.delete(key)
MemcachedLockingHelper = MemcachedLockingHelper()
#
# Locking helpers vocabulary
#
class LockingHelpersVocabulary(UtilityVocabulary):
"""Locking helpers vocabulary"""
classProvides(IVocabularyFactory)
interface = ILockingHelper
nameOnly = True | ztfy.lock | /ztfy.lock-0.1.2.tar.gz/ztfy.lock-0.1.2/src/ztfy/lock/helper.py | helper.py |
# import standard packages
from persistent import Persistent
# import Zope3 interfaces
# import local interfaces
from ztfy.lock.interfaces import ILockingUtility, ILockingHelper
# import Zope3 packages
from zope.component import queryUtility, getUtility
from zope.container.contained import Contained
from zope.interface import implements, alsoProvides, noLongerProvides
from zope.schema.fieldproperty import FieldProperty
from ztfy.lock.helper import ThreadLockingHelper
# import local packages
class LockingUtility(Persistent, Contained):
"""Locker utility class"""
implements(ILockingUtility)
_policy = FieldProperty(ILockingUtility['policy'])
@property
def policy(self):
return self._policy
@policy.setter
def policy(self, value):
if value != self._policy:
if self._policy is not None:
locker = queryUtility(ILockingHelper, self._policy)
if (locker is not None) and \
(locker.marker_interface is not None) and \
locker.marker_interface.providedBy(self):
noLongerProvides(self, locker.marker_interface)
self._policy = value
if value:
locker = getUtility(ILockingHelper, value)
if locker.marker_interface is not None:
alsoProvides(self, locker.marker_interface)
def _getLocker(self):
if not self._policy:
return ThreadLockingHelper
else:
return getUtility(ILockingHelper, self._policy)
def getLock(self, target, wait=False):
helper = self._getLocker()
if helper is not None:
lock = helper.getLock(target)
while (lock is None) and wait:
lock = helper.getLock(self, target)
if lock is not None:
return (helper, lock)
return None
def releaseLock(self, lock):
if lock is None:
return
helper, lock = lock
helper.releaseLock(lock) | ztfy.lock | /ztfy.lock-0.1.2.tar.gz/ztfy.lock-0.1.2/src/ztfy/lock/utility.py | utility.py |
# import standard packages
import transaction
# import Zope3 interfaces
from zope.component.interfaces import IComponentRegistry, ISite
from zope.intid.interfaces import IIntIds
from zope.processlifetime import IDatabaseOpenedWithRoot
# import local interfaces
from ztfy.lock.interfaces import ILockingUtility
from ztfy.utils.interfaces import INewSiteManagerEvent
# import Zope3 packages
from zope.app.publication.zopepublication import ZopePublication
from zope.component import adapter, queryUtility
from zope.intid import IntIds
from zope.location import locate
from zope.site import hooks
# import local packages
from ztfy.lock.utility import LockingUtility
def updateDatabaseIfNeeded(context):
"""Check for missing utilities at application startup"""
try:
sm = context.getSiteManager()
except:
return
default = sm['default']
# Check for required IIntIds utility
intids = queryUtility(IIntIds)
if intids is None:
intids = default.get('IntIds')
if intids is None:
intids = IntIds()
locate(intids, default)
IComponentRegistry(sm).registerUtility(intids, IIntIds, '')
default['IntIds'] = intids
# Check for locker utility
locker = queryUtility(ILockingUtility)
if locker is None:
locker = default.get('ObjectLocker')
if locker is None:
locker = LockingUtility()
locate(locker, default)
IComponentRegistry(sm).registerUtility(locker, ILockingUtility, '')
default['ObjectLocker'] = locker
@adapter(IDatabaseOpenedWithRoot)
def handleOpenedDatabase(event):
db = event.database
connection = db.open()
root = connection.root()
root_folder = root.get(ZopePublication.root_name, None)
for site in root_folder.values():
if ISite(site, None) is not None:
hooks.setSite(site)
updateDatabaseIfNeeded(site)
transaction.commit()
@adapter(INewSiteManagerEvent)
def handleNewSiteManager(event):
updateDatabaseIfNeeded(event.object) | ztfy.lock | /ztfy.lock-0.1.2.tar.gz/ztfy.lock-0.1.2/src/ztfy/lock/database.py | database.py |
# import standard packages
# import Zope3 interfaces
# import local interfaces
from ztfy.lock.interfaces import ILockingUtility, \
IFileLockingInfo, IMemcachedLockingInfo
from ztfy.skin.interfaces import IDefaultView, IPropertiesMenuTarget
from ztfy.skin.layer import IZTFYBackLayer
# import Zope3 packages
from z3c.form import field
from zope.component import adapts
from zope.interface import implements, Interface
from zope.traversing.browser import absoluteURL
# import local packages
from ztfy.skin.form import EditForm, DialogEditForm
from ztfy.skin.menu import DialogMenuItem
from ztfy.lock import _
class LockingUtilityDefaultViewAdapter(object):
"""Locking utility default view adapter"""
adapts(ILockingUtility, IZTFYBackLayer, Interface)
implements(IDefaultView)
def __init__(self, context, request, view):
self.context = context
self.request = request
self.view = view
@property
def viewname(self):
return '@@properties.html'
def getAbsoluteURL(self):
return '%s/%s' % (absoluteURL(self.context, self.request), self.viewname)
class LockingUtilityEditForm(EditForm):
"""Locking utility edit form"""
implements(IPropertiesMenuTarget)
fields = field.Fields(ILockingUtility)
class LockingUtilityFileLockingInfoEditForm(DialogEditForm):
"""Dialog edit form for file locking info"""
fields = field.Fields(IFileLockingInfo)
class LockingUtilityFileLockingInfoEditFormMenu(DialogMenuItem):
"""Dialog edit form menu item for file locking info"""
title = _(":: File locks properties...")
target = LockingUtilityFileLockingInfoEditForm
class LockingUtilityMemcachedLockingInfoEditForm(DialogEditForm):
"""Dialog edit form for memcached locking info"""
fields = field.Fields(IMemcachedLockingInfo)
class LockingUtilityMemcachedLockingInfoEditFormMenu(DialogMenuItem):
"""Dialog edit form menu item for memcached locking info"""
title = _(":: Memcached locks properties...")
target = LockingUtilityMemcachedLockingInfoEditForm | ztfy.lock | /ztfy.lock-0.1.2.tar.gz/ztfy.lock-0.1.2/src/ztfy/lock/browser/utility.py | utility.py |
.. contents::
Introduction
============
ZTFY.lock is a small package which can be used to get locks on persistent objects
in several contexts.
These contexts include:
- simple 'threading' locking, in a single-process environment
- file locking (using 'zc.lockfile' package), in a multi-processes environment where
all processes are handled on a single host
- memcached locking (using 'lovely.memcached' package), in a multi-process environment
where processes are handled on several hosts.
Locking utility
===============
Locking is handled by a utility implementing ILockingUtility interface and registered
for that interface. Locking policy have to be chosen on that utility to define the locking
helper which will be used.
According to the selected policy, additional parameters will have to be defined to set
the file locks path or the memcached client connection.
| ztfy.lock | /ztfy.lock-0.1.2.tar.gz/ztfy.lock-0.1.2/docs/README.txt | README.txt |
# import standard packages
from cStringIO import StringIO
from datetime import datetime
from email.mime.multipart import MIMEMultipart
from email.mime.text import MIMEText
import chardet
import codecs
import formatter
import htmlentitydefs
import htmllib
# import Zope3 interfaces
# import local interfaces
# import Zope3 packages
# import local packages
from ztfy.utils.timezone import gmtime
def htmlReplace(exc):
if isinstance(exc, (UnicodeEncodeError, UnicodeTranslateError)):
s = [u'&%s;' % htmlentitydefs.codepoint2name[ord(c)] for c in exc.objet[exc.start:exc.end]]
return ''.join(s), exc.end
else:
raise TypeError("Can't handle exception %s" % exc.__name__)
codecs.register_error('html_replace', htmlReplace)
def htmlEncode(unicode_data, encoding='utf-8'):
return unicode_data.encode(encoding, 'html_replace')
def HTMLMessage(subject, fromaddr, toaddr, html, text=None):
"""Create a MIME message that will render as HTML or text
Copied from 'Python Cookbook', chapter 13.5"""
html = htmlEncode(html)
if text is None:
# produce textual rendering of the HTML string when None is provided
textout = StringIO()
formtext = formatter.AbstractFormatter(formatter.DumbWriter(textout))
parser = htmllib.HTMLParser(formtext)
parser.feed(html)
parser.close()
text = textout.getvalue()
del textout, formtext, parser
msg = MIMEMultipart()
msg['Subject'] = subject
msg['Date'] = gmtime(datetime.utcnow()).strftime('%a, %d %b %Y %H:%M:%S %z (%Z)')
msg['From'] = fromaddr
if isinstance(toaddr, (str, unicode)):
toaddr = (toaddr,)
msg['To'] = ', '.join(toaddr)
parts = MIMEMultipart('alternative')
plain_part = MIMEText(text, 'plain')
plain_part.set_charset('utf-8')
html_part = MIMEText(html, 'html')
html_part.set_charset('utf-8')
parts.attach(plain_part)
parts.attach(html_part)
msg.attach(parts)
return msg
def TextMessage(subject, fromaddr, toaddr, text, charset=None):
"""Create a text message"""
msg = MIMEMultipart()
msg['Subject'] = subject
msg['Date'] = gmtime(datetime.utcnow()).strftime('%a, %d %b %Y %H:%M:%S %z (%Z)')
msg['From'] = fromaddr
if isinstance(toaddr, (str, unicode)):
toaddr = (toaddr,)
msg['To'] = ', '.join(toaddr)
if charset is None:
charset = chardet.detect(text).get('encoding', 'utf-8')
plain_part = MIMEText(text, 'plain', charset)
msg.attach(plain_part)
return msg | ztfy.mail | /ztfy.mail-0.1.6.tar.gz/ztfy.mail-0.1.6/src/ztfy/mail/message.py | message.py |
# import standard packages
# import Zope3 interfaces
# import local interfaces
# import Zope3 packages
from zope.interface import Interface, Attribute
from zope.schema import TextLine, Choice, List, Bool
# import local packages
from ztfy.media import _
#
# Medias interfaces
#
CUSTOM_AUDIO_TYPES = ('application/ogg',)
CUSTOM_VIDEO_TYPES = ()
class IMediaInfo(Interface):
"""Media file info interface"""
vtype = Attribute(_("Media type"))
audio_codec_name = Attribute(_("Media audio codec name"))
video_codec_name = Attribute(_("Media video codec name"))
duration = Attribute(_("Media duration, in seconds"))
bitrate = Attribute(_("Media audio bitrate"))
frame_rate = Attribute(_("Media video frames rate"))
frame_size = Attribute(_("Media frame size, if available"))
frame_mode = Attribute(_("Media frame mode, if available"))
infos = Attribute(_("Complete media infos dictionary"))
#
# Media converter utility interfaces
#
class IMediaConverter(Interface):
"""Media converter interface"""
label = Attribute(_("Media converter label"))
format = Attribute(_("Media converter target format"))
def convert(self, media):
"""Convert media to format handled by given converter"""
class IMediaVideoConverter(IMediaConverter):
"""Media video converter"""
class IMediaAudioConverter(IMediaConverter):
"""Media audio converter"""
#
# Media conversions adapter interfaces
#
MEDIA_CONVERSIONS_KEY = 'ztfy.media.conversions'
MEDIA_CONVERSION_CMDLINE_KEY = 'ztfy.media.conversion.cmdline'
class IMediaConversionsInfo(Interface):
"""Media conversions info interface"""
def hasConversion(self, formats):
"""Check if one of given formats if available in conversions"""
def getConversion(self, format):
"""Get converted media for given format and width"""
def getConversions(self):
"""Get current list of media conversions"""
class IMediaConversionsWriter(Interface):
"""Media conversions writer interface"""
def addConversion(self, conversion, format, extension=None, width=None):
"""Add given conversion to media"""
class IMediaConversions(IMediaConversionsInfo, IMediaConversionsWriter):
"""Media file conversions storage interface"""
#
# Media conversion utility configuration interface
#
class IMediaConversionUtility(Interface):
"""Media conversion client interface"""
converter_address = TextLine(title=_("Medias converter process address"),
description=_("""Address of media converter listener, in the 'IPv4:port' format."""
"""Keep empty to disable it."""),
required=False,
default=u'127.0.0.1:5555')
video_formats = List(title=_("Video formats conversions"),
description=_("Published video files will be automatically converted to this format"),
value_type=Choice(vocabulary="ZTFY media video converters"))
force_video_conversion = Bool(title=_("Force video conversion?"),
description=_("Convert video even when source file has same target content type"),
required=True,
default=False)
audio_formats = List(title=_("Audio formats conversions"),
description=_("Published audio files will be automatically converted to this format"),
value_type=Choice(vocabulary="ZTFY media audio converters"))
force_audio_conversion = Bool(title=_("Force audio conversion?"),
description=_("Convert audio file even when source file has same target content "
"type"),
required=True,
default=True)
zeo_connection = Choice(title=_("ZEO connection name"),
description=_("Name of ZEO connection utility defining converter connection"),
required=True,
vocabulary="ZEO connections")
def checkMediaConversion(self, media):
"""Check if conversion is needed for given media"""
def convert(self, media, format):
"""Convert given media to requested format""" | ztfy.media | /ztfy.media-0.1.12.tar.gz/ztfy.media-0.1.12/src/ztfy/media/interfaces.py | interfaces.py |
# import standard packages
from cStringIO import StringIO
from tempfile import NamedTemporaryFile
import mimetypes
# import Zope3 interfaces
# import local interfaces
from ztfy.media.interfaces import IMediaAudioConverter, IMediaVideoConverter
# import Zope3 packages
from zope.interface import implements
# import local packages
from ztfy.media.ffbase import INPUT_BLOCK_SIZE
from ztfy.media.ffdocument import FFDocument
from ztfy.media import _
class BaseMediaConverter(object):
"""Base media converter"""
require_temp_file = False
def requireInputFile(self, media):
"""Check if a physical file is required to handle conversion"""
return media.contentType == 'video/quicktime'
def convert(self, media):
"""Convert media"""
if self.requireInputFile(media):
input = NamedTemporaryFile(bufsize=INPUT_BLOCK_SIZE, prefix='input_', suffix=mimetypes.guess_extension(media.contentType))
if isinstance(media, (str, unicode)):
input.write(media)
else:
input.write(media.data)
input.file.flush()
document = FFDocument(input.name)
else:
if isinstance(media, (str, unicode)):
media = StringIO(media)
document = FFDocument(media)
self.addFilters(document)
if self.require_temp_file:
output = NamedTemporaryFile(bufsize=INPUT_BLOCK_SIZE, prefix='media_', suffix='.%s' % self.format)
converted = document.getOutput(self.format, target=output.name)
output.file.seek(0)
converted['output'] = output.file.read()
return converted
else:
return document.getOutput(self.format)
def addFilters(self, document):
pass
class BaseAudioConverter(BaseMediaConverter):
"""Base audio converter"""
def addFilters(self, document):
document.audiosampling(22050)
document.audiobitrate(128)
class WavAudioConverter(BaseAudioConverter):
"""Default WAV media converter"""
implements(IMediaAudioConverter)
label = _("WAV audio converter")
format = 'wav'
class Mp3AudioConverter(BaseAudioConverter):
"""Default MP3 media converter"""
implements(IMediaAudioConverter)
label = _("MP3 audio converter")
format = 'mp3'
require_temp_file = True
class OggAudioConverter(BaseAudioConverter):
"""Default OGG audio converter"""
implements(IMediaAudioConverter)
label = _("OGG audio converter")
format = 'ogg'
class BaseVideoConverter(BaseMediaConverter):
"""Base video converter"""
def addFilters(self, document):
document.size('hd480')
document.bitrate(1200)
document.quantizerscale(5)
document.audiosampling(22050)
document.audiobitrate(128)
class FlvVideoConverter(BaseVideoConverter):
"""Default FLV media converter"""
implements(IMediaVideoConverter)
label = _("FLV (Flash Video) video converter")
format = 'flv'
class Mp4VideoConverter(BaseVideoConverter):
"""Default MP4 media converter"""
implements(IMediaVideoConverter)
label = _("MP4 (HTML5) video converter")
format = 'mp4'
require_temp_file = True
def addFilters(self, document):
super(Mp4VideoConverter, self).addFilters(document)
effects = document.__effects__
effects['filter:v'] = 'setsar=1/1'
effects['pix_fmt'] = 'yuv420p'
effects['preset:v'] = 'slow'
effects['profile:v'] = 'baseline'
effects['x264-params'] = 'level=3.0:ref=1'
effects['r:v'] = '25/1'
effects['movflags'] = '+faststart'
effects['strict'] = 'experimental'
class OggVideoConverter(BaseVideoConverter):
"""OGG media converter"""
implements(IMediaVideoConverter)
label = _("OGG video converter")
format = 'ogg'
class WebmVideoConverter(BaseVideoConverter):
"""WebM Media converter"""
implements(IMediaVideoConverter)
label = _("WebM video converter")
format = 'webm'
require_temp_file = True
def addFilters(self, document):
super(WebmVideoConverter, self).addFilters(document)
effects = document.__effects__
effects['c:a'] = 'libvorbis'
effects['filter:v'] = 'setsar=1/1'
effects['pix_fmt'] = 'yuv420p'
effects['r:v'] = '25/1' | ztfy.media | /ztfy.media-0.1.12.tar.gz/ztfy.media-0.1.12/src/ztfy/media/converter.py | converter.py |
# import standard library
import json
import logging
logger = logging.getLogger('ztfy.media')
import mimetypes
import re
import tempfile
from os.path import dirname, basename
from os import sep, remove
from subprocess import Popen, PIPE
# import interfaces
from zope.app.file.interfaces import IFile
# import packages
from ztfy.extfile import getMagicContentType
from ztfy.media.ffexception import FFException
__all__ = ['FFmpeg', 'FFVideoEffect', 'FFAudioEffect']
INPUT_BLOCK_SIZE = 1024 ** 2
class FFmpeg(object):
"""
FFmpeg Wrapper
"""
# thanks to pyxcoder http://code.google.com/p/pyxcoder for
# the main idea
re_mainline = re.compile("^\s*Input #(\d+?), (.*?), from \'(.*?)\':$")
re_infoline = re.compile("^\s*Duration: (.*?), start: 0\.000000, bitrate: (\d+?) kb\/s$")
re_videoline = re.compile("^\s*Stream #(\d+:\d+?)\(?([A-Za-z]*)\)?: Video: (.*?), (.*?), (.*?), (.*?)$")
re_audioline = re.compile("^\s*Stream #(\d+:\d+?)\(?([A-Za-z]*)\)?: Audio: (.*?), (\d+?) Hz, (.*?), (.*?), (\d+?) kb\/s$")
def __init__(self, cmd="avconv"):
self.__ffmpeg__ = cmd
def __exec__(self, *args, **kwargs):
"""Build and execute a command line"""
def createTempFile(arg):
suffix = '.tmp'
if IFile.providedBy(arg):
# IFile object
content_type = getMagicContentType(arg.data)
if content_type:
suffix = mimetypes.guess_extension(content_type) or suffix
output = tempfile.NamedTemporaryFile(prefix='media_', suffix=suffix)
output.write(arg.data)
elif hasattr(arg, 'read'): # StringIO or any file like object
# file-like object
arg.reset()
content_type = getMagicContentType(arg.read())
if content_type:
suffix = mimetypes.guess_extension(content_type) or suffix
output = tempfile.NamedTemporaryFile(prefix='media_', suffix=suffix)
try:
arg.reset()
except:
pass
data = arg.read(INPUT_BLOCK_SIZE)
while data:
output.write(data)
data = arg.read(INPUT_BLOCK_SIZE)
else:
# string or bytes
content_type = getMagicContentType(arg)
if content_type:
suffix = mimetypes.guess_extension(content_type) or suffix
output = tempfile.NamedTemporaryFile(prefix='media_', suffix=suffix)
output.write(arg)
output.file.flush()
return output
cmdline = [self.__ffmpeg__]
if self.__ffmpeg__ == 'avconv':
cmdline.extend(['-y', '-loglevel', 'error'])
allow_stdin = kwargs.get('allow_stdin', True)
use_stdin = None
for arg in args:
if IFile.providedBy(arg):
if len(args) == 2:
# FFmpeg can't get media info from an input pipe
# We have to write media content to temporary file
output = createTempFile(arg)
cmdline.append(output.name)
else:
if allow_stdin:
use_stdin = arg
cmdline.append('-')
else:
output = createTempFile(arg)
cmdline.append(output.name)
elif hasattr(arg, 'read'): # StringIO or any file like object
if len(args) == 2:
# FFmpeg can't get media info from an input pipe
# We have to write media content to temporary file
output = createTempFile(arg)
cmdline.append(output.name)
else:
if allow_stdin:
use_stdin = arg
cmdline.append('-')
else:
output = createTempFile(arg)
cmdline.append(output.name)
else:
cmdline.append(arg)
logger.warning("Running libAV command line: {0}".format(cmdline))
p = Popen(cmdline, stdin=PIPE, stdout=PIPE, stderr=PIPE)
if use_stdin is not None:
if IFile.providedBy(use_stdin):
stdout, stderr = p.communicate(use_stdin.data)
else:
use_stdin.reset()
stdout, stderr = p.communicate(use_stdin.read())
if 'partial file' in stderr:
# the video file can't be converted through pipe...
logger.debug("Can't use piped conversion. Switch to temporary file...")
return self.__exec__(*args, allow_stdin=False)
else:
stdout, stderr = p.communicate()
if stderr:
logger.warning("Error on libAV command line: {0}".format(cmdline))
logger.warning(stderr)
return stdout, stderr
def render(self, effectchain, output):
"""Create a new file by chaining audio/video effects"""
inputs = []
cmds = [[]]
outputs = []
# we want to operate on more objects that use the same file
# source, So, we have to split the effect chain in various
# intermediate jobs, then rebuild all
for index, effect in enumerate(effectchain):
if index == 1 and not effect in inputs:
inputs.append(effect)
cmds[len(cmds)-1].append(effect)
else:
outputs.append("%s%s%s-%s" % (dirname(output), sep, len(cmds), basename(output)))
cmds.append([])
input = []
# prcessing intermediate outputs
for index, output in enumerate(outputs):
cmd = ["-y", ]
cmd.extend(inputs[index].cmdline())
cmd.append(output)
self.__exec__(*cmd)
# procesing final output
cmd = ["-y", ]
for index, output in enumerate(outputs):
doc = FFEffect(output)
if index == 0 and inputs[index].offset():
doc.offset(inputs[index].offset())
cmd.extend(doc.cmdline())
cmd.append(output)
self.__exec__(*cmd)
# removing intermediate outputs
for tmp in outputs:
remove(tmp)
def info(self, input):
"""Retrieve file information parsing command output"""
metadata = []
if IFile.providedBy(input) or isinstance(input, (str, unicode)) or hasattr(input, 'read'):
input = [input, ]
if self.__ffmpeg__ == 'avconv':
for i in range(0, len(input) * 2, 2):
input.insert(i, "-i")
if self.__ffmpeg__ == 'avprobe':
input.extend(['-show_format', '-show_streams', '-of', 'json'])
probe = self.__exec__(*input)[0] # stdout
try:
metadata = json.loads(probe.decode())
except UnicodeDecodeError:
metadata = json.loads(probe.decode('utf-8'))
else:
lines = self.__exec__(*input)[1] # stderr
for line in lines.split('\n'):
if isinstance(line, str):
try:
line = line.decode()
except UnicodeDecodeError:
logger.debug("Unicode decode error: {0}".format(line))
continue
if FFmpeg.re_mainline.match(line):
clip, vtype, filename = FFmpeg.re_mainline.match(line).groups()
metadata.append({"vtype": vtype, "filename": filename, "video": [], "audio": []})
elif FFmpeg.re_infoline.match(line):
current = len(metadata) - 1
metadata[current]["duration"], metadata[current]["bitrate"] = FFmpeg.re_infoline.match(line).groups()
elif FFmpeg.re_audioline.match(line):
clip, lang, codec, freq, chan, freqbit, bitrate = FFmpeg.re_audioline.match(line).groups()
audiostream = {"codec": codec, "lang": lang, "freq": freq, "chan": chan, "freqbit": freqbit, "bitrate": bitrate}
metadata[len(metadata) - 1]["audio"].append(audiostream)
elif FFmpeg.re_videoline.match(line):
clip, lang, codec, pix_fmt, size, framerate = FFmpeg.re_videoline.match(line).groups()
size = size.split(" ")
videostream = {"codec": codec, "lang": lang, "pix_fmt": pix_fmt, "size": size, "framerate": framerate}
metadata[len(metadata) - 1]["video"].append(videostream)
return metadata
class FFEffect:
"""
effect for a specified input file
each "set" method has an unset_* method
to clear the effect of the former (e.g.
crop() and unset_crop() ), and a general
unset() method
"""
def __init__(self, inputfile, **args):
self.__file__ = inputfile
for opt in args.keys():
if not opt in ["b", "vframes", "r", "s", "aspect", "croptop",
"cropbottom", "cropleft", "cropright", "padtop",
"padbottom", "padleft", "padright", "padcolor",
"vn", "bt", "maxrate", "minrate", "bufsize",
"vcodec", "sameq", "pass", "newvideo", "pix_fmt",
"sws_flag", "g", "intra", "vdt", "qscale",
"qmin", "qmax", "qdiff", "qblur", "qcomp", "lmin",
"lmax", "mblmin", "mblmax", "rc_init_cplx",
"b_qfactor", "i_qfactor", "b_qoffset",
"i_qoffset", "rc_eq", "rc_override", "me_method",
"dct_algo", "idct_algo", "er", "ec", "bf", "mbd",
"4mv", "part", "bug", "strict", "aic", "umv",
"deinterlace", "ilme", "psnr", "vhook", "top",
"dc", "vtag", "vbsf", "aframes", "ar", "ab", "ac",
"an", "acodec", "newaudio", "alang", "t",
"itsoffset", "ss", "dframes"]:
raise FFException("Error parsing option: %s" % opt)
self.__effects__ = args
self.__default__ = self.__effects__.copy()
def cmdline(self):
""" return a list of arguments """
cmd = ["-i", self.__file__]
for opt, value in self.__effects__.items():
cmd.append("-%s" % opt)
if value is not True:
cmd.append("%s" % value)
return cmd
def getOutput(self, format=None, target='-'):
if (format is None) and hasattr(self, '__metadata__'):
format = self.__metadata__.get('vtype')
cmdline = self.cmdline() + ['-f', format, target]
stdout, stderr = FFmpeg().__exec__(*cmdline)
return {'output': stdout,
'errors': stderr,
'cmdline': ' '.join(map(str, cmdline))}
def restore(self):
"""
restore initial settings
"""
self.__effects__ = self.__default__.copy()
def unset(self):
"""
clear settings
"""
self.__effects__ = {}
def duration(self, t=None):
""" restrict transcode sequence to duration specified """
if t:
self.__effects__["t"] = float(t)
return self.__effects__.get("t")
def unset_duration(self):
del self.__effects__["duration"]
def seek(self, ss=None):
""" seek to time position in seconds """
if ss:
self.__effects__["ss"] = float(ss)
return self.__effects__.get("ss")
def unset_seek(self):
del self.__effects__["ss"]
def offset(self, itsoffset=None):
""" Set the input time offset in seconds """
if itsoffset:
self.__effects__["itsoffset"] = itsoffset
return self.__effects__.get("itsoffset")
def unset_offset(self):
del self.__effects__["itsoffset"]
def dframes(self, dframes=None):
""" number of data frames to record """
if dframes:
self.__effects__["dframes"] = dframes
return self.__effects__.get("dframes")
def unset_dframes(self):
del self.__effects__["dframes"]
class FFVideoEffect(FFEffect):
"""
video effect
"""
def __init__(self, inputfile=None, **args):
FFEffect.__init__(self, inputfile, **args)
def bitrate(self, b=None):
""" set video bitrate """
if b:
self.__effects__["b:v"] = "%sk" % int(b)
return self.__effects__.get("b:v")
def unset_bitrate(self):
del self.__effects__["b:v"]
def vframes(self, vframes=None):
""" set number of video frames to record """
if vframes:
self.__effects__["vframes"] = int(vframes)
return self.__effects__.get("vframes")
def unset_vframes(self):
del self.__effects__["vframes"]
def rate(self, r=None):
""" set frame rate """
if r:
self.__effects__["r"] = int(r)
return self.__effects__.get("r")
def unset_rate(self):
del self.__effects__["r"]
def size(self, s=None):
""" set frame size """
if s in ["sqcif", "qcif", "cif", "4cif", "qqvga", "qvga", "vga", "svga",
"xga", "uxga", "qxga", "sxga", "qsxga", "hsxga", "wvga", "wxga",
"wsxga", "wuxga", "wqxga", "wqsxga", "wquxga", "whsxga",
"whuxga", "cga", "ega", "hd480", "hd720", "hd1080"]:
self.__effects__["s"] = s
elif s:
wh = s.split("x")
if len(wh) == 2 and int(wh[0]) and int(wh[1]):
self.__effects__["s"] = s
else:
raise FFException("Error parsing option: size")
return self.__effects__.get("s")
def unset_size(self):
del self.__effects__["s"]
def aspect(self, aspect=None):
""" set aspect ratio """
if aspect:
self.__effects__["aspect"] = aspect
return self.__effects__.get("aspect")
def unset_aspect(self):
del self.__effects__["aspect"]
def crop(self, top=0, bottom=0, left=0, right=0):
""" set the crop size """
if top % 2:
top = top - 1
if bottom % 2:
bottom = bottom - 1
if left % 2:
left = left - 1
if right % 2:
right = right - 1
if top:
self.__effects__["croptop"] = top
if bottom:
self.__effects__["cropbottom"] = bottom
if left:
self.__effects__["cropleft"] = left
if right:
self.__effects__["cropright"] = right
return self.__effects__.get("croptop"), self.__effects__.get("cropbottom"), self.__effects__.get("cropleft"), self.__effects__.get("cropright")
def unset_crop(self):
del self.__effects__["croptop"]
del self.__effects__["cropbottom"]
del self.__effects__["cropleft"]
del self.__effects__["cropright"]
def pad(self, top=0, bottom=0, left=0, right=0, color="000000"):
""" set the pad band size and color as hex value """
if top:
self.__effects__["padtop"] = top
if bottom:
self.__effects__["padbottom"] = bottom
if left:
self.__effects__["padleft"] = left
if right:
self.__effects__["padright"] = right
if color:
self.__effects__["padcolor"] = color
return self.__effects__.get("padtop"), self.__effects__.get("padbottom"), self.__effects__.get("padleft"), self.__effects__.get("padright"), self.__effects__.get("padcolor")
def unset_pad(self):
del self.__effects__["padtop"]
del self.__effects__["padbottom"]
del self.__effects__["padleft"]
del self.__effects__["padright"]
def vn(self):
""" disable video recording """
self.__effects__["vn"] = True
def unset_vn(self):
del self.__effects__["vn"]
def bitratetolerance(self, bt=None):
""" set bitrate tolerance """
if bt:
self.__effects__["bt"] = "%sk" % int(bt)
return self.__effects__.get("bt")
def unset_bitratetolerance(self):
del self.__effects__["bt"]
def bitraterange(self, minrate=None, maxrate=None):
""" set min/max bitrate (bit/s) """
if minrate or maxrate and not self.__effects__["bufsize"]:
self.__effects__["bufsize"] = 4096
if minrate:
self.__effects__["minrate"] = minrate
if maxrate:
self.__effects__["maxrate"] = maxrate
return self.__effects__.get("minrate"), self.__effects__.get("maxrate")
def unset_bitraterange(self):
del self.__effects__["maxrate"]
del self.__effects__["minrate"]
def bufsize(self, bufsize=4096):
""" set buffer size (bits) """
self.__effects__["bufsize"] = int(bufsize)
return self.__effects__["bufsize"]
def unset_bufsize(self):
del self.__effects__["bufsize"]
def vcodec(self, vcodec="copy"):
""" set video codec """
self.__effects__["vcodec"] = vcodec
return self.__effects__["vcodec"]
def unset_vcodec(self):
del self.__effects__["vcodec"]
def sameq(self):
""" use same video quality as source """
self.__effects__["sameq"] = True
def unset_sameq(self):
del self.__effects__["sameq"]
def passenc(self, p=1):
""" select pass number (1 or 2)"""
self.__effects__["pass"] = (int(p) % 3 + 1) % 2 + 1 #!!!
return self.__effects__["pass"]
def unset_passenc(self):
del self.__effects__["pass"]
def pixelformat(self, p=None):
""" set pixelformat """
if p:
self.__effects__["pix_fmt"] = p
return self.__effects__.get("pix_fmt")
def unset_pixelformat(self):
del self.__effects__["pix_fmt"]
#TODO: sws_flag
def picturesize(self, gop=None):
""" set of group pictures size """
if gop:
self.__effects__["gop"] = int(gop)
return self.__effects__.get("gop")
def unset_picturesize(self):
del self.__effects__["gop"]
def intra(self):
""" use only intra frames """
self.__effects__["intra"] = True
def unset_intra(self):
del self.__effects__["intra"]
def vdthreshold(self, vdt=None):
""" discard threshold """
if vdt:
self.__effects__["vdt"] = int(vdt)
return self.__effects__.get("vdt")
def unset_vdthreshold(self):
del self.__effects__["vdt"]
def quantizerscale(self, qscale=None):
""" Fixed quantizer scale """
if qscale:
self.__effects__["qscale"] = int(qscale)
return self.__effects__.get("qscale")
def unset_quantizerscale(self):
del self.__effects__["qscale"]
def quantizerrange(self, qmin=None, qmax=None, qdiff=None):
""" define min/max quantizer scale """
if qdiff:
self.__effects__["qdiff"] = int(qdiff)
else:
if qmin:
self.__effects__["qmin"] = int(qmin)
if qmax:
self.__effects__["qmax"] = int(qmax)
return self.__effects__.get("qmin"), self.__effects__.get("qmax"), self.__effects__.get("qdiff"),
def unset_quantizerrange(self):
del self.__effects__["qdiff"]
def quantizerblur(self, qblur=None):
""" video quantizer scale blur """
if qblur:
self.__effects__["qblur"] = float(qblur)
return self.__effects__.get("qblur")
def unset_quantizerblur(self):
del self.__effects__["qblur"]
def quantizercompression(self, qcomp=0.5):
""" video quantizer scale compression """
self.__effects__["qcomp"] = float(qcomp)
return self.__effects__["qcomp"]
def unset_quantizercompression(self):
del self.__effects__["qcomp"]
def lagrangefactor(self, lmin=None, lmax=None):
""" min/max lagrange factor """
if lmin:
self.__effects__["lmin"] = int(lmin)
if lmax:
self.__effects__["lmax"] = int(lmax)
return self.__effects__.get("lmin"), self.__effects__.get("lmax")
def unset_lagrangefactor(self):
del self.__effects__["lmin"]
del self.__effects__["lmax"]
def macroblock(self, mblmin=None, mblmax=None):
""" min/max macroblock scale """
if mblmin:
self.__effects__["mblmin"] = int(mblmin)
if mblmax:
self.__effects__["mblmax"] = int(mblmax)
return self.__effects__.get("mblmin"), self.__effects__.get("mblmax")
def unset_macroblock(self):
del self.__effects__["mblmin"]
del self.__effects__["mblmax"]
#TODO: read man pages !
class FFAudioEffect(FFEffect):
"""
Audio effect
"""
def __init__(self, inputfile, **args):
FFEffect.__init__(self, inputfile, **args)
def aframes(self, aframes=None):
""" set number of audio frames to record """
if aframes:
self.__effects__["aframes"] = int(aframes)
return self.__effects__.get("aframes")
def unset_aframes(self):
del self.__effects__["aframes"]
def audiosampling(self, ar=44100):
""" set audio sampling frequency (Hz)"""
self.__effects__["ar"] = int(ar)
return self.__effects__["ar"]
def unset_audiosampling(self):
del self.__effects__["ar"]
def audiobitrate(self, ab=64):
""" set audio bitrate (kbit/s)"""
self.__effects__["b:a"] = "%sk" % int(ab)
return self.__effects__["b:a"]
def unset_audiobitrate(self):
del self.__effects__["b:a"]
def audiochannels(self, ac=1):
""" set number of audio channels """
self.__effects__["ac"] = int(ac)
return self.__effects__["ac"]
def unset_audiochannels(self):
del self.__effects__["ac"]
def audiorecording(self):
""" disable audio recording """
self.__effects__["an"] = True
def unset_audiorecording(self):
del self.__effects__["an"]
def acodec(self, acodec="copy"):
""" select audio codec """
self.__effects__["acodec"] = acodec
return self.__effects__["acodec"]
def unset_acodec(self):
del self.__effects__["acodec"]
def newaudio(self):
""" add new audio track """
self.__effects__["newaudio"] = True
def unset_newaudio(self):
del self.__effects__["newaudio"] | ztfy.media | /ztfy.media-0.1.12.tar.gz/ztfy.media-0.1.12/src/ztfy/media/ffbase.py | ffbase.py |
__docformat__ = "restructuredtext"
# import standard packages
import mimetypes
from BTrees.OOBTree import OOBTree
from persistent.dict import PersistentDict
# import Zope3 interfaces
from zope.app.file.interfaces import IFile
from zope.annotation.interfaces import IAnnotations
from zope.traversing.interfaces import TraversalError
# import local interfaces
from ztfy.media.interfaces import IMediaInfo, IMediaConversions, IMediaConversionUtility, \
CUSTOM_AUDIO_TYPES, CUSTOM_VIDEO_TYPES, MEDIA_CONVERSIONS_KEY
# import Zope3 packages
from zope.component import adapts, getUtility
from zope.event import notify
from zope.interface import implements
from zope.lifecycleevent import ObjectCreatedEvent
from zope.location import locate
from zope.traversing import namespace
# import local packages
from ztfy.extfile.blob import BlobFile
from ztfy.media.ffbase import FFmpeg
#
# Media infos
#
MEDIA_INFOS_KEY = 'ztfy.media.infos'
class MediaInfosAdapter(object):
"""Media infos adapter"""
adapts(IFile)
implements(IMediaInfo)
def __new__(self, context):
if not (context.contentType.startswith('audio/') or
context.contentType.startswith('video/') or
(context.contentType in (CUSTOM_AUDIO_TYPES + CUSTOM_VIDEO_TYPES))):
return None
return object.__new__(self, context)
def __init__(self, context):
self.context = context
annotations = IAnnotations(context)
infos = annotations.get(MEDIA_INFOS_KEY)
if infos is None:
infos = FFmpeg().info(self.context)
if infos:
infos = annotations[MEDIA_INFOS_KEY] = PersistentDict(infos[0])
else:
infos = annotations[MEDIA_INFOS_KEY] = {}
self.infos = infos
#
# Media conversions
#
class MediaConversionsAdapter(object):
"""Media conversions adapter"""
adapts(IFile)
implements(IMediaConversions)
def __new__(self, context):
if not (context.contentType.startswith('audio/') or
context.contentType.startswith('video/') or
(context.contentType in (CUSTOM_AUDIO_TYPES + CUSTOM_VIDEO_TYPES))):
return None
return object.__new__(self, context)
def __init__(self, context):
self.context = context
annotations = IAnnotations(context)
conversions = annotations.get(MEDIA_CONVERSIONS_KEY)
if conversions is None:
# Use OOBTree to reduce conflicts when converting to several
# formats simultaneously...
conversions = annotations[MEDIA_CONVERSIONS_KEY] = OOBTree()
self.conversions = conversions
def addConversion(self, data, format, extension=None, width=None):
target = BlobFile()
notify(ObjectCreatedEvent(target))
target.data = data
target.contentType = format
if extension is None:
extension = mimetypes.guess_extension(format)
target_name = '%s%s' % (('w%d' % width) if width else 'media', extension)
self.conversions[target_name] = target
target_name = '++conversion++%s' % target_name
locate(target, self.context, target_name)
return target
def hasConversion(self, formats):
if self.context.contentType in formats:
return True
for conversion in self.getConversions():
if conversion.contentType in formats:
return True
return False
def getConversions(self):
converter = getUtility(IMediaConversionUtility)
result = list(self.conversions.values())
if (self.context.contentType.startswith('video/') and not converter.force_video_conversion) or \
(self.context.contentType.startswith('audio/') and not converter.force_audio_conversion):
result.append(self.context)
return result
def getConversion(self, name):
if '/' in name:
for conversion in self.getConversions():
if conversion.contentType == name:
return conversion
return self.conversions.get(name)
class MediaConversionPathTraverser(namespace.view):
"""Media ++conversion++ traverse adapter"""
def traverse(self, name, ignored):
conversions = IMediaConversions(self.context, None)
if conversions is not None:
result = conversions.getConversion(name)
if result is not None:
return result
raise TraversalError("++conversion++%s" % name) | ztfy.media | /ztfy.media-0.1.12.tar.gz/ztfy.media-0.1.12/src/ztfy/media/adapter.py | adapter.py |
# import standard packages
import logging
logger = logging.getLogger('ztfy.media')
from multiprocessing.process import Process
from persistent import Persistent
from threading import Thread
import os
# import Zope3 interfaces
from transaction.interfaces import ITransactionManager
from zope.annotation.interfaces import IAnnotations
from zope.app.file.interfaces import IFile
from zope.component.interfaces import ISite
from zope.dublincore.interfaces import IZopeDublinCore
# import local interfaces
from ztfy.media.interfaces import IMediaConversionUtility, IMediaConversions, IMediaConverter, \
CUSTOM_AUDIO_TYPES, CUSTOM_VIDEO_TYPES, MEDIA_CONVERSION_CMDLINE_KEY
from ztfy.utils.interfaces import IZEOConnection
# import Zope3 packages
from zope.app.publication.zopepublication import ZopePublication
from zope.component import getUtility, queryUtility, hooks
from zope.container.contained import Contained
from zope.interface import implements
from zope.schema.fieldproperty import FieldProperty
from zope.traversing import api as traversing_api
# import local packages
from ztfy.utils.request import getRequest, newParticipation, endParticipation
from ztfy.utils.traversing import getParent
from ztfy.utils.zodb import ZEOConnectionInfo
from ztfy.zmq.handler import ZMQMessageHandler
from ztfy.zmq.process import ZMQProcess
from ztfy.zmq.socket import zmq_socket, zmq_response
#
# Media conversion process
#
class MediasConversionProcess(ZMQProcess):
"""Medias conversion process"""
class ConversionProcess(Process):
"""Conversion manager process"""
def __init__(self, settings, group=None, target=None, name=None, *args, **kwargs):
Process.__init__(self, group=group, target=target, name=name, args=args, kwargs=kwargs)
self.settings = settings
def run(self):
# Lower process nice to keep web interface responsive
os.nice(10)
# Check conversion settings
settings = self.settings
zeo_settings = settings.get('zeo')
media_path = settings.get('media')
media_format = settings.get('format')
if not (zeo_settings and media_path and media_format):
logger.warning("Received bad conversion request: %s" % str(settings))
return
logger.info("Received media conversion request: %s => %s" % (media_path, media_format))
converter = queryUtility(IMediaConverter, media_format)
if converter is None:
logger.warning("Missing media converter: %s" % media_format)
return
# Open ZEO connection
connection_info = ZEOConnectionInfo()
connection_info.update(zeo_settings)
newParticipation(settings.get('principal'))
request = getRequest()
manager = None
logger.debug("Opening ZEO connection...")
storage, db = connection_info.getConnection(get_storage=True)
try:
connection = db.open()
root = connection.root()
root_folder = root.get(ZopePublication.root_name, None)
media = traversing_api.traverse(root_folder, media_path, default=None, request=request)
if IFile.providedBy(media):
site = getParent(media, ISite)
hooks.setSite(site)
# extract converter output
logger.debug("Starting conversion process for %s to %s" % (media_path, media_format))
conversion = converter.convert(media)
conversion_result = conversion.get('output', '')
if len(conversion_result) > 0:
# add conversion in a transaction attempts loop
manager = ITransactionManager(media)
for attempt in manager.attempts():
with attempt as t:
converted = IMediaConversions(media).addConversion(conversion_result,
media_format,
'.%s' % converter.format)
IAnnotations(converted)[MEDIA_CONVERSION_CMDLINE_KEY] = conversion.get('cmdline')
if t.status == 'Committed':
break
else:
logger.warning("Finished FFmpeg conversion process to '%s' with **NO OUTPUT**!!!" % media_format)
logger.warning(conversion.get('errors'))
else:
logger.warning("Can't find requested media: %s" % media_path)
finally:
endParticipation()
if manager is not None:
manager.abort()
connection.close()
storage.close()
#
# Medias conversion handlers
#
class ConversionThread(Thread):
def __init__(self, process):
Thread.__init__(self)
self.process = process
def run(self):
self.process.start()
self.process.join()
class ConversionHandler(object):
"""Media conversion manager
The conversion manager is launched by a ZMQ 'convert' JSON message, which
should contain the following attributes:
- zeo: dict of ZEO connection settings
- principal: media creator's ID
- media: complete path to the new media
- format: requested conversion format
"""
def convert(self, data):
ConversionThread(ConversionProcess(data)).start()
return [200, 'OK - Conversion process started']
class ConversionMessageHandler(ZMQMessageHandler):
"""Media conversion message handler"""
handler = ConversionHandler
#
# Medias conversion configuration utility
#
class MediaConversionUtility(Persistent, Contained):
"""Media conversion configuration utility"""
implements(IMediaConversionUtility)
converter_address = FieldProperty(IMediaConversionUtility['converter_address'])
video_formats = FieldProperty(IMediaConversionUtility['video_formats'])
force_video_conversion = FieldProperty(IMediaConversionUtility['force_video_conversion'])
audio_formats = FieldProperty(IMediaConversionUtility['audio_formats'])
force_audio_conversion = FieldProperty(IMediaConversionUtility['force_audio_conversion'])
zeo_connection = FieldProperty(IMediaConversionUtility['zeo_connection'])
def checkMediaConversion(self, media):
"""Request conversion of given media"""
content_type = media.contentType
if self.audio_formats and \
(content_type.startswith('audio/') or (content_type in CUSTOM_AUDIO_TYPES)):
requested_formats = [format for format in self.audio_formats
if self.force_audio_conversion or (format != content_type)]
elif self.video_formats and \
(content_type.startswith('video/') or (content_type in CUSTOM_VIDEO_TYPES)):
requested_formats = [format for format in self.video_formats
if self.force_video_conversion or (format != content_type)]
else:
requested_formats = ()
for format in requested_formats:
self.convert(media, format)
def convert(self, media, format):
"""Send conversion request for given media"""
if not self.zeo_connection:
return
socket = zmq_socket(self.converter_address)
zeo = getUtility(IZEOConnection, self.zeo_connection)
settings = {'zeo': zeo.getSettings(),
'principal': IZopeDublinCore(media).creators[0],
'media': traversing_api.getPath(media),
'format': format}
socket.send_json(['convert', settings])
return zmq_response(socket) | ztfy.media | /ztfy.media-0.1.12.tar.gz/ztfy.media-0.1.12/src/ztfy/media/utility.py | utility.py |
__docformat__ = "restructuredtext"
# import standard packages
import atexit
import logging
logger = logging.getLogger('ztfy.media')
import mimetypes
import time
import transaction
import zmq
# import Zope3 interfaces
from zope.app.file.interfaces import IFile
from zope.component.interfaces import IRegistered, IUnregistered, ISite
from zope.container.interfaces import IObjectAddedEvent
from zope.processlifetime import IDatabaseOpenedWithRoot
from zope.app.publication.zopepublication import ZopePublication
from zope.traversing import api as traversing_api
# import local interfaces
from ztfy.media.interfaces import IMediaConversionUtility, IMediaInfo, \
CUSTOM_AUDIO_TYPES, CUSTOM_VIDEO_TYPES
# import Zope3 packages
from zope.component import adapter, queryUtility
from zope.site import hooks
# import local packages
from ztfy.media.ffdocument import FFDocument
from ztfy.media.utility import ConversionMessageHandler, MediasConversionProcess
from ztfy.zmq.process import processExitFunc
_processes = {}
@adapter(IMediaConversionUtility, IRegistered)
def handleRegisteredMediaConversionUtility(utility, event):
if utility.converter_address:
path = traversing_api.getPath(utility)
if _processes.get(path) is None:
process = MediasConversionProcess(utility.converter_address, ConversionMessageHandler)
process.start()
time.sleep(2)
if process.is_alive():
_processes[path] = process
atexit.register(processExitFunc, process=process)
logger.info("Starting ZMQ listener process %s with PID %d for handler %s" %
(process.name, process.pid, str(process.handler)))
@adapter(IMediaConversionUtility, IUnregistered)
def handleUnregisteredMediaConversionUtility(utility, event):
path = traversing_api.getPath(utility)
process = _processes.get(path)
if process is not None:
process.terminate()
process.join()
logger.info("Stopped ZMQ process %s" % process.name)
del _processes[path]
@adapter(IDatabaseOpenedWithRoot)
def handleOpenedDatabase(event):
"""Launch ZMQ conversion process"""
db = event.database
connection = db.open()
root = connection.root()
root_folder = root.get(ZopePublication.root_name, None)
for site in root_folder.values():
if ISite(site, None) is not None:
hooks.setSite(site)
utility = queryUtility(IMediaConversionUtility)
if (utility is not None) and utility.converter_address:
try:
path = traversing_api.getPath(utility)
if _processes.get(path) is None:
process = MediasConversionProcess(utility.converter_address, ConversionMessageHandler)
process.start()
time.sleep(2)
if process.is_alive():
_processes[path] = process
atexit.register(processExitFunc, process=process)
logger.info("Starting ZMQ process %s listening on %s with PID %d for handler %s" %
(process.name, utility.converter_address,
process.pid, str(process.handler)))
except zmq.ZMQError, e:
logger.warning("Can't start medias conversion process: " + e.message)
#
# Medias converter after commit hook
#
def checkMediaConversions(status, object):
if not status: # transaction aborted
return
utility = queryUtility(IMediaConversionUtility)
if utility is not None:
utility.checkMediaConversion(object)
@adapter(IFile, IObjectAddedEvent)
def handleNewFile(object, event):
"""Check for conversion of new files"""
content_type = object.contentType
if content_type.startswith('image/'):
return
media_type = content_type.startswith('audio/') or \
content_type.startswith('video/') or \
(content_type in (CUSTOM_AUDIO_TYPES + CUSTOM_VIDEO_TYPES))
if not media_type:
# try to check media type with FFmpeg for undetected formats
document = FFDocument(object)
metadata = document.__metadata__
media_type = metadata.get('vtype')
if media_type:
ext = media_type.split(',')[0]
content_type = mimetypes.guess_type('media.%s' % ext)[0]
if content_type is not None:
object.contentType = content_type
if media_type:
_infos = IMediaInfo(object, None)
transaction.get().addAfterCommitHook(checkMediaConversions, kws={'object': object}) | ztfy.media | /ztfy.media-0.1.12.tar.gz/ztfy.media-0.1.12/src/ztfy/media/events.py | events.py |
from ztfy.media.ffbase import FFVideoEffect, FFAudioEffect, FFmpeg
from ztfy.media.interfaces import IMediaInfo
class FFDocument(FFVideoEffect, FFAudioEffect):
"""
audio/video document. A FFDocument describe a higer level action set
combining several FF[Audio|Video]Effect methods.
"""
def __init__(self, file, metadata=None, effects={}):
"""
x.__init__(...) initializes x; see x.__class__.__doc__ for signature
"""
FFAudioEffect.__init__(self, file)
FFVideoEffect.__init__(self, file, **effects)
if not metadata:
info = IMediaInfo(file, None)
if info is not None:
self.__metadata__ = info
else:
info = FFmpeg('avprobe').info(file)
if info:
self.__metadata__ = info
else:
self.__metadata__ = {}
else:
self.__metadata__ = metadata
def get_stream_info(self, codec_type=None):
"""Get metadata info for given stream"""
for stream in self.__metadata__.get('streams', ()):
if (not codec_type) or (stream.get('codec_type') == codec_type):
return stream
def __tlen__(self):
"""
return time length
"""
stream = self.get_stream_info()
if stream is not None:
t = self.__timeparse__(float(stream["duration"]))
if self.seek():
t = t - self.seek()
if self.duration():
t = t - (t - self.duration())
return t
def __timereference__(self, reference, time):
if isinstance(time, (str, unicode)):
if '%' in time:
parsed = (reference / 100.0) * int(time.split("%")[0])
else:
elts = time.split(':')
if len(elts) == 3:
hhn, mmn, ssn = [float(i) for i in elts]
parsed = hhn * 3600 + mmn * 60 + ssn
elif len(elts) == 2:
hhn, mmn = [float(i) for i in elts]
ssn = 0
parsed = hhn * 3600 + mmn * 60 + ssn
else:
parsed = 0
else:
parsed = time
return parsed
def __timeparse__(self, time):
if isinstance(time, (str, unicode)):
if ':' in time:
hh, mm, ss = [float(i) for i in time.split(":")]
return hh * 3600 + mm * 60 + ss
elif isinstance(time, float):
return time
def __clone__(self):
return FFDocument(self.__file__, self.__metadata__.copy(), self.__effects__.copy())
def resample(self, width=0, height=0, vstream=0):
"""Adjust video dimensions. If one dimension is specified, the re-sampling is proportional
"""
stream = self.get_stream_info('video')
if stream is not None:
w, h = stream['width'], stream['height']
if not width:
width = int(w * (float(height) / h))
elif not height:
height = int(h * (float(width) / w))
elif not width and height:
return
new = self.__clone__()
if width < w:
cropsize = (w - width) / 2
new.crop(0, 0, cropsize, cropsize)
elif width > w:
padsize = (width - w) / 2
new.pad(0, 0, padsize, padsize)
if height < h:
cropsize = (h - height) / 2
new.crop(cropsize, cropsize, 0, 0)
elif height > h:
padsize = (height - h) / 2
new.pad(padsize, padsize, 0, 0)
return new
def resize(self, width=0, height=0, vstream=0):
"""Resize video dimensions. If one dimension is specified, the re-sampling is proportional
Width and height can be pixel or % (not mixable)
"""
stream = self.get_stream_info('video')
if stream is not None:
w, h = stream['width'], stream['height']
if type(width) == str or type(height) == str:
if not width:
width = height = int(height.split("%")[0])
elif not height:
height = width = int(width.split("%")[0])
elif not width and height:
return
elif width and height:
width = int(width.split("%")[0])
height = int(height.split("%")[0])
size = "%sx%s" % (int(w / 100.0 * width), int(h / 100.0 * height))
else:
if not width:
width = int(w * (float(height) / h))
elif not height:
height = int(h * (float(width) / w))
elif not width and height:
return
size = "%sx%s" % (width, height)
new = self.__clone__()
new.size(size)
return new
def split(self, time):
"""Return a tuple of FFDocument splitted at a specified time.
Allowed formats: %, sec, hh:mm:ss.mmm
"""
stream = self.get_stream_info()
if stream is not None:
sectime = self.__timeparse__(stream["duration"])
if self.duration():
sectime = sectime - (sectime - self.duration())
if self.seek():
sectime = sectime - self.seek()
cut = self.__timereference__(sectime, time)
first = self.__clone__()
second = self.__clone__()
first.duration(cut)
second.seek(cut + 0.001)
return first, second
def ltrim(self, time):
"""Trim leftmost side (from start) of the clip"""
stream = self.get_stream_info()
if stream is not None:
sectime = self.__timeparse__(stream["duration"])
if self.duration():
sectime = sectime - (sectime - self.duration())
if self.seek():
sectime = sectime - self.seek()
trim = self.__timereference__(sectime, time)
new = self.__clone__()
if self.seek():
new.seek(self.seek() + trim)
else:
new.seek(trim)
return new
def rtrim(self, time):
"""Trim rightmost side (from end) of the clip"""
stream = self.get_stream_info()
if stream is not None:
sectime = self.__timeparse__(self.__metadata__["duration"])
if self.duration():
sectime = sectime - (sectime - self.duration())
if self.seek():
sectime = sectime - self.seek()
trim = self.__timereference__(sectime, time)
new = self.__clone__()
new.duration(trim)
return new
def trim(self, left, right):
"""Left and right trim (actually calls ltrim and rtrim)"""
return self.__clone__().ltrim(left).rtrim(right)
def chainto(self, ffdoc):
"""Prepare to append at the end of another movie clip"""
offset = 0
if ffdoc.seek():
offset = ffdoc.seek()
if ffdoc.duration():
offset = offset + ffdoc.seek()
if ffdoc.offset():
offset = offset + ffdoc.offset()
new = self.__clone__()
new.offset(offset)
return new
#TODO: more and more effects!!! | ztfy.media | /ztfy.media-0.1.12.tar.gz/ztfy.media-0.1.12/src/ztfy/media/ffdocument.py | ffdocument.py |
# import standard packages
import os
import subprocess as sp
# import Zope3 interfaces
from zope.app.file.interfaces import IFile
# import local interfaces
from ztfy.file.interfaces import IImageDisplay, IWatermarker
# import Zope3 packages
from zope.app.file.image import Image
from zope.component import adapts, getAllUtilitiesRegisteredFor
from zope.event import notify
from zope.interface import implements
from zope.lifecycleevent import ObjectCreatedEvent
from zope.location import locate
# import local packages
from ztfy.extfile.blob import BlobImage
from ztfy.file.display import ImageDisplayAdapter
from tempfile import NamedTemporaryFile
class VideoMediaDisplayAdapter(ImageDisplayAdapter):
"""Media video display adapter"""
adapts(IFile)
implements(IImageDisplay)
def __new__(cls, context):
if not context.contentType.startswith('video/'):
return None
return ImageDisplayAdapter.__new__(cls, context)
@property
def image(self):
image = self.displays.get('__video__')
if image is None:
# We extract image 5 seconds after video starts...
pipe = sp.Popen(('ffmpeg', '-i', '-', '-ss', '5', '-f', 'image2', '-vframes', '1', '-'),
stdin=sp.PIPE, stdout=sp.PIPE, stderr=sp.PIPE)
if pipe:
stdout, _stderr = pipe.communicate(self.context.data)
# Some video formats can't be converted via pipes
# If we don't get any output we have to use a temporary file
if not stdout:
output = NamedTemporaryFile(prefix='media_', suffix='.img')
output.write(self.context.data)
output.file.flush()
pipe = sp.Popen(('ffmpeg', '-i', output.name, '-ss', '5', '-f', 'image2', '-vframes', '1', '-'),
stdin=sp.PIPE, stdout=sp.PIPE, stderr=sp.PIPE)
if pipe:
stdout, _stderr = pipe.communicate()
# add video watermark
watermarkers = sorted(getAllUtilitiesRegisteredFor(IWatermarker), key=lambda x: x.order)
if watermarkers:
watermarker = watermarkers[0]
watermark = open(os.path.abspath(os.path.join(__file__, '..', 'resources', 'img', 'video-play-mask.png')), mode='r')
try:
stdout, _format = watermarker.addWatermark(stdout, watermark.read())
finally:
watermark.close()
# create final image
self.displays['__video__'] = image = BlobImage(stdout)
notify(ObjectCreatedEvent(image))
size = image.getImageSize()
locate(image, self.context, '++display++%dx%d.jpeg' % (size[0], size[1]))
return image
def _getVideoSize(self):
img = self.image
if img is not None:
return img.getImageSize()
else:
return (-1, -1)
def getImageSize(self):
size = self.displays.get('__size__')
if size is None:
size = self.displays['__size__'] = self._getVideoSize()
return size
class AudioMediaDisplayAdapter(ImageDisplayAdapter):
"""Media audio display adapter"""
adapts(IFile)
implements(IImageDisplay)
def __new__(cls, context):
if not context.contentType.startswith('audio/'):
return None
return ImageDisplayAdapter.__new__(cls, context)
def getDisplay(self, name):
result = Image(open(os.path.abspath(os.path.join(__file__, '..', 'resources', 'img', 'sound.png'))).read())
locate(result, self.context, '++display++%s' % name)
return result | ztfy.media | /ztfy.media-0.1.12.tar.gz/ztfy.media-0.1.12/src/ztfy/media/browser/display.py | display.py |
# import standard packages
# import Zope3 interfaces
from zope.app.file.interfaces import IFile
from zope.browser.interfaces import IBrowserView
from zope.pagetemplate.interfaces import IPageTemplate
# import local interfaces
from ztfy.file.interfaces import IImageDisplay
from ztfy.media.interfaces import IMediaConversions, CUSTOM_VIDEO_TYPES, CUSTOM_AUDIO_TYPES
from ztfy.media.browser.interfaces import IMediaPreview
from ztfy.skin.layer import IZTFYBrowserLayer
# import Zope3 packages
from z3c.template.template import getPageTemplate
from zope.component import adapter, adapts, getMultiAdapter, queryAdapter, queryMultiAdapter
from zope.interface import implementer, implements
# import local packages
from ztfy.skin.page import BaseTemplateBasedPage
DEFAULT_VIDEO_WIDTH = 700
class BaseMediaPreviewAdapter(object):
"""Base media preview adapter"""
adapts(IFile, IZTFYBrowserLayer)
implements(IMediaPreview)
def __init__(self, context, request):
self.context = context
self.request = request
def update(self):
self.conversions = IMediaConversions(self.context)
template = getPageTemplate()
def render(self):
if self.template is None:
template = getMultiAdapter((self, self.request), IPageTemplate)
return template(self)
return self.template()
class VideoPreviewAdapter(BaseMediaPreviewAdapter):
"""Video preview adapter"""
def __new__(cls, context, request):
if not (context.contentType.startswith('video/') or
(context.contentType in CUSTOM_VIDEO_TYPES)):
return None
return BaseMediaPreviewAdapter.__new__(cls, context, request)
@property
def size(self):
display = queryAdapter(self.context, IImageDisplay, name='video')
if display is not None:
width, height = display.getImageSize()
return (DEFAULT_VIDEO_WIDTH, int(1. * DEFAULT_VIDEO_WIDTH * height / width))
else:
return (DEFAULT_VIDEO_WIDTH, 500)
class AudioPreviewAdapter(BaseMediaPreviewAdapter):
"""Audio preview adapter"""
def __new__(cls, context, request):
if not (context.contentType.startswith('audio/') or
(context.contentType in CUSTOM_AUDIO_TYPES)):
return None
return BaseMediaPreviewAdapter.__new__(cls, context, request)
class MediaView(BaseTemplateBasedPage):
"""Media view"""
def __init__(self, context, request, preview):
BaseTemplateBasedPage.__init__(self, context, request)
self.preview = preview
def update(self):
super(MediaView, self).update()
self.preview.update()
@adapter(IFile, IZTFYBrowserLayer)
@implementer(IBrowserView)
def MediaViewFactory(context, request):
if context.contentType.startswith('audio/') or context.contentType in CUSTOM_AUDIO_TYPES:
preview = queryMultiAdapter((context, request), IMediaPreview, name='audio')
elif context.contentType.startswith('video/') or context.contentType in CUSTOM_VIDEO_TYPES:
preview = queryMultiAdapter((context, request), IMediaPreview, name='video')
else:
preview = None
if preview is None:
return None
return MediaView(context, request, preview) | ztfy.media | /ztfy.media-0.1.12.tar.gz/ztfy.media-0.1.12/src/ztfy/media/browser/preview.py | preview.py |
# GPL License v3
The Flowplayer Free version is released under the GNU GENERAL PUBLIC LICENSE
Version 3 (GPL).
#### The GPL requires that you not remove the Flowplayer logo and copyright notices from the user interface. See section 5.d below.
Commercial licenses [are available](http://flowplayer.org/download/). The commercial player version does not
require any Flowplayer notices or texts and also provides some additional
features.
## ADDITIONAL TERM per GPL Section 7
If you convey this program (or any modifications of it) and assume
contractual liability for the program to recipients of it, you agree to
indemnify Flowplayer, Ltd. for any liability that those contractual
assumptions impose on Flowplayer, Ltd.
Except as expressly provided herein, no trademark rights are granted in any
trademarks of Flowplayer, Ltd. Licensees are granted a limited, non-exclusive
right to use the mark Flowplayer and the Flowplayer logos in connection with
unmodified copies of the Program and the copyright notices required by section
5.d of the GPL license. For the purposes of this limited trademark license
grant, customizing the Flowplayer by skinning, scripting, or including plugins
provided by Flowplayer, Ltd. is not considered modifying the Program.
Licensees that do modify the Program, taking advantage of the open-source
license, may not use the Flowplayer mark or Flowplayer logos and must
change the logo as follows:
stating that the licensee modified the Flowplayer. A suitable notice might
read "Flowplayer Source code modified by ModOrg 2012"; for the canvas, the
notice should read "Based on Flowplayer source code".
In addition, licensees that modify the Program must give the modified Program
a new name that is not confusingly similar to Flowplayer and may not
distribute it under the name Flowplayer.
# GNU GENERAL PUBLIC LICENSE
## Version 3, 29 June 2007
Copyright (C) 2007 Free Software Foundation, Inc. http://fsf.org
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
### Preamble
The GNU General Public License is a free, copyleft license for
software and other kinds of works.
The licenses for most software and other practical works are designed
to take away your freedom to share and change the works. By contrast,
the GNU General Public License is intended to guarantee your freedom to
share and change all versions of a program--to make sure it remains free
software for all its users. We, the Free Software Foundation, use the
GNU General Public License for most of our software; it applies also to
any other work released this way by its authors. You can apply it to
your programs, too.
When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
them if you wish), that you receive source code or can get it if you
want it, that you can change the software or use pieces of it in new
free programs, and that you know you can do these things.
To protect your rights, we need to prevent others from denying you
these rights or asking you to surrender the rights. Therefore, you have
certain responsibilities if you distribute copies of the software, or if
you modify it: responsibilities to respect the freedom of others.
For example, if you distribute copies of such a program, whether
gratis or for a fee, you must pass on to the recipients the same
freedoms that you received. You must make sure that they, too, receive
or can get the source code. And you must show them these terms so they
know their rights.
Developers that use the GNU GPL protect your rights with two steps:
(1) assert copyright on the software, and (2) offer you this License
giving you legal permission to copy, distribute and/or modify it.
For the developers' and authors' protection, the GPL clearly explains
that there is no warranty for this free software. For both users' and
authors' sake, the GPL requires that modified versions be marked as
changed, so that their problems will not be attributed erroneously to
authors of previous versions.
Some devices are designed to deny users access to install or run
modified versions of the software inside them, although the manufacturer
can do so. This is fundamentally incompatible with the aim of
protecting users' freedom to change the software. The systematic
pattern of such abuse occurs in the area of products for individuals to
use, which is precisely where it is most unacceptable. Therefore, we
have designed this version of the GPL to prohibit the practice for those
products. If such problems arise substantially in other domains, we
stand ready to extend this provision to those domains in future versions
of the GPL, as needed to protect the freedom of users.
Finally, every program is threatened constantly by software patents.
States should not allow patents to restrict development and use of
software on general-purpose computers, but in those that do, we wish to
avoid the special danger that patents applied to a free program could
make it effectively proprietary. To prevent this, the GPL assures that
patents cannot be used to render the program non-free.
The precise terms and conditions for copying, distribution and
modification follow.
### TERMS AND CONDITIONS
### 0. Definitions.
*This License* refers to version 3 of the GNU General Public License.
*Copyright* also means copyright-like laws that apply to other kinds of
works, such as semiconductor masks.
*The Program* refers to any copyrightable work licensed under this
License. Each licensee is addressed as "you". "Licensees" and
"recipients" may be individuals or organizations.
To *modify* a work means to copy from or adapt all or part of the work
in a fashion requiring copyright permission, other than the making of an
exact copy. The resulting work is called a "modified version" of the
earlier work or a work "based on" the earlier work.
A *covered work* means either the unmodified Program or a work based
on the Program.
To *propagate* a work means to do anything with it that, without
permission, would make you directly or secondarily liable for
infringement under applicable copyright law, except executing it on a
computer or modifying a private copy. Propagation includes copying,
distribution (with or without modification), making available to the
public, and in some countries other activities as well.
To *convey* a work means any kind of propagation that enables other
parties to make or receive copies. Mere interaction with a user through
a computer network, with no transfer of a copy, is not conveying.
An interactive user interface displays *Appropriate Legal Notices*
to the extent that it includes a convenient and prominently visible
feature that (1) displays an appropriate copyright notice, and (2)
tells the user that there is no warranty for the work (except to the
extent that warranties are provided), that licensees may convey the
work under this License, and how to view a copy of this License. If
the interface presents a list of user commands or options, such as a
menu, a prominent item in the list meets this criterion.
### 1. Source Code.
The *source code* for a work means the preferred form of the work
for making modifications to it. "Object code" means any non-source
form of a work.
A *Standard Interface* means an interface that either is an official
standard defined by a recognized standards body, or, in the case of
interfaces specified for a particular programming language, one that
is widely used among developers working in that language.
The *System Libraries* of an executable work include anything, other
than the work as a whole, that (a) is included in the normal form of
packaging a Major Component, but which is not part of that Major
Component, and (b) serves only to enable use of the work with that
Major Component, or to implement a Standard Interface for which an
implementation is available to the public in source code form. A
"Major Component", in this context, means a major essential component
(kernel, window system, and so on) of the specific operating system
(if any) on which the executable work runs, or a compiler used to
produce the work, or an object code interpreter used to run it.
The *Corresponding Source* for a work in object code form means all
the source code needed to generate, install, and (for an executable
work) run the object code and to modify the work, including scripts to
control those activities. However, it does not include the work's
System Libraries, or general-purpose tools or generally available free
programs which are used unmodified in performing those activities but
which are not part of the work. For example, Corresponding Source
includes interface definition files associated with source files for
the work, and the source code for shared libraries and dynamically
linked subprograms that the work is specifically designed to require,
such as by intimate data communication or control flow between those
subprograms and other parts of the work.
The Corresponding Source need not include anything that users
can regenerate automatically from other parts of the Corresponding
Source.
The Corresponding Source for a work in source code form is that
same work.
### 2. Basic Permissions.
All rights granted under this License are granted for the term of
copyright on the Program, and are irrevocable provided the stated
conditions are met. This License explicitly affirms your unlimited
permission to run the unmodified Program. The output from running a
covered work is covered by this License only if the output, given its
content, constitutes a covered work. This License acknowledges your
rights of fair use or other equivalent, as provided by copyright law.
You may make, run and propagate covered works that you do not
convey, without conditions so long as your license otherwise remains
in force. You may convey covered works to others for the sole purpose
of having them make modifications exclusively for you, or provide you
with facilities for running those works, provided that you comply with
the terms of this License in conveying all material for which you do
not control copyright. Those thus making or running the covered works
for you must do so exclusively on your behalf, under your direction
and control, on terms that prohibit them from making any copies of
your copyrighted material outside their relationship with you.
Conveying under any other circumstances is permitted solely under
the conditions stated below. Sublicensing is not allowed; section 10
makes it unnecessary.
### 3. Protecting Users' Legal Rights From Anti-Circumvention Law.
No covered work shall be deemed part of an effective technological
measure under any applicable law fulfilling obligations under article
11 of the WIPO copyright treaty adopted on 20 December 1996, or
similar laws prohibiting or restricting circumvention of such
measures.
When you convey a covered work, you waive any legal power to forbid
circumvention of technological measures to the extent such circumvention
is effected by exercising rights under this License with respect to
the covered work, and you disclaim any intention to limit operation or
modification of the work as a means of enforcing, against the work's
users, your or third parties' legal rights to forbid circumvention of
technological measures.
### 4. Conveying Verbatim Copies.
You may convey verbatim copies of the Program's source code as you
receive it, in any medium, provided that you conspicuously and
appropriately publish on each copy an appropriate copyright notice;
keep intact all notices stating that this License and any
non-permissive terms added in accord with section 7 apply to the code;
keep intact all notices of the absence of any warranty; and give all
recipients a copy of this License along with the Program.
You may charge any price or no price for each copy that you convey,
and you may offer support or warranty protection for a fee.
### 5. Conveying Modified Source Versions.
You may convey a work based on the Program, or the modifications to
produce it from the Program, in the form of source code under the
terms of section 4, provided that you also meet all of these conditions:
a) The work must carry prominent notices stating that you modified
it, and giving a relevant date.
b) The work must carry prominent notices stating that it is
released under this License and any conditions added under section
7. This requirement modifies the requirement in section 4 to
"keep intact all notices".
c) You must license the entire work, as a whole, under this
License to anyone who comes into possession of a copy. This
License will therefore apply, along with any applicable section 7
additional terms, to the whole of the work, and all its parts,
regardless of how they are packaged. This License gives no
permission to license the work in any other way, but it does not
invalidate such permission if you have separately received it.
d) If the work has interactive user interfaces, each must display
Appropriate Legal Notices; however, if the Program has interactive
interfaces that do not display Appropriate Legal Notices, your
work need not make them do so.
A compilation of a covered work with other separate and independent
works, which are not by their nature extensions of the covered work,
and which are not combined with it such as to form a larger program,
in or on a volume of a storage or distribution medium, is called an
"aggregate" if the compilation and its resulting copyright are not
used to limit the access or legal rights of the compilation's users
beyond what the individual works permit. Inclusion of a covered work
in an aggregate does not cause this License to apply to the other
parts of the aggregate.
### 6. Conveying Non-Source Forms.
You may convey a covered work in object code form under the terms
of sections 4 and 5, provided that you also convey the
machine-readable Corresponding Source under the terms of this License,
in one of these ways:
a) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by the
Corresponding Source fixed on a durable physical medium
customarily used for software interchange.
b) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by a
written offer, valid for at least three years and valid for as
long as you offer spare parts or customer support for that product
model, to give anyone who possesses the object code either (1) a
copy of the Corresponding Source for all the software in the
product that is covered by this License, on a durable physical
medium customarily used for software interchange, for a price no
more than your reasonable cost of physically performing this
conveying of source, or (2) access to copy the
Corresponding Source from a network server at no charge.
c) Convey individual copies of the object code with a copy of the
written offer to provide the Corresponding Source. This
alternative is allowed only occasionally and noncommercially, and
only if you received the object code with such an offer, in accord
with subsection 6b.
d) Convey the object code by offering access from a designated
place (gratis or for a charge), and offer equivalent access to the
Corresponding Source in the same way through the same place at no
further charge. You need not require recipients to copy the
Corresponding Source along with the object code. If the place to
copy the object code is a network server, the Corresponding Source
may be on a different server (operated by you or a third party)
that supports equivalent copying facilities, provided you maintain
clear directions next to the object code saying where to find the
Corresponding Source. Regardless of what server hosts the
Corresponding Source, you remain obligated to ensure that it is
available for as long as needed to satisfy these requirements.
e) Convey the object code using peer-to-peer transmission, provided
you inform other peers where the object code and Corresponding
Source of the work are being offered to the general public at no
charge under subsection 6d.
A separable portion of the object code, whose source code is excluded
from the Corresponding Source as a System Library, need not be
included in conveying the object code work.
A "User Product" is either (1) a "consumer product", which means any
tangible personal property which is normally used for personal, family,
or household purposes, or (2) anything designed or sold for incorporation
into a dwelling. In determining whether a product is a consumer product,
doubtful cases shall be resolved in favor of coverage. For a particular
product received by a particular user, "normally used" refers to a
typical or common use of that class of product, regardless of the status
of the particular user or of the way in which the particular user
actually uses, or expects or is expected to use, the product. A product
is a consumer product regardless of whether the product has substantial
commercial, industrial or non-consumer uses, unless such uses represent
the only significant mode of use of the product.
"Installation Information" for a User Product means any methods,
procedures, authorization keys, or other information required to install
and execute modified versions of a covered work in that User Product from
a modified version of its Corresponding Source. The information must
suffice to ensure that the continued functioning of the modified object
code is in no case prevented or interfered with solely because
modification has been made.
If you convey an object code work under this section in, or with, or
specifically for use in, a User Product, and the conveying occurs as
part of a transaction in which the right of possession and use of the
User Product is transferred to the recipient in perpetuity or for a
fixed term (regardless of how the transaction is characterized), the
Corresponding Source conveyed under this section must be accompanied
by the Installation Information. But this requirement does not apply
if neither you nor any third party retains the ability to install
modified object code on the User Product (for example, the work has
been installed in ROM).
The requirement to provide Installation Information does not include a
requirement to continue to provide support service, warranty, or updates
for a work that has been modified or installed by the recipient, or for
the User Product in which it has been modified or installed. Access to a
network may be denied when the modification itself materially and
adversely affects the operation of the network or violates the rules and
protocols for communication across the network.
Corresponding Source conveyed, and Installation Information provided,
in accord with this section must be in a format that is publicly
documented (and with an implementation available to the public in
source code form), and must require no special password or key for
unpacking, reading or copying.
### 7. Additional Terms.
"Additional permissions" are terms that supplement the terms of this
License by making exceptions from one or more of its conditions.
Additional permissions that are applicable to the entire Program shall
be treated as though they were included in this License, to the extent
that they are valid under applicable law. If additional permissions
apply only to part of the Program, that part may be used separately
under those permissions, but the entire Program remains governed by
this License without regard to the additional permissions.
When you convey a copy of a covered work, you may at your option
remove any additional permissions from that copy, or from any part of
it. (Additional permissions may be written to require their own
removal in certain cases when you modify the work.) You may place
additional permissions on material, added by you to a covered work,
for which you have or can give appropriate copyright permission.
Notwithstanding any other provision of this License, for material you
add to a covered work, you may (if authorized by the copyright holders of
that material) supplement the terms of this License with terms:
a) Disclaiming warranty or limiting liability differently from the
terms of sections 15 and 16 of this License; or
b) Requiring preservation of specified reasonable legal notices or
author attributions in that material or in the Appropriate Legal
Notices displayed by works containing it; or
c) Prohibiting misrepresentation of the origin of that material, or
requiring that modified versions of such material be marked in
reasonable ways as different from the original version; or
d) Limiting the use for publicity purposes of names of licensors or
authors of the material; or
e) Declining to grant rights under trademark law for use of some
trade names, trademarks, or service marks; or
f) Requiring indemnification of licensors and authors of that
material by anyone who conveys the material (or modified versions of
it) with contractual assumptions of liability to the recipient, for
any liability that these contractual assumptions directly impose on
those licensors and authors.
All other non-permissive additional terms are considered "further
restrictions" within the meaning of section 10. If the Program as you
received it, or any part of it, contains a notice stating that it is
governed by this License along with a term that is a further
restriction, you may remove that term. If a license document contains
a further restriction but permits relicensing or conveying under this
License, you may add to a covered work material governed by the terms
of that license document, provided that the further restriction does
not survive such relicensing or conveying.
If you add terms to a covered work in accord with this section, you
must place, in the relevant source files, a statement of the
additional terms that apply to those files, or a notice indicating
where to find the applicable terms.
Additional terms, permissive or non-permissive, may be stated in the
form of a separately written license, or stated as exceptions;
the above requirements apply either way.
### 8. Termination.
You may not propagate or modify a covered work except as expressly
provided under this License. Any attempt otherwise to propagate or
modify it is void, and will automatically terminate your rights under
this License (including any patent licenses granted under the third
paragraph of section 11).
However, if you cease all violation of this License, then your
license from a particular copyright holder is reinstated (a)
provisionally, unless and until the copyright holder explicitly and
finally terminates your license, and (b) permanently, if the copyright
holder fails to notify you of the violation by some reasonable means
prior to 60 days after the cessation.
Moreover, your license from a particular copyright holder is
reinstated permanently if the copyright holder notifies you of the
violation by some reasonable means, this is the first time you have
received notice of violation of this License (for any work) from that
copyright holder, and you cure the violation prior to 30 days after
your receipt of the notice.
Termination of your rights under this section does not terminate the
licenses of parties who have received copies or rights from you under
this License. If your rights have been terminated and not permanently
reinstated, you do not qualify to receive new licenses for the same
material under section 10.
### 9. Acceptance Not Required for Having Copies.
You are not required to accept this License in order to receive or
run a copy of the Program. Ancillary propagation of a covered work
occurring solely as a consequence of using peer-to-peer transmission
to receive a copy likewise does not require acceptance. However,
nothing other than this License grants you permission to propagate or
modify any covered work. These actions infringe copyright if you do
not accept this License. Therefore, by modifying or propagating a
covered work, you indicate your acceptance of this License to do so.
### 10. Automatic Licensing of Downstream Recipients.
Each time you convey a covered work, the recipient automatically
receives a license from the original licensors, to run, modify and
propagate that work, subject to this License. You are not responsible
for enforcing compliance by third parties with this License.
An *entity transaction* is a transaction transferring control of an
organization, or substantially all assets of one, or subdividing an
organization, or merging organizations. If propagation of a covered
work results from an entity transaction, each party to that
transaction who receives a copy of the work also receives whatever
licenses to the work the party's predecessor in interest had or could
give under the previous paragraph, plus a right to possession of the
Corresponding Source of the work from the predecessor in interest, if
the predecessor has it or can get it with reasonable efforts.
You may not impose any further restrictions on the exercise of the
rights granted or affirmed under this License. For example, you may
not impose a license fee, royalty, or other charge for exercise of
rights granted under this License, and you may not initiate litigation
(including a cross-claim or counterclaim in a lawsuit) alleging that
any patent claim is infringed by making, using, selling, offering for
sale, or importing the Program or any portion of it.
### 11. Patents.
A *contributor* is a copyright holder who authorizes use under this
License of the Program or a work on which the Program is based. The
work thus licensed is called the contributor's "contributor version".
A contributor's "essential patent claims" are all patent claims
owned or controlled by the contributor, whether already acquired or
hereafter acquired, that would be infringed by some manner, permitted
by this License, of making, using, or selling its contributor version,
but do not include claims that would be infringed only as a
consequence of further modification of the contributor version. For
purposes of this definition, "control" includes the right to grant
patent sublicenses in a manner consistent with the requirements of
this License.
Each contributor grants you a non-exclusive, worldwide, royalty-free
patent license under the contributor's essential patent claims, to
make, use, sell, offer for sale, import and otherwise run, modify and
propagate the contents of its contributor version.
In the following three paragraphs, a "patent license" is any express
agreement or commitment, however denominated, not to enforce a patent
(such as an express permission to practice a patent or covenant not to
sue for patent infringement). To "grant" such a patent license to a
party means to make such an agreement or commitment not to enforce a
patent against the party.
If you convey a covered work, knowingly relying on a patent license,
and the Corresponding Source of the work is not available for anyone
to copy, free of charge and under the terms of this License, through a
publicly available network server or other readily accessible means,
then you must either (1) cause the Corresponding Source to be so
available, or (2) arrange to deprive yourself of the benefit of the
patent license for this particular work, or (3) arrange, in a manner
consistent with the requirements of this License, to extend the patent
license to downstream recipients. "Knowingly relying" means you have
actual knowledge that, but for the patent license, your conveying the
covered work in a country, or your recipient's use of the covered work
in a country, would infringe one or more identifiable patents in that
country that you have reason to believe are valid.
If, pursuant to or in connection with a single transaction or
arrangement, you convey, or propagate by procuring conveyance of, a
covered work, and grant a patent license to some of the parties
receiving the covered work authorizing them to use, propagate, modify
or convey a specific copy of the covered work, then the patent license
you grant is automatically extended to all recipients of the covered
work and works based on it.
A patent license is "discriminatory" if it does not include within
the scope of its coverage, prohibits the exercise of, or is
conditioned on the non-exercise of one or more of the rights that are
specifically granted under this License. You may not convey a covered
work if you are a party to an arrangement with a third party that is
in the business of distributing software, under which you make payment
to the third party based on the extent of your activity of conveying
the work, and under which the third party grants, to any of the
parties who would receive the covered work from you, a discriminatory
patent license (a) in connection with copies of the covered work
conveyed by you (or copies made from those copies), or (b) primarily
for and in connection with specific products or compilations that
contain the covered work, unless you entered into that arrangement,
or that patent license was granted, prior to 28 March 2007.
Nothing in this License shall be construed as excluding or limiting
any implied license or other defenses to infringement that may
otherwise be available to you under applicable patent law.
### 12. No Surrender of Others' Freedom.
If conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot convey a
covered work so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you may
not convey it at all. For example, if you agree to terms that obligate you
to collect a royalty for further conveying from those to whom you convey
the Program, the only way you could satisfy both those terms and this
License would be to refrain entirely from conveying the Program.
### 13. Use with the GNU Affero General Public License.
Notwithstanding any other provision of this License, you have
permission to link or combine any covered work with a work licensed
under version 3 of the GNU Affero General Public License into a single
combined work, and to convey the resulting work. The terms of this
License will continue to apply to the part which is the covered work,
but the special requirements of the GNU Affero General Public License,
section 13, concerning interaction through a network will apply to the
combination as such.
### 14. Revised Versions of this License.
The Free Software Foundation may publish revised and/or new versions of
the GNU General Public License from time to time. Such new versions will
be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.
Each version is given a distinguishing version number. If the
Program specifies that a certain numbered version of the GNU General
Public License "or any later version" applies to it, you have the
option of following the terms and conditions either of that numbered
version or of any later version published by the Free Software
Foundation. If the Program does not specify a version number of the
GNU General Public License, you may choose any version ever published
by the Free Software Foundation.
If the Program specifies that a proxy can decide which future
versions of the GNU General Public License can be used, that proxy's
public statement of acceptance of a version permanently authorizes you
to choose that version for the Program.
Later license versions may give you additional or different
permissions. However, no additional obligations are imposed on any
author or copyright holder as a result of your choosing to follow a
later version.
### 15. Disclaimer of Warranty.
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
### 16. Limitation of Liability.
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
SUCH DAMAGES.
### 17. Interpretation of Sections 15 and 16.
If the disclaimer of warranty and limitation of liability provided
above cannot be given local legal effect according to their terms,
reviewing courts shall apply local law that most closely approximates
an absolute waiver of all civil liability in connection with the
Program, unless a warranty or assumption of liability accompanies a
copy of the Program in return for a fee.
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.
To do so, attach the following notices to the program. It is safest
to attach them to the start of each source file to most effectively
state the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.
One line to give the program's name and a brief idea of what it does.
Copyright (C) <year> <name of author>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see http://www.gnu.org/licenses/.
Also add information on how to contact you by electronic and paper mail.
If the program does terminal interaction, make it output a short
notice like this when it starts in an interactive mode:
<program> Copyright (C) <year> <name of author>
This program comes with ABSOLUTELY NO WARRANTY; for details type 'show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.
The hypothetical commands 'show w' and 'show c' should show the appropriate
parts of the General Public License. Of course, your program's commands
might be different; for a GUI interface, you would use an "about box".
You should also get your employer (if you work as a programmer) or school,
if any, to sign a "copyright disclaimer" for the program, if necessary.
For more information on this, and how to apply and follow the GNU GPL, see
http://www.gnu.org/licenses/.
The GNU General Public License does not permit incorporating your program
into proprietary programs. If your program is a subroutine library, you
may consider it more useful to permit linking proprietary applications with
the library. If this is what you want to do, use the GNU Lesser General
Public License instead of this License. But first, please read
http://www.gnu.org/philosophy/why-not-lgpl.html.
| ztfy.media | /ztfy.media-0.1.12.tar.gz/ztfy.media-0.1.12/src/ztfy/media/browser/resources/flowplayer/LICENSE.md | LICENSE.md |
!function n(e,t,r){function o(u,c){if(!t[u]){if(!e[u]){var f="function"==typeof require&&require;if(!c&&f)return f(u,!0);if(i)return i(u,!0);var s=new Error("Cannot find module '"+u+"'");throw s.code="MODULE_NOT_FOUND",s}var a=t[u]={exports:{}};e[u][0].call(a.exports,function(n){var t=e[u][1][n];return o(t?t:n)},a,a.exports,n,e,t,r)}return t[u].exports}for(var i="function"==typeof require&&require,u=0;u<r.length;u++)o(r[u]);return o}({1:[function(n,e,t){function r(n,e){"use strict";var t=n.common.createElement("div");t.setAttribute("data-origin",e.e.href),e.e.parentNode.replaceChild(t,e.e),e.c.e=1,e.c.swf=e.c.swf||p,e.c.swfHls=e.c.swfHls||m,n(t,e.c)}function o(n){"use strict";return"function"==typeof window.requirejs?n():void a("https://cdnjs.cloudflare.com/ajax/libs/require.js/2.1.16/require.min.js",n)}function i(n,e){"use strict";o(function(){requirejs([n],e)})}function u(n){"use strict";var e=n.common.createElement("div",{className:"flowplayer"});return e.style.display="none",document.body.appendChild(e),e}function c(n){"use strict";var e=u(n),t=0===window.getComputedStyle(e).getPropertyValue("counter-increment").indexOf("flowplayer");return n.common.removeNode(e),t}function f(n,e){"use strict";return c(n)?e(n):(document.head.appendChild(n.common.createElement("link",{rel:"stylesheet",href:h})),void e(n))}var s=window._fpes,a=n("scriptjs"),l="//releases.flowplayer.org/6.0.4/commercial",d=l+"/flowplayer.min.js",p=l+"/flowplayer.swf",m=l+"/flowplayerhls.swf",h=l+"/skin/functional.css";s.forEach(function(n){"use strict";i(n.l||d,function(e){f(e,function(e){r(e,n)})})})},{scriptjs:2}],2:[function(n,e,t){!function(n,t){"undefined"!=typeof e&&e.exports?e.exports=t():"function"==typeof define&&define.amd?define(t):this[n]=t()}("$script",function(){function n(n,e){for(var t=0,r=n.length;r>t;++t)if(!e(n[t]))return f;return 1}function e(e,t){n(e,function(n){return!t(n)})}function t(i,u,c){function f(n){return n.call?n():d[n]}function a(){if(!--w){d[y]=1,v&&v();for(var t in m)n(t.split("|"),f)&&!e(m[t],f)&&(m[t]=[])}}i=i[s]?i:[i];var l=u&&u.call,v=l?u:c,y=l?i.join(""):u,w=i.length;return setTimeout(function(){e(i,function n(e,t){return null===e?a():(e=t||-1!==e.indexOf(".js")||/^https?:\/\//.test(e)||!o?e:o+e+".js",h[e]?(y&&(p[y]=1),2==h[e]?a():setTimeout(function(){n(e,!0)},0)):(h[e]=1,y&&(p[y]=1),void r(e,a)))})},0),t}function r(n,e){var t,r=u.createElement("script");r.onload=r.onerror=r[l]=function(){r[a]&&!/^c|loade/.test(r[a])||t||(r.onload=r[l]=null,t=1,h[n]=2,e())},r.async=1,r.src=i?n+(-1===n.indexOf("?")?"?":"&")+i:n,c.insertBefore(r,c.lastChild)}var o,i,u=document,c=u.getElementsByTagName("head")[0],f=!1,s="push",a="readyState",l="onreadystatechange",d={},p={},m={},h={};return t.get=r,t.order=function(n,e,r){!function o(i){i=n.shift(),n.length?t(i,o):t(i,e,r)}()},t.path=function(n){o=n},t.urlArgs=function(n){i=n},t.ready=function(r,o,i){r=r[s]?r:[r];var u=[];return!e(r,function(n){d[n]||u[s](n)})&&n(r,function(n){return d[n]})?o():!function(n){m[n]=m[n]||[],m[n][s](o),i&&i(u)}(r.join("|")),t},t.done=function(n){t([null],n)},t})},{}]},{},[1]); | ztfy.media | /ztfy.media-0.1.12.tar.gz/ztfy.media-0.1.12/src/ztfy/media/browser/resources/flowplayer/embed.min.js | embed.min.js |
(function(X){function V(g,m,d,b){for(var f,p=d.slice(),c=B(m,g),l=0,h=p.length;l<h;l++){handler=p[l],typeof handler=="object"&&typeof handler.handleEvent=="function"?handler.handleEvent(c):handler.call(g,c);if(c.stoppedImmediatePropagation){break}}return f=!c.stoppedPropagation,b&&f&&g.parentNode?g.parentNode.dispatchEvent(c):!c.defaultPrevented}function z(b,a){return{configurable:!0,get:b,set:a}}function aa(c,a,d){var b=W(a||c,d);F(c,"textContent",z(function(){return b.get.call(this)},function(f){b.set.call(this,f)}))}function B(b,a){return b.currentTarget=a,b.eventPhase=b.target===b.currentTarget?2:3,b}function G(b,a){var c=b.length;while(c--&&b[c]!==a){}return c}function k(){if(this.tagName==="BR"){return"\n"}var b=this.firstChild,a=[];while(b){b.nodeType!==8&&b.nodeType!==7&&a.push(b.textContent),b=b.nextSibling}return a.join("")}function A(a){return a.nodeType!==9&&document.documentElement.contains(a)}function j(a){!O&&Y.test(document.readyState)&&(O=!O,document.detachEvent(K,j),a=document.createEvent("Event"),a.initEvent(R,!0,!0),document.dispatchEvent(a))}function q(b){var a;while(a=this.lastChild){this.removeChild(a)}b!=null&&this.appendChild(document.createTextNode(b))}function J(a,b){return b||(b=X.event),b.target||(b.target=b.srcElement||b.fromElement||document),b.timeStamp||(b.timeStamp=(new Date).getTime()),b}if(document.createEvent){return}var H=!0,O=!1,K="onreadystatechange",R="DOMContentLoaded",I="__IE8__"+Math.random(),M=X.Object,F=M.defineProperty||function(b,a,c){b[a]=c.value},ab=M.defineProperties||function(b,d){for(var c in d){if(Q.call(d,c)){try{F(b,c,d[c])}catch(a){X.console&&console.log(c+" failed on object:",b,a.message)}}}},W=M.getOwnPropertyDescriptor,Q=M.prototype.hasOwnProperty,Z=X.Element.prototype,U=X.Text.prototype,L=/^[a-z]+$/,Y=/loaded|complete/,D={},P=document.createElement("div");aa(X.HTMLCommentElement.prototype,Z,"nodeValue"),aa(X.HTMLScriptElement.prototype,null,"text"),aa(U,null,"nodeValue"),aa(X.HTMLTitleElement.prototype,null,"text"),F(X.HTMLStyleElement.prototype,"textContent",function(a){return z(function(){return a.get.call(this.styleSheet)},function(b){a.set.call(this.styleSheet,b)})}(W(X.CSSStyleSheet.prototype,"cssText"))),ab(Z,{textContent:{get:k,set:q},firstElementChild:{get:function(){for(var b=this.childNodes||[],a=0,c=b.length;a<c;a++){if(b[a].nodeType==1){return b[a]}}}},lastElementChild:{get:function(){for(var b=this.childNodes||[],a=b.length;a--;){if(b[a].nodeType==1){return b[a]}}}},previousElementSibling:{get:function(){var a=this.previousSibling;while(a&&a.nodeType!=1){a=a.previousSibling}return a}},nextElementSibling:{get:function(){var a=this.nextSibling;while(a&&a.nodeType!=1){a=a.nextSibling}return a}},childElementCount:{get:function(){for(var b=0,a=this.childNodes||[],c=a.length;c--;b+=a[c].nodeType==1){}return b}},addEventListener:{value:function(m,u,g){var b=this,h="on"+m,d=b[I]||F(b,I,{value:{}})[I],s=d[h]||(d[h]={}),l=s.h||(s.h=[]),p;if(!Q.call(s,"w")){s.w=function(a){return a[I]||V(b,J(b,a),l,!1)};if(!Q.call(D,h)){if(L.test(m)){try{p=document.createEventObject(),p[I]=!0,b.nodeType!=9&&b.parentNode==null&&P.appendChild(b),b.fireEvent(h,p),D[h]=!0}catch(p){D[h]=!1;while(P.hasChildNodes()){P.removeChild(P.firstChild)}}}else{D[h]=!1}}(s.n=D[h])&&b.attachEvent(h,s.w)}G(l,u)<0&&l[g?"unshift":"push"](u)}},dispatchEvent:{value:function(f){var c=this,h="on"+f.type,d=c[I],b=d&&d[h],g=!!b,a;return f.target||(f.target=c),g?b.n?c.fireEvent(h,f):V(c,f,b.h,!0):(a=c.parentNode)?a.dispatchEvent(f):!0,!f.defaultPrevented}},removeEventListener:{value:function(l,s,d){var b=this,g="on"+l,c=b[I],p=c&&c[g],m=p&&p.h,h=m?G(m,s):-1;-1<h&&m.splice(h,1)}}}),ab(U,{addEventListener:{value:Z.addEventListener},dispatchEvent:{value:Z.dispatchEvent},removeEventListener:{value:Z.removeEventListener}}),ab(X.XMLHttpRequest.prototype,{addEventListener:{value:function(l,d,p){var g=this,c="on"+l,m=g[I]||F(g,I,{value:{}})[I],b=m[c]||(m[c]={}),h=b.h||(b.h=[]);G(h,d)<0&&(g[c]||(g[c]=function(){var a=document.createEvent("Event");a.initEvent(l,!0,!0),g.dispatchEvent(a)}),h[p?"unshift":"push"](d))}},dispatchEvent:{value:function(d){var b=this,g="on"+d.type,c=b[I],a=c&&c[g],f=!!a;return f&&(a.n?b.fireEvent(g,d):V(b,d,a.h,!0))}},removeEventListener:{value:Z.removeEventListener}}),ab(X.Event.prototype,{bubbles:{value:!0,writable:!0},cancelable:{value:!0,writable:!0},preventDefault:{value:function(){this.cancelable&&(this.defaultPrevented=!0,this.returnValue=!1)}},stopPropagation:{value:function(){this.stoppedPropagation=!0,this.cancelBubble=!0}},stopImmediatePropagation:{value:function(){this.stoppedImmediatePropagation=!0,this.stopPropagation()}},initEvent:{value:function(b,a,c){this.type=b,this.bubbles=!!a,this.cancelable=!!c,this.bubbles||this.stopPropagation()}}}),ab(X.HTMLDocument.prototype,{textContent:{get:function(){return this.nodeType===11?k.call(this):null},set:function(a){this.nodeType===11&&q.call(this,a)}},addEventListener:{value:function(f,d,e){var c=this;Z.addEventListener.call(c,f,d,e),H&&f===R&&!Y.test(c.readyState)&&(H=!1,c.attachEvent(K,j),X==top&&function b(g){try{c.documentElement.doScroll("left"),j()}catch(a){setTimeout(b,50)}}())}},dispatchEvent:{value:Z.dispatchEvent},removeEventListener:{value:Z.removeEventListener},createEvent:{value:function(b){var a;if(b!=="Event"){throw new Error("unsupported "+b)}return a=document.createEventObject(),a.timeStamp=(new Date).getTime(),a}}}),ab(X.Window.prototype,{getComputedStyle:{value:function(){function b(h){this._=h}function c(){}var f=/^(?:[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|))(?!px)[a-z%]+$/,a=/^(top|right|bottom|left)$/,g=/\-([a-z])/g,d=function(i,h){return h.toUpperCase()};return b.prototype.getPropertyValue=function(n){var p=this._,t=p.style,m=p.currentStyle,h=p.runtimeStyle,r,e,v;return n=(n==="float"?"style-float":n).replace(g,d),r=m?m[n]:t[n],f.test(r)&&!a.test(n)&&(e=t.left,v=h&&h.left,v&&(h.left=m.left),t.left=n==="fontSize"?"1em":r,r=t.pixelLeft+"px",t.left=e,v&&(h.left=v)),r==null?r:r+""||"auto"},c.prototype.getPropertyValue=function(){return null},function(i,h){return h?new c(i):new b(i)}}()},addEventListener:{value:function(c,f,d){var b=X,e="on"+c,a;b[e]||(b[e]=function(g){return V(b,J(b,g),a,!1)}),a=b[e][I]||(b[e][I]=[]),G(a,f)<0&&a[d?"unshift":"push"](f)}},dispatchEvent:{value:function(a){var b=X["on"+a.type];return b?b.call(X,a)!==!1&&!a.defaultPrevented:!0}},removeEventListener:{value:function(e,g,f){var d="on"+e,c=(X[d]||M)[I],b=c?G(c,g):-1;-1<b&&c.splice(b,1)}}})})(this);!function(b){if("object"==typeof exports&&"undefined"!=typeof module){module.exports=b()}else{if("function"==typeof define&&define.amd){define([],b)}else{var a;"undefined"!=typeof window?a=window:"undefined"!=typeof global?a=global:"undefined"!=typeof self&&(a=self),a.flowplayer=b()}}}(function(){var d,b,a;return(function c(f,k,h){function g(q,n){if(!k[q]){if(!f[q]){var m=typeof require=="function"&&require;if(!n&&m){return m(q,!0)}if(e){return e(q,!0)}var p=new Error("Cannot find module '"+q+"'");throw p.code="MODULE_NOT_FOUND",p}var i=k[q]={exports:{}};f[q][0].call(i.exports,function(l){var o=f[q][1][l];return g(o?o:l)},i,i.exports,c,f,k,h)}return k[q].exports}var e=typeof require=="function"&&require;for(var j=0;j<h.length;j++){g(h[j])}return g})({1:[function(i,g,f){var h=g.exports={},k=i("class-list"),j=window.jQuery,l=i("punycode"),e=i("computed-style");h.noop=function(){};h.identity=function(m){return m};h.removeNode=function(m){if(!m||!m.parentNode){return}m.parentNode.removeChild(m)};h.find=function(n,m){if(j){return j(n,m).toArray()}m=m||document;return Array.prototype.map.call(m.querySelectorAll(n),function(o){return o})};h.text=function(n,m){n[("innerText" in n)?"innerText":"textContent"]=m};h.findDirect=function(n,m){return h.find(n,m).filter(function(o){return o.parentNode===m})};h.hasClass=function(n,m){return k(n).contains(m)};h.isSameDomain=function(o){var n=window.location,m=h.createElement("a",{href:o});return n.hostname===m.hostname&&n.protocol===m.protocol&&n.port===m.port};h.css=function(m,o,n){if(typeof o==="object"){return Object.keys(o).forEach(function(p){h.css(m,p,o[p])})}if(typeof n!=="undefined"){if(n===""){return m?m.style.removeProperty(o):undefined}return m?m.style.setProperty(o,n):undefined}return m?e(m,o):undefined};h.createElement=function(m,n,r){try{var p=document.createElement(m);for(var o in n){if(!n.hasOwnProperty(o)){continue}if(o==="css"){h.css(p,n[o])}else{h.attr(p,o,n[o])}}p.innerHTML=r||"";return p}catch(q){if(!j){throw q}return j("<"+m+">"+r+"</"+m+">").attr(n)[0]}};h.toggleClass=function(p,n,m){if(!p){return}var o=k(p);if(typeof m==="undefined"){o.toggle(n)}else{if(m){o.add(n)}else{if(!m){o.remove(n)}}}};h.addClass=function(n,m){return h.toggleClass(n,m,true)};h.removeClass=function(n,m){return h.toggleClass(n,m,false)};h.append=function(m,n){m.appendChild(n);return m};h.appendTo=function(n,m){h.append(m,n);return n};h.prepend=function(m,n){m.insertBefore(n,m.firstChild)};h.insertAfter=function(n,p,m){if(p==h.lastChild(n)){n.appendChild(m)}var o=Array.prototype.indexOf.call(n.children,p);n.insertBefore(m,n.children[o+1])};h.html=function(m,n){m=m.length?m:[m];m.forEach(function(o){o.innerHTML=n})};h.attr=function(n,m,p){if(m==="class"){m="className"}if(h.hasOwnOrPrototypeProperty(n,m)){try{n[m]=p}catch(o){if(j){j(n).attr(m,p)}else{throw o}}}else{if(p===false){n.removeAttribute(m)}else{n.setAttribute(m,p)}}return n};h.prop=function(n,m,o){if(typeof o==="undefined"){return n&&n[m]}n[m]=o};h.offset=function(n){var m=n.getBoundingClientRect();if(n.offsetWidth/n.offsetHeight>n.clientWidth/n.clientHeight){m={left:m.left*100,right:m.right*100,top:m.top*100,bottom:m.bottom*100,width:m.width*100,height:m.height*100}}return m};h.width=function(n,o){if(o){return n.style.width=(""+o).replace(/px$/,"")+"px"}var m=h.offset(n).width;return typeof m==="undefined"?n.offsetWidth:m};h.height=function(n,o){if(o){return n.style.height=(""+o).replace(/px$/,"")+"px"}var m=h.offset(n).height;return typeof m==="undefined"?n.offsetHeight:m};h.lastChild=function(m){return m.children[m.children.length-1]};h.hasParent=function(n,o){var m=n.parentElement;while(m){if(h.matches(m,o)){return true}m=m.parentElement}return false};h.createAbsoluteUrl=function(m){return h.createElement("a",{href:m}).href};h.xhrGet=function(m,o,n){var p=new XMLHttpRequest();p.onreadystatechange=function(){if(this.readyState!==4){return}if(this.status>=400){return n()}o(this.responseText)};p.open("get",m,true);p.send()};h.pick=function(o,n){var m={};n.forEach(function(p){if(o.hasOwnProperty(p)){m[p]=o[p]}});return m};h.hostname=function(m){return l.toUnicode(m||window.location.hostname)};h.browser={webkit:"WebkitAppearance" in document.documentElement.style};h.getPrototype=function(m){if(!Object.getPrototypeOf){return m.__proto__}return Object.getPrototypeOf(m)};h.hasOwnOrPrototypeProperty=function(m,p){var n=m;while(n){if(Object.prototype.hasOwnProperty.call(n,p)){return true}n=h.getPrototype(n)}return false};h.matches=function(p,m){var o=Element.prototype,n=o.matches||o.matchesSelector||o.mozMatchesSelector||o.msMatchesSelector||o.oMatchesSelector||o.webkitMatchesSelector||function(q){var s=this,t=(s.document||s.ownerDocument).querySelectorAll(q),r=0;while(t[r]&&t[r]!==s){r++}return t[r]?true:false};return n.call(p,m)};(function(n){function m(o){return o.replace(/-[a-z]/g,function(p){return p[1].toUpperCase()})}if(typeof n.setAttribute!=="undefined"){n.setProperty=function(p,o){return this.setAttribute(m(p),String(o))};n.getPropertyValue=function(o){return this.getAttribute(m(o))||null};n.removeProperty=function(p){var o=this.getPropertyValue(p);this.removeAttribute(m(p));return o}}})(window.CSSStyleDeclaration.prototype)},{"class-list":22,"computed-style":24,punycode:21}],2:[function(h,f,e){var g=h("../common");f.exports=function i(n,o,m,q){m=m||"opaque";var k="obj"+(""+Math.random()).slice(2,15),r='<object class="fp-engine" id="'+k+'" name="'+k+'" ',p=navigator.userAgent.indexOf("MSIE")>-1;r+=p?'classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000">':' data="'+n+'" type="application/x-shockwave-flash">';var j={width:"100%",height:"100%",allowscriptaccess:"always",wmode:m,quality:"high",flashvars:"",movie:n+(p?"?"+k:""),name:k};if(m!=="transparent"){j.bgcolor=q||"#333333"}Object.keys(o).forEach(function(s){j.flashvars+=s+"="+o[s]+"&"});Object.keys(j).forEach(function(s){r+='<param name="'+s+'" value="'+j[s]+'"/>'});r+="</object>";var l=g.createElement("div",{},r);return g.find("object",l)};if(window.attachEvent){window.attachEvent("onbeforeunload",function(){window.__flash_savedUnloadHandler=window.__flash_unloadHandler=function(){}})}},{"../common":1}],3:[function(f,g,i){var e=f("../flowplayer"),m=f("../common"),l=f("./embed"),n=f("extend-object"),o=f("bean"),j;j=function h(A,z){var x=A.conf,q=A.video,B,p,r,w;var v=window;var y={engineName:j.engineName,pick:function(C){var D=n({},(function(){if(e.support.flashVideo){var G;for(var E=0,F;E<C.length;E++){F=C[E];if(/mp4|flv|flash/i.test(F.type)){G=F}if(A.conf.swfHls&&/mpegurl/i.test(F.type)){G=F}if(G&&!/mp4/i.test(G.type)){return G}}return G}})());if(!D){return}if(D.src&&!k(D.src)&&!A.conf.rtmp&&!D.rtmp){D.src=m.createAbsoluteUrl(D.src)}return D},load:function(G){B=G;function D(R){return R.replace(/&/g,"%26").replace(/&/g,"%26").replace(/=/g,"%3D")}var J=m.findDirect("video",z)[0]||m.find(".fp-player > video",z)[0],F=G.src,O=k(F);var P=function(){m.removeNode(J)};var K=function(R){return R.some(function(S){return !!J.canPlayType(S.type)})};if(e.support.video&&m.prop(J,"autoplay")&&K(G.sources)){o.one(J,"timeupdate",P)}else{P()}var L=G.rtmp||x.rtmp;if(!O&&!L){F=m.createAbsoluteUrl(F)}if(w&&u(G)&&w.data!==x.swfHls){y.unload()}if(w){["live","preload","loop"].forEach(function(R){if(!G.hasOwnProperty(R)){return}w.__set(R,G[R])});Object.keys(G.flashls||{}).forEach(function(R){w.__set("hls_"+R,G.flashls[R])});var Q=false;if(!O&&L){w.__set("rtmp",L.url||L)}else{var M=w.__get("rtmp");Q=!!M;w.__set("rtmp",null)}w.__play(F,Q||G.rtmp&&G.rtmp!==x.rtmp)}else{p="fpCallback"+(""+Math.random()).slice(3,15);F=D(F);var C={hostname:x.embedded?m.hostname(x.hostname):m.hostname(location.hostname),url:F,callback:p};if(z.getAttribute("data-origin")){C.origin=z.getAttribute("data-origin")}["proxy","key","autoplay","preload","subscribe","live","loop","debug","splash","poster","rtmpt"].forEach(function(R){if(x.hasOwnProperty(R)){C[R]=x[R]}if(G.hasOwnProperty(R)){C[R]=G[R]}if((x.rtmp||{}).hasOwnProperty(R)){C[R]=(x.rtmp||{})[R]}if((G.rtmp||{}).hasOwnProperty(R)){C[R]=(G.rtmp||{})[R]}});if(x.rtmp){C.rtmp=x.rtmp.url||x.rtmp}if(G.rtmp){C.rtmp=G.rtmp.url||G.rtmp}Object.keys(G.flashls||{}).forEach(function(R){var S=G.flashls[R];C["hls_"+R]=S});if(x.bufferTime!==undefined){C.bufferTime=x.bufferTime}if(O){delete C.rtmp}if(C.rtmp){C.rtmp=D(C.rtmp)}var N=x.bgcolor||m.css(z,"background-color")||"",I;if(N.indexOf("rgb")===0){I=s(N)}else{if(N.indexOf("#")===0){I=t(N)}}C.initialVolume=A.volumeLevel;var H=u(G)?x.swfHls:x.swf;w=l(H,C,x.wmode,I)[0];var E=m.find(".fp-player",z)[0];m.prepend(E,w);setTimeout(function(){try{if(!w.PercentLoaded()){return A.trigger("error",[A,{code:7,url:x.swf}])}}catch(R){}},5000);setTimeout(function(){if(typeof w.PercentLoaded==="undefined"){A.trigger("flashdisabled",[A])}},1000);A.off("resume.flashhack").on("resume.flashhack",function(){var R=setTimeout(function(){if(A.playing){A.trigger("flashdisabled",[A])}},1000);A.one("progress",function(){clearTimeout(R)})});w.pollInterval=setInterval(function(){if(!w){return}var R=w.__status?w.__status():null;if(!R){return}if(A.playing&&R.time&&R.time!==A.video.time){A.trigger("progress",[A,R.time])}G.buffer=R.buffer/G.bytes*G.duration;A.trigger("buffer",[A,G.buffer]);if(!G.buffered&&R.time>0){G.buffered=true;A.trigger("buffered",[A])}},250);window[p]=function(S,R){var U=B;if(x.debug){if(S.indexOf("debug")===0&&R&&R.length){console.log.apply(console,["-- "+S].concat(R))}else{console.log("--",S,R)}}var T={type:S};switch(S){case"ready":R=n(U,R);break;case"click":T.flash=true;break;case"keydown":T.which=R;break;case"seek":U.time=R;break;case"status":A.trigger("progress",[A,R.time]);if(R.buffer<U.bytes&&!U.buffered){U.buffer=R.buffer/U.bytes*U.duration;A.trigger("buffer",U.buffer)}else{if(!U.buffered){U.buffered=true;A.trigger("buffered")}}break}if(S==="click"||S==="keydown"){T.target=z;o.fire(z,S,[T])}else{if(S!="buffered"&&S!=="unload"){setTimeout(function(){A.trigger(T,[A,R])},1)}else{if(S==="unload"){A.trigger(T,[A,R])}}}}}},speed:m.noop,unload:function(){if(w&&w.__unload){w.__unload()}try{if(p&&window[p]){delete window[p]}}catch(C){}m.find("object",z).forEach(m.removeNode);w=0;A.off(".flashengine");clearInterval(w.pollInterval)}};["pause","resume","seek","volume"].forEach(function(C){y[C]=function(D){try{if(A.ready){if(D===undefined){w["__"+C]()}else{w["__"+C](D)}}}catch(E){if(typeof w["__"+C]==="undefined"){return A.trigger("flashdisabled",[A])}throw E}}});function s(C){function D(E){return("0"+parseInt(E).toString(16)).slice(-2)}C=C.match(/^rgb\((\d+),\s*(\d+),\s*(\d+)\)$/);if(!C){return}return"#"+D(C[1])+D(C[2])+D(C[3])}function t(D){if(D.length===7){return D}var C=D.split("").slice(1);return"#"+C.map(function(E){return E+E}).join("")}function u(C){return/application\/x-mpegurl/i.test(C.type)}return y};j.engineName="flash";j.canPlay=function(q,p){return e.support.flashVideo&&/video\/(mp4|flash|flv)/i.test(q)||e.support.flashVideo&&p.swfHls&&/mpegurl/i.test(q)};e.engines.push(j);function k(p){return/^https?:/.test(p)}},{"../common":1,"../flowplayer":18,"./embed":2,bean:20,"extend-object":26}],4:[function(f,g,i){var e=f("../flowplayer"),t=f("bean"),h=f("class-list"),p=f("extend-object"),n=f("../common");var s=document.createElement("video");var o={ended:"finish",pause:"pause",play:"resume",progress:"buffer",timeupdate:"progress",volumechange:"volume",ratechange:"speed",seeked:"seek",loadeddata:"ready",error:"error",dataunavailable:"error",webkitendfullscreen:!e.support.inlineVideo&&"unload"};function u(w,v){v=v||100;return Math.round(w*v)/v}function q(v){return/mpegurl/i.test(v)?"application/x-mpegurl":v}function l(v){if(!/^(video|application)/i.test(v)){v=q(v)}return !!s.canPlayType(v).replace("no","")}function k(w,x){var v=w.filter(function(y){return y.type===x});return v.length?v[0]:null}var j;var m=function(y,z,w,v){if(typeof z==="undefined"){z=true}if(typeof w==="undefined"){w="none"}if(typeof v==="undefined"){v=true}if(v&&j){j.type=q(y.type);j.src=y.src;n.find("track",j).forEach(n.removeNode);j.removeAttribute("crossorigin");return j}var x=document.createElement("video");x.src=y.src;x.type=q(y.type);x.className="fp-engine";x.autoplay=z?"autoplay":false;x.preload=w;x.setAttribute("x-webkit-airplay","allow");if(v){j=x}return x};var r;r=function(D,B){var z=n.findDirect("video",B)[0]||n.find(".fp-player > video",B)[0],C=e.support,w=n.find("track",z)[0],A=D.conf,E,v,y;return E={engineName:r.engineName,pick:function(F){var G=(function(){if(C.video){if(A.videoTypePreference){var I=k(F,A.videoTypePreference);if(I){return I}}for(var H=0,J;H<F.length;H++){if(l(F[H].type)){return F[H]}}}})();if(!G){return}if(typeof G.src==="string"){G.src=n.createAbsoluteUrl(G.src)}return G},load:function(H){var I=false,F=n.find(".fp-player",B)[0],G=false;if(A.splash&&!z){z=m(H);n.prepend(F,z);I=true}else{if(!z){z=m(H,!!H.autoplay||!!A.autoplay,A.clip.preload||"metadata",false);n.prepend(F,z);I=true}else{h(z).add("fp-engine");n.find("source,track",z).forEach(n.removeNode);if(!D.conf.nativesubtitles){n.attr(z,"crossorigin",false)}G=z.src===H.src}}if(!C.inlineVideo){n.css(z,{position:"absolute",top:"-9999em"})}t.off(z,"timeupdate",n.noop);t.on(z,"timeupdate",n.noop);n.prop(z,"loop",!!(H.loop||A.loop));if(typeof y!=="undefined"){z.volume=y}if(D.video.src&&H.src!=D.video.src||H.index){n.attr(z,"autoplay","autoplay")}z.src=H.src;z.type=H.type;E._listeners=x(z,n.find("source",z).concat(z),H);if(A.clip.preload!="none"&&H.type!="mpegurl"||!C.zeropreload||!C.dataload){z.load()}if(I||G){z.load()}if(z.paused&&(H.autoplay||A.autoplay)){z.play()}},pause:function(){z.pause()},resume:function(){z.play()},speed:function(F){z.playbackRate=F},seek:function(H){try{var F=D.paused;z.currentTime=H;if(F){z.pause()}}catch(G){}},volume:function(F){y=F;if(z){z.volume=F}},unload:function(){n.find("video.fp-engine",B).forEach(n.removeNode);if(!C.cachedVideoTag){j=null}v=clearInterval(v);var F=B.getAttribute("data-flowplayer-instance-id");delete z.listeners[F];z=0;if(E._listeners){Object.keys(E._listeners).forEach(function(G){E._listeners[G].forEach(function(H){B.removeEventListener(G,H,true)})})}}};function x(G,F,I){var H=B.getAttribute("data-flowplayer-instance-id");if(G.listeners&&G.listeners.hasOwnProperty(H)){G.listeners[H]=I;return}(G.listeners||(G.listeners={}))[H]=I;t.on(F,"error",function(K){try{if(l(K.target.getAttribute("type"))){D.trigger("error",[D,{code:4,video:p(I,{src:G.src,url:G.src})}])}}catch(L){}});D.on("shutdown",function(){t.off(F)});var J={};Object.keys(o).forEach(function(M){var L=o[M];if(!L){return}var K=function(S){I=G.listeners[H];if(!S.target||!h(S.target).contains("fp-engine")){return}if(A.debug&&!/progress/.test(L)){console.log(M,"->",L,S)}if(!D.ready&&!/ready|error/.test(L)||!L||!n.find("video",B).length){return}var V,Q;if(L==="unload"){D.unload();return}var T=function(){D.trigger(L,[D,V])};switch(L){case"ready":V=p(I,{duration:G.duration,width:G.videoWidth,height:G.videoHeight,url:G.currentSrc,src:G.currentSrc});try{V.seekable=!D.live&&/mpegurl/i.test(I?(I.type||""):"")&&G.duration||G.seekable&&G.seekable.end(null)}catch(P){}v=v||setInterval(function(){try{V.buffer=G.buffered.end(null)}catch(W){}if(V.buffer){if(u(V.buffer,1000)<u(V.duration,1000)&&!V.buffered){D.trigger("buffer",S)}else{if(!V.buffered){V.buffered=true;D.trigger("buffer",S).trigger("buffered",S);clearInterval(v);v=0}}}},250);if(!D.live&&!V.duration&&!C.hlsDuration&&M==="loadeddata"){var R=function(){V.duration=G.duration;try{V.seekable=G.seekable&&G.seekable.end(null)}catch(W){}T();G.removeEventListener("durationchange",R);h(B).remove("is-live")};G.addEventListener("durationchange",R);var N=function(){if(!D.ready&&!G.duration){V.duration=0;h(B).add("is-live");T()}G.removeEventListener("timeupdate",N)};G.addEventListener("timeupdate",N);return}break;case"progress":case"seek":var O=D.video.duration;if(G.currentTime>0||D.live){V=Math.max(G.currentTime,0)}else{if(L=="progress"){return}}break;case"speed":V=u(G.playbackRate);break;case"volume":V=u(G.volume);break;case"error":try{V=(S.srcElement||S.originalTarget).error;V.video=p(I,{src:G.src,url:G.src})}catch(U){return}}T()};B.addEventListener(M,K,true);if(!J[M]){J[M]=[]}J[M].push(K)});return J}};r.canPlay=function(v){return e.support.video&&l(v)};r.engineName="html5";e.engines.push(r)},{"../common":1,"../flowplayer":18,bean:20,"class-list":22,"extend-object":26}],5:[function(k,i,g){var e=k("../flowplayer"),h=k("./resolve").TYPE_RE,j=k("scriptjs"),f=k("bean");e(function(n,m){var s=n.conf.analytics,q=0,o=0,r;if(s){if(typeof _gat=="undefined"){j("//google-analytics.com/ga.js")}var p=function(){var t=_gat._getTracker(s);t._setAllowLinker(true);return t};var l=function l(w,t,v){v=v||n.video;if(q&&typeof _gat!="undefined"){var u=p();u._trackEvent("Video / Seconds played",n.engine.engineName+"/"+v.type,v.title||m.getAttribute("title")||v.src.split("/").slice(-1)[0].replace(h,""),Math.round(q/1000));q=0;if(r){clearTimeout(r);r=null}}};n.bind("load unload",l).bind("progress",function(){if(!n.seeking){q+=o?(+new Date()-o):0;o=+new Date()}if(!r){r=setTimeout(function(){r=null;var t=p();t._trackEvent("Flowplayer heartbeat","Heartbeat","",0,true)},10*60*1000)}}).bind("pause",function(){o=0});n.bind("shutdown",function(){f.off(window,"unload",l)});f.on(window,"unload",l)}})},{"../flowplayer":18,"./resolve":13,bean:20,scriptjs:29}],6:[function(j,h,g){var e=j("../flowplayer"),k=j("class-list"),i=j("../common"),f=j("bean");e(function(u,s){var m=/ ?cue\d+ ?/;var l=0,o=false;function t(v){s.className=s.className.replace(m," ");if(v>=0){k(s).add("cue"+v)}}var p={},r=-0.125;var n=function(w){var v=u.cuepoints.indexOf(w);if(!isNaN(w)){w={time:w}}w.index=v;t(v);u.trigger("cuepoint",[u,w])};u.on("progress",function(y,v,x){if(o){return}var w=q(x);while(r<w){r+=0.125;if(!p[r]){continue}p[r].forEach(n)}}).on("unload",t).on("beforeseek",function(v){setTimeout(function(){if(!v.defaultPrevented){o=true}})}).on("seek",function(w,v,x){t();r=q(x||0)-0.125;o=false;if(!x&&p[0]){p[0].forEach(n)}}).on("ready",function(y,w,x){r=-0.125;var v=x.cuepoints||u.conf.cuepoints||[];u.setCuepoints(v)}).on("finish",function(){r=-0.125});if(u.conf.generate_cuepoints){u.bind("load",function(){i.find(".fp-cuepoint",s).forEach(i.removeNode)})}u.setCuepoints=function(v){u.cuepoints=[];p={};v.forEach(u.addCuepoint);return u};u.addCuepoint=function(v){if(!u.cuepoints){u.cuepoints=[]}var y=q(v);if(!p[y]){p[y]=[]}p[y].push(v);u.cuepoints.push(v);if(u.conf.generate_cuepoints&&v.visible!==false){var A=u.video.duration,x=i.find(".fp-timeline",s)[0];i.css(x,"overflow","visible");var z=v.time||v;if(z<0){z=A+z}var w=i.createElement("a",{className:"fp-cuepoint fp-cuepoint"+(u.cuepoints.length-1)});i.css(w,"left",(z/A*100)+"%");x.appendChild(w);f.on(w,"mousedown",function(B){B.preventDefault();B.stopPropagation();u.seek(z)})}return u};u.removeCuepoint=function(w){var v=u.cuepoints.indexOf(w),y=q(w);if(v===-1){return}u.cuepoints=u.cuepoints.slice(0,v).concat(u.cuepoints.slice(v+1));var x=p[y].indexOf(w);if(x===-1){return}p[y]=p[y].slice(0,x).concat(p[y].slice(x+1));return u};function q(v){var w=v&&!isNaN(v.time)?v.time:v;if(w<0){w=u.video.duration+w}return Math.round(w/0.125)*0.125}})},{"../common":1,"../flowplayer":18,bean:20,"class-list":22}],7:[function(f,g,i){var e=f("../flowplayer"),m=f("bean"),j=f("../common"),n=f("is-object"),k=f("extend-object"),h=f("class-list");e(function(r,o){if(r.conf.embed===false){return}var q=r.conf,t=j.find(".fp-ui",o)[0],p=j.createElement("a",{"class":"fp-embed",title:"Copy to your site"}),u=j.createElement("div",{"class":"fp-embed-code"},"<label>Paste this HTML code on your site to embed.</label><textarea></textarea>"),s=j.find("textarea",u)[0];t.appendChild(p);t.appendChild(u);r.embedCode=function(){var A=r.conf.embed||{},z=r.video;if(A.iframe){var B=r.conf.embed.iframe,y=A.width||z.width||j.width(o),v=A.height||z.height||j.height(o);return'<iframe src="'+r.conf.embed.iframe+'" allowfullscreen style="width:'+y+";height:"+v+';border:none;"></iframe>'}var x=["ratio","rtmp","live","bufferTime","origin","analytics","key","subscribe","swf","swfHls","embed","adaptiveRatio","logo"];if(A.playlist){x.push("playlist")}var C=j.pick(r.conf,x);if(C.logo){C.logo=j.createElement("img",{src:C.logo}).src}if(!A.playlist||!r.conf.playlist.length){C.clip=k({},r.conf.clip,j.pick(r.video,["sources"]))}var w='var w=window,d=document,e;w._fpes||(w._fpes=[],w.addEventListener("load",function(){var s=d.createElement("script");s.src="//embed.flowplayer.org/6.0.5/embed.min.js",d.body.appendChild(s)})),e=[].slice.call(d.getElementsByTagName("script"),-1)[0].parentNode,w._fpes.push({e:e,l:"$library",c:$conf});\n'.replace("$conf",JSON.stringify(C)).replace("$library",A.library||"");return'<a href="$href">Watch video!\n<script>$script<\/script></a>'.replace("$href",r.conf.origin||window.location.href).replace("$script",w)};l(o,".fp-embed","is-embedding");m.on(o,"click",".fp-embed-code textarea",function(){s.select()});m.on(o,"click",".fp-embed",function(){s.textContent=r.embedCode().replace(/(\r\n|\n|\r)/gm,"");s.focus();s.select()})});var l=function(p,q,r){function s(){o.remove(r);m.off(document,".st")}var o=h(p);m.on(p,"click",q||"a",function(t){t.preventDefault();o.toggle(r);if(o.contains(r)){m.on(document,"keydown.st",function(u){if(u.which==27){s()}});m.on(document,"click.st",function(u){if(!j.hasParent(u.target,"."+r)){s()}})}})}},{"../common":1,"../flowplayer":18,bean:20,"class-list":22,"extend-object":26,"is-object":28}],8:[function(g,f,e){f.exports=function(m,k){if(!k){k=document.createElement("div")}var i={},h={};var j=function(n,o,r){var q=n.split(".")[0];var p=function(t){if(r){k.removeEventListener(q,p);i[n].splice(i[n].indexOf(p),1)}var s=[t].concat(h[t.timeStamp+t.type]||[]);if(o){o.apply(undefined,s)}};k.addEventListener(q,p);if(!i[n]){i[n]=[]}i[n].push(p)};m.on=m.bind=function(p,o){var n=p.split(" ");n.forEach(function(q){j(q,o)});return m};m.one=function(p,o){var n=p.split(" ");n.forEach(function(q){j(q,o,true)});return m};var l=function(o,n){return n.filter(function(p){return o.indexOf(p)===-1}).length===0};m.off=m.unbind=function(o){var n=o.split(" ");n.forEach(function(q){var p=q.split(".").slice(1),r=q.split(".")[0];Object.keys(i).filter(function(s){var u=s.split(".").slice(1);return(!r||s.indexOf(r)===0)&&l(u,p)}).forEach(function(s){var v=i[s],u=s.split(".")[0];v.forEach(function(t){k.removeEventListener(u,t);v.splice(v.indexOf(t),1)})})});return m};m.trigger=function(r,n,o){if(!r){return}n=(n||[]).length?n||[]:[n];var q=document.createEvent("Event"),p;p=r.type||r;q.initEvent(p,false,true);if(Object.defineProperty){q.preventDefault=function(){Object.defineProperty(this,"defaultPrevented",{get:function(){return true}})}}h[q.timeStamp+q.type]=n;k.dispatchEvent(q);return o?q:m}};f.exports.EVENTS=["beforeseek","disable","error","finish","fullscreen","fullscreen-exit","load","mute","pause","progress","ready","resume","seek","speed","stop","unload","volume","boot","shutdown"]},{}],9:[function(h,i,m){var g=h("../flowplayer"),r=h("bean"),l=h("class-list"),o=h("extend-object"),n=h("../common"),q=g.support.browser.mozilla?"moz":"webkit",t="fullscreen",k="fullscreen-exit",e,s=g.support.fullscreen,p=typeof document.exitFullscreen=="function",f=navigator.userAgent.toLowerCase(),j=/(safari)[ \/]([\w.]+)/.exec(f)&&!/(chrome)[ \/]([\w.]+)/.exec(f);r.on(document,"fullscreenchange.ffscr webkitfullscreenchange.ffscr mozfullscreenchange.ffscr MSFullscreenChange.ffscr",function(w){var v=document.webkitCurrentFullScreenElement||document.mozFullScreenElement||document.fullscreenElement||document.msFullscreenElement||w.target;if(!e&&(!v.parentNode||!v.parentNode.getAttribute("data-flowplayer-instance-id"))){return}var u=e||g(v.parentNode);if(v&&!e){e=u.trigger(t,[v])}else{e.trigger(k,[e]);e=null}});g(function(x,v){var B=n.createElement("div",{className:"fp-player"});Array.prototype.map.call(v.children,n.identity).forEach(function(C){if(n.matches(C,".fp-ratio,script")){return}B.appendChild(C)});v.appendChild(B);if(!x.conf.fullscreen){return}var z=window,y,A,u=l(v);x.isFullscreen=false;x.fullscreen=function(C){if(x.disabled){return}if(C===undefined){C=!x.isFullscreen}if(C){y=z.scrollY;A=z.scrollX}if(s){if(C){["requestFullScreen","webkitRequestFullScreen","mozRequestFullScreen","msRequestFullscreen"].forEach(function(D){if(typeof B[D]==="function"){B[D](Element.ALLOW_KEYBOARD_INPUT);if(j&&!document.webkitCurrentFullScreenElement&&!document.mozFullScreenElement){B[D]()}return false}})}else{["exitFullscreen","webkitCancelFullScreen","mozCancelFullScreen","msExitFullscreen"].forEach(function(D){if(typeof document[D]==="function"){document[D]();return false}})}}else{x.trigger(C?t:k,[x])}return x};var w;x.on("mousedown.fs",function(){if(+new Date()-w<150&&x.ready){x.fullscreen()}w=+new Date()});x.on(t,function(C){u.add("is-fullscreen");if(!s){n.css(v,"position","fixed")}x.isFullscreen=true}).on(k,function(D){var C;if(!s&&x.engine==="html5"){C=v.css("opacity")||"";n.css(v,"opacity",0)}if(!s){n.css(v,"position","")}u.remove("is-fullscreen");if(!s&&x.engine==="html5"){setTimeout(function(){v.css("opacity",C)})}x.isFullscreen=false;z.scrollTo(A,y)}).on("unload",function(){if(x.isFullscreen){x.fullscreen()}});x.on("shutdown",function(){e=null})})},{"../common":1,"../flowplayer":18,bean:20,"class-list":22,"extend-object":26}],10:[function(g,h,j){var f=g("../flowplayer"),n=g("bean"),m,l,e="is-help",k=g("../common"),i=g("class-list");n.on(document,"keydown.fp",function(t){var r=m,s=t.ctrlKey||t.metaKey||t.altKey,p=t.which,o=r&&r.conf,q=l&&i(l);if(!r||!o.keyboard||r.disabled){return}if([63,187,191].indexOf(p)!=-1){q.toggle(e);return false}if(p==27&&q.contains(e)){q.toggle(e);return false}if(!s&&r.ready){t.preventDefault();if(t.shiftKey){if(p==39){r.speed(true)}else{if(p==37){r.speed(false)}}return}if(p<58&&p>47){return r.seekTo(p-48)}switch(p){case 38:case 75:r.volume(r.volumeLevel+0.15);break;case 40:case 74:r.volume(r.volumeLevel-0.15);break;case 39:case 76:r.seeking=true;r.seek(true);break;case 37:case 72:r.seeking=true;r.seek(false);break;case 190:r.seekTo();break;case 32:r.toggle();break;case 70:if(o.fullscreen){r.fullscreen()}break;case 77:r.mute();break;case 81:r.unload();break}}});f(function(p,o){if(!p.conf.keyboard){return}n.on(o,"mouseenter mouseleave",function(s){m=!p.disabled&&s.type=="mouseover"?p:0;if(m){l=o}});var r=f.support.video&&p.conf.engine!=="flash"&&!!document.createElement("video").playbackRate?"<p><em>shift</em> + <em>←</em><em>→</em>slower / faster</p>":"";o.appendChild(k.createElement("div",{className:"fp-help"},' <a class="fp-close"></a> <div class="fp-help-section fp-help-basics"> <p><em>space</em>play / pause</p> <p><em>q</em>unload | stop</p> <p><em>f</em>fullscreen</p>'+r+' </div> <div class="fp-help-section"> <p><em>↑</em><em>↓</em>volume</p> <p><em>m</em>mute</p> </div> <div class="fp-help-section"> <p><em>←</em><em>→</em>seek</p> <p><em> . </em>seek to previous </p><p><em>1</em><em>2</em>… <em>6</em> seek to 10%, 20% … 60% </p> </div> '));if(p.conf.tooltip){var q=k.find(".fp-ui",o)[0];q.setAttribute("title","Hit ? for help");n.one(o,"mouseout.tip",".fp-ui",function(){q.removeAttribute("title")})}n.on(o,"click",".fp-close",function(){i(o).toggle(e)});p.bind("shutdown",function(){if(l==o){l=null}})})},{"../common":1,"../flowplayer":18,bean:20,"class-list":22}],11:[function(f,g,i){var e=f("../flowplayer"),l=/IEMobile/.test(window.navigator.userAgent),h=f("class-list"),k=f("../common"),n=f("bean"),m=f("./ui").format,j=window.navigator.userAgent;if(e.support.touch||l){e(function(x,u){var t=/Android/.test(j)&&!/Firefox/.test(j)&&!/Opera/.test(j),q=/Silk/.test(j),v=t?parseFloat(/Android\ (\d\.\d)/.exec(j)[1],10):0,y=h(u);if(t&&!l){if(!/Chrome/.test(j)&&v<4){var s=x.load;x.load=function(A,B){var z=s.apply(x,arguments);x.trigger("ready",[x,x.video]);return z}}var p,o=0;var r=function(z){p=setInterval(function(){z.video.time=++o;z.trigger("progress",[z,o])},1000)};x.bind("ready pause unload",function(){if(p){clearInterval(p);p=null}});x.bind("ready",function(){o=0});x.bind("resume",function(A,z){if(!z.live){return}if(o){return r(z)}x.one("progress",function(D,C,B){if(B===0){r(C)}})})}if(!e.support.volume){y.add("no-volume");y.add("no-mute")}y.add("is-touch");if(x.sliders&&x.sliders.timeline){x.sliders.timeline.disableAnimation()}if(!e.support.inlineVideo||x.conf.native_fullscreen){x.conf.nativesubtitles=true}var w=false;n.on(u,"touchmove",function(){w=true});n.on(u,"touchend click",function(z){if(w){w=false;return}if(x.playing&&!y.contains("is-mouseover")){y.add("is-mouseover");y.remove("is-mouseout");z.preventDefault();z.stopPropagation();return}if(!x.playing&&!x.splash&&y.contains("is-mouseout")&&!y.contains("is-mouseover")){setTimeout(function(){if(!x.playing&&!x.splash){x.resume()}},400)}});if(x.conf.native_fullscreen&&typeof document.createElement("video").webkitEnterFullScreen==="function"){x.fullscreen=function(){var z=k.find("video.fp-engine",u)[0];z.webkitEnterFullScreen();n.one(z,"webkitendfullscreen",function(){k.prop(z,"controls",true);k.prop(z,"controls",false)})}}if(t||q){x.bind("ready",function(){var z=k.find("video.fp-engine",u)[0];n.one(z,"canplay",function(){z.play()});z.play();x.bind("progress.dur",function(){var A=z.duration;if(A!==1){x.video.duration=A;k.find(".fp-duration",u)[0].innerHTML=m(A);x.unbind("progress.dur")}})})}})}},{"../common":1,"../flowplayer":18,"./ui":17,bean:20,"class-list":22}],12:[function(g,h,k){var f=g("../flowplayer"),o=g("extend-object"),p=g("bean"),j=g("class-list"),n=g("../common"),m=g("./resolve"),i=new m(),l=window.jQuery,e=/^#/;f(function(z,x){var v=o({active:"is-active",advance:true,query:".fp-playlist a"},z.conf),w=v.active,A=j(x);function u(){return n.find(v.query,t())}function t(){if(e.test(v.query)){return}return x}function s(){return n.find(v.query+"."+w,t())}z.play=function(C){if(C===undefined){return z.resume()}if(typeof C==="number"&&!z.conf.playlist[C]){return z}else{if(typeof C!="number"){return z.load.apply(null,arguments)}}var B=o({index:C},z.conf.playlist[C]);if(C===z.video.index){return z.load(B,function(){z.resume()})}z.off("resume.fromfirst");z.load(B,function(){z.video.index=C});return z};z.next=function(C){if(C){C.preventDefault()}var B=z.video.index;if(B!=-1){B=B===z.conf.playlist.length-1?0:B+1;z.play(B)}return z};z.prev=function(C){if(C){C.preventDefault()}var B=z.video.index;if(B!=-1){B=B===0?z.conf.playlist.length-1:B-1;z.play(B)}return z};z.setPlaylist=function(B){z.conf.playlist=B;delete z.video.index;q();return z};z.addPlaylistItem=function(B){return z.setPlaylist(z.conf.playlist.concat([B]))};z.removePlaylistItem=function(B){var C=z.conf.playlist;return z.setPlaylist(C.slice(0,B).concat(C.slice(B+1)))};p.on(x,"click",".fp-next",z.next);p.on(x,"click",".fp-prev",z.prev);if(v.advance){z.off("finish.pl").on("finish.pl",function(D,B){if(B.video.loop){return B.seek(0,function(){B.resume()})}var C=B.video.index>=0?B.video.index+1:undefined;if(C<B.conf.playlist.length||v.loop){C=C===B.conf.playlist.length?0:C;A.remove("is-finished");setTimeout(function(){B.play(C)})}else{if(B.conf.playlist.length>1){B.one("resume.fromfirst",function(){B.play(0);return false})}}})}function q(){var C=n.find(".fp-playlist",x)[0];if(!C){C=n.createElement("div",{className:"fp-playlist"});var B=n.find(".fp-next,.fp-prev",x);if(!B.length){n.insertAfter(x,n.find("video",x)[0],C)}else{B[0].parentElement.insertBefore(C,B[0])}}C.innerHTML="";if(z.conf.playlist[0].length){z.conf.playlist=z.conf.playlist.map(function(E){if(typeof E==="string"){var D=E.split(m.TYPE_RE)[1];return{sources:[{type:D.toLowerCase()==="m3u8"?"application/x-mpegurl":"video/"+D,src:E}]}}return{sources:E.map(function(G){var F={};Object.keys(G).forEach(function(H){F.type=/mpegurl/i.test(H)?"application/x-mpegurl":"video/"+H;F.src=G[H]});return F})}})}z.conf.playlist.forEach(function(F,E){var D=F.sources[0].src;C.appendChild(n.createElement("a",{href:D,"data-index":E}))})}var y=false;if(z.conf.playlist.length){y=true;q();if(!z.conf.clip||!z.conf.clip.sources.length){z.conf.clip=z.conf.playlist[z.conf.startIndex||0]}}if(u().length&&!y){z.conf.playlist=[];delete z.conf.startIndex;u().forEach(function(B){var C=B.href;B.setAttribute("data-index",z.conf.playlist.length);var D=i.resolve(C,z.conf.clip.sources);if(l){o(D,l(B).data())}z.conf.playlist.push(D)})}p.on(e.test(v.query)?document:x,"click",v.query,function(D){D.preventDefault();var B=D.currentTarget;var C=Number(B.getAttribute("data-index"));if(C!=-1){z.play(C)}});function r(B){if(typeof B.index!=="undefined"){return B.index}if(typeof z.video.index!=="undefined"){return z.video.index}return z.conf.startIndex||0}z.on("load",function(I,F,H){if(!z.conf.playlist.length){return}var G=s()[0],D=G&&G.getAttribute("data-index"),C=H.index=r(H),E=n.find(v.query+'[data-index="'+C+'"]',t())[0],B=C==z.conf.playlist.length-1;if(G){j(G).remove(w)}if(E){j(E).add(w)}A.remove("video"+D);A.add("video"+C);n.toggleClass(x,"last-video",B);H.index=F.video.index=C;H.is_last=F.video.is_last=B}).on("unload.pl",function(){if(!z.conf.playlist.length){return}s().forEach(function(B){j(B).toggle(w)});z.conf.playlist.forEach(function(C,B){A.remove("video"+B)})});if(z.conf.playlist.length){z.conf.loop=false}})},{"../common":1,"../flowplayer":18,"./resolve":13,bean:20,"class-list":22,"extend-object":26}],13:[function(j,h,f){var g=/\.(\w{3,4})(\?.*)?$/i,l=j("extend-object");function i(n){var p=n.attr("src"),m=n.attr("type")||"",o=p.split(g)[1];m=m.toLowerCase();return l(n.data(),{src:p,suffix:o||m,type:m||o})}function k(m){if(/mpegurl/i.test(m)){return"application/x-mpegurl"}return"video/"+m}h.exports=function e(){var m=this;m.sourcesFromVideoTag=function(o,p){var n=[];p("source",o).each(function(){n.push(i(p(this)))});if(!n.length&&o.length){n.push(i(o))}return n};m.resolve=function(o,n){if(!o){return{sources:n}}if(typeof o=="string"){o={src:o,sources:[]};o.sources=(n||[]).map(function(p){var q=p.src.split(g)[1];return{type:p.type,src:o.src.replace(g,"."+q+"$2")}})}if(o instanceof Array){o={sources:o.map(function(p){if(p.type&&p.src){return p}return Object.keys(p).reduce(function(q,r){return l(q,{type:k(r),src:p[r]})},{})})}}return o}};h.exports.TYPE_RE=g},{"extend-object":26}],14:[function(j,g,f){var l=j("class-list"),e=j("bean"),h=j("../common");var k=function(o,n){var m;return function(){if(!m){o.apply(this,arguments);m=1;setTimeout(function(){m=0},n)}}};var i=function(A,r){var C=/iPad/.test(navigator.userAgent)&&!/CriOS/.test(navigator.userAgent);var u=h.lastChild(A),G=l(A),m=l(u),q,s,z,x,o,w,D,B,p=false,n=function(){s=h.offset(A);z=h.width(A);x=h.height(A);w=o?x:z;B=t(D)},F=function(H){if(!q&&H!=v.value&&(!D||H<D)){e.fire(A,"slide",[H]);v.value=H}},E=function(J){var H=J.pageX||J.clientX;if(!H&&J.originalEvent&&J.originalEvent.touches&&J.originalEvent.touches.length){H=J.originalEvent.touches[0].pageX}var K=o?J.pageY-s.top:H-s.left;K=Math.max(0,Math.min(B||w,K));var I=K/w;if(o){I=1-I}if(r){I=1-I}return y(I,0,true)},y=function(I,H){if(H===undefined){H=0}if(I>1){I=1}var J=(Math.round(I*1000)/10)+"%";if(!D||I<=D){m.remove("animated");if(p){m.remove("animated")}else{m.add("animated");h.css(u,"transition-duration",(H||0)+"ms")}h.css(u,"width",J)}return I},t=function(H){return Math.max(0,Math.min(w,o?(1-H)*x:H*z))},v={max:function(H){D=H},disable:function(H){q=H},slide:function(J,I,H){n();if(H){F(J)}y(J,I)},disableAnimation:function(I,H){p=I!==false;h.toggleClass(A,"no-animation",!!H)}};n();e.on(A,"mousedown.sld touchstart",function(I){I.preventDefault();if(!q){var H=k(F,100);n();v.dragging=true;G.add("is-dragging");F(E(I));e.on(document,"mousemove.sld touchmove.sld",function(J){J.preventDefault();H(E(J))});e.one(document,"mouseup touchend",function(){v.dragging=false;G.remove("is-dragging");e.off(document,"mousemove.sld touchmove.sld")})}});return v};g.exports=i},{"../common":1,bean:20,"class-list":22}],15:[function(j,h,g){var e=j("../flowplayer"),i=j("../common"),f=j("bean"),k=j("class-list");e.defaults.subtitleParser=function(o){var q=/^(([0-9]{2}:){1,2}[0-9]{2}[,.][0-9]{3}) --\> (([0-9]{2}:){1,2}[0-9]{2}[,.][0-9]{3})(.*)/;function t(x){var y=x.split(":");if(y.length==2){y.unshift(0)}return y[0]*60*60+y[1]*60+parseFloat(y[2].replace(",","."))}var p=[];for(var n=0,w=o.split("\n"),r=w.length,u={},s,l,v,m;n<r;n++){l=q.exec(w[n]);if(l){s=w[n-1];v="<p>"+w[++n]+"</p><br/>";while(typeof w[++n]==="string"&&w[n].trim()&&n<w.length){v+="<p>"+w[n]+"</p><br/>"}u={title:s,startTime:t(l[1]),endTime:t(l[3]),text:v};p.push(u)}}return p};e(function(l,s){var q,u,m,v=k(s),n;var o=function(){n=i.createElement("a",{className:"fp-menu"});var p=i.createElement("ul",{className:"fp-dropdown fp-dropup"});p.appendChild(i.createElement("li",{"data-subtitle-index":-1},"No subtitles"));(l.video.subtitles||[]).forEach(function(y,z){var w=y.srclang||"en",x=y.label||"Default ("+w+")";var A=i.createElement("li",{"data-subtitle-index":z},x);p.appendChild(A)});n.appendChild(p);i.find(".fp-controls",s)[0].appendChild(n);return n};f.on(s,"click",".fp-menu",function(p){k(n).toggle("dropdown-open")});f.on(s,"click",".fp-menu li[data-subtitle-index]",function(w){var p=w.target.getAttribute("data-subtitle-index");if(p==="-1"){return l.disableSubtitles()}l.loadSubtitles(p)});var t=function(){var p=i.find(".fp-player",s)[0];m=i.find(".fp-subtitle",s)[0];m=m||i.appendTo(i.createElement("div",{"class":"fp-subtitle"}),p);Array.prototype.forEach.call(m.children,i.removeNode);q=k(m);i.find(".fp-menu",s).forEach(i.removeNode);o()};l.on("ready",function(B,y,A){var x=y.conf;if(e.support.subtitles&&x.nativesubtitles&&y.engine.engineName=="html5"){var w=function(D){var C=i.find("video",s)[0].textTracks;if(!C.length){return}C[0].mode=D};if(!A.subtitles||!A.subtitles.length){return}var z=i.find("video.fp-engine",s)[0];if(A.subtitles.some(function(C){return !i.isSameDomain(C.src)})){i.attr(z,"crossorigin","anonymous")}z.textTracks.addEventListener("addtrack",function(){w("disabled");w("showing")});A.subtitles.forEach(function(C){z.appendChild(i.createElement("track",{kind:"subtitles",srclang:C.srclang||"en",label:C.label||"en",src:C.src,"default":C["default"]}))});return}y.subtitles=[];t();v.remove("has-menu");l.disableSubtitles();if(!A.subtitles||!A.subtitles.length){return}v.add("has-menu");var p=A.subtitles.filter(function(C){return C["default"]})[0];if(p){y.loadSubtitles(A.subtitles.indexOf(p))}});l.bind("cuepoint",function(x,w,p){if(p.subtitle){u=p.index;i.html(m,p.subtitle.text);q.add("fp-active")}else{if(p.subtitleEnd){q.remove("fp-active");u=p.index}}});l.bind("seek",function(x,p,w){if(u&&l.cuepoints[u]&&l.cuepoints[u].time>w){q.remove("fp-active");u=null}(l.cuepoints||[]).forEach(function(y){var z=y.subtitle;if(z&&u!=y.index){if(w>=y.time&&(!z.endTime||w<=z.endTime)){l.trigger("cuepoint",[l,y])}}else{if(y.subtitleEnd&&w>=y.time&&y.index==u+1){l.trigger("cuepoint",[l,y])}}})});var r=function(p){i.toggleClass(i.find("li.active",s)[0],"active");i.toggleClass(i.find('li[data-subtitle-index="'+p+'"]',s)[0],"active")};l.disableSubtitles=function(){l.subtitles=[];(l.cuepoints||[]).forEach(function(p){if(p.subtitle||p.subtitleEnd){l.removeCuepoint(p)}});if(m){Array.prototype.forEach.call(m.children,i.removeNode)}r(-1);return l};l.loadSubtitles=function(x){l.disableSubtitles();var w=l.video.subtitles[x];var p=w.src;if(!p){return}r(x);i.xhrGet(p,function(z){var y=l.conf.subtitleParser(z);y.forEach(function(B){var A={time:B.startTime,subtitle:B,visible:false};l.subtitles.push(B);l.addCuepoint(A);l.addCuepoint({time:B.endTime,subtitleEnd:B.title,visible:false});if(B.startTime===0&&!l.video.time){l.trigger("cuepoint",[l,A])}})},function(){l.trigger("error",{code:8,url:p});return false});return l}})},{"../common":1,"../flowplayer":18,bean:20,"class-list":22}],16:[function(h,g,f){var e=h("../flowplayer"),i=h("extend-object");(function(){var r=function(s){var I=/Version\/(\d\.\d)/.exec(s);if(I&&I.length>1){return parseFloat(I[1],10)}return 0};var x=function(){var s=document.createElement("video");s.loop=true;s.autoplay=true;s.preload=true;return s};var F={},z=navigator.userAgent.toLowerCase(),p=/(chrome)[ \/]([\w.]+)/.exec(z)||/(safari)[ \/]([\w.]+)/.exec(z)||/(webkit)[ \/]([\w.]+)/.exec(z)||/(opera)(?:.*version|)[ \/]([\w.]+)/.exec(z)||/(msie) ([\w.]+)/.exec(z)||z.indexOf("compatible")<0&&/(mozilla)(?:.*? rv:([\w.]+)|)/.exec(z)||[];if(p[1]){F[p[1]]=true;F.version=p[2]||"0"}var A=x(),v=navigator.userAgent,o=F.msie||/Trident\/7/.test(v),y=/iPad|MeeGo/.test(v)&&!/CriOS/.test(v),t=/iPad/.test(v)&&/CriOS/.test(v),w=/iP(hone|od)/i.test(v)&&!/iPad/.test(v)&&!/IEMobile/i.test(v),n=/Android/.test(v)&&!/Firefox/.test(v),B=/Android/.test(v)&&/Firefox/.test(v),H=/Silk/.test(v),E=/IEMobile/.test(v),q=E?parseFloat(/Windows\ Phone\ (\d+\.\d+)/.exec(v)[1],10):0,C=E?parseFloat(/IEMobile\/(\d+\.\d+)/.exec(v)[1],10):0,G=y?r(v):0,k=n?parseFloat(/Android\ (\d\.\d)/.exec(v)[1],10):0,u=i(e.support,{browser:F,subtitles:!!A.addTextTrack,fullscreen:typeof document.webkitCancelFullScreen=="function"&&!/Mac OS X 10_5.+Version\/5\.0\.\d Safari/.test(v)||document.mozFullScreenEnabled||typeof document.exitFullscreen=="function"||typeof document.msExitFullscreen=="function",inlineBlock:!(o&&F.version<8),touch:("ontouchstart" in window),dataload:!y&&!w&&!E,zeropreload:!o&&!n,volume:!y&&!n&&!w&&!H&&!t,cachedVideoTag:!y&&!w&&!t&&!E,firstframe:!w&&!y&&!n&&!H&&!t&&!E&&!B,inlineVideo:!w&&(!E||(q>=8.1&&C>=11))&&(!n||k>=3),hlsDuration:!n&&(!F.safari||y||w||t),seekable:!y&&!t});try{var l=navigator.plugins["Shockwave Flash"],m=o?new ActiveXObject("ShockwaveFlash.ShockwaveFlash").GetVariable("$version"):l.description;if(!o&&!l[0].enabledPlugin){u.flashVideo=false}else{m=m.split(/\D+/);if(m.length&&!m[0]){m=m.slice(1)}u.flashVideo=m[0]>9||m[0]==9&&m[3]>=115}}catch(j){}try{u.video=!!A.canPlayType;if(u.video){A.canPlayType("video/mp4")}}catch(D){u.video=false}u.animation=(function(){var J=["","Webkit","Moz","O","ms","Khtml"],I=document.createElement("p");for(var s=0;s<J.length;s++){if(typeof I.style[J[s]+"AnimationName"]!=="undefined"){return true}}})()})()},{"../flowplayer":18,"extend-object":26}],17:[function(g,h,j){var f=g("../flowplayer"),l=g("../common"),i=g("class-list"),n=g("bean"),e=g("./slider");function k(o){o=parseInt(o,10);return o>=10?o:"0"+o}function m(q){q=q||0;var p=Math.floor(q/3600),o=Math.floor(q/60);q=q-(o*60);if(p>=1){o-=p*60;return p+":"+k(o)+":"+k(q)}return k(o)+":"+k(q)}f(function(G,L){var z=G.conf,C=f.support,Q,U=i(L);l.find(".fp-ratio,.fp-ui",L).forEach(l.removeNode);U.add("flowplayer");L.appendChild(l.createElement("div",{className:"fp-ratio"}));var I=l.createElement("div",{className:"fp-ui"},' <div class="waiting"><em></em><em></em><em></em></div> <a class="fullscreen"></a> <a class="unload"></a> <p class="speed"></p> <div class="controls"> <a class="play"></a> <div class="timeline"> <div class="buffer"></div> <div class="progress"></div> </div> <div class="timeline-tooltip fp-tooltip"></div> <div class="volume"> <a class="mute"></a> <div class="volumeslider"> <div class="volumelevel"></div> </div> </div> </div> <div class="time"> <em class="elapsed">00:00</em> <em class="remaining"></em> <em class="duration">00:00</em> </div> <div class="message"><h2></h2><p></p></div>'.replace(/class="/g,'class="fp-'));L.appendChild(I);function J(V){return l.find(".fp-"+V,L)[0]}var v=J("progress"),M=J("buffer"),q=J("elapsed"),H=J("remaining"),p=J("waiting"),x=J("ratio"),P=J("speed"),A=i(P),D=J("duration"),F=J("controls"),E=J("timeline-tooltip"),t=l.css(x,"padding-top"),u=J("timeline"),K=e(u,G.rtl),O=J("volume"),o=J("fullscreen"),B=J("volumeslider"),r=e(B,G.rtl),S=U.contains("fixed-controls")||U.contains("no-toggle");K.disableAnimation(U.contains("is-touch"));G.sliders=G.sliders||{};G.sliders.timeline=K;G.sliders.volume=r;function N(V){l.css(x,"padding-top",V*100+"%");if(!C.inlineBlock){l.height(l.find("object",L)[0],l.height(L))}}function T(V){if(V){U.add("is-mouseover");U.remove("is-mouseout")}else{U.add("is-mouseout");U.remove("is-mouseover")}}if(!C.animation){l.html(p,"<p>loading …</p>")}if(z.ratio){N(z.ratio)}try{if(!z.fullscreen){l.removeNode(o)}}catch(R){l.removeNode(o)}G.on("ready",function(X,V,W){var Y=V.video.duration;K.disable(V.disabled||!Y);if(z.adaptiveRatio&&!isNaN(W.height/W.width)){N(W.height/W.width,true)}l.html([D,H],m(Y));l.toggleClass(L,"is-long",Y>=3600);r.slide(V.volumeLevel);if(V.engine.engineName==="flash"){K.disableAnimation(true,true)}else{K.disableAnimation(false)}l.find(".fp-title",I).forEach(l.removeNode);if(W.title){l.prepend(I,l.createElement("div",{className:"fp-title"},W.title))}}).on("unload",function(){if(!t&&!z.splash){l.css(x,"paddingTop","")}K.slide(0)}).on("buffer",function(){var W=G.video,V=W.buffer/W.duration;if(!W.seekable&&C.seekable){K.max(V)}if(V<1){l.css(M,"width",(V*100)+"%")}else{l.css(M,"width","100%")}}).on("speed",function(W,V,X){l.text(P,X+"x");A.add("fp-hilite");setTimeout(function(){A.remove("fp-hilite")},1000)}).on("buffered",function(){l.css(M,"width","100%");K.max(1)}).on("progress",function(){var W=G.video.time,V=G.video.duration;if(!K.dragging){K.slide(W/V,G.seeking?0:250)}l.html(q,m(W));l.html(H,"-"+m(V-W))}).on("finish resume seek",function(V){l.toggleClass(L,"is-finished",V.type=="finish")}).on("stop",function(){l.html(q,m(0));K.slide(0,100)}).on("finish",function(){l.html(q,m(G.video.duration));K.slide(1,100);U.remove("is-seeking")}).on("beforeseek",function(){}).on("volume",function(){r.slide(G.volumeLevel)}).on("disable",function(){var V=G.disabled;K.disable(V);r.disable(V);l.toggleClass(L,"is-disabled",G.disabled)}).on("mute",function(X,W,V){l.toggleClass(L,"is-muted",V)}).on("error",function(Z,X,V){l.removeClass(L,"is-loading");l.removeClass(L,"is-seeking");l.addClass(L,"is-error");if(V){V.message=z.errors[V.code];X.error=true;var W=l.find(".fp-message",L)[0],Y=V.video||X.video;l.find("h2",W)[0].innerHTML=(X.engine&&X.engine.engineName||"html5")+": "+V.message;l.find("p",W)[0].innerHTML=V.url||Y.url||Y.src||z.errorUrls[V.code];X.off("mouseenter click");U.remove("is-mouseover")}});n.on(L,"mouseenter mouseleave",function(Y){if(S){return}var W=Y.type=="mouseover",V;T(W);if(W){var X=function(){T(true);V=new Date()};G.on("pause.x volume.x",X);n.on(L,"mousemove.x",X);Q=setInterval(function(){if(new Date()-V>z.mouseoutTimeout){T(false);V=new Date()}},100)}else{n.off(L,"mousemove.x");G.off("pause.x volume.x");clearInterval(Q)}});n.on(L,"mouseleave",function(){if(K.dragging||r.dragging){U.add("is-mouseover");U.remove("is-mouseout")}});n.on(L,"click.player",function(W){if(G.disabled){return}var V=i(W.target);if(V.contains("fp-ui")||V.contains("fp-engine")||W.flash){if(W.preventDefault){W.preventDefault()}return G.toggle()}});n.on(L,"mousemove",".fp-timeline",function(X){var V=X.pageX||X.clientX,Z=V-l.offset(u).left,W=Z/l.width(u),Y=W*G.video.duration;if(W<0){return}l.html(E,m(Y));l.css(E,"left",(V-l.offset(F).left-l.width(E)/2)+"px")});n.on(L,"contextmenu",function(X){var aa=l.offset(l.find(".fp-player",L)[0]),V=window,Y=X.clientX-(aa.left+V.scrollX),W=X.clientY-(aa.top+V.scrollY);if(U.contains("is-flash-disabled")){return}var Z=l.find(".fp-context-menu",L)[0];if(!Z){return}X.preventDefault();l.css(Z,{left:Y+"px",top:W+"px",display:"block"});n.on(L,"click",".fp-context-menu",function(ab){ab.stopPropagation()});n.on(document,"click.outsidemenu",function(ab){l.css(Z,"display","none");n.off(document,"click.outsidemenu")})});G.on("flashdisabled",function(){U.add("is-flash-disabled");G.one("ready progress",function(){U.remove("is-flash-disabled");l.find(".fp-flash-disabled",L).forEach(l.removeNode)});L.appendChild(l.createElement("div",{className:"fp-flash-disabled"},"Adobe Flash is disabled for this page, click player area to enable"))});if(z.poster){l.css(L,"background-image","url("+z.poster+")")}var s=l.css(L,"background-color"),y=l.css(L,"background-image")!="none"||s&&s!="rgba(0, 0, 0, 0)"&&s!="transparent";if(y&&!z.splash){if(!z.poster){z.poster=true}G.on("ready stop",function(){U.add("is-poster");G.poster=true;G.one("progress",function(){U.remove("is-poster");G.poster=false})})}if(typeof z.splash==="string"){l.css(L,"background-image","url('"+z.splash+"')")}if(!y&&G.forcedSplash){l.css(L,"background-color","#555")}n.on(L,"click",".fp-toggle, .fp-play",function(){if(G.disabled){return}G.toggle()});n.on(L,"click",".fp-mute",function(){G.mute()});n.on(L,"click",".fp-fullscreen",function(){G.fullscreen()});n.on(L,"click",".fp-unload",function(){G.unload()});n.on(u,"slide",function(V){G.seeking=true;G.seek(V*G.video.duration)});n.on(B,"slide",function(V){G.volume(V)});var w=J("time");n.on(L,"click",".fp-time",function(){i(w).toggle("is-inverted")});T(S);G.on("shutdown",function(){n.off(u);n.off(B)})});h.exports.format=m},{"../common":1,"../flowplayer":18,"./slider":14,bean:20,"class-list":22}],18:[function(o,j,C){var x=o("extend-object"),f=o("is-function"),i=o("class-list"),l=o("bean"),t=o("./common"),h=o("./ext/events");var n=[],z=[],u=window.navigator.userAgent;var A=window.onbeforeunload;window.onbeforeunload=function(m){n.forEach(function(D){if(D.conf.splash){D.unload()}else{D.bind("error",function(){t.find(".flowplayer.is-error .fp-message").forEach(t.removeNode)})}});if(A){return A(m)}};var q=false;try{if(typeof window.localStorage=="object"){window.localStorage.flowplayerTestStorage="test";q=true}}catch(g){}var y=/Safari/.exec(navigator.userAgent)&&!/Chrome/.exec(navigator.userAgent),v=/(\d+\.\d+) Safari/.exec(navigator.userAgent),B=v?Number(v[1]):100;var k=j.exports=function(D,E,F){if(f(D)){return z.push(D)}if(typeof D=="number"||typeof D==="undefined"){return n[D||0]}if(D.nodeType){if(D.getAttribute("data-flowplayer-instance-id")!==null){return n[D.getAttribute("data-flowplayer-instance-id")]}if(!E){return}return w(D,E,F)}if(D.jquery){return k(D[0],E,F)}if(typeof D==="string"){var m=t.find(D)[0];return m&&k(m,E,F)}};x(k,{version:"6.0.5",engines:[],conf:{},set:function(m,D){if(typeof m==="string"){k.conf[m]=D}else{x(k.conf,m)}},support:{},defaults:{debug:q?!!localStorage.flowplayerDebug:false,disabled:false,fullscreen:window==window.top,keyboard:true,ratio:9/16,adaptiveRatio:false,rtmp:0,proxy:"best",splash:false,live:false,swf:"//releases.flowplayer.org/6.0.5/flowplayer.swf",swfHls:"//releases.flowplayer.org/6.0.5/flowplayerhls.swf",speeds:[0.25,0.5,1,1.5,2],tooltip:true,mouseoutTimeout:5000,volume:!q?1:localStorage.muted=="true"?0:!isNaN(localStorage.volume)?localStorage.volume||1:1,errors:["","Video loading aborted","Network error","Video not properly encoded","Video file not found","Unsupported video","Skin not found","SWF file not found","Subtitles not found","Invalid RTMP URL","Unsupported video format. Try installing Adobe Flash."],errorUrls:["","","","","","","","","","","http://get.adobe.com/flashplayer/"],playlist:[],hlsFix:y&&B<8},bean:l,common:t,extend:x});var r=0;var s=o("./ext/resolve");if(typeof window.jQuery!=="undefined"){var p=window.jQuery;p(function(){if(typeof p.fn.flowplayer=="function"){p('.flowplayer:has(video,script[type="application/json"])').flowplayer()}});var e=function(D){if(!D.length){return{}}var E=D.data()||{},m={};p.each(["autoplay","loop","preload","poster"],function(G,F){var H=D.attr(F);if(H!==undefined&&["autoplay","poster"].indexOf(F)!==-1){m[F]=H?H:true}else{if(H!==undefined){E[F]=H?H:true}}});E.subtitles=D.find("track").map(function(){var F=p(this);return{src:F.attr("src"),kind:F.attr("kind"),label:F.attr("label"),srclang:F.attr("srclang"),"default":F.prop("default")}}).get();E.sources=(new s()).sourcesFromVideoTag(D,p);return x(m,{clip:E})};p.fn.flowplayer=function(m,D){return this.each(function(){if(typeof m=="string"){m={swf:m}}if(f(m)){D=m;m={}}var F=p(this),I=F.find('script[type="application/json"]'),E=I.length?JSON.parse(I.text()):e(F.find("video")),G=p.extend({},m||{},E,F.data());var H=w(this,G,D);h.EVENTS.forEach(function(J){H.on(J+".jquery",function(K){F.trigger.call(F,K.type,K.detail&&K.detail.args)})});F.data("flowplayer",H)})}}function w(H,m,O){if(m&&m.embed){m.embed=x({},k.defaults.embed,m.embed)}var N=H,P=i(N),L=x({},k.defaults,k.conf,m),J={},G,M,D,Q=new s();P.add("is-loading");try{J=q?window.localStorage:J}catch(K){}var E=(N.currentStyle&&N.currentStyle.direction==="rtl")||(window.getComputedStyle&&window.getComputedStyle(N,null)!==null&&window.getComputedStyle(N,null).getPropertyValue("direction")==="rtl");if(E){P.add("is-rtl")}var I={conf:L,currentSpeed:1,volumeLevel:L.muted?0:typeof L.volume==="undefined"?J.volume*1:L.volume,video:{},disabled:false,finished:false,loading:false,muted:J.muted=="true"||L.muted,paused:false,playing:false,ready:false,splash:false,rtl:E,load:function(S,U){if(I.error||I.loading){return}I.video={};I.finished=false;S=S||L.clip;S=x({},Q.resolve(S,L.clip.sources));if(I.playing||I.engine){S.autoplay=true}var R=F(S);if(!R){return I.trigger("error",[I,{code:k.support.flashVideo?5:10}])}if(!R.engineName){throw new Error("engineName property of factory should be exposed")}if(!I.engine||R.engineName!==I.engine.engineName){I.ready=false;if(I.engine){I.engine.unload();I.conf.autoplay=true}M=I.engine=R(I,N);I.one("ready",function(){M.volume(I.volumeLevel)})}x(S,M.pick(S.sources.filter(function(V){if(!V.engine){return true}return V.engine===M.engineName})));if(S.src){var T=I.trigger("load",[I,S,M],true);if(!T.defaultPrevented){M.load(S);if(f(S)){U=S}if(U){I.one("ready",U)}}else{I.loading=false}}return I},pause:function(R){if(I.ready&&!I.seeking&&!I.loading){M.pause();I.one("pause",R)}return I},resume:function(){if(I.ready&&I.paused){M.resume();if(I.finished){I.trigger("resume",[I]);I.finished=false}}return I},toggle:function(){return I.ready?I.paused?I.resume():I.pause():I.load()},seek:function(S,U){if(I.ready&&!I.live){if(typeof S=="boolean"){var T=I.video.duration*0.1;S=I.video.time+(S?T:-T)}S=G=Math.min(Math.max(S,0),I.video.duration-0.1).toFixed(1);var R=I.trigger("beforeseek",[I,S],true);if(!R.defaultPrevented){M.seek(S);if(f(U)){I.one("seek",U)}}else{I.seeking=false;t.toggleClass(N,"is-seeking",I.seeking)}}return I},seekTo:function(R,S){var T=R===undefined?G:I.video.duration*0.1*R;return I.seek(T,S)},mute:function(R,S){if(R===undefined){R=!I.muted}if(!S){J.muted=I.muted=R;J.volume=!isNaN(J.volume)?J.volume:L.volume}I.volume(R?0:J.volume,true);I.trigger("mute",[I,R]);return I},volume:function(S,R){if(I.ready){S=Math.min(Math.max(S,0),1);if(!R){J.volume=S}M.volume(S)}return I},speed:function(R,S){if(I.ready){if(typeof R=="boolean"){R=L.speeds[L.speeds.indexOf(I.currentSpeed)+(R?1:-1)]||I.currentSpeed}M.speed(R);if(S){N.one("speed",S)}}return I},stop:function(){if(I.ready){I.pause();I.seek(0,function(){I.trigger("stop",[I])})}return I},unload:function(){if(!P.contains("is-embedding")){if(L.splash){I.trigger("unload",[I]);if(M){M.unload();I.engine=M=0}}else{I.stop()}}return I},shutdown:function(){I.unload();I.trigger("shutdown",[I]);l.off(N);delete n[N.getAttribute("data-flowplayer-instance-id")];N.removeAttribute("data-flowplayer-instance-id")},disable:function(R){if(R===undefined){R=!I.disabled}if(R!=I.disabled){I.disabled=R;I.trigger("disable",R)}return I}};I.conf=x(I.conf,L);h(I);var F=function(T){var R;var S=k.engines;if(L.engine){var U=S.filter(function(V){return V.engineName===L.engine})[0];if(U&&T.sources.some(function(V){if(V.engine&&V.engine!==U.engineName){return false}return U.canPlay(V.type,I.conf)})){return U}}if(L.enginePreference){S=k.engines.filter(function(V){return L.enginePreference.indexOf(V.engineName)>-1}).sort(function(W,V){return L.enginePreference.indexOf(W.engineName)-L.enginePreference.indexOf(V.engineName)})}T.sources.some(function(V){var W=S.filter(function(X){if(V.engine&&V.engine!==X.engineName){return false}return X.canPlay(V.type,I.conf)}).shift();if(W){R=W}return !!W});return R};if(!N.getAttribute("data-flowplayer-instance-id")){N.setAttribute("data-flowplayer-instance-id",r++);I.on("boot",function(){if(L.splash||P.contains("is-splash")||!k.support.firstframe){I.forcedSplash=!L.splash&&!P.contains("is-splash");I.splash=L.autoplay=true;if(!L.splash){L.splash=true}P.add("is-splash")}if(L.splash){t.find("video",N).forEach(t.removeNode)}if(L.live||P.contains("is-live")){I.live=L.live=true;P.add("is-live")}z.forEach(function(R){R(I,N)});n.push(I);if(L.splash){I.unload()}else{I.load()}if(L.disabled){I.disable()}I.one("ready",O)}).on("load",function(T,R,S){if(L.splash){t.find(".flowplayer.is-ready,.flowplayer.is-loading").forEach(function(W){var V=W.getAttribute("data-flowplayer-instance-id");if(V===N.getAttribute("data-flowplayer-instance-id")){return}var U=n[Number(V)];if(U&&U.conf.splash){U.unload()}})}P.add("is-loading");R.loading=true;if(typeof S.live!=="undefined"){t.toggleClass(N,"is-live",S.live);R.live=S.live}}).on("ready",function(T,R,S){S.time=0;R.video=S;P.remove("is-loading");R.loading=false;if(R.muted){R.mute(true,true)}else{R.volume(R.volumeLevel)}var U=R.conf.hlsFix&&/mpegurl/i.exec(S.type);t.toggleClass(N,"hls-fix",!!U)}).on("unload",function(R){P.remove("is-loading");I.loading=false}).on("ready unload",function(S){var R=S.type=="ready";t.toggleClass(N,"is-splash",!R);t.toggleClass(N,"is-ready",R);I.ready=R;I.splash=!R}).on("progress",function(T,R,S){R.video.time=S}).on("speed",function(S,R,T){R.currentSpeed=T}).on("volume",function(S,R,T){R.volumeLevel=Math.round(T*100)/100;if(!R.muted){J.volume=T}else{if(T){R.mute(false)}}}).on("beforeseek seek",function(R){I.seeking=R.type=="beforeseek";t.toggleClass(N,"is-seeking",I.seeking)}).on("ready pause resume unload finish stop",function(T,S,R){I.paused=/pause|finish|unload|stop/.test(T.type);I.paused=I.paused||T.type==="ready"&&!L.autoplay&&!I.playing;I.playing=!I.paused;t.toggleClass(N,"is-paused",I.paused);t.toggleClass(N,"is-playing",I.playing);if(!I.load.ed){I.pause()}}).on("finish",function(R){I.finished=true}).on("error",function(){})}I.trigger("boot",[I,N]);return I}},{"./common":1,"./ext/events":8,"./ext/resolve":13,bean:20,"class-list":22,"extend-object":26,"is-function":27}],19:[function(h,g,f){h("es5-shim");var e=g.exports=h("./flowplayer");h("./ext/support");h("./engine/embed");h("./engine/html5");h("./engine/flash");h("./ext/ui");h("./ext/keyboard");h("./ext/playlist");h("./ext/cuepoint");h("./ext/subtitle");h("./ext/analytics");h("./ext/embed");h("./ext/fullscreen");h("./ext/mobile");e(function(B,m){function F(i){var l=document.createElement("a");return l.href=i,H.hostname(l.hostname)}var q=function(l,n){var i=l.className.split(" ");-1===i.indexOf(n)&&(l.className+=" "+n)},j=function(i){return"none"!==window.getComputedStyle(i).display},v=B.conf,H=e.common,w=H.createElement,C=v.swf.indexOf("flowplayer.org")&&v.e&&m.getAttribute("data-origin"),k=C?F(C):H.hostname(),I=(document,v.key);"file:"==location.protocol&&(k="localhost"),B.load.ed=1,v.hostname=k,v.origin=C||location.href,C&&q(m,"is-embedded"),"string"==typeof I&&(I=I.split(/,\s*/));var A=function(l,i){var o=w("a",{href:i,className:"fp-brand"});o.innerHTML=l,H.find(".fp-controls",m)[0].appendChild(o)};if(I&&"function"==typeof key_check&&key_check(I,k)){if(v.logo){var D=H.find(".fp-player",m)[0],x=w("a",{className:"fp-logo"});C&&(x.href=C),v.embed&&v.embed.popup&&(x.target="_blank");var E=w("img",{src:v.logo});x.appendChild(E),(D||m).appendChild(x)}v.brand&&C||v.brand&&v.brand.showOnOrigin?A(v.brand.text||v.brand,C||location.href):H.addClass(m,"no-brand")}else{A("flowplayer","http://flowplayer.org");var x=w("a",{href:"http://flowplayer.org"});m.appendChild(x);var G=w("div",{className:"fp-context-menu"},'<ul><li class="copyright">© 2015</li><li><a href="http://flowplayer.org">About Flowplayer</a></li><li><a href="http://flowplayer.org/license">GPL based license</a></li></ul>'),z=window.location.href.indexOf("localhost"),D=H.find(".fp-player",m)[0];7!==z&&(D||m).appendChild(G),B.on("pause resume finish unload ready",function(u,r){H.removeClass(m,"no-brand");var J=-1;if(r.video.src){for(var o=[["org","flowplayer","drive"],["org","flowplayer","my"],["org","flowplayer","cdn"]],s=0;s<o.length&&(J=r.video.src.indexOf("://"+o[s].reverse().join(".")),-1===J);s++){}}if((4===J||5===J)&&H.addClass(m,"no-brand"),/pause|resume/.test(u.type)&&"flash"!=r.engine.engineName&&4!=J&&5!=J){var y={display:"block",position:"absolute",left:"16px",bottom:"46px",zIndex:99999,width:"100px",height:"20px",backgroundImage:"url("+[".png","logo","/",".net",".cloudfront","d32wqyuo10o653","//"].reverse().join("")+")"};for(var t in y){y.hasOwnProperty(t)&&(x.style[t]=y[t])}r.load.ed=j(x)&&(7===z||G.parentNode==m||G.parentNode==D)&&!H.hasClass(m,"no-brand"),r.load.ed||r.pause()}else{x.style.display="none"}})}})},{"./engine/embed":2,"./engine/flash":3,"./engine/html5":4,"./ext/analytics":5,"./ext/cuepoint":6,"./ext/embed":7,"./ext/fullscreen":9,"./ext/keyboard":10,"./ext/mobile":11,"./ext/playlist":12,"./ext/subtitle":15,"./ext/support":16,"./ext/ui":17,"./flowplayer":18,"es5-shim":25}],20:[function(g,f,e){
/*
* Bean - copyright (c) Jacob Thornton 2011-2012
* https://github.com/fat/bean
* MIT license
*/
(function(h,j,i){if(typeof f!="undefined"&&f.exports){f.exports=i()}else{if(typeof d=="function"&&d.amd){d(i)}else{j[h]=i()}}})("bean",this,function(s,V){s=s||"bean";V=V||this;var N=window,O=V[s],A=/[^\.]*(?=\..*)\.|.*/,J=/\..*/,q="addEventListener",h="removeEventListener",n=document||{},B=n.documentElement||{},x=B[q],C=x?q:"attachEvent",H={},u=Array.prototype.slice,P=function(W,X){return W.split(X||" ")},r=function(W){return typeof W=="string"},v=function(W){return typeof W=="function"},G="click dblclick mouseup mousedown contextmenu mousewheel mousemultiwheel DOMMouseScroll mouseover mouseout mousemove selectstart selectend keydown keypress keyup orientationchange focus blur change reset select submit load unload beforeunload resize move DOMContentLoaded readystatechange message error abort scroll ",j="show input invalid touchstart touchmove touchend touchcancel gesturestart gesturechange gestureend textinput readystatechange pageshow pagehide popstate hashchange offline online afterprint beforeprint dragstart dragenter dragover dragleave drag drop dragend loadstart progress suspend emptied stalled loadmetadata loadeddata canplay canplaythrough playing waiting seeking seeked ended durationchange timeupdate play pause ratechange volumechange cuechange checking noupdate downloading cached updateready obsolete ",T=(function(Y,X,W){for(W=0;W<X.length;W++){X[W]&&(Y[X[W]]=1)}return Y}({},P(G+(x?j:"")))),F=(function(){var X="compareDocumentPosition" in B?function(Z,Y){return Y.compareDocumentPosition&&(Y.compareDocumentPosition(Z)&16)===16}:"contains" in B?function(Z,Y){Y=Y.nodeType===9||Y===window?B:Y;return Y!==Z&&Y.contains(Z)}:function(Z,Y){while(Z=Z.parentNode){if(Z===Y){return 1}}return 0},W=function(Y){var Z=Y.relatedTarget;return !Z?Z==null:(Z!==this&&Z.prefix!=="xul"&&!/document/.test(this.toString())&&!X(Z,this))};return{mouseenter:{base:"mouseover",condition:W},mouseleave:{base:"mouseout",condition:W},mousewheel:{base:/Firefox/.test(navigator.userAgent)?"DOMMouseScroll":"mousewheel"}}}()),L=(function(){var af=P("altKey attrChange attrName bubbles cancelable ctrlKey currentTarget detail eventPhase getModifierState isTrusted metaKey relatedNode relatedTarget shiftKey srcElement target timeStamp type view which propertyName"),ad=af.concat(P("button buttons clientX clientY dataTransfer fromElement offsetX offsetY pageX pageY screenX screenY toElement")),X=ad.concat(P("wheelDelta wheelDeltaX wheelDeltaY wheelDeltaZ axis")),Z=af.concat(P("char charCode key keyCode keyIdentifier keyLocation location")),Y=af.concat(P("data")),ae=af.concat(P("touches targetTouches changedTouches scale rotation")),ah=af.concat(P("data origin source")),aa=af.concat(P("state")),ab=/over|out/,W=[{reg:/key/i,fix:function(ai,aj){aj.keyCode=ai.keyCode||ai.which;return Z}},{reg:/click|mouse(?!(.*wheel|scroll))|menu|drag|drop/i,fix:function(aj,ak,ai){ak.rightClick=aj.which===3||aj.button===2;ak.pos={x:0,y:0};if(aj.pageX||aj.pageY){ak.clientX=aj.pageX;ak.clientY=aj.pageY}else{if(aj.clientX||aj.clientY){ak.clientX=aj.clientX+n.body.scrollLeft+B.scrollLeft;ak.clientY=aj.clientY+n.body.scrollTop+B.scrollTop}}if(ab.test(ai)){ak.relatedTarget=aj.relatedTarget||aj[(ai=="mouseover"?"from":"to")+"Element"]}return ad}},{reg:/mouse.*(wheel|scroll)/i,fix:function(){return X}},{reg:/^text/i,fix:function(){return Y}},{reg:/^touch|^gesture/i,fix:function(){return ae}},{reg:/^message$/i,fix:function(){return ah}},{reg:/^popstate$/i,fix:function(){return aa}},{reg:/.*/,fix:function(){return af}}],ac={},ag=function(aj,am,ai){if(!arguments.length){return}aj=aj||((am.ownerDocument||am.document||am).parentWindow||N).event;this.originalEvent=aj;this.isNative=ai;this.isBean=true;if(!aj){return}var aq=aj.type,ao=aj.target||aj.srcElement,an,al,ak,ap,ar;this.target=ao&&ao.nodeType===3?ao.parentNode:ao;if(ai){ar=ac[aq];if(!ar){for(an=0,al=W.length;an<al;an++){if(W[an].reg.test(aq)){ac[aq]=ar=W[an].fix;break}}}ap=ar(aj,this,aq);for(an=ap.length;an--;){if(!((ak=ap[an]) in this)&&ak in aj){this[ak]=aj[ak]}}}};ag.prototype.preventDefault=function(){if(this.originalEvent.preventDefault){this.originalEvent.preventDefault()}else{this.originalEvent.returnValue=false}};ag.prototype.stopPropagation=function(){if(this.originalEvent.stopPropagation){this.originalEvent.stopPropagation()}else{this.originalEvent.cancelBubble=true}};ag.prototype.stop=function(){this.preventDefault();this.stopPropagation();this.stopped=true};ag.prototype.stopImmediatePropagation=function(){if(this.originalEvent.stopImmediatePropagation){this.originalEvent.stopImmediatePropagation()}this.isImmediatePropagationStopped=function(){return true}};ag.prototype.isImmediatePropagationStopped=function(){return this.originalEvent.isImmediatePropagationStopped&&this.originalEvent.isImmediatePropagationStopped()};ag.prototype.clone=function(aj){var ai=new ag(this,this.element,this.isNative);ai.currentTarget=aj;return ai};return ag}()),k=function(X,W){return !x&&!W&&(X===n||X===N)?B:X},p=(function(){var X=function(Z,ac,ae,Y){var ab=function(ag,af){return ac.apply(Z,Y?u.call(af,ag?0:1).concat(Y):af)},ad=function(ag,af){return ac.__beanDel?ac.__beanDel.ft(ag.target,Z):af},aa=ae?function(af){var ag=ad(af,this);if(ae.apply(ag,arguments)){if(af){af.currentTarget=ag}return ab(af,arguments)}}:function(af){if(ac.__beanDel){af=af.clone(ad(af))}return ab(af,arguments)};aa.__beanDel=ac.__beanDel;return aa},W=function(ac,ae,ag,aa,Z,ad,af){var ab=F[ae],Y;if(ae=="unload"){ag=z(i,ac,ae,ag,aa)}if(ab){if(ab.condition){ag=X(ac,ag,ab.condition,ad)}ae=ab.base||ae}this.isNative=Y=T[ae]&&!!ac[C];this.customType=!x&&!Y&&ae;this.element=ac;this.type=ae;this.original=aa;this.namespaces=Z;this.eventType=x||Y?ae:"propertychange";this.target=k(ac,Y);this[C]=!!this.target[C];this.root=af;this.handler=X(ac,ag,null,ad)};W.prototype.inNamespaces=function(aa){var Z,Y,ab=0;if(!aa){return true}if(!this.namespaces){return false}for(Z=aa.length;Z--;){for(Y=this.namespaces.length;Y--;){if(aa[Z]==this.namespaces[Y]){ab++}}}return aa.length===ab};W.prototype.matches=function(Z,Y,aa){return this.element===Z&&(!Y||this.original===Y)&&(!aa||this.handler===aa)};return W}()),R=(function(){var ab={},aa=function(ag,aj,ad,an,al,ak){var ai=al?"r":"$";if(!aj||aj=="*"){for(var ao in ab){if(ao.charAt(0)==ai){aa(ag,ao.substr(1),ad,an,al,ak)}}}else{var af=0,ae,ah=ab[ai+aj],am=ag=="*";if(!ah){return}for(ae=ah.length;af<ae;af++){if((am||ah[af].matches(ag,ad,an))&&!ak(ah[af],ah,af,aj)){return}}}},Z=function(ag,ah,af,ad){var ae,ai=ab[(ad?"r":"$")+ah];if(ai){for(ae=ai.length;ae--;){if(!ai[ae].root&&ai[ae].matches(ag,af,null)){return true}}}return false},Y=function(ag,ah,af,ae){var ad=[];aa(ag,ah,af,null,ae,function(ai){return ad.push(ai)});return ad},ac=function(af){var ad=!af.root&&!this.has(af.element,af.type,null,false),ae=(af.root?"r":"$")+af.type;(ab[ae]||(ab[ae]=[])).push(af);return ad},X=function(ad){aa(ad.element,ad.type,null,ad.handler,ad.root,function(af,ag,ae){ag.splice(ae,1);af.removed=true;if(ag.length===0){delete ab[(af.root?"r":"$")+af.type]}return false})},W=function(){var ae,ad=[];for(ae in ab){if(ae.charAt(0)=="$"){ad=ad.concat(ab[ae])}}return ad};return{has:Z,get:Y,put:ac,del:X,entries:W}}()),D,U=function(W){if(!arguments.length){D=n.querySelectorAll?function(X,Y){return Y.querySelectorAll(X)}:function(){throw new Error("Bean: No selector engine installed")}}else{D=W}},K=function(aa,Z){if(!x&&Z&&aa&&aa.propertyName!="_on"+Z){return}var Y=R.get(this,Z||aa.type,null,false),W=Y.length,X=0;aa=new L(aa,this,true);if(Z){aa.type=Z}for(;X<W&&!aa.isImmediatePropagationStopped();X++){if(!Y[X].removed){Y[X].handler.call(this,aa)}}},Q=x?function(W,X,Y){W[Y?q:h](X,K,false)}:function(W,X,aa,Z){var Y;if(aa){R.put(Y=new p(W,Z||X,function(ab){K.call(W,ab,Z)},K,null,null,true));if(Z&&W["_on"+Z]==null){W["_on"+Z]=0}Y.target.attachEvent("on"+Y.eventType,Y.handler)}else{Y=R.get(W,Z||X,K,true)[0];if(Y){Y.target.detachEvent("on"+Y.eventType,Y.handler);R.del(Y)}}},z=function(aa,W,Y,X,Z){return function(){X.apply(this,arguments);aa(W,Y,Z)}},i=function(aa,Z,ae,W){var ad=Z&&Z.replace(J,""),X=R.get(aa,ad,null,false),ac={},ab,Y;for(ab=0,Y=X.length;ab<Y;ab++){if((!ae||X[ab].original===ae)&&X[ab].inNamespaces(W)){R.del(X[ab]);if(!ac[X[ab].eventType]&&X[ab][C]){ac[X[ab].eventType]={t:X[ab].eventType,c:X[ab].type}}}}for(ab in ac){if(!R.has(aa,ac[ab].t,null,false)){Q(aa,ac[ab].t,false,ac[ab].c)}}},t=function(W,Y){var Z=function(ac,aa){var ab,ad=r(W)?D(W,aa):W;for(;ac&&ac!==aa;ac=ac.parentNode){for(ab=ad.length;ab--;){if(ad[ab]===ac){return ac}}}},X=function(ab){var aa=Z(ab.target,this);if(aa){Y.apply(aa,arguments)}};X.__beanDel={ft:Z,selector:W};return X},S=x?function(X,Z,Y){var W=n.createEvent(X?"HTMLEvents":"UIEvents");W[X?"initEvent":"initUIEvent"](Z,true,true,N,1);Y.dispatchEvent(W)}:function(W,Y,X){X=k(X,W);W?X.fireEvent("on"+Y,n.createEventObject()):X["_on"+Y]++},M=function(aa,W,ac){var Z=r(W),X,ab,ad,Y;if(Z&&W.indexOf(" ")>0){W=P(W);for(Y=W.length;Y--;){M(aa,W[Y],ac)}return aa}ab=Z&&W.replace(J,"");if(ab&&F[ab]){ab=F[ab].base}if(!W||Z){if(ad=Z&&W.replace(A,"")){ad=P(ad,".")}i(aa,ab,ac,ad)}else{if(v(W)){i(aa,null,W)}else{for(X in W){if(W.hasOwnProperty(X)){M(aa,X,W[X])}}}}return aa},E=function(X,ag,W,ae){var ad,ac,aa,Y,ab,af,Z;if(W===undefined&&typeof ag=="object"){for(ac in ag){if(ag.hasOwnProperty(ac)){E.call(this,X,ac,ag[ac])}}return}if(!v(W)){ad=ae;ab=u.call(arguments,4);ae=t(W,ad,D)}else{ab=u.call(arguments,3);ae=ad=W}aa=P(ag);if(this===H){ae=z(M,X,ag,ae,ad)}for(Y=aa.length;Y--;){Z=R.put(af=new p(X,aa[Y].replace(J,""),ae,ad,P(aa[Y].replace(A,""),"."),ab,false));if(af[C]&&Z){Q(X,af.eventType,true,af.customType)}}return X},m=function(Y,X,Z,W){return E.apply(null,!r(Z)?u.call(arguments):[Y,Z,X,W].concat(arguments.length>3?u.call(arguments,5):[]))},o=function(){return E.apply(H,arguments)},y=function(Z,ae,ac){var ab=P(ae),aa,Y,X,ad,W;for(aa=ab.length;aa--;){ae=ab[aa].replace(J,"");if(ad=ab[aa].replace(A,"")){ad=P(ad,".")}if(!ad&&!ac&&Z[C]){S(T[ae],ae,Z)}else{W=R.get(Z,ae,null,false);ac=[false].concat(ac);for(Y=0,X=W.length;Y<X;Y++){if(W[Y].inNamespaces(ad)){W[Y].handler.apply(Z,ac)}}}}return Z},w=function(aa,ad,ab){var X=R.get(ad,ab,null,false),W=X.length,Z=0,Y,ac;for(;Z<W;Z++){if(X[Z].original){Y=[aa,X[Z].type];if(ac=X[Z].handler.__beanDel){Y.push(ac.selector)}Y.push(X[Z].original);E.apply(null,Y)}}return aa},I={on:E,add:m,one:o,off:M,remove:M,clone:w,fire:y,Event:L,setSelectorEngine:U,noConflict:function(){V[s]=O;return this}};if(N.attachEvent){var l=function(){var X,W=R.entries();for(X in W){if(W[X].type&&W[X].type!=="unload"){M(W[X].element,W[X].type)}}N.detachEvent("onunload",l);N.CollectGarbage&&N.CollectGarbage()};N.attachEvent("onunload",l)}U();return I})},{}],21:[function(g,f,e){(function(h){
/* http://mths.be/punycode v1.2.4 by @mathias */
(function(H){var x=typeof e=="object"&&e;var P=typeof f=="object"&&f&&f.exports==x&&f;var G=typeof h=="object"&&h;if(G.global===G||G.window===G){H=G}var m,A=2147483647,t=36,v=1,y=26,q=38,u=700,w=72,p=128,N="-",D=/^xn--/,l=/[^ -~]/,i=/\x2E|\u3002|\uFF0E|\uFF61/g,z={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},o=t-v,J=Math.floor,F=String.fromCharCode,O;function I(Q){throw RangeError(z[Q])}function L(S,Q){var R=S.length;while(R--){S[R]=Q(S[R])}return S}function k(Q,R){return L(Q.split(i),R).join(".")}function s(T){var S=[],R=0,U=T.length,V,Q;while(R<U){V=T.charCodeAt(R++);if(V>=55296&&V<=56319&&R<U){Q=T.charCodeAt(R++);if((Q&64512)==56320){S.push(((V&1023)<<10)+(Q&1023)+65536)}else{S.push(V);R--}}else{S.push(V)}}return S}function K(Q){return L(Q,function(S){var R="";if(S>65535){S-=65536;R+=F(S>>>10&1023|55296);S=56320|S&1023}R+=F(S);return R}).join("")}function n(Q){if(Q-48<10){return Q-22}if(Q-65<26){return Q-65}if(Q-97<26){return Q-97}return t}function E(R,Q){return R+22+75*(R<26)-((Q!=0)<<5)}function j(T,R,S){var Q=0;T=S?J(T/u):T>>1;T+=J(T/R);for(;T>o*y>>1;Q+=t){T=J(T/o)}return J(Q+(o+1)*T/(T+q))}function C(ac){var S=[],V=ac.length,X,Y=0,R=p,Z=w,U,W,aa,Q,ad,T,ab,af,ae;U=ac.lastIndexOf(N);if(U<0){U=0}for(W=0;W<U;++W){if(ac.charCodeAt(W)>=128){I("not-basic")}S.push(ac.charCodeAt(W))}for(aa=U>0?U+1:0;aa<V;){for(Q=Y,ad=1,T=t;;T+=t){if(aa>=V){I("invalid-input")}ab=n(ac.charCodeAt(aa++));if(ab>=t||ab>J((A-Y)/ad)){I("overflow")}Y+=ab*ad;af=T<=Z?v:(T>=Z+y?y:T-Z);if(ab<af){break}ae=t-af;if(ad>J(A/ae)){I("overflow")}ad*=ae}X=S.length+1;Z=j(Y-Q,X,Q==0);if(J(Y/X)>A-R){I("overflow")}R+=J(Y/X);Y%=X;S.splice(Y++,0,R)}return K(S)}function r(ac){var T,ae,Z,R,aa,Y,U,Q,X,ag,ad,S=[],W,V,af,ab;ac=s(ac);W=ac.length;T=p;ae=0;aa=w;for(Y=0;Y<W;++Y){ad=ac[Y];if(ad<128){S.push(F(ad))}}Z=R=S.length;if(R){S.push(N)}while(Z<W){for(U=A,Y=0;Y<W;++Y){ad=ac[Y];if(ad>=T&&ad<U){U=ad}}V=Z+1;if(U-T>J((A-ae)/V)){I("overflow")}ae+=(U-T)*V;T=U;for(Y=0;Y<W;++Y){ad=ac[Y];if(ad<T&&++ae>A){I("overflow")}if(ad==T){for(Q=ae,X=t;;X+=t){ag=X<=aa?v:(X>=aa+y?y:X-aa);if(Q<ag){break}ab=Q-ag;af=t-ag;S.push(F(E(ag+ab%af,0)));Q=J(ab/af)}S.push(F(E(Q,0)));aa=j(ae,V,Z==R);ae=0;++Z}}++ae;++T}return S.join("")}function B(Q){return k(Q,function(R){return D.test(R)?C(R.slice(4).toLowerCase()):R})}function M(Q){return k(Q,function(R){return l.test(R)?"xn--"+r(R):R})}m={version:"1.2.4",ucs2:{decode:s,encode:K},decode:C,encode:r,toASCII:M,toUnicode:B};if(typeof d=="function"&&typeof d.amd=="object"&&d.amd){d("punycode",function(){return m})}else{if(x&&!x.nodeType){if(P){P.exports=m}else{for(O in m){m.hasOwnProperty(O)&&(x[O]=m[O])}}}else{H.punycode=m}}}(this))}).call(this,typeof global!=="undefined"?global:typeof self!=="undefined"?self:typeof window!=="undefined"?window:{})},{}],22:[function(j,h,e){var g=j("indexof");h.exports=k;function k(n){var t=n.classList;if(t){return t}var l={add:v,remove:p,contains:o,toggle:r,toString:s,length:0,item:u};return l;function v(w){var x=m();if(g(x,w)>-1){return}x.push(w);q(x)}function p(x){var y=m(),w=g(y,x);if(w===-1){return}y.splice(w,1);q(y)}function o(w){return g(m(),w)>-1}function r(w){if(o(w)){p(w);return false}else{v(w);return true}}function s(){return n.className}function u(w){var x=m();return x[w]||null}function m(){var w=n.className;return i(w.split(" "),f)}function q(y){var x=y.length;n.className=y.join(" ");l.length=x;for(var w=0;w<y.length;w++){l[w]=y[w]}delete y[x]}}function i(l,o){var m=[];for(var n=0;n<l.length;n++){if(o(l[n])){m.push(l[n])}}return m}function f(l){return !!l}},{indexof:23}],23:[function(h,f,e){var g=[].indexOf;f.exports=function(j,l){if(g){return j.indexOf(l)}for(var k=0;k<j.length;++k){if(j[k]===l){return k}}return -1}},{}],24:[function(h,g,f){function e(j,l,k,i){k=window.getComputedStyle;i=k?k(j):j.currentStyle;if(i){return i[l.replace(/-(\w)/gi,function(n,m){return m.toUpperCase()})]}}g.exports=e},{}],25:[function(g,f,e){
/*
* https://github.com/es-shims/es5-shim
* @license es5-shim Copyright 2009-2015 by contributors, MIT License
* see https://github.com/es-shims/es5-shim/blob/master/LICENSE
*/
(function(h,i){if(typeof d==="function"&&d.amd){d(i)}else{if(typeof e==="object"){f.exports=i()}else{h.returnExports=i()}}}(this,function(){var ax=Array;var o=ax.prototype;var K=Object;var br=K.prototype;var r=Function.prototype;var bD=String;var aM=bD.prototype;var aN=Number;var at=aN.prototype;var F=o.slice;var M=o.splice;var am=o.push;var bO=o.unshift;var bL=o.concat;var p=r.call;var bo=r.apply;var ae=Math.max;var a3=Math.min;var l=br.toString;var Q=typeof Symbol==="function"&&typeof Symbol.toStringTag==="symbol";var ah;var aA=Function.prototype.toString,az=function az(bS){try{aA.call(bS);return true}catch(bT){return false}},aK="[object Function]",aO="[object GeneratorFunction]";ah=function ah(bS){if(typeof bS!=="function"){return false}if(Q){return az(bS)}var bT=l.call(bS);return bT===aK||bT===aO};var H;var bs=RegExp.prototype.exec,P=function P(bS){try{bs.call(bS);return true}catch(bT){return false}},aj="[object RegExp]";H=function H(bS){if(typeof bS!=="object"){return false}return Q?P(bS):l.call(bS)===aj};var bk;var aq=String.prototype.valueOf,h=function h(bS){try{aq.call(bS);return true}catch(bT){return false}},a1="[object String]";bk=function bk(bS){if(typeof bS==="string"){return true}if(typeof bS!=="object"){return false}return Q?h(bS):l.call(bS)===a1};var bI=K.defineProperty&&(function(){try{var bU={};K.defineProperty(bU,"x",{enumerable:false,value:bU});for(var bS in bU){return false}return bU.x===bU}catch(bT){return false}}());var u=(function(bU){var bS;if(bI){bS=function(bW,bV,bY,bX){if(!bX&&(bV in bW)){return}K.defineProperty(bW,bV,{configurable:true,enumerable:false,writable:true,value:bY})}}else{bS=function(bW,bV,bY,bX){if(!bX&&(bV in bW)){return}bW[bV]=bY}}return function bT(bW,bY,bX){for(var bV in bY){if(bU.call(bY,bV)){bS(bW,bV,bY[bV],bX)}}}}(br.hasOwnProperty));var bz=function bz(bS){var bT=typeof bS;return bS===null||(bT!=="object"&&bT!=="function")};var ab=aN.isNaN||function(bS){return bS!==bS};var L={ToInteger:function a0(bS){var bT=+bS;if(ab(bT)){bT=0}else{if(bT!==0&&bT!==(1/0)&&bT!==-(1/0)){bT=(bT>0||-1)*Math.floor(Math.abs(bT))}}return bT},ToPrimitive:function bt(bT){var bV,bS,bU;if(bz(bT)){return bT}bS=bT.valueOf;if(ah(bS)){bV=bS.call(bT);if(bz(bV)){return bV}}bU=bT.toString;if(ah(bU)){bV=bU.call(bT);if(bz(bV)){return bV}}throw new TypeError()},ToObject:function(bS){if(bS==null){throw new TypeError("can't convert "+bS+" to object")}return K(bS)},ToUint32:function aJ(bS){return bS>>>0}};var ar=function ar(){};u(r,{bind:function aQ(bX){var bY=this;if(!ah(bY)){throw new TypeError("Function.prototype.bind called on incompatible "+bY)}var bU=F.call(arguments,1);var bW;var bT=function(){if(this instanceof bW){var b0=bY.apply(this,bL.call(bU,F.call(arguments)));if(K(b0)===b0){return b0}return this}else{return bY.apply(bX,bL.call(bU,F.call(arguments)))}};var bS=ae(0,bY.length-bU.length);var bZ=[];for(var bV=0;bV<bS;bV++){am.call(bZ,"$"+bV)}bW=Function("binder","return function ("+bZ.join(",")+"){ return binder.apply(this, arguments); }")(bT);if(bY.prototype){ar.prototype=bY.prototype;bW.prototype=new ar();ar.prototype=null}return bW}});var R=p.bind(br.hasOwnProperty);var ao=p.bind(br.toString);var Y=p.bind(F);var bv=bo.bind(F);var aU=p.bind(aM.slice);var av=p.bind(aM.split);var v=p.bind(aM.indexOf);var B=p.bind(am);var bn=p.bind(br.propertyIsEnumerable);var G=p.bind(o.sort);var ay=ax.isArray||function ay(bS){return ao(bS)==="[object Array]"};var bA=[].unshift(0)!==1;u(o,{unshift:function(){bO.apply(this,arguments);return this.length}},bA);u(ax,{isArray:ay});var aH=K("a");var bM=aH[0]!=="a"||!(0 in aH);var X=function bp(bU){var bT=true;var bS=true;if(bU){bU.call("foo",function(bV,bX,bW){if(typeof bW!=="object"){bT=false}});bU.call([1],function(){bS=typeof this==="string"},"x")}return !!bU&&bT&&bS};u(o,{forEach:function au(bS){var bV=L.ToObject(this);var bT=bM&&bk(this)?av(this,""):bV;var bW=-1;var bX=L.ToUint32(bT.length);var bU;if(arguments.length>1){bU=arguments[1]}if(!ah(bS)){throw new TypeError("Array.prototype.forEach callback must be a function")}while(++bW<bX){if(bW in bT){if(typeof bU==="undefined"){bS(bT[bW],bW,bV)}else{bS.call(bU,bT[bW],bW,bV)}}}}},!X(o.forEach));u(o,{map:function ai(bT){var bW=L.ToObject(this);var bU=bM&&bk(this)?av(this,""):bW;var bY=L.ToUint32(bU.length);var bS=ax(bY);var bV;if(arguments.length>1){bV=arguments[1]}if(!ah(bT)){throw new TypeError("Array.prototype.map callback must be a function")}for(var bX=0;bX<bY;bX++){if(bX in bU){if(typeof bV==="undefined"){bS[bX]=bT(bU[bX],bX,bW)}else{bS[bX]=bT.call(bV,bU[bX],bX,bW)}}}return bS}},!X(o.map));u(o,{filter:function aF(bT){var bW=L.ToObject(this);var bU=bM&&bk(this)?av(this,""):bW;var bY=L.ToUint32(bU.length);var bS=[];var bZ;var bV;if(arguments.length>1){bV=arguments[1]}if(!ah(bT)){throw new TypeError("Array.prototype.filter callback must be a function")}for(var bX=0;bX<bY;bX++){if(bX in bU){bZ=bU[bX];if(typeof bV==="undefined"?bT(bZ,bX,bW):bT.call(bV,bZ,bX,bW)){B(bS,bZ)}}}return bS}},!X(o.filter));u(o,{every:function D(bS){var bV=L.ToObject(this);var bT=bM&&bk(this)?av(this,""):bV;var bX=L.ToUint32(bT.length);var bU;if(arguments.length>1){bU=arguments[1]}if(!ah(bS)){throw new TypeError("Array.prototype.every callback must be a function")}for(var bW=0;bW<bX;bW++){if(bW in bT&&!(typeof bU==="undefined"?bS(bT[bW],bW,bV):bS.call(bU,bT[bW],bW,bV))){return false}}return true}},!X(o.every));u(o,{some:function aa(bS){var bV=L.ToObject(this);var bT=bM&&bk(this)?av(this,""):bV;var bX=L.ToUint32(bT.length);var bU;if(arguments.length>1){bU=arguments[1]}if(!ah(bS)){throw new TypeError("Array.prototype.some callback must be a function")}for(var bW=0;bW<bX;bW++){if(bW in bT&&(typeof bU==="undefined"?bS(bT[bW],bW,bV):bS.call(bU,bT[bW],bW,bV))){return true}}return false}},!X(o.some));var S=false;if(o.reduce){S=typeof o.reduce.call("es5",function(bT,bU,bS,bV){return bV})==="object"}u(o,{reduce:function a9(bT){var bV=L.ToObject(this);var bU=bM&&bk(this)?av(this,""):bV;var bX=L.ToUint32(bU.length);if(!ah(bT)){throw new TypeError("Array.prototype.reduce callback must be a function")}if(bX===0&&arguments.length===1){throw new TypeError("reduce of empty array with no initial value")}var bW=0;var bS;if(arguments.length>=2){bS=arguments[1]}else{do{if(bW in bU){bS=bU[bW++];break}if(++bW>=bX){throw new TypeError("reduce of empty array with no initial value")}}while(true)}for(;bW<bX;bW++){if(bW in bU){bS=bT(bS,bU[bW],bW,bV)}}return bS}},!S);var aL=false;if(o.reduceRight){aL=typeof o.reduceRight.call("es5",function(bT,bU,bS,bV){return bV})==="object"}u(o,{reduceRight:function by(bT){var bV=L.ToObject(this);var bU=bM&&bk(this)?av(this,""):bV;var bX=L.ToUint32(bU.length);if(!ah(bT)){throw new TypeError("Array.prototype.reduceRight callback must be a function")}if(bX===0&&arguments.length===1){throw new TypeError("reduceRight of empty array with no initial value")}var bS;var bW=bX-1;if(arguments.length>=2){bS=arguments[1]}else{do{if(bW in bU){bS=bU[bW--];break}if(--bW<0){throw new TypeError("reduceRight of empty array with no initial value")}}while(true)}if(bW<0){return bS}do{if(bW in bU){bS=bT(bS,bU[bW],bW,bV)}}while(bW--);return bS}},!aL);var bc=o.indexOf&&[0,1].indexOf(1,2)!==-1;u(o,{indexOf:function bK(bT){var bS=bM&&bk(this)?av(this,""):L.ToObject(this);var bV=L.ToUint32(bS.length);if(bV===0){return -1}var bU=0;if(arguments.length>1){bU=L.ToInteger(arguments[1])}bU=bU>=0?bU:ae(0,bV+bU);for(;bU<bV;bU++){if(bU in bS&&bS[bU]===bT){return bU}}return -1}},bc);var aB=o.lastIndexOf&&[0,1].lastIndexOf(0,-3)!==-1;u(o,{lastIndexOf:function bQ(bT){var bS=bM&&bk(this)?av(this,""):L.ToObject(this);var bV=L.ToUint32(bS.length);if(bV===0){return -1}var bU=bV-1;if(arguments.length>1){bU=a3(bU,L.ToInteger(arguments[1]))}bU=bU>=0?bU:bV-Math.abs(bU);for(;bU>=0;bU--){if(bU in bS&&bT===bS[bU]){return bU}}return -1}},aB);var N=(function(){var bT=[1,2];var bS=bT.splice();return bT.length===2&&ay(bS)&&bS.length===0}());u(o,{splice:function a7(bT,bS){if(arguments.length===0){return[]}else{return M.apply(this,arguments)}}},!N);var bi=(function(){var bS={};o.splice.call(bS,0,0,1);return bS.length===1}());u(o,{splice:function a7(bU,bT){if(arguments.length===0){return[]}var bS=arguments;this.length=ae(L.ToInteger(this.length),0);if(arguments.length>0&&typeof bT!=="number"){bS=Y(arguments);if(bS.length<2){B(bS,this.length-bU)}else{bS[1]=L.ToInteger(bT)}}return M.apply(this,bS)}},!bi);var aE=(function(){var bS=new ax(100000);bS[8]="x";bS.splice(1,1);return bS.indexOf("x")===7}());var i=(function(){var bT=256;var bS=[];bS[bT]="a";bS.splice(bT+1,0,"b");return bS[bT]==="a"}());u(o,{splice:function a7(bU,bV){var b0=L.ToObject(this);var bW=[];var b2=L.ToUint32(b0.length);var b1=L.ToInteger(bU);var bT=b1<0?ae((b2+b1),0):a3(b1,b2);var bX=a3(ae(L.ToInteger(bV),0),b2-bT);var bY=0;var b5;while(bY<bX){b5=bD(bT+bY);if(R(b0,b5)){bW[bY]=b0[b5]}bY+=1}var b3=Y(arguments,2);var bS=b3.length;var b4;if(bS<bX){bY=bT;while(bY<(b2-bX)){b5=bD(bY+bX);b4=bD(bY+bS);if(R(b0,b5)){b0[b4]=b0[b5]}else{delete b0[b4]}bY+=1}bY=b2;while(bY>(b2-bX+bS)){delete b0[bY-1];bY-=1}}else{if(bS>bX){bY=b2-bX;while(bY>bT){b5=bD(bY+bX-1);b4=bD(bY+bS-1);if(R(b0,b5)){b0[b4]=b0[b5]}else{delete b0[b4]}bY-=1}}}bY=bT;for(var bZ=0;bZ<b3.length;++bZ){b0[bY]=b3[bZ];bY+=1}b0.length=b2-bX+bS;return bW}},!aE||!i);var T=o.join;var a8;try{a8=Array.prototype.join.call("123",",")!=="1,2,3"}catch(ba){a8=true}if(a8){u(o,{join:function aW(bT){var bS=typeof bT==="undefined"?",":bT;return T.call(bk(this)?av(this,""):this,bS)}},a8)}var V=[1,2].join(undefined)!=="1,2";if(V){u(o,{join:function aW(bT){var bS=typeof bT==="undefined"?",":bT;return T.call(this,bS)}},V)}var aS=function B(bT){var bU=L.ToObject(this);var bV=L.ToUint32(bU.length);var bS=0;while(bS<arguments.length){bU[bV+bS]=arguments[bS];bS+=1}bU.length=bV+bS;return bV+bS};var aI=(function(){var bT={};var bS=Array.prototype.push.call(bT,undefined);return bS!==1||bT.length!==1||typeof bT[0]!=="undefined"||!R(bT,0)}());u(o,{push:function B(bS){if(ay(this)){return am.apply(this,arguments)}return aS.apply(this,arguments)}},aI);var I=(function(){var bT=[];var bS=bT.push(undefined);return bS!==1||bT.length!==1||typeof bT[0]!=="undefined"||!R(bT,0)}());u(o,{push:aS},I);u(o,{slice:function(bU,bT){var bS=bk(this)?av(this,""):this;return bv(bS,arguments)}},bM);var j=(function(){try{[1,2].sort(null);[1,2].sort({});return true}catch(bS){}return false}());var O=(function(){try{[1,2].sort(/a/);return false}catch(bS){}return true}());var bd=(function(){try{[1,2].sort(undefined);return true}catch(bS){}return false}());u(o,{sort:function bx(bS){if(typeof bS==="undefined"){return G(this)}if(!ah(bS)){throw new TypeError("Array.prototype.sort callback must be a function")}return G(this,bS)}},j||!bd||!O);var bR=!({toString:null}).propertyIsEnumerable("toString");var aC=function(){}.propertyIsEnumerable("prototype");var s=!R("x","0");var x=function(bT){var bS=bT.constructor;return bS&&bS.prototype===bT};var k={$window:true,$console:true,$parent:true,$self:true,$frame:true,$frames:true,$frameElement:true,$webkitIndexedDB:true,$webkitStorageInfo:true,$external:true};var aX=(function(){if(typeof window==="undefined"){return false}for(var bS in window){try{if(!k["$"+bS]&&R(window,bS)&&window[bS]!==null&&typeof window[bS]==="object"){x(window[bS])}}catch(bT){return true}}return false}());var bC=function(bS){if(typeof window==="undefined"||!aX){return x(bS)}try{return x(bS)}catch(bT){return false}};var y=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"];var ad=y.length;var z=function W(bS){return ao(bS)==="[object Arguments]"};var bG=function W(bS){return bS!==null&&typeof bS==="object"&&typeof bS.length==="number"&&bS.length>=0&&!ay(bS)&&ah(bS.callee)};var W=z(arguments)?z:bG;u(K,{keys:function aY(bV){var b0=ah(bV);var bT=W(bV);var b2=bV!==null&&typeof bV==="object";var b1=b2&&bk(bV);if(!b2&&!b0&&!bT){throw new TypeError("Object.keys called on a non-object")}var bY=[];var b3=aC&&b0;if((b1&&s)||bT){for(var bZ=0;bZ<bV.length;++bZ){B(bY,bD(bZ))}}if(!bT){for(var bS in bV){if(!(b3&&bS==="prototype")&&R(bV,bS)){B(bY,bD(bS))}}}if(bR){var bU=bC(bV);for(var bX=0;bX<ad;bX++){var bW=y[bX];if(!(bU&&bW==="constructor")&&R(bV,bW)){B(bY,bW)}}}return bY}});var bH=K.keys&&(function(){return K.keys(arguments).length===2}(1,2));var bw=K.keys&&(function(){var bS=K.keys(arguments);return arguments.length!==1||bS.length!==1||bS[0]!==1}(1));var U=K.keys;u(K,{keys:function aY(bS){if(W(bS)){return U(Y(bS))}else{return U(bS)}}},!bH||bw);var ap=-62198755200000;var bF="-000001";var A=Date.prototype.toISOString&&new Date(ap).toISOString().indexOf(bF)===-1;var bj=Date.prototype.toISOString&&new Date(-1).toISOString()!=="1969-12-31T23:59:59.999Z";u(Date.prototype,{toISOString:function a4(){var bS,bU,bV,bT,bW;if(!isFinite(this)){throw new RangeError("Date.prototype.toISOString called on non-finite value.")}bT=this.getUTCFullYear();bW=this.getUTCMonth();bT+=Math.floor(bW/12);bW=(bW%12+12)%12;bS=[bW+1,this.getUTCDate(),this.getUTCHours(),this.getUTCMinutes(),this.getUTCSeconds()];bT=((bT<0?"-":(bT>9999?"+":""))+aU("00000"+Math.abs(bT),(0<=bT&&bT<=9999)?-4:-6));bU=bS.length;while(bU--){bV=bS[bU];if(bV<10){bS[bU]="0"+bV}}return(bT+"-"+Y(bS,0,2).join("-")+"T"+Y(bS,2).join(":")+"."+aU("000"+this.getUTCMilliseconds(),-3)+"Z")}},A||bj);var bh=(function(){try{return Date.prototype.toJSON&&new Date(NaN).toJSON()===null&&new Date(ap).toJSON().indexOf(bF)!==-1&&Date.prototype.toJSON.call({toISOString:function(){return true}})}catch(bS){return false}}());if(!bh){Date.prototype.toJSON=function bg(bU){var bV=K(this);var bT=L.ToPrimitive(bV);if(typeof bT==="number"&&!isFinite(bT)){return null}var bS=bV.toISOString;if(!ah(bS)){throw new TypeError("toISOString property is not callable")}return bS.call(bV)}}var bb=Date.parse("+033658-09-27T01:46:40.000Z")===1000000000000000;var bu=!isNaN(Date.parse("2012-04-04T24:00:00.500Z"))||!isNaN(Date.parse("2012-11-31T23:59:59.000Z"))||!isNaN(Date.parse("2012-12-31T23:59:60.000Z"));var af=isNaN(Date.parse("2000-01-01T00:00:00.000Z"));if(af||bu||!bb){var al=Math.pow(2,31)-1;var bP=ab(new Date(1970,0,1,0,0,0,al+1).getTime());Date=(function(bU){var bZ=function bX(b5,ca,b2,b9,b8,ce,b4){var b6=arguments.length;var b7;if(this instanceof bU){var cb=ce;var b3=b4;if(bP&&b6>=7&&b4>al){var cd=Math.floor(b4/al)*al;var cc=Math.floor(cd/1000);cb+=cc;b3-=cc*1000}b7=b6===1&&bD(b5)===b5?new bU(bZ.parse(b5)):b6>=7?new bU(b5,ca,b2,b9,b8,cb,b3):b6>=6?new bU(b5,ca,b2,b9,b8,cb):b6>=5?new bU(b5,ca,b2,b9,b8):b6>=4?new bU(b5,ca,b2,b9):b6>=3?new bU(b5,ca,b2):b6>=2?new bU(b5,ca):b6>=1?new bU(b5):new bU()}else{b7=bU.apply(this,arguments)}if(!bz(b7)){u(b7,{constructor:bZ},true)}return b7};var b1=new RegExp("^(\\d{4}|[+-]\\d{6})(?:-(\\d{2})(?:-(\\d{2})(?:T(\\d{2}):(\\d{2})(?::(\\d{2})(?:(\\.\\d{1,}))?)?(Z|(?:([-+])(\\d{2}):(\\d{2})))?)?)?)?$");var bS=[0,31,59,90,120,151,181,212,243,273,304,334,365];var bY=function bY(b3,b4){var b2=b4>1?1:0;return(bS[b4]+Math.floor((b3-1969+b2)/4)-Math.floor((b3-1901+b2)/100)+Math.floor((b3-1601+b2)/400)+365*(b3-1970))};var bV=function bV(b4){var b5=0;var b2=b4;if(bP&&b2>al){var b6=Math.floor(b2/al)*al;var b3=Math.floor(b6/1000);b5+=b3;b2-=b3*1000}return aN(new bU(1970,0,1,0,0,b5,b2))};for(var b0 in bU){if(R(bU,b0)){bZ[b0]=bU[b0]}}u(bZ,{now:bU.now,UTC:bU.UTC},true);bZ.prototype=bU.prototype;u(bZ.prototype,{constructor:bZ},true);var bT=function bW(ca){var b9=b1.exec(ca);if(b9){var cd=aN(b9[1]),cc=aN(b9[2]||1)-1,ce=aN(b9[3]||1)-1,b6=aN(b9[4]||0),b5=aN(b9[5]||0),b2=aN(b9[6]||0),cg=Math.floor(aN(b9[7]||0)*1000),b4=Boolean(b9[4]&&!b9[8]),b8=b9[9]==="-"?1:-1,b3=aN(b9[10]||0),b7=aN(b9[11]||0),cf;var cb=b5>0||b2>0||cg>0;if(b6<(cb?24:25)&&b5<60&&b2<60&&cg<1000&&cc>-1&&cc<12&&b3<24&&b7<60&&ce>-1&&ce<(bY(cd,cc+1)-bY(cd,cc))){cf=((bY(cd,cc)+ce)*24+b6+b3*b8)*60;cf=((cf+b5+b7*b8)*60+b2)*1000+cg;if(b4){cf=bV(cf)}if(-8640000000000000<=cf&&cf<=8640000000000000){return cf}}return NaN}return bU.parse.apply(this,arguments)};u(bZ,{parse:bT});return bZ}(Date))}if(!Date.now){Date.now=function a2(){return new Date().getTime()}}var bN=at.toFixed&&((0.00008).toFixed(3)!=="0.000"||(0.9).toFixed(0)!=="1"||(1.255).toFixed(2)!=="1.25"||(1000000000000000100).toFixed(0)!=="1000000000000000128");var a5={base:10000000,size:6,data:[0,0,0,0,0,0],multiply:function bJ(bV,bU){var bT=-1;var bS=bU;while(++bT<a5.size){bS+=bV*a5.data[bT];a5.data[bT]=bS%a5.base;bS=Math.floor(bS/a5.base)}},divide:function bE(bU){var bS=a5.size,bT=0;while(--bS>=0){bT+=a5.data[bS];a5.data[bS]=Math.floor(bT/bU);bT=(bT%bU)*a5.base}},numToString:function J(){var bT=a5.size;var bU="";while(--bT>=0){if(bU!==""||bT===0||a5.data[bT]!==0){var bS=bD(a5.data[bT]);if(bU===""){bU=bS}else{bU+=aU("0000000",0,7-bS.length)+bS}}}return bU},pow:function aZ(bS,bU,bT){return(bU===0?bT:(bU%2===1?aZ(bS,bU-1,bT*bS):aZ(bS*bS,bU/2,bT)))},log:function be(bS){var bU=0;var bT=bS;while(bT>=4096){bU+=12;bT/=4096}while(bT>=2){bU+=1;bT/=2}return bU}};var a6=function aw(bZ){var bV,bY,b0,bS,bW,bX,bU,bT;bV=aN(bZ);bV=ab(bV)?0:Math.floor(bV);if(bV<0||bV>20){throw new RangeError("Number.toFixed called with invalid number of decimals")}bY=aN(this);if(ab(bY)){return"NaN"}if(bY<=-1e+21||bY>=1e+21){return bD(bY)}b0="";if(bY<0){b0="-";bY=-bY}bS="0";if(bY>1e-21){bW=a5.log(bY*a5.pow(2,69,1))-69;bX=(bW<0?bY*a5.pow(2,-bW,1):bY/a5.pow(2,bW,1));bX*=4503599627370496;bW=52-bW;if(bW>0){a5.multiply(0,bX);bU=bV;while(bU>=7){a5.multiply(10000000,0);bU-=7}a5.multiply(a5.pow(10,bU,1),0);bU=bW-1;while(bU>=23){a5.divide(1<<23);bU-=23}a5.divide(1<<bU);a5.multiply(1,1);a5.divide(2);bS=a5.numToString()}else{a5.multiply(0,bX);a5.multiply(1<<(-bW),0);bS=a5.numToString()+aU("0.00000000000000000000",2,2+bV)}}if(bV>0){bT=bS.length;if(bT<=bV){bS=b0+aU("0.0000000000000000000",0,bV-bT+2)+bS}else{bS=b0+aU(bS,0,bT-bV)+"."+aU(bS,bT-bV)}}else{bS=b0+bS}return bS};u(at,{toFixed:a6},bN);var w=(function(){try{return 1.toPrecision(undefined)==="1"}catch(bS){return true}}());var n=at.toPrecision;u(at,{toPrecision:function E(bS){return typeof bS==="undefined"?n.call(this):n.call(this,bS)}},w);if("ab".split(/(?:ab)*/).length!==2||".".split(/(.?)(.?)/).length!==4||"tesst".split(/(s)*/)[1]==="t"||"test".split(/(?:)/,-1).length!==4||"".split(/.?/).length||".".split(/()()/).length>1){(function(){var bS=typeof(/()??/).exec("")[1]==="undefined";var bT=Math.pow(2,32)-1;aM.split=function(b0,bY){var b3=String(this);if(typeof b0==="undefined"&&bY===0){return[]}if(!H(b0)){return av(this,b0,bY)}var bW=[];var bX=(b0.ignoreCase?"i":"")+(b0.multiline?"m":"")+(b0.unicode?"u":"")+(b0.sticky?"y":""),bU=0,bV,b1,b2,b4;var bZ=new RegExp(b0.source,bX+"g");if(!bS){bV=new RegExp("^"+bZ.source+"$(?!\\s)",bX)}var b5=typeof bY==="undefined"?bT:L.ToUint32(bY);b1=bZ.exec(b3);while(b1){b2=b1.index+b1[0].length;if(b2>bU){B(bW,aU(b3,bU,b1.index));if(!bS&&b1.length>1){b1[0].replace(bV,function(){for(var b6=1;b6<arguments.length-2;b6++){if(typeof arguments[b6]==="undefined"){b1[b6]=void 0}}})}if(b1.length>1&&b1.index<b3.length){am.apply(bW,Y(b1,1))}b4=b1[0].length;bU=b2;if(bW.length>=b5){break}}if(bZ.lastIndex===b1.index){bZ.lastIndex++}b1=bZ.exec(b3)}if(bU===b3.length){if(b4||!bZ.test("")){B(bW,"")}}else{B(bW,aU(b3,bU))}return bW.length>b5?aU(bW,0,b5):bW}}())}else{if("0".split(void 0,0).length){aM.split=function q(bT,bS){if(typeof bT==="undefined"&&bS===0){return[]}return av(this,bT,bS)}}}var bf=aM.replace;var aV=(function(){var bS=[];"x".replace(/x(.)?/g,function(bT,bU){B(bS,bU)});return bS.length===1&&typeof bS[0]==="undefined"}());if(!aV){aM.replace=function aR(bW,bU){var bT=ah(bU);var bS=H(bW)&&(/\)[*?]/).test(bW.source);if(!bT||!bS){return bf.call(this,bW,bU)}else{var bV=function(bZ){var b0=arguments.length;var bX=bW.lastIndex;bW.lastIndex=0;var bY=bW.exec(bZ)||[];bW.lastIndex=bX;B(bY,arguments[b0-2],arguments[b0-1]);return bU.apply(this,bY)};return bf.call(this,bW,bV)}}}var aG=aM.substr;var ac="".substr&&"0b".substr(-1)!=="b";u(aM,{substr:function aT(bU,bS){var bT=bU;if(bU<0){bT=ae(this.length+bU,0)}return aG.call(this,bT,bS)}},ac);var t="\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF";var bq="\u200b";var aD="["+t+"]";var aP=new RegExp("^"+aD+aD+"*");var ak=new RegExp(aD+aD+"*$");var bm=aM.trim&&(t.trim()||!bq.trim());u(aM,{trim:function Z(){if(typeof this==="undefined"||this===null){throw new TypeError("can't convert "+this+" to object")}return bD(this).replace(aP,"").replace(ak,"")}},bm);var m=aM.lastIndexOf&&"abcあい".lastIndexOf("あい",2)!==-1;u(aM,{lastIndexOf:function bQ(b0){if(typeof this==="undefined"||this===null){throw new TypeError("can't convert "+this+" to object")}var bV=bD(this);var bT=bD(b0);var bY=arguments.length>1?aN(arguments[1]):NaN;var bX=ab(bY)?Infinity:L.ToInteger(bY);var bS=a3(ae(bX,0),bV.length);var bZ=bT.length;var bU=bS+bZ;while(bU>0){bU=ae(0,bU-bZ);var bW=v(aU(bV,bU,bS+bZ),bT);if(bW!==-1){return bU+bW}}return -1}},m);var bB=aM.lastIndexOf;u(aM,{lastIndexOf:function bQ(bS){return bB.apply(this,arguments)}},aM.lastIndexOf.length!==1);if(parseInt(t+"08")!==8||parseInt(t+"0x16")!==22){parseInt=(function(bS){var bT=/^[\-+]?0[xX]/;return function bU(bY,bX){var bW=bD(bY).trim();var bV=aN(bX)||(bT.test(bW)?16:10);return bS(bW,bV)}}(parseInt))}if(String(new RangeError("test"))!=="RangeError: test"){var an=function C(){if(typeof this==="undefined"||this===null){throw new TypeError("can't convert "+this+" to object")}var bS=this.name;if(typeof bS==="undefined"){bS="Error"}else{if(typeof bS!=="string"){bS=bD(bS)}}var bT=this.message;if(typeof bT==="undefined"){bT=""}else{if(typeof bT!=="string"){bT=bD(bT)}}if(!bS){return bT}if(!bT){return bS}return bS+": "+bT};Error.prototype.toString=an}if(bI){var bl=function(bS,bU){if(bn(bS,bU)){var bT=Object.getOwnPropertyDescriptor(bS,bU);bT.enumerable=false;Object.defineProperty(bS,bU,bT)}};bl(Error.prototype,"message");if(Error.prototype.message!==""){Error.prototype.message=""}bl(Error.prototype,"name")}if(String(/a/mig)!=="/a/gim"){var ag=function C(){var bS="/"+this.source+"/";if(this.global){bS+="g"}if(this.ignoreCase){bS+="i"}if(this.multiline){bS+="m"}return bS};RegExp.prototype.toString=ag}}))},{}],26:[function(h,g,f){var e=[];var i=e.forEach;var j=e.slice;g.exports=function(k){i.call(j.call(arguments,1),function(l){if(l){for(var m in l){k[m]=l[m]}}});return k}},{}],27:[function(g,f,e){f.exports=i;var h=Object.prototype.toString;function i(k){var j=h.call(k);return j==="[object Function]"||(typeof k==="function"&&j!=="[object RegExp]")||(typeof window!=="undefined"&&(k===window.setTimeout||k===window.alert||k===window.confirm||k===window.prompt))}},{}],28:[function(h,g,f){g.exports=function e(i){return typeof i==="object"&&i!==null}},{}],29:[function(g,f,e){
/*
* $script.js JS loader & dependency manager
* https://github.com/ded/script.js
* (c) Dustin Diaz 2014 | License MIT
*/
(function(h,i){if(typeof f!="undefined"&&f.exports){f.exports=i()}else{if(typeof d=="function"&&d.amd){d(i)}else{this[h]=i()}}})("$script",function(){var v=document,r=v.getElementsByTagName("head")[0],y="string",o=false,q="push",l="readyState",w="onreadystatechange",p={},h={},k={},j={},u,x;function n(s,B){for(var A=0,z=s.length;A<z;++A){if(!B(s[A])){return o}}return 1}function t(s,z){n(s,function(A){return !z(A)})}function i(G,C,A){G=G[q]?G:[G];var z=C&&C.call,B=z?C:A,s=z?G.join(""):C,D=G.length;function E(H){return H.call?H():p[H]}function F(){if(!--D){p[s]=1;B&&B();for(var H in k){n(H.split("|"),E)&&!t(k[H],E)&&(k[H]=[])}}}setTimeout(function(){t(G,function H(J,I){if(J===null){return F()}if(!I&&!/^https?:\/\//.test(J)&&u){J=(J.indexOf(".js")===-1)?u+J+".js":u+J}if(j[J]){if(s){h[s]=1}return(j[J]==2)?F():setTimeout(function(){H(J,true)},0)}j[J]=1;if(s){h[s]=1}m(J,F)})},0);return i}function m(B,A){var z=v.createElement("script"),s;z.onload=z.onerror=z[w]=function(){if((z[l]&&!(/^c|loade/.test(z[l])))||s){return}z.onload=z[w]=null;s=1;j[B]=2;A()};z.async=1;z.src=x?B+(B.indexOf("?")===-1?"?":"&")+x:B;r.insertBefore(z,r.lastChild)}i.get=m;i.order=function(s,B,z){(function A(C){C=s.shift();!s.length?i(C,B,z):i(C,A)}())};i.path=function(s){u=s};i.urlArgs=function(s){x=s};i.ready=function(B,z,A){B=B[q]?B:[B];var s=[];!t(B,function(C){p[C]||s[q](C)})&&n(B,function(C){return p[C]})?z():!function(C){k[C]=k[C]||[];k[C][q](z);A&&A(s)}(B.join("|"));return i};i.done=function(s){i([null],s)};return i})},{}]},{},[19])(19)}); | ztfy.media | /ztfy.media-0.1.12.tar.gz/ztfy.media-0.1.12/src/ztfy/media/browser/resources/flowplayer/flowplayer.min.js | flowplayer.min.js |
.. contents::
Introduction
============
ztfy.media is a ZTK/ZopeApp ZTFY package used to automatically convert and display
medias files (audios, videos...).
It was developed in the context of a medias library management application handling several
kinds of medias (mainly images, videos, and audio files), to be able to automatically display
these contents in web pages.
Medias conversions
==================
Automatic medias conversions implies several pre-requisites:
- the ''ffmpeg'' executable must be available in your path;
- you have to rely on a ZEO connection handling a blobs cache directory;
- you have to create and register (with a name) this ZEO connection in your site management folder
(see ztfy.utils.zodb.ZEOConnection object);
- you have to create and register (without name) a ZTFY medias conversion utility.
Medias conversion utility allows you to define listening address and port of a ZeroMQ process which
will wait for conversions requests. These requests are automatically done when an IObjectAddedEvent
is notified on a IFile object containing contents for which a converter has been registered; default
converters based on FFmpeg are available for images, video and audio files, but you can provide your
own converters for any kind of custom file.
Medias conversion utility also allows to define in which formats you want to convert the new medias.
All conversions are actually done with the help of FFmpeg, each conversion being done in a dedicated
sub-process handling it's own ZEO connection.
Converted medias are stored in the ZODB as Blob files in the original media file annotations.
| ztfy.media | /ztfy.media-0.1.12.tar.gz/ztfy.media-0.1.12/docs/README.txt | README.txt |
====================
ztfy.monitor package
====================
You may find documentation in:
- Global README.txt: ztfy/monitor/docs/README.txt
- General: ztfy/monitor/docs
- Technical: ztfy/monitor/doctest
More informations can be found on ZTFY.org_ web site ; a decicated Trac environment is available
on ZTFY.monitor_.
This package is created and maintained by Thierry Florac_.
.. _Thierry Florac: mailto:[email protected]
.. _ZTFY.org: http://www.ztfy.org
.. _ZTFY.monitor: http://trac.ztfy.org/ztfy.monitor
| ztfy.monitor | /ztfy.monitor-0.1.tar.gz/ztfy.monitor-0.1/README.txt | README.txt |
====================
ztfy.monitor package
====================
.. contents::
What is ztfy.monitor ?
======================
ztfy.monitor is a small monitor for Zope 3, using zc.z3monitor as base package.
It adds a "threads" command to monitoring console, to see what the Zope server is
actually doing, even when all threads are busy and the server can't respond to any request.
It's actually useful when your server is not performing as well as you would like, is eating
all your CPU time or is waiting in a deadlock loop.
It's main code is based on DeadlockDebugger, developed by Nuxeo for the Zope2 application
server.
How to use ztfy.monitor ?
=========================
This package can be used via the zc.monitor NGI server ; read the configuration of this package to see how it is configured.
Go on by including ztfy.monitor package into your application configuration : ::
<include package="ztfy.monitor" />
After that and as soon as the monitoring server is launched, you can connect and
use the "threads" command to see threads activity ; for example, by using the "netcat"
application on a monitor running on port 8081 : ::
$ echo "threads" | nc localhost 8081
Threads traceback dump at 2008-11-03 21:50:46
Thread -1210468160:
File "./bin/paster", line 151, in ?
paste.script.command.run()
File "/var/local/src/ztfy/lib/python2.4/site-packages/PasteScript-1.6.2-py2.4.egg/paste/script/command.py", line 79, in run
invoke(command, command_name, options, args[1:])
File "/var/local/src/ztfy/lib/python2.4/site-packages/PasteScript-1.6.2-py2.4.egg/paste/script/command.py", line 118, in invoke
exit_code = runner.run(args)
File "/var/local/src/ztfy/lib/python2.4/site-packages/PasteScript-1.6.2-py2.4.egg/paste/script/command.py", line 213, in run
result = self.command()
File "/var/local/src/ztfy/lib/python2.4/site-packages/PasteScript-1.6.2-py2.4.egg/paste/script/serve.py", line 257, in command
server(app)
File "/var/local/src/ztfy/lib/python2.4/site-packages/PasteDeploy-1.3.1-py2.4.egg/paste/deploy/loadwsgi.py", line 139, in server_wrapper
wsgi_app, context.global_conf,
File "/var/local/src/ztfy/lib/python2.4/site-packages/PasteDeploy-1.3.1-py2.4.egg/paste/deploy/util/fixtypeerror.py", line 57, in fix_call
val = callable(*args, **kw)
File "/var/local/src/ztfy/lib/python2.4/site-packages/Paste-1.6-py2.4.egg/paste/httpserver.py", line 1314, in server_runner
serve(wsgi_app, **kwargs)
File "/var/local/src/ztfy/lib/python2.4/site-packages/Paste-1.6-py2.4.egg/paste/httpserver.py", line 1282, in serve
server.serve_forever()
File "/var/local/src/ztfy/lib/python2.4/site-packages/Paste-1.6-py2.4.egg/paste/httpserver.py", line 1066, in serve_forever
self.handle_request()
File "/usr/lib/python2.4/SocketServer.py", line 217, in handle_request
request, client_address = self.get_request()
File "/var/local/src/ztfy/lib/python2.4/site-packages/Paste-1.6-py2.4.egg/paste/httpserver.py", line 1100, in get_request
(conn,info) = SecureHTTPServer.get_request(self)
File "/var/local/src/ztfy/lib/python2.4/site-packages/Paste-1.6-py2.4.egg/paste/httpserver.py", line 378, in get_request
(conn, info) = self.socket.accept()
File "/usr/lib/python2.4/socket.py", line 161, in accept
sock, addr = self._sock.accept()
Thread -1303708784:
File "/usr/lib/python2.4/threading.py", line 442, in __bootstrap
self.run()
File "/usr/lib/python2.4/threading.py", line 422, in run
self.__target(*self.__args, **self.__kwargs)
File "/var/local/src/ztfy/lib/python2.4/site-packages/Paste-1.6-py2.4.egg/paste/httpserver.py", line 851, in worker_thread_callback
runnable = self.queue.get()
File "/usr/lib/python2.4/Queue.py", line 119, in get
self.not_empty.wait()
File "/usr/lib/python2.4/threading.py", line 203, in wait
waiter.acquire()
Thread -1295316080:
...
When a thread is actually handling a web request, it's URL is written in the first line : ::
Thread -1303708784 (GET /++apidoc++/Interface/ztfy.app.test.test.IDocument/index.html):
File "/usr/lib/python2.4/threading.py", line 442, in __bootstrap
self.run()
File "/usr/lib/python2.4/threading.py", line 422, in run
self.__target(*self.__args, **self.__kwargs)
File "/var/local/src/ztfy/lib/python2.4/site-packages/Paste-1.6-py2.4.egg/paste/httpserver.py", line 863, in worker_thread_callback
runnable()
File "/var/local/src/ztfy/lib/python2.4/site-packages/Paste-1.6-py2.4.egg/paste/httpserver.py", line 1037, in <lambda>
lambda: self.process_request_in_thread(request, client_address))
File "/var/local/src/ztfy/lib/python2.4/site-packages/Paste-1.6-py2.4.egg/paste/httpserver.py", line 1053, in process_request_in_thread
self.finish_request(request, client_address)
File "/usr/lib/python2.4/SocketServer.py", line 254, in finish_request
self.RequestHandlerClass(request, client_address, self)
File "/usr/lib/python2.4/SocketServer.py", line 521, in __init__
self.handle()
File "/var/local/src/ztfy/lib/python2.4/site-packages/Paste-1.6-py2.4.egg/paste/httpserver.py", line 432, in handle
BaseHTTPRequestHandler.handle(self)
File "/usr/lib/python2.4/BaseHTTPServer.py", line 316, in handle
self.handle_one_request()
File "/var/local/src/ztfy/lib/python2.4/site-packages/Paste-1.6-py2.4.egg/paste/httpserver.py", line 427, in handle_one_request
self.wsgi_execute()
File "/var/local/src/ztfy/lib/python2.4/site-packages/Paste-1.6-py2.4.egg/paste/httpserver.py", line 287, in wsgi_execute
self.wsgi_start_response)
File "build/bdist.darwin-8.10.1-i386/egg/z3c/evalexception.py", line 10, in __call__
File "/var/local/src/ztfy/lib/python2.4/site-packages/Paste-1.6-py2.4.egg/paste/evalexception/middleware.py", line 186, in __call__
return self.respond(environ, start_response)
File "/var/local/src/ztfy/lib/python2.4/site-packages/Paste-1.6-py2.4.egg/paste/evalexception/middleware.py", line 306, in respond
app_iter = self.application(environ, detect_start_response)
File "/var/local/src/ztfy/eggs/zope.app.wsgi-3.4.0-py2.4.egg/zope/app/wsgi/__init__.py", line 54, in __call__
request = publish(request, handle_errors=handle_errors)
File "/var/local/src/ztfy/eggs/tmp4szHYV/zope.publisher-3.5.0a1.dev_r78838-py2.4.egg/zope/publisher/publish.py", line 133, in publish
File "/var/local/src/ztfy/eggs/tmpUIaR4E/zope.app.publication-3.4.3-py2.4.egg/zope/app/publication/zopepublication.py", line 167, in callObject
File "/var/local/src/ztfy/eggs/tmp4szHYV/zope.publisher-3.5.0a1.dev_r78838-py2.4.egg/zope/publisher/publish.py", line 108, in mapply
File "/var/local/src/ztfy/eggs/tmp4szHYV/zope.publisher-3.5.0a1.dev_r78838-py2.4.egg/zope/publisher/publish.py", line 114, in debug_call
File "/var/local/src/ztfy/eggs/zope.app.pagetemplate-3.4.0-py2.4.egg/zope/app/pagetemplate/simpleviewclass.py", line 44, in __call__
return self.index(*args, **kw)
File "/var/local/src/ztfy/eggs/zope.app.pagetemplate-3.4.0-py2.4.egg/zope/app/pagetemplate/viewpagetemplatefile.py", line 83, in __call__
return self.im_func(im_self, *args, **kw)
File "/var/local/src/ztfy/eggs/zope.app.pagetemplate-3.4.0-py2.4.egg/zope/app/pagetemplate/viewpagetemplatefile.py", line 51, in __call__
sourceAnnotations=getattr(debug_flags, 'sourceAnnotations', 0),
File "/var/local/src/ztfy/eggs/tmpvYYhPw/zope.pagetemplate-3.4.0-py2.4.egg/zope/pagetemplate/pagetemplate.py", line 115, in pt_render
File "/var/local/src/ztfy/eggs/tmpUxe0uv/zope.tal-3.4.1-py2.4.egg/zope/tal/talinterpreter.py", line 271, in __call__
File "/var/local/src/ztfy/eggs/tmpUxe0uv/zope.tal-3.4.1-py2.4.egg/zope/tal/talinterpreter.py", line 346, in interpret
File "/var/local/src/ztfy/eggs/tmpUxe0uv/zope.tal-3.4.1-py2.4.egg/zope/tal/talinterpreter.py", line 891, in do_useMacro
...
Of course, the service is available even when each server's thread is currently busy and when
the server can't serve any web request.
| ztfy.monitor | /ztfy.monitor-0.1.tar.gz/ztfy.monitor-0.1/ztfy/monitor/docs/README.txt | README.txt |
# import standard packages
# import Zope3 interfaces
from z3c.form.interfaces import HIDDEN_MODE, IErrorViewSnippet
from z3c.json.interfaces import IJSONWriter
from zope.authentication.interfaces import IAuthentication
from zope.component.interfaces import ISite
from zope.security.interfaces import IUnauthorized
from zope.session.interfaces import ISession
# import local interfaces
from ztfy.baseskin.interfaces import IDefaultView, IDialog
from ztfy.myams.interfaces import IModalFullPage
# import Zope3 packages
from z3c.form import field, button
from z3c.formjs import ajax
from zope.component import adapts, getUtility, getUtilitiesFor, getMultiAdapter, queryMultiAdapter
from zope.interface import implements, Interface, Invalid
from zope.publisher.browser import BrowserPage
from zope.schema import TextLine, Password
from zope.site import hooks
from zope.traversing.browser.absoluteurl import absoluteURL
# import local packages
from ztfy.baseskin.viewlet import ContentProviderBase
from ztfy.myams.form import AddForm
from ztfy.myams.layer import MyAMSLayer
from ztfy.utils.traversing import getParent
from ztfy.myams import _
class ILoginFormFields(Interface):
"""Login form fields interface"""
username = TextLine(title=_("login-field", "Login"),
description=_("Principal ID or email address"),
required=True)
password = Password(title=_("password-field", "Password"),
required=True)
came_from = TextLine(title=_("camefrom-field", "Login origin"),
required=False)
class ILoginFormButtons(Interface):
"""Login form buttons interface"""
login = button.Button(name='login', title=_("Login"))
class LoginView(AddForm):
"""Login view"""
implements(IModalFullPage)
legend = _("Please enter valid credentials to login")
dialog_class = 'modal-medium'
warn_on_change = False
fields = field.Fields(ILoginFormFields)
buttons = button.Buttons(ILoginFormButtons)
handler = '/@@ajax/handleLogin'
principal = None
def updateWidgets(self, prefix=None):
super(LoginView, self).updateWidgets(prefix)
self.widgets['came_from'].mode = HIDDEN_MODE
origin = self.request.get('came_from') or self.request.get(self.prefix + self.widgets.prefix + 'came_from')
if not origin:
origin = self.request.getURL()
stack = self.request.getTraversalStack()
if stack:
origin += '/' + '/'.join(stack[::-1])
self.widgets['came_from'].value = origin
def updateActions(self):
super(AddForm, self).updateActions()
if 'login' in self.actions:
self.actions['login'].addClass('btn-primary')
def extractData(self, setErrors=True):
data, errors = super(LoginView, self).extractData(setErrors)
if errors:
self.logout()
return data, errors
self.request.form['login'] = data['username']
self.request.form['password'] = data['password']
context = getParent(self.context, ISite)
while context is not None:
old_site = hooks.getSite()
try:
hooks.setSite(context)
for name, auth in getUtilitiesFor(IAuthentication):
try:
self.principal = auth.authenticate(self.request)
if self.principal is not None:
return data, errors
except:
continue
finally:
hooks.setSite(old_site)
context = getParent(context, ISite, allow_context=False)
if self.principal is None:
error = Invalid(_("Invalid credentials"))
view = getMultiAdapter((error, self.request, None, None, self, self.context),
IErrorViewSnippet)
view.update()
errors += (view, )
if setErrors:
self.widgets.errors = errors
self.logout()
return data, errors
@ajax.handler
def handleLogin(self):
writer = getUtility(IJSONWriter)
self.updateWidgets()
data, errors = self.extractData()
if errors:
return writer.write(self.getAjaxErrors())
if self.principal is not None:
if IUnauthorized.providedBy(self.context):
context, _layer, _permission = self.context.args
return writer.write({'status': 'redirect',
'location': absoluteURL(context, self.request)})
else:
came_from = data.get('came_from')
if came_from:
return writer.write({'status': 'redirect',
'location': came_from})
else:
target = queryMultiAdapter((self.context, self.request, Interface), IDefaultView)
return writer.write({'status': 'redirect',
'location': '%s/%s' % (absoluteURL(self.context, self.request),
target.viewname if target is not None else '@@index.html')})
else:
return writer.write({'status': 'redirect',
'location': '%s/@@login.html?came_from=%s' % (absoluteURL(self.context, self.request),
data.get('came_from'))})
def logout(self):
try:
sessionData = ISession(self.request)['zope.pluggableauth.browserplugins']
sessionData['credentials'] = None
except KeyError:
pass
self.principal = None
class LoginDialogView(LoginView):
"""Login dialog view"""
implements(IDialog)
class LoginViewFormPrefix(ContentProviderBase):
"""Login view form prefix"""
adapts(Interface, MyAMSLayer, LoginView)
class LoginViewFormSuffix(ContentProviderBase):
"""Login view form suffix"""
adapts(Interface, MyAMSLayer, LoginView)
class LogoutView(BrowserPage):
"""Logout view"""
def __call__(self):
context = getParent(self.context, ISite)
while context is not None:
old_site = hooks.getSite()
try:
hooks.setSite(context)
for _name, auth in getUtilitiesFor(IAuthentication):
auth.logout(self.request)
finally:
hooks.setSite(old_site)
context = getParent(context, ISite, allow_context=False)
target = queryMultiAdapter((self.context, self.request, Interface), IDefaultView)
self.request.response.redirect('%s/%s' % (absoluteURL(self.context, self.request),
target.viewname if target is not None else '@@index.html'))
return u'' | ztfy.myams | /ztfy.myams-0.1.33.tar.gz/ztfy.myams-0.1.33/src/ztfy/myams/login.py | login.py |
# import standard packages
# import Zope3 interfaces
from z3c.json.interfaces import IJSONWriter
# import local interfaces
from ztfy.baseskin.interfaces import IDialog
from ztfy.baseskin.interfaces.form import IGroupsBasedForm, IWidgetsGroup, IAJAXForm, IForm, IInnerSubForm, \
IInnerTabForm, ICustomUpdateSubForm
from ztfy.myams.interfaces import IModalEditFormButtons, IModalAddFormButtons, IEditFormButtons, IAddFormButtons, \
IModalDisplayFormButtons, IObjectData
# import Zope3 packages
from z3c.form import button
from z3c.formjs import ajax
from z3c.formui import form
from zope.component import getAdapters, getUtility
from zope.event import notify
from zope.i18n import translate
from zope.interface import implements
from zope.lifecycleevent import ObjectCreatedEvent, Attributes
from zope.schema.fieldproperty import FieldProperty
from zope.security.proxy import removeSecurityProxy
# import local packages
from ztfy.baseskin.form import FormObjectCreatedEvent, FormObjectModifiedEvent
from ztfy.utils.property import cached_property
from ztfy.myams import _
#
# Form widgets group
#
class WidgetsGroup(object):
"""Widgets group"""
implements(IWidgetsGroup)
def __init__(self, id, widgets=(), legend=None, help=None, css_class='', switch=False,
checkbox_switch=False, checkbox_field=None, hide_if_empty=False):
assert (not checkbox_switch) or checkbox_field, "You must define checkbox field when using checkbox switch"
self.id = id
self.widgets = widgets
self.legend = (legend is None) and id or legend
self.help = help
self._css_class = css_class
self.switch = switch
self.checkbox_switch = checkbox_switch
self.checkbox_field = checkbox_field
self.hide_if_empty = hide_if_empty
@property
def switchable(self):
return self.switch or self.checkbox_switch
@property
def checkbox_widget(self):
if self.checkbox_field is None:
return None
for widget in self.widgets:
if widget.field is self.checkbox_field.field:
return widget
@cached_property
def visible(self):
if self.checkbox_switch:
widget = self.checkbox_widget
context = widget.context
name = widget.field.getName()
value = getattr(context, name, None)
return bool(value)
else:
if not (self.switch and self.hide_if_empty):
return True
for widget in self.widgets:
if not widget.ignoreContext:
field = widget.field
context = widget.context
name = field.getName()
value = getattr(context, name, None)
if value and (value != field.default):
return True
return False
@property
def visible_widgets(self):
for widget in self.widgets:
if (self.checkbox_field is None) or (widget.field is not self.checkbox_field.field):
yield widget
@property
def css_class(self):
css_class = self._css_class
if self.switch:
if self.checkbox_switch:
css_class += ' checker'
else:
css_class += ' switcher'
return css_class
@property
def switcher_state(self):
return 'on' if self.visible else 'off'
@property
def checker_state(self):
return 'on' if self.visible else 'off'
def NamedWidgetsGroup(id, widgets, names=(), legend=None, help=None, css_class='', switch=False,
checkbox_switch=False, checkbox_field=None, hide_if_empty=False):
"""Create a widgets group based on widgets names"""
return WidgetsGroup(id, [widgets.get(name) for name in names], legend, help, css_class, switch,
checkbox_switch, checkbox_field, hide_if_empty)
class GroupsBasedForm(object):
"""Groups based form"""
implements(IGroupsBasedForm)
def __init__(self):
self._groups = []
def addGroup(self, group):
self._groups.append(group)
@property
def groups(self):
result = self._groups[:]
others = []
for widget in self.widgets.values():
found = False
for group in result:
if widget in group.widgets:
found = True
break
if not found:
others.append(widget)
if others:
result.insert(0, WidgetsGroup(None, others))
return result
#
# AJAX form
#
class AjaxForm(ajax.AJAXRequestHandler):
"""Custom base class used to handle AJAX errors"""
implements(IAJAXForm, IObjectData)
object_data = None
form_options = None
def getFormOptions(self):
if self.form_options:
writer = getUtility(IJSONWriter)
return writer.write(self.form_options)
def getAjaxErrors(self):
errors = {'status': u'error',
'error_message': translate(self.status, context=self.request)}
for error in self.errors:
error.update()
error = removeSecurityProxy(error)
if hasattr(error, 'widget'):
widget = removeSecurityProxy(error.widget)
if widget is not None:
errors.setdefault('widgets', []).append({'name': widget.name,
'label': translate(widget.label, context=self.request),
'message': translate(error.message, context=self.request)})
else:
errors.setdefault('messages', []).append({'message': translate(error.message, context=self.request)})
else:
errors.setdefault('messages', []).append(translate(error.message, context=self.request))
return errors
#
# Base forms
#
def getFormWeight(form):
try:
return form.weight
except AttributeError:
return 0
class BaseForm(GroupsBasedForm, AjaxForm, form.Form):
"""Base add form"""
implements(IForm)
autocomplete = 'on'
display_hints_on_widgets = True
warn_on_change = u'default'
handle_upload = False
subforms_legend = None
css_class = 'ams-form form-horizontal'
label_css_class = FieldProperty(IForm['label_css_class'])
input_css_class = FieldProperty(IForm['input_css_class'])
callbacks = {}
def __init__(self, context, request):
GroupsBasedForm.__init__(self)
form.Form.__init__(self, context, request)
def update(self):
form.Form.update(self)
self.getForms()
[subform.update() for subform in self.subforms]
[tabform.update() for tabform in self.tabforms]
@property
def warnOnChange(self):
if self.warn_on_change is True:
return u'true'
elif self.warn_on_change is False:
return u'false'
else:
return None
def isDialog(self):
return IDialog.providedBy(self)
def getForms(self, with_self=True):
if not hasattr(self, 'subforms'):
self.subforms = self.createSubForms()
if not hasattr(self, 'tabforms'):
self.tabforms = self.createTabForms()
if with_self:
return [self, ] + self.subforms + self.tabforms
else:
return self.subforms + self.tabforms
def createSubForms(self):
return sorted((adapter[1] for adapter in getAdapters((self, ), IInnerSubForm)), key=getFormWeight)
def createTabForms(self):
return sorted((adapter[1] for adapter in getAdapters((self, ), IInnerTabForm)), key=getFormWeight)
def getWidgetCallback(self, widget):
return self.callbacks.get(widget)
def updateWidgets(self, prefix=None):
form.Form.updateWidgets(self, prefix)
self.getForms()
[subform.updateWidgets(prefix) for subform in self.subforms]
[tabform.updateWidgets(prefix) for tabform in self.tabforms]
@property
def errors(self):
result = []
for subform in self.getForms():
result.extend(subform.widgets.errors)
return result
def updateContent(self, content, data):
changes = form.applyChanges(self, content, data)
self.getForms()
for subform in self.subforms:
if ICustomUpdateSubForm.providedBy(subform):
updates = ICustomUpdateSubForm(subform).updateContent(content, data)
if isinstance(updates, dict):
changes.update(updates)
else:
changes.update(form.applyChanges(subform, content, data))
for tabform in self.tabforms:
if ICustomUpdateSubForm.providedBy(tabform):
updates = ICustomUpdateSubForm(tabform).updateContent(content, data)
if isinstance(updates, dict):
changes.update(updates)
else:
changes.update(form.applyChanges(tabform, content, data))
return changes
#
# Add forms
#
class AddForm(BaseForm, form.AddForm):
"""Base add form class"""
buttons = button.Buttons(IAddFormButtons)
legend = _("Add form")
handler = '/@@ajax/ajaxCreate'
formErrorsMessage = _("There were some errors.")
def updateActions(self):
form.AddForm.updateActions(self)
if 'add' in self.actions:
self.actions['add'].addClass('btn-primary')
@ajax.handler
def ajaxCreate(self):
writer = getUtility(IJSONWriter)
self.updateWidgets()
data, errors = self.extractData()
if errors:
return writer.write(self.getAjaxErrors())
result = self.createAndAdd(data)
self.request.response.setHeader('Content-Type', 'text/plain; charset=utf-8')
return self.getSubmitOutput(writer, result)
def createAndAdd(self, data):
object = self.create(data)
notify(ObjectCreatedEvent(object))
self.add(object)
self.updateContent(object, data)
notify(FormObjectCreatedEvent(object, self))
return object
def getSubmitOutput(self, writer, changes):
return writer.write({'status': 'reload',
'location': self.nextURL()})
class DialogAddForm(AddForm):
"""Base dialog add form"""
implements(IDialog)
buttons = button.Buttons(IModalAddFormButtons)
dialog_class = 'modal-medium'
#
# Edit forms
#
class EditForm(BaseForm, form.EditForm):
"""Base edit form class"""
buttons = button.Buttons(IEditFormButtons)
legend = _("Edit form")
handler = '/@@ajax/ajaxEdit'
formErrorsMessage = _('There were some errors.')
successMessage = _('Data successfully updated.')
noChangesMessage = _('No changes were applied.')
def updateActions(self):
form.EditForm.updateActions(self)
if 'submit' in self.actions:
self.actions['submit'].addClass('btn-primary')
@ajax.handler
def ajaxEdit(self):
return self.handleApply()
def handleApply(self):
writer = getUtility(IJSONWriter)
self.updateWidgets()
data, errors = self.extractData()
if errors:
return writer.write(self.getAjaxErrors())
changes = self.applyChanges(data)
self.request.response.setHeader('Content-Type', 'text/plain; charset=utf-8')
return self.getSubmitOutput(writer, changes)
def applyChanges(self, data):
content = self.getContent()
changes = self.updateContent(content, data)
if changes:
descriptions = []
for interface, names in changes.items():
descriptions.append(Attributes(interface, *names))
notify(FormObjectModifiedEvent(content, self, *descriptions))
return changes
def getSubmitOutput(self, writer, changes):
if changes:
message = self.successMessage
else:
message = self.noChangesMessage
return writer.write({'status': 'success',
'message': translate(message, context=self.request)})
class DialogEditForm(EditForm):
"""Base dialog edit form"""
implements(IDialog)
buttons = button.Buttons(IModalEditFormButtons)
dialog_class = 'modal-medium'
#
# Display forms
#
class DisplayForm(BaseForm, form.DisplayForm):
"""Base display form class"""
class DialogDisplayForm(DisplayForm):
"""Base dialog display form"""
implements(IDialog)
buttons = button.Buttons(IModalDisplayFormButtons)
dialog_class = 'modal-medium' | ztfy.myams | /ztfy.myams-0.1.33.tar.gz/ztfy.myams-0.1.33/src/ztfy/myams/form.py | form.py |
# import standard packages
from datetime import datetime
# import Zope3 interfaces
from persistent.interfaces import IPersistent
from z3c.json.interfaces import IJSONWriter
from z3c.template.interfaces import ILayoutTemplate
from zope.authentication.interfaces import IAuthentication
from zope.pagetemplate.interfaces import IPageTemplate
# import local interfaces
from zope.security.interfaces import IUnauthorized
from ztfy.myams.interfaces import IInnerPage, IModalPage
# import Zope3 packages
from z3c.template.template import getPageTemplate, getLayoutTemplate
from zope.component import getMultiAdapter, getUtility
from zope.i18n import translate
from zope.interface import implements
from zope.publisher.browser import BrowserPage
from zope.traversing.browser.absoluteurl import absoluteURL
# import local packages
from ztfy.utils.date import formatDatetime
from ztfy.utils.text import textToHTML
from ztfy.utils.timezone import tztime
from ztfy.utils.traversing import getParent
from ztfy.myams import _
class BaseTemplateBasedPage(BrowserPage):
"""Base template based page"""
template = getPageTemplate()
def __call__(self):
self.update()
return self.render()
def update(self):
pass
def render(self):
if self.template is None:
template = getMultiAdapter((self, self.request), IPageTemplate)
return template(self)
return self.template()
class TemplateBasedPage(BaseTemplateBasedPage):
"""Template based page"""
layout = getLayoutTemplate()
def __call__(self):
self.update()
if self.layout is None:
layout = getMultiAdapter((self, self.request), ILayoutTemplate)
return layout(self)
return self.layout()
class BaseIndexPage(TemplateBasedPage):
"""Base index page"""
class InnerPage(TemplateBasedPage):
"""Inner page"""
implements(IInnerPage)
class ModalPage(TemplateBasedPage):
"""Modal page"""
implements(IModalPage)
class ExceptionView(BrowserPage):
"""Base exception view"""
@property
def error_name(self):
return self.context.__class__.__name__
@property
def error_message(self):
return textToHTML(translate(getattr(self.context, 'message', u''), context=self.request) or
'\n'.join((str(arg) for arg in self.context.args)),
request=self.request)
@property
def error_datetime(self):
return formatDatetime(tztime(datetime.utcnow()))
@property
def error_user(self):
principal = self.request.principal
return '%s (%s)' % (principal.title, principal.id)
def __call__(self):
self.request.response.setStatus(500)
writer = getUtility(IJSONWriter)
return writer.write({'status': 'messagebox',
'messagebox': {'status': 'error',
'title': translate(_("An error occurred: %s"), context=self.request) %
self.error_name,
'content': self.error_message,
'number': self.error_datetime,
'icon': 'fa fa-warning animated shake'}})
class UnauthorizedExceptionView(ExceptionView):
"""Unauthorized exception view"""
def __call__(self):
principal = self.request.principal
auth = getUtility(IAuthentication)
auth.unauthorized(principal.id, self.request)
try:
context = self.context.args[0]
except:
context = self.context
self.request.response.setStatus(200)
if ('/@@ajax/' in self.request.getURL()) or (self.request.get('HTTP_X_REQUESTED_WITH') == 'XMLHttpRequest'):
# Send JSON result when using AJAX
parent = getParent(context, IPersistent)
writer = getUtility(IJSONWriter)
return writer.write({'status': 'modal',
'location': 'login-dialog.html?came_from=%s' % absoluteURL(parent, self.request)})
else:
# else do a simple redirect...
self.request.response.redirect('login.html?came_from=%s' % absoluteURL(context, self.request)) | ztfy.myams | /ztfy.myams-0.1.33.tar.gz/ztfy.myams-0.1.33/src/ztfy/myams/page.py | page.py |
__docformat__ = "restructuredtext"
# import standard packages
from fanstatic import Library, Resource
# import Zope3 interfaces
# import local interfaces
# import Zope3 packages
# import local packages
from zope.i18nmessageid import MessageFactory
_ = MessageFactory('ztfy.myams')
library = Library('ztfy.myams', 'resources')
bootstrap_css = Resource(library, 'css/ext/bootstrap-3.3.2.css',
minified='css/ext/bootstrap-3.3.2.min.css')
bootstrap_modal_css = Resource(library, 'css/ext/bootstrap-modal.css',
minified='css/ext/bootstrap-modal.min.css',
depends=[bootstrap_css, ])
awesomefonts_css = Resource(library, 'css/ext/font-awesome-4.5.0.css',
minified='css/ext/font-awesome-4.5.0.min.css',
depends=[bootstrap_css, ])
myams_css = Resource(library, 'css/myams.css',
minified='css/myams.min.css',
depends=[bootstrap_modal_css, awesomefonts_css])
jquery = Resource(library, 'js/ext/jquery-2.1.3.js',
minified='js/ext/jquery-2.1.3.min.js',
bottom=True)
jquery_ui = Resource(library, 'js/ext/jquery-ui-1.11.2.min.js',
depends=[jquery, ],
bottom=True)
jquery_dataTables = Resource(library, 'js/ext/jquery-dataTables-1.9.4.js',
minified='js/ext/jquery-dataTables-1.9.4.min.js',
depends=[jquery, ],
bottom=True)
jquery_dataTables_tableTools = Resource(library, 'js/ext/jquery-dataTables-tableTools.js',
minified='js/ext/jquery-dataTables-tableTools.min.js',
depends=[jquery_dataTables, ],
bottom=True)
bootstrap = Resource(library, 'js/ext/bootstrap-3.3.2.js',
minified='js/ext/bootstrap-3.3.2.min.js',
depends=[jquery, jquery_ui, bootstrap_css, bootstrap_modal_css],
bottom=True)
myams = Resource(library, 'js/myams.js',
minified='js/myams.min.js',
depends=[bootstrap, myams_css],
bottom=True) | ztfy.myams | /ztfy.myams-0.1.33.tar.gz/ztfy.myams-0.1.33/src/ztfy/myams/__init__.py | __init__.py |
# import standard packages
import pkg_resources
from persistent import Persistent
# import Zope3 interfaces
# import local interfaces
from zope.annotation.interfaces import IAnnotations
from ztfy.myams.interfaces import IMyAMSApplication
from ztfy.myams.interfaces.configuration import IMyAMSStaticConfiguration, IMyAMSConfigurationTarget, IMyAMSConfiguration
# import Zope3 packages
from zope.component import adapter, queryUtility
from zope.container.contained import Contained
from zope.interface import implementer, implements
from zope.location.location import locate
from zope.schema.fieldproperty import FieldProperty
from ztfy.extfile.blob import BlobImage, BlobFile
from ztfy.file.property import FileProperty
# import local packages
from ztfy.mail.adapter import getPrincipalAddress
from ztfy.utils.request import queryRequest
from ztfy.utils.traversing import getParent
class MyAMSStaticConfiguration(object):
"""MyAMS static configuration"""
implements(IMyAMSStaticConfiguration)
application_package = 'ztfy.myams'
application_name = u'MyAMS'
inner_package = None
inner_package_name = None
version_location = u'menus'
include_top_links = True
include_site_search = True
include_mobile_search = True
include_user_activity = True
include_user_shortcuts = True
include_logout_button = True
include_minify_button = True
include_flags = True
include_menus = True
include_ribbon = True
include_reload_button = True
body_css_class = u''
@property
def version(self):
result = pkg_resources.get_distribution(self.application_package).version
if self.inner_package:
result += ' (%s v%s)' % (self.inner_package_name,
pkg_resources.get_distribution(self.inner_package).version)
return result
class MyAMSConfiguration(Persistent, Contained):
"""MyAMS user configuration"""
implements(IMyAMSConfiguration)
title = FieldProperty(IMyAMSConfiguration['title'])
description = FieldProperty(IMyAMSConfiguration['description'])
author = FieldProperty(IMyAMSConfiguration['author'])
icon = FileProperty(IMyAMSConfiguration['icon'], klass=BlobImage, img_klass=BlobImage)
logo = FileProperty(IMyAMSConfiguration['logo'], klass=BlobImage, img_klass=BlobImage)
logo_title = FieldProperty(IMyAMSConfiguration['logo_title'])
custom_css = FileProperty(IMyAMSConfiguration['custom_css'], klass=BlobFile)
custom_js = FileProperty(IMyAMSConfiguration['custom_js'], klass=BlobFile)
google_analytics_key = FieldProperty(IMyAMSConfiguration['google_analytics_key'])
uservoice_api_key = FieldProperty(IMyAMSConfiguration['uservoice_api_key'])
login_header_info = FieldProperty(IMyAMSConfiguration['login_header_info'])
login_footer_info = FieldProperty(IMyAMSConfiguration['login_footer_info'])
@property
def static_configuration(self):
application = getParent(self, IMyAMSApplication)
if application is not None:
return queryUtility(IMyAMSStaticConfiguration, name=application.configuration_name)
def getUserEmail(self):
request = queryRequest()
if request is None:
return None
address = getPrincipalAddress(request.principal)
if not address:
return None
return address[0][1]
MYAMS_CONFIGURATION_KEY = 'ztfy.myams.configuration'
@adapter(IMyAMSConfigurationTarget)
@implementer(IMyAMSConfiguration)
def MyAMSConfigurationFactory(context):
"""MyAMS configuration factory"""
annotations = IAnnotations(context)
configuration = annotations.get(MYAMS_CONFIGURATION_KEY)
if configuration is None:
configuration = annotations[MYAMS_CONFIGURATION_KEY] = MyAMSConfiguration()
locate(configuration, context, '++configuration++')
return configuration | ztfy.myams | /ztfy.myams-0.1.33.tar.gz/ztfy.myams-0.1.33/src/ztfy/myams/configuration.py | configuration.py |
# import standard packages
# import Zope3 interfaces
from z3c.form.interfaces import IInputForm
from ztfy.baseskin.interfaces import ISkinnable
from ztfy.baseskin.interfaces.form import checkSubmitButton
# import local interfaces
# import Zope3 packages
from z3c.form import button
from zope.interface import Interface, Attribute
from zope.schema import TextLine, Dict
# import local packages
from ztfy.baseskin.schema import CloseButton, ResetButton
from ztfy.myams import _
class IMyAMSApplication(ISkinnable):
"""MyAMS application interface"""
configuration_name = TextLine(title=_("Application static configuration name"),
required=True)
resources = Attribute(_("Fanstatic static resources"))
class IObjectData(Interface):
"""Object custom data interface"""
object_data = Dict(title=_("Data associated with this object"),
required=False)
class IFullPage(Interface):
"""Full page marker interface"""
class IModalFullPage(IFullPage):
"""Full page modal dialog marker interface"""
dialog_class = Attribute(_("Default dialog CSS class"))
class IInnerPage(Interface):
"""Inner page marker interface"""
class IModalPage(Interface):
"""Modal page marker interface"""
class IAddFormButtons(Interface):
"""Default add form buttons"""
reset = ResetButton(name='reset', title=_("Reset"))
add = button.Button(name='add', title=_("Add"), condition=checkSubmitButton)
class IModalAddFormButtons(Interface):
"""Modal add form buttons"""
close = CloseButton(name='close', title=_("Close"))
add = button.Button(name='add', title=_("Add"), condition=checkSubmitButton)
class IEditFormButtons(Interface):
"""Default edit form buttons"""
reset = ResetButton(name='reset', title=_("Reset"))
submit = button.Button(name='submit', title=_("Submit"), condition=checkSubmitButton)
class IModalEditFormButtons(Interface):
"""Modal edit form buttons"""
close = CloseButton(name='close', title=_("Close"))
submit = button.Button(name='submit', title=_("Submit"), condition=checkSubmitButton)
class IModalDisplayFormButtons(Interface):
"""Modal display form buttons"""
close = CloseButton(name='close', title=_("Close"))
class IInnerForm(IInputForm):
"""Inner form marker interface""" | ztfy.myams | /ztfy.myams-0.1.33.tar.gz/ztfy.myams-0.1.33/src/ztfy/myams/interfaces/__init__.py | __init__.py |
# import standard packages
# import Zope3 interfaces
# import local interfaces
# import Zope3 packages
from zope.interface import Interface, Attribute
from zope.schema import Text, TextLine, Bool, Choice
# import local packages
from ztfy.file.schema import ImageField, FileField
from ztfy.myams import _
MYAMS_CONFIGURATION_NAME_KEY = 'ztfy.myams.configuration.name'
class IMyAMSStaticConfiguration(Interface):
"""MyAMS static configuration"""
application_package = TextLine(title=_("Main application package"),
description=_("This package is used to get application version"),
required=False)
application_name = TextLine(title=_("Main application name"),
description=_("This name is used to display application version"),
required=False)
inner_package = TextLine(title=_("Inner package"),
description=_("This is another important package displayed in application version"),
required=False)
inner_package_name = TextLine(title=_("Inner package name"),
description=_("Package name used to display application version"),
required=False)
version = Attribute(_("Application version"))
version_location = Choice(title=_("Version location"),
required=False,
values=(u'menus', u'shortcuts'),
default=u'menus')
include_top_links = Bool(title=_("Include top links?"),
default=True,
required=True)
include_site_search = Bool(title=_("Include site search?"),
default=True,
required=True)
include_mobile_search = Bool(title=_("Include mobile search?"),
default=True,
required=True)
include_user_activity = Bool(title=_("Include user dropdown window?"),
default=True,
required=True)
include_user_shortcuts = Bool(title=_("Include user shortcuts?"),
default=True,
required=True)
include_logout_button = Bool(title=_("Include logout button?"),
default=True,
required=True)
include_minify_button = Bool(title=_("Include minify button?"),
default=True,
required=True)
include_flags = Bool(title=_("Include flags menu?"),
default=True,
required=True)
include_menus = Bool(title=_("Include main menus?"),
default=True,
required=True)
include_ribbon = Bool(title=_("Include ribbon?"),
default=True,
required=True)
include_reload_button = Bool(title=_("Include reload button?"),
default=True,
required=True)
body_css_class = TextLine(title=_("Body HTML tag CSS class"),
required=False)
class IMyAMSConfiguration(Interface):
"""MyAMS application global configuration"""
title = TextLine(title=_("Title"),
description=_("Application title displayed in title bar"),
required=False)
description = TextLine(title=_("Description"),
description=_("Main application description"),
required=False)
author = TextLine(title=_("Author"),
description=_("Public author name"),
required=False)
icon = ImageField(title=_("Favorites icon"),
description=_("Please provide a transparent image of 32x32 pixels..."),
required=False)
logo = ImageField(title=_("Logo"),
description=_("Please provide a transparent image in PNG format..."),
required=False)
logo_title = TextLine(title=_("Logo title"),
description=_("This text will be used as logo alternate text"),
required=False)
custom_css = FileField(title=_("Custom CSS file"),
required=False)
custom_js = FileField(title=_("Custom javascript file"),
required=False)
google_analytics_key = TextLine(title=_("Google Analytics key"),
required=False)
uservoice_api_key = TextLine(title=_("UserVoice API key"),
description=_("This is the name of UserVoice javascript file"),
required=False)
login_header_info = Text(title=_("Login page header info"),
description=_("This text will be displayed in login page header. "
"You can use reStructuredText syntax."),
required=False)
login_footer_info = Text(title=_("Login page footer info"),
description=_("This text will be displayed in login page footer. "
"You can use reStructuredText syntax."),
required=False)
static_configuration = Attribute(_("Application static configuration utility"))
def getUserEmail(self):
"""Get current user email address"""
class IMyAMSConfigurationTarget(Interface):
"""MyAMS configuration marker interface""" | ztfy.myams | /ztfy.myams-0.1.33.tar.gz/ztfy.myams-0.1.33/src/ztfy/myams/interfaces/configuration.py | configuration.py |
# import standard packages
# import Zope3 interfaces
from zope.viewlet.interfaces import IViewletManager, IViewlet
# import local interfaces
# import Zope3 packages
from zope.schema import TextLine, Bool, Dict
# import local packages
from ztfy.myams import _
class IMainMenusViewletManager(IViewletManager):
"""Main menu viewlet manager"""
class IMenu(IViewlet):
"""Menu interface"""
header = TextLine(title=_("Menu header"),
required=False)
class IMenuItem(IViewlet):
"""Menu item interface
A menu is a viewlet as well as a viewlets manager,
containing sub-menus
"""
css_class = TextLine(title=_("CSS class"),
required=False)
icon_class = TextLine(title=_("Icon CSS class"),
required=False)
label = TextLine(title=_("Menu title"),
required=False)
badge = TextLine(title=_("Badge text"),
required=False)
badge_class = TextLine(title=_("Badge CSS class"),
required=False)
notice = TextLine(title=_("Notice text"),
required=False)
notice_class = TextLine(title=_("Notice CSS class"),
required=False)
click_handler = TextLine(title=_("Menu click handler"),
required=False)
url = TextLine(title=_("Menu link location"),
required=False,
default=u'#')
target = TextLine(title=_("Menu link target window"),
required=False)
modal_target = Bool(title=_("Modal target"),
required=False,
default=False)
data = Dict(title=_("Menu data attributes"),
key_type=TextLine(),
value_type=TextLine(),
required=False)
def getURL(self):
"""Get menu target URL"""
def getDataAttributes(self):
"""Get data attributes""" | ztfy.myams | /ztfy.myams-0.1.33.tar.gz/ztfy.myams-0.1.33/src/ztfy/myams/viewlet/menu/interfaces.py | interfaces.py |
# import standard packages
# import Zope3 interfaces
# import local interfaces
from ztfy.myams.viewlet.menu.interfaces import IMainMenusViewletManager, IMenu, IMenuItem
# import Zope3 packages
from zope.interface import implements
from zope.schema.fieldproperty import FieldProperty
# import local packages
from ztfy.baseskin.viewlet import WeightViewletManagerBase, ViewletBase
class MainMenusViewletManager(WeightViewletManagerBase):
"""Mains menus viewlet manager"""
implements(IMainMenusViewletManager)
class Menu(WeightViewletManagerBase, ViewletBase):
"""Menu header"""
implements(IMenu)
header = FieldProperty(IMenu['header'])
def __init__(self, context, request, view, manager=None):
WeightViewletManagerBase.__init__(self, context, request, view)
ViewletBase.__init__(self, context, request, view, manager)
def update(self):
WeightViewletManagerBase.update(self)
def render(self):
return ViewletBase.render(self)
class MenuItem(WeightViewletManagerBase, ViewletBase):
"""Menu viewlet"""
implements(IMenuItem)
css_class = FieldProperty(IMenuItem['css_class'])
icon_class = FieldProperty(IMenuItem['icon_class'])
label = FieldProperty(IMenuItem['label'])
badge = FieldProperty(IMenuItem['badge'])
badge_class = FieldProperty(IMenuItem['badge_class'])
notice = FieldProperty(IMenuItem['notice'])
notice_class = FieldProperty(IMenuItem['notice_class'])
click_handler = FieldProperty(IMenuItem['click_handler'])
url = FieldProperty(IMenuItem['url'])
target = FieldProperty(IMenuItem['target'])
modal_target = FieldProperty(IMenuItem['modal_target'])
data = FieldProperty(IMenuItem['data'])
def __init__(self, context, request, view, manager=None):
WeightViewletManagerBase.__init__(self, context, request, view)
ViewletBase.__init__(self, context, request, view, manager)
def update(self):
WeightViewletManagerBase.update(self)
def render(self):
return ViewletBase.render(self)
def getURL(self):
return self.url
def getDataAttributes(self):
data = self.data.copy()
if self.click_handler:
data.update({'data-ams-click-handler': self.click_handler})
return ' '.join('%s=%s' % item for item in data.iteritems())
class MenuDivider(ViewletBase):
"""Menu divider viewlet"""
implements(IMenuItem)
header = None
css_class = 'divider'
icon_class = None
label = None
badge = None
badge_class = None
notice = None
notice_class = None
click_handler = None
url = None
target = None
modal_target = False
data = None
def getURL(self):
return None | ztfy.myams | /ztfy.myams-0.1.33.tar.gz/ztfy.myams-0.1.33/src/ztfy/myams/viewlet/menu/__init__.py | __init__.py |
# import standard packages
# import Zope3 interfaces
# import local interfaces
from ztfy.myams.viewlet.toplinks.interfaces import ITopLinksViewletManager, ITopLinksViewlet, ITopLinksMenu, \
ITopTabsViewlet, ITopTabsTab
# import Zope3 packages
from zope.i18n import translate
from zope.interface import implements
from zope.viewlet.manager import WeightOrderedViewletManager
# import local packages
from ztfy.baseskin.viewlet import WeightViewletManagerBase, ViewletBase
class TopLinksViewletManager(WeightOrderedViewletManager):
"""Top links viewlet manager"""
implements(ITopLinksViewletManager)
#
# Top links viewlet
#
class TopLinksViewlet(WeightViewletManagerBase, ViewletBase):
"""Top links viewlet"""
implements(ITopLinksViewlet)
label = u"Label:"
css_class = u'top-menu'
dropdown_label = u"Dropdown label"
def __init__(self, context, request, view, manager=None):
WeightViewletManagerBase.__init__(self, context, request, view)
ViewletBase.__init__(self, context, request, view, manager)
def update(self):
WeightViewletManagerBase.update(self)
class TopLinksMenu(ViewletBase):
"""Top link menu"""
implements(ITopLinksMenu)
css_class = u""
label = u"Menu label"
click_handler = None
url = u"#"
data = {}
def render(self):
if self.css_class == u'divider':
return u'<li class="divider"></li>'
else:
label = translate(self.label, context=self.request)
return u'''<li class="%s">
<a href="%s" %s>%s</a>
</li>''' % (self.css_class,
self.url,
self.getDataAttributes(),
unicode(label, 'utf-8') if isinstance(label, str) else label)
def getDataAttributes(self):
data = self.data.copy()
if self.click_handler:
data.update({'data-ams-click-handler': self.click_handler})
return ' '.join('%s=%s' % item for item in data.iteritems())
#
# Top tabs viewlet
#
class TopTabsViewlet(WeightViewletManagerBase, ViewletBase):
"""Top tabs viewlet"""
implements(ITopTabsViewlet)
label = u"Label:"
css_class = u'top-tabs'
def __init__(self, context, request, view, manager=None):
WeightViewletManagerBase.__init__(self, context, request, view)
ViewletBase.__init__(self, context, request, view, manager)
def update(self):
WeightViewletManagerBase.update(self)
class TopTabsTab(ViewletBase):
"""Top tabs tab"""
implements(ITopTabsTab)
css_class = u""
label = u"Tab label"
click_handler = None
url = u"#"
data = {'data-toggle': 'tab'}
def render(self):
label = translate(self.label, context=self.request)
return u'''<li class="%s">
<a href="%s" %s>%s</a>
</li>''' % (self.css_class,
self.url,
self.getDataAttributes(),
unicode(label, 'utf-8') if isinstance(label, str) else label)
def getDataAttributes(self):
data = self.data.copy()
if self.click_handler:
data.update({'data-ams-click-handler': self.click_handler})
return ' '.join('%s=%s' % item for item in data.iteritems()) | ztfy.myams | /ztfy.myams-0.1.33.tar.gz/ztfy.myams-0.1.33/src/ztfy/myams/viewlet/toplinks/__init__.py | __init__.py |
(function ($, globals) {
'use strict';
$(document).ready(function () {
$("body").append("<div id='divSmallBoxes'></div>")
.append("<div id='divMiniIcons'></div>")
.append("<div id='divBigBoxes'></div>");
});
function SmartUnLoading() {
$(".divMessageBox").fadeOut(300, function () {
$(this).remove();
});
$(".LoadingBoxContainer").fadeOut(300, function () {
$(this).remove();
});
}
var ExistMsg = 0,
SmartMSGboxCount = 0,
heightPrev,
BigBoxes = 0,
SmallBoxes = 0,
SmallBoxesAnchos = 0;
var MyAMS = globals.MyAMS;
MyAMS.notify = {
messageBox: function (options, callback) {
var SmartMSG,
Content,
isIE8 = MyAMS.browser.isIE8orlower();
var defaults = {
title: "",
content: "",
status: "",
NormalButton: undefined,
ActiveButton: undefined,
buttons: undefined,
input: undefined,
placeholder: "",
options: undefined,
sound: undefined
};
var settings = $.extend({}, defaults, options);
if (settings.sound && (isIE8 === 0)) {
var audioElement = document.createElement("audio");
if (navigator.userAgent.match("Firefox/")) {
audioElement.setAttribute("src", MyAMS.baseURL + '../sound/message.ogg');
} else {
audioElement.setAttribute("src", MyAMS.baseURL + '../sound/message.mp3');
}
$.get();
audioElement.addEventListener("load", function () {
audioElement.play();
}, true);
audioElement.pause();
audioElement.play();
}
SmartMSGboxCount = SmartMSGboxCount + 1;
if (ExistMsg === 0) {
ExistMsg = 1;
SmartMSG = "<div class='MessageBox animated fadeIn fast' id='MsgBoxBack'></div>";
$("body").append(SmartMSG);
if (MyAMS.browser.isIE8orlower() === 1) {
$("#MsgBoxBack").addClass("MessageIE");
}
}
var i;
var InputType = "";
var HasInput = 0;
var Name = "";
var NumButtons = 0;
var btnClass;
if (settings.input !== undefined) {
HasInput = 1;
settings.input = settings.input.toLowerCase();
switch (settings.input) {
case "text":
InputType = "<input class='form-control' type='" + settings.input + "' id='txt" + SmartMSGboxCount + "' placeholder='" + settings.placeholder + "'/><br/><br/>";
break;
case "password":
InputType = "<input class='form-control' type='" + settings.input + "' id='txt" + SmartMSGboxCount + "' placeholder='" + settings.placeholder + "'/><br/><br/>";
break;
case "select":
if (settings.options === undefined) {
if (globals.alert) {
globals.alert("For this type of input, the options parameter is required.");
}
} else {
InputType = "<select class='form-control' id='txt" + SmartMSGboxCount + "'>";
for (i=0; i <= settings.options.length - 1; i++) {
if (settings.options[i] === "[") {
Name = "";
} else {
if (settings.options[i] === "]") {
NumButtons = NumButtons + 1;
Name = "<option>" + Name + "</option>";
InputType += Name;
} else {
Name += settings.options[i];
}
}
}
InputType += "</select>";
}
break;
default:
if (globals.alert) {
globals.alert("That type of input is not handled yet");
}
}
}
Content = "<div class='MessageBoxContainer " + settings.status + " animated fadeIn fast' id='Msg" + SmartMSGboxCount + "'>";
Content += "<div class='MessageBoxMiddle'>";
Content += "<span class='MsgTitle'>" + settings.title + "</span class='MsgTitle'>";
Content += "<p class='pText'>" + settings.content + "</p>";
Content += InputType;
Content += "<div class='MessageBoxButtonSection'>";
if (settings.buttons === undefined) {
settings.buttons = "[Accept]";
}
settings.buttons = $.trim(settings.buttons);
settings.buttons = settings.buttons.split("");
if (settings.NormalButton === undefined) {
settings.NormalButton = "#232323";
}
if (settings.ActiveButton === undefined) {
settings.ActiveButton = "#ed145b";
}
for (i=0; i <= settings.buttons.length - 1; i++) {
if (settings.buttons[i] === "[") {
Name = "";
} else {
if (settings.buttons[i] === "]") {
NumButtons = NumButtons + 1;
if (NumButtons === 1) {
btnClass = 'btn-primary';
} else {
btnClass = 'btn-default';
}
Name = "<button id='bot" + NumButtons + "-Msg" + SmartMSGboxCount + "' class='btn " + btnClass + " btn-sm botTempo'> " + Name + "</button>";
Content += Name;
} else {
Name += settings.buttons[i];
}
}
}
Content += "</div>";
Content += "</div>";
Content += "</div>";
if (SmartMSGboxCount > 1) {
$(".MessageBoxContainer").hide();
$(".MessageBoxContainer").css("z-index", 99999);
}
$(".MessageBox").append(Content);
if (HasInput === 1) {
$("#txt" + SmartMSGboxCount).focus();
}
$(".botTempo").hover(function () {
var ThisID = $(this).attr("id");
}, function () {
var ThisID = $(this).attr("id");
});
$(".botTempo").click(function () {
var ThisID = $(this).attr("id");
var MsgBoxID = ThisID.substr(ThisID.indexOf("-") + 1);
var Press = $.trim($(this).text());
if (HasInput === 1) {
if (typeof callback === "function") {
var IDNumber = MsgBoxID.replace("Msg", "");
var Value = $("#txt" + IDNumber).val();
if (callback) {
callback(Press, Value);
}
}
} else {
if (typeof callback === "function") {
if (callback) {
callback(Press);
}
}
}
$("#" + MsgBoxID).addClass("animated fadeOut fast");
SmartMSGboxCount = SmartMSGboxCount - 1;
if (SmartMSGboxCount === 0) {
$("#MsgBoxBack").removeClass("fadeIn").addClass("fadeOut").delay(300).queue(function () {
ExistMsg = 0;
$(this).remove();
});
}
});
},
bigBox: function (settings, callback) {
var boxBig, content;
settings = $.extend({
title: "",
content: "",
icon: undefined,
number: undefined,
color: undefined,
sound: true,
timeout: undefined,
colortime: 1500,
colors: undefined
}, settings);
if (settings.sound === true) {
if (MyAMS.browser.isIE8orlower() === 0) {
var audioElement = document.createElement("audio");
if (navigator.userAgent.match("Firefox/")) {
audioElement.setAttribute("src", MyAMS.baseURL + '../snd/bigbox.ogg');
} else {
audioElement.setAttribute("src", MyAMS.baseURL + '../snd/bigbox.mp3');
}
$.get();
audioElement.addEventListener("load", function () {
audioElement.play();
}, true);
audioElement.pause();
audioElement.play();
}
}
BigBoxes = BigBoxes + 1;
boxBig = "<div id='bigBox" + BigBoxes + "' class='BigBox animated fadeIn fast'><div id='bigBoxColor" + BigBoxes + "'><i class='btnClose fa fa-times' id='btnClose" + BigBoxes + "'></i>";
if (settings.icon === undefined) {
settings.icon = "fa fa-cloud";
}
boxBig += "<span><i class='" + settings.icon + "'></i> " + settings.title + "</span>";
boxBig += "<p>" + settings.content + "</p>";
boxBig += "<div class='bigboxnumber'>";
if (settings.number !== undefined) {
boxBig += settings.number;
}
boxBig += "</div></div>";
boxBig += "</div>";
$("#divBigBoxes").append(boxBig);
if (settings.color === undefined) {
settings.color = "#004d60";
}
$("#bigBox" + BigBoxes).css("background-color", settings.color);
$("#divMiniIcons").append("<div id='miniIcon" + BigBoxes + "' class='cajita animated fadeIn' style='background-color: " + settings.color + ";'><i class='" + settings.icon + "'/></i></div>");
$("#miniIcon" + BigBoxes).bind("click", function () {
var FrontBox = $(this).attr("id");
var FrontBigBox = FrontBox.replace("miniIcon", "bigBox");
var FronBigBoxColor = FrontBox.replace("miniIcon", "bigBoxColor");
$(".cajita").each(function (index) {
var BackBox = $(this).attr("id");
var BigBoxID = BackBox.replace("miniIcon", "bigBox");
$("#" + BigBoxID).css("z-index", 9998);
});
$("#" + FrontBigBox).css("z-index", 9999);
$("#" + FronBigBoxColor).removeClass("animated fadeIn").delay(1).queue(function () {
$(this).show();
$(this).addClass("animated fadeIn");
$(this).clearQueue();
});
});
var ThisBigBoxCloseCross = $("#btnClose" + BigBoxes);
var ThisBigBox = $("#bigBox" + BigBoxes);
var ThisMiniIcon = $("#miniIcon" + BigBoxes);
var ColorTimeInterval;
if (settings.colors !== undefined && settings.colors.length > 0) {
ThisBigBoxCloseCross.attr("colorcount", "0");
ColorTimeInterval = setInterval(function () {
var ColorIndex = ThisBigBoxCloseCross.attr("colorcount");
ThisBigBoxCloseCross.animate({
backgroundColor: settings.colors[ColorIndex].color
});
ThisBigBox.animate({
backgroundColor: settings.colors[ColorIndex].color
});
ThisMiniIcon.animate({
backgroundColor: settings.colors[ColorIndex].color
});
if (ColorIndex < settings.colors.length - 1) {
ThisBigBoxCloseCross.attr("colorcount", ((ColorIndex * 1) + 1));
} else {
ThisBigBoxCloseCross.attr("colorcount", 0);
}
}, settings.colortime);
}
ThisBigBoxCloseCross.bind("click", function () {
clearInterval(ColorTimeInterval);
if (typeof callback === "function") {
if (callback) {
callback();
}
}
var FrontBox = $(this).attr("id");
var FrontBigBox = FrontBox.replace("btnClose", "bigBox");
var miniIcon = FrontBox.replace("btnClose", "miniIcon");
$("#" + FrontBigBox).removeClass("fadeIn fast");
$("#" + FrontBigBox).addClass("fadeOut fast").delay(300).queue(function () {
$(this).clearQueue();
$(this).remove();
});
$("#" + miniIcon).removeClass("fadeIn fast");
$("#" + miniIcon).addClass("fadeOut fast").delay(300).queue(function () {
$(this).clearQueue();
$(this).remove();
});
});
if (settings.timeout !== undefined) {
var TimedID = BigBoxes;
setTimeout(function () {
clearInterval(ColorTimeInterval);
var box = $("#bigBox" + TimedID);
box.removeClass("fadeIn fast");
box.addClass("fadeOut fast").delay(300).queue(function () {
$(this).clearQueue();
$(this).remove();
});
var icon = $("#miniIcon" + TimedID);
icon.removeClass("fadeIn fast");
icon.addClass("fadeOut fast").delay(300).queue(function () {
$(this).clearQueue();
$(this).remove();
});
}, settings.timeout);
}
},
smallBox: function (settings, callback) {
var BoxSmall, content;
settings = $.extend({
title: "",
content: "",
icon: undefined,
iconSmall: undefined,
sound: true,
color: undefined,
timeout: undefined,
colortime: 1500,
colors: undefined
}, settings);
if (settings.sound === true) {
if (MyAMS.browser.isIE8orlower() === 0) {
var audioElement = document.createElement("audio");
if (navigator.userAgent.match("Firefox/")) {
audioElement.setAttribute("src", MyAMS.baseURL + '../snd/smallbox.ogg');
} else {
audioElement.setAttribute("src", MyAMS.baseURL + '../snd/smallbox.mp3');
}
$.get();
audioElement.addEventListener("load", function () {
audioElement.play();
}, true);
audioElement.pause();
audioElement.play();
}
}
SmallBoxes = SmallBoxes + 1;
BoxSmall = "";
var IconSection = "",
CurrentIDSmallbox = "smallbox" + SmallBoxes;
if (settings.iconSmall === undefined) {
IconSection = "<div class='miniIcon'></div>";
} else {
IconSection = "<div class='miniIcon'><i class='miniPic " + settings.iconSmall + "'></i></div>";
} if (settings.icon === undefined) {
BoxSmall = "<div id='smallbox" + SmallBoxes + "' class='SmallBox animated fadeInRight fast'><div class='textoFull'><span>" + settings.title + "</span><p>" + settings.content + "</p></div>" + IconSection + "</div>";
} else {
BoxSmall = "<div id='smallbox" + SmallBoxes + "' class='SmallBox animated fadeInRight fast'><div class='foto'><i class='" + settings.icon + "'></i></div><div class='textoFoto'><span>" + settings.title + "</span><p>" + settings.content + "</p></div>" + IconSection + "</div>";
} if (SmallBoxes === 1) {
$("#divSmallBoxes").append(BoxSmall);
SmallBoxesAnchos = $("#smallbox" + SmallBoxes).height() + 40;
} else {
var SmartExist = $(".SmallBox").size();
if (SmartExist === 0) {
$("#divSmallBoxes").append(BoxSmall);
SmallBoxesAnchos = $("#smallbox" + SmallBoxes).height() + 40;
} else {
$("#divSmallBoxes").append(BoxSmall);
$("#smallbox" + SmallBoxes).css("top", SmallBoxesAnchos);
SmallBoxesAnchos = SmallBoxesAnchos + $("#smallbox" + SmallBoxes).height() + 20;
$(".SmallBox").each(function (index) {
if (index === 0) {
$(this).css("top", 20);
heightPrev = $(this).height() + 40;
SmallBoxesAnchos = $(this).height() + 40;
} else {
$(this).css("top", heightPrev);
heightPrev = heightPrev + $(this).height() + 20;
SmallBoxesAnchos = SmallBoxesAnchos + $(this).height() + 20;
}
});
}
}
var ThisSmallBox = $("#smallbox" + SmallBoxes);
if (settings.color === undefined) {
ThisSmallBox.css("background-color", "#004d60");
} else {
ThisSmallBox.css("background-color", settings.color);
}
var ColorTimeInterval;
if (settings.colors !== undefined && settings.colors.length > 0) {
ThisSmallBox.attr("colorcount", "0");
ColorTimeInterval = setInterval(function () {
var ColorIndex = ThisSmallBox.attr("colorcount");
ThisSmallBox.animate({
backgroundColor: settings.colors[ColorIndex].color
});
if (ColorIndex < settings.colors.length - 1) {
ThisSmallBox.attr("colorcount", ((ColorIndex * 1) + 1));
} else {
ThisSmallBox.attr("colorcount", 0);
}
}, settings.colortime);
}
if (settings.timeout !== undefined) {
setTimeout(function () {
clearInterval(ColorTimeInterval);
var ThisHeight = $(this).height() + 20;
var ID = CurrentIDSmallbox;
var ThisTop = $("#" + CurrentIDSmallbox).css("top");
if ($("#" + CurrentIDSmallbox + ":hover").length !== 0) {
$("#" + CurrentIDSmallbox).on("mouseleave", function () {
SmallBoxesAnchos = SmallBoxesAnchos - ThisHeight;
$("#" + CurrentIDSmallbox).remove();
if (typeof callback === "function") {
if (callback) {
callback();
}
}
var Primero = 1;
var heightPrev = 0;
$(".SmallBox").each(function (index) {
if (index === 0) {
$(this).animate({
top: 20
}, 300);
heightPrev = $(this).height() + 40;
SmallBoxesAnchos = $(this).height() + 40;
} else {
$(this).animate({
top: heightPrev
}, 350);
heightPrev = heightPrev + $(this).height() + 20;
SmallBoxesAnchos = SmallBoxesAnchos + $(this).height() + 20;
}
});
});
} else {
clearInterval(ColorTimeInterval);
SmallBoxesAnchos = SmallBoxesAnchos - ThisHeight;
if (typeof callback === "function") {
if (callback) {
callback();
}
}
$("#" + CurrentIDSmallbox).removeClass().addClass("SmallBox").animate({
opacity: 0
}, 300, function () {
$(this).remove();
var Primero = 1;
var heightPrev = 0;
$(".SmallBox").each(function (index) {
if (index === 0) {
$(this).animate({
top: 20
}, 300);
heightPrev = $(this).height() + 40;
SmallBoxesAnchos = $(this).height() + 40;
} else {
$(this).animate({
top: heightPrev
});
heightPrev = heightPrev + $(this).height() + 20;
SmallBoxesAnchos = SmallBoxesAnchos + $(this).height() + 20;
}
});
});
}
}, settings.timeout);
}
$("#smallbox" + SmallBoxes).bind("click", function () {
clearInterval(ColorTimeInterval);
if (typeof callback === "function") {
if (callback) {
callback();
}
}
var ThisHeight = $(this).height() + 20;
var ID = $(this).attr("id");
var ThisTop = $(this).css("top");
SmallBoxesAnchos = SmallBoxesAnchos - ThisHeight;
$(this).removeClass().addClass("SmallBox").animate({
opacity: 0
}, 300, function () {
$(this).remove();
var Primero = 1;
var heightPrev = 0;
$(".SmallBox").each(function (index) {
if (index === 0) {
$(this).animate({
top: 20
}, 300);
heightPrev = $(this).height() + 40;
SmallBoxesAnchos = $(this).height() + 40;
} else {
$(this).animate({
top: heightPrev
}, 350);
heightPrev = heightPrev + $(this).height() + 20;
SmallBoxesAnchos = SmallBoxesAnchos + $(this).height() + 20;
}
});
});
});
}
};
})(jQuery, this); | ztfy.myams | /ztfy.myams-0.1.33.tar.gz/ztfy.myams-0.1.33/src/ztfy/myams/resources/js/myams-notify.js | myams-notify.js |
!function(e,t){"use strict";function i(t,i){this.widget=t,this.options=e.extend({},a.defaults,i),this.grid=this.widget.parents(this.options.grid),this.hasGrid=this.grid.exists(),this.gridId=this.grid.attr("id"),this.controls=this.options.controls,this.toggleClass=this.options.toggleClass.split("|"),this.editClass=this.options.editClass.split("|"),this.fullscreenClass=this.options.fullscreenClass.split("|"),this.customClass=this.options.customClass.split("|"),this.init()}var s=t.MyAMS;i.prototype={init:function(){var i,n=this;if(!0===n.options.rtl&&e("body").addClass("rtl"),n.grid.each(function(){e(this).addClass("sortable-grid")}),n._getSettings(),n.hasGrid&&n.storage){var d;if(n.position){var o=JSON.parse(n.position);for(d in o.grid)if(o.grid.hasOwnProperty(d)){var l=n.grid.find(n.options.subgrid+".sortable-grid").eq(d);for(var r in o.grid[d].section)o.grid[d].section.hasOwnProperty(r)&&l.append(e("#"+o.grid[d].section[r].id))}}if(n.settings){var g=JSON.parse(n.settings);for(d in g.widget)if(g.widget.hasOwnProperty(d)&&(i=g.widget[d]).id){var c=e("#"+i.id);if(c.exists()){i.style&&c.removeClassPrefix("ams-widget-color-").addClass(i.style).attr("data-widget-attstyle",i.style),1===i.hidden?c.hide(1):c.show(1).removeAttr("data-widget-hidden"),1===i.collapsed&&c.addClass("ams-widget-collapsed").children("div").hide(1);var m=c.children("header").children("h2");m.text()!==i.title&&m.text(i.title)}}}}var u=(i=n.widget).data(),h={grid:u.amsWidgetGrid,subgrid:u.amsWudgetSubgrid,widgets:u.amsWidgetWidgets,controls:u.amsWidgetControls,storage:u.amsWidgetStorage,deleteSettingsKey:u.amsWidgetDeleteSettingsKey,deletePositionKey:u.amsWidgetDeletePositionKey,sortable:u.amsWidgetSortable,hiddenButtons:u.amsWidgetHiddenButtons,toggleButton:u.amsWidgetToggleButton,toggleClass:u.amsWidgetToggleClass,onToggle:s.getFunctionByName(u.amsWidgetToggleCallback),deleteButton:u.amsWidgetDeleteButton,deleteClass:u.amsWidgetDeleteClass,onDelete:s.getFunctionByName(u.amsWidgetDeleteCallback),editButton:u.amsWidgetEditButton,editPlaceholder:u.amsWidgetEditPlaceholder,editClass:u.amsWidgetEditClass,onEdit:s.getFunctionByName(u.amsWidgetEditCallback),fullscreenButton:u.amsWidgetFullscreenButton,fullscreenClass:u.amsWidgetFullscreenClass,fullscreenDiff:u.amsWidgetFullscreenDiff,onFullscreen:s.getFunctionByName(u.amsWidgetFullscreenCallback),customButton:u.amsWidgetCustomButton,customClass:u.amsWidgetCustomClass,customStart:s.getFunctionByName(u.amsWidgetCustomStartCallback),customEnd:s.getFunctionByName(u.amsWidgetCustomEndCallback),buttonsOrder:u.amsWidgetButtonsOrder,opacity:u.amsWidgetOpacity,dragHandle:u.amsWidgetDragHandle,placeholderClass:u.amsWidgetPlaceholderClass,indicator:u.amsWidgetIndicator,indicatorTime:u.amsWidgetIndicatorTime,ajax:u.amsWidgetAjax,timestampPlaceholder:u.amsWidgetTimestampPlaceholder,timestampFormat:u.amsWidgetTimestampFormat,refreshButton:u.amsWidgetRefreshButton,refreshClass:u.amsWidgetRefreshClass,errorLabel:u.amsWidgetErrorLabel,updatedLabel:u.amsWidgetUpdatedLabel,refreshLabel:u.amsWidgetRefreshLabel,deleteLabel:u.amsWidgetDeleteLabel,afterLoad:s.getFunctionByName(u.amsWidgetAfterLoadCallback),rtl:u.amsWidgetRtl,onChange:s.getFunctionByName(u.amsWidgetChangeCallback),onSave:s.getFunctionByName(u.amsWidgetSaveCallback),ajax_nav:s.ajax_nav},f=e.extend({},n.options,h),p=i.children("header");if(!p.parent().attr("role")){var v,C,w,W,b,y;if(!0===u.widgetHidden&&i.hide(),!0===u.widgetCollapsed&&i.addClass("ams-widget-collapsed").children("div").hide(),v=f.customButton&&void 0===u.widgetCustombutton&&0!==n.customClass[0].length?'<a href="#" class="button-icon ams-widget-custom-btn"><i class="'+n.customClass[0]+'"></i></a>':"",C=f.deleteButton&&void 0===u.widgetDeleteButton?'<a href="#" class="button-icon ams-widget-delete-btn hint" title="'+a.i18n.DELETE_BTN+'" data-ams-hint-gravity="se"><i class="'+f.deleteClass+'"></i></a>':"",f.editButton&&void 0===u.widgetEditButton){var B=f.editClass.split("|")[0];w='<a href="#" class="button-icon ams-widget-edit-btn hint" title="'+a.i18n.EDIT_BTN+'" data-ams-hint-gravity="se"><i class="'+B+'"></i></a>'}else w="";if(f.fullscreenButton&&void 0===u.widgetFullscreenButton){var E=f.fullscreenClass.split("|")[0];W='<a href="#" class="button-icon ams-widget-fullscreen-btn hint" title="'+a.i18n.FULLSCREEN_BTN+'" data-ams-hint-gravity="se"><i class="'+E+'"></i></a>'}else W="";if(f.toggleButton&&void 0===u.widgetToggleButton){var S,L=f.toggleClass.split("|");S=!0===i.dataWidgetCollapsed||i.hasClass("ams-widget-collapsed")?L[1]:L[0],b='<a href="#" class="button-icon ams-widget-toggle-btn hint" title="'+a.i18n.COLLAPSE_BTN+'" data-ams-hint-gravity="se"><i class="'+S+'"></i></a>'}else b="";y=f.refreshButton&&void 0===u.widgetRefreshButton&&u.widgetLoad?'<a href="#" class="button-icon ams-widget-refresh-btn hint" title="'+a.i18n.REFRESH_BTN+'" data-loading-text=" '+a.i18n.LOADING_MSG+' " data-ams-hint-gravity="se"><i class="'+f.refreshClass+'"></i></a>':"";var _=f.buttonsOrder.replace(/%refresh%/,y).replace(/%custom%/,v).replace(/%edit%/,w).replace(/%toggle%/,b).replace(/%fullscreen%/,W).replace(/%delete%/,C);(y||v||w||b||W||C)&&p.prepend('<div class="ams-widget-ctrls">'+_+"</div>"),f.sortable&&void 0===u.widgetSortable&&i.addClass("ams-widget-sortable");var T=i.find(f.editPlaceholder);T.length>0&&T.find("input").val(e.trim(p.children("h2").text())),p.append('<span class="ams-widget-loader"><i class="fa fa-refresh fa-spin"></i></span>'),i.attr("role","widget").children("div").attr("role","content").prev("header").attr("role","heading").children("div").attr("role","menu"),s.plugins.enabled.hint(p)}i.data("widget-options",f),n.options.hiddenButtons&&e(n.controls).hide(),i.find("[data-widget-load]").each(function(){var t=e(this),i=t.children(),s=t.data("widget-load"),a=1e3*t.data("widget-refresh");t.find(".ams-widget-ajax-placeholder").length<=0&&(t.children("widget-body").append('<div class="ams-widget-ajax-placeholder">'+n.options.loadingLabel+"</div>"),a>0?(n.loadAjaxFile(t,s,i),setInterval(function(){n._loadAjaxFile(t,s,i)},a)):n._loadAjaxFile(t,s,i))}),n.options.hiddenButtons&&n.widget.children("header").hover(function(){e(this).children(n.controls).stop(!0,!0).fadeTo(100,1)},function(){e(this).children(n.controls).stop(!0,!0).fadeTo(100,0)}),n._setClickEvents(),e(n.options.deleteSettingsKey).on(n.clickEvent,this,function(e){n.storage&&t.confirm&&t.confirm(n.options.settingsKeyLabel)&&n.storage.removeItem(n.settingsKey),e.preventDefault()}),e(n.options.deletePositionKey).on(n.clickEvent,this,function(e){n.storage&&t.confirm&&t.confirm(n.options.positionKeyLabel)&&n.storage.removeItem(n.positionKey),e.preventDefault()}),n.storage&&((null===n.settingsKey||n.settingsKey.length<1)&&n._saveWidgetSettings(),(null===n.positionKey||n.positionKey.length<1)&&n._saveWidgetPosition()),n.grid.data("ams-widgets-loaded",!0)},destroy:function(){var e=this;e.widgets.off("click",e._setClickEvents()),e.element.removeData("AMSWidget")},_getSettings:function(){var e=this;if(e.hasGrid&&e.gridId)switch(e.options.storage){case"local":e.storage=localStorage;break;case"session":e.storage=sessionStorage;break;default:e.storage=null}else e.storage=null;null!==e.storage&&function(){var t,i=+new Date;try{return e.storage.setItem(i,i),t=parseInt(e.storage.getItem(i))===i,e.storage.removeItem(i),t}catch(e){}}()&&(e.settingsKey="AMS_settings_"+location.pathname+location.hash+"_"+e.gridId,e.settings=e.storage.getItem(e.settingsKey),e.positionKey="AMS_position_"+location.pathname+location.hash+"_"+e.gridId,e.position=e.storage.getItem(e.positionKey)),"ontouchstart"in t||t.DocumentTouch&&t.document instanceof t.DocumentTouch?e.clickEvent="touchstart":e.clickEvent="click"},_runLoaderWidget:function(e){var t=this;t.options.indicator&&e.find(".ams-widget-loader").stop(!0,!0).fadeIn(100).delay(t.options.indicatorTime).fadeOut(100)},_loadAjaxFile:function(e,t,i){s.skin.loadURL(e,t.find(".widget-body"))},_saveWidgetSettings:function(){var t=this;if(t._getSettings(),t.storage){var i=[];t.grid.find(t.options.widgets).each(function(){var t=e(this),s={};s.id=t.attr("id"),s.style=t.attr("data-widget-attstyle"),s.title=t.children("header").children("h2").text(),s.hidden=t.is(":hidden")?1:0,s.collapsed=t.hasClass("ams-widget-collapsed")?1:0,i.push(s)});var s=JSON.stringify({widget:i});t.settings!==s&&t.storage.setItem(t.settingsKey,s),"function"==typeof t.options.onSave&&t.options.onSave.call(this,null,i)}},_saveWidgetPosition:function(){var t=this;if(t._getSettings(),t.storage){var i=[];t.grid.find(t.options.subgrid+".sortable-grid").each(function(){var s=[];e(this).children(t.options.widgets).each(function(){var t={};t.id=e(this).attr("id"),s.push(t)});var a={section:s};i.push(a)});var s=JSON.stringify({grid:i});t.position!==s&&t.storage.setItem(t.positionKey,s),"function"==typeof t.options.onSave&&t.options.onSave.call(this,null,i)}},_setClickEvents:function(){function t(){var t=e("#ams-widget-fullscreen-mode");if(t.length>0){var s=t.find(i.options.widgets),a=e(window).height(),n=s.children("header").height();s.children("div").height(a-n-15)}}var i=this;i._getSettings(),i.widget.on(i.clickEvent,".ams-widget-toggle-btn",function(t){t.preventDefault();var s=e(this),a=s.parents(i.options.widgets).first(),n=a.data("widget-options"),d=n.toggleClass.split("|");i._runLoaderWidget(a);var o=!0;a.hasClass("ams-widget-collapsed")?(n.onToggle&&(o=n.onToggle.call(this,a,"expand")),!1!==o&&(s.children().removeClass(d[1]).addClass(d[0]),a.removeClass("ams-widget-collapsed").children("[role=content]").slideDown(n.toggleSpeed,function(){i._saveWidgetSettings()}))):(n.onToggle&&(o=n.onToggle.call(this,a,"collapse")),!1!==o&&(s.children().removeClass(d[0]).addClass(d[1]),a.addClass("ams-widget-collapsed").children("[role=content]").slideUp(n.toggleSpeed,function(){i._saveWidgetSettings()})))}),i.widget.on("dblclick","header",function(t){e(".ams-widget-toggle-btn",this).click()}),i.widget.on(i.clickEvent,".ams-widget-fullscreen-btn",function(s){s.preventDefault();var a=e(this).parents(i.options.widgets),n=a.data("widget-options"),d=n.fullscreenClass.split("|"),o=a.children("div");i._runLoaderWidget(a),e("#ams-widget-fullscreen-mode").length>0?(e(".nooverflow").removeClass("nooverflow"),a.unwrap("<div>").children("div").removeAttr("style").end().find(".ams-widget-fullscreen-btn").children().removeClass(d[1]).addClass(d[0]).parents(i.controls).children("a").show(),o.hasClass("ams-widget-visible")&&o.hide().removeClass("ams-widget-visible")):(e("body").addClass("nooverflow"),a.wrap('<div id="ams-widget-fullscreen-mode"></div>').parent().find(".ams-widget-fullscreen-btn").children().removeClass(d[0]).addClass(d[1]).parents(i.controls).children("a:not(.ams-widget-fullscreen-btn)").hide(),o.is(":hidden")&&o.show().addClass("ams-widget-visible")),t(),"function"==typeof n.onFullscreen&&n.onFullscreen.call(this,a)}),e(window).resize(function(){t()}),i.widget.on(i.clickEvent,".ams-widget-edit-btn",function(t){t.preventDefault();var s=e(this),a=s.parents(i.options.widgets),n=a.data("widget-options"),d=n.editClass.split("|");i._runLoaderWidget(a);var o=a.find(n.editPlaceholder);o.is(":visible")?(s.children().removeClass(d[1]).addClass(d[0]),o.slideUp(n.editSpeed,function(){i._saveWidgetSettings()})):(s.children().removeClass(d[0]).addClass(d[1]),o.slideDown(n.editSpeed)),"function"==typeof n.onEdit&&n.onEdit.call(this,a)}),e(i.options.editPlaceholder).find("input").keyup(function(){e(this).parents(i.options.widgets).children("header").children("h2").text(e(this).val())}),i.widget.on(i.clickEvent,".ams-widget-custom-btn",function(t){t.preventDefault();var s=e(this),a=s.parents(i.options.widgets),n=a.data("widget-options"),d=n.customClass.split("|");i._runLoaderWidget(a),s.children("."+d[0]).length>0?(s.children().removeClass(d[0]).addClass(d[1]),"function"==typeof n.customStart&&n.customStart.call(this,a)):(s.children("."+d[1]).addClass(d[0]),"function"==typeof n.customEnd&&n.customEnd.call(this,a)),i._saveWidgetSettings()}),i.widget.on(i.clickEvent,".ams-widget-delete-btn",function(t){t.preventDefault();var n=e(this),d=n.parents(i.options.widgets),o=d.data("widget-options"),l=d.attr("id"),r=d.children("header").children("h2").text();s.ajax.check(s.notify,s.baseURL+"myams-notify"+(s.devmode?".js":".min.js"),function(){s.notify.messageBox({title:'<i class="fa fa-times" style="color: #ed1c24;"></i> '+o.deleteLabel+' "'+r+'"',content:a.i18n.DELETE_MSG,buttons:"["+s.i18n.BTN_OK+"]["+s.i18n.BTN_CANCEL+"]"},function(t){t===s.i18n.BTN_OK&&(i._runLoaderWidget(d),e("#"+l).fadeOut(o.deleteSpeed,function(){n.remove(),"function"==typeof o.onDelete&&o.onDelete.call(this,d)}))})})}),i.widget.on(i.clickEvent,".ams-widget-refresh-btn",function(t){t.preventDefault();var s=e(this),a=s.parents(i.options.widgets),n=a.data("widget-load"),d=a.children();s.button("loading"),d.addClass("widget-body-ajax-loading"),setTimeout(function(){s.button("reset"),d.removeClass("widget-body-ajax-loading"),i._loadAjaxFile(a,n,d)},1e3)})}};var a={i18n:e.extend({SETTINGS_KEY_LABEL:"Reset settings?",POSITION_KEY_LABEL:"Reset position?",TIMESTAMP_FORMAT:"Last update: %d%/%m%/%y% %h%:%i%:%s",ERROR_LABEL:"An error occured: ",UPDATED_LABEL:"Last update: ",REFRESH_LABEL:"Refresh",EDIT_BTN:"Edit title",DELETE_BTN:"Delete",DELETE_LABEL:"Remove component: ",DELETE_MSG:"WARNING: this action can't be undone!",FULLSCREEN_BTN:"Fullscreen",COLLAPSE_BTN:"Collapse",REFRESH_BTN:"Reload content",LOADING_MSG:"Loading..."},s.plugins.i18n.widgets),initWidgetsGrid:function(t){if(t.exists()){var i=e(".ams-widget:first",t).data("AMSWidget").options;if(i.sortable&&e.ui){var s=t.find(".sortable-grid").not("[data-widget-excludegrid]");s.sortable({items:s.find(".ams-widget-sortable"),connectWith:s,placeholder:i.placeholderClass,cursor:"move",revert:!0,opacity:i.opacity,delay:200,cancel:".button-icon, #ams-widget-fullscreen-mode >div",zIndex:1e4,handle:i.dragHandle,forcePlaceholderSize:!0,forceHelperSize:!0,update:function(e,t){var s=t.item.data("AMSWidget");s._runLoaderWidget(s.widget),s._saveWidgetPosition(),"function"==typeof i.onChange&&i.onChange.call(this,t.item)}})}}}};a.defaults={grid:".ams-widget-grid",subgrid:"section",widgets:".ams-widget",controls:".ams-widget-ctrls",storage:"local",deleteSettingsKey:"",settingsKeyLabel:a.i18n.SETTINGS_KEY_LABEL,deletePositionKey:"",positionKeyLabel:a.i18n.POSITION_KEY_LABEL,sortable:!0,hiddenButtons:!1,toggleButton:!0,toggleClass:"fa fa-minus|fa fa-plus",toggleSpeed:200,onToggle:null,deleteButton:!1,deleteClass:"fa fa-times",deleteSpeed:200,onDelete:null,editButton:!1,editPlaceholder:".ams-widget-editbox",editClass:"fa fa-cog|fa fa-save",editSpeed:200,onEdit:null,fullscreenButton:!1,fullscreenClass:"fa fa-expand|fa fa-compress",fullscreenDiff:3,onFullscreen:null,customButton:!1,customClass:"folder-10|next-10",customStart:null,customEnd:null,buttonsOrder:"%refresh% %custom% %edit% %toggle% %fullscreen% %delete%",opacity:1,dragHandle:"> header",placeholderClass:"ams-widget-placeholder",indicator:!0,indicatorTime:600,ajax:!0,timestampPlaceholder:".ams-widget-timestamp",timestampFormat:a.i18n.TIMESTAMP_FORMAT,refreshButton:!0,refreshButtonClass:"fa fa-refresh",errorLabel:a.i18n.ERROR_LABEL,updatedLabel:a.i18n.UPDATED_LABEL,refreshLabel:a.i18n.REFRESH_LABEL,deleteLabel:a.i18n.DELETE_LABEL,afterLoad:null,rtl:!1,onChange:null,onSave:null,ajax_nav:s.ajax_nav},t.MyAMSWidget=a,e.fn.extend({MyAMSWidget:function(t){return this.each(function(){var n=e(this);if(!n.data("AMSWidget")){var d=n.parents(t.grid||a.defaults.grid),o={};if(d.exists()){var l=d.data();o={grid:l.amsWidgetGrid,subgrid:l.amsWidgetSubgrid,controls:l.amsWidgetControls,storage:l.amsWidgetStorage,deleteSettingsKey:l.amsWidgetDeleteSettingsKey,deletePositionKey:l.amsWidgetDeletePositionKey,sortable:l.amsWidgetSortable,hiddenButtons:l.amsWidgetHiddenButtons,toggleButton:l.amsWidgetToggleButton,toggleClass:l.amsWidgetToggleClass,onToggle:s.getFunctionByName(l.amsWidgetToggleCallback),deleteButton:l.amsWidgetDeleteButton,deleteClass:l.amsWidgetDeleteClass,onDelete:s.getFunctionByName(l.amsWidgetDeleteCallback),editButton:l.amsWidgetEditButton,editPlaceholder:l.amsWidgetEditPlaceholder,editClass:l.amsWidgetEditClass,onEdit:s.getFunctionByName(l.amsWidgetEditCallback),fullscreenButton:l.amsWidgetFullscreenButton,fullscreenClass:l.amsWidgetFullscreenClass,fullscreenDiff:l.amsWidgetFullscreenDiff,onFullscreen:s.getFunctionByName(l.amsWidgetFullscreenCallback),customButton:l.amsWidgetCustomButton,customClass:l.amsWidgetCustomClass,customStart:s.getFunctionByName(l.amsWidgetCustomStartCallback),customEnd:s.getFunctionByName(l.amsWidgetCustomStartCallback),buttonsOrder:l.amsWidgetButtonsOrder,opacity:l.amsWidgetOpacity,dragHandle:l.amsWidgetDragHandle,placeholderClass:l.amsWidgetPlaceholderClass,indicator:l.amsWidgetIndicator,indicatorTime:l.amsWidgetIndicatorTime,ajax:l.amsWidgetAjax,timestampPlaceholder:l.amsWidgetTimestampPlaceholder,timestampFormat:l.amsWidgetTimestampFormat,refreshButton:l.amsWidgetRefreshButton,refreshClass:l.amsWidgetRefreshClass,errorLabel:l.amsWidgetErrorLabel,updatedLabel:l.amsWidgetUpdatedLabel,refreshLabel:l.amsWidgetRefreshLabel,deleteLabel:l.amsWidgetDeleteLabel,afterLoad:s.getFunctionByName(l.amsWidgetAfterLoadCallback),rtl:l.amsWidgetRtl,onChange:s.getFunctionByName(l.amsWidgetChangeCallback),onSave:s.getFunctionByName(l.amsWidgetSaveCallback),ajax_nav:s.ajax_nav}}var r=e.fn.extend({},o,n.data("ams-widget-options")||{},t);n.data("AMSWidget",new i(n,r))}})}})}(jQuery,this); | ztfy.myams | /ztfy.myams-0.1.33.tar.gz/ztfy.myams-0.1.33/src/ztfy/myams/resources/js/myams-widgets.min.js | myams-widgets.min.js |
(function(c,b){c.extend(true,c.fn.dataTable.defaults,{sDom:"R<'dt-top-row'CLF>r<'dt-wrapper't><'dt-row dt-bottom-row'<'row'<'col-sm-6'i><'col-sm-6 text-right'p>>",sPaginationType:"bootstrap",oLanguage:{sLengthMenu:"_MENU_",sSearch:"_INPUT_"}});c.extend(c.fn.dataTableExt.oStdClasses,{sWrapper:"dataTables_wrapper form-inline"});c.fn.dataTableExt.oApi.fnPagingInfo=function(e){return{iStart:e._iDisplayStart,iEnd:e.fnDisplayEnd(),iLength:e._iDisplayLength,iTotal:e.fnRecordsTotal(),iFilteredTotal:e.fnRecordsDisplay(),iPage:e._iDisplayLength===-1?0:Math.ceil(e._iDisplayStart/e._iDisplayLength),iTotalPages:e._iDisplayLength===-1?0:Math.ceil(e.fnRecordsDisplay()/e._iDisplayLength)}};c.fn.dataTableExt.aTypes.unshift(function(e){if(e!==null&&e.match(/^(0[1-9]|[1-2][0-9]|3[0-1])\/(0[1-9]|1[0-2])\/[0-3][0-9]{3}$/)){return"date-euro"}return null});c.fn.dataTableExt.aTypes.unshift(function(e){if(e!==null&&e.match(/^(0[1-9]|[1-2][0-9]|3[0-1])\/(0[1-9]|1[0-2])\/[0-3][0-9]{3} - ([0-1][0-9]|2[0-3]):[0-5][0-9]$/)){return"datetime-euro"}return null});c.extend(c.fn.dataTableExt.oSort,{"numeric-comma-asc":function(g,f){var e=g.replace(/,/,".").replace(/ /g,"");var h=f.replace(/,/,".").replace(/ /g,"");e=parseFloat(e);h=parseFloat(h);return((e<h)?-1:((e>h)?1:0))},"numeric-comma-desc":function(g,f){var e=g.replace(/,/,".").replace(/ /g,"");var h=f.replace(/,/,".").replace(/ /g,"");e=parseFloat(e);h=parseFloat(h);return((e<h)?1:((e>h)?-1:0))},"date-euro-pre":function(g){var h=c.trim(g);var e;if(h!==""){var f=h.split("/");e=(f[2]+f[1]+f[0])*1}else{e=10000000}return e},"date-euro-asc":function(f,e){return f-e},"date-euro-desc":function(f,e){return e-f},"datetime-euro-pre":function(g){var j=c.trim(g);var e;if(j!==""){var h=j.split(" - ");var f=h[0].split("/");var i=h[1].split(":");e=(f[2]+f[1]+f[0]+i[0]+i[1])*1}else{e=100000000000}return e},"datetime-euro-asc":function(f,e){return f-e},"datetime-euro-desc":function(f,e){return e-f}});c.extend(c.fn.dataTableExt.oPagination,{bootstrap:{fnInit:function(i,f,h){var e=i.oLanguage.oPaginate;var j=function(k){k.preventDefault();if(i.oApi._fnPageChange(i,k.data.action)){h(i)}};c(f).append('<ul class="pagination"><li class="prev disabled"><a href="#">'+e.sPrevious+'</a></li><li class="next disabled"><a href="#">'+e.sNext+"</a></li></ul>");var g=c("a",f);c(g[0]).on("click.DT",{action:"previous"},j);c(g[1]).on("click.DT",{action:"next"},j)},fnUpdate:function(g,p){var q=5;var l=g.oInstance.fnPagingInfo();var o=g.aanFeatures.p;var n,m,k,e,r,h,f=Math.floor(q/2);if(l.iTotalPages<q){e=1;r=l.iTotalPages}else{if(l.iPage<=f){e=1;r=q}else{if(l.iPage>=(l.iTotalPages-f)){e=l.iTotalPages-q+1;r=l.iTotalPages}else{e=l.iPage-f+1;r=e+q-1}}}for(n=0,h=o.length;n<h;n++){c("li:gt(0)",o[n]).filter(":not(:last)").remove();for(m=e;m<=r;m++){k=(m===l.iPage+1)?'class="active"':"";c("<li "+k+'><a href="#">'+m+"</a></li>").insertBefore(c("li:last",o[n])[0]).on("click",function(i){i.preventDefault();g._iDisplayStart=(parseInt(c("a",this).text(),10)-1)*l.iLength;p(g)})}if(l.iPage===0){c("li:first",o[n]).addClass("disabled")}else{c("li:first",o[n]).removeClass("disabled")}if(l.iPage===l.iTotalPages-1||l.iTotalPages===0){c("li:last",o[n]).addClass("disabled")}else{c("li:last",o[n]).removeClass("disabled")}}}}});c.extend(c.fn.dataTableExt.oPagination,{bootstrap_full:{fnInit:function(i,f,h){var e=i.oLanguage.oPaginate;var j=function(k){k.preventDefault();if(i.oApi._fnPageChange(i,k.data.action)){h(i)}};c(f).append('<ul class="pagination"><li class="first disabled"><a href="#">'+e.sFirst+'</a></li><li class="prev disabled"><a href="#">'+e.sPrevious+'</a></li><li class="next disabled"><a href="#">'+e.sNext+'</a></li><li class="last disabled"><a href="#">'+e.sLast+"</a></li></ul>");var g=c("a",f);c(g[0]).on("click.DT",{action:"first"},j);c(g[1]).on("click.DT",{action:"previous"},j);c(g[2]).on("click.DT",{action:"next"},j);c(g[3]).on("click.DT",{action:"last"},j)},fnUpdate:function(g,p){var q=5;var l=g.oInstance.fnPagingInfo();var o=g.aanFeatures.p;var n,m,k,e,h,r,f=Math.floor(q/2);if(l.iTotalPages<q){e=1;r=l.iTotalPages}else{if(l.iPage<=f){e=1;r=q}else{if(l.iPage>=(l.iTotalPages-f)){e=l.iTotalPages-q+1;r=l.iTotalPages}else{e=l.iPage-f+1;r=e+q-1}}}for(n=0,h=o.length;n<h;n++){c("li",o[n]).filter(":not(.first)").filter(":not(.last)").filter(":not(.prev)").filter(":not(.next)").remove();for(m=e;m<=r;m++){k=(m===l.iPage+1)?'class="active"':"";c("<li "+k+'><a href="#">'+m+"</a></li>").insertBefore(c("li.next",o[n])[0]).on("click",function(i){i.preventDefault();g._iDisplayStart=(parseInt(c("a",this).text(),10)-1)*l.iLength;p(g)})}if(l.iPage===0){c("li.first",o[n]).addClass("disabled");c("li.prev",o[n]).addClass("disabled")}else{c("li.prev",o[n]).removeClass("disabled");c("li.first",o[n]).removeClass("disabled")}if(l.iPage===l.iTotalPages-1||l.iTotalPages===0){c("li.last",o[n]).addClass("disabled");c("li.next",o[n]).addClass("disabled")}else{c("li.next",o[n]).removeClass("disabled");c("li.last",o[n]).removeClass("disabled")}}}}});c.extend(c.fn.dataTableExt.oPagination,{bootstrap_prevnext:{fnInit:function(i,f,h){var e=i.oLanguage.oPaginate;var j=function(k){k.preventDefault();if(i.oApi._fnPageChange(i,k.data.action)){h(i)}};c(f).append('<ul class="pagination"><li class="first disabled"><a href="#"><i class="fa fa-fw fa-fast-backward"></i></a></li><li class="prev disabled"><a href="#"><i class="fa fa-fw fa-step-backward"></i></a></li><li class="next disabled"><a href="#"><i class="fa fa-fw fa-step-forward"></i></a></li><li class="last disabled"><a href="#"><i class="fa fa-fw fa-fast-forward"></i></a></li></ul>');var g=c("a",f);c(g[0]).on("click.DT",{action:"first"},j);c(g[1]).on("click.DT",{action:"previous"},j);c(g[2]).on("click.DT",{action:"next"},j);c(g[3]).on("click.DT",{action:"last"},j)},fnUpdate:function(g,p){var q=5;var l=g.oInstance.fnPagingInfo();var o=g.aanFeatures.p;var n,m,k,e,r,h,f=Math.floor(q/2);if(l.iTotalPages<q){e=1;r=l.iTotalPages}else{if(l.iPage<=f){e=1;r=q}else{if(l.iPage>=(l.iTotalPages-f)){e=l.iTotalPages-q+1;r=l.iTotalPages}else{e=l.iPage-f+1;r=e+q-1}}}for(n=0,h=o.length;n<h;n++){if(l.iPage===0){c("li.first",o[n]).addClass("disabled");c("li.prev",o[n]).addClass("disabled")}else{c("li.prev",o[n]).removeClass("disabled");c("li.first",o[n]).removeClass("disabled")}if(l.iPage===l.iTotalPages-1||l.iTotalPages===0){c("li.last",o[n]).addClass("disabled");c("li.next",o[n]).addClass("disabled")}else{c("li.next",o[n]).removeClass("disabled");c("li.last",o[n]).removeClass("disabled")}}}}});if(c.fn.DataTable.TableTools){c.extend(true,c.fn.DataTable.TableTools.classes,{container:"DTTT btn-group",buttons:{normal:"btn btn-default btn-sm",disabled:"disabled"},collection:{container:"DTTT_dropdown dropdown-menu",buttons:{normal:"",disabled:"disabled"}},print:{info:"DTTT_print_info modal"},select:{row:"active"}});c.extend(true,c.fn.DataTable.TableTools.DEFAULTS.oTags,{collection:{container:"ul",button:"li",liner:"a"}})}var a=function(g,f){var e=function(i,h){if(!this.CLASS||this.CLASS!=="BootstrapLength"){if(b.alert){b.alert("Warning: BootstrapLength must be initialized with the 'new' keyword")}}if(typeof(h)==="undefined"){h={}}if(g.fn.dataTable.camelToHungarian){g.fn.dataTable.camelToHungarian(e.defaults,h)}this.s={dt:null,oInit:h,hidden:true,abOriginal:[]};this.dom={wrapper:null,input:null};e.aInstances.push(this);this.s.dt=g.fn.dataTable.Api?new g.fn.dataTable.Api(i).settings()[0]:i;this._fnConstruct(h);return this};e.prototype={input:function(){return this.dom.wrapper},fnRebuild:function(){return this.rebuild()},rebuild:function(){},_fnConstruct:function(o){var p=this;var h=p.s.dt;if(h.oScroll.bInfinite){return}var k=h.sTableId+"_length";var m=g('<select size="1"></select>').attr("name",k);var l,j;var n=h.aLengthMenu;if(n.length===2&&typeof(n[0])==="object"&&typeof(n[1])==="object"){for(l=0,j=n[0].length;l<j;l++){g("<option />").attr("value",n[0][l]).text(n[1][l]).appendTo(m)}}else{for(l=0,j=n.length;l<j;l++){g("<option />").attr("value",n[l]).text(n[l]).appendTo(m)}}var q=g("<div>").addClass(h.oClasses.sLength).append(g("<span></span>").addClass("ams-form").append(g("<label></label>").addClass("select").css("width",60).append(m).append(g("<i></i>"))));if(!h.aanFeatures.L){q.attr("id",h.sTableId+"_length")}this.dom.wrapper=q.get(0);g('select option[value="'+h._iDisplayLength+'"]',q).attr("selected",true);g("select",q).on("change.DT",function(i){var r=g(this).val();var s=h.aanFeatures.L;for(l=0,j=s.length;l<j;l++){if(s[l]!==this.parentNode){g("select",s[l]).val(r)}}h._iDisplayLength=parseInt(r,10);h.oInstance._fnCalculateEnd(h);if(h.fnDisplayEnd()===h.fnRecordsDisplay()){h._iDisplayStart=h.fnDisplayEnd()-h._iDisplayLength;if(h._iDisplayStart<0){h._iDisplayStart=0}}if(h._iDisplayLength===-1){h._iDisplayStart=0}h.oInstance._fnDraw()});g("select",q).attr("aria-controls",h.sTableId)}};e.fnRebuild=function(h){};e.defaults={};e.aInstances=[];e.prototype.CLASS="BootstrapLength";e.VERSION="1.0.0";e.prototype.VERSION=e.VERSION;if((typeof(g.fn.dataTable)==="function")&&(typeof(g.fn.dataTableExt.fnVersionCheck)==="function")&&g.fn.dataTableExt.fnVersionCheck("1.7.0")){g.fn.dataTableExt.aoFeatures.push({fnInit:function(i){var j=i.oInit;var h=new e(i,j.bootstrapLength||j.oBootstrapLength||{});return h.input()},cFeature:"L",sFeature:"BootstrapLength"})}else{if(b.alert){b.alert("Warning: BootstrapLength required DataTables 1.7 or greater...")}}g.fn.dataTable.BootstrapLength=e;return e};if(!c.fn.dataTable.BootstrapLength){a(c,c.fn.dataTable)}var d=function(g,f){var e=function(i,h){if(!this.CLASS||this.CLASS!=="BootstrapFilter"){if(b.alert){b.alert("Warning: BootstrapFilter must be initialized with the 'new' keyword")}}if(typeof(h)==="undefined"){h={}}if(g.fn.dataTable.camelToHungarian){g.fn.dataTable.camelToHungarian(e.defaults,h)}this.s={dt:null,oInit:h,hidden:true,abOriginal:[]};this.dom={wrapper:null,input:null};e.aInstances.push(this);this.s.dt=g.fn.dataTable.Api?new g.fn.dataTable.Api(i).settings()[0]:i;this._fnConstruct(h);return this};e.prototype={input:function(){return this.dom.wrapper},fnRebuild:function(){return this.rebuild()},rebuild:function(){},_fnConstruct:function(n){var i=this;var k=i.s.dt;var h=k.oPreviousSearch;var m='<input type="text">';var j=g("<div>").addClass(k.oClasses.sFilter).html('<div class="input-group"><span class="input-group-addon"><i class="fa fa-search"></i></span>'+m+"</div>");if(!k.aanFeatures.F){j.attr("id",k.sTableId+"_filter")}this.dom.wrapper=j.get(0);var l=g('input[type="text"]',j);j.data("DT_Input",l[0]);l.val(h.sSearch.replace('"',""")).addClass("form-control").attr("placeholder",k.oLanguage.sSearch).attr("aria-control",k.sTableId).on("keyup.DT",function(q){var s=k.aanFeatures.F;var r=g(this).val();for(var p=0,o=s.length;p<o;p++){if(s[p]!==g(this).parents("div.dataTables_filter")[0]){g(s[p]).data("DT_Input").val(r)}}if(r!==h.sSearch){k.oInstance._fnFilterComplete({sSearch:r,bRegex:h.bRegex,bSmart:h.bSmart,bCaseInsensitive:h.bCaseInsensitive})}}).on("keypress.DT",function(o){if(o.keyCode===13){return false}})}};e.fnRebuild=function(h){};e.defaults={};e.aInstances=[];e.prototype.CLASS="BootstrapFilter";e.VERSION="1.0.0";e.prototype.VERSION=e.VERSION;if((typeof(g.fn.dataTable)==="function")&&(typeof(g.fn.dataTableExt.fnVersionCheck)==="function")&&g.fn.dataTableExt.fnVersionCheck("1.7.0")){g.fn.dataTableExt.aoFeatures.push({fnInit:function(i){var j=i.oInit;var h=new e(i,j.bootstrapFilter||j.oBootstrapFilter||{});return h.input()},cFeature:"F",sFeature:"BootstrapFilter"})}else{if(b.alert){b.alert("Warning: BootstrapFilter required DataTables 1.7 or greater...")}}g.fn.dataTable.BootstrapFilter=e;return e};if(!c.fn.dataTable.BootstrapFilter){d(c,c.fn.dataTable)}})(jQuery,this); | ztfy.myams | /ztfy.myams-0.1.33.tar.gz/ztfy.myams-0.1.33/src/ztfy/myams/resources/js/myams-dataTables.min.js | myams-dataTables.min.js |
(function(b,a){var c=a.MyAMS;c.graphs={init:function(d){c.ajax.check(b.fn.sparkline,c.baseURL+"ext/jquery-sparkline-2.1.1.min.js",function(){d.each(function(){var g=b(this);var f=g.data();var e=f.sparklineType||"bar";switch(e){case"bar":g.sparkline("html",{type:"bar",barColor:f.sparklineBarColor||g.css("color")||"#0000f0",height:f.sparklineHeight||"26px",barWidth:f.sparklineBarwidth||5,barSpacing:f.sparklineBarspacing||2,stackedBarColor:g.data.sparklineBarstackedColor||["#A90329","#0099c6","#98AA56","#da532c","#4490B1","#6E9461","#990099","#B4CAD3"],negBarColor:g.data.sparklineNegbarColor||"#A90329",zeroAxis:"false"});break;case"line":g.sparkline("html",{type:"line",width:f.sparklineWidth||"90px",height:f.sparklineHeight||"20px",lineWidth:f.sparklineLineWidth||1,lineColor:f.sparklineLineColor||g.css("color")||"#0000f0",fillColor:f.fillColor||"#c0d0f0",spotColor:f.sparklineSpotColor||"#f08000",minSpotColor:f.sparklineMinspotColor||"#ed1c24",maxSpotColor:f.sparklineMaxspotColor||"#f08000",highlightSpotColor:f.sparklineHighlightspotColor||"#50f050",highlightLineColor:f.sparklineHighlightlineColor||"f02020",spotRadius:f.sparklineSpotradius||1.5,chartRangeMin:f.sparklineMinY||"undefined",chartRangeMax:f.sparklineMaxY||"undefined",chartRangeMinX:f.sparklineMinX||"undefined",chartRangeMaxX:f.sparklineMaxX||"undefined",normalRangeMin:f.minVal||"undefined",normalRangeMax:f.maxVal||"undefined",normalRangeColor:f.normColor||"#c0c0c0",drawNormalOnTop:f.drawNormal||false});break;case"pie":g.sparkline("html",{type:"pie",width:f.sparklinePiesize||90,height:f.sparklinePiesize||90,tooltipFormat:'<span style="color: {{color}}">●</span> ({{percent.1}}%)',sliceColors:f.sparklinePiecolor||["#B4CAD3","#4490B1","#98AA56","#da532c","#6E9461","#0099c6","#990099","#717D8A"],borderWidth:1,offset:f.sparklineOffset||0,borderColor:f.borderColor||"#45494C"});break;case"box":g.sparkline("html",{type:"box",width:f.sparklineWidth||"auto",height:f.sparklineHeight||"auto",raw:f.sparklineBoxraw||false,target:f.sparklineTargetval||"undefined",minValue:f.sparklineMin||"undefined",maxValue:f.sparklineMax||"undefined",showOutliers:f.sparklineShowoutlier||true,outlierIQR:f.sparklineOutlierIqr||1.5,spotRadius:f.sparklineSpotradius||1.5,boxLineColor:g.css("color")||"#000000",boxFillColor:f.fillColor||"#c0d0f0",whiskerColor:f.sparklineWhisColor||"#000000",outlierLineColor:f.sparklineOutlineColor||"#303030",outlierFillColor:f.sparklineOutlinefillColor||"#f0f0f0",medianColor:f.sparklineOutlinemedianColor||"#f00000",targetColor:f.sparklineOutlinetargetColor||"#40a020"});break;case"bullet":g.sparkline("html",{type:"bullet",height:f.sparklineHeight||"auto",targetWidth:f.sparklineWidth||2,targetColor:f.sparklineBulletColor||"#ed1c24",performanceColor:f.sparklinePerformanceColor||"#3030f0",rangeColors:f.sparklineBulletrangeColor||["#d3dafe","#a8b6ff","#7f94ff"]});break;case"discrete":g.sparkline("html",{type:"discrete",width:f.sparklineWidth||50,height:f.sparklineHeight||26,lineColor:g.css("color"),lineHeight:f.sparklineLineHeight||5,thresholdValue:f.sparklineThreshold||"undefined",thresholdColor:f.sparklineThresholdColor||"#ed1c24"});break;case"tristate":g.sparkline("html",{type:"tristate",height:f.sparklineHeight||26,posBarColor:f.sparklinePosbarColor||"#60f060",negBarColor:f.sparklineNegbarColor||"#f04040",zeroBarColor:f.sparklineZerobarColor||"#909090",barWidth:f.sparklineBarwidth||5,barSpacing:f.sparklineBarspacing||2,zeroAxis:f.sparklineZeroaxis||false});break;case"compositebar":g.sparkline(f.sparklineBarVal,{type:"bar",width:f.sparklineWidth||"100%",height:f.sparklineHeight||"20px",barColor:f.sparklineColorBottom||"#333333",barWidth:f.sparklineBarwidth||3});g.sparkline(f.sparklineLineVal,{width:f.sparklineWidth||"100%",height:f.sparklineHeight||"20px",lineColor:f.sparklineColorTop||"#ed1c24",lineWidth:f.sparklineLineWidth||1,composite:true,fillColor:false});break;case"compositeline":g.sparkline(f.sparklineBarVal,{type:"line",spotRadius:f.sparklineSpotradiusTop||1.5,spotColor:f.sparklineSpotColor||"#f08000",minSpotColor:f.sparklineMinSpotColorTop||"#ed1c24",maxSpotColor:f.sparklineMaxSpotColorTop||"#f08000",highlightSpotColor:f.sparklineHighlightSpotColorTop||"#50f050",highlightLineColor:f.sparklineHighlightLineColorTop||"#f02020",valueSpots:f.sparklineBarValSpotsTop||null,lineWidth:f.sparklineLineWidthTop||1,width:f.sparklineWidth||"90px",height:f.sparklineHeight||"20px",lineColor:f.sparklineColorTop||"#333333",fillColor:f.sparklineFillcolorTop||"transparent"});g.sparkline(f.sparklineLineVal,{type:"line",spotRadius:f.sparklineSpotradiusBottom||f.sparklineSpotradiusTop||1.5,spotColor:f.sparklineSpotColor||"#f08000",minSpotColor:f.sparklineMinspotColorBottom||f.sparklineMinspotColorTop||"#ed1c24",maxSpotColor:f.sparklineMaxspotColorBottom||f.sparklineMaxspotColorTop||"#f08000",highlightSpotColor:f.sparklineHighlightspotColorBottom||f.sparklineHighlightspotColorTop||"#50f050",highlightLineColor:f.sparklineHighlightlineColorBottom||f.sparklineHighlightlineColorTop||"#f02020",valueSpots:f.sparklineBarValSpotsBottom||null,lineWidth:f.sparklineLineWidthBottom||1,width:f.sparklineWidth||"90px",height:f.sparklineHeight||"20px",lineColor:f.sparklineColorBottom||"#ed1c24",composite:true,fillColor:f.sparklineFillcolorBottom||"transparent"});break}})})}}})(jQuery,this); | ztfy.myams | /ztfy.myams-0.1.33.tar.gz/ztfy.myams-0.1.33/src/ztfy/myams/resources/js/myams-graphs.min.js | myams-graphs.min.js |
(function($, globals) {
'use strict';
/* Private functions */
function checkValue(value) {
if (value < 10) {
value = '0' + value;
}
return value;
}
function getPastTimeStamp(value, options) {
var date = new Date(value);
var month = checkValue(date.getMonth() + 1);
var day = checkValue(date.getDate());
var year = checkValue(date.getFullYear());
var hours = checkValue(date.getHours());
var minutes = checkValue(date.getMinutes());
var seconds = checkValue(date.getSeconds());
return options.timestampFormat.replace(/%d%/g, day)
.replace(/%m%/g, month)
.replace(/%y%/g, year)
.replace(/%h%/g, hours)
.replace(/%i%/g, minutes)
.replace(/%s%/g, seconds);
}
var MyAMS = globals.MyAMS;
function Widget(element, options) {
this.widget = element;
this.options = $.extend({}, MyAMSWidget.defaults, options);
this.grid = this.widget.parents(this.options.grid);
this.hasGrid = this.grid.exists();
this.gridId = this.grid.attr('id');
this.controls = this.options.controls;
this.toggleClass = this.options.toggleClass.split('|');
this.editClass = this.options.editClass.split('|');
this.fullscreenClass = this.options.fullscreenClass.split('|');
this.customClass = this.options.customClass.split('|');
this.init();
}
Widget.prototype = {
init: function() {
var self = this;
var widget;
if (self.options.rtl === true) {
$('body').addClass('rtl');
}
self.grid.each(function() {
$(this).addClass('sortable-grid');
});
self._getSettings();
if (self.hasGrid && self.storage) {
var key;
if (self.position) {
var position = JSON.parse(self.position);
for (key in position.grid) {
if (!position.grid.hasOwnProperty(key)) {
continue;
}
var changeOrder = self.grid.find(self.options.subgrid + '.sortable-grid').eq(key);
for (var key2 in position.grid[key].section) {
if (!position.grid[key].section.hasOwnProperty(key2)) {
continue;
}
changeOrder.append($('#' + position.grid[key].section[key2].id));
}
}
}
if (self.settings) {
var settings = JSON.parse(self.settings);
for (key in settings.widget) {
if (!settings.widget.hasOwnProperty(key)) {
continue;
}
widget = settings.widget[key];
if (!widget.id) {
continue;
}
var mywidget = $('#' + widget.id);
if (!mywidget.exists()) {
continue;
}
if (widget.style) {
mywidget.removeClassPrefix('ams-widget-color-')
.addClass(widget.style)
.attr('data-widget-attstyle', widget.style);
}
if (widget.hidden === 1) {
mywidget.hide(1);
} else {
mywidget.show(1)
.removeAttr('data-widget-hidden');
}
if (widget.collapsed === 1) {
mywidget.addClass('ams-widget-collapsed')
.children('div')
.hide(1);
}
var title = mywidget.children('header').children('h2');
if (title.text() !== widget.title) {
title.text(widget.title);
}
}
}
}
widget = self.widget;
var data = widget.data();
var data_options = {
grid: data.amsWidgetGrid,
subgrid: data.amsWudgetSubgrid,
widgets: data.amsWidgetWidgets,
controls: data.amsWidgetControls,
storage: data.amsWidgetStorage,
deleteSettingsKey: data.amsWidgetDeleteSettingsKey,
deletePositionKey: data.amsWidgetDeletePositionKey,
sortable: data.amsWidgetSortable,
hiddenButtons: data.amsWidgetHiddenButtons,
toggleButton: data.amsWidgetToggleButton,
toggleClass: data.amsWidgetToggleClass,
onToggle: MyAMS.getFunctionByName(data.amsWidgetToggleCallback),
deleteButton: data.amsWidgetDeleteButton,
deleteClass: data.amsWidgetDeleteClass,
onDelete: MyAMS.getFunctionByName(data.amsWidgetDeleteCallback),
editButton: data.amsWidgetEditButton,
editPlaceholder: data.amsWidgetEditPlaceholder,
editClass: data.amsWidgetEditClass,
onEdit: MyAMS.getFunctionByName(data.amsWidgetEditCallback),
fullscreenButton: data.amsWidgetFullscreenButton,
fullscreenClass: data.amsWidgetFullscreenClass,
fullscreenDiff: data.amsWidgetFullscreenDiff,
onFullscreen: MyAMS.getFunctionByName(data.amsWidgetFullscreenCallback),
customButton: data.amsWidgetCustomButton,
customClass: data.amsWidgetCustomClass,
customStart: MyAMS.getFunctionByName(data.amsWidgetCustomStartCallback),
customEnd: MyAMS.getFunctionByName(data.amsWidgetCustomEndCallback),
buttonsOrder: data.amsWidgetButtonsOrder,
opacity: data.amsWidgetOpacity,
dragHandle: data.amsWidgetDragHandle,
placeholderClass: data.amsWidgetPlaceholderClass,
indicator: data.amsWidgetIndicator,
indicatorTime: data.amsWidgetIndicatorTime,
ajax: data.amsWidgetAjax,
timestampPlaceholder : data.amsWidgetTimestampPlaceholder,
timestampFormat : data.amsWidgetTimestampFormat,
refreshButton : data.amsWidgetRefreshButton,
refreshClass : data.amsWidgetRefreshClass,
errorLabel : data.amsWidgetErrorLabel,
updatedLabel : data.amsWidgetUpdatedLabel,
refreshLabel : data.amsWidgetRefreshLabel,
deleteLabel : data.amsWidgetDeleteLabel,
afterLoad : MyAMS.getFunctionByName(data.amsWidgetAfterLoadCallback),
rtl : data.amsWidgetRtl,
onChange : MyAMS.getFunctionByName(data.amsWidgetChangeCallback),
onSave : MyAMS.getFunctionByName(data.amsWidgetSaveCallback),
ajax_nav : MyAMS.ajax_nav
};
var widgetOptions = $.extend({}, self.options, data_options);
var header = widget.children('header');
if (!header.parent().attr('role')) {
var customBtn,
deleteBtn,
editBtn,
fullscreenBtn,
toggleBtn,
refreshBtn;
if (data.widgetHidden === true) {
widget.hide();
}
if (data.widgetCollapsed === true) {
widget.addClass('ams-widget-collapsed')
.children('div').hide();
}
if (widgetOptions.customButton &&
(data.widgetCustombutton === undefined) &&
(self.customClass[0].length !== 0)) {
customBtn = '<a href="#" class="button-icon ams-widget-custom-btn"><i class="' + self.customClass[0] + '"></i></a>';
} else {
customBtn = "";
}
if (widgetOptions.deleteButton && (data.widgetDeleteButton === undefined)) {
deleteBtn = '<a href="#" class="button-icon ams-widget-delete-btn hint" title="' + MyAMSWidget.i18n.DELETE_BTN + '" data-ams-hint-gravity="se">' +
'<i class="' + widgetOptions.deleteClass + '"></i></a>';
} else {
deleteBtn = "";
}
if (widgetOptions.editButton && (data.widgetEditButton === undefined)) {
var editClass = widgetOptions.editClass.split('|')[0];
editBtn = '<a href="#" class="button-icon ams-widget-edit-btn hint" title="' + MyAMSWidget.i18n.EDIT_BTN + '" data-ams-hint-gravity="se">' +
'<i class="' + editClass + '"></i></a>';
} else {
editBtn = "";
}
if (widgetOptions.fullscreenButton && (data.widgetFullscreenButton === undefined)) {
var fullscreenClass = widgetOptions.fullscreenClass.split('|')[0];
fullscreenBtn = '<a href="#" class="button-icon ams-widget-fullscreen-btn hint" title="' + MyAMSWidget.i18n.FULLSCREEN_BTN + '" data-ams-hint-gravity="se">' +
'<i class="' + fullscreenClass + '"></i></a>';
} else {
fullscreenBtn = "";
}
if (widgetOptions.toggleButton && (data.widgetToggleButton === undefined)) {
var toggleClass = widgetOptions.toggleClass.split('|');
var toggleSettings;
if ((widget.dataWidgetCollapsed === true) ||
widget.hasClass('ams-widget-collapsed')) {
toggleSettings = toggleClass[1];
} else {
toggleSettings = toggleClass[0];
}
toggleBtn = '<a href="#" class="button-icon ams-widget-toggle-btn hint" title="' + MyAMSWidget.i18n.COLLAPSE_BTN + '" data-ams-hint-gravity="se">' +
'<i class="' + toggleSettings + '"></i></a>';
} else {
toggleBtn = "";
}
if (widgetOptions.refreshButton &&
(data.widgetRefreshButton === undefined) &&
data.widgetLoad) {
refreshBtn = '<a href="#" class="button-icon ams-widget-refresh-btn hint" title="' + MyAMSWidget.i18n.REFRESH_BTN + '" data-loading-text=" ' + MyAMSWidget.i18n.LOADING_MSG + ' " data-ams-hint-gravity="se">' +
'<i class="' + widgetOptions.refreshClass + '"></i></a>';
} else {
refreshBtn = "";
}
var buttons = widgetOptions.buttonsOrder.replace(/%refresh%/, refreshBtn)
.replace(/%custom%/, customBtn)
.replace(/%edit%/, editBtn)
.replace(/%toggle%/, toggleBtn)
.replace(/%fullscreen%/, fullscreenBtn)
.replace(/%delete%/, deleteBtn);
if (refreshBtn || customBtn || editBtn || toggleBtn || fullscreenBtn || deleteBtn) {
header.prepend('<div class="ams-widget-ctrls">' + buttons + '</div>');
}
if (widgetOptions.sortable && (data.widgetSortable === undefined)) {
widget.addClass('ams-widget-sortable');
}
var placeholder = widget.find(widgetOptions.editPlaceholder);
if (placeholder.length > 0) {
placeholder.find('input').val($.trim(header.children('h2').text()));
}
header.append('<span class="ams-widget-loader"><i class="fa fa-refresh fa-spin"></i></span>');
widget.attr('role', 'widget')
.children('div').attr('role', 'content')
.prev('header').attr('role', 'heading')
.children('div').attr('role', 'menu');
MyAMS.plugins.enabled.hint(header);
}
widget.data('widget-options', widgetOptions);
if (self.options.hiddenButtons) {
$(self.controls).hide();
}
widget.find("[data-widget-load]").each(function() {
var item = $(this),
header = item.children(),
path = item.data('widget-load'),
reloadTime = item.data('widget-refresh') * 1000,
loader = header;
if (item.find('.ams-widget-ajax-placeholder').length <= 0) {
item.children('widget-body').append('<div class="ams-widget-ajax-placeholder">' + self.options.loadingLabel + "</div>");
if (reloadTime > 0) {
self.loadAjaxFile(item, path, header);
setInterval(function() {
self._loadAjaxFile(item, path, header);
}, reloadTime);
} else {
self._loadAjaxFile(item, path, header);
}
}
});
if (self.options.hiddenButtons) {
self.widget.children('header').hover(function() {
$(this).children(self.controls).stop(true, true).fadeTo(100, 1);
}, function() {
$(this).children(self.controls).stop(true, true).fadeTo(100, 0);
});
}
self._setClickEvents();
$(self.options.deleteSettingsKey).on(self.clickEvent, this, function(e) {
if (self.storage && globals.confirm) {
var cleared = globals.confirm(self.options.settingsKeyLabel);
if (cleared) {
self.storage.removeItem(self.settingsKey);
}
}
e.preventDefault();
});
$(self.options.deletePositionKey).on(self.clickEvent, this, function(e) {
if (self.storage && globals.confirm) {
var cleared = globals.confirm(self.options.positionKeyLabel);
if (cleared) {
self.storage.removeItem(self.positionKey);
}
}
e.preventDefault();
});
if (self.storage) {
if (self.settingsKey === null || self.settingsKey.length < 1) {
self._saveWidgetSettings();
}
if (self.positionKey === null || self.positionKey.length < 1) {
self._saveWidgetPosition();
}
}
self.grid.data('ams-widgets-loaded', true);
},
destroy: function() {
var self = this;
self.widgets.off('click', self._setClickEvents());
self.element.removeData('AMSWidget');
},
_getSettings: function() {
var self = this;
if (!self.hasGrid || !self.gridId) {
self.storage = null;
} else {
switch (self.options.storage) {
case 'local':
self.storage = localStorage;
break;
case 'session':
self.storage = sessionStorage;
break;
default:
self.storage = null;
}
}
var use_storage = (self.storage !== null) && function() {
var result,
uid = +new Date();
try {
self.storage.setItem(uid, uid);
result = parseInt(self.storage.getItem(uid)) === uid;
self.storage.removeItem(uid);
return result;
} catch (e) {}
}();
if (use_storage) {
self.settingsKey = "AMS_settings_" + location.pathname + location.hash + "_" + self.gridId;
self.settings = self.storage.getItem(self.settingsKey);
self.positionKey = "AMS_position_" + location.pathname + location.hash + "_" + self.gridId;
self.position = self.storage.getItem(self.positionKey);
}
if (("ontouchstart" in globals) ||
globals.DocumentTouch && globals.document instanceof globals.DocumentTouch) {
self.clickEvent = "touchstart";
} else {
self.clickEvent = "click";
}
},
_runLoaderWidget: function(widget) {
var self = this;
if (self.options.indicator) {
widget.find('.ams-widget-loader')
.stop(true, true)
.fadeIn(100)
.delay(self.options.indicatorTime)
.fadeOut(100);
}
},
_loadAjaxFile: function(url, widget, loader) {
MyAMS.skin.loadURL(url, widget.find('.widget-body'));
},
_saveWidgetSettings: function() {
var self = this;
self._getSettings();
if (self.storage) {
var gridSettings = [];
self.grid.find(self.options.widgets).each(function() {
var widget = $(this);
var widgetSettings = {};
widgetSettings.id = widget.attr('id');
widgetSettings.style = widget.attr('data-widget-attstyle');
widgetSettings.title = widget.children('header').children('h2').text();
widgetSettings.hidden = widget.is(':hidden') ? 1 : 0;
widgetSettings.collapsed = widget.hasClass('ams-widget-collapsed') ? 1 : 0;
gridSettings.push(widgetSettings);
});
var gridSettingsStr = JSON.stringify({widget: gridSettings});
if (self.settings !== gridSettingsStr) {
self.storage.setItem(self.settingsKey, gridSettingsStr);
}
if (typeof(self.options.onSave) === 'function') {
self.options.onSave.call(this, null, gridSettings);
}
}
},
_saveWidgetPosition: function() {
var self = this;
self._getSettings();
if (self.storage) {
var gridPosition = [];
self.grid.find(self.options.subgrid + ".sortable-grid").each(function () {
var subgridPosition = [];
$(this).children(self.options.widgets).each(function () {
var subObj = {};
subObj.id = $(this).attr("id");
subgridPosition.push(subObj);
});
var out = {section: subgridPosition};
gridPosition.push(out);
});
var gridPositionStr = JSON.stringify({grid: gridPosition});
if (self.position !== gridPositionStr) {
self.storage.setItem(self.positionKey, gridPositionStr);
}
if (typeof(self.options.onSave) === 'function') {
self.options.onSave.call(this, null, gridPosition);
}
}
},
_setClickEvents: function() {
function setFullscreenHeight() {
var mode = $('#ams-widget-fullscreen-mode');
if (mode.length > 0) {
var widgets = mode.find(self.options.widgets);
var windowHeight = $(window).height();
var headerHeight = widgets.children('header')
.height();
widgets.children('div')
.height(windowHeight - headerHeight - 15);
}
}
var self = this;
self._getSettings();
// Toggle button
self.widget.on(self.clickEvent, '.ams-widget-toggle-btn', function(e) {
e.preventDefault();
var button = $(this);
var widget = button.parents(self.options.widgets).first();
var widgetOptions = widget.data('widget-options');
var toggleClass = widgetOptions.toggleClass.split('|');
self._runLoaderWidget(widget);
var canToggle = true;
if (widget.hasClass('ams-widget-collapsed')) {
if (widgetOptions.onToggle) {
canToggle = widgetOptions.onToggle.call(this, widget, 'expand');
}
if (canToggle !== false) {
button.children().removeClass(toggleClass[1])
.addClass(toggleClass[0]);
widget.removeClass('ams-widget-collapsed')
.children('[role=content]').slideDown(widgetOptions.toggleSpeed, function() {
self._saveWidgetSettings();
});
}
} else {
if (widgetOptions.onToggle) {
canToggle = widgetOptions.onToggle.call(this, widget, 'collapse');
}
if (canToggle !== false) {
button.children().removeClass(toggleClass[0])
.addClass(toggleClass[1]);
widget.addClass('ams-widget-collapsed')
.children('[role=content]').slideUp(widgetOptions.toggleSpeed, function() {
self._saveWidgetSettings();
});
}
}
});
self.widget.on('dblclick', 'header', function(e) {
$('.ams-widget-toggle-btn', this).click();
});
// Fullscreen button
self.widget.on(self.clickEvent, '.ams-widget-fullscreen-btn', function(e) {
e.preventDefault();
var button = $(this);
var widget = button.parents(self.options.widgets);
var widgetOptions = widget.data('widget-options');
var fullscreenClass = widgetOptions.fullscreenClass.split('|');
var content = widget.children('div');
self._runLoaderWidget(widget);
if ($('#ams-widget-fullscreen-mode').length > 0) {
$('.nooverflow').removeClass('nooverflow');
widget.unwrap('<div>')
.children('div')
.removeAttr('style')
.end()
.find('.ams-widget-fullscreen-btn')
.children()
.removeClass(fullscreenClass[1])
.addClass(fullscreenClass[0])
.parents(self.controls)
.children('a')
.show();
if (content.hasClass('ams-widget-visible')) {
content.hide()
.removeClass('ams-widget-visible');
}
} else {
$('body').addClass('nooverflow');
widget.wrap('<div id="ams-widget-fullscreen-mode"></div>')
.parent()
.find('.ams-widget-fullscreen-btn')
.children()
.removeClass(fullscreenClass[0])
.addClass(fullscreenClass[1])
.parents(self.controls)
.children('a:not(.ams-widget-fullscreen-btn)')
.hide();
if (content.is(':hidden')) {
content.show()
.addClass('ams-widget-visible');
}
}
setFullscreenHeight();
if (typeof(widgetOptions.onFullscreen) === 'function') {
widgetOptions.onFullscreen.call(this, widget);
}
});
$(window).resize(function() {
setFullscreenHeight();
});
// Edit button
self.widget.on(self.clickEvent, '.ams-widget-edit-btn', function(e) {
e.preventDefault();
var button = $(this);
var widget = button.parents(self.options.widgets);
var widgetOptions = widget.data('widget-options');
var editClass = widgetOptions.editClass.split('|');
self._runLoaderWidget(widget);
var placeholder = widget.find(widgetOptions.editPlaceholder);
if (placeholder.is(':visible')) {
button.children()
.removeClass(editClass[1])
.addClass(editClass[0]);
placeholder.slideUp(widgetOptions.editSpeed, function() {
self._saveWidgetSettings();
});
} else {
button.children()
.removeClass(editClass[0])
.addClass(editClass[1]);
placeholder.slideDown(widgetOptions.editSpeed);
}
if (typeof(widgetOptions.onEdit) === 'function') {
widgetOptions.onEdit.call(this, widget);
}
});
$(self.options.editPlaceholder).find('input').keyup(function() {
$(this).parents(self.options.widgets)
.children('header')
.children('h2')
.text($(this).val());
});
// Custom button
self.widget.on(self.clickEvent, '.ams-widget-custom-btn', function(e) {
e.preventDefault();
var button = $(this);
var widget = button.parents(self.options.widgets);
var widgetOptions = widget.data('widget-options');
var customClass = widgetOptions.customClass.split('|');
self._runLoaderWidget(widget);
if (button.children('.' + customClass[0]).length > 0) {
button.children()
.removeClass(customClass[0])
.addClass(customClass[1]);
if (typeof(widgetOptions.customStart) === 'function') {
widgetOptions.customStart.call(this, widget);
}
} else {
button.children('.' + customClass[1])
.addClass(customClass[0]);
if (typeof(widgetOptions.customEnd) === 'function') {
widgetOptions.customEnd.call(this, widget);
}
}
self._saveWidgetSettings();
});
// Delete button
self.widget.on(self.clickEvent, '.ams-widget-delete-btn', function(e) {
e.preventDefault();
var button = $(this);
var widget = button.parents(self.options.widgets);
var widgetOptions = widget.data('widget-options');
var wId = widget.attr('id');
var title = widget.children('header').children('h2').text();
MyAMS.ajax.check(MyAMS.notify,
MyAMS.baseURL + 'myams-notify' + (MyAMS.devmode ? '.js' : '.min.js'),
function() {
MyAMS.notify.messageBox({
title: '<i class="fa fa-times" style="color: #ed1c24;"></i> ' + widgetOptions.deleteLabel + ' "' + title + '"',
content: MyAMSWidget.i18n.DELETE_MSG,
buttons: "[" + MyAMS.i18n.BTN_OK + "][" + MyAMS.i18n.BTN_CANCEL + "]"
}, function(buttonPressed) {
if (buttonPressed === MyAMS.i18n.BTN_OK) {
self._runLoaderWidget(widget);
$('#' + wId).fadeOut(widgetOptions.deleteSpeed, function() {
button.remove();
if (typeof(widgetOptions.onDelete) === 'function') {
widgetOptions.onDelete.call(this, widget);
}
});
}
});
});
});
// Refresh button
self.widget.on(self.clickEvent, '.ams-widget-refresh-btn', function(e) {
e.preventDefault();
var button = $(this);
var widget = button.parents(self.options.widgets);
var path = widget.data('widget-load');
var loader = widget.children();
button.button('loading');
loader.addClass('widget-body-ajax-loading');
setTimeout(function() {
button.button('reset');
loader.removeClass('widget-body-ajax-loading');
self._loadAjaxFile(widget, path, loader);
}, 1000);
});
}
};
var MyAMSWidget = {
i18n: $.extend({
SETTINGS_KEY_LABEL: "Reset settings?",
POSITION_KEY_LABEL: "Reset position?",
TIMESTAMP_FORMAT: "Last update: %d%/%m%/%y% %h%:%i%:%s",
ERROR_LABEL: "An error occured: ",
UPDATED_LABEL: "Last update: ",
REFRESH_LABEL: "Refresh",
EDIT_BTN: "Edit title",
DELETE_BTN: "Delete",
DELETE_LABEL: "Remove component: ",
DELETE_MSG: "WARNING: this action can't be undone!",
FULLSCREEN_BTN: "Fullscreen",
COLLAPSE_BTN: "Collapse",
REFRESH_BTN: "Reload content",
LOADING_MSG: "Loading..."
}, MyAMS.plugins.i18n.widgets),
initWidgetsGrid: function(grid) {
if (!grid.exists()) {
return;
}
var options = $('.ams-widget:first', grid).data('AMSWidget').options;
if (options.sortable && $.ui) {
var sortItem = grid.find('.sortable-grid').not("[data-widget-excludegrid]");
sortItem.sortable({
items: sortItem.find('.ams-widget-sortable'),
connectWith: sortItem,
placeholder: options.placeholderClass,
cursor: 'move',
revert: true,
opacity: options.opacity,
delay: 200,
cancel: '.button-icon, #ams-widget-fullscreen-mode >div',
zIndex: 10000,
handle: options.dragHandle,
forcePlaceholderSize: true,
forceHelperSize: true,
update: function(event, ui) {
var widget = ui.item.data('AMSWidget');
widget._runLoaderWidget(widget.widget);
widget._saveWidgetPosition();
if (typeof(options.onChange) === 'function') {
options.onChange.call(this, ui.item);
}
}
});
}
}
};
MyAMSWidget.defaults = {
grid: '.ams-widget-grid',
subgrid: 'section',
widgets: '.ams-widget',
controls: '.ams-widget-ctrls',
storage: 'local',
deleteSettingsKey: '',
settingsKeyLabel: MyAMSWidget.i18n.SETTINGS_KEY_LABEL,
deletePositionKey: '',
positionKeyLabel: MyAMSWidget.i18n.POSITION_KEY_LABEL,
sortable: true,
hiddenButtons: false,
// Toggle button
toggleButton: true,
toggleClass: 'fa fa-minus|fa fa-plus',
toggleSpeed: 200,
onToggle: null,
// Delete button
deleteButton: false,
deleteClass: 'fa fa-times',
deleteSpeed: 200,
onDelete: null,
// Edit button
editButton: false,
editPlaceholder: '.ams-widget-editbox',
editClass: 'fa fa-cog|fa fa-save',
editSpeed: 200,
onEdit: null,
// Fullscreen button
fullscreenButton: false,
fullscreenClass: 'fa fa-expand|fa fa-compress',
fullscreenDiff: 3,
onFullscreen: null,
// Custom button
customButton: false,
customClass: 'folder-10|next-10',
customStart: null,
customEnd: null,
// Buttons order
buttonsOrder: '%refresh% %custom% %edit% %toggle% %fullscreen% %delete%',
opacity: 1.0,
dragHandle: '> header',
placeholderClass: 'ams-widget-placeholder',
indicator: true,
indicatorTime: 600,
ajax: true,
timestampPlaceholder : '.ams-widget-timestamp',
timestampFormat : MyAMSWidget.i18n.TIMESTAMP_FORMAT,
refreshButton : true,
refreshButtonClass : 'fa fa-refresh',
errorLabel : MyAMSWidget.i18n.ERROR_LABEL,
updatedLabel : MyAMSWidget.i18n.UPDATED_LABEL,
refreshLabel : MyAMSWidget.i18n.REFRESH_LABEL,
deleteLabel : MyAMSWidget.i18n.DELETE_LABEL,
afterLoad : null,
rtl : false,
onChange : null,
onSave : null,
ajax_nav : MyAMS.ajax_nav
};
globals.MyAMSWidget = MyAMSWidget;
$.fn.extend({
MyAMSWidget: function(options) {
return this.each(function() {
var widget = $(this);
var data = widget.data('AMSWidget');
if (!data) {
var grid = widget.parents(options.grid || MyAMSWidget.defaults.grid);
var grid_options = {};
if (grid.exists()) {
var grid_data = grid.data();
grid_options = {
grid: grid_data.amsWidgetGrid,
subgrid: grid_data.amsWidgetSubgrid,
controls: grid_data.amsWidgetControls,
storage: grid_data.amsWidgetStorage,
deleteSettingsKey: grid_data.amsWidgetDeleteSettingsKey,
deletePositionKey: grid_data.amsWidgetDeletePositionKey,
sortable: grid_data.amsWidgetSortable,
hiddenButtons: grid_data.amsWidgetHiddenButtons,
toggleButton: grid_data.amsWidgetToggleButton,
toggleClass: grid_data.amsWidgetToggleClass,
onToggle: MyAMS.getFunctionByName(grid_data.amsWidgetToggleCallback),
deleteButton: grid_data.amsWidgetDeleteButton,
deleteClass: grid_data.amsWidgetDeleteClass,
onDelete: MyAMS.getFunctionByName(grid_data.amsWidgetDeleteCallback),
editButton: grid_data.amsWidgetEditButton,
editPlaceholder: grid_data.amsWidgetEditPlaceholder,
editClass: grid_data.amsWidgetEditClass,
onEdit: MyAMS.getFunctionByName(grid_data.amsWidgetEditCallback),
fullscreenButton: grid_data.amsWidgetFullscreenButton,
fullscreenClass: grid_data.amsWidgetFullscreenClass,
fullscreenDiff: grid_data.amsWidgetFullscreenDiff,
onFullscreen: MyAMS.getFunctionByName(grid_data.amsWidgetFullscreenCallback),
customButton: grid_data.amsWidgetCustomButton,
customClass: grid_data.amsWidgetCustomClass,
customStart: MyAMS.getFunctionByName(grid_data.amsWidgetCustomStartCallback),
customEnd: MyAMS.getFunctionByName(grid_data.amsWidgetCustomStartCallback),
buttonsOrder: grid_data.amsWidgetButtonsOrder,
opacity: grid_data.amsWidgetOpacity,
dragHandle: grid_data.amsWidgetDragHandle,
placeholderClass: grid_data.amsWidgetPlaceholderClass,
indicator: grid_data.amsWidgetIndicator,
indicatorTime: grid_data.amsWidgetIndicatorTime,
ajax: grid_data.amsWidgetAjax,
timestampPlaceholder : grid_data.amsWidgetTimestampPlaceholder,
timestampFormat : grid_data.amsWidgetTimestampFormat,
refreshButton : grid_data.amsWidgetRefreshButton,
refreshClass : grid_data.amsWidgetRefreshClass,
errorLabel : grid_data.amsWidgetErrorLabel,
updatedLabel : grid_data.amsWidgetUpdatedLabel,
refreshLabel : grid_data.amsWidgetRefreshLabel,
deleteLabel : grid_data.amsWidgetDeleteLabel,
afterLoad : MyAMS.getFunctionByName(grid_data.amsWidgetAfterLoadCallback),
rtl : grid_data.amsWidgetRtl,
onChange : MyAMS.getFunctionByName(grid_data.amsWidgetChangeCallback),
onSave : MyAMS.getFunctionByName(grid_data.amsWidgetSaveCallback),
ajax_nav : MyAMS.ajax_nav
};
}
var settings = $.fn.extend({}, grid_options, widget.data('ams-widget-options') || {}, options);
widget.data('AMSWidget', new Widget(widget, settings));
}
});
}
});
})(jQuery, this); | ztfy.myams | /ztfy.myams-0.1.33.tar.gz/ztfy.myams-0.1.33/src/ztfy/myams/resources/js/myams-widgets.js | myams-widgets.js |
(function($, globals) {
"use strict";
/**
* Update default values for DataTables initialization
*/
$.extend(true, $.fn.dataTable.defaults, {
"sDom": "R<'dt-top-row'CLF>r<'dt-wrapper't><'dt-row dt-bottom-row'<'row'<'col-sm-6'i><'col-sm-6 text-right'p>>",
"sPaginationType": "bootstrap",
"oLanguage": {
"sLengthMenu": "_MENU_",
"sSearch": "_INPUT_"
}
});
/**
* Default class modification
*/
$.extend($.fn.dataTableExt.oStdClasses, {
"sWrapper": "dataTables_wrapper form-inline"
});
/**
* API method to get paging information
*/
$.fn.dataTableExt.oApi.fnPagingInfo = function (oSettings) {
return {
"iStart": oSettings._iDisplayStart,
"iEnd": oSettings.fnDisplayEnd(),
"iLength": oSettings._iDisplayLength,
"iTotal": oSettings.fnRecordsTotal(),
"iFilteredTotal": oSettings.fnRecordsDisplay(),
"iPage": oSettings._iDisplayLength === -1 ? 0 : Math.ceil( oSettings._iDisplayStart / oSettings._iDisplayLength ),
"iTotalPages": oSettings._iDisplayLength === -1 ? 0 : Math.ceil( oSettings.fnRecordsDisplay() / oSettings._iDisplayLength )
};
};
/**
* Custom sorting plug-in
*/
$.fn.dataTableExt.aTypes.unshift(
function(sData) {
if (sData !== null && sData.match(/^(0[1-9]|[1-2][0-9]|3[0-1])\/(0[1-9]|1[0-2])\/[0-3][0-9]{3}$/)) {
return 'date-euro';
}
return null;
}
);
$.fn.dataTableExt.aTypes.unshift(
function(sData) {
if (sData !== null && sData.match(/^(0[1-9]|[1-2][0-9]|3[0-1])\/(0[1-9]|1[0-2])\/[0-3][0-9]{3} - ([0-1][0-9]|2[0-3]):[0-5][0-9]$/)) {
return 'datetime-euro';
}
return null;
}
);
$.extend($.fn.dataTableExt.oSort, {
// numeric-comma column sorter
"numeric-comma-asc": function(a, b) {
var x = a.replace(/,/, ".").replace(/ /g, '');
var y = b.replace(/,/, ".").replace(/ /g, '');
x = parseFloat(x);
y = parseFloat(y);
return ((x < y) ? -1 : ((x > y) ? 1 : 0));
},
"numeric-comma-desc": function(a, b) {
var x = a.replace(/,/, ".").replace(/ /g, '');
var y = b.replace(/,/, ".").replace(/ /g, '');
x = parseFloat(x);
y = parseFloat(y);
return ((x < y) ? 1 : ((x > y) ? -1 : 0));
},
// date-euro column sorter
"date-euro-pre": function(a) {
var trimmed = $.trim(a);
var x;
if (trimmed !== '') {
var frDate= trimmed.split('/');
x = (frDate[2] + frDate[1] + frDate[0]) * 1;
} else {
x = 10000000; // = l'an 1000 ...
}
return x;
},
"date-euro-asc": function(a, b) {
return a - b;
},
"date-euro-desc": function(a, b) {
return b - a;
},
// datetime-euro column sorter
"datetime-euro-pre": function(a) {
var trimmed = $.trim(a);
var x;
if (trimmed !== '') {
var frDateTime = trimmed.split(' - ');
var frDate= frDateTime[0].split('/');
var frTime = frDateTime[1].split(':');
x = (frDate[2] + frDate[1] + frDate[0] + frTime[0] + frTime[1]) * 1;
} else {
x = 100000000000; // = l'an 1000 ...
}
return x;
},
"datetime-euro-asc": function(a, b) {
return a - b;
},
"datetime-euro-desc": function(a, b) {
return b - a;
}
});
/**
* Bootstrap style pagination control
*/
$.extend($.fn.dataTableExt.oPagination, {
"bootstrap": {
"fnInit": function(oSettings, nPaging, fnDraw) {
var oLang = oSettings.oLanguage.oPaginate;
var fnClickHandler = function (e) {
e.preventDefault();
if (oSettings.oApi._fnPageChange(oSettings, e.data.action)) {
fnDraw(oSettings);
}
};
$(nPaging).append(
'<ul class="pagination">' +
'<li class="prev disabled"><a href="#">' + oLang.sPrevious + '</a></li>' +
'<li class="next disabled"><a href="#">' + oLang.sNext + '</a></li>' +
'</ul>'
);
var els = $('a', nPaging);
$(els[0]).on('click.DT', { action: "previous" }, fnClickHandler);
$(els[1]).on('click.DT', { action: "next" }, fnClickHandler);
},
"fnUpdate": function (oSettings, fnDraw) {
var iListLength = 5;
var oPaging = oSettings.oInstance.fnPagingInfo();
var an = oSettings.aanFeatures.p;
var i,
j,
sClass,
iStart,
iEnd,
iLen,
iHalf=Math.floor(iListLength/2);
if (oPaging.iTotalPages < iListLength) {
iStart = 1;
iEnd = oPaging.iTotalPages;
} else if (oPaging.iPage <= iHalf) {
iStart = 1;
iEnd = iListLength;
} else if (oPaging.iPage >= (oPaging.iTotalPages-iHalf)) {
iStart = oPaging.iTotalPages - iListLength + 1;
iEnd = oPaging.iTotalPages;
} else {
iStart = oPaging.iPage - iHalf + 1;
iEnd = iStart + iListLength - 1;
}
for (i=0, iLen=an.length ; i<iLen ; i++) {
// Remove the middle elements
$('li:gt(0)', an[i]).filter(':not(:last)').remove();
// Add the new list items and their event handlers
for (j=iStart ; j<=iEnd ; j++) {
sClass = (j === oPaging.iPage+1) ? 'class="active"' : '';
$('<li '+sClass+'><a href="#">'+j+'</a></li>')
.insertBefore( $('li:last', an[i])[0] )
.on('click', function (e) {
e.preventDefault();
oSettings._iDisplayStart = (parseInt($('a', this).text(),10)-1) * oPaging.iLength;
fnDraw( oSettings );
});
}
// Add / remove disabled classes from the static elements
if (oPaging.iPage === 0) {
$('li:first', an[i]).addClass('disabled');
} else {
$('li:first', an[i]).removeClass('disabled');
}
if (oPaging.iPage === oPaging.iTotalPages-1 || oPaging.iTotalPages === 0) {
$('li:last', an[i]).addClass('disabled');
} else {
$('li:last', an[i]).removeClass('disabled');
}
}
}
}
});
/**
* Bootstrap style full pagination control
*/
$.extend( $.fn.dataTableExt.oPagination, {
"bootstrap_full": {
"fnInit": function(oSettings, nPaging, fnDraw) {
var oLang = oSettings.oLanguage.oPaginate;
var fnClickHandler = function (e) {
e.preventDefault();
if (oSettings.oApi._fnPageChange(oSettings, e.data.action)) {
fnDraw(oSettings);
}
};
$(nPaging).append(
'<ul class="pagination">' +
'<li class="first disabled"><a href="#">' + oLang.sFirst + '</a></li>' +
'<li class="prev disabled"><a href="#">' + oLang.sPrevious + '</a></li>' +
'<li class="next disabled"><a href="#">' + oLang.sNext + '</a></li>' +
'<li class="last disabled"><a href="#">' + oLang.sLast + '</a></li>' +
'</ul>'
);
var els = $('a', nPaging);
$(els[0]).on('click.DT', { action: "first" }, fnClickHandler);
$(els[1]).on('click.DT', { action: "previous" }, fnClickHandler);
$(els[2]).on('click.DT', { action: "next" }, fnClickHandler);
$(els[3]).on('click.DT', { action: "last" }, fnClickHandler);
},
"fnUpdate": function (oSettings, fnDraw) {
var iListLength = 5;
var oPaging = oSettings.oInstance.fnPagingInfo();
var an = oSettings.aanFeatures.p;
var i,
j,
sClass,
iStart,
iLen,
iEnd,
iHalf=Math.floor(iListLength/2);
if (oPaging.iTotalPages < iListLength) {
iStart = 1;
iEnd = oPaging.iTotalPages;
} else if (oPaging.iPage <= iHalf) {
iStart = 1;
iEnd = iListLength;
} else if (oPaging.iPage >= (oPaging.iTotalPages-iHalf)) {
iStart = oPaging.iTotalPages - iListLength + 1;
iEnd = oPaging.iTotalPages;
} else {
iStart = oPaging.iPage - iHalf + 1;
iEnd = iStart + iListLength - 1;
}
for (i=0, iLen=an.length ; i<iLen ; i++) {
// Remove the middle elements
$('li', an[i]).filter(":not(.first)").filter(":not(.last)").filter(":not(.prev)").filter(":not(.next)").remove();
// Add the new list items and their event handlers
for (j=iStart ; j<=iEnd ; j++) {
sClass = (j === oPaging.iPage+1) ? 'class="active"' : '';
$('<li '+sClass+'><a href="#">'+j+'</a></li>')
.insertBefore( $('li.next', an[i])[0] )
.on('click', function (e) {
e.preventDefault();
oSettings._iDisplayStart = (parseInt($('a', this).text(),10)-1) * oPaging.iLength;
fnDraw( oSettings );
});
}
// Add / remove disabled classes from the static elements
if (oPaging.iPage === 0) {
$('li.first', an[i]).addClass('disabled');
$('li.prev', an[i]).addClass('disabled');
} else {
$('li.prev', an[i]).removeClass('disabled');
$('li.first', an[i]).removeClass('disabled');
}
if (oPaging.iPage === oPaging.iTotalPages-1 || oPaging.iTotalPages === 0) {
$('li.last', an[i]).addClass('disabled');
$('li.next', an[i]).addClass('disabled');
} else {
$('li.next', an[i]).removeClass('disabled');
$('li.last', an[i]).removeClass('disabled');
}
}
}
}
} );
/**
* Bootstrap style pagination control with only previous/next buttons
*/
$.extend($.fn.dataTableExt.oPagination, {
"bootstrap_prevnext": {
"fnInit": function(oSettings, nPaging, fnDraw) {
var oLang = oSettings.oLanguage.oPaginate;
var fnClickHandler = function (e) {
e.preventDefault();
if (oSettings.oApi._fnPageChange(oSettings, e.data.action)) {
fnDraw(oSettings);
}
};
$(nPaging).append(
'<ul class="pagination">' +
'<li class="first disabled"><a href="#"><i class="fa fa-fw fa-fast-backward"></i></a></li>' +
'<li class="prev disabled"><a href="#"><i class="fa fa-fw fa-step-backward"></i></a></li>' +
'<li class="next disabled"><a href="#"><i class="fa fa-fw fa-step-forward"></i></a></li>' +
'<li class="last disabled"><a href="#"><i class="fa fa-fw fa-fast-forward"></i></a></li>' +
'</ul>'
);
var els = $('a', nPaging);
$(els[0]).on('click.DT', { action: "first" }, fnClickHandler);
$(els[1]).on('click.DT', { action: "previous" }, fnClickHandler);
$(els[2]).on('click.DT', { action: "next" }, fnClickHandler);
$(els[3]).on('click.DT', { action: "last" }, fnClickHandler);
},
"fnUpdate": function (oSettings, fnDraw) {
var iListLength = 5;
var oPaging = oSettings.oInstance.fnPagingInfo();
var an = oSettings.aanFeatures.p;
var i,
j,
sClass,
iStart,
iEnd,
iLen,
iHalf=Math.floor(iListLength/2);
if (oPaging.iTotalPages < iListLength) {
iStart = 1;
iEnd = oPaging.iTotalPages;
} else if (oPaging.iPage <= iHalf) {
iStart = 1;
iEnd = iListLength;
} else if (oPaging.iPage >= (oPaging.iTotalPages-iHalf)) {
iStart = oPaging.iTotalPages - iListLength + 1;
iEnd = oPaging.iTotalPages;
} else {
iStart = oPaging.iPage - iHalf + 1;
iEnd = iStart + iListLength - 1;
}
for (i=0, iLen=an.length ; i<iLen ; i++) {
// Add / remove disabled classes from the static elements
if (oPaging.iPage === 0) {
$('li.first', an[i]).addClass('disabled');
$('li.prev', an[i]).addClass('disabled');
} else {
$('li.prev', an[i]).removeClass('disabled');
$('li.first', an[i]).removeClass('disabled');
}
if (oPaging.iPage === oPaging.iTotalPages-1 || oPaging.iTotalPages === 0) {
$('li.last', an[i]).addClass('disabled');
$('li.next', an[i]).addClass('disabled');
} else {
$('li.next', an[i]).removeClass('disabled');
$('li.last', an[i]).removeClass('disabled');
}
}
}
}
});
/*
* TableTools Bootstrap compatibility
* Required TableTools 2.1+
*/
if ($.fn.DataTable.TableTools) {
// Set the classes that TableTools uses to something suitable for Bootstrap
$.extend( true, $.fn.DataTable.TableTools.classes, {
"container": "DTTT btn-group",
"buttons": {
"normal": "btn btn-default btn-sm",
"disabled": "disabled"
},
"collection": {
"container": "DTTT_dropdown dropdown-menu",
"buttons": {
"normal": "",
"disabled": "disabled"
}
},
"print": {
"info": "DTTT_print_info modal"
},
"select": {
"row": "active"
}
} );
// Have the collection use a bootstrap compatible dropdown
$.extend(true, $.fn.DataTable.TableTools.DEFAULTS.oTags, {
"collection": {
"container": "ul",
"button": "li",
"liner": "a"
}
});
}
/**
* Length and filter extensions
* Just replace 'l' and 'f' in sDom property by 'L' and 'F' to use them
*/
/**
* Bootstrap length factory
*/
var bl_factory = function($, DataTable) {
var BootstrapLength = function(oSettings, oInit) {
if (!this.CLASS || this.CLASS !== 'BootstrapLength') {
if (globals.alert) {
globals.alert("Warning: BootstrapLength must be initialized with the 'new' keyword");
}
}
if (typeof(oInit) === 'undefined') {
oInit = {};
}
if ($.fn.dataTable.camelToHungarian) {
$.fn.dataTable.camelToHungarian(BootstrapLength.defaults, oInit);
}
this.s = {
dt: null,
oInit: oInit,
hidden: true,
abOriginal: []
};
this.dom = {
wrapper: null,
input: null
};
BootstrapLength.aInstances.push(this);
this.s.dt = $.fn.dataTable.Api ?
new $.fn.dataTable.Api(oSettings).settings()[0]
: oSettings;
this._fnConstruct(oInit);
return this;
};
BootstrapLength.prototype = {
input: function() {
return this.dom.wrapper;
},
fnRebuild: function() {
return this.rebuild();
},
rebuild: function() {
},
_fnConstruct: function(init) {
var self = this;
var dt = self.s.dt;
if (dt.oScroll.bInfinite) {
return;
}
var sName = dt.sTableId + '_length';
var sMenu = $('<select size="1"></select>').attr('name', sName);
var i, iLen;
var aLengthMenu = dt.aLengthMenu;
if (aLengthMenu.length === 2 &&
typeof(aLengthMenu[0]) === 'object' &&
typeof(aLengthMenu[1]) === 'object') {
for (i=0, iLen=aLengthMenu[0].length; i < iLen; i++) {
$('<option />').attr('value', aLengthMenu[0][i])
.text(aLengthMenu[1][i])
.appendTo(sMenu);
}
} else {
for (i=0, iLen=aLengthMenu.length; i < iLen; i++) {
$('<option />').attr('value', aLengthMenu[i])
.text(aLengthMenu[i])
.appendTo(sMenu);
}
}
var nLength = $('<div>').addClass(dt.oClasses.sLength)
.append($('<span></span>').addClass('ams-form')
.append($('<label></label>').addClass('select')
.css('width', 60)
.append(sMenu)
.append($('<i></i>'))));
if (!dt.aanFeatures.L) {
nLength.attr('id', dt.sTableId + '_length');
}
this.dom.wrapper = nLength.get(0);
$('select option[value="' + dt._iDisplayLength + '"]', nLength).attr("selected", true);
$("select", nLength).on('change.DT', function(e) {
var iVal = $(this).val();
var n = dt.aanFeatures.L;
for (i = 0, iLen = n.length; i < iLen; i++) {
if (n[i] !== this.parentNode) {
$("select", n[i]).val(iVal);
}
}
dt._iDisplayLength = parseInt(iVal, 10);
dt.oInstance._fnCalculateEnd(dt);
if (dt.fnDisplayEnd() === dt.fnRecordsDisplay()) {
dt._iDisplayStart = dt.fnDisplayEnd() - dt._iDisplayLength;
if (dt._iDisplayStart < 0) {
dt._iDisplayStart = 0;
}
}
if (dt._iDisplayLength === -1) {
dt._iDisplayStart = 0;
}
dt.oInstance._fnDraw();
});
$("select", nLength).attr("aria-controls", dt.sTableId);
}
};
BootstrapLength.fnRebuild = function(oTable) {};
BootstrapLength.defaults = {};
BootstrapLength.aInstances = [];
BootstrapLength.prototype.CLASS = 'BootstrapLength';
BootstrapLength.VERSION = '1.0.0';
BootstrapLength.prototype.VERSION = BootstrapLength.VERSION;
if ((typeof($.fn.dataTable) === 'function') &&
(typeof($.fn.dataTableExt.fnVersionCheck) === 'function') &&
$.fn.dataTableExt.fnVersionCheck('1.7.0')) {
$.fn.dataTableExt.aoFeatures.push({
fnInit: function(oSettings) {
var init = oSettings.oInit;
var Length = new BootstrapLength(oSettings, init.bootstrapLength || init.oBootstrapLength || {});
return Length.input();
},
cFeature: 'L',
sFeature: "BootstrapLength"
});
} else {
if (globals.alert) {
globals.alert("Warning: BootstrapLength required DataTables 1.7 or greater...");
}
}
$.fn.dataTable.BootstrapLength = BootstrapLength;
return BootstrapLength;
};
if (!$.fn.dataTable.BootstrapLength) {
bl_factory($, $.fn.dataTable);
}
/**
* Bootstrap filter factory
*/
var bf_factory = function($, DataTable) {
var BootstrapFilter = function(oSettings, oInit) {
if (!this.CLASS || this.CLASS !== 'BootstrapFilter') {
if (globals.alert) {
globals.alert("Warning: BootstrapFilter must be initialized with the 'new' keyword");
}
}
if (typeof(oInit) === 'undefined') {
oInit = {};
}
if ($.fn.dataTable.camelToHungarian) {
$.fn.dataTable.camelToHungarian(BootstrapFilter.defaults, oInit);
}
this.s = {
dt: null,
oInit: oInit,
hidden: true,
abOriginal: []
};
this.dom = {
wrapper: null,
input: null
};
BootstrapFilter.aInstances.push(this);
this.s.dt = $.fn.dataTable.Api ?
new $.fn.dataTable.Api(oSettings).settings()[0]
: oSettings;
this._fnConstruct(oInit);
return this;
};
BootstrapFilter.prototype = {
input: function() {
return this.dom.wrapper;
},
fnRebuild: function() {
return this.rebuild();
},
rebuild: function() {
},
_fnConstruct: function(init) {
var self = this;
var dt = self.s.dt;
var oPreviousSearch = dt.oPreviousSearch;
var sSearchStr = '<input type="text">';
var nFilter = $('<div>').addClass(dt.oClasses.sFilter)
.html('<div class="input-group">' +
'<span class="input-group-addon"><i class="fa fa-search"></i></span>' +
sSearchStr +
'</div>');
if (!dt.aanFeatures.F)
nFilter.attr('id', dt.sTableId + '_filter');
this.dom.wrapper = nFilter.get(0);
var jqFilter = $('input[type="text"]', nFilter);
nFilter.data('DT_Input', jqFilter[0]);
jqFilter.val(oPreviousSearch.sSearch.replace('"', """))
.addClass('form-control')
.attr('placeholder', dt.oLanguage.sSearch)
.attr('aria-control', dt.sTableId)
.on('keyup.DT', function(e) {
var n = dt.aanFeatures.F;
var val = $(this).val();
for (var i = 0, iLen = n.length; i < iLen; i++) {
if (n[i] !== $(this).parents("div.dataTables_filter")[0]) {
$(n[i]).data('DT_Input').val(val);
}
}
if (val !== oPreviousSearch.sSearch) {
dt.oInstance._fnFilterComplete({
sSearch: val,
bRegex: oPreviousSearch.bRegex,
bSmart: oPreviousSearch.bSmart,
bCaseInsensitive: oPreviousSearch.bCaseInsensitive
});
}
})
.on('keypress.DT', function(e) {
if (e.keyCode === 13) {
return false;
}
});
}
};
BootstrapFilter.fnRebuild = function(oTable) {};
BootstrapFilter.defaults = {};
BootstrapFilter.aInstances = [];
BootstrapFilter.prototype.CLASS = 'BootstrapFilter';
BootstrapFilter.VERSION = '1.0.0';
BootstrapFilter.prototype.VERSION = BootstrapFilter.VERSION;
if ((typeof($.fn.dataTable) === 'function') &&
(typeof($.fn.dataTableExt.fnVersionCheck) === 'function') &&
$.fn.dataTableExt.fnVersionCheck('1.7.0')) {
$.fn.dataTableExt.aoFeatures.push({
fnInit: function(oSettings) {
var init = oSettings.oInit;
var filter = new BootstrapFilter(oSettings, init.bootstrapFilter || init.oBootstrapFilter || {});
return filter.input();
},
cFeature: 'F',
sFeature: "BootstrapFilter"
});
} else {
if (globals.alert) {
globals.alert("Warning: BootstrapFilter required DataTables 1.7 or greater...");
}
}
$.fn.dataTable.BootstrapFilter = BootstrapFilter;
return BootstrapFilter;
};
if (!$.fn.dataTable.BootstrapFilter) {
bf_factory($, $.fn.dataTable);
}
})(jQuery, this); | ztfy.myams | /ztfy.myams-0.1.33.tar.gz/ztfy.myams-0.1.33/src/ztfy/myams/resources/js/myams-dataTables.js | myams-dataTables.js |
(function($, globals) {
'use strict';
var MyAMS = globals.MyAMS;
MyAMS.graphs = {
init: function(graphs) {
MyAMS.ajax.check($.fn.sparkline,
MyAMS.baseURL + 'ext/jquery-sparkline-2.1.1.min.js',
function() {
graphs.each(function() {
var graph = $(this);
var graph_data = graph.data();
var sparklineType = graph_data.sparklineType || 'bar';
switch (sparklineType) {
case 'bar':
graph.sparkline('html', {
type: 'bar',
barColor: graph_data.sparklineBarColor || graph.css('color') || '#0000f0',
height: graph_data.sparklineHeight || '26px',
barWidth: graph_data.sparklineBarwidth || 5,
barSpacing: graph_data.sparklineBarspacing || 2,
stackedBarColor: graph.data.sparklineBarstackedColor || ["#A90329", "#0099c6", "#98AA56", "#da532c", "#4490B1", "#6E9461", "#990099", "#B4CAD3"],
negBarColor: graph.data.sparklineNegbarColor || '#A90329',
zeroAxis: 'false'
});
break;
case 'line':
graph.sparkline('html', {
type: 'line',
width: graph_data.sparklineWidth || '90px',
height: graph_data.sparklineHeight || '20px',
lineWidth: graph_data.sparklineLineWidth || 1,
lineColor: graph_data.sparklineLineColor || graph.css('color') || '#0000f0',
fillColor: graph_data.fillColor || '#c0d0f0',
spotColor: graph_data.sparklineSpotColor || '#f08000',
minSpotColor: graph_data.sparklineMinspotColor || '#ed1c24',
maxSpotColor: graph_data.sparklineMaxspotColor || '#f08000',
highlightSpotColor: graph_data.sparklineHighlightspotColor || '#50f050',
highlightLineColor: graph_data.sparklineHighlightlineColor || 'f02020',
spotRadius: graph_data.sparklineSpotradius || 1.5,
chartRangeMin: graph_data.sparklineMinY || 'undefined',
chartRangeMax: graph_data.sparklineMaxY || 'undefined',
chartRangeMinX: graph_data.sparklineMinX || 'undefined',
chartRangeMaxX: graph_data.sparklineMaxX || 'undefined',
normalRangeMin: graph_data.minVal || 'undefined',
normalRangeMax: graph_data.maxVal || 'undefined',
normalRangeColor: graph_data.normColor || '#c0c0c0',
drawNormalOnTop: graph_data.drawNormal || false
});
break;
case 'pie':
graph.sparkline('html', {
type: 'pie',
width : graph_data.sparklinePiesize || 90,
height : graph_data.sparklinePiesize || 90,
tooltipFormat : '<span style="color: {{color}}">●</span> ({{percent.1}}%)',
sliceColors : graph_data.sparklinePiecolor || ["#B4CAD3", "#4490B1", "#98AA56", "#da532c", "#6E9461", "#0099c6", "#990099", "#717D8A"],
borderWidth : 1,
offset : graph_data.sparklineOffset || 0,
borderColor : graph_data.borderColor || '#45494C'
});
break;
case 'box':
graph.sparkline('html', {
type : 'box',
width : graph_data.sparklineWidth || 'auto',
height : graph_data.sparklineHeight || 'auto',
raw : graph_data.sparklineBoxraw || false,
target : graph_data.sparklineTargetval || 'undefined',
minValue : graph_data.sparklineMin || 'undefined',
maxValue : graph_data.sparklineMax || 'undefined',
showOutliers : graph_data.sparklineShowoutlier || true,
outlierIQR : graph_data.sparklineOutlierIqr || 1.5,
spotRadius : graph_data.sparklineSpotradius || 1.5,
boxLineColor : graph.css('color') || '#000000',
boxFillColor : graph_data.fillColor || '#c0d0f0',
whiskerColor : graph_data.sparklineWhisColor || '#000000',
outlierLineColor : graph_data.sparklineOutlineColor || '#303030',
outlierFillColor : graph_data.sparklineOutlinefillColor || '#f0f0f0',
medianColor : graph_data.sparklineOutlinemedianColor || '#f00000',
targetColor : graph_data.sparklineOutlinetargetColor || '#40a020'
});
break;
case 'bullet':
graph.sparkline('html', {
type : 'bullet',
height : graph_data.sparklineHeight || 'auto',
targetWidth : graph_data.sparklineWidth || 2,
targetColor : graph_data.sparklineBulletColor || '#ed1c24',
performanceColor : graph_data.sparklinePerformanceColor || '#3030f0',
rangeColors : graph_data.sparklineBulletrangeColor || ["#d3dafe", "#a8b6ff", "#7f94ff"]
});
break;
case 'discrete':
graph.sparkline('html', {
type : 'discrete',
width : graph_data.sparklineWidth || 50,
height : graph_data.sparklineHeight || 26,
lineColor : graph.css('color'),
lineHeight : graph_data.sparklineLineHeight || 5,
thresholdValue : graph_data.sparklineThreshold || 'undefined',
thresholdColor : graph_data.sparklineThresholdColor || '#ed1c24'
});
break;
case 'tristate':
graph.sparkline('html', {
type : 'tristate',
height : graph_data.sparklineHeight || 26,
posBarColor : graph_data.sparklinePosbarColor || '#60f060',
negBarColor : graph_data.sparklineNegbarColor || '#f04040',
zeroBarColor : graph_data.sparklineZerobarColor || '#909090',
barWidth : graph_data.sparklineBarwidth || 5,
barSpacing : graph_data.sparklineBarspacing || 2,
zeroAxis : graph_data.sparklineZeroaxis || false
});
break;
case 'compositebar':
graph.sparkline(graph_data.sparklineBarVal, {
type : 'bar',
width : graph_data.sparklineWidth || '100%',
height : graph_data.sparklineHeight || '20px',
barColor : graph_data.sparklineColorBottom || '#333333',
barWidth : graph_data.sparklineBarwidth || 3
});
graph.sparkline(graph_data.sparklineLineVal, {
width : graph_data.sparklineWidth || '100%',
height : graph_data.sparklineHeight || '20px',
lineColor : graph_data.sparklineColorTop || '#ed1c24',
lineWidth : graph_data.sparklineLineWidth || 1,
composite : true,
fillColor : false
});
break;
case 'compositeline':
graph.sparkline(graph_data.sparklineBarVal, {
type : 'line',
spotRadius : graph_data.sparklineSpotradiusTop || 1.5,
spotColor : graph_data.sparklineSpotColor || '#f08000',
minSpotColor : graph_data.sparklineMinSpotColorTop || '#ed1c24',
maxSpotColor : graph_data.sparklineMaxSpotColorTop || '#f08000',
highlightSpotColor : graph_data.sparklineHighlightSpotColorTop || '#50f050',
highlightLineColor : graph_data.sparklineHighlightLineColorTop || '#f02020',
valueSpots : graph_data.sparklineBarValSpotsTop || null,
lineWidth : graph_data.sparklineLineWidthTop || 1,
width : graph_data.sparklineWidth || '90px',
height : graph_data.sparklineHeight || '20px',
lineColor : graph_data.sparklineColorTop || '#333333',
fillColor : graph_data.sparklineFillcolorTop || 'transparent'
});
graph.sparkline(graph_data.sparklineLineVal, {
type : 'line',
spotRadius : graph_data.sparklineSpotradiusBottom || graph_data.sparklineSpotradiusTop || 1.5,
spotColor : graph_data.sparklineSpotColor || '#f08000',
minSpotColor : graph_data.sparklineMinspotColorBottom || graph_data.sparklineMinspotColorTop || '#ed1c24',
maxSpotColor : graph_data.sparklineMaxspotColorBottom || graph_data.sparklineMaxspotColorTop || '#f08000',
highlightSpotColor : graph_data.sparklineHighlightspotColorBottom || graph_data.sparklineHighlightspotColorTop || '#50f050',
highlightLineColor : graph_data.sparklineHighlightlineColorBottom || graph_data.sparklineHighlightlineColorTop || '#f02020',
valueSpots : graph_data.sparklineBarValSpotsBottom || null,
lineWidth : graph_data.sparklineLineWidthBottom || 1,
width : graph_data.sparklineWidth || '90px',
height : graph_data.sparklineHeight || '20px',
lineColor : graph_data.sparklineColorBottom || '#ed1c24',
composite : true,
fillColor : graph_data.sparklineFillcolorBottom || 'transparent'
});
break;
}
});
});
}
};
})(jQuery, this); | ztfy.myams | /ztfy.myams-0.1.33.tar.gz/ztfy.myams-0.1.33/src/ztfy/myams/resources/js/myams-graphs.js | myams-graphs.js |
!function(t,o){"use strict";t(document).ready(function(){t("body").append("<div id='divSmallBoxes'></div>").append("<div id='divMiniIcons'></div>").append("<div id='divBigBoxes'></div>")});var i,e=0,a=0,s=0,n=0,l=0,c=o.MyAMS;c.notify={messageBox:function(i,s){var n,l,d=c.browser.isIE8orlower(),r={title:"",content:"",status:"",NormalButton:void 0,ActiveButton:void 0,buttons:void 0,input:void 0,placeholder:"",options:void 0,sound:void 0},u=t.extend({},r,i);if(u.sound&&0===d){var v=document.createElement("audio");navigator.userAgent.match("Firefox/")?v.setAttribute("src",c.baseURL+"../sound/message.ogg"):v.setAttribute("src",c.baseURL+"../sound/message.mp3"),t.get(),v.addEventListener("load",function(){v.play()},!0),v.pause(),v.play()}a+=1,0===e&&(e=1,n="<div class='MessageBox animated fadeIn fast' id='MsgBoxBack'></div>",t("body").append(n),1===c.browser.isIE8orlower()&&t("#MsgBoxBack").addClass("MessageIE"));var m,h="",p=0,f="",b=0;if(void 0!==u.input)switch(p=1,u.input=u.input.toLowerCase(),u.input){case"text":case"password":h="<input class='form-control' type='"+u.input+"' id='txt"+a+"' placeholder='"+u.placeholder+"'/><br/><br/>";break;case"select":if(void 0===u.options)o.alert&&o.alert("For this type of input, the options parameter is required.");else{for(h="<select class='form-control' id='txt"+a+"'>",m=0;m<=u.options.length-1;m++)"["===u.options[m]?f="":"]"===u.options[m]?(b+=1,h+=f="<option>"+f+"</option>"):f+=u.options[m];h+="</select>"}break;default:o.alert&&o.alert("That type of input is not handled yet")}for(l="<div class='MessageBoxContainer "+u.status+" animated fadeIn fast' id='Msg"+a+"'>",l+="<div class='MessageBoxMiddle'>",l+="<span class='MsgTitle'>"+u.title+"</span class='MsgTitle'>",l+="<p class='pText'>"+u.content+"</p>",l+=h,l+="<div class='MessageBoxButtonSection'>",void 0===u.buttons&&(u.buttons="[Accept]"),u.buttons=t.trim(u.buttons),u.buttons=u.buttons.split(""),void 0===u.NormalButton&&(u.NormalButton="#232323"),void 0===u.ActiveButton&&(u.ActiveButton="#ed145b"),m=0;m<=u.buttons.length-1;m++)"["===u.buttons[m]?f="":"]"===u.buttons[m]?l+=f="<button id='bot"+(b+=1)+"-Msg"+a+"' class='btn "+(1===b?"btn-primary":"btn-default")+" btn-sm botTempo'> "+f+"</button>":f+=u.buttons[m];l+="</div>",l+="</div>",l+="</div>",a>1&&(t(".MessageBoxContainer").hide(),t(".MessageBoxContainer").css("z-index",99999)),t(".MessageBox").append(l),1===p&&t("#txt"+a).focus(),t(".botTempo").hover(function(){t(this).attr("id")},function(){t(this).attr("id")}),t(".botTempo").click(function(){var o=t(this).attr("id"),i=o.substr(o.indexOf("-")+1),n=t.trim(t(this).text());if(1===p){if("function"==typeof s){var l=i.replace("Msg",""),c=t("#txt"+l).val();s&&s(n,c)}}else"function"==typeof s&&s&&s(n);t("#"+i).addClass("animated fadeOut fast"),0===(a-=1)&&t("#MsgBoxBack").removeClass("fadeIn").addClass("fadeOut").delay(300).queue(function(){e=0,t(this).remove()})})},bigBox:function(o,i){var e;if(!0===(o=t.extend({title:"",content:"",icon:void 0,number:void 0,color:void 0,sound:!0,timeout:void 0,colortime:1500,colors:void 0},o)).sound&&0===c.browser.isIE8orlower()){var a=document.createElement("audio");navigator.userAgent.match("Firefox/")?a.setAttribute("src",c.baseURL+"../snd/bigbox.ogg"):a.setAttribute("src",c.baseURL+"../snd/bigbox.mp3"),t.get(),a.addEventListener("load",function(){a.play()},!0),a.pause(),a.play()}e="<div id='bigBox"+(s+=1)+"' class='BigBox animated fadeIn fast'><div id='bigBoxColor"+s+"'><i class='btnClose fa fa-times' id='btnClose"+s+"'></i>",void 0===o.icon&&(o.icon="fa fa-cloud"),e+="<span><i class='"+o.icon+"'></i> "+o.title+"</span>",e+="<p>"+o.content+"</p>",e+="<div class='bigboxnumber'>",void 0!==o.number&&(e+=o.number),e+="</div></div>",e+="</div>",t("#divBigBoxes").append(e),void 0===o.color&&(o.color="#004d60"),t("#bigBox"+s).css("background-color",o.color),t("#divMiniIcons").append("<div id='miniIcon"+s+"' class='cajita animated fadeIn' style='background-color: "+o.color+";'><i class='"+o.icon+"'/></i></div>"),t("#miniIcon"+s).bind("click",function(){var o=t(this).attr("id"),i=o.replace("miniIcon","bigBox"),e=o.replace("miniIcon","bigBoxColor");t(".cajita").each(function(o){var i=t(this).attr("id").replace("miniIcon","bigBox");t("#"+i).css("z-index",9998)}),t("#"+i).css("z-index",9999),t("#"+e).removeClass("animated fadeIn").delay(1).queue(function(){t(this).show(),t(this).addClass("animated fadeIn"),t(this).clearQueue()})});var n,l=t("#btnClose"+s),d=t("#bigBox"+s),r=t("#miniIcon"+s);if(void 0!==o.colors&&o.colors.length>0&&(l.attr("colorcount","0"),n=setInterval(function(){var t=l.attr("colorcount");l.animate({backgroundColor:o.colors[t].color}),d.animate({backgroundColor:o.colors[t].color}),r.animate({backgroundColor:o.colors[t].color}),t<o.colors.length-1?l.attr("colorcount",1*t+1):l.attr("colorcount",0)},o.colortime)),l.bind("click",function(){clearInterval(n),"function"==typeof i&&i&&i();var o=t(this).attr("id"),e=o.replace("btnClose","bigBox"),a=o.replace("btnClose","miniIcon");t("#"+e).removeClass("fadeIn fast"),t("#"+e).addClass("fadeOut fast").delay(300).queue(function(){t(this).clearQueue(),t(this).remove()}),t("#"+a).removeClass("fadeIn fast"),t("#"+a).addClass("fadeOut fast").delay(300).queue(function(){t(this).clearQueue(),t(this).remove()})}),void 0!==o.timeout){var u=s;setTimeout(function(){clearInterval(n);var o=t("#bigBox"+u);o.removeClass("fadeIn fast"),o.addClass("fadeOut fast").delay(300).queue(function(){t(this).clearQueue(),t(this).remove()});var i=t("#miniIcon"+u);i.removeClass("fadeIn fast"),i.addClass("fadeOut fast").delay(300).queue(function(){t(this).clearQueue(),t(this).remove()})},o.timeout)}},smallBox:function(o,e){var a;if(!0===(o=t.extend({title:"",content:"",icon:void 0,iconSmall:void 0,sound:!0,color:void 0,timeout:void 0,colortime:1500,colors:void 0},o)).sound&&0===c.browser.isIE8orlower()){var s=document.createElement("audio");navigator.userAgent.match("Firefox/")?s.setAttribute("src",c.baseURL+"../snd/smallbox.ogg"):s.setAttribute("src",c.baseURL+"../snd/smallbox.mp3"),t.get(),s.addEventListener("load",function(){s.play()},!0),s.pause(),s.play()}a="";var d="",r="smallbox"+(n+=1);d=void 0===o.iconSmall?"<div class='miniIcon'></div>":"<div class='miniIcon'><i class='miniPic "+o.iconSmall+"'></i></div>",a=void 0===o.icon?"<div id='smallbox"+n+"' class='SmallBox animated fadeInRight fast'><div class='textoFull'><span>"+o.title+"</span><p>"+o.content+"</p></div>"+d+"</div>":"<div id='smallbox"+n+"' class='SmallBox animated fadeInRight fast'><div class='foto'><i class='"+o.icon+"'></i></div><div class='textoFoto'><span>"+o.title+"</span><p>"+o.content+"</p></div>"+d+"</div>",1===n?(t("#divSmallBoxes").append(a),l=t("#smallbox"+n).height()+40):0===t(".SmallBox").size()?(t("#divSmallBoxes").append(a),l=t("#smallbox"+n).height()+40):(t("#divSmallBoxes").append(a),t("#smallbox"+n).css("top",l),l=l+t("#smallbox"+n).height()+20,t(".SmallBox").each(function(o){0===o?(t(this).css("top",20),i=t(this).height()+40,l=t(this).height()+40):(t(this).css("top",i),i=i+t(this).height()+20,l=l+t(this).height()+20)}));var u=t("#smallbox"+n);void 0===o.color?u.css("background-color","#004d60"):u.css("background-color",o.color);var v;void 0!==o.colors&&o.colors.length>0&&(u.attr("colorcount","0"),v=setInterval(function(){var t=u.attr("colorcount");u.animate({backgroundColor:o.colors[t].color}),t<o.colors.length-1?u.attr("colorcount",1*t+1):u.attr("colorcount",0)},o.colortime)),void 0!==o.timeout&&setTimeout(function(){clearInterval(v);var o=t(this).height()+20;t("#"+r).css("top");0!==t("#"+r+":hover").length?t("#"+r).on("mouseleave",function(){l-=o,t("#"+r).remove(),"function"==typeof e&&e&&e();var i=0;t(".SmallBox").each(function(o){0===o?(t(this).animate({top:20},300),i=t(this).height()+40,l=t(this).height()+40):(t(this).animate({top:i},350),i=i+t(this).height()+20,l=l+t(this).height()+20)})}):(clearInterval(v),l-=o,"function"==typeof e&&e&&e(),t("#"+r).removeClass().addClass("SmallBox").animate({opacity:0},300,function(){t(this).remove();var o=0;t(".SmallBox").each(function(i){0===i?(t(this).animate({top:20},300),o=t(this).height()+40,l=t(this).height()+40):(t(this).animate({top:o}),o=o+t(this).height()+20,l=l+t(this).height()+20)})}))},o.timeout),t("#smallbox"+n).bind("click",function(){clearInterval(v),"function"==typeof e&&e&&e();var o=t(this).height()+20;t(this).attr("id"),t(this).css("top");l-=o,t(this).removeClass().addClass("SmallBox").animate({opacity:0},300,function(){t(this).remove();var o=0;t(".SmallBox").each(function(i){0===i?(t(this).animate({top:20},300),o=t(this).height()+40,l=t(this).height()+40):(t(this).animate({top:o},350),o=o+t(this).height()+20,l=l+t(this).height()+20)})})})}}}(jQuery,this); | ztfy.myams | /ztfy.myams-0.1.33.tar.gz/ztfy.myams-0.1.33/src/ztfy/myams/resources/js/myams-notify.min.js | myams-notify.min.js |
!function(e,r){"use strict";var a=r.MyAMS;if(e.datepicker){e.datepicker.setDefaults({closeText:"Fermer",prevText:"Précédent",nextText:"Suivant",currentText:"Aujourd'hui",monthNames:["janvier","février","mars","avril","mai","juin","juillet","août","septembre","octobre","novembre","décembre"],monthNamesShort:["janv.","févr.","mars","avril","mai","juin","juil.","août","sept.","oct.","nov.","déc."],dayNames:["dimanche","lundi","mardi","mercredi","jeudi","vendredi","samedi"],dayNamesShort:["dim.","lun.","mar.","mer.","jeu.","ven.","sam."],dayNamesMin:["D","L","M","M","J","V","S"],weekHeader:"Sem.",dateFormat:"dd/mm/yy",firstDay:1,isRTL:!1,showMonthAfterYear:!1,yearSuffix:""})}e.extend(a.i18n,{INFO:"Information",WARNING:"!! ATTENTION !!",ERROR:"ERREUR : ",LOADING:"Chargement en cours...",PROGRESS:"Traitement en cours",WAIT:"Veuillez patienter...",FORM_SUBMITTED:"Vous avez déjà soumis ce formulaire !",NO_SERVER_RESPONSE:"Pas de réponse du serveur !",ERROR_OCCURED:"Une erreur s'est produite !",ERRORS_OCCURED:"Des erreurs se sont produites !",BAD_LOGIN_TITLE:"Paramètres de connexion incorrects !",BAD_LOGIN_MESSAGE:"Your anthentication credentials didn't allow you to open a session; please check your credentials or contact administrator.",CONFIRM:"Confirmation",CONFIRM_REMOVE:"La suppression de cet élément ne peut pas être annulée. Confirmez-vous ?",CLEAR_STORAGE_TITLE:"Effacer le stockage local ?",CLEAR_STORAGE_CONTENT:"Le stockage local permet de mémoriser au sein de votre navigateur le paramétrage des composants sur l'ensemble de ce site.<br />Êtes-vous sûr(e) de vouloir effacer ces paramètres pour l'ensemble de l'application ?",BTN_OK:"OK",BTN_CANCEL:"Annuler",BTN_OK_CANCEL:"[OK][Annuler]",BTN_YES:"Oui",BTN_NO:"Non",BTN_YES_NO:"[Oui][Non]",CLIPBOARD_COPY:"Copier dans le presse-papier avec Ctrl+C, puis Entrée",CLIPBOARD_CHARACTER_COPY_OK:"Caractère copié - vous pouvez le coller dans une zone de saisie",CLIPBOARD_TEXT_COPY_OK:"Texte copié - vous pouvez le coller dans une zone de saisie",FORM_CHANGED_WARNING:"Certaines modifications n'ont pas été enregistrées.\nCes modifications seront perdues si vous quittez cette page.",DELETE_WARNING:"Cette suppression ne pourra pas être annulée. Êtes-vous sûr de vouloir supprimer cet élément ?",NO_UPDATE:"Aucune modification effectuée.",DATA_UPDATED:"Données enregistrées.",HOME:"Accueil",LOGOUT:"Déconnexion",LOGOUT_COMMENT:"Vous pouvez renforcer votre sécurité en fermant la fenêtre de ce navigateur une fois la déconnexion effectuée...",SELECT2_PLURAL:"s",SELECT2_MATCH:"Un seul résultat disponible, utilisez la touche Entrée pour le sélectionner.",SELECT2_MATCHES:" résultats sont disponibles, utilisez les flèches haut et bas pour naviguer.",SELECT2_NOMATCHES:"Pas de correspondance",SELECT2_SEARCHING:"Recherche...",SELECT2_LOADMORE:"Chargement en cours...",SELECT2_INPUT_TOOSHORT:"Veuillez saisir au moins {0} caractère{1}",SELECT2_INPUT_TOOLONG:"Veuillez supprimer {0} caractère{1}",SELECT2_SELECTION_TOOBIG:"Vous ne pouvez sélectionner que {0} élément{1}",SELECT2_FREETAG_PREFIX:"Texte libre : ",DT_COLUMNS:"Colonnes"}),e.extend(a.plugins.i18n,{widgets:{SETTINGS_KEY_LABEL:"Réinitialiser les paramètres de ce composant ?",POSITION_KEY_LABEL:"Réinitialiser la position de ce composant ?",TIMESTAMP_FORMAT:"Dernière mise à jour: %d%/%m%/%y% %h%:%i%:%s",ERROR_LABEL:"Une erreur s'est produite : ",UPDATED_LABEL:"Dernière mise à jour : ",REFRESH_LABEL:"Rafraîchir",EDIT_BTN:"Modifier le titre",DELETE_BTN:"Supprimer",DELETE_LABEL:"Supprimer le composant : ",DELETE_MSG:"ATTENTION : cette action ne peut pas être annulée !",FULLSCREEN_BTN:"Plein écran",COLLAPSE_BTN:"Replier",REFRESH_BTN:"Recharger le contenu",LOADING_MSG:"Chargement..."},validate:{required:"Ce champ est obligatoire.",remote:"Veuillez corriger ce champ.",email:"Veuillez saisir une adresse mail valide.",url:"Veuillez saisir une URL valide.",date:"Veuillez saisir une date valide.",dateISO:"Veuillez saisir une date valide (format ISO).",number:"Veuillez saisir un nombre.",digits:"Veuillez ne saisir que des chiffres.",creditcard:"Veuillez saisir un numéro de carte valide.",equalTo:"Veuillez saisir la même valeur.",maxlength:"Ce champ est limité à {0} caractères.",minlength:"Ce champ doit faire au moins {0} caractères.",rangelength:"Ce champ doit comporter entre {0} et {1} caractères.",range:"Veuillez saisir une valeur entre {0} et {1}.",max:"Veuillez saisir une valeur inférieure ou égale à {0}.",min:"Veuillez saisir une valeur supérieure ou égale à {0}."},datatables:{sProcessing:"Traitement en cours...",sSearch:"Filtrer...",sLengthMenu:"Afficher _MENU_ éléments par page",sInfo:"Affichage des éléments _START_ à _END_ sur _TOTAL_",sInfoEmpty:"Aucun élément à afficher",sInfoFiltered:"(sur un total de _MAX_)",sInfoPostFix:"",sLoadingRecords:"Chargement en cours...",sZeroRecords:"Aucun élément à afficher",sEmptyTable:"Aucune donnée disponible dans le tableau",oPaginate:{sFirst:"Premier",sPrevious:"Précédent",sNext:"Suivant",sLast:"Dernier"},sColumns:"Colonnes",oAria:{sSortAscending:": activer pour trier la colonne par ordre croissant",sSortDescending:": activer pour trier la colonne par ordre décroissant"}},fancybox:{ERROR:"Le contenu demandé ne peut pas être chargé.",RETRY:"Veuillez vérifier la requête ou ré-essayer plus tard.",CLOSE:"Fermer",NEXT:"Suivant",PREVIOUS:"Précédent"}})}(jQuery,this); | ztfy.myams | /ztfy.myams-0.1.33.tar.gz/ztfy.myams-0.1.33/src/ztfy/myams/resources/js/i18n/myams_fr.min.js | myams_fr.min.js |
(function($, globals) {
'use strict';
var MyAMS = globals.MyAMS;
if ($.datepicker) {
var locale = {
closeText: 'Fermer',
prevText: 'Précédent',
nextText: 'Suivant',
currentText: 'Aujourd\'hui',
monthNames: ['janvier', 'février', 'mars', 'avril', 'mai', 'juin',
'juillet', 'août', 'septembre', 'octobre', 'novembre', 'décembre'],
monthNamesShort: ['janv.', 'févr.', 'mars', 'avril', 'mai', 'juin',
'juil.', 'août', 'sept.', 'oct.', 'nov.', 'déc.'],
dayNames: ['dimanche', 'lundi', 'mardi', 'mercredi', 'jeudi', 'vendredi', 'samedi'],
dayNamesShort: ['dim.', 'lun.', 'mar.', 'mer.', 'jeu.', 'ven.', 'sam.'],
dayNamesMin: ['D','L','M','M','J','V','S'],
weekHeader: 'Sem.',
dateFormat: 'dd/mm/yy',
firstDay: 1,
isRTL: false,
showMonthAfterYear: false,
yearSuffix: ''
};
$.datepicker.setDefaults(locale);
}
$.extend(MyAMS.i18n, {
INFO: "Information",
WARNING: "!! ATTENTION !!",
ERROR: "ERREUR : ",
LOADING: "Chargement en cours...",
PROGRESS: "Traitement en cours",
WAIT: "Veuillez patienter...",
FORM_SUBMITTED: "Vous avez déjà soumis ce formulaire !",
NO_SERVER_RESPONSE: "Pas de réponse du serveur !",
ERROR_OCCURED: "Une erreur s'est produite !",
ERRORS_OCCURED: "Des erreurs se sont produites !",
BAD_LOGIN_TITLE: "Paramètres de connexion incorrects !",
BAD_LOGIN_MESSAGE: "Your anthentication credentials didn't allow you to open a session; " +
"please check your credentials or contact administrator.",
CONFIRM: "Confirmation",
CONFIRM_REMOVE: "La suppression de cet élément ne peut pas être annulée. Confirmez-vous ?",
CLEAR_STORAGE_TITLE: "Effacer le stockage local ?",
CLEAR_STORAGE_CONTENT: "Le stockage local permet de mémoriser au sein de votre navigateur le paramétrage des composants sur l'ensemble de ce site.<br />" +
"Êtes-vous sûr(e) de vouloir effacer ces paramètres pour l'ensemble de l'application ?",
BTN_OK: "OK",
BTN_CANCEL: "Annuler",
BTN_OK_CANCEL: "[OK][Annuler]",
BTN_YES: "Oui",
BTN_NO: "Non",
BTN_YES_NO: "[Oui][Non]",
CLIPBOARD_COPY: "Copier dans le presse-papier avec Ctrl+C, puis Entrée",
CLIPBOARD_CHARACTER_COPY_OK: "Caractère copié - vous pouvez le coller dans une zone de saisie",
CLIPBOARD_TEXT_COPY_OK: "Texte copié - vous pouvez le coller dans une zone de saisie",
FORM_CHANGED_WARNING: "Certaines modifications n'ont pas été enregistrées.\nCes modifications seront perdues si vous quittez cette page.",
DELETE_WARNING: "Cette suppression ne pourra pas être annulée. Êtes-vous sûr de vouloir supprimer cet élément ?",
NO_UPDATE: "Aucune modification effectuée.",
DATA_UPDATED: "Données enregistrées.",
HOME: "Accueil",
LOGOUT: "Déconnexion",
LOGOUT_COMMENT: "Vous pouvez renforcer votre sécurité en fermant la fenêtre de ce navigateur une fois la déconnexion effectuée...",
SELECT2_PLURAL: 's',
SELECT2_MATCH: "Un seul résultat disponible, utilisez la touche Entrée pour le sélectionner.",
SELECT2_MATCHES: " résultats sont disponibles, utilisez les flèches haut et bas pour naviguer.",
SELECT2_NOMATCHES: "Pas de correspondance",
SELECT2_SEARCHING: "Recherche...",
SELECT2_LOADMORE: "Chargement en cours...",
SELECT2_INPUT_TOOSHORT: "Veuillez saisir au moins {0} caractère{1}",
SELECT2_INPUT_TOOLONG: "Veuillez supprimer {0} caractère{1}",
SELECT2_SELECTION_TOOBIG: "Vous ne pouvez sélectionner que {0} élément{1}",
SELECT2_FREETAG_PREFIX: "Texte libre : ",
DT_COLUMNS: "Colonnes"
});
$.extend(MyAMS.plugins.i18n, {
widgets: {
SETTINGS_KEY_LABEL: "Réinitialiser les paramètres de ce composant ?",
POSITION_KEY_LABEL: "Réinitialiser la position de ce composant ?",
TIMESTAMP_FORMAT: "Dernière mise à jour: %d%/%m%/%y% %h%:%i%:%s",
ERROR_LABEL: "Une erreur s'est produite : ",
UPDATED_LABEL: "Dernière mise à jour : ",
REFRESH_LABEL: "Rafraîchir",
EDIT_BTN: "Modifier le titre",
DELETE_BTN: "Supprimer",
DELETE_LABEL: "Supprimer le composant : ",
DELETE_MSG: "ATTENTION : cette action ne peut pas être annulée !",
FULLSCREEN_BTN: "Plein écran",
COLLAPSE_BTN: "Replier",
REFRESH_BTN: "Recharger le contenu",
LOADING_MSG: "Chargement..."
},
validate: {
required: "Ce champ est obligatoire.",
remote: "Veuillez corriger ce champ.",
email: "Veuillez saisir une adresse mail valide.",
url: "Veuillez saisir une URL valide.",
date: "Veuillez saisir une date valide.",
dateISO: "Veuillez saisir une date valide (format ISO).",
number: "Veuillez saisir un nombre.",
digits: "Veuillez ne saisir que des chiffres.",
creditcard: "Veuillez saisir un numéro de carte valide.",
equalTo: "Veuillez saisir la même valeur.",
maxlength: "Ce champ est limité à {0} caractères.",
minlength: "Ce champ doit faire au moins {0} caractères.",
rangelength: "Ce champ doit comporter entre {0} et {1} caractères.",
range: "Veuillez saisir une valeur entre {0} et {1}.",
max: "Veuillez saisir une valeur inférieure ou égale à {0}.",
min: "Veuillez saisir une valeur supérieure ou égale à {0}."
},
datatables: {
sProcessing: "Traitement en cours...",
sSearch: "Filtrer...",
sLengthMenu: "Afficher _MENU_ éléments par page",
sInfo: "Affichage des éléments _START_ à _END_ sur _TOTAL_",
sInfoEmpty: "Aucun élément à afficher",
sInfoFiltered: "(sur un total de _MAX_)",
sInfoPostFix: "",
sLoadingRecords: "Chargement en cours...",
sZeroRecords: "Aucun élément à afficher",
sEmptyTable: "Aucune donnée disponible dans le tableau",
oPaginate: {
sFirst: "Premier",
sPrevious: "Précédent",
sNext: "Suivant",
sLast: "Dernier"
},
sColumns: "Colonnes",
oAria: {
sSortAscending: ": activer pour trier la colonne par ordre croissant",
sSortDescending: ": activer pour trier la colonne par ordre décroissant"
}
},
fancybox: {
ERROR: "Le contenu demandé ne peut pas être chargé.",
RETRY: "Veuillez vérifier la requête ou ré-essayer plus tard.",
CLOSE: "Fermer",
NEXT: "Suivant",
PREVIOUS: "Précédent"
}
});
})(jQuery, this); | ztfy.myams | /ztfy.myams-0.1.33.tar.gz/ztfy.myams-0.1.33/src/ztfy/myams/resources/js/i18n/myams_fr.js | myams_fr.js |
(function($) {
var j = $.scrollTo = function(a, b, c) {
return $(window).scrollTo(a, b, c)
};
j.defaults = {
axis: 'xy',
duration: parseFloat($.fn.jquery) >= 1.3 ? 0 : 1,
limit: true
};
j.window = function(a) {
return $(window)._scrollable()
};
$.fn._scrollable = function() {
return this.map(function() {
var a = this,
isWin = !a.nodeName || $.inArray(a.nodeName.toLowerCase(), ['iframe', '#document', 'html', 'body']) != -1;
if (!isWin) return a;
var b = (a.contentWindow || a).document || a.ownerDocument || a;
return /webkit/i.test(navigator.userAgent) || b.compatMode == 'BackCompat' ? b.body : b.documentElement
})
};
$.fn.scrollTo = function(f, g, h) {
if (typeof g == 'object') {
h = g;
g = 0
}
if (typeof h == 'function') h = {
onAfter: h
};
if (f == 'max') f = 9e9;
h = $.extend({}, j.defaults, h);
g = g || h.duration;
h.queue = h.queue && h.axis.length > 1;
if (h.queue) g /= 2;
h.offset = both(h.offset);
h.over = both(h.over);
return this._scrollable().each(function() {
if (f == null) return;
var d = this,
$elem = $(d),
targ = f,
toff, attr = {},
win = $elem.is('html,body');
switch (typeof targ) {
case 'number':
case 'string':
if (/^([+-]=?)?\d+(\.\d+)?(px|%)?$/.test(targ)) {
targ = both(targ);
break
}
targ = $(targ, this);
if (!targ.length) return;
case 'object':
if (targ.is || targ.style) toff = (targ = $(targ)).offset()
}
var e = $.isFunction(h.offset) && h.offset(d, targ) || h.offset;
$.each(h.axis.split(''), function(i, a) {
var b = a == 'x' ? 'Left' : 'Top',
pos = b.toLowerCase(),
key = 'scroll' + b,
old = d[key],
max = j.max(d, a);
if (toff) {
attr[key] = toff[pos] + (win ? 0 : old - $elem.offset()[pos]);
if (h.margin) {
attr[key] -= parseInt(targ.css('margin' + b)) || 0;
attr[key] -= parseInt(targ.css('border' + b + 'Width')) || 0
}
attr[key] += e[pos] || 0;
if (h.over[pos]) attr[key] += targ[a == 'x' ? 'width' : 'height']() * h.over[pos]
} else {
var c = targ[pos];
attr[key] = c.slice && c.slice(-1) == '%' ? parseFloat(c) / 100 * max : c
}
if (h.limit && /^\d+$/.test(attr[key])) attr[key] = attr[key] <= 0 ? 0 : Math.min(attr[key], max);
if (!i && h.queue) {
if (old != attr[key]) animate(h.onAfterFirst);
delete attr[key]
}
});
animate(h.onAfter);
function animate(a) {
$elem.animate(attr, g, h.easing, a &&
function() {
a.call(this, targ, h)
})
}
}).end()
};
j.max = function(a, b) {
var c = b == 'x' ? 'Width' : 'Height',
scroll = 'scroll' + c;
if (!$(a).is('html,body')) return a[scroll] - $(a)[c.toLowerCase()]();
var d = 'client' + c,
html = a.ownerDocument.documentElement,
body = a.ownerDocument.body;
return Math.max(html[scroll], body[scroll]) - Math.min(html[d], body[d])
};
function both(a) {
return $.isFunction(a) || typeof a == 'object' ? a : {
top: a,
left: a
}
};
return j
})(jQuery); | ztfy.myams | /ztfy.myams-0.1.33.tar.gz/ztfy.myams-0.1.33/src/ztfy/myams/resources/js/ext/jquery-scrollTo.js | jquery-scrollTo.js |
(function ($) {
'use strict';
var default_options = {
i18n: {
ar: { // Arabic
months: [
"كانون الثاني", "شباط", "آذار", "نيسان", "مايو", "حزيران", "تموز", "آب", "أيلول", "تشرين الأول", "تشرين الثاني", "كانون الأول"
],
dayOfWeek: [
"ن", "ث", "ع", "خ", "ج", "س", "ح"
]
},
ro: { // Romanian
months: [
"ianuarie", "februarie", "martie", "aprilie", "mai", "iunie", "iulie", "august", "septembrie", "octombrie", "noiembrie", "decembrie"
],
dayOfWeek: [
"l", "ma", "mi", "j", "v", "s", "d"
]
},
id: { // Indonesian
months: [
"Januari", "Februari", "Maret", "April", "Mei", "Juni", "Juli", "Agustus", "September", "Oktober", "November", "Desember"
],
dayOfWeek: [
"Sen", "Sel", "Rab", "Kam", "Jum", "Sab", "Min"
]
},
bg: { // Bulgarian
months: [
"Януари", "Февруари", "Март", "Април", "Май", "Юни", "Юли", "Август", "Септември", "Октомври", "Ноември", "Декември"
],
dayOfWeek: [
"Нд", "Пн", "Вт", "Ср", "Чт", "Пт", "Сб"
]
},
fa: { // Persian/Farsi
months: [
'فروردین', 'اردیبهشت', 'خرداد', 'تیر', 'مرداد', 'شهریور', 'مهر', 'آبان', 'آذر', 'دی', 'بهمن', 'اسفند'
],
dayOfWeek: [
'یکشنبه', 'دوشنبه', 'سه شنبه', 'چهارشنبه', 'پنجشنبه', 'جمعه', 'شنبه'
]
},
ru: { // Russian
months: [
'Январь', 'Февраль', 'Март', 'Апрель', 'Май', 'Июнь', 'Июль', 'Август', 'Сентябрь', 'Октябрь', 'Ноябрь', 'Декабрь'
],
dayOfWeek: [
"Вск", "Пн", "Вт", "Ср", "Чт", "Пт", "Сб"
]
},
uk: { // Ukrainian
months: [
'Січень', 'Лютий', 'Березень', 'Квітень', 'Травень', 'Червень', 'Липень', 'Серпень', 'Вересень', 'Жовтень', 'Листопад', 'Грудень'
],
dayOfWeek: [
"Ндл", "Пнд", "Втр", "Срд", "Чтв", "Птн", "Сбт"
]
},
en: { // English
months: [
"January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"
],
dayOfWeek: [
"Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"
]
},
el: { // Ελληνικά
months: [
"Ιανουάριος", "Φεβρουάριος", "Μάρτιος", "Απρίλιος", "Μάιος", "Ιούνιος", "Ιούλιος", "Αύγουστος", "Σεπτέμβριος", "Οκτώβριος", "Νοέμβριος", "Δεκέμβριος"
],
dayOfWeek: [
"Κυρ", "Δευ", "Τρι", "Τετ", "Πεμ", "Παρ", "Σαβ"
]
},
de: { // German
months: [
'Januar', 'Februar', 'März', 'April', 'Mai', 'Juni', 'Juli', 'August', 'September', 'Oktober', 'November', 'Dezember'
],
dayOfWeek: [
"So", "Mo", "Di", "Mi", "Do", "Fr", "Sa"
]
},
nl: { // Dutch
months: [
"januari", "februari", "maart", "april", "mei", "juni", "juli", "augustus", "september", "oktober", "november", "december"
],
dayOfWeek: [
"zo", "ma", "di", "wo", "do", "vr", "za"
]
},
tr: { // Turkish
months: [
"Ocak", "Şubat", "Mart", "Nisan", "Mayıs", "Haziran", "Temmuz", "Ağustos", "Eylül", "Ekim", "Kasım", "Aralık"
],
dayOfWeek: [
"Paz", "Pts", "Sal", "Çar", "Per", "Cum", "Cts"
]
},
fr: { //French
months: [
"Janvier", "Février", "Mars", "Avril", "Mai", "Juin", "Juillet", "Août", "Septembre", "Octobre", "Novembre", "Décembre"
],
dayOfWeek: [
"Dim", "Lun", "Mar", "Mer", "Jeu", "Ven", "Sam"
]
},
es: { // Spanish
months: [
"Enero", "Febrero", "Marzo", "Abril", "Mayo", "Junio", "Julio", "Agosto", "Septiembre", "Octubre", "Noviembre", "Diciembre"
],
dayOfWeek: [
"Dom", "Lun", "Mar", "Mié", "Jue", "Vie", "Sáb"
]
},
th: { // Thai
months: [
'มกราคม', 'กุมภาพันธ์', 'มีนาคม', 'เมษายน', 'พฤษภาคม', 'มิถุนายน', 'กรกฎาคม', 'สิงหาคม', 'กันยายน', 'ตุลาคม', 'พฤศจิกายน', 'ธันวาคม'
],
dayOfWeek: [
'อา.', 'จ.', 'อ.', 'พ.', 'พฤ.', 'ศ.', 'ส.'
]
},
pl: { // Polish
months: [
"styczeń", "luty", "marzec", "kwiecień", "maj", "czerwiec", "lipiec", "sierpień", "wrzesień", "październik", "listopad", "grudzień"
],
dayOfWeek: [
"nd", "pn", "wt", "śr", "cz", "pt", "sb"
]
},
pt: { // Portuguese
months: [
"Janeiro", "Fevereiro", "Março", "Abril", "Maio", "Junho", "Julho", "Agosto", "Setembro", "Outubro", "Novembro", "Dezembro"
],
dayOfWeek: [
"Dom", "Seg", "Ter", "Qua", "Qui", "Sex", "Sab"
]
},
ch: { // Simplified Chinese
months: [
"一月", "二月", "三月", "四月", "五月", "六月", "七月", "八月", "九月", "十月", "十一月", "十二月"
],
dayOfWeek: [
"日", "一", "二", "三", "四", "五", "六"
]
},
se: { // Swedish
months: [
"Januari", "Februari", "Mars", "April", "Maj", "Juni", "Juli", "Augusti", "September", "Oktober", "November", "December"
],
dayOfWeek: [
"Sön", "Mån", "Tis", "Ons", "Tor", "Fre", "Lör"
]
},
kr: { // Korean
months: [
"1월", "2월", "3월", "4월", "5월", "6월", "7월", "8월", "9월", "10월", "11월", "12월"
],
dayOfWeek: [
"일", "월", "화", "수", "목", "금", "토"
]
},
it: { // Italian
months: [
"Gennaio", "Febbraio", "Marzo", "Aprile", "Maggio", "Giugno", "Luglio", "Agosto", "Settembre", "Ottobre", "Novembre", "Dicembre"
],
dayOfWeek: [
"Dom", "Lun", "Mar", "Mer", "Gio", "Ven", "Sab"
]
},
da: { // Dansk
months: [
"January", "Februar", "Marts", "April", "Maj", "Juni", "July", "August", "September", "Oktober", "November", "December"
],
dayOfWeek: [
"Søn", "Man", "Tir", "Ons", "Tor", "Fre", "Lør"
]
},
no: { // Norwegian
months: [
"Januar", "Februar", "Mars", "April", "Mai", "Juni", "Juli", "August", "September", "Oktober", "November", "Desember"
],
dayOfWeek: [
"Søn", "Man", "Tir", "Ons", "Tor", "Fre", "Lør"
]
},
ja: { // Japanese
months: [
"1月", "2月", "3月", "4月", "5月", "6月", "7月", "8月", "9月", "10月", "11月", "12月"
],
dayOfWeek: [
"日", "月", "火", "水", "木", "金", "土"
]
},
vi: { // Vietnamese
months: [
"Tháng 1", "Tháng 2", "Tháng 3", "Tháng 4", "Tháng 5", "Tháng 6", "Tháng 7", "Tháng 8", "Tháng 9", "Tháng 10", "Tháng 11", "Tháng 12"
],
dayOfWeek: [
"CN", "T2", "T3", "T4", "T5", "T6", "T7"
]
},
sl: { // Slovenščina
months: [
"Januar", "Februar", "Marec", "April", "Maj", "Junij", "Julij", "Avgust", "September", "Oktober", "November", "December"
],
dayOfWeek: [
"Ned", "Pon", "Tor", "Sre", "Čet", "Pet", "Sob"
]
},
cs: { // Čeština
months: [
"Leden", "Únor", "Březen", "Duben", "Květen", "Červen", "Červenec", "Srpen", "Září", "Říjen", "Listopad", "Prosinec"
],
dayOfWeek: [
"Ne", "Po", "Út", "St", "Čt", "Pá", "So"
]
},
hu: { // Hungarian
months: [
"Január", "Február", "Március", "Április", "Május", "Június", "Július", "Augusztus", "Szeptember", "Október", "November", "December"
],
dayOfWeek: [
"Va", "Hé", "Ke", "Sze", "Cs", "Pé", "Szo"
]
},
az: { //Azerbaijanian (Azeri)
months: [
"Yanvar", "Fevral", "Mart", "Aprel", "May", "Iyun", "Iyul", "Avqust", "Sentyabr", "Oktyabr", "Noyabr", "Dekabr"
],
dayOfWeek: [
"B", "Be", "Ça", "Ç", "Ca", "C", "Ş"
]
},
bs: { //Bosanski
months: [
"Januar", "Februar", "Mart", "April", "Maj", "Jun", "Jul", "Avgust", "Septembar", "Oktobar", "Novembar", "Decembar"
],
dayOfWeek: [
"Ned", "Pon", "Uto", "Sri", "Čet", "Pet", "Sub"
]
},
ca: { //Català
months: [
"Gener", "Febrer", "Març", "Abril", "Maig", "Juny", "Juliol", "Agost", "Setembre", "Octubre", "Novembre", "Desembre"
],
dayOfWeek: [
"Dg", "Dl", "Dt", "Dc", "Dj", "Dv", "Ds"
]
},
'en-GB': { //English (British)
months: [
"January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"
],
dayOfWeek: [
"Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"
]
},
et: { //"Eesti"
months: [
"Jaanuar", "Veebruar", "Märts", "Aprill", "Mai", "Juuni", "Juuli", "August", "September", "Oktoober", "November", "Detsember"
],
dayOfWeek: [
"P", "E", "T", "K", "N", "R", "L"
]
},
eu: { //Euskara
months: [
"Urtarrila", "Otsaila", "Martxoa", "Apirila", "Maiatza", "Ekaina", "Uztaila", "Abuztua", "Iraila", "Urria", "Azaroa", "Abendua"
],
dayOfWeek: [
"Ig.", "Al.", "Ar.", "Az.", "Og.", "Or.", "La."
]
},
fi: { //Finnish (Suomi)
months: [
"Tammikuu", "Helmikuu", "Maaliskuu", "Huhtikuu", "Toukokuu", "Kesäkuu", "Heinäkuu", "Elokuu", "Syyskuu", "Lokakuu", "Marraskuu", "Joulukuu"
],
dayOfWeek: [
"Su", "Ma", "Ti", "Ke", "To", "Pe", "La"
]
},
gl: { //Galego
months: [
"Xan", "Feb", "Maz", "Abr", "Mai", "Xun", "Xul", "Ago", "Set", "Out", "Nov", "Dec"
],
dayOfWeek: [
"Dom", "Lun", "Mar", "Mer", "Xov", "Ven", "Sab"
]
},
hr: { //Hrvatski
months: [
"Siječanj", "Veljača", "Ožujak", "Travanj", "Svibanj", "Lipanj", "Srpanj", "Kolovoz", "Rujan", "Listopad", "Studeni", "Prosinac"
],
dayOfWeek: [
"Ned", "Pon", "Uto", "Sri", "Čet", "Pet", "Sub"
]
},
ko: { //Korean (한국어)
months: [
"1월", "2월", "3월", "4월", "5월", "6월", "7월", "8월", "9월", "10월", "11월", "12월"
],
dayOfWeek: [
"일", "월", "화", "수", "목", "금", "토"
]
},
lt: { //Lithuanian (lietuvių)
months: [
"Sausio", "Vasario", "Kovo", "Balandžio", "Gegužės", "Birželio", "Liepos", "Rugpjūčio", "Rugsėjo", "Spalio", "Lapkričio", "Gruodžio"
],
dayOfWeek: [
"Sek", "Pir", "Ant", "Tre", "Ket", "Pen", "Šeš"
]
},
lv: { //Latvian (Latviešu)
months: [
"Janvāris", "Februāris", "Marts", "Aprīlis ", "Maijs", "Jūnijs", "Jūlijs", "Augusts", "Septembris", "Oktobris", "Novembris", "Decembris"
],
dayOfWeek: [
"Sv", "Pr", "Ot", "Tr", "Ct", "Pk", "St"
]
},
mk: { //Macedonian (Македонски)
months: [
"јануари", "февруари", "март", "април", "мај", "јуни", "јули", "август", "септември", "октомври", "ноември", "декември"
],
dayOfWeek: [
"нед", "пон", "вто", "сре", "чет", "пет", "саб"
]
},
mn: { //Mongolian (Монгол)
months: [
"1-р сар", "2-р сар", "3-р сар", "4-р сар", "5-р сар", "6-р сар", "7-р сар", "8-р сар", "9-р сар", "10-р сар", "11-р сар", "12-р сар"
],
dayOfWeek: [
"Дав", "Мяг", "Лха", "Пүр", "Бсн", "Бям", "Ням"
]
},
'pt-BR': { //Português(Brasil)
months: [
"Janeiro", "Fevereiro", "Março", "Abril", "Maio", "Junho", "Julho", "Agosto", "Setembro", "Outubro", "Novembro", "Dezembro"
],
dayOfWeek: [
"Dom", "Seg", "Ter", "Qua", "Qui", "Sex", "Sáb"
]
},
sk: { //Slovenčina
months: [
"Január", "Február", "Marec", "Apríl", "Máj", "Jún", "Júl", "August", "September", "Október", "November", "December"
],
dayOfWeek: [
"Ne", "Po", "Ut", "St", "Št", "Pi", "So"
]
},
sq: { //Albanian (Shqip)
months: [
"January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"
],
dayOfWeek: [
"Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"
]
},
'sr-YU': { //Serbian (Srpski)
months: [
"Januar", "Februar", "Mart", "April", "Maj", "Jun", "Jul", "Avgust", "Septembar", "Oktobar", "Novembar", "Decembar"
],
dayOfWeek: [
"Ned", "Pon", "Uto", "Sre", "čet", "Pet", "Sub"
]
},
sr: { //Serbian Cyrillic (Српски)
months: [
"јануар", "фебруар", "март", "април", "мај", "јун", "јул", "август", "септембар", "октобар", "новембар", "децембар"
],
dayOfWeek: [
"нед", "пон", "уто", "сре", "чет", "пет", "суб"
]
},
sv: { //Svenska
months: [
"Januari", "Februari", "Mars", "April", "Maj", "Juni", "Juli", "Augusti", "September", "Oktober", "November", "December"
],
dayOfWeek: [
"Sön", "Mån", "Tis", "Ons", "Tor", "Fre", "Lör"
]
},
'zh-TW': { //Traditional Chinese (繁體中文)
months: [
"一月", "二月", "三月", "四月", "五月", "六月", "七月", "八月", "九月", "十月", "十一月", "十二月"
],
dayOfWeek: [
"日", "一", "二", "三", "四", "五", "六"
]
},
zh: { //Simplified Chinese (简体中文)
months: [
"一月", "二月", "三月", "四月", "五月", "六月", "七月", "八月", "九月", "十月", "十一月", "十二月"
],
dayOfWeek: [
"日", "一", "二", "三", "四", "五", "六"
]
},
he: { //Hebrew (עברית)
months: [
'ינואר', 'פברואר', 'מרץ', 'אפריל', 'מאי', 'יוני', 'יולי', 'אוגוסט', 'ספטמבר', 'אוקטובר', 'נובמבר', 'דצמבר'
],
dayOfWeek: [
'א\'', 'ב\'', 'ג\'', 'ד\'', 'ה\'', 'ו\'', 'שבת'
]
},
hy: { // Armenian
months: [
"Հունվար", "Փետրվար", "Մարտ", "Ապրիլ", "Մայիս", "Հունիս", "Հուլիս", "Օգոստոս", "Սեպտեմբեր", "Հոկտեմբեր", "Նոյեմբեր", "Դեկտեմբեր"
],
dayOfWeek: [
"Կի", "Երկ", "Երք", "Չոր", "Հնգ", "Ուրբ", "Շբթ"
]
}
},
value: '',
lang: 'en',
format: 'Y/m/d H:i',
formatTime: 'H:i',
formatDate: 'Y/m/d',
startDate: false, // new Date(), '1986/12/08', '-1970/01/05','-1970/01/05',
step: 60,
monthChangeSpinner: true,
closeOnDateSelect: false,
closeOnTimeSelect: false,
closeOnWithoutClick: true,
closeOnInputClick: true,
timepicker: true,
datepicker: true,
weeks: false,
defaultTime: false, // use formatTime format (ex. '10:00' for formatTime: 'H:i')
defaultDate: false, // use formatDate format (ex new Date() or '1986/12/08' or '-1970/01/05' or '-1970/01/05')
minDate: false,
maxDate: false,
minTime: false,
maxTime: false,
allowTimes: [],
opened: false,
initTime: true,
inline: false,
theme: '',
onSelectDate: function () {},
onSelectTime: function () {},
onChangeMonth: function () {},
onChangeYear: function () {},
onChangeDateTime: function () {},
onShow: function () {},
onClose: function () {},
onGenerate: function () {},
withoutCopyright: true,
inverseButton: false,
hours12: false,
next: 'xdsoft_next',
prev : 'xdsoft_prev',
dayOfWeekStart: 0,
parentID: 'body',
timeHeightInTimePicker: 25,
timepickerScrollbar: true,
todayButton: true,
prevButton: true,
nextButton: true,
defaultSelect: true,
scrollMonth: true,
scrollTime: true,
scrollInput: true,
lazyInit: false,
mask: false,
validateOnBlur: true,
allowBlank: true,
yearStart: 1950,
yearEnd: 2050,
monthStart: 0,
monthEnd: 11,
style: '',
id: '',
fixed: false,
roundTime: 'round', // ceil, floor
className: '',
weekends: [],
disabledDates : [],
yearOffset: 0,
beforeShowDay: null,
enterLikeTab: true,
showApplyButton: false
};
// fix for ie8
if (!Array.prototype.indexOf) {
Array.prototype.indexOf = function (obj, start) {
var i, j;
for (i = (start || 0), j = this.length; i < j; i += 1) {
if (this[i] === obj) { return i; }
}
return -1;
};
}
Date.prototype.countDaysInMonth = function () {
return new Date(this.getFullYear(), this.getMonth() + 1, 0).getDate();
};
$.fn.xdsoftScroller = function (percent) {
return this.each(function () {
var timeboxparent = $(this),
pointerEventToXY = function (e) {
var out = {x: 0, y: 0},
touch;
if (e.type === 'touchstart' || e.type === 'touchmove' || e.type === 'touchend' || e.type === 'touchcancel') {
touch = e.originalEvent.touches[0] || e.originalEvent.changedTouches[0];
out.x = touch.clientX;
out.y = touch.clientY;
} else if (e.type === 'mousedown' || e.type === 'mouseup' || e.type === 'mousemove' || e.type === 'mouseover' || e.type === 'mouseout' || e.type === 'mouseenter' || e.type === 'mouseleave') {
out.x = e.clientX;
out.y = e.clientY;
}
return out;
},
move = 0,
timebox,
parentHeight,
height,
scrollbar,
scroller,
maximumOffset = 100,
start = false,
startY = 0,
startTop = 0,
h1 = 0,
touchStart = false,
startTopScroll = 0,
calcOffset = function () {};
if (percent === 'hide') {
timeboxparent.find('.xdsoft_scrollbar').hide();
return;
}
if (!$(this).hasClass('xdsoft_scroller_box')) {
timebox = timeboxparent.children().eq(0);
parentHeight = timeboxparent[0].clientHeight;
height = timebox[0].offsetHeight;
scrollbar = $('<div class="xdsoft_scrollbar"></div>');
scroller = $('<div class="xdsoft_scroller"></div>');
scrollbar.append(scroller);
timeboxparent.addClass('xdsoft_scroller_box').append(scrollbar);
calcOffset = function calcOffset(event) {
var offset = pointerEventToXY(event).y - startY + startTopScroll;
if (offset < 0) {
offset = 0;
}
if (offset + scroller[0].offsetHeight > h1) {
offset = h1 - scroller[0].offsetHeight;
}
timeboxparent.trigger('scroll_element.xdsoft_scroller', [maximumOffset ? offset / maximumOffset : 0]);
};
scroller
.on('touchstart.xdsoft_scroller mousedown.xdsoft_scroller', function (event) {
if (!parentHeight) {
timeboxparent.trigger('resize_scroll.xdsoft_scroller', [percent]);
}
startY = pointerEventToXY(event).y;
startTopScroll = parseInt(scroller.css('margin-top'), 10);
h1 = scrollbar[0].offsetHeight;
if (event.type === 'mousedown') {
if (document) {
$(document.body).addClass('xdsoft_noselect');
}
$([document.body, window]).on('mouseup.xdsoft_scroller', function arguments_callee() {
$([document.body, window]).off('mouseup.xdsoft_scroller', arguments_callee)
.off('mousemove.xdsoft_scroller', calcOffset)
.removeClass('xdsoft_noselect');
});
$(document.body).on('mousemove.xdsoft_scroller', calcOffset);
} else {
touchStart = true;
event.stopPropagation();
event.preventDefault();
}
})
.on('touchmove', function (event) {
if (touchStart) {
event.preventDefault();
calcOffset(event);
}
})
.on('touchend touchcancel', function (event) {
touchStart = false;
startTopScroll = 0;
});
timeboxparent
.on('scroll_element.xdsoft_scroller', function (event, percentage) {
if (!parentHeight) {
timeboxparent.trigger('resize_scroll.xdsoft_scroller', [percentage, true]);
}
percentage = percentage > 1 ? 1 : (percentage < 0 || isNaN(percentage)) ? 0 : percentage;
scroller.css('margin-top', maximumOffset * percentage);
setTimeout(function () {
timebox.css('marginTop', -parseInt((timebox[0].offsetHeight - parentHeight) * percentage, 10));
}, 10);
})
.on('resize_scroll.xdsoft_scroller', function (event, percentage, noTriggerScroll) {
var percent, sh;
parentHeight = timeboxparent[0].clientHeight;
height = timebox[0].offsetHeight;
percent = parentHeight / height;
sh = percent * scrollbar[0].offsetHeight;
if (percent > 1) {
scroller.hide();
} else {
scroller.show();
scroller.css('height', parseInt(sh > 10 ? sh : 10, 10));
maximumOffset = scrollbar[0].offsetHeight - scroller[0].offsetHeight;
if (noTriggerScroll !== true) {
timeboxparent.trigger('scroll_element.xdsoft_scroller', [percentage || Math.abs(parseInt(timebox.css('marginTop'), 10)) / (height - parentHeight)]);
}
}
});
timeboxparent.on('mousewheel', function (event) {
var top = Math.abs(parseInt(timebox.css('marginTop'), 10));
top = top - (event.deltaY * 20);
if (top < 0) {
top = 0;
}
timeboxparent.trigger('scroll_element.xdsoft_scroller', [top / (height - parentHeight)]);
event.stopPropagation();
return false;
});
timeboxparent.on('touchstart', function (event) {
start = pointerEventToXY(event);
startTop = Math.abs(parseInt(timebox.css('marginTop'), 10));
});
timeboxparent.on('touchmove', function (event) {
if (start) {
event.preventDefault();
var coord = pointerEventToXY(event);
timeboxparent.trigger('scroll_element.xdsoft_scroller', [(startTop - (coord.y - start.y)) / (height - parentHeight)]);
}
});
timeboxparent.on('touchend touchcancel', function (event) {
start = false;
startTop = 0;
});
}
timeboxparent.trigger('resize_scroll.xdsoft_scroller', [percent]);
});
};
$.fn.datetimepicker = function (opt) {
var KEY0 = 48,
KEY9 = 57,
_KEY0 = 96,
_KEY9 = 105,
CTRLKEY = 17,
DEL = 46,
ENTER = 13,
ESC = 27,
BACKSPACE = 8,
ARROWLEFT = 37,
ARROWUP = 38,
ARROWRIGHT = 39,
ARROWDOWN = 40,
TAB = 9,
F5 = 116,
AKEY = 65,
CKEY = 67,
VKEY = 86,
ZKEY = 90,
YKEY = 89,
ctrlDown = false,
options = ($.isPlainObject(opt) || !opt) ? $.extend(true, {}, default_options, opt) : $.extend(true, {}, default_options),
lazyInitTimer = 0,
createDateTimePicker,
destroyDateTimePicker,
lazyInit = function (input) {
input
.on('open.xdsoft focusin.xdsoft mousedown.xdsoft', function initOnActionCallback(event) {
if (input.is(':disabled') || input.data('xdsoft_datetimepicker')) {
return;
}
clearTimeout(lazyInitTimer);
lazyInitTimer = setTimeout(function () {
if (!input.data('xdsoft_datetimepicker')) {
createDateTimePicker(input);
}
input
.off('open.xdsoft focusin.xdsoft mousedown.xdsoft', initOnActionCallback)
.trigger('open.xdsoft');
}, 100);
});
};
createDateTimePicker = function (input) {
var datetimepicker = $('<div ' + (options.id ? 'id="' + options.id + '"' : '') + ' ' + (options.style ? 'style="' + options.style + '"' : '') + ' class="xdsoft_datetimepicker xdsoft_' + options.theme + ' xdsoft_noselect ' + (options.weeks ? ' xdsoft_showweeks' : '') + options.className + '"></div>'),
xdsoft_copyright = $('<div class="xdsoft_copyright"><a target="_blank" href="http://xdsoft.net/jqplugins/datetimepicker/">xdsoft.net</a></div>'),
datepicker = $('<div class="xdsoft_datepicker active"></div>'),
mounth_picker = $('<div class="xdsoft_mounthpicker"><button type="button" class="xdsoft_prev"></button><button type="button" class="xdsoft_today_button"></button>' +
'<div class="xdsoft_label xdsoft_month"><span></span><i></i></div>' +
'<div class="xdsoft_label xdsoft_year"><span></span><i></i></div>' +
'<button type="button" class="xdsoft_next"></button></div>'),
calendar = $('<div class="xdsoft_calendar"></div>'),
timepicker = $('<div class="xdsoft_timepicker active"><button type="button" class="xdsoft_prev"></button><div class="xdsoft_time_box"></div><button type="button" class="xdsoft_next"></button></div>'),
timeboxparent = timepicker.find('.xdsoft_time_box').eq(0),
timebox = $('<div class="xdsoft_time_variant"></div>'),
applyButton = $('<button class="xdsoft_save_selected blue-gradient-button">Save Selected</button>'),
/*scrollbar = $('<div class="xdsoft_scrollbar"></div>'),
scroller = $('<div class="xdsoft_scroller"></div>'),*/
monthselect = $('<div class="xdsoft_select xdsoft_monthselect"><div></div></div>'),
yearselect = $('<div class="xdsoft_select xdsoft_yearselect"><div></div></div>'),
triggerAfterOpen = false,
XDSoft_datetime,
//scroll_element,
xchangeTimer,
timerclick,
current_time_index,
setPos,
timer = 0,
timer1 = 0,
_xdsoft_datetime;
mounth_picker
.find('.xdsoft_month span')
.after(monthselect);
mounth_picker
.find('.xdsoft_year span')
.after(yearselect);
mounth_picker
.find('.xdsoft_month,.xdsoft_year')
.on('mousedown.xdsoft', function (event) {
var select = $(this).find('.xdsoft_select').eq(0),
val = 0,
top = 0,
visible = select.is(':visible'),
items,
i;
mounth_picker
.find('.xdsoft_select')
.hide();
if (_xdsoft_datetime.currentTime) {
val = _xdsoft_datetime.currentTime[$(this).hasClass('xdsoft_month') ? 'getMonth' : 'getFullYear']();
}
select[visible ? 'hide' : 'show']();
for (items = select.find('div.xdsoft_option'), i = 0; i < items.length; i += 1) {
if (items.eq(i).data('value') === val) {
break;
} else {
top += items[0].offsetHeight;
}
}
select.xdsoftScroller(top / (select.children()[0].offsetHeight - (select[0].clientHeight)));
event.stopPropagation();
return false;
});
mounth_picker
.find('.xdsoft_select')
.xdsoftScroller()
.on('mousedown.xdsoft', function (event) {
event.stopPropagation();
event.preventDefault();
})
.on('mousedown.xdsoft', '.xdsoft_option', function (event) {
if (_xdsoft_datetime.currentTime === undefined || _xdsoft_datetime.currentTime === null) {
_xdsoft_datetime.currentTime = _xdsoft_datetime.now();
}
var year = _xdsoft_datetime.currentTime.getFullYear();
if (_xdsoft_datetime && _xdsoft_datetime.currentTime) {
_xdsoft_datetime.currentTime[$(this).parent().parent().hasClass('xdsoft_monthselect') ? 'setMonth' : 'setFullYear']($(this).data('value'));
}
$(this).parent().parent().hide();
datetimepicker.trigger('xchange.xdsoft');
if (options.onChangeMonth && $.isFunction(options.onChangeMonth)) {
options.onChangeMonth.call(datetimepicker, _xdsoft_datetime.currentTime, datetimepicker.data('input'));
}
if (year !== _xdsoft_datetime.currentTime.getFullYear() && $.isFunction(options.onChangeYear)) {
options.onChangeYear.call(datetimepicker, _xdsoft_datetime.currentTime, datetimepicker.data('input'));
}
});
datetimepicker.setOptions = function (_options) {
options = $.extend(true, {}, options, _options);
if (_options.allowTimes && $.isArray(_options.allowTimes) && _options.allowTimes.length) {
options.allowTimes = $.extend(true, [], _options.allowTimes);
}
if (_options.weekends && $.isArray(_options.weekends) && _options.weekends.length) {
options.weekends = $.extend(true, [], _options.weekends);
}
if (_options.disabledDates && $.isArray(_options.disabledDates) && _options.disabledDates.length) {
options.disabledDates = $.extend(true, [], _options.disabledDates);
}
if ((options.open || options.opened) && (!options.inline)) {
input.trigger('open.xdsoft');
}
if (options.inline) {
triggerAfterOpen = true;
datetimepicker.addClass('xdsoft_inline');
input.after(datetimepicker).hide();
}
if (options.inverseButton) {
options.next = 'xdsoft_prev';
options.prev = 'xdsoft_next';
}
if (options.datepicker) {
datepicker.addClass('active');
} else {
datepicker.removeClass('active');
}
if (options.timepicker) {
timepicker.addClass('active');
} else {
timepicker.removeClass('active');
}
if (options.value) {
if (input && input.val) {
input.val(options.value);
}
_xdsoft_datetime.setCurrentTime(options.value);
}
if (isNaN(options.dayOfWeekStart)) {
options.dayOfWeekStart = 0;
} else {
options.dayOfWeekStart = parseInt(options.dayOfWeekStart, 10) % 7;
}
if (!options.timepickerScrollbar) {
timeboxparent.xdsoftScroller('hide');
}
if (options.minDate && /^-(.*)$/.test(options.minDate)) {
options.minDate = _xdsoft_datetime.strToDateTime(options.minDate).dateFormat(options.formatDate);
}
if (options.maxDate && /^\+(.*)$/.test(options.maxDate)) {
options.maxDate = _xdsoft_datetime.strToDateTime(options.maxDate).dateFormat(options.formatDate);
}
applyButton.toggle(options.showApplyButton);
mounth_picker
.find('.xdsoft_today_button')
.css('visibility', !options.todayButton ? 'hidden' : 'visible');
mounth_picker
.find('.' + options.prev)
.css('visibility', !options.prevButton ? 'hidden' : 'visible');
mounth_picker
.find('.' + options.next)
.css('visibility', !options.nextButton ? 'hidden' : 'visible');
if (options.mask) {
var e,
getCaretPos = function (input) {
try {
if (document.selection && document.selection.createRange) {
var range = document.selection.createRange();
return range.getBookmark().charCodeAt(2) - 2;
}
if (input.setSelectionRange) {
return input.selectionStart;
}
} catch (e) {
return 0;
}
},
setCaretPos = function (node, pos) {
node = (typeof node === "string" || node instanceof String) ? document.getElementById(node) : node;
if (!node) {
return false;
}
if (node.createTextRange) {
var textRange = node.createTextRange();
textRange.collapse(true);
textRange.moveEnd('character', pos);
textRange.moveStart('character', pos);
textRange.select();
return true;
}
if (node.setSelectionRange) {
node.setSelectionRange(pos, pos);
return true;
}
return false;
},
isValidValue = function (mask, value) {
var reg = mask
.replace(/([\[\]\/\{\}\(\)\-\.\+]{1})/g, '\\$1')
.replace(/_/g, '{digit+}')
.replace(/([0-9]{1})/g, '{digit$1}')
.replace(/\{digit([0-9]{1})\}/g, '[0-$1_]{1}')
.replace(/\{digit[\+]\}/g, '[0-9_]{1}');
return (new RegExp(reg)).test(value);
};
input.off('keydown.xdsoft');
if (options.mask === true) {
options.mask = options.format
.replace(/Y/g, '9999')
.replace(/F/g, '9999')
.replace(/m/g, '19')
.replace(/d/g, '39')
.replace(/H/g, '29')
.replace(/i/g, '59')
.replace(/s/g, '59');
}
if ($.type(options.mask) === 'string') {
if (!isValidValue(options.mask, input.val())) {
input.val(options.mask.replace(/[0-9]/g, '_'));
}
input.on('keydown.xdsoft', function (event) {
var val = this.value,
key = event.which,
pos,
digit;
if (((key >= KEY0 && key <= KEY9) || (key >= _KEY0 && key <= _KEY9)) || (key === BACKSPACE || key === DEL)) {
pos = getCaretPos(this);
digit = (key !== BACKSPACE && key !== DEL) ? String.fromCharCode((_KEY0 <= key && key <= _KEY9) ? key - KEY0 : key) : '_';
if ((key === BACKSPACE || key === DEL) && pos) {
pos -= 1;
digit = '_';
}
while (/[^0-9_]/.test(options.mask.substr(pos, 1)) && pos < options.mask.length && pos > 0) {
pos += (key === BACKSPACE || key === DEL) ? -1 : 1;
}
val = val.substr(0, pos) + digit + val.substr(pos + 1);
if ($.trim(val) === '') {
val = options.mask.replace(/[0-9]/g, '_');
} else {
if (pos === options.mask.length) {
event.preventDefault();
return false;
}
}
pos += (key === BACKSPACE || key === DEL) ? 0 : 1;
while (/[^0-9_]/.test(options.mask.substr(pos, 1)) && pos < options.mask.length && pos > 0) {
pos += (key === BACKSPACE || key === DEL) ? -1 : 1;
}
if (isValidValue(options.mask, val)) {
this.value = val;
setCaretPos(this, pos);
} else if ($.trim(val) === '') {
this.value = options.mask.replace(/[0-9]/g, '_');
} else {
input.trigger('error_input.xdsoft');
}
} else {
if (([AKEY, CKEY, VKEY, ZKEY, YKEY].indexOf(key) !== -1 && ctrlDown) || [ESC, ARROWUP, ARROWDOWN, ARROWLEFT, ARROWRIGHT, F5, CTRLKEY, TAB, ENTER].indexOf(key) !== -1) {
return true;
}
}
event.preventDefault();
return false;
});
}
}
if (options.validateOnBlur) {
input
.off('blur.xdsoft')
.on('blur.xdsoft', function () {
if (options.allowBlank && !$.trim($(this).val()).length) {
$(this).val(null);
datetimepicker.data('xdsoft_datetime').empty();
} else if (!Date.parseDate($(this).val(), options.format)) {
var splittedHours = +([$(this).val()[0], $(this).val()[1]].join('')),
splittedMinutes = +([$(this).val()[2], $(this).val()[3]].join(''));
// parse the numbers as 0312 => 03:12
if(!options.datepicker && options.timepicker && splittedHours >= 0 && splittedHours < 24 && splittedMinutes >= 0 && splittedMinutes < 60) {
$(this).val([splittedHours, splittedMinutes].map(function(item) {
return item > 9 ? item : '0' + item
}).join(':'));
} else {
$(this).val((_xdsoft_datetime.now()).dateFormat(options.format));
}
datetimepicker.data('xdsoft_datetime').setCurrentTime($(this).val());
} else {
datetimepicker.data('xdsoft_datetime').setCurrentTime($(this).val());
}
datetimepicker.trigger('changedatetime.xdsoft');
});
}
options.dayOfWeekStartPrev = (options.dayOfWeekStart === 0) ? 6 : options.dayOfWeekStart - 1;
datetimepicker
.trigger('xchange.xdsoft')
.trigger('afterOpen.xdsoft');
};
datetimepicker
.data('options', options)
.on('mousedown.xdsoft', function (event) {
event.stopPropagation();
event.preventDefault();
yearselect.hide();
monthselect.hide();
return false;
});
//scroll_element = timepicker.find('.xdsoft_time_box');
timeboxparent.append(timebox);
timeboxparent.xdsoftScroller();
datetimepicker.on('afterOpen.xdsoft', function () {
timeboxparent.xdsoftScroller();
});
datetimepicker
.append(datepicker)
.append(timepicker);
if (options.withoutCopyright !== true) {
datetimepicker
.append(xdsoft_copyright);
}
datepicker
.append(mounth_picker)
.append(calendar)
.append(applyButton);
$(options.parentID)
.append(datetimepicker);
XDSoft_datetime = function () {
var _this = this;
_this.now = function (norecursion) {
var d = new Date(),
date,
time;
if (!norecursion && options.defaultDate) {
date = _this.strToDate(options.defaultDate);
d.setFullYear(date.getFullYear());
d.setMonth(date.getMonth());
d.setDate(date.getDate());
}
if (options.yearOffset) {
d.setFullYear(d.getFullYear() + options.yearOffset);
}
if (!norecursion && options.defaultTime) {
time = _this.strtotime(options.defaultTime);
d.setHours(time.getHours());
d.setMinutes(time.getMinutes());
}
return d;
};
_this.isValidDate = function (d) {
if (Object.prototype.toString.call(d) !== "[object Date]") {
return false;
}
return !isNaN(d.getTime());
};
_this.setCurrentTime = function (dTime) {
_this.currentTime = (typeof dTime === 'string') ? _this.strToDateTime(dTime) : _this.isValidDate(dTime) ? dTime : _this.now();
datetimepicker.trigger('xchange.xdsoft');
};
_this.empty = function () {
_this.currentTime = null;
};
_this.getCurrentTime = function (dTime) {
return _this.currentTime;
};
_this.nextMonth = function () {
if (_this.currentTime === undefined || _this.currentTime === null) {
_this.currentTime = _this.now();
}
var month = _this.currentTime.getMonth() + 1,
year;
if (month === 12) {
_this.currentTime.setFullYear(_this.currentTime.getFullYear() + 1);
month = 0;
}
year = _this.currentTime.getFullYear();
_this.currentTime.setDate(
Math.min(
new Date(_this.currentTime.getFullYear(), month + 1, 0).getDate(),
_this.currentTime.getDate()
)
);
_this.currentTime.setMonth(month);
if (options.onChangeMonth && $.isFunction(options.onChangeMonth)) {
options.onChangeMonth.call(datetimepicker, _xdsoft_datetime.currentTime, datetimepicker.data('input'));
}
if (year !== _this.currentTime.getFullYear() && $.isFunction(options.onChangeYear)) {
options.onChangeYear.call(datetimepicker, _xdsoft_datetime.currentTime, datetimepicker.data('input'));
}
datetimepicker.trigger('xchange.xdsoft');
return month;
};
_this.prevMonth = function () {
if (_this.currentTime === undefined || _this.currentTime === null) {
_this.currentTime = _this.now();
}
var month = _this.currentTime.getMonth() - 1;
if (month === -1) {
_this.currentTime.setFullYear(_this.currentTime.getFullYear() - 1);
month = 11;
}
_this.currentTime.setDate(
Math.min(
new Date(_this.currentTime.getFullYear(), month + 1, 0).getDate(),
_this.currentTime.getDate()
)
);
_this.currentTime.setMonth(month);
if (options.onChangeMonth && $.isFunction(options.onChangeMonth)) {
options.onChangeMonth.call(datetimepicker, _xdsoft_datetime.currentTime, datetimepicker.data('input'));
}
datetimepicker.trigger('xchange.xdsoft');
return month;
};
_this.getWeekOfYear = function (datetime) {
var onejan = new Date(datetime.getFullYear(), 0, 1);
return Math.ceil((((datetime - onejan) / 86400000) + onejan.getDay() + 1) / 7);
};
_this.strToDateTime = function (sDateTime) {
var tmpDate = [], timeOffset, currentTime;
if (sDateTime && sDateTime instanceof Date && _this.isValidDate(sDateTime)) {
return sDateTime;
}
tmpDate = /^(\+|\-)(.*)$/.exec(sDateTime);
if (tmpDate) {
tmpDate[2] = Date.parseDate(tmpDate[2], options.formatDate);
}
if (tmpDate && tmpDate[2]) {
timeOffset = tmpDate[2].getTime() - (tmpDate[2].getTimezoneOffset()) * 60000;
currentTime = new Date((_xdsoft_datetime.now()).getTime() + parseInt(tmpDate[1] + '1', 10) * timeOffset);
} else {
currentTime = sDateTime ? Date.parseDate(sDateTime, options.format) : _this.now();
}
if (!_this.isValidDate(currentTime)) {
currentTime = _this.now();
}
return currentTime;
};
_this.strToDate = function (sDate) {
if (sDate && sDate instanceof Date && _this.isValidDate(sDate)) {
return sDate;
}
var currentTime = sDate ? Date.parseDate(sDate, options.formatDate) : _this.now(true);
if (!_this.isValidDate(currentTime)) {
currentTime = _this.now(true);
}
return currentTime;
};
_this.strtotime = function (sTime) {
if (sTime && sTime instanceof Date && _this.isValidDate(sTime)) {
return sTime;
}
var currentTime = sTime ? Date.parseDate(sTime, options.formatTime) : _this.now(true);
if (!_this.isValidDate(currentTime)) {
currentTime = _this.now(true);
}
return currentTime;
};
_this.str = function () {
return _this.currentTime.dateFormat(options.format);
};
_this.currentTime = this.now();
};
_xdsoft_datetime = new XDSoft_datetime();
applyButton.on('click', function (e) {//pathbrite
e.preventDefault();
datetimepicker.data('changed',true);
_xdsoft_datetime.setCurrentTime(getCurrentValue());
input.val(_xdsoft_datetime.str());
datetimepicker.trigger('close.xdsoft');
});
mounth_picker
.find('.xdsoft_today_button')
.on('mousedown.xdsoft', function () {
datetimepicker.data('changed', true);
_xdsoft_datetime.setCurrentTime(0);
datetimepicker.trigger('afterOpen.xdsoft');
}).on('dblclick.xdsoft', function () {
input.val(_xdsoft_datetime.str());
datetimepicker.trigger('close.xdsoft');
});
mounth_picker
.find('.xdsoft_prev,.xdsoft_next')
.on('mousedown.xdsoft', function () {
var $this = $(this),
timer = 0,
stop = false;
(function arguments_callee1(v) {
if ($this.hasClass(options.next)) {
_xdsoft_datetime.nextMonth();
} else if ($this.hasClass(options.prev)) {
_xdsoft_datetime.prevMonth();
}
if (options.monthChangeSpinner) {
if (!stop) {
timer = setTimeout(arguments_callee1, v || 100);
}
}
}(500));
$([document.body, window]).on('mouseup.xdsoft', function arguments_callee2() {
clearTimeout(timer);
stop = true;
$([document.body, window]).off('mouseup.xdsoft', arguments_callee2);
});
});
timepicker
.find('.xdsoft_prev,.xdsoft_next')
.on('mousedown.xdsoft', function () {
var $this = $(this),
timer = 0,
stop = false,
period = 110;
(function arguments_callee4(v) {
var pheight = timeboxparent[0].clientHeight,
height = timebox[0].offsetHeight,
top = Math.abs(parseInt(timebox.css('marginTop'), 10));
if ($this.hasClass(options.next) && (height - pheight) - options.timeHeightInTimePicker >= top) {
timebox.css('marginTop', '-' + (top + options.timeHeightInTimePicker) + 'px');
} else if ($this.hasClass(options.prev) && top - options.timeHeightInTimePicker >= 0) {
timebox.css('marginTop', '-' + (top - options.timeHeightInTimePicker) + 'px');
}
timeboxparent.trigger('scroll_element.xdsoft_scroller', [Math.abs(parseInt(timebox.css('marginTop'), 10) / (height - pheight))]);
period = (period > 10) ? 10 : period - 10;
if (!stop) {
timer = setTimeout(arguments_callee4, v || period);
}
}(500));
$([document.body, window]).on('mouseup.xdsoft', function arguments_callee5() {
clearTimeout(timer);
stop = true;
$([document.body, window])
.off('mouseup.xdsoft', arguments_callee5);
});
});
xchangeTimer = 0;
// base handler - generating a calendar and timepicker
datetimepicker
.on('xchange.xdsoft', function (event) {
clearTimeout(xchangeTimer);
xchangeTimer = setTimeout(function () {
if (_xdsoft_datetime.currentTime === undefined || _xdsoft_datetime.currentTime === null) {
_xdsoft_datetime.currentTime = _xdsoft_datetime.now();
}
var table = '',
start = new Date(_xdsoft_datetime.currentTime.getFullYear(), _xdsoft_datetime.currentTime.getMonth(), 1, 12, 0, 0),
i = 0,
j,
today = _xdsoft_datetime.now(),
maxDate = false,
minDate = false,
d,
y,
m,
w,
classes = [],
customDateSettings,
newRow = true,
time = '',
h = '',
line_time;
while (start.getDay() !== options.dayOfWeekStart) {
start.setDate(start.getDate() - 1);
}
table += '<table><thead><tr>';
if (options.weeks) {
table += '<th></th>';
}
for (j = 0; j < 7; j += 1) {
table += '<th>' + options.i18n[options.lang].dayOfWeek[(j + options.dayOfWeekStart) % 7] + '</th>';
}
table += '</tr></thead>';
table += '<tbody>';
if (options.maxDate !== false) {
maxDate = _xdsoft_datetime.strToDate(options.maxDate);
maxDate = new Date(maxDate.getFullYear(), maxDate.getMonth(), maxDate.getDate(), 23, 59, 59, 999);
}
if (options.minDate !== false) {
minDate = _xdsoft_datetime.strToDate(options.minDate);
minDate = new Date(minDate.getFullYear(), minDate.getMonth(), minDate.getDate());
}
while (i < _xdsoft_datetime.currentTime.countDaysInMonth() || start.getDay() !== options.dayOfWeekStart || _xdsoft_datetime.currentTime.getMonth() === start.getMonth()) {
classes = [];
i += 1;
d = start.getDate();
y = start.getFullYear();
m = start.getMonth();
w = _xdsoft_datetime.getWeekOfYear(start);
classes.push('xdsoft_date');
if (options.beforeShowDay && $.isFunction(options.beforeShowDay.call)) {
customDateSettings = options.beforeShowDay.call(datetimepicker, start);
} else {
customDateSettings = null;
}
if ((maxDate !== false && start > maxDate) || (minDate !== false && start < minDate) || (customDateSettings && customDateSettings[0] === false)) {
classes.push('xdsoft_disabled');
} else if (options.disabledDates.indexOf(start.dateFormat(options.formatDate)) !== -1) {
classes.push('xdsoft_disabled');
}
if (customDateSettings && customDateSettings[1] !== "") {
classes.push(customDateSettings[1]);
}
if (_xdsoft_datetime.currentTime.getMonth() !== m) {
classes.push('xdsoft_other_month');
}
if ((options.defaultSelect || datetimepicker.data('changed')) && _xdsoft_datetime.currentTime.dateFormat(options.formatDate) === start.dateFormat(options.formatDate)) {
classes.push('xdsoft_current');
}
if (today.dateFormat(options.formatDate) === start.dateFormat(options.formatDate)) {
classes.push('xdsoft_today');
}
if (start.getDay() === 0 || start.getDay() === 6 || ~options.weekends.indexOf(start.dateFormat(options.formatDate))) {
classes.push('xdsoft_weekend');
}
if (options.beforeShowDay && $.isFunction(options.beforeShowDay)) {
classes.push(options.beforeShowDay(start));
}
if (newRow) {
table += '<tr>';
newRow = false;
if (options.weeks) {
table += '<th>' + w + '</th>';
}
}
table += '<td data-date="' + d + '" data-month="' + m + '" data-year="' + y + '"' + ' class="xdsoft_date xdsoft_day_of_week' + start.getDay() + ' ' + classes.join(' ') + '">' +
'<div>' + d + '</div>' +
'</td>';
if (start.getDay() === options.dayOfWeekStartPrev) {
table += '</tr>';
newRow = true;
}
start.setDate(d + 1);
}
table += '</tbody></table>';
calendar.html(table);
mounth_picker.find('.xdsoft_label span').eq(0).text(options.i18n[options.lang].months[_xdsoft_datetime.currentTime.getMonth()]);
mounth_picker.find('.xdsoft_label span').eq(1).text(_xdsoft_datetime.currentTime.getFullYear());
// generate timebox
time = '';
h = '';
m = '';
line_time = function line_time(h, m) {
var now = _xdsoft_datetime.now();
now.setHours(h);
h = parseInt(now.getHours(), 10);
now.setMinutes(m);
m = parseInt(now.getMinutes(), 10);
var optionDateTime = new Date(_xdsoft_datetime.currentTime);
optionDateTime.setHours(h);
optionDateTime.setMinutes(m);
classes = [];
if((options.minDateTime !== false && options.minDateTime > optionDateTime) || (options.maxTime !== false && _xdsoft_datetime.strtotime(options.maxTime).getTime() < now.getTime()) || (options.minTime !== false && _xdsoft_datetime.strtotime(options.minTime).getTime() > now.getTime())) {
classes.push('xdsoft_disabled');
}
var current_time = new Date(_xdsoft_datetime.currentTime);
current_time.setHours(parseInt(_xdsoft_datetime.currentTime.getHours(), 10));
current_time.setMinutes(Math[options.roundTime](_xdsoft_datetime.currentTime.getMinutes() / options.step) * options.step);
if ((options.initTime || options.defaultSelect || datetimepicker.data('changed')) && current_time.getHours() === parseInt(h, 10) && (options.step > 59 || current_time.getMinutes() === parseInt(m, 10))) {
if (options.defaultSelect || datetimepicker.data('changed')) {
classes.push('xdsoft_current');
} else if (options.initTime) {
classes.push('xdsoft_init_time');
}
}
if (parseInt(today.getHours(), 10) === parseInt(h, 10) && parseInt(today.getMinutes(), 10) === parseInt(m, 10)) {
classes.push('xdsoft_today');
}
time += '<div class="xdsoft_time ' + classes.join(' ') + '" data-hour="' + h + '" data-minute="' + m + '">' + now.dateFormat(options.formatTime) + '</div>';
};
if (!options.allowTimes || !$.isArray(options.allowTimes) || !options.allowTimes.length) {
for (i = 0, j = 0; i < (options.hours12 ? 12 : 24); i += 1) {
for (j = 0; j < 60; j += options.step) {
h = (i < 10 ? '0' : '') + i;
m = (j < 10 ? '0' : '') + j;
line_time(h, m);
}
}
} else {
for (i = 0; i < options.allowTimes.length; i += 1) {
h = _xdsoft_datetime.strtotime(options.allowTimes[i]).getHours();
m = _xdsoft_datetime.strtotime(options.allowTimes[i]).getMinutes();
line_time(h, m);
}
}
timebox.html(time);
opt = '';
i = 0;
for (i = parseInt(options.yearStart, 10) + options.yearOffset; i <= parseInt(options.yearEnd, 10) + options.yearOffset; i += 1) {
opt += '<div class="xdsoft_option ' + (_xdsoft_datetime.currentTime.getFullYear() === i ? 'xdsoft_current' : '') + '" data-value="' + i + '">' + i + '</div>';
}
yearselect.children().eq(0)
.html(opt);
for (i = parseInt(options.monthStart), opt = ''; i <= parseInt(options.monthEnd); i += 1) {
opt += '<div class="xdsoft_option ' + (_xdsoft_datetime.currentTime.getMonth() === i ? 'xdsoft_current' : '') + '" data-value="' + i + '">' + options.i18n[options.lang].months[i] + '</div>';
}
monthselect.children().eq(0).html(opt);
$(datetimepicker)
.trigger('generate.xdsoft');
}, 10);
event.stopPropagation();
})
.on('afterOpen.xdsoft', function () {
if (options.timepicker) {
var classType, pheight, height, top;
if (timebox.find('.xdsoft_current').length) {
classType = '.xdsoft_current';
} else if (timebox.find('.xdsoft_init_time').length) {
classType = '.xdsoft_init_time';
}
if (classType) {
pheight = timeboxparent[0].clientHeight;
height = timebox[0].offsetHeight;
top = timebox.find(classType).index() * options.timeHeightInTimePicker + 1;
if ((height - pheight) < top) {
top = height - pheight;
}
timeboxparent.trigger('scroll_element.xdsoft_scroller', [parseInt(top, 10) / (height - pheight)]);
} else {
timeboxparent.trigger('scroll_element.xdsoft_scroller', [0]);
}
}
});
timerclick = 0;
calendar
.on('click.xdsoft', 'td', function (xdevent) {
xdevent.stopPropagation(); // Prevents closing of Pop-ups, Modals and Flyouts in Bootstrap
timerclick += 1;
var $this = $(this),
currentTime = _xdsoft_datetime.currentTime;
if (currentTime === undefined || currentTime === null) {
_xdsoft_datetime.currentTime = _xdsoft_datetime.now();
currentTime = _xdsoft_datetime.currentTime;
}
if ($this.hasClass('xdsoft_disabled')) {
return false;
}
currentTime.setDate(1);
currentTime.setFullYear($this.data('year'));
currentTime.setMonth($this.data('month'));
currentTime.setDate($this.data('date'));
datetimepicker.trigger('select.xdsoft', [currentTime]);
input.val(_xdsoft_datetime.str());
if ((timerclick > 1 || (options.closeOnDateSelect === true || (options.closeOnDateSelect === 0 && !options.timepicker))) && !options.inline) {
datetimepicker.trigger('close.xdsoft');
}
if (options.onSelectDate && $.isFunction(options.onSelectDate)) {
options.onSelectDate.call(datetimepicker, _xdsoft_datetime.currentTime, datetimepicker.data('input'), xdevent);
}
datetimepicker.data('changed', true);
datetimepicker.trigger('xchange.xdsoft');
datetimepicker.trigger('changedatetime.xdsoft');
setTimeout(function () {
timerclick = 0;
}, 200);
});
timebox
.on('click.xdsoft', 'div', function (xdevent) {
xdevent.stopPropagation();
var $this = $(this),
currentTime = _xdsoft_datetime.currentTime;
if (currentTime === undefined || currentTime === null) {
_xdsoft_datetime.currentTime = _xdsoft_datetime.now();
currentTime = _xdsoft_datetime.currentTime;
}
if ($this.hasClass('xdsoft_disabled')) {
return false;
}
currentTime.setHours($this.data('hour'));
currentTime.setMinutes($this.data('minute'));
datetimepicker.trigger('select.xdsoft', [currentTime]);
datetimepicker.data('input').val(_xdsoft_datetime.str());
if (options.inline !== true && options.closeOnTimeSelect === true) {
datetimepicker.trigger('close.xdsoft');
}
if (options.onSelectTime && $.isFunction(options.onSelectTime)) {
options.onSelectTime.call(datetimepicker, _xdsoft_datetime.currentTime, datetimepicker.data('input'), xdevent);
}
datetimepicker.data('changed', true);
datetimepicker.trigger('xchange.xdsoft');
datetimepicker.trigger('changedatetime.xdsoft');
});
datepicker
.on('mousewheel.xdsoft', function (event) {
if (!options.scrollMonth) {
return true;
}
if (event.deltaY < 0) {
_xdsoft_datetime.nextMonth();
} else {
_xdsoft_datetime.prevMonth();
}
return false;
});
input
.on('mousewheel.xdsoft', function (event) {
if (!options.scrollInput) {
return true;
}
if (!options.datepicker && options.timepicker) {
current_time_index = timebox.find('.xdsoft_current').length ? timebox.find('.xdsoft_current').eq(0).index() : 0;
if (current_time_index + event.deltaY >= 0 && current_time_index + event.deltaY < timebox.children().length) {
current_time_index += event.deltaY;
}
if (timebox.children().eq(current_time_index).length) {
timebox.children().eq(current_time_index).trigger('mousedown');
}
return false;
}
if (options.datepicker && !options.timepicker) {
datepicker.trigger(event, [event.deltaY, event.deltaX, event.deltaY]);
if (input.val) {
input.val(_xdsoft_datetime.str());
}
datetimepicker.trigger('changedatetime.xdsoft');
return false;
}
});
datetimepicker
.on('changedatetime.xdsoft', function (event) {
if (options.onChangeDateTime && $.isFunction(options.onChangeDateTime)) {
var $input = datetimepicker.data('input');
options.onChangeDateTime.call(datetimepicker, _xdsoft_datetime.currentTime, $input, event);
delete options.value;
$input.trigger('change');
}
})
.on('generate.xdsoft', function () {
if (options.onGenerate && $.isFunction(options.onGenerate)) {
options.onGenerate.call(datetimepicker, _xdsoft_datetime.currentTime, datetimepicker.data('input'));
}
if (triggerAfterOpen) {
datetimepicker.trigger('afterOpen.xdsoft');
triggerAfterOpen = false;
}
})
.on('click.xdsoft', function (xdevent) {
xdevent.stopPropagation();
});
current_time_index = 0;
setPos = function () {
var offset = datetimepicker.data('input').offset(), top = offset.top + datetimepicker.data('input')[0].offsetHeight - 1, left = offset.left, position = "absolute";
if (options.fixed) {
top -= $(window).scrollTop();
left -= $(window).scrollLeft();
position = "fixed";
} else {
if (top + datetimepicker[0].offsetHeight > $(window).height() + $(window).scrollTop()) {
top = offset.top - datetimepicker[0].offsetHeight + 1;
}
if (top < 0) {
top = 0;
}
if (left + datetimepicker[0].offsetWidth > $(window).width()) {
left = $(window).width() - datetimepicker[0].offsetWidth;
}
}
datetimepicker.css({
left: left,
top: top,
position: position
});
};
datetimepicker
.on('open.xdsoft', function (event) {
var onShow = true;
if (options.onShow && $.isFunction(options.onShow)) {
onShow = options.onShow.call(datetimepicker, _xdsoft_datetime.currentTime, datetimepicker.data('input'), event);
}
if (onShow !== false) {
datetimepicker.show();
setPos();
$(window)
.off('resize.xdsoft', setPos)
.on('resize.xdsoft', setPos);
if (options.closeOnWithoutClick) {
$([document.body, window]).on('mousedown.xdsoft', function arguments_callee6() {
datetimepicker.trigger('close.xdsoft');
$([document.body, window]).off('mousedown.xdsoft', arguments_callee6);
});
}
}
})
.on('close.xdsoft', function (event) {
var onClose = true;
mounth_picker
.find('.xdsoft_month,.xdsoft_year')
.find('.xdsoft_select')
.hide();
if (options.onClose && $.isFunction(options.onClose)) {
onClose = options.onClose.call(datetimepicker, _xdsoft_datetime.currentTime, datetimepicker.data('input'), event);
}
if (onClose !== false && !options.opened && !options.inline) {
datetimepicker.hide();
}
event.stopPropagation();
})
.on('toggle.xdsoft', function (event) {
if (datetimepicker.is(':visible')) {
datetimepicker.trigger('close.xdsoft');
} else {
datetimepicker.trigger('open.xdsoft');
}
})
.data('input', input);
timer = 0;
timer1 = 0;
datetimepicker.data('xdsoft_datetime', _xdsoft_datetime);
datetimepicker.setOptions(options);
function getCurrentValue() {
var ct = false, time;
if (options.startDate) {
ct = _xdsoft_datetime.strToDate(options.startDate);
} else {
ct = options.value || ((input && input.val && input.val()) ? input.val() : '');
if (ct) {
ct = _xdsoft_datetime.strToDateTime(ct);
} else if (options.defaultDate) {
ct = _xdsoft_datetime.strToDate(options.defaultDate);
if (options.defaultTime) {
time = _xdsoft_datetime.strtotime(options.defaultTime);
ct.setHours(time.getHours());
ct.setMinutes(time.getMinutes());
}
}
}
if (ct && _xdsoft_datetime.isValidDate(ct)) {
datetimepicker.data('changed', true);
} else {
ct = '';
}
return ct || 0;
}
_xdsoft_datetime.setCurrentTime(getCurrentValue());
input
.data('xdsoft_datetimepicker', datetimepicker)
.on('open.xdsoft focusin.xdsoft mousedown.xdsoft', function (event) {
if (input.is(':disabled') || (input.data('xdsoft_datetimepicker').is(':visible') && options.closeOnInputClick)) {
return;
}
clearTimeout(timer);
timer = setTimeout(function () {
if (input.is(':disabled')) {
return;
}
triggerAfterOpen = true;
_xdsoft_datetime.setCurrentTime(getCurrentValue());
datetimepicker.trigger('open.xdsoft');
}, 100);
})
.on('keydown.xdsoft', function (event) {
var val = this.value, elementSelector,
key = event.which;
if ([ENTER].indexOf(key) !== -1 && options.enterLikeTab) {
elementSelector = $("input:visible,textarea:visible");
datetimepicker.trigger('close.xdsoft');
elementSelector.eq(elementSelector.index(this) + 1).focus();
return false;
}
if ([TAB].indexOf(key) !== -1) {
datetimepicker.trigger('close.xdsoft');
return true;
}
});
};
destroyDateTimePicker = function (input) {
var datetimepicker = input.data('xdsoft_datetimepicker');
if (datetimepicker) {
datetimepicker.data('xdsoft_datetime', null);
datetimepicker.remove();
input
.data('xdsoft_datetimepicker', null)
.off('.xdsoft');
$(window).off('resize.xdsoft');
$([window, document.body]).off('mousedown.xdsoft');
if (input.unmousewheel) {
input.unmousewheel();
}
}
};
$(document)
.off('keydown.xdsoftctrl keyup.xdsoftctrl')
.on('keydown.xdsoftctrl', function (e) {
if (e.keyCode === CTRLKEY) {
ctrlDown = true;
}
})
.on('keyup.xdsoftctrl', function (e) {
if (e.keyCode === CTRLKEY) {
ctrlDown = false;
}
});
return this.each(function () {
var datetimepicker = $(this).data('xdsoft_datetimepicker');
if (datetimepicker) {
if ($.type(opt) === 'string') {
switch (opt) {
case 'show':
$(this).select().focus();
datetimepicker.trigger('open.xdsoft');
break;
case 'hide':
datetimepicker.trigger('close.xdsoft');
break;
case 'toggle':
datetimepicker.trigger('toggle.xdsoft');
break;
case 'destroy':
destroyDateTimePicker($(this));
break;
case 'reset':
this.value = this.defaultValue;
if (!this.value || !datetimepicker.data('xdsoft_datetime').isValidDate(Date.parseDate(this.value, options.format))) {
datetimepicker.data('changed', false);
}
datetimepicker.data('xdsoft_datetime').setCurrentTime(this.value);
break;
case 'validate':
var $input = datetimepicker.data('input');
$input.trigger('blur.xdsoft');
break;
}
} else {
datetimepicker
.setOptions(opt);
}
return 0;
}
if ($.type(opt) !== 'string') {
if (!options.lazyInit || options.open || options.inline) {
createDateTimePicker($(this));
} else {
lazyInit($(this));
}
}
});
};
$.fn.datetimepicker.defaults = default_options;
}(jQuery));
(function () {
/*! Copyright (c) 2013 Brandon Aaron (http://brandon.aaron.sh)
* Licensed under the MIT License (LICENSE.txt).
*
* Version: 3.1.12
*
* Requires: jQuery 1.2.2+
*/
!function(a){"function"==typeof define&&define.amd?define(["jquery"],a):"object"==typeof exports?module.exports=a:a(jQuery)}(function(a){function b(b){var g=b||window.event,h=i.call(arguments,1),j=0,l=0,m=0,n=0,o=0,p=0;if(b=a.event.fix(g),b.type="mousewheel","detail"in g&&(m=-1*g.detail),"wheelDelta"in g&&(m=g.wheelDelta),"wheelDeltaY"in g&&(m=g.wheelDeltaY),"wheelDeltaX"in g&&(l=-1*g.wheelDeltaX),"axis"in g&&g.axis===g.HORIZONTAL_AXIS&&(l=-1*m,m=0),j=0===m?l:m,"deltaY"in g&&(m=-1*g.deltaY,j=m),"deltaX"in g&&(l=g.deltaX,0===m&&(j=-1*l)),0!==m||0!==l){if(1===g.deltaMode){var q=a.data(this,"mousewheel-line-height");j*=q,m*=q,l*=q}else if(2===g.deltaMode){var r=a.data(this,"mousewheel-page-height");j*=r,m*=r,l*=r}if(n=Math.max(Math.abs(m),Math.abs(l)),(!f||f>n)&&(f=n,d(g,n)&&(f/=40)),d(g,n)&&(j/=40,l/=40,m/=40),j=Math[j>=1?"floor":"ceil"](j/f),l=Math[l>=1?"floor":"ceil"](l/f),m=Math[m>=1?"floor":"ceil"](m/f),k.settings.normalizeOffset&&this.getBoundingClientRect){var s=this.getBoundingClientRect();o=b.clientX-s.left,p=b.clientY-s.top}return b.deltaX=l,b.deltaY=m,b.deltaFactor=f,b.offsetX=o,b.offsetY=p,b.deltaMode=0,h.unshift(b,j,l,m),e&&clearTimeout(e),e=setTimeout(c,200),(a.event.dispatch||a.event.handle).apply(this,h)}}function c(){f=null}function d(a,b){return k.settings.adjustOldDeltas&&"mousewheel"===a.type&&b%120===0}var e,f,g=["wheel","mousewheel","DOMMouseScroll","MozMousePixelScroll"],h="onwheel"in document||document.documentMode>=9?["wheel"]:["mousewheel","DomMouseScroll","MozMousePixelScroll"],i=Array.prototype.slice;if(a.event.fixHooks)for(var j=g.length;j;)a.event.fixHooks[g[--j]]=a.event.mouseHooks;var k=a.event.special.mousewheel={version:"3.1.12",setup:function(){if(this.addEventListener)for(var c=h.length;c;)this.addEventListener(h[--c],b,!1);else this.onmousewheel=b;a.data(this,"mousewheel-line-height",k.getLineHeight(this)),a.data(this,"mousewheel-page-height",k.getPageHeight(this))},teardown:function(){if(this.removeEventListener)for(var c=h.length;c;)this.removeEventListener(h[--c],b,!1);else this.onmousewheel=null;a.removeData(this,"mousewheel-line-height"),a.removeData(this,"mousewheel-page-height")},getLineHeight:function(b){var c=a(b),d=c["offsetParent"in a.fn?"offsetParent":"parent"]();return d.length||(d=a("body")),parseInt(d.css("fontSize"),10)||parseInt(c.css("fontSize"),10)||16},getPageHeight:function(b){return a(b).height()},settings:{adjustOldDeltas:!0,normalizeOffset:!0}};a.fn.extend({mousewheel:function(a){return a?this.bind("mousewheel",a):this.trigger("mousewheel")},unmousewheel:function(a){return this.unbind("mousewheel",a)}})});
// Parse and Format Library
//http://www.xaprb.com/blog/2005/12/12/javascript-closures-for-runtime-efficiency/
/*
* Copyright (C) 2004 Baron Schwartz <baron at sequent dot org>
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as published by the
* Free Software Foundation, version 2.1.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
* details.
*/
Date.parseFunctions={count:0};Date.parseRegexes=[];Date.formatFunctions={count:0};Date.prototype.dateFormat=function(b){if(b=="unixtime"){return parseInt(this.getTime()/1000);}if(Date.formatFunctions[b]==null){Date.createNewFormat(b);}var a=Date.formatFunctions[b];return this[a]();};Date.createNewFormat=function(format){var funcName="format"+Date.formatFunctions.count++;Date.formatFunctions[format]=funcName;var codePrefix="Date.prototype."+funcName+" = function() {return ";var code="";var special=false;var ch="";for(var i=0;i<format.length;++i){ch=format.charAt(i);if(!special&&ch=="\\"){special=true;}else{if(special){special=false;code+="'"+String.escape(ch)+"' + ";}else{code+=Date.getFormatCode(ch);}}}if(code.length==0){code="\"\"";}else{code=code.substring(0,code.length-3);}eval(codePrefix+code+";}");};Date.getFormatCode=function(a){switch(a){case"d":return"String.leftPad(this.getDate(), 2, '0') + ";case"D":return"Date.dayNames[this.getDay()].substring(0, 3) + ";case"j":return"this.getDate() + ";case"l":return"Date.dayNames[this.getDay()] + ";case"S":return"this.getSuffix() + ";case"w":return"this.getDay() + ";case"z":return"this.getDayOfYear() + ";case"W":return"this.getWeekOfYear() + ";case"F":return"Date.monthNames[this.getMonth()] + ";case"m":return"String.leftPad(this.getMonth() + 1, 2, '0') + ";case"M":return"Date.monthNames[this.getMonth()].substring(0, 3) + ";case"n":return"(this.getMonth() + 1) + ";case"t":return"this.getDaysInMonth() + ";case"L":return"(this.isLeapYear() ? 1 : 0) + ";case"Y":return"this.getFullYear() + ";case"y":return"('' + this.getFullYear()).substring(2, 4) + ";case"a":return"(this.getHours() < 12 ? 'am' : 'pm') + ";case"A":return"(this.getHours() < 12 ? 'AM' : 'PM') + ";case"g":return"((this.getHours() %12) ? this.getHours() % 12 : 12) + ";case"G":return"this.getHours() + ";case"h":return"String.leftPad((this.getHours() %12) ? this.getHours() % 12 : 12, 2, '0') + ";case"H":return"String.leftPad(this.getHours(), 2, '0') + ";case"i":return"String.leftPad(this.getMinutes(), 2, '0') + ";case"s":return"String.leftPad(this.getSeconds(), 2, '0') + ";case"O":return"this.getGMTOffset() + ";case"T":return"this.getTimezone() + ";case"Z":return"(this.getTimezoneOffset() * -60) + ";default:return"'"+String.escape(a)+"' + ";}};Date.parseDate=function(a,c){if(c=="unixtime"){return new Date(!isNaN(parseInt(a))?parseInt(a)*1000:0);}if(Date.parseFunctions[c]==null){Date.createParser(c);}var b=Date.parseFunctions[c];return Date[b](a);};Date.createParser=function(format){var funcName="parse"+Date.parseFunctions.count++;var regexNum=Date.parseRegexes.length;var currentGroup=1;Date.parseFunctions[format]=funcName;var code="Date."+funcName+" = function(input) {\nvar y = -1, m = -1, d = -1, h = -1, i = -1, s = -1, z = -1;\nvar d = new Date();\ny = d.getFullYear();\nm = d.getMonth();\nd = d.getDate();\nvar results = input.match(Date.parseRegexes["+regexNum+"]);\nif (results && results.length > 0) {";var regex="";var special=false;var ch="";for(var i=0;i<format.length;++i){ch=format.charAt(i);if(!special&&ch=="\\"){special=true;}else{if(special){special=false;regex+=String.escape(ch);}else{obj=Date.formatCodeToRegex(ch,currentGroup);currentGroup+=obj.g;regex+=obj.s;if(obj.g&&obj.c){code+=obj.c;}}}}code+="if (y > 0 && z > 0){\nvar doyDate = new Date(y,0);\ndoyDate.setDate(z);\nm = doyDate.getMonth();\nd = doyDate.getDate();\n}";code+="if (y > 0 && m >= 0 && d > 0 && h >= 0 && i >= 0 && s >= 0)\n{return new Date(y, m, d, h, i, s);}\nelse if (y > 0 && m >= 0 && d > 0 && h >= 0 && i >= 0)\n{return new Date(y, m, d, h, i);}\nelse if (y > 0 && m >= 0 && d > 0 && h >= 0)\n{return new Date(y, m, d, h);}\nelse if (y > 0 && m >= 0 && d > 0)\n{return new Date(y, m, d);}\nelse if (y > 0 && m >= 0)\n{return new Date(y, m);}\nelse if (y > 0)\n{return new Date(y);}\n}return null;}";Date.parseRegexes[regexNum]=new RegExp("^"+regex+"$");eval(code);};Date.formatCodeToRegex=function(b,a){switch(b){case"D":return{g:0,c:null,s:"(?:Sun|Mon|Tue|Wed|Thu|Fri|Sat)"};case"j":case"d":return{g:1,c:"d = parseInt(results["+a+"], 10);\n",s:"(\\d{1,2})"};case"l":return{g:0,c:null,s:"(?:"+Date.dayNames.join("|")+")"};case"S":return{g:0,c:null,s:"(?:st|nd|rd|th)"};case"w":return{g:0,c:null,s:"\\d"};case"z":return{g:1,c:"z = parseInt(results["+a+"], 10);\n",s:"(\\d{1,3})"};case"W":return{g:0,c:null,s:"(?:\\d{2})"};case"F":return{g:1,c:"m = parseInt(Date.monthNumbers[results["+a+"].substring(0, 3)], 10);\n",s:"("+Date.monthNames.join("|")+")"};case"M":return{g:1,c:"m = parseInt(Date.monthNumbers[results["+a+"]], 10);\n",s:"(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)"};case"n":case"m":return{g:1,c:"m = parseInt(results["+a+"], 10) - 1;\n",s:"(\\d{1,2})"};case"t":return{g:0,c:null,s:"\\d{1,2}"};case"L":return{g:0,c:null,s:"(?:1|0)"};case"Y":return{g:1,c:"y = parseInt(results["+a+"], 10);\n",s:"(\\d{4})"};case"y":return{g:1,c:"var ty = parseInt(results["+a+"], 10);\ny = ty > Date.y2kYear ? 1900 + ty : 2000 + ty;\n",s:"(\\d{1,2})"};case"a":return{g:1,c:"if (results["+a+"] == 'am') {\nif (h == 12) { h = 0; }\n} else { if (h < 12) { h += 12; }}",s:"(am|pm)"};case"A":return{g:1,c:"if (results["+a+"] == 'AM') {\nif (h == 12) { h = 0; }\n} else { if (h < 12) { h += 12; }}",s:"(AM|PM)"};case"g":case"G":case"h":case"H":return{g:1,c:"h = parseInt(results["+a+"], 10);\n",s:"(\\d{1,2})"};case"i":return{g:1,c:"i = parseInt(results["+a+"], 10);\n",s:"(\\d{2})"};case"s":return{g:1,c:"s = parseInt(results["+a+"], 10);\n",s:"(\\d{2})"};case"O":return{g:0,c:null,s:"[+-]\\d{4}"};case"T":return{g:0,c:null,s:"[A-Z]{3}"};case"Z":return{g:0,c:null,s:"[+-]\\d{1,5}"};default:return{g:0,c:null,s:String.escape(b)};}};Date.prototype.getTimezone=function(){return this.toString().replace(/^.*? ([A-Z]{3}) [0-9]{4}.*$/,"$1").replace(/^.*?\(([A-Z])[a-z]+ ([A-Z])[a-z]+ ([A-Z])[a-z]+\)$/,"$1$2$3");};Date.prototype.getGMTOffset=function(){return(this.getTimezoneOffset()>0?"-":"+")+String.leftPad(Math.floor(Math.abs(this.getTimezoneOffset())/60),2,"0")+String.leftPad(Math.abs(this.getTimezoneOffset())%60,2,"0");};Date.prototype.getDayOfYear=function(){var a=0;Date.daysInMonth[1]=this.isLeapYear()?29:28;for(var b=0;b<this.getMonth();++b){a+=Date.daysInMonth[b];}return a+this.getDate();};Date.prototype.getWeekOfYear=function(){var b=this.getDayOfYear()+(4-this.getDay());var a=new Date(this.getFullYear(),0,1);var c=(7-a.getDay()+4);return String.leftPad(Math.ceil((b-c)/7)+1,2,"0");};Date.prototype.isLeapYear=function(){var a=this.getFullYear();return((a&3)==0&&(a%100||(a%400==0&&a)));};Date.prototype.getFirstDayOfMonth=function(){var a=(this.getDay()-(this.getDate()-1))%7;return(a<0)?(a+7):a;};Date.prototype.getLastDayOfMonth=function(){var a=(this.getDay()+(Date.daysInMonth[this.getMonth()]-this.getDate()))%7;return(a<0)?(a+7):a;};Date.prototype.getDaysInMonth=function(){Date.daysInMonth[1]=this.isLeapYear()?29:28;return Date.daysInMonth[this.getMonth()];};Date.prototype.getSuffix=function(){switch(this.getDate()){case 1:case 21:case 31:return"st";case 2:case 22:return"nd";case 3:case 23:return"rd";default:return"th";}};String.escape=function(a){return a.replace(/('|\\)/g,"\\$1");};String.leftPad=function(d,b,c){var a=new String(d);if(c==null){c=" ";}while(a.length<b){a=c+a;}return a;};Date.daysInMonth=[31,28,31,30,31,30,31,31,30,31,30,31];Date.monthNames=["January","February","March","April","May","June","July","August","September","October","November","December"];Date.dayNames=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"];Date.y2kYear=50;Date.monthNumbers={Jan:0,Feb:1,Mar:2,Apr:3,May:4,Jun:5,Jul:6,Aug:7,Sep:8,Oct:9,Nov:10,Dec:11};Date.patterns={ISO8601LongPattern:"Y-m-d H:i:s",ISO8601ShortPattern:"Y-m-d",ShortDatePattern:"n/j/Y",LongDatePattern:"l, F d, Y",FullDateTimePattern:"l, F d, Y g:i:s A",MonthDayPattern:"F d",ShortTimePattern:"g:i A",LongTimePattern:"g:i:s A",SortableDateTimePattern:"Y-m-d\\TH:i:s",UniversalSortableDateTimePattern:"Y-m-d H:i:sO",YearMonthPattern:"F, Y"};
}()); | ztfy.myams | /ztfy.myams-0.1.33.tar.gz/ztfy.myams-0.1.33/src/ztfy/myams/resources/js/ext/jquery-datetimepicker.js | jquery-datetimepicker.js |
(function(e,a,g){function f(l){var k=[];for(var j=0,h=l.length;j<h;j++){k[l[j]]=j}return k}function d(i,k,j){var h=i.splice(k,1)[0];i.splice(j,0,h)}function b(l,o,n){var k=[];for(var j=0,h=l.childNodes.length;j<h;j++){if(l.childNodes[j].nodeType==1){k.push(l.childNodes[j])}}var m=k[o];if(n!==null){l.insertBefore(m,k[n])}else{l.appendChild(m)}}$.fn.dataTableExt.oApi.fnColReorder=function(l,h,u){var t=$.fn.dataTable.Api?true:false;var p,m,o,y,x=l.aoColumns.length,w,n;if(h==u){return}if(h<0||h>=x){this.oApi._fnLog(l,1,"ColReorder 'from' index is out of bounds: "+h);return}if(u<0||u>=x){this.oApi._fnLog(l,1,"ColReorder 'to' index is out of bounds: "+u);return}var s=[];for(p=0,m=x;p<m;p++){s[p]=p}d(s,h,u);var v=f(s);for(p=0,m=l.aaSorting.length;p<m;p++){l.aaSorting[p][0]=v[l.aaSorting[p][0]]}if(l.aaSortingFixed!==null){for(p=0,m=l.aaSortingFixed.length;p<m;p++){l.aaSortingFixed[p][0]=v[l.aaSortingFixed[p][0]]}}for(p=0,m=x;p<m;p++){n=l.aoColumns[p];for(o=0,y=n.aDataSort.length;o<y;o++){n.aDataSort[o]=v[n.aDataSort[o]]}if(t){n.idx=v[n.idx]}}if(t){$.each(l.aLastSort,function(j,z){l.aLastSort[j].src=v[z.src]})}for(p=0,m=x;p<m;p++){n=l.aoColumns[p];if(typeof n.mData=="number"){n.mData=v[n.mData];l.oApi._fnColumnOptions(l,p,{})}}if(l.aoColumns[h].bVisible){var k=this.oApi._fnColumnIndexToVisible(l,h);var q=null;p=u<h?u:u+1;while(q===null&&p<x){q=this.oApi._fnColumnIndexToVisible(l,p);p++}w=l.nTHead.getElementsByTagName("tr");for(p=0,m=w.length;p<m;p++){b(w[p],k,q)}if(l.nTFoot!==null){w=l.nTFoot.getElementsByTagName("tr");for(p=0,m=w.length;p<m;p++){b(w[p],k,q)}}for(p=0,m=l.aoData.length;p<m;p++){if(l.aoData[p].nTr!==null){b(l.aoData[p].nTr,k,q)}}}d(l.aoColumns,h,u);d(l.aoPreSearchCols,h,u);for(p=0,m=l.aoData.length;p<m;p++){if(t){d(l.aoData[p].anCells,h,u)}else{if($.isArray(l.aoData[p]._aData)){d(l.aoData[p]._aData,h,u)}d(l.aoData[p]._anHidden,h,u)}}for(p=0,m=l.aoHeader.length;p<m;p++){d(l.aoHeader[p],h,u)}if(l.aoFooter!==null){for(p=0,m=l.aoFooter.length;p<m;p++){d(l.aoFooter[p],h,u)}}if(t){var r=new $.fn.dataTable.Api(l);r.rows().invalidate()}for(p=0,m=x;p<m;p++){$(l.aoColumns[p].nTh).off("click.DT");this.oApi._fnSortAttachListener(l,l.aoColumns[p].nTh,p)}$(l.oInstance).trigger("column-reorder",[l,{iFrom:h,iTo:u,aiInvertMapping:v}])};var c=function(j,i){var h=function(l,k){var m;if(j.fn.dataTable.Api){m=new j.fn.dataTable.Api(l).settings()[0]}else{if(l.fnSettings){m=l.fnSettings()}else{if(typeof l==="string"){if(j.fn.dataTable.fnIsDataTable(j(l)[0])){m=j(l).eq(0).dataTable().fnSettings()}}else{if(l.nodeName&&l.nodeName.toLowerCase()==="table"){if(j.fn.dataTable.fnIsDataTable(l.nodeName)){m=j(l.nodeName).dataTable().fnSettings()}}else{if(l instanceof jQuery){if(j.fn.dataTable.fnIsDataTable(l[0])){m=l.eq(0).dataTable().fnSettings()}}else{m=l}}}}}if(j.fn.dataTable.camelToHungarian){j.fn.dataTable.camelToHungarian(h.defaults,k||{})}this.s={dt:null,init:j.extend(true,{},h.defaults,k),fixed:0,fixedRight:0,dropCallback:null,mouse:{startX:-1,startY:-1,offsetX:-1,offsetY:-1,target:-1,targetIndex:-1,fromIndex:-1},aoTargets:[]};this.dom={drag:null,pointer:null};this.s.dt=m.oInstance.fnSettings();this.s.dt._colReorder=this;this._fnConstruct();m.oApi._fnCallbackReg(m,"aoDestroyCallback",j.proxy(this._fnDestroy,this),"ColReorder");return this};h.prototype={fnReset:function(){var l=[];for(var m=0,k=this.s.dt.aoColumns.length;m<k;m++){l.push(this.s.dt.aoColumns[m]._ColReorder_iOrigCol)}this._fnOrderColumns(l);return this},fnGetCurrentOrder:function(){return this.fnOrder()},fnOrder:function(n){if(n===g){var l=[];for(var m=0,k=this.s.dt.aoColumns.length;m<k;m++){l.push(this.s.dt.aoColumns[m]._ColReorder_iOrigCol)}return l}this._fnOrderColumns(f(n));return this},_fnConstruct:function(){var p=this;var k=this.s.dt.aoColumns.length;var o;if(this.s.init.iFixedColumns){this.s.fixed=this.s.init.iFixedColumns}this.s.fixedRight=this.s.init.iFixedColumnsRight?this.s.init.iFixedColumnsRight:0;if(this.s.init.fnReorderCallback){this.s.dropCallback=this.s.init.fnReorderCallback}for(o=0;o<k;o++){if(o>this.s.fixed-1&&o<k-this.s.fixedRight){this._fnMouseListener(o,this.s.dt.aoColumns[o].nTh)}this.s.dt.aoColumns[o]._ColReorder_iOrigCol=o}this.s.dt.oApi._fnCallbackReg(this.s.dt,"aoStateSaveParams",function(q,r){p._fnStateSave.call(p,r)},"ColReorder_State");var l=null;if(this.s.init.aiOrder){l=this.s.init.aiOrder.slice()}if(this.s.dt.oLoadedState&&typeof this.s.dt.oLoadedState.ColReorder!="undefined"&&this.s.dt.oLoadedState.ColReorder.length==this.s.dt.aoColumns.length){l=this.s.dt.oLoadedState.ColReorder}if(l){if(!p.s.dt._bInitComplete){var n=false;this.s.dt.aoDrawCallback.push({fn:function(){if(!p.s.dt._bInitComplete&&!n){n=true;var q=f(l);p._fnOrderColumns.call(p,q)}},sName:"ColReorder_Pre"})}else{var m=f(l);p._fnOrderColumns.call(p,m)}}else{this._fnSetColumnIndexes()}},_fnOrderColumns:function(l){if(l.length!=this.s.dt.aoColumns.length){this.s.dt.oInstance.oApi._fnLog(this.s.dt,1,"ColReorder - array reorder does not match known number of columns. Skipping.");return}for(var m=0,k=l.length;m<k;m++){var n=j.inArray(m,l);if(m!=n){d(l,n,m);this.s.dt.oInstance.fnColReorder(n,m)}}if(this.s.dt.oScroll.sX!==""||this.s.dt.oScroll.sY!==""){this.s.dt.oInstance.fnAdjustColumnSizing()}this.s.dt.oInstance.oApi._fnSaveState(this.s.dt);this._fnSetColumnIndexes()},_fnStateSave:function(l){var m,k,n,o;var q=this.s.dt;for(m=0;m<l.aaSorting.length;m++){l.aaSorting[m][0]=q.aoColumns[l.aaSorting[m][0]]._ColReorder_iOrigCol}var p=j.extend(true,[],l.aoSearchCols);l.ColReorder=[];for(m=0,k=q.aoColumns.length;m<k;m++){o=q.aoColumns[m]._ColReorder_iOrigCol;l.aoSearchCols[o]=p[m];l.abVisCols[o]=q.aoColumns[m].bVisible;l.ColReorder.push(o)}},_fnMouseListener:function(k,m){var l=this;j(m).on("mousedown.ColReorder",function(n){n.preventDefault();l._fnMouseDown.call(l,n,m)})},_fnMouseDown:function(o,n){var l=this;var m=j(o.target).closest("th, td");var p=m.offset();var k=parseInt(j(n).attr("data-column-index"),10);if(k===g){return}this.s.mouse.startX=o.pageX;this.s.mouse.startY=o.pageY;this.s.mouse.offsetX=o.pageX-p.left;this.s.mouse.offsetY=o.pageY-p.top;this.s.mouse.target=this.s.dt.aoColumns[k].nTh;this.s.mouse.targetIndex=k;this.s.mouse.fromIndex=k;this._fnRegions();j(a).on("mousemove.ColReorder",function(q){l._fnMouseMove.call(l,q)}).on("mouseup.ColReorder",function(q){l._fnMouseUp.call(l,q)})},_fnMouseMove:function(o){var n=this;if(this.dom.drag===null){if(Math.pow(Math.pow(o.pageX-this.s.mouse.startX,2)+Math.pow(o.pageY-this.s.mouse.startY,2),0.5)<5){return}this._fnCreateDragNode()}this.dom.drag.css({left:o.pageX-this.s.mouse.offsetX,top:o.pageY-this.s.mouse.offsetY});var p=false;var l=this.s.mouse.toIndex;for(var m=1,k=this.s.aoTargets.length;m<k;m++){if(o.pageX<this.s.aoTargets[m-1].x+((this.s.aoTargets[m].x-this.s.aoTargets[m-1].x)/2)){this.dom.pointer.css("left",this.s.aoTargets[m-1].x);this.s.mouse.toIndex=this.s.aoTargets[m-1].to;p=true;break}}if(!p){this.dom.pointer.css("left",this.s.aoTargets[this.s.aoTargets.length-1].x);this.s.mouse.toIndex=this.s.aoTargets[this.s.aoTargets.length-1].to}if(this.s.init.bRealtime&&l!==this.s.mouse.toIndex){this.s.dt.oInstance.fnColReorder(this.s.mouse.fromIndex,this.s.mouse.toIndex);this.s.mouse.fromIndex=this.s.mouse.toIndex;this._fnRegions()}},_fnMouseUp:function(l){var k=this;j(a).off("mousemove.ColReorder mouseup.ColReorder");if(this.dom.drag!==null){this.dom.drag.remove();this.dom.pointer.remove();this.dom.drag=null;this.dom.pointer=null;this.s.dt.oInstance.fnColReorder(this.s.mouse.fromIndex,this.s.mouse.toIndex);this._fnSetColumnIndexes();if(this.s.dt.oScroll.sX!==""||this.s.dt.oScroll.sY!==""){this.s.dt.oInstance.fnAdjustColumnSizing()}if(this.s.dropCallback!==null){this.s.dropCallback.call(this)}this.s.dt.oInstance.oApi._fnSaveState(this.s.dt)}},_fnRegions:function(){var l=this.s.dt.aoColumns;this.s.aoTargets.splice(0,this.s.aoTargets.length);this.s.aoTargets.push({x:j(this.s.dt.nTable).offset().left,to:0});var n=0;for(var m=0,k=l.length;m<k;m++){if(m!=this.s.mouse.fromIndex){n++}if(l[m].bVisible){this.s.aoTargets.push({x:j(l[m].nTh).offset().left+j(l[m].nTh).outerWidth(),to:n})}}if(this.s.fixedRight!==0){this.s.aoTargets.splice(this.s.aoTargets.length-this.s.fixedRight)}if(this.s.fixed!==0){this.s.aoTargets.splice(0,this.s.fixed)}},_fnCreateDragNode:function(){var p=this.s.dt.oScroll.sX!==""||this.s.dt.oScroll.sY!=="";var m=this.s.dt.aoColumns[this.s.mouse.targetIndex].nTh;var l=m.parentNode;var n=l.parentNode;var k=n.parentNode;var o=j(m).clone();this.dom.drag=j(k.cloneNode(false)).addClass("DTCR_clonedTable").append(n.cloneNode(false).appendChild(l.cloneNode(false).appendChild(o[0]))).css({position:"absolute",top:0,left:0,width:j(m).outerWidth(),height:j(m).outerHeight()}).appendTo("body");this.dom.pointer=j("<div></div>").addClass("DTCR_pointer").css({position:"absolute",top:p?j("div.dataTables_scroll",this.s.dt.nTableWrapper).offset().top:j(this.s.dt.nTable).offset().top,height:p?j("div.dataTables_scroll",this.s.dt.nTableWrapper).height():j(this.s.dt.nTable).height()}).appendTo("body")},_fnDestroy:function(){var l,k;for(l=0,k=this.s.dt.aoDrawCallback.length;l<k;l++){if(this.s.dt.aoDrawCallback[l].sName==="ColReorder_Pre"){this.s.dt.aoDrawCallback.splice(l,1);break}}j(this.s.dt.nTHead).find("*").off(".ColReorder");j.each(this.s.dt.aoColumns,function(m,n){j(n.nTh).removeAttr("data-column-index")});this.s.dt._colReorder=null;this.s=null},_fnSetColumnIndexes:function(){j.each(this.s.dt.aoColumns,function(k,l){j(l.nTh).attr("data-column-index",k)})}};h.defaults={aiOrder:null,bRealtime:false,iFixedColumns:0,iFixedColumnsRight:0,fnReorderCallback:null};h.version="1.1.0";j.fn.dataTable.ColReorder=h;j.fn.DataTable.ColReorder=h;if(typeof j.fn.dataTable=="function"&&typeof j.fn.dataTableExt.fnVersionCheck=="function"&&j.fn.dataTableExt.fnVersionCheck("1.9.3")){j.fn.dataTableExt.aoFeatures.push({fnInit:function(k){var m=k.oInstance;if(!k._colReorder){var n=k.oInit;var l=n.colReorder||n.oColReorder||{};new h(k,l)}else{m.oApi._fnLog(k,1,"ColReorder attempted to initialise twice. Ignoring second")}return null},cFeature:"R",sFeature:"ColReorder"})}else{alert("Warning: ColReorder requires DataTables 1.9.3 or greater - www.datatables.net/download")}if(j.fn.dataTable.Api){j.fn.dataTable.Api.register("colReorder.reset()",function(){return this.iterator("table",function(k){k._colReorder.fnReset()})});j.fn.dataTable.Api.register("colReorder.order()",function(k){if(k){return this.iterator("table",function(l){l._colReorder.fnOrder(k)})}return this.context.length?this.context[0]._colReorder.fnOrder():null})}return h};c(jQuery,jQuery.fn.dataTable)})(window,document); | ztfy.myams | /ztfy.myams-0.1.33.tar.gz/ztfy.myams-0.1.33/src/ztfy/myams/resources/js/ext/jquery-dataTables-colReorder.min.js | jquery-dataTables-colReorder.min.js |
!function(n){var t=function(t,i){var t=n(t),e=this,a='li:has([data-toggle="tab"])',o=[],s=n.extend({},n.fn.bootstrapWizard.defaults,i),r=null,l=null;this.rebindClick=function(n,t){n.unbind("click",t).bind("click",t)},this.fixNavigationButtons=function(){if(r.length||(l.find("a:first").tab("show"),r=l.find(a+":first")),n(s.previousSelector,t).toggleClass("disabled",e.firstIndex()>=e.currentIndex()),n(s.nextSelector,t).toggleClass("disabled",e.currentIndex()>=e.navigationLength()),n(s.nextSelector,t).toggleClass("hidden",e.currentIndex()>=e.navigationLength()&&n(s.finishSelector,t).length>0),n(s.lastSelector,t).toggleClass("hidden",e.currentIndex()>=e.navigationLength()&&n(s.finishSelector,t).length>0),n(s.finishSelector,t).toggleClass("hidden",e.currentIndex()<e.navigationLength()),n(s.backSelector,t).toggleClass("disabled",0===o.length),n(s.backSelector,t).toggleClass("hidden",e.currentIndex()>=e.navigationLength()&&n(s.finishSelector,t).length>0),e.rebindClick(n(s.nextSelector,t),e.next),e.rebindClick(n(s.previousSelector,t),e.previous),e.rebindClick(n(s.lastSelector,t),e.last),e.rebindClick(n(s.firstSelector,t),e.first),e.rebindClick(n(s.finishSelector,t),e.finish),e.rebindClick(n(s.backSelector,t),e.back),s.onTabShow&&"function"==typeof s.onTabShow&&!1===s.onTabShow(r,l,e.currentIndex()))return!1},this.next=function(n){if(t.hasClass("last"))return!1;if(s.onNext&&"function"==typeof s.onNext&&!1===s.onNext(r,l,e.nextIndex()))return!1;var i=e.currentIndex(),d=e.nextIndex();d>e.navigationLength()||(o.push(i),l.find(a+(s.withVisible?":visible":"")+":eq("+d+") a").tab("show"))},this.previous=function(n){if(t.hasClass("first"))return!1;if(s.onPrevious&&"function"==typeof s.onPrevious&&!1===s.onPrevious(r,l,e.previousIndex()))return!1;var i=e.currentIndex(),d=e.previousIndex();d<0||(o.push(i),l.find(a+(s.withVisible?":visible":"")+":eq("+d+") a").tab("show"))},this.first=function(n){return(!s.onFirst||"function"!=typeof s.onFirst||!1!==s.onFirst(r,l,e.firstIndex()))&&(!t.hasClass("disabled")&&(o.push(e.currentIndex()),void l.find(a+":eq(0) a").tab("show")))},this.last=function(n){return(!s.onLast||"function"!=typeof s.onLast||!1!==s.onLast(r,l,e.lastIndex()))&&(!t.hasClass("disabled")&&(o.push(e.currentIndex()),void l.find(a+":eq("+e.navigationLength()+") a").tab("show")))},this.finish=function(n){s.onFinish&&"function"==typeof s.onFinish&&s.onFinish(r,l,e.lastIndex())},this.back=function(){if(0==o.length)return null;var n=o.pop();if(s.onBack&&"function"==typeof s.onBack&&!1===s.onBack(r,l,n))return o.push(n),!1;t.find(a+":eq("+n+") a").tab("show")},this.currentIndex=function(){return l.find(a+(s.withVisible?":visible":"")).index(r)},this.firstIndex=function(){return 0},this.lastIndex=function(){return e.navigationLength()},this.getIndex=function(n){return l.find(a+(s.withVisible?":visible":"")).index(n)},this.nextIndex=function(){var n=this.currentIndex(),t=null;do{n++,t=l.find(a+(s.withVisible?":visible":"")+":eq("+n+")")}while(t&&t.hasClass("disabled"));return n},this.previousIndex=function(){var n=this.currentIndex(),t=null;do{n--,t=l.find(a+(s.withVisible?":visible":"")+":eq("+n+")")}while(t&&t.hasClass("disabled"));return n},this.navigationLength=function(){return l.find(a+(s.withVisible?":visible":"")).length-1},this.activeTab=function(){return r},this.nextTab=function(){return l.find(a+":eq("+(e.currentIndex()+1)+")").length?l.find(a+":eq("+(e.currentIndex()+1)+")"):null},this.previousTab=function(){return e.currentIndex()<=0?null:l.find(a+":eq("+parseInt(e.currentIndex()-1)+")")},this.show=function(n){var i=isNaN(n)?t.find(a+' a[href="#'+n+'"]'):t.find(a+":eq("+n+") a");i.length>0&&(o.push(e.currentIndex()),i.tab("show"))},this.disable=function(n){l.find(a+":eq("+n+")").addClass("disabled")},this.enable=function(n){l.find(a+":eq("+n+")").removeClass("disabled")},this.hide=function(n){l.find(a+":eq("+n+")").hide()},this.display=function(n){l.find(a+":eq("+n+")").show()},this.remove=function(t){var i=t[0],e=void 0!==t[1]&&t[1],o=l.find(a+":eq("+i+")");if(e){var s=o.find("a").attr("href");n(s).remove()}o.remove()};var d=function(t){var i=l.find(a),o=i.index(n(t.currentTarget).parent(a)),d=n(i[o]);if(s.onTabClick&&"function"==typeof s.onTabClick&&!1===s.onTabClick(r,l,e.currentIndex(),o,d))return!1},u=function(t){var i=n(t.target).parent(),o=l.find(a).index(i);return!i.hasClass("disabled")&&((!s.onTabChange||"function"!=typeof s.onTabChange||!1!==s.onTabChange(r,l,e.currentIndex(),o))&&(r=i,void e.fixNavigationButtons()))};this.resetWizard=function(){n('a[data-toggle="tab"]',l).off("click",d),n('a[data-toggle="tab"]',l).off("show show.bs.tab",u),l=t.find("ul:first",t),r=l.find(a+".active",t),n('a[data-toggle="tab"]',l).on("click",d),n('a[data-toggle="tab"]',l).on("show show.bs.tab",u),e.fixNavigationButtons()},l=t.find("ul:first",t),r=l.find(a+".active",t),l.hasClass(s.tabClass)||l.addClass(s.tabClass),s.onInit&&"function"==typeof s.onInit&&s.onInit(r,l,0),s.onShow&&"function"==typeof s.onShow&&s.onShow(r,l,e.nextIndex()),n('a[data-toggle="tab"]',l).on("click",d),n('a[data-toggle="tab"]',l).on("show show.bs.tab",u)};n.fn.bootstrapWizard=function(i){if("string"==typeof i){var e=Array.prototype.slice.call(arguments,1);return 1===e.length&&e.toString(),this.data("bootstrapWizard")[i](e)}return this.each(function(e){var a=n(this);if(!a.data("bootstrapWizard")){var o=new t(a,i);a.data("bootstrapWizard",o),o.fixNavigationButtons()}})},n.fn.bootstrapWizard.defaults={withVisible:!0,tabClass:"nav nav-pills",nextSelector:".wizard li.next",previousSelector:".wizard li.previous",firstSelector:".wizard li.first",lastSelector:".wizard li.last",finishSelector:".wizard li.finish",backSelector:".wizard li.back",onShow:null,onInit:null,onNext:null,onPrevious:null,onLast:null,onFirst:null,onFinish:null,onBack:null,onTabChange:null,onTabClick:null,onTabShow:null}}(jQuery); | ztfy.myams | /ztfy.myams-0.1.33.tar.gz/ztfy.myams-0.1.33/src/ztfy/myams/resources/js/ext/bootstrap-wizard-1.4.2.min.js | bootstrap-wizard-1.4.2.min.js |
(function ($) {
$.fn.extend({
select2SortableOrder: function () {
var $this = this.filter('[multiple]');
$this.each(function () {
var $select = $(this);
// skip elements not select2-ed
if (typeof ($select.data('select2')) !== 'object') {
return false;
}
var $select2 = $select.siblings('.select2-container');
var sorted;
if ($select.attr('type') === 'hidden') {
// Update hidden field value
var plugin = $select2.data('select2');
var separator = plugin.opts.separator;
var values = [];
$.each(plugin.data(), function() {
values.push(this.id);
});
$select.val(values.join(separator));
} else {
// Opt group names
var optArr = [];
$select.find('optgroup').each(function(idx, val) {
optArr.push (val);
});
$select.find('option').each(function(idx, val) {
var groupName = $(this).parent('optgroup').prop('label');
var optVal = this;
if (groupName === undefined) {
if (this.value !== '' && !this.selected) {
optArr.push (optVal);
}
}
});
sorted = $($select2.find('.select2-choices li[class!="select2-search-field"]').map(function () {
if (!this) {
return undefined;
}
var id = $(this).data('select2Data').id;
return $select.find('option[value="' + id + '"]')[0];
}));
sorted.push.apply(sorted, optArr);
$select.children().remove();
$select.append(sorted);
}
});
return $this;
},
select2Sortable: function () {
var args = Array.prototype.slice.call(arguments, 0);
$this = this.filter('[multiple]'),
validMethods = ['destroy'];
if (args.length === 0 || typeof (args[0]) === 'object') {
var defaultOptions = {
bindOrder: 'formSubmit', // or sortableStop
sortableOptions: {
placeholder: 'ui-state-highlight',
items: 'li:not(.select2-search-field)',
tolerance: 'pointer'
}
};
var options = $.extend(defaultOptions, args[0]);
// Init select2 only if not already initialized to prevent select2 configuration loss
if (typeof ($this.data('select2')) !== 'object') {
$this.select2();
}
$this.each(function () {
var $select = $(this)
var $select2choices = $select.siblings('.select2-container').find('.select2-choices');
// Init jQuery UI Sortable
$select2choices.sortable(options.sortableOptions);
switch (options.bindOrder) {
case 'sortableStop':
// apply options ordering in sortstop event
$select2choices.on("sortstop.select2sortable", function (event, ui) {
$select.select2SortableOrder();
});
$select.on('change', function (e) {
$(this).select2SortableOrder();
});
break;
default:
// apply options ordering in form submit
$select.closest('form').unbind('submit.select2sortable').on('submit.select2sortable', function () {
$select.select2SortableOrder();
});
break;
}
});
}
else if (typeof (args[0] === 'string')) {
if ($.inArray(args[0], validMethods) == -1) {
throw "Unknown method: " + args[0];
}
if (args[0] === 'destroy') {
$this.select2SortableDestroy();
}
}
return $this;
},
select2SortableDestroy: function () {
var $this = this.filter('[multiple]');
$this.each(function () {
var $select = $(this)
var $select2choices = $select.parent().find('.select2-choices');
// unbind form submit event
$select.closest('form').unbind('submit.select2sortable');
// unbind sortstop event
$select2choices.unbind("sortstop.select2sortable");
// destroy select2Sortable
$select2choices.sortable('destroy');
});
return $this;
}
});
}(jQuery)); | ztfy.myams | /ztfy.myams-0.1.33.tar.gz/ztfy.myams-0.1.33/src/ztfy/myams/resources/js/ext/jquery-select2-sortable.js | jquery-select2-sortable.js |
!function(e,t,o,s){"use strict";var n={};n.settings={injectStyle:!0,levels:2,expandIcon:"glyphicon glyphicon-plus",collapseIcon:"glyphicon glyphicon-minus",emptyIcon:"glyphicon",nodeIcon:"",selectedIcon:"",checkedIcon:"glyphicon glyphicon-check",uncheckedIcon:"glyphicon glyphicon-unchecked",color:void 0,backColor:void 0,borderColor:void 0,onhoverColor:"#F5F5F5",selectedColor:"#FFFFFF",selectedBackColor:"#428bca",unselectableBackColor:void 0,searchResultColor:"#D9534F",searchResultBackColor:void 0,enableLinks:!1,highlightSelected:!0,highlightSearchResults:!0,showBorder:!0,showIcon:!0,showCheckbox:!1,showTags:!1,toggleUnselectable:!0,multiSelect:!1,onNodeChecked:void 0,onNodeCollapsed:void 0,onNodeDisabled:void 0,onNodeEnabled:void 0,onNodeExpanded:void 0,onNodeSelected:void 0,onNodeUnchecked:void 0,onNodeUnselected:void 0,onSearchComplete:void 0,onSearchCleared:void 0},n.options={silent:!1,ignoreChildren:!1},n.searchOptions={ignoreCase:!0,exactMatch:!1,revealResults:!0};var i=function(t,o){return this.$element=e(t),this.elementId=t.id,this.styleId=this.elementId+"-style",this.init(o),{options:this.options,init:e.proxy(this.init,this),remove:e.proxy(this.remove,this),getNode:e.proxy(this.getNode,this),getParent:e.proxy(this.getParent,this),getSiblings:e.proxy(this.getSiblings,this),getSelected:e.proxy(this.getSelected,this),getUnselected:e.proxy(this.getUnselected,this),getExpanded:e.proxy(this.getExpanded,this),getCollapsed:e.proxy(this.getCollapsed,this),getChecked:e.proxy(this.getChecked,this),getUnchecked:e.proxy(this.getUnchecked,this),getDisabled:e.proxy(this.getDisabled,this),getEnabled:e.proxy(this.getEnabled,this),selectNode:e.proxy(this.selectNode,this),unselectNode:e.proxy(this.unselectNode,this),toggleNodeSelected:e.proxy(this.toggleNodeSelected,this),collapseAll:e.proxy(this.collapseAll,this),collapseNode:e.proxy(this.collapseNode,this),expandAll:e.proxy(this.expandAll,this),expandNode:e.proxy(this.expandNode,this),toggleNodeExpanded:e.proxy(this.toggleNodeExpanded,this),revealNode:e.proxy(this.revealNode,this),checkAll:e.proxy(this.checkAll,this),checkNode:e.proxy(this.checkNode,this),uncheckAll:e.proxy(this.uncheckAll,this),uncheckNode:e.proxy(this.uncheckNode,this),toggleNodeChecked:e.proxy(this.toggleNodeChecked,this),disableAll:e.proxy(this.disableAll,this),disableNode:e.proxy(this.disableNode,this),enableAll:e.proxy(this.enableAll,this),enableNode:e.proxy(this.enableNode,this),toggleNodeDisabled:e.proxy(this.toggleNodeDisabled,this),search:e.proxy(this.search,this),clearSearch:e.proxy(this.clearSearch,this)}};i.prototype.init=function(t){this.tree=[],this.nodes=[],t.data&&("string"==typeof t.data&&(t.data=e.parseJSON(t.data)),this.tree=e.extend(!0,[],t.data),delete t.data),this.options=e.extend({},n.settings,t),this.destroy(),this.subscribeEvents(),this.setInitialStates({nodes:this.tree},0),this.render()},i.prototype.remove=function(){this.destroy(),e.removeData(this,"treeview"),e("#"+this.styleId).remove()},i.prototype.destroy=function(){this.initialized&&(this.$wrapper.remove(),this.$wrapper=null,this.unsubscribeEvents(),this.initialized=!1)},i.prototype.unsubscribeEvents=function(){this.$element.off("click"),this.$element.off("nodeChecked"),this.$element.off("nodeCollapsed"),this.$element.off("nodeDisabled"),this.$element.off("nodeEnabled"),this.$element.off("nodeExpanded"),this.$element.off("nodeSelected"),this.$element.off("nodeUnchecked"),this.$element.off("nodeUnselected"),this.$element.off("searchComplete"),this.$element.off("searchCleared")},i.prototype.subscribeEvents=function(){this.unsubscribeEvents(),this.$element.on("click",e.proxy(this.clickHandler,this)),"function"==typeof this.options.onNodeChecked&&this.$element.on("nodeChecked",this.options.onNodeChecked),"function"==typeof this.options.onNodeCollapsed&&this.$element.on("nodeCollapsed",this.options.onNodeCollapsed),"function"==typeof this.options.onNodeDisabled&&this.$element.on("nodeDisabled",this.options.onNodeDisabled),"function"==typeof this.options.onNodeEnabled&&this.$element.on("nodeEnabled",this.options.onNodeEnabled),"function"==typeof this.options.onNodeExpanded&&this.$element.on("nodeExpanded",this.options.onNodeExpanded),"function"==typeof this.options.onNodeSelected&&this.$element.on("nodeSelected",this.options.onNodeSelected),"function"==typeof this.options.onNodeUnchecked&&this.$element.on("nodeUnchecked",this.options.onNodeUnchecked),"function"==typeof this.options.onNodeUnselected&&this.$element.on("nodeUnselected",this.options.onNodeUnselected),"function"==typeof this.options.onSearchComplete&&this.$element.on("searchComplete",this.options.onSearchComplete),"function"==typeof this.options.onSearchCleared&&this.$element.on("searchCleared",this.options.onSearchCleared)},i.prototype.setInitialStates=function(t,o){if(t.nodes){o+=1;var s=t,n=this;e.each(t.nodes,function(e,t){t.nodeId=n.nodes.length,t.parentId=s.nodeId,t.hasOwnProperty("selectable")||(t.selectable=!0),t.state=t.state||{},t.state.hasOwnProperty("checked")||(t.state.checked=!1),t.state.hasOwnProperty("disabled")||(t.state.disabled=!1),t.state.hasOwnProperty("expanded")||(!t.state.disabled&&o<n.options.levels&&t.nodes&&t.nodes.length>0?t.state.expanded=!0:t.state.expanded=!1),t.state.hasOwnProperty("selected")||(t.state.selected=!1),n.nodes.push(t),t.nodes&&n.setInitialStates(t,o)})}},i.prototype.clickHandler=function(t){this.options.enableLinks||t.preventDefault();var o=e(t.target),s=this.findNode(o);if(s&&!s.state.disabled){var i=o.attr("class")?o.attr("class").split(" "):[];-1!==i.indexOf("expand-icon")?(this.toggleExpandedState(s,n.options),this.render()):-1!==i.indexOf("check-icon")?(this.toggleCheckedState(s,n.options),this.render()):(s.selectable?this.toggleSelectedState(s,n.options):this.options.toggleUnselectable&&this.toggleExpandedState(s,n.options),this.render())}},i.prototype.findNode=function(e){var t=e.closest("li.list-group-item").attr("data-nodeid"),o=this.nodes[t];return o||console.log("Error: node does not exist"),o},i.prototype.toggleExpandedState=function(e,t){e&&this.setExpandedState(e,!e.state.expanded,t)},i.prototype.setExpandedState=function(t,o,s){o!==t.state.expanded&&(o&&t.nodes?(t.state.expanded=!0,s.silent||this.$element.trigger("nodeExpanded",e.extend(!0,{},t))):o||(t.state.expanded=!1,s.silent||this.$element.trigger("nodeCollapsed",e.extend(!0,{},t)),t.nodes&&!s.ignoreChildren&&e.each(t.nodes,e.proxy(function(e,t){this.setExpandedState(t,!1,s)},this))))},i.prototype.toggleSelectedState=function(e,t){e&&this.setSelectedState(e,!e.state.selected,t)},i.prototype.setSelectedState=function(t,o,s){o!==t.state.selected&&(o?(this.options.multiSelect||e.each(this.findNodes("true","g","state.selected"),e.proxy(function(e,t){this.setSelectedState(t,!1,s)},this)),t.state.selected=!0,s.silent||this.$element.trigger("nodeSelected",e.extend(!0,{},t))):(t.state.selected=!1,s.silent||this.$element.trigger("nodeUnselected",e.extend(!0,{},t))))},i.prototype.toggleCheckedState=function(e,t){e&&this.setCheckedState(e,!e.state.checked,t)},i.prototype.setCheckedState=function(t,o,s){o!==t.state.checked&&(o?(t.state.checked=!0,s.silent||this.$element.trigger("nodeChecked",e.extend(!0,{},t))):(t.state.checked=!1,s.silent||this.$element.trigger("nodeUnchecked",e.extend(!0,{},t))))},i.prototype.setDisabledState=function(t,o,s){o!==t.state.disabled&&(o?(t.state.disabled=!0,this.setExpandedState(t,!1,s),this.setSelectedState(t,!1,s),this.setCheckedState(t,!1,s),s.silent||this.$element.trigger("nodeDisabled",e.extend(!0,{},t))):(t.state.disabled=!1,s.silent||this.$element.trigger("nodeEnabled",e.extend(!0,{},t))))},i.prototype.render=function(){this.initialized||(this.$element.addClass("treeview"),this.$wrapper=e(this.template.list),this.injectStyle(),this.initialized=!0),this.$element.empty().append(this.$wrapper.empty()),this.buildTree(this.tree,0)},i.prototype.buildTree=function(t,o){if(t){o+=1;var s=this;e.each(t,function(t,n){for(var i=e(s.template.item).addClass("node-"+s.elementId).addClass(n.state.checked?"node-checked":"").addClass(n.state.disabled?"node-disabled":"").addClass(n.state.selected?"node-selected":"").addClass(n.searchResult?"search-result":"").attr("data-nodeid",n.nodeId).attr("style",s.buildStyleOverride(n)),d=0;d<o-1;d++)i.append(s.template.indent);r=[];if(n.nodes?(r.push("expand-icon"),n.state.expanded?r.push(s.options.collapseIcon):r.push(s.options.expandIcon)):r.push(s.options.emptyIcon),i.append(e(s.template.icon).addClass(r.join(" "))),s.options.showIcon&&((r=["node-icon"]).push(n.icon||s.options.nodeIcon),n.state.selected&&(r.pop(),r.push(n.selectedIcon||s.options.selectedIcon||n.icon||s.options.nodeIcon)),i.append(e(s.template.icon).addClass(r.join(" ")))),s.options.showCheckbox){var r=["check-icon"];n.state.checked?r.push(s.options.checkedIcon):r.push(s.options.uncheckedIcon),i.append(e(s.template.icon).addClass(r.join(" ")))}if(s.options.enableLinks?i.append(e(s.template.link).attr("href",n.href).append(n.text)):i.append(n.text),s.options.showTags&&n.tags&&e.each(n.tags,function(t,o){i.append(e(s.template.badge).append(o))}),s.$wrapper.append(i),n.nodes&&n.state.expanded&&!n.state.disabled)return s.buildTree(n.nodes,o)})}},i.prototype.buildStyleOverride=function(e){if(e.state.disabled)return"";var t=e.color,o=e.backColor;return e.selectable||(this.options.unselectableColor&&(t=this.options.unselectableColor),this.options.unselectableBackColor&&(o=this.options.unselectableBackColor)),this.options.highlightSelected&&e.state.selected&&(this.options.selectedColor&&(t=this.options.selectedColor),this.options.selectedBackColor&&(o=this.options.selectedBackColor)),this.options.highlightSearchResults&&e.searchResult&&!e.state.disabled&&(this.options.searchResultColor&&(t=this.options.searchResultColor),this.options.searchResultBackColor&&(o=this.options.searchResultBackColor)),"color:"+t+";background-color:"+o+";"},i.prototype.injectStyle=function(){this.options.injectStyle&&!o.getElementById(this.styleId)&&e('<style type="text/css" id="'+this.styleId+'"> '+this.buildStyle()+" </style>").appendTo("head")},i.prototype.buildStyle=function(){var e=".node-"+this.elementId+"{";return this.options.color&&(e+="color:"+this.options.color+";"),this.options.backColor&&(e+="background-color:"+this.options.backColor+";"),this.options.showBorder?this.options.borderColor&&(e+="border:1px solid "+this.options.borderColor+";"):e+="border:none;",e+="}",this.options.onhoverColor&&(e+=".node-"+this.elementId+":not(.node-disabled):hover{background-color:"+this.options.onhoverColor+";}"),this.css+e},i.prototype.template={list:'<ul class="list-group"></ul>',item:'<li class="list-group-item"></li>',indent:'<span class="indent"></span>',icon:'<span class="icon"></span>',link:'<a href="#" style="color:inherit;"></a>',badge:'<span class="badge"></span>'},i.prototype.css=".treeview .list-group-item{cursor:pointer}.treeview span.indent{margin-left:10px;margin-right:10px}.treeview span.icon{width:12px;margin-right:5px}.treeview .node-disabled{color:silver;cursor:not-allowed}",i.prototype.getNode=function(e){return this.nodes[e]},i.prototype.getParent=function(e){var t=this.identifyNode(e);return this.nodes[t.parentId]},i.prototype.getSiblings=function(e){var t=this.identifyNode(e),o=this.getParent(t);return(o?o.nodes:this.tree).filter(function(e){return e.nodeId!==t.nodeId})},i.prototype.getSelected=function(){return this.findNodes("true","g","state.selected")},i.prototype.getUnselected=function(){return this.findNodes("false","g","state.selected")},i.prototype.getExpanded=function(){return this.findNodes("true","g","state.expanded")},i.prototype.getCollapsed=function(){return this.findNodes("false","g","state.expanded")},i.prototype.getChecked=function(){return this.findNodes("true","g","state.checked")},i.prototype.getUnchecked=function(){return this.findNodes("false","g","state.checked")},i.prototype.getDisabled=function(){return this.findNodes("true","g","state.disabled")},i.prototype.getEnabled=function(){return this.findNodes("false","g","state.disabled")},i.prototype.selectNode=function(t,o){this.forEachIdentifier(t,o,e.proxy(function(e,t){this.setSelectedState(e,!0,t)},this)),this.render()},i.prototype.unselectNode=function(t,o){this.forEachIdentifier(t,o,e.proxy(function(e,t){this.setSelectedState(e,!1,t)},this)),this.render()},i.prototype.toggleNodeSelected=function(t,o){this.forEachIdentifier(t,o,e.proxy(function(e,t){this.toggleSelectedState(e,t)},this)),this.render()},i.prototype.collapseAll=function(t){var o=this.findNodes("true","g","state.expanded");this.forEachIdentifier(o,t,e.proxy(function(e,t){this.setExpandedState(e,!1,t)},this)),this.render()},i.prototype.collapseNode=function(t,o){this.forEachIdentifier(t,o,e.proxy(function(e,t){this.setExpandedState(e,!1,t)},this)),this.render()},i.prototype.expandAll=function(t){if((t=e.extend({},n.options,t))&&t.levels)this.expandLevels(this.tree,t.levels,t);else{var o=this.findNodes("false","g","state.expanded");this.forEachIdentifier(o,t,e.proxy(function(e,t){this.setExpandedState(e,!0,t)},this))}this.render()},i.prototype.expandNode=function(t,o){this.forEachIdentifier(t,o,e.proxy(function(e,t){this.setExpandedState(e,!0,t),e.nodes&&t&&t.levels&&this.expandLevels(e.nodes,t.levels-1,t)},this)),this.render()},i.prototype.expandLevels=function(t,o,s){s=e.extend({},n.options,s),e.each(t,e.proxy(function(e,t){this.setExpandedState(t,o>0,s),t.nodes&&this.expandLevels(t.nodes,o-1,s)},this))},i.prototype.revealNode=function(t,o){this.forEachIdentifier(t,o,e.proxy(function(e,t){for(var o=this.getParent(e);o;)this.setExpandedState(o,!0,t),o=this.getParent(o)},this)),this.render()},i.prototype.toggleNodeExpanded=function(t,o){this.forEachIdentifier(t,o,e.proxy(function(e,t){this.toggleExpandedState(e,t)},this)),this.render()},i.prototype.checkAll=function(t){var o=this.findNodes("false","g","state.checked");this.forEachIdentifier(o,t,e.proxy(function(e,t){this.setCheckedState(e,!0,t)},this)),this.render()},i.prototype.checkNode=function(t,o){this.forEachIdentifier(t,o,e.proxy(function(e,t){this.setCheckedState(e,!0,t)},this)),this.render()},i.prototype.uncheckAll=function(t){var o=this.findNodes("true","g","state.checked");this.forEachIdentifier(o,t,e.proxy(function(e,t){this.setCheckedState(e,!1,t)},this)),this.render()},i.prototype.uncheckNode=function(t,o){this.forEachIdentifier(t,o,e.proxy(function(e,t){this.setCheckedState(e,!1,t)},this)),this.render()},i.prototype.toggleNodeChecked=function(t,o){this.forEachIdentifier(t,o,e.proxy(function(e,t){this.toggleCheckedState(e,t)},this)),this.render()},i.prototype.disableAll=function(t){var o=this.findNodes("false","g","state.disabled");this.forEachIdentifier(o,t,e.proxy(function(e,t){this.setDisabledState(e,!0,t)},this)),this.render()},i.prototype.disableNode=function(t,o){this.forEachIdentifier(t,o,e.proxy(function(e,t){this.setDisabledState(e,!0,t)},this)),this.render()},i.prototype.enableAll=function(t){var o=this.findNodes("true","g","state.disabled");this.forEachIdentifier(o,t,e.proxy(function(e,t){this.setDisabledState(e,!1,t)},this)),this.render()},i.prototype.enableNode=function(t,o){this.forEachIdentifier(t,o,e.proxy(function(e,t){this.setDisabledState(e,!1,t)},this)),this.render()},i.prototype.toggleNodeDisabled=function(t,o){this.forEachIdentifier(t,o,e.proxy(function(e,t){this.setDisabledState(e,!e.state.disabled,t)},this)),this.render()},i.prototype.forEachIdentifier=function(t,o,s){o=e.extend({},n.options,o),t instanceof Array||(t=[t]),e.each(t,e.proxy(function(e,t){s(this.identifyNode(t),o)},this))},i.prototype.identifyNode=function(e){return"number"==typeof e?this.nodes[e]:e},i.prototype.search=function(t,o){o=e.extend({},n.searchOptions,o),this.clearSearch({render:!1});var s=[];if(t&&t.length>0){o.exactMatch&&(t="^"+t+"$");var i="g";o.ignoreCase&&(i+="i"),s=this.findNodes(t,i),e.each(s,function(e,t){t.searchResult=!0})}return o.revealResults?this.revealNode(s):this.render(),this.$element.trigger("searchComplete",e.extend(!0,{},s)),s},i.prototype.clearSearch=function(t){t=e.extend({},{render:!0},t);var o=e.each(this.findNodes("true","g","searchResult"),function(e,t){t.searchResult=!1});t.render&&this.render(),this.$element.trigger("searchCleared",e.extend(!0,{},o))},i.prototype.findNodes=function(t,o,s){o=o||"g",s=s||"text";var n=this;return e.grep(this.nodes,function(e){var i=n.getNodeValue(e,s);if("string"==typeof i)return i.match(new RegExp(t,o))})},i.prototype.getNodeValue=function(e,t){var o=t.indexOf(".");if(o>0){var s=e[t.substring(0,o)],n=t.substring(o+1,t.length);return this.getNodeValue(s,n)}return e.hasOwnProperty(t)?e[t].toString():void 0};var d=function(e){t.console&&t.console.error(e)};e.fn.treeview=function(t,o){var s;return this.each(function(){var n=e.data(this,"treeview");"string"==typeof t?n?e.isFunction(n[t])&&"_"!==t.charAt(0)?(o instanceof Array||(o=[o]),s=n[t].apply(n,o)):d("No such method : "+t):d("Not initialized, can not call method : "+t):"boolean"==typeof t?s=n:e.data(this,"treeview",new i(this,e.extend(!0,{},t)))}),s||this}}(jQuery,window,document); | ztfy.myams | /ztfy.myams-0.1.33.tar.gz/ztfy.myams-0.1.33/src/ztfy/myams/resources/js/ext/bootstrap-treeview.min.js | bootstrap-treeview.min.js |
(function($){$.fn.editable=function(target,options){if("disable"==target){$(this).data("disabled.editable",true);return}if("enable"==target){$(this).data("disabled.editable",false);return}if("destroy"==target){$(this).unbind($(this).data("event.editable")).removeData("disabled.editable").removeData("event.editable");return}var settings=$.extend({},$.fn.editable.defaults,{target:target},options);var plugin=$.editable.types[settings.type].plugin||function(){};var submit=$.editable.types[settings.type].submit||function(){};var buttons=$.editable.types[settings.type].buttons||$.editable.types.defaults.buttons;var content=$.editable.types[settings.type].content||$.editable.types.defaults.content;var element=$.editable.types[settings.type].element||$.editable.types.defaults.element;var reset=$.editable.types[settings.type].reset||$.editable.types.defaults.reset;var callback=settings.callback||function(){};var onedit=settings.onedit||function(){};var onsubmit=settings.onsubmit||function(){};var onreset=settings.onreset||function(){};var onerror=settings.onerror||reset;if(settings.tooltip){$(this).attr("title",settings.tooltip)}settings.autowidth="auto"==settings.width;settings.autoheight="auto"==settings.height;return this.each(function(){var self=this;var savedwidth=$(self).width();var savedheight=$(self).height();$(this).data("event.editable",settings.event);if(!$.trim($(this).html())){$(this).html(settings.placeholder)}$(this).bind(settings.event,function(e){if(true===$(this).data("disabled.editable")){return}if(self.editing){return}if(false===onedit.apply(this,[settings,self])){return}e.preventDefault();e.stopPropagation();if(settings.tooltip){$(self).removeAttr("title")}if(0==$(self).width()){settings.width=savedwidth;settings.height=savedheight}else{if(settings.width!="none"){settings.width=settings.autowidth?$(self).width():settings.width}if(settings.height!="none"){settings.height=settings.autoheight?$(self).height():settings.height}}if($(this).html().toLowerCase().replace(/(;|"|\/)/g,"")==settings.placeholder.toLowerCase().replace(/(;|"|\/)/g,"")){$(this).html("")}self.editing=true;self.revert=$(self).html();$(self).html("");var form=$("<form />");if(settings.cssclass){if("inherit"==settings.cssclass){form.attr("class",$(self).attr("class"))}else{form.attr("class",settings.cssclass)}}if(settings.style){if("inherit"==settings.style){form.attr("style",$(self).attr("style"));form.css("display",$(self).css("display"))}else{form.attr("style",settings.style)}}var input=element.apply(form,[settings,self]);var input_content;if(settings.loadurl){var t=setTimeout(function(){input.disabled=true;content.apply(form,[settings.loadtext,settings,self])},100);var loaddata={};loaddata[settings.id]=self.id;if($.isFunction(settings.loaddata)){$.extend(loaddata,settings.loaddata.apply(self,[self.revert,settings]))}else{$.extend(loaddata,settings.loaddata)}$.ajax({type:settings.loadtype,url:settings.loadurl,data:loaddata,async:false,success:function(result){window.clearTimeout(t);input_content=result;input.disabled=false}})}else{if(settings.data){input_content=settings.data;if($.isFunction(settings.data)){input_content=settings.data.apply(self,[self.revert,settings])}}else{input_content=self.revert}}content.apply(form,[input_content,settings,self]);input.attr("name",settings.name);buttons.apply(form,[settings,self]);$(self).append(form);plugin.apply(form,[settings,self]);$(":input:visible:enabled:first",form).focus();if(settings.select){input.select()}input.keydown(function(e){if(e.keyCode==27){e.preventDefault();reset.apply(form,[settings,self])}});var t;if("cancel"==settings.onblur){input.blur(function(e){t=setTimeout(function(){reset.apply(form,[settings,self])},500)})}else{if("submit"==settings.onblur){input.blur(function(e){t=setTimeout(function(){form.submit()},200)})}else{if($.isFunction(settings.onblur)){input.blur(function(e){settings.onblur.apply(self,[input.val(),settings])})}else{input.blur(function(e){})}}}form.submit(function(e){if(t){clearTimeout(t)}e.preventDefault();if(false!==onsubmit.apply(form,[settings,self])){if(false!==submit.apply(form,[settings,self])){if($.isFunction(settings.target)){var str=settings.target.apply(self,[input.val(),settings]);$(self).html(str);self.editing=false;callback.apply(self,[self.innerHTML,settings]);if(!$.trim($(self).html())){$(self).html(settings.placeholder)}}else{var submitdata={};submitdata[settings.name]=input.val();submitdata[settings.id]=self.id;if($.isFunction(settings.submitdata)){$.extend(submitdata,settings.submitdata.apply(self,[self.revert,settings]))}else{$.extend(submitdata,settings.submitdata)}if("PUT"==settings.method){submitdata._method="put"}$(self).html(settings.indicator);var ajaxoptions={type:"POST",data:submitdata,dataType:"html",url:settings.target,success:function(result,status){if(ajaxoptions.dataType=="html"){$(self).html(result)}self.editing=false;callback.apply(self,[result,settings]);if(!$.trim($(self).html())){$(self).html(settings.placeholder)}},error:function(xhr,status,error){onerror.apply(form,[settings,self,xhr])}};$.extend(ajaxoptions,settings.ajaxoptions);$.ajax(ajaxoptions)}}}$(self).attr("title",settings.tooltip);return false})});this.reset=function(form){if(this.editing){if(false!==onreset.apply(form,[settings,self])){$(self).html(self.revert);self.editing=false;if(!$.trim($(self).html())){$(self).html(settings.placeholder)}if(settings.tooltip){$(self).attr("title",settings.tooltip)}}}}})};$.editable={types:{defaults:{element:function(settings,original){var input=$('<input type="hidden"></input>');$(this).append(input);return(input)},content:function(string,settings,original){$(":input:first",this).val(string)},reset:function(settings,original){original.reset(this)},buttons:function(settings,original){var form=this;if(settings.submit){if(settings.submit.match(/>$/)){var submit=$(settings.submit).click(function(){if(submit.attr("type")!="submit"){form.submit()}})}else{var submit=$('<button type="submit" />');submit.html(settings.submit)}$(this).append(submit)}if(settings.cancel){if(settings.cancel.match(/>$/)){var cancel=$(settings.cancel)}else{var cancel=$('<button type="cancel" />');cancel.html(settings.cancel)}$(this).append(cancel);$(cancel).click(function(event){if($.isFunction($.editable.types[settings.type].reset)){var reset=$.editable.types[settings.type].reset}else{var reset=$.editable.types.defaults.reset}reset.apply(form,[settings,original]);return false})}}},text:{element:function(settings,original){var input=$("<input />");if(settings.width!="none"){input.attr("width",settings.width)}if(settings.height!="none"){input.attr("height",settings.height)}input.attr("autocomplete","off");$(this).append(input);return(input)}},textarea:{element:function(settings,original){var textarea=$("<textarea />");if(settings.rows){textarea.attr("rows",settings.rows)}else{if(settings.height!="none"){textarea.height(settings.height)}}if(settings.cols){textarea.attr("cols",settings.cols)}else{if(settings.width!="none"){textarea.width(settings.width)}}$(this).append(textarea);return(textarea)}},select:{element:function(settings,original){var select=$("<select />");$(this).append(select);return(select)},content:function(data,settings,original){if(String==data.constructor){eval("var json = "+data)}else{var json=data}for(var key in json){if(!json.hasOwnProperty(key)){continue}if("selected"==key){continue}var option=$("<option />").val(key).append(json[key]);$("select",this).append(option)}$("select",this).children().each(function(){if($(this).val()==json.selected||$(this).text()==$.trim(original.revert)){$(this).attr("selected","selected")}});if(!settings.submit){var form=this;$("select",this).change(function(){form.submit()})}}}},addInputType:function(name,input){$.editable.types[name]=input}};$.fn.editable.defaults={name:"value",id:"id",type:"text",width:"auto",height:"auto",event:"click.editable",onblur:"cancel",loadtype:"GET",loadtext:"Loading...",placeholder:"Click to edit",loaddata:{},submitdata:{},ajaxoptions:{}}})(jQuery); | ztfy.myams | /ztfy.myams-0.1.33.tar.gz/ztfy.myams-0.1.33/src/ztfy/myams/resources/js/ext/jquery-jeditable.min.js | jquery-jeditable.min.js |
(function(e){var t={set:{colors:1,values:1,backgroundColor:1,scaleColors:1,normalizeFunction:1,focus:1},get:{selectedRegions:1,selectedMarkers:1,mapObject:1,regionName:1}};e.fn.vectorMap=function(e){var n,r,i,n=this.children(".jvectormap-container").data("mapObject");if(e==="addMap")jvm.WorldMap.maps[arguments[1]]=arguments[2];else{if(!(e!=="set"&&e!=="get"||!t[e][arguments[1]]))return r=arguments[1].charAt(0).toUpperCase()+arguments[1].substr(1),n[e+r].apply(n,Array.prototype.slice.call(arguments,2));e=e||{},e.container=this,n=new jvm.WorldMap(e)}return this}})(jQuery),function(e){function r(t){var n=t||window.event,r=[].slice.call(arguments,1),i=0,s=!0,o=0,u=0;return t=e.event.fix(n),t.type="mousewheel",n.wheelDelta&&(i=n.wheelDelta/120),n.detail&&(i=-n.detail/3),u=i,n.axis!==undefined&&n.axis===n.HORIZONTAL_AXIS&&(u=0,o=-1*i),n.wheelDeltaY!==undefined&&(u=n.wheelDeltaY/120),n.wheelDeltaX!==undefined&&(o=-1*n.wheelDeltaX/120),r.unshift(t,i,o,u),(e.event.dispatch||e.event.handle).apply(this,r)}var t=["DOMMouseScroll","mousewheel"];if(e.event.fixHooks)for(var n=t.length;n;)e.event.fixHooks[t[--n]]=e.event.mouseHooks;e.event.special.mousewheel={setup:function(){if(this.addEventListener)for(var e=t.length;e;)this.addEventListener(t[--e],r,!1);else this.onmousewheel=r},teardown:function(){if(this.removeEventListener)for(var e=t.length;e;)this.removeEventListener(t[--e],r,!1);else this.onmousewheel=null}},e.fn.extend({mousewheel:function(e){return e?this.bind("mousewheel",e):this.trigger("mousewheel")},unmousewheel:function(e){return this.unbind("mousewheel",e)}})}(jQuery);var jvm={inherits:function(e,t){function n(){}n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e,e.parentClass=t},mixin:function(e,t){var n;for(n in t.prototype)t.prototype.hasOwnProperty(n)&&(e.prototype[n]=t.prototype[n])},min:function(e){var t=Number.MAX_VALUE,n;if(e instanceof Array)for(n=0;n<e.length;n++)e[n]<t&&(t=e[n]);else for(n in e)e[n]<t&&(t=e[n]);return t},max:function(e){var t=Number.MIN_VALUE,n;if(e instanceof Array)for(n=0;n<e.length;n++)e[n]>t&&(t=e[n]);else for(n in e)e[n]>t&&(t=e[n]);return t},keys:function(e){var t=[],n;for(n in e)t.push(n);return t},values:function(e){var t=[],n,r;for(r=0;r<arguments.length;r++){e=arguments[r];for(n in e)t.push(e[n])}return t}};jvm.$=jQuery,jvm.AbstractElement=function(e,t){this.node=this.createElement(e),this.name=e,this.properties={},t&&this.set(t)},jvm.AbstractElement.prototype.set=function(e,t){var n;if(typeof e=="object")for(n in e)this.properties[n]=e[n],this.applyAttr(n,e[n]);else this.properties[e]=t,this.applyAttr(e,t)},jvm.AbstractElement.prototype.get=function(e){return this.properties[e]},jvm.AbstractElement.prototype.applyAttr=function(e,t){this.node.setAttribute(e,t)},jvm.AbstractElement.prototype.remove=function(){jvm.$(this.node).remove()},jvm.AbstractCanvasElement=function(e,t,n){this.container=e,this.setSize(t,n),this.rootElement=new jvm[this.classPrefix+"GroupElement"],this.node.appendChild(this.rootElement.node),this.container.appendChild(this.node)},jvm.AbstractCanvasElement.prototype.add=function(e,t){t=t||this.rootElement,t.add(e),e.canvas=this},jvm.AbstractCanvasElement.prototype.addPath=function(e,t,n){var r=new jvm[this.classPrefix+"PathElement"](e,t);return this.add(r,n),r},jvm.AbstractCanvasElement.prototype.addCircle=function(e,t,n){var r=new jvm[this.classPrefix+"CircleElement"](e,t);return this.add(r,n),r},jvm.AbstractCanvasElement.prototype.addGroup=function(e){var t=new jvm[this.classPrefix+"GroupElement"];return e?e.node.appendChild(t.node):this.node.appendChild(t.node),t.canvas=this,t},jvm.AbstractShapeElement=function(e,t,n){this.style=n||{},this.style.current={},this.isHovered=!1,this.isSelected=!1,this.updateStyle()},jvm.AbstractShapeElement.prototype.setHovered=function(e){this.isHovered!==e&&(this.isHovered=e,this.updateStyle())},jvm.AbstractShapeElement.prototype.setSelected=function(e){this.isSelected!==e&&(this.isSelected=e,this.updateStyle(),jvm.$(this.node).trigger("selected",[e]))},jvm.AbstractShapeElement.prototype.setStyle=function(e,t){var n={};typeof e=="object"?n=e:n[e]=t,jvm.$.extend(this.style.current,n),this.updateStyle()},jvm.AbstractShapeElement.prototype.updateStyle=function(){var e={};jvm.AbstractShapeElement.mergeStyles(e,this.style.initial),jvm.AbstractShapeElement.mergeStyles(e,this.style.current),this.isHovered&&jvm.AbstractShapeElement.mergeStyles(e,this.style.hover),this.isSelected&&(jvm.AbstractShapeElement.mergeStyles(e,this.style.selected),this.isHovered&&jvm.AbstractShapeElement.mergeStyles(e,this.style.selectedHover)),this.set(e)},jvm.AbstractShapeElement.mergeStyles=function(e,t){var n;t=t||{};for(n in t)t[n]===null?delete e[n]:e[n]=t[n]},jvm.SVGElement=function(e,t){jvm.SVGElement.parentClass.apply(this,arguments)},jvm.inherits(jvm.SVGElement,jvm.AbstractElement),jvm.SVGElement.svgns="http://www.w3.org/2000/svg",jvm.SVGElement.prototype.createElement=function(e){return document.createElementNS(jvm.SVGElement.svgns,e)},jvm.SVGElement.prototype.addClass=function(e){this.node.setAttribute("class",e)},jvm.SVGElement.prototype.getElementCtr=function(e){return jvm["SVG"+e]},jvm.SVGElement.prototype.getBBox=function(){return this.node.getBBox()},jvm.SVGGroupElement=function(){jvm.SVGGroupElement.parentClass.call(this,"g")},jvm.inherits(jvm.SVGGroupElement,jvm.SVGElement),jvm.SVGGroupElement.prototype.add=function(e){this.node.appendChild(e.node)},jvm.SVGCanvasElement=function(e,t,n){this.classPrefix="SVG",jvm.SVGCanvasElement.parentClass.call(this,"svg"),jvm.AbstractCanvasElement.apply(this,arguments)},jvm.inherits(jvm.SVGCanvasElement,jvm.SVGElement),jvm.mixin(jvm.SVGCanvasElement,jvm.AbstractCanvasElement),jvm.SVGCanvasElement.prototype.setSize=function(e,t){this.width=e,this.height=t,this.node.setAttribute("width",e),this.node.setAttribute("height",t)},jvm.SVGCanvasElement.prototype.applyTransformParams=function(e,t,n){this.scale=e,this.transX=t,this.transY=n,this.rootElement.node.setAttribute("transform","scale("+e+") translate("+t+", "+n+")")},jvm.SVGShapeElement=function(e,t,n){jvm.SVGShapeElement.parentClass.call(this,e,t),jvm.AbstractShapeElement.apply(this,arguments)},jvm.inherits(jvm.SVGShapeElement,jvm.SVGElement),jvm.mixin(jvm.SVGShapeElement,jvm.AbstractShapeElement),jvm.SVGPathElement=function(e,t){jvm.SVGPathElement.parentClass.call(this,"path",e,t),this.node.setAttribute("fill-rule","evenodd")},jvm.inherits(jvm.SVGPathElement,jvm.SVGShapeElement),jvm.SVGCircleElement=function(e,t){jvm.SVGCircleElement.parentClass.call(this,"circle",e,t)},jvm.inherits(jvm.SVGCircleElement,jvm.SVGShapeElement),jvm.VMLElement=function(e,t){jvm.VMLElement.VMLInitialized||jvm.VMLElement.initializeVML(),jvm.VMLElement.parentClass.apply(this,arguments)},jvm.inherits(jvm.VMLElement,jvm.AbstractElement),jvm.VMLElement.VMLInitialized=!1,jvm.VMLElement.initializeVML=function(){try{document.namespaces.rvml||document.namespaces.add("rvml","urn:schemas-microsoft-com:vml"),jvm.VMLElement.prototype.createElement=function(e){return document.createElement("<rvml:"+e+' class="rvml">')}}catch(e){jvm.VMLElement.prototype.createElement=function(e){return document.createElement("<"+e+' xmlns="urn:schemas-microsoft.com:vml" class="rvml">')}}document.createStyleSheet().addRule(".rvml","behavior:url(#default#VML)"),jvm.VMLElement.VMLInitialized=!0},jvm.VMLElement.prototype.getElementCtr=function(e){return jvm["VML"+e]},jvm.VMLElement.prototype.addClass=function(e){jvm.$(this.node).addClass(e)},jvm.VMLElement.prototype.applyAttr=function(e,t){this.node[e]=t},jvm.VMLElement.prototype.getBBox=function(){var e=jvm.$(this.node);return{x:e.position().left/this.canvas.scale,y:e.position().top/this.canvas.scale,width:e.width()/this.canvas.scale,height:e.height()/this.canvas.scale}},jvm.VMLGroupElement=function(){jvm.VMLGroupElement.parentClass.call(this,"group"),this.node.style.left="0px",this.node.style.top="0px",this.node.coordorigin="0 0"},jvm.inherits(jvm.VMLGroupElement,jvm.VMLElement),jvm.VMLGroupElement.prototype.add=function(e){this.node.appendChild(e.node)},jvm.VMLCanvasElement=function(e,t,n){this.classPrefix="VML",jvm.VMLCanvasElement.parentClass.call(this,"group"),jvm.AbstractCanvasElement.apply(this,arguments),this.node.style.position="absolute"},jvm.inherits(jvm.VMLCanvasElement,jvm.VMLElement),jvm.mixin(jvm.VMLCanvasElement,jvm.AbstractCanvasElement),jvm.VMLCanvasElement.prototype.setSize=function(e,t){var n,r,i,s;this.width=e,this.height=t,this.node.style.width=e+"px",this.node.style.height=t+"px",this.node.coordsize=e+" "+t,this.node.coordorigin="0 0";if(this.rootElement){n=this.rootElement.node.getElementsByTagName("shape");for(i=0,s=n.length;i<s;i++)n[i].coordsize=e+" "+t,n[i].style.width=e+"px",n[i].style.height=t+"px";r=this.node.getElementsByTagName("group");for(i=0,s=r.length;i<s;i++)r[i].coordsize=e+" "+t,r[i].style.width=e+"px",r[i].style.height=t+"px"}},jvm.VMLCanvasElement.prototype.applyTransformParams=function(e,t,n){this.scale=e,this.transX=t,this.transY=n,this.rootElement.node.coordorigin=this.width-t-this.width/100+","+(this.height-n-this.height/100),this.rootElement.node.coordsize=this.width/e+","+this.height/e},jvm.VMLShapeElement=function(e,t){jvm.VMLShapeElement.parentClass.call(this,e,t),this.fillElement=new jvm.VMLElement("fill"),this.strokeElement=new jvm.VMLElement("stroke"),this.node.appendChild(this.fillElement.node),this.node.appendChild(this.strokeElement.node),this.node.stroked=!1,jvm.AbstractShapeElement.apply(this,arguments)},jvm.inherits(jvm.VMLShapeElement,jvm.VMLElement),jvm.mixin(jvm.VMLShapeElement,jvm.AbstractShapeElement),jvm.VMLShapeElement.prototype.applyAttr=function(e,t){switch(e){case"fill":this.node.fillcolor=t;break;case"fill-opacity":this.fillElement.node.opacity=Math.round(t*100)+"%";break;case"stroke":t==="none"?this.node.stroked=!1:this.node.stroked=!0,this.node.strokecolor=t;break;case"stroke-opacity":this.strokeElement.node.opacity=Math.round(t*100)+"%";break;case"stroke-width":parseInt(t,10)===0?this.node.stroked=!1:this.node.stroked=!0,this.node.strokeweight=t;break;case"d":this.node.path=jvm.VMLPathElement.pathSvgToVml(t);break;default:jvm.VMLShapeElement.parentClass.prototype.applyAttr.apply(this,arguments)}},jvm.VMLPathElement=function(e,t){var n=new jvm.VMLElement("skew");jvm.VMLPathElement.parentClass.call(this,"shape",e,t),this.node.coordorigin="0 0",n.node.on=!0,n.node.matrix="0.01,0,0,0.01,0,0",n.node.offset="0,0",this.node.appendChild(n.node)},jvm.inherits(jvm.VMLPathElement,jvm.VMLShapeElement),jvm.VMLPathElement.prototype.applyAttr=function(e,t){e==="d"?this.node.path=jvm.VMLPathElement.pathSvgToVml(t):jvm.VMLShapeElement.prototype.applyAttr.call(this,e,t)},jvm.VMLPathElement.pathSvgToVml=function(e){var t="",n=0,r=0,i,s;return e=e.replace(/(-?\d+)e(-?\d+)/g,"0"),e.replace(/([MmLlHhVvCcSs])\s*((?:-?\d*(?:\.\d+)?\s*,?\s*)+)/g,function(e,t,o,u){o=o.replace(/(\d)-/g,"$1,-").replace(/^\s+/g,"").replace(/\s+$/g,"").replace(/\s+/g,",").split(","),o[0]||o.shift();for(var a=0,f=o.length;a<f;a++)o[a]=Math.round(100*o[a]);switch(t){case"m":return n+=o[0],r+=o[1],"t"+o.join(",");case"M":return n=o[0],r=o[1],"m"+o.join(",");case"l":return n+=o[0],r+=o[1],"r"+o.join(",");case"L":return n=o[0],r=o[1],"l"+o.join(",");case"h":return n+=o[0],"r"+o[0]+",0";case"H":return n=o[0],"l"+n+","+r;case"v":return r+=o[0],"r0,"+o[0];case"V":return r=o[0],"l"+n+","+r;case"c":return i=n+o[o.length-4],s=r+o[o.length-3],n+=o[o.length-2],r+=o[o.length-1],"v"+o.join(",");case"C":return i=o[o.length-4],s=o[o.length-3],n=o[o.length-2],r=o[o.length-1],"c"+o.join(",");case"s":return o.unshift(r-s),o.unshift(n-i),i=n+o[o.length-4],s=r+o[o.length-3],n+=o[o.length-2],r+=o[o.length-1],"v"+o.join(",");case"S":return o.unshift(r+r-s),o.unshift(n+n-i),i=o[o.length-4],s=o[o.length-3],n=o[o.length-2],r=o[o.length-1],"c"+o.join(",")}return""}).replace(/z/g,"e")},jvm.VMLCircleElement=function(e,t){jvm.VMLCircleElement.parentClass.call(this,"oval",e,t)},jvm.inherits(jvm.VMLCircleElement,jvm.VMLShapeElement),jvm.VMLCircleElement.prototype.applyAttr=function(e,t){switch(e){case"r":this.node.style.width=t*2+"px",this.node.style.height=t*2+"px",this.applyAttr("cx",this.get("cx")||0),this.applyAttr("cy",this.get("cy")||0);break;case"cx":if(!t)return;this.node.style.left=t-(this.get("r")||0)+"px";break;case"cy":if(!t)return;this.node.style.top=t-(this.get("r")||0)+"px";break;default:jvm.VMLCircleElement.parentClass.prototype.applyAttr.call(this,e,t)}},jvm.VectorCanvas=function(e,t,n){return this.mode=window.SVGAngle?"svg":"vml",this.mode=="svg"?this.impl=new jvm.SVGCanvasElement(e,t,n):this.impl=new jvm.VMLCanvasElement(e,t,n),this.impl},jvm.SimpleScale=function(e){this.scale=e},jvm.SimpleScale.prototype.getValue=function(e){return e},jvm.OrdinalScale=function(e){this.scale=e},jvm.OrdinalScale.prototype.getValue=function(e){return this.scale[e]},jvm.NumericScale=function(e,t,n,r){this.scale=[],t=t||"linear",e&&this.setScale(e),t&&this.setNormalizeFunction(t),n&&this.setMin(n),r&&this.setMax(r)},jvm.NumericScale.prototype={setMin:function(e){this.clearMinValue=e,typeof this.normalize=="function"?this.minValue=this.normalize(e):this.minValue=e},setMax:function(e){this.clearMaxValue=e,typeof this.normalize=="function"?this.maxValue=this.normalize(e):this.maxValue=e},setScale:function(e){var t;for(t=0;t<e.length;t++)this.scale[t]=[e[t]]},setNormalizeFunction:function(e){e==="polynomial"?this.normalize=function(e){return Math.pow(e,.2)}:e==="linear"?delete this.normalize:this.normalize=e,this.setMin(this.clearMinValue),this.setMax(this.clearMaxValue)},getValue:function(e){var t=[],n=0,r,i=0,s;typeof this.normalize=="function"&&(e=this.normalize(e));for(i=0;i<this.scale.length-1;i++)r=this.vectorLength(this.vectorSubtract(this.scale[i+1],this.scale[i])),t.push(r),n+=r;s=(this.maxValue-this.minValue)/n;for(i=0;i<t.length;i++)t[i]*=s;i=0,e-=this.minValue;while(e-t[i]>=0)e-=t[i],i++;return i==this.scale.length-1?e=this.vectorToNum(this.scale[i]):e=this.vectorToNum(this.vectorAdd(this.scale[i],this.vectorMult(this.vectorSubtract(this.scale[i+1],this.scale[i]),e/t[i]))),e},vectorToNum:function(e){var t=0,n;for(n=0;n<e.length;n++)t+=Math.round(e[n])*Math.pow(256,e.length-n-1);return t},vectorSubtract:function(e,t){var n=[],r;for(r=0;r<e.length;r++)n[r]=e[r]-t[r];return n},vectorAdd:function(e,t){var n=[],r;for(r=0;r<e.length;r++)n[r]=e[r]+t[r];return n},vectorMult:function(e,t){var n=[],r;for(r=0;r<e.length;r++)n[r]=e[r]*t;return n},vectorLength:function(e){var t=0,n;for(n=0;n<e.length;n++)t+=e[n]*e[n];return Math.sqrt(t)}},jvm.ColorScale=function(e,t,n,r){jvm.ColorScale.parentClass.apply(this,arguments)},jvm.inherits(jvm.ColorScale,jvm.NumericScale),jvm.ColorScale.prototype.setScale=function(e){var t;for(t=0;t<e.length;t++)this.scale[t]=jvm.ColorScale.rgbToArray(e[t])},jvm.ColorScale.prototype.getValue=function(e){return jvm.ColorScale.numToRgb(jvm.ColorScale.parentClass.prototype.getValue.call(this,e))},jvm.ColorScale.arrayToRgb=function(e){var t="#",n,r;for(r=0;r<e.length;r++)n=e[r].toString(16),t+=n.length==1?"0"+n:n;return t},jvm.ColorScale.numToRgb=function(e){e=e.toString(16);while(e.length<6)e="0"+e;return"#"+e},jvm.ColorScale.rgbToArray=function(e){return e=e.substr(1),[parseInt(e.substr(0,2),16),parseInt(e.substr(2,2),16),parseInt(e.substr(4,2),16)]},jvm.DataSeries=function(e,t){var n;e=e||{},e.attribute=e.attribute||"fill",this.elements=t,this.params=e,e.attributes&&this.setAttributes(e.attributes),jvm.$.isArray(e.scale)?(n=e.attribute==="fill"||e.attribute==="stroke"?jvm.ColorScale:jvm.NumericScale,this.scale=new n(e.scale,e.normalizeFunction,e.min,e.max)):e.scale?this.scale=new jvm.OrdinalScale(e.scale):this.scale=new jvm.SimpleScale(e.scale),this.values=e.values||{},this.setValues(this.values)},jvm.DataSeries.prototype={setAttributes:function(e,t){var n=e,r;if(typeof e=="string")this.elements[e]&&this.elements[e].setStyle(this.params.attribute,t);else for(r in n)this.elements[r]&&this.elements[r].element.setStyle(this.params.attribute,n[r])},setValues:function(e){var t=Number.MIN_VALUE,n=Number.MAX_VALUE,r,i,s={};if(this.scale instanceof jvm.OrdinalScale||this.scale instanceof jvm.SimpleScale)for(i in e)e[i]?s[i]=this.scale.getValue(e[i]):s[i]=this.elements[i].element.style.initial[this.params.attribute];else{if(!this.params.min||!this.params.max){for(i in e)r=parseFloat(e[i]),r>t&&(t=e[i]),r<n&&(n=r);this.params.min||this.scale.setMin(n),this.params.max||this.scale.setMax(t),this.params.min=n,this.params.max=t}for(i in e)r=parseFloat(e[i]),isNaN(r)?s[i]=this.elements[i].element.style.initial[this.params.attribute]:s[i]=this.scale.getValue(r)}this.setAttributes(s),jvm.$.extend(this.values,e)},clear:function(){var e,t={};for(e in this.values)this.elements[e]&&(t[e]=this.elements[e].element.style.initial[this.params.attribute]);this.setAttributes(t),this.values={}},setScale:function(e){this.scale.setScale(e),this.values&&this.setValues(this.values)},setNormalizeFunction:function(e){this.scale.setNormalizeFunction(e),this.values&&this.setValues(this.values)}},jvm.Proj={degRad:180/Math.PI,radDeg:Math.PI/180,radius:6381372,sgn:function(e){return e>0?1:e<0?-1:e},mill:function(e,t,n){return{x:this.radius*(t-n)*this.radDeg,y:-this.radius*Math.log(Math.tan((45+.4*e)*this.radDeg))/.8}},mill_inv:function(e,t,n){return{lat:(2.5*Math.atan(Math.exp(.8*t/this.radius))-5*Math.PI/8)*this.degRad,lng:(n*this.radDeg+e/this.radius)*this.degRad}},merc:function(e,t,n){return{x:this.radius*(t-n)*this.radDeg,y:-this.radius*Math.log(Math.tan(Math.PI/4+e*Math.PI/360))}},merc_inv:function(e,t,n){return{lat:(2*Math.atan(Math.exp(t/this.radius))-Math.PI/2)*this.degRad,lng:(n*this.radDeg+e/this.radius)*this.degRad}},aea:function(e,t,n){var r=0,i=n*this.radDeg,s=29.5*this.radDeg,o=45.5*this.radDeg,u=e*this.radDeg,a=t*this.radDeg,f=(Math.sin(s)+Math.sin(o))/2,l=Math.cos(s)*Math.cos(s)+2*f*Math.sin(s),c=f*(a-i),h=Math.sqrt(l-2*f*Math.sin(u))/f,p=Math.sqrt(l-2*f*Math.sin(r))/f;return{x:h*Math.sin(c)*this.radius,y:-(p-h*Math.cos(c))*this.radius}},aea_inv:function(e,t,n){var r=e/this.radius,i=t/this.radius,s=0,o=n*this.radDeg,u=29.5*this.radDeg,a=45.5*this.radDeg,f=(Math.sin(u)+Math.sin(a))/2,l=Math.cos(u)*Math.cos(u)+2*f*Math.sin(u),c=Math.sqrt(l-2*f*Math.sin(s))/f,h=Math.sqrt(r*r+(c-i)*(c-i)),p=Math.atan(r/(c-i));return{lat:Math.asin((l-h*h*f*f)/(2*f))*this.degRad,lng:(o+p/f)*this.degRad}},lcc:function(e,t,n){var r=0,i=n*this.radDeg,s=t*this.radDeg,o=33*this.radDeg,u=45*this.radDeg,a=e*this.radDeg,f=Math.log(Math.cos(o)*(1/Math.cos(u)))/Math.log(Math.tan(Math.PI/4+u/2)*(1/Math.tan(Math.PI/4+o/2))),l=Math.cos(o)*Math.pow(Math.tan(Math.PI/4+o/2),f)/f,c=l*Math.pow(1/Math.tan(Math.PI/4+a/2),f),h=l*Math.pow(1/Math.tan(Math.PI/4+r/2),f);return{x:c*Math.sin(f*(s-i))*this.radius,y:-(h-c*Math.cos(f*(s-i)))*this.radius}},lcc_inv:function(e,t,n){var r=e/this.radius,i=t/this.radius,s=0,o=n*this.radDeg,u=33*this.radDeg,a=45*this.radDeg,f=Math.log(Math.cos(u)*(1/Math.cos(a)))/Math.log(Math.tan(Math.PI/4+a/2)*(1/Math.tan(Math.PI/4+u/2))),l=Math.cos(u)*Math.pow(Math.tan(Math.PI/4+u/2),f)/f,c=l*Math.pow(1/Math.tan(Math.PI/4+s/2),f),h=this.sgn(f)*Math.sqrt(r*r+(c-i)*(c-i)),p=Math.atan(r/(c-i));return{lat:(2*Math.atan(Math.pow(l/h,1/f))-Math.PI/2)*this.degRad,lng:(o+p/f)*this.degRad}}},jvm.WorldMap=function(e){var t=this,n;this.params=jvm.$.extend(!0,{},jvm.WorldMap.defaultParams,e);if(!jvm.WorldMap.maps[this.params.map])throw new Error("Attempt to use map which was not loaded: "+this.params.map);this.mapData=jvm.WorldMap.maps[this.params.map],this.markers={},this.regions={},this.regionsColors={},this.regionsData={},this.container=jvm.$("<div>").css({width:"100%",height:"100%"}).addClass("jvectormap-container"),this.params.container.append(this.container),this.container.data("mapObject",this),this.container.css({position:"relative",overflow:"hidden"}),this.defaultWidth=this.mapData.width,this.defaultHeight=this.mapData.height,this.setBackgroundColor(this.params.backgroundColor),this.onResize=function(){t.setSize()},jvm.$(window).resize(this.onResize);for(n in jvm.WorldMap.apiEvents)this.params[n]&&this.container.bind(jvm.WorldMap.apiEvents[n]+".jvectormap",this.params[n]);this.canvas=new jvm.VectorCanvas(this.container[0],this.width,this.height),"ontouchstart"in window||window.DocumentTouch&&document instanceof DocumentTouch?this.params.bindTouchEvents&&this.bindContainerTouchEvents():this.bindContainerEvents(),this.bindElementEvents(),this.createLabel(),this.params.zoomButtons&&this.bindZoomButtons(),this.createRegions(),this.createMarkers(this.params.markers||{}),this.setSize(),this.params.focusOn&&(typeof this.params.focusOn=="object"?this.setFocus.call(this,this.params.focusOn.scale,this.params.focusOn.x,this.params.focusOn.y):this.setFocus.call(this,this.params.focusOn)),this.params.selectedRegions&&this.setSelectedRegions(this.params.selectedRegions),this.params.selectedMarkers&&this.setSelectedMarkers(this.params.selectedMarkers),this.params.series&&this.createSeries()},jvm.WorldMap.prototype={transX:0,transY:0,scale:1,baseTransX:0,baseTransY:0,baseScale:1,width:0,height:0,setBackgroundColor:function(e){this.container.css("background-color",e)},resize:function(){var e=this.baseScale;this.width/this.height>this.defaultWidth/this.defaultHeight?(this.baseScale=this.height/this.defaultHeight,this.baseTransX=Math.abs(this.width-this.defaultWidth*this.baseScale)/(2*this.baseScale)):(this.baseScale=this.width/this.defaultWidth,this.baseTransY=Math.abs(this.height-this.defaultHeight*this.baseScale)/(2*this.baseScale)),this.scale*=this.baseScale/e,this.transX*=this.baseScale/e,this.transY*=this.baseScale/e},setSize:function(){this.width=this.container.width(),this.height=this.container.height(),this.resize(),this.canvas.setSize(this.width,this.height),this.applyTransform()},reset:function(){var e,t;for(e in this.series)for(t=0;t<this.series[e].length;t++)this.series[e][t].clear();this.scale=this.baseScale,this.transX=this.baseTransX,this.transY=this.baseTransY,this.applyTransform()},applyTransform:function(){var e,t,n,r;this.defaultWidth*this.scale<=this.width?(e=(this.width-this.defaultWidth*this.scale)/(2*this.scale),n=(this.width-this.defaultWidth*this.scale)/(2*this.scale)):(e=0,n=(this.width-this.defaultWidth*this.scale)/this.scale),this.defaultHeight*this.scale<=this.height?(t=(this.height-this.defaultHeight*this.scale)/(2*this.scale),r=(this.height-this.defaultHeight*this.scale)/(2*this.scale)):(t=0,r=(this.height-this.defaultHeight*this.scale)/this.scale),this.transY>t?this.transY=t:this.transY<r&&(this.transY=r),this.transX>e?this.transX=e:this.transX<n&&(this.transX=n),this.canvas.applyTransformParams(this.scale,this.transX,this.transY),this.markers&&this.repositionMarkers(),this.container.trigger("viewportChange",[this.scale/this.baseScale,this.transX,this.transY])},bindContainerEvents:function(){var e=!1,t,n,r=this;this.container.mousemove(function(i){return e&&(r.transX-=(t-i.pageX)/r.scale,r.transY-=(n-i.pageY)/r.scale,r.applyTransform(),t=i.pageX,n=i.pageY),!1}).mousedown(function(r){return e=!0,t=r.pageX,n=r.pageY,!1}),jvm.$("body").mouseup(function(){e=!1}),this.params.zoomOnScroll&&this.container.mousewheel(function(e,t,n,i){var s=jvm.$(r.container).offset(),o=e.pageX-s.left,u=e.pageY-s.top,a=Math.pow(1.3,i);r.label.hide(),r.setScale(r.scale*a,o,u),e.preventDefault()})},bindContainerTouchEvents:function(){var e,t,n=this,r,i,s,o,u,a=function(a){var f=a.originalEvent.touches,l,c,h,p;a.type=="touchstart"&&(u=0),f.length==1?(u==1&&(h=n.transX,p=n.transY,n.transX-=(r-f[0].pageX)/n.scale,n.transY-=(i-f[0].pageY)/n.scale,n.applyTransform(),n.label.hide(),(h!=n.transX||p!=n.transY)&&a.preventDefault()),r=f[0].pageX,i=f[0].pageY):f.length==2&&(u==2?(c=Math.sqrt(Math.pow(f[0].pageX-f[1].pageX,2)+Math.pow(f[0].pageY-f[1].pageY,2))/t,n.setScale(e*c,s,o),n.label.hide(),a.preventDefault()):(l=jvm.$(n.container).offset(),f[0].pageX>f[1].pageX?s=f[1].pageX+(f[0].pageX-f[1].pageX)/2:s=f[0].pageX+(f[1].pageX-f[0].pageX)/2,f[0].pageY>f[1].pageY?o=f[1].pageY+(f[0].pageY-f[1].pageY)/2:o=f[0].pageY+(f[1].pageY-f[0].pageY)/2,s-=l.left,o-=l.top,e=n.scale,t=Math.sqrt(Math.pow(f[0].pageX-f[1].pageX,2)+Math.pow(f[0].pageY-f[1].pageY,2)))),u=f.length};jvm.$(this.container).bind("touchstart",a),jvm.$(this.container).bind("touchmove",a)},bindElementEvents:function(){var e=this,t;this.container.mousemove(function(){t=!0}),this.container.delegate("[class~='jvectormap-element']","mouseover mouseout",function(t){var n=this,r=jvm.$(this).attr("class").baseVal?jvm.$(this).attr("class").baseVal:jvm.$(this).attr("class"),i=r.indexOf("jvectormap-region")===-1?"marker":"region",s=i=="region"?jvm.$(this).attr("data-code"):jvm.$(this).attr("data-index"),o=i=="region"?e.regions[s].element:e.markers[s].element,u=i=="region"?e.mapData.paths[s].name:e.markers[s].config.name||"",a=jvm.$.Event(i+"LabelShow.jvectormap"),f=jvm.$.Event(i+"Over.jvectormap");t.type=="mouseover"?(e.container.trigger(f,[s]),f.isDefaultPrevented()||o.setHovered(!0),e.label.text(u),e.container.trigger(a,[e.label,s]),a.isDefaultPrevented()||(e.label.show(),e.labelWidth=e.label.width(),e.labelHeight=e.label.height())):(o.setHovered(!1),e.label.hide(),e.container.trigger(i+"Out.jvectormap",[s]))}),this.container.delegate("[class~='jvectormap-element']","mousedown",function(e){t=!1}),this.container.delegate("[class~='jvectormap-element']","mouseup",function(n){var r=this,i=jvm.$(this).attr("class").baseVal?jvm.$(this).attr("class").baseVal:jvm.$(this).attr("class"),s=i.indexOf("jvectormap-region")===-1?"marker":"region",o=s=="region"?jvm.$(this).attr("data-code"):jvm.$(this).attr("data-index"),u=jvm.$.Event(s+"Click.jvectormap"),a=s=="region"?e.regions[o].element:e.markers[o].element;if(!t){e.container.trigger(u,[o]);if(s==="region"&&e.params.regionsSelectable||s==="marker"&&e.params.markersSelectable)u.isDefaultPrevented()||(e.params[s+"sSelectableOne"]&&e.clearSelected(s+"s"),a.setSelected(!a.isSelected))}})},bindZoomButtons:function(){var e=this;jvm.$("<div/>").addClass("jvectormap-zoomin").html("<i class='fa fa-plus'></i>").appendTo(this.container),jvm.$("<div/>").addClass("jvectormap-zoomout").html("<i class='fa fa-minus'></i>").appendTo(this.container),this.container.find(".jvectormap-zoomin").click(function(){e.setScale(e.scale*e.params.zoomStep,e.width/2,e.height/2)}),this.container.find(".jvectormap-zoomout").click(function(){e.setScale(e.scale/e.params.zoomStep,e.width/2,e.height/2)})},createLabel:function(){var e=this;this.label=jvm.$("<div/>").addClass("jvectormap-label").appendTo(jvm.$("body")),this.container.mousemove(function(t){var n=t.pageX-15-e.labelWidth,r=t.pageY-15-e.labelHeight;n<5&&(n=t.pageX+15),r<5&&(r=t.pageY+15),e.label.is(":visible")&&e.label.css({left:n,top:r})})},setScale:function(e,t,n,r){var i,s=jvm.$.Event("zoom.jvectormap");e>this.params.zoomMax*this.baseScale?e=this.params.zoomMax*this.baseScale:e<this.params.zoomMin*this.baseScale&&(e=this.params.zoomMin*this.baseScale),typeof t!="undefined"&&typeof n!="undefined"&&(i=e/this.scale,r?(this.transX=t+this.defaultWidth*(this.width/(this.defaultWidth*e))/2,this.transY=n+this.defaultHeight*(this.height/(this.defaultHeight*e))/2):(this.transX-=(i-1)/e*t,this.transY-=(i-1)/e*n)),this.scale=e,this.applyTransform(),this.container.trigger(s,[e/this.baseScale])},setFocus:function(e,t,n){var r,i,s,o,u;if(jvm.$.isArray(e)||this.regions[e]){jvm.$.isArray(e)?o=e:o=[e];for(u=0;u<o.length;u++)this.regions[o[u]]&&(i=this.regions[o[u]].element.getBBox(),i&&(typeof r=="undefined"?r=i:(s={x:Math.min(r.x,i.x),y:Math.min(r.y,i.y),width:Math.max(r.x+r.width,i.x+i.width)-Math.min(r.x,i.x),height:Math.max(r.y+r.height,i.y+i.height)-Math.min(r.y,i.y)},r=s)));this.setScale(Math.min(this.width/r.width,this.height/r.height),-(r.x+r.width/2),-(r.y+r.height/2),!0)}else e*=this.baseScale,this.setScale(e,-t*this.defaultWidth,-n*this.defaultHeight,!0)},getSelected:function(e){var t,n=[];for(t in this[e])this[e][t].element.isSelected&&n.push(t);return n},getSelectedRegions:function(){return this.getSelected("regions")},getSelectedMarkers:function(){return this.getSelected("markers")},setSelected:function(e,t){var n;typeof t!="object"&&(t=[t]);if(jvm.$.isArray(t))for(n=0;n<t.length;n++)this[e][t[n]].element.setSelected(!0);else for(n in t)this[e][n].element.setSelected(!!t[n])},setSelectedRegions:function(e){this.setSelected("regions",e)},setSelectedMarkers:function(e){this.setSelected("markers",e)},clearSelected:function(e){var t={},n=this.getSelected(e),r;for(r=0;r<n.length;r++)t[n[r]]=!1;this.setSelected(e,t)},clearSelectedRegions:function(){this.clearSelected("regions")},clearSelectedMarkers:function(){this.clearSelected("markers")},getMapObject:function(){return this},getRegionName:function(e){return this.mapData.paths[e].name},createRegions:function(){var e,t,n=this;for(e in this.mapData.paths)t=this.canvas.addPath({d:this.mapData.paths[e].path,"data-code":e},jvm.$.extend(!0,{},this.params.regionStyle)),jvm.$(t.node).bind("selected",function(e,t){n.container.trigger("regionSelected.jvectormap",[jvm.$(this).attr("data-code"),t,n.getSelectedRegions()])}),t.addClass("jvectormap-region jvectormap-element"),this.regions[e]={element:t,config:this.mapData.paths[e]}},createMarkers:function(e){var t,n,r,i,s,o=this;this.markersGroup=this.markersGroup||this.canvas.addGroup();if(jvm.$.isArray(e)){s=e.slice(),e={};for(t=0;t<s.length;t++)e[t]=s[t]}for(t in e)i=e[t]instanceof Array?{latLng:e[t]}:e[t],r=this.getMarkerPosition(i),r!==!1&&(n=this.canvas.addCircle({"data-index":t,cx:r.x,cy:r.y},jvm.$.extend(!0,{},this.params.markerStyle,{initial:i.style||{}}),this.markersGroup),n.addClass("jvectormap-marker jvectormap-element"),jvm.$(n.node).bind("selected",function(e,t){o.container.trigger("markerSelected.jvectormap",[jvm.$(this).attr("data-index"),t,o.getSelectedMarkers()])}),this.markers[t]&&this.removeMarkers([t]),this.markers[t]={element:n,config:i})},repositionMarkers:function(){var e,t;for(e in this.markers)t=this.getMarkerPosition(this.markers[e].config),t!==!1&&this.markers[e].element.setStyle({cx:t.x,cy:t.y})},getMarkerPosition:function(e){return jvm.WorldMap.maps[this.params.map].projection?this.latLngToPoint.apply(this,e.latLng||[0,0]):{x:e.coords[0]*this.scale+this.transX*this.scale,y:e.coords[1]*this.scale+this.transY*this.scale}},addMarker:function(e,t,n){var r={},i=[],s,o,n=n||[];r[e]=t;for(o=0;o<n.length;o++)s={},s[e]=n[o],i.push(s);this.addMarkers(r,i)},addMarkers:function(e,t){var n;t=t||[],this.createMarkers(e);for(n=0;n<t.length;n++)this.series.markers[n].setValues(t[n]||{})},removeMarkers:function(e){var t;for(t=0;t<e.length;t++)this.markers[e[t]].element.remove(),delete this.markers[e[t]]},removeAllMarkers:function(){var e,t=[];for(e in this.markers)t.push(e);this.removeMarkers(t)},latLngToPoint:function(e,t){var n,r=jvm.WorldMap.maps[this.params.map].projection,i=r.centralMeridian,s=this.width-this.baseTransX*2*this.baseScale,o=this.height-this.baseTransY*2*this.baseScale,u,a,f=this.scale/this.baseScale;return t<-180+i&&(t+=360),n=jvm.Proj[r.type](e,t,i),u=this.getInsetForPoint(n.x,n.y),u?(a=u.bbox,n.x=(n.x-a[0].x)/(a[1].x-a[0].x)*u.width*this.scale,n.y=(n.y-a[0].y)/(a[1].y-a[0].y)*u.height*this.scale,{x:n.x+this.transX*this.scale+u.left*this.scale,y:n.y+this.transY*this.scale+u.top*this.scale}):!1},pointToLatLng:function(e,t){var n=jvm.WorldMap.maps[this.params.map].projection,r=n.centralMeridian,i=jvm.WorldMap.maps[this.params.map].insets,s,o,u,a,f;for(s=0;s<i.length;s++){o=i[s],u=o.bbox,a=e-(this.transX*this.scale+o.left*this.scale),f=t-(this.transY*this.scale+o.top*this.scale),a=a/(o.width*this.scale)*(u[1].x-u[0].x)+u[0].x,f=f/(o.height*this.scale)*(u[1].y-u[0].y)+u[0].y;if(a>u[0].x&&a<u[1].x&&f>u[0].y&&f<u[1].y)return jvm.Proj[n.type+"_inv"](a,-f,r)}return!1},getInsetForPoint:function(e,t){var n=jvm.WorldMap.maps[this.params.map].insets,r,i;for(r=0;r<n.length;r++){i=n[r].bbox;if(e>i[0].x&&e<i[1].x&&t>i[0].y&&t<i[1].y)return n[r]}},createSeries:function(){var e,t;this.series={markers:[],regions:[]};for(t in this.params.series)for(e=0;e<this.params.series[t].length;e++)this.series[t][e]=new jvm.DataSeries(this.params.series[t][e],this[t])},remove:function(){this.label.remove(),this.container.remove(),jvm.$(window).unbind("resize",this.onResize)}},jvm.WorldMap.maps={},jvm.WorldMap.defaultParams={map:"world_mill_en",backgroundColor:"#505050",zoomButtons:!0,zoomOnScroll:!0,zoomMax:8,zoomMin:1,zoomStep:1.6,regionsSelectable:!1,markersSelectable:!1,bindTouchEvents:!0,regionStyle:{initial:{fill:"white","fill-opacity":1,stroke:"none","stroke-width":0,"stroke-opacity":1},hover:{"fill-opacity":.8},selected:{fill:"yellow"},selectedHover
:{}},markerStyle:{initial:{fill:"grey",stroke:"#505050","fill-opacity":1,"stroke-width":1,"stroke-opacity":1,r:5},hover:{stroke:"black","stroke-width":2},selected:{fill:"blue"},selectedHover:{}}},jvm.WorldMap.apiEvents={onRegionLabelShow:"regionLabelShow",onRegionOver:"regionOver",onRegionOut:"regionOut",onRegionClick:"regionClick",onRegionSelected:"regionSelected",onMarkerLabelShow:"markerLabelShow",onMarkerOver:"markerOver",onMarkerOut:"markerOut",onMarkerClick:"markerClick",onMarkerSelected:"markerSelected",onViewportChange:"viewportChange"}; | ztfy.myams | /ztfy.myams-0.1.33.tar.gz/ztfy.myams-0.1.33/src/ztfy/myams/resources/js/ext/jquery-jvectormap-1.2.2.min.js | jquery-jvectormap-1.2.2.min.js |
!function(e){e.fn.extend({select2SortableOrder:function(){var t=this.filter("[multiple]");return t.each(function(){var t=e(this);if("object"!=typeof t.data("select2"))return!1;var s,i=t.siblings(".select2-container");if("hidden"===t.attr("type")){var r=i.data("select2"),o=r.opts.separator,l=[];e.each(r.data(),function(){l.push(this.id)}),t.val(l.join(o))}else{var n=[];t.find("optgroup").each(function(e,t){n.push(t)}),t.find("option").each(function(t,s){var i=this;void 0===e(this).parent("optgroup").prop("label")&&(""===this.value||this.selected||n.push(i))}),(s=e(i.find('.select2-choices li[class!="select2-search-field"]').map(function(){if(this){var s=e(this).data("select2Data").id;return t.find('option[value="'+s+'"]')[0]}}))).push.apply(s,n),t.children().remove(),t.append(s)}}),t},select2Sortable:function(){var t=Array.prototype.slice.call(arguments,0);if($this=this.filter("[multiple]"),validMethods=["destroy"],0===t.length||"object"==typeof t[0]){var s=e.extend({bindOrder:"formSubmit",sortableOptions:{placeholder:"ui-state-highlight",items:"li:not(.select2-search-field)",tolerance:"pointer"}},t[0]);"object"!=typeof $this.data("select2")&&$this.select2(),$this.each(function(){var t=e(this),i=t.siblings(".select2-container").find(".select2-choices");switch(i.sortable(s.sortableOptions),s.bindOrder){case"sortableStop":i.on("sortstop.select2sortable",function(e,s){t.select2SortableOrder()}),t.on("change",function(t){e(this).select2SortableOrder()});break;default:t.closest("form").unbind("submit.select2sortable").on("submit.select2sortable",function(){t.select2SortableOrder()})}})}else if(t[0],!0){if(-1==e.inArray(t[0],validMethods))throw"Unknown method: "+t[0];"destroy"===t[0]&&$this.select2SortableDestroy()}return $this},select2SortableDestroy:function(){var t=this.filter("[multiple]");return t.each(function(){var t=e(this),s=t.parent().find(".select2-choices");t.closest("form").unbind("submit.select2sortable"),s.unbind("sortstop.select2sortable"),s.sortable("destroy")}),t}})}(jQuery); | ztfy.myams | /ztfy.myams-0.1.33.tar.gz/ztfy.myams-0.1.33/src/ztfy/myams/resources/js/ext/jquery-select2-sortable.min.js | jquery-select2-sortable.min.js |
(function(c,a,d){var b=function(g,f){var e=function(i,k){var h=this;if(!this instanceof e){alert("FixedColumns warning: FixedColumns must be initialised with the 'new' keyword.");return}if(typeof k=="undefined"){k={}}if(g.fn.dataTable.camelToHungarian){g.fn.dataTable.camelToHungarian(e.defaults,k)}var j=g.fn.dataTable.Api?new g.fn.dataTable.Api(i).settings()[0]:i.fnSettings();this.s={dt:j,iTableColumns:j.aoColumns.length,aiOuterWidths:[],aiInnerWidths:[]};this.dom={scroller:null,header:null,body:null,footer:null,grid:{wrapper:null,dt:null,left:{wrapper:null,head:null,body:null,foot:null},right:{wrapper:null,head:null,body:null,foot:null}},clone:{left:{header:null,body:null,footer:null},right:{header:null,body:null,footer:null}}};j._oFixedColumns=this;if(!j._bInitComplete){j.oApi._fnCallbackReg(j,"aoInitComplete",function(){h._fnConstruct(k)},"FixedColumns")}else{this._fnConstruct(k)}};e.prototype={fnUpdate:function(){this._fnDraw(true)},fnRedrawLayout:function(){this._fnColCalc();this._fnGridLayout();this.fnUpdate()},fnRecalculateHeight:function(h){delete h._DTTC_iHeight;h.style.height="auto"},fnSetRowHeight:function(i,h){i.style.height=h+"px"},fnGetPosition:function(i){var h;var j=this.s.dt.oInstance;if(!g(i).parents(".DTFC_Cloned").length){return j.fnGetPosition(i)}else{if(i.nodeName.toLowerCase()==="tr"){h=g(i).index();return j.fnGetPosition(g("tr",this.s.dt.nTBody)[h])}else{var l=g(i).index();h=g(i.parentNode).index();var k=j.fnGetPosition(g("tr",this.s.dt.nTBody)[h]);return[k,l,j.oApi._fnVisibleToColumnIndex(this.s.dt,l)]}}},_fnConstruct:function(o){var l,j,h,n=this;if(typeof this.s.dt.oInstance.fnVersionCheck!="function"||this.s.dt.oInstance.fnVersionCheck("1.8.0")!==true){alert("FixedColumns "+e.VERSION+" required DataTables 1.8.0 or later. Please upgrade your DataTables installation");return}if(this.s.dt.oScroll.sX===""){this.s.dt.oInstance.oApi._fnLog(this.s.dt,1,"FixedColumns is not needed (no x-scrolling in DataTables enabled), so no action will be taken. Use 'FixedHeader' for column fixing when scrolling is not enabled");return}this.s=g.extend(true,this.s,e.defaults,o);var k=this.s.dt.oClasses;this.dom.grid.dt=g(this.s.dt.nTable).parents("div."+k.sScrollWrapper)[0];this.dom.scroller=g("div."+k.sScrollBody,this.dom.grid.dt)[0];this._fnColCalc();this._fnGridSetup();var m;g(this.dom.scroller).on("mouseover.DTFC",function(){m="main"}).on("scroll.DTFC",function(){if(m==="main"){if(n.s.iLeftColumns>0){n.dom.grid.left.liner.scrollTop=n.dom.scroller.scrollTop}if(n.s.iRightColumns>0){n.dom.grid.right.liner.scrollTop=n.dom.scroller.scrollTop}}});if(n.s.iLeftColumns>0){g(n.dom.grid.left.liner).on("mouseover.DTFC",function(){m="left"}).on("scroll.DTFC",function(){if(m==="left"){n.dom.scroller.scrollTop=n.dom.grid.left.liner.scrollTop;if(n.s.iRightColumns>0){n.dom.grid.right.liner.scrollTop=n.dom.grid.left.liner.scrollTop}}}).on("wheel.DTFC",function(r){var i=-r.originalEvent.deltaX;n.dom.scroller.scrollLeft-=i})}if(n.s.iRightColumns>0){g(n.dom.grid.right.liner).on("mouseover.DTFC",function(){m="right"}).on("scroll.DTFC",function(){if(m==="right"){n.dom.scroller.scrollTop=n.dom.grid.right.liner.scrollTop;if(n.s.iLeftColumns>0){n.dom.grid.left.liner.scrollTop=n.dom.grid.right.liner.scrollTop}}}).on("wheel.DTFC",function(r){var i=-r.originalEvent.deltaX;n.dom.scroller.scrollLeft-=i})}g(c).on("resize.DTFC",function(){n._fnGridLayout.call(n)});var q=true;var p=g(this.s.dt.nTable);p.on("draw.dt.DTFC",function(){n._fnDraw.call(n,q);q=false}).on("column-sizing.dt.DTFC",function(){n._fnColCalc();n._fnGridLayout(n)}).on("column-visibility.dt.DTFC",function(){n._fnColCalc();n._fnGridLayout(n);n._fnDraw(true)}).on("destroy.dt.DTFC",function(){p.off("column-sizing.dt.DTFC destroy.dt.DTFC draw.dt.DTFC");g(n.dom.scroller).fn("scroll.DTFC mouseover.DTFC");g(c).off("resize.DTFC");g(n.dom.grid.left.liner).on("scroll.DTFC wheel.DTFC mouseover.DTFC");g(n.dom.grid.left.wrapper).remove();g(n.dom.grid.right.liner).on("scroll.DTFC wheel.DTFC mouseover.DTFC");g(n.dom.grid.right.wrapper).remove()});this._fnGridLayout();this.s.dt.oInstance.fnDraw(false)},_fnColCalc:function(){var j=this;var i=0;var h=0;this.s.aiInnerWidths=[];this.s.aiOuterWidths=[];g.each(this.s.dt.aoColumns,function(l,k){var m=g(k.nTh);if(!m.filter(":visible").length){j.s.aiInnerWidths.push(0);j.s.aiOuterWidths.push(0)}else{var n=m.outerWidth();if(j.s.aiOuterWidths.length===0){n+=parseInt(g(j.s.dt.nTable).css("border-left-width"),10)}j.s.aiOuterWidths.push(n);j.s.aiInnerWidths.push(m.width());if(l<j.s.iLeftColumns){i+=n}if(j.s.iTableColumns-j.s.iRightColumns<=l){h+=n}}});this.s.iLeftWidth=i;this.s.iRightWidth=h},_fnGridSetup:function(){var l=this;var h=this._fnDTOverflow();var m;this.dom.body=this.s.dt.nTable;this.dom.header=this.s.dt.nTHead.parentNode;this.dom.header.parentNode.parentNode.style.position="relative";var j=g('<div class="DTFC_ScrollWrapper" style="position:relative; clear:both;"><div class="DTFC_LeftWrapper" style="position:absolute; top:0; left:0;"><div class="DTFC_LeftHeadWrapper" style="position:relative; top:0; left:0; overflow:hidden;"></div><div class="DTFC_LeftBodyWrapper" style="position:relative; top:0; left:0; overflow:hidden;"><div class="DTFC_LeftBodyLiner" style="position:relative; top:0; left:0; overflow-y:scroll;"></div></div><div class="DTFC_LeftFootWrapper" style="position:relative; top:0; left:0; overflow:hidden;"></div></div><div class="DTFC_RightWrapper" style="position:absolute; top:0; left:0;"><div class="DTFC_RightHeadWrapper" style="position:relative; top:0; left:0;"><div class="DTFC_RightHeadBlocker DTFC_Blocker" style="position:absolute; top:0; bottom:0;"></div></div><div class="DTFC_RightBodyWrapper" style="position:relative; top:0; left:0; overflow:hidden;"><div class="DTFC_RightBodyLiner" style="position:relative; top:0; left:0; overflow-y:scroll;"></div></div><div class="DTFC_RightFootWrapper" style="position:relative; top:0; left:0;"><div class="DTFC_RightFootBlocker DTFC_Blocker" style="position:absolute; top:0; bottom:0;"></div></div></div></div>')[0];var k=j.childNodes[0];var i=j.childNodes[1];this.dom.grid.dt.parentNode.insertBefore(j,this.dom.grid.dt);j.appendChild(this.dom.grid.dt);this.dom.grid.wrapper=j;if(this.s.iLeftColumns>0){this.dom.grid.left.wrapper=k;this.dom.grid.left.head=k.childNodes[0];this.dom.grid.left.body=k.childNodes[1];this.dom.grid.left.liner=g("div.DTFC_LeftBodyLiner",j)[0];j.appendChild(k)}if(this.s.iRightColumns>0){this.dom.grid.right.wrapper=i;this.dom.grid.right.head=i.childNodes[0];this.dom.grid.right.body=i.childNodes[1];this.dom.grid.right.liner=g("div.DTFC_RightBodyLiner",j)[0];m=g("div.DTFC_RightHeadBlocker",j)[0];m.style.width=h.bar+"px";m.style.right=-h.bar+"px";this.dom.grid.right.headBlock=m;m=g("div.DTFC_RightFootBlocker",j)[0];m.style.width=h.bar+"px";m.style.right=-h.bar+"px";this.dom.grid.right.footBlock=m;j.appendChild(i)}if(this.s.dt.nTFoot){this.dom.footer=this.s.dt.nTFoot.parentNode;if(this.s.iLeftColumns>0){this.dom.grid.left.foot=k.childNodes[2]}if(this.s.iRightColumns>0){this.dom.grid.right.foot=i.childNodes[2]}}},_fnGridLayout:function(){var o=this.dom.grid;var n=g(o.wrapper).width();var j=g(this.s.dt.nTable.parentNode).height();var m=g(this.s.dt.nTable.parentNode.parentNode).height();var h=this._fnDTOverflow();var l=this.s.iLeftWidth,i=this.s.iRightWidth,k;if(h.x){j-=h.bar}o.wrapper.style.height=m+"px";if(this.s.iLeftColumns>0){o.left.wrapper.style.width=l+"px";o.left.wrapper.style.height="1px";o.left.body.style.height=j+"px";if(o.left.foot){o.left.foot.style.top=(h.x?h.bar:0)+"px"}o.left.liner.style.width=(l+h.bar)+"px";o.left.liner.style.height=j+"px"}if(this.s.iRightColumns>0){k=n-i;if(h.y){k-=h.bar}o.right.wrapper.style.width=i+"px";o.right.wrapper.style.left=k+"px";o.right.wrapper.style.height="1px";o.right.body.style.height=j+"px";if(o.right.foot){o.right.foot.style.top=(h.x?h.bar:0)+"px"}o.right.liner.style.width=(i+h.bar)+"px";o.right.liner.style.height=j+"px";o.right.headBlock.style.display=h.y?"block":"none";o.right.footBlock.style.display=h.y?"block":"none"}},_fnDTOverflow:function(){var j=this.s.dt.nTable;var h=j.parentNode;var i={x:false,y:false,bar:this.s.dt.oScroll.iBarWidth};if(j.offsetWidth>h.clientWidth){i.x=true}if(j.offsetHeight>h.clientHeight){i.y=true}return i},_fnDraw:function(h){this._fnGridLayout();this._fnCloneLeft(h);this._fnCloneRight(h);if(this.s.fnDrawCallback!==null){this.s.fnDrawCallback.call(this,this.dom.clone.left,this.dom.clone.right)}g(this).trigger("draw.dtfc",{leftClone:this.dom.clone.left,rightClone:this.dom.clone.right})},_fnCloneRight:function(j){if(this.s.iRightColumns<=0){return}var l=this,h,m,k=[];for(h=this.s.iTableColumns-this.s.iRightColumns;h<this.s.iTableColumns;h++){if(this.s.dt.aoColumns[h].bVisible){k.push(h)}}this._fnClone(this.dom.clone.right,this.dom.grid.right,k,j)},_fnCloneLeft:function(j){if(this.s.iLeftColumns<=0){return}var l=this,h,m,k=[];for(h=0;h<this.s.iLeftColumns;h++){if(this.s.dt.aoColumns[h].bVisible){k.push(h)}}this._fnClone(this.dom.clone.left,this.dom.grid.left,k,j)},_fnCopyLayout:function(s,u){var r=[];var p=[];var l=[];for(var n=0,k=s.length;n<k;n++){var q=[];q.nTr=g(s[n].nTr).clone(true,true)[0];for(var m=0,t=this.s.iTableColumns;m<t;m++){if(g.inArray(m,u)===-1){continue}var o=g.inArray(s[n][m].cell,l);if(o===-1){var h=g(s[n][m].cell).clone(true,true)[0];p.push(h);l.push(s[n][m].cell);q.push({cell:h,unique:s[n][m].unique})}else{q.push({cell:p[o],unique:s[n][m].unique})}}r.push(q)}return r},_fnClone:function(y,x,l,h){var p=this,A,w,z,E,v,n,B,t,q,m,r,F;if(h){if(y.header!==null){y.header.parentNode.removeChild(y.header)}y.header=g(this.dom.header).clone(true,true)[0];y.header.className+=" DTFC_Cloned";y.header.style.width="100%";x.head.appendChild(y.header);m=this._fnCopyLayout(this.s.dt.aoHeader,l);r=g(">thead",y.header);r.empty();for(A=0,w=m.length;A<w;A++){r[0].appendChild(m[A].nTr)}this.s.dt.oApi._fnDrawHead(this.s.dt,m,true)}else{m=this._fnCopyLayout(this.s.dt.aoHeader,l);F=[];this.s.dt.oApi._fnDetectHeader(F,g(">thead",y.header)[0]);for(A=0,w=m.length;A<w;A++){for(z=0,E=m[A].length;z<E;z++){F[A][z].cell.className=m[A][z].cell.className;g("span.DataTables_sort_icon",F[A][z].cell).each(function(){this.className=g("span.DataTables_sort_icon",m[A][z].cell)[0].className})}}}this._fnEqualiseHeights("thead",this.dom.header,y.header);if(this.s.sHeightMatch=="auto"){g(">tbody>tr",p.dom.body).css("height","auto")}if(y.body!==null){y.body.parentNode.removeChild(y.body);y.body=null}y.body=g(this.dom.body).clone(true)[0];y.body.className+=" DTFC_Cloned";y.body.style.paddingBottom=this.s.dt.oScroll.iBarWidth+"px";y.body.style.marginBottom=(this.s.dt.oScroll.iBarWidth*2)+"px";if(y.body.getAttribute("id")!==null){y.body.removeAttribute("id")}g(">thead>tr",y.body).empty();g(">tfoot",y.body).remove();var s=g("tbody",y.body)[0];g(s).empty();if(this.s.dt.aiDisplay.length>0){var o=g(">thead>tr",y.body)[0];for(q=0;q<l.length;q++){B=l[q];t=g(this.s.dt.aoColumns[B].nTh).clone(true)[0];t.innerHTML="";var u=t.style;u.paddingTop="0";u.paddingBottom="0";u.borderTopWidth="0";u.borderBottomWidth="0";u.height=0;u.width=p.s.aiInnerWidths[B]+"px";o.appendChild(t)}g(">tbody>tr",p.dom.body).each(function(H){var I=this.cloneNode(false);I.removeAttribute("id");var j=p.s.dt.oFeatures.bServerSide===false?p.s.dt.aiDisplay[p.s.dt._iDisplayStart+H]:H;for(q=0;q<l.length;q++){var G=p.s.dt.aoData[j].anCells||p.s.dt.oApi._fnGetTdNodes(p.s.dt,j);B=l[q];if(G.length>0){t=g(G[B]).clone(true,true)[0];I.appendChild(t)}}s.appendChild(I)})}else{g(">tbody>tr",p.dom.body).each(function(i){t=this.cloneNode(true);t.className+=" DTFC_NoData";g("td",t).html("");s.appendChild(t)})}y.body.style.width="100%";y.body.style.margin="0";y.body.style.padding="0";if(h){if(typeof this.s.dt.oScroller!="undefined"){x.liner.appendChild(this.s.dt.oScroller.dom.force.cloneNode(true))}}x.liner.appendChild(y.body);this._fnEqualiseHeights("tbody",p.dom.body,y.body);if(this.s.dt.nTFoot!==null){if(h){if(y.footer!==null){y.footer.parentNode.removeChild(y.footer)}y.footer=g(this.dom.footer).clone(true,true)[0];y.footer.className+=" DTFC_Cloned";y.footer.style.width="100%";x.foot.appendChild(y.footer);m=this._fnCopyLayout(this.s.dt.aoFooter,l);var k=g(">tfoot",y.footer);k.empty();for(A=0,w=m.length;A<w;A++){k[0].appendChild(m[A].nTr)}this.s.dt.oApi._fnDrawHead(this.s.dt,m,true)}else{m=this._fnCopyLayout(this.s.dt.aoFooter,l);var C=[];this.s.dt.oApi._fnDetectHeader(C,g(">tfoot",y.footer)[0]);for(A=0,w=m.length;A<w;A++){for(z=0,E=m[A].length;z<E;z++){C[A][z].cell.className=m[A][z].cell.className}}}this._fnEqualiseHeights("tfoot",this.dom.footer,y.footer)}var D=this.s.dt.oApi._fnGetUniqueThs(this.s.dt,g(">thead",y.header)[0]);g(D).each(function(j){B=l[j];this.style.width=p.s.aiInnerWidths[B]+"px"});if(p.s.dt.nTFoot!==null){D=this.s.dt.oApi._fnGetUniqueThs(this.s.dt,g(">tfoot",y.footer)[0]);g(D).each(function(j){B=l[j];this.style.width=p.s.aiInnerWidths[B]+"px"})}},_fnGetTrNodes:function(j){var l=[];for(var k=0,h=j.childNodes.length;k<h;k++){if(j.childNodes[k].nodeName.toUpperCase()=="TR"){l.push(j.childNodes[k])}}return l},_fnEqualiseHeights:function(u,j,t){if(this.s.sHeightMatch=="none"&&u!=="thead"&&u!=="tfoot"){return}var q=this,n,k,h,m,y,x,p=j.getElementsByTagName(u)[0],r=t.getElementsByTagName(u)[0],l=g(">"+u+">tr:eq(0)",j).children(":first"),w=l.outerHeight()-l.height(),o=this._fnGetTrNodes(p),v=this._fnGetTrNodes(r),s=[];for(n=0,k=v.length;n<k;n++){y=o[n].offsetHeight;x=v[n].offsetHeight;h=x>y?x:y;if(this.s.sHeightMatch=="semiauto"){o[n]._DTTC_iHeight=h}s.push(h)}for(n=0,k=v.length;n<k;n++){v[n].style.height=s[n]+"px";o[n].style.height=s[n]+"px"}}};e.defaults={iLeftColumns:1,iRightColumns:0,fnDrawCallback:null,sHeightMatch:"semiauto"};e.version="3.0.0";g.fn.dataTable.FixedColumns=e;g.fn.DataTable.FixedColumns=e;return e};b(jQuery,jQuery.fn.dataTable)})(window,document); | ztfy.myams | /ztfy.myams-0.1.33.tar.gz/ztfy.myams-0.1.33/src/ztfy/myams/resources/js/ext/jquery-dataTables-fixedColumns.min.js | jquery-dataTables-fixedColumns.min.js |
* Version 1.7.3
*
* ** means there is basic unit tests for this parameter.
*
* @name Jeditable
* @type jQuery
* @param String target (POST) URL or function to send edited content to **
* @param Hash options additional options
* @param String options[method] method to use to send edited content (POST or PUT) **
* @param Function options[callback] Function to run after submitting edited content **
* @param String options[name] POST parameter name of edited content
* @param String options[id] POST parameter name of edited div id
* @param Hash options[submitdata] Extra parameters to send when submitting edited content.
* @param String options[type] text, textarea or select (or any 3rd party input type) **
* @param Integer options[rows] number of rows if using textarea **
* @param Integer options[cols] number of columns if using textarea **
* @param Mixed options[height] 'auto', 'none' or height in pixels **
* @param Mixed options[width] 'auto', 'none' or width in pixels **
* @param String options[loadurl] URL to fetch input content before editing **
* @param String options[loadtype] Request type for load url. Should be GET or POST.
* @param String options[loadtext] Text to display while loading external content.
* @param Mixed options[loaddata] Extra parameters to pass when fetching content before editing.
* @param Mixed options[data] Or content given as paramameter. String or function.**
* @param String options[indicator] indicator html to show when saving
* @param String options[tooltip] optional tooltip text via title attribute **
* @param String options[event] jQuery event such as 'click' of 'dblclick' **
* @param String options[submit] submit button value, empty means no button **
* @param String options[cancel] cancel button value, empty means no button **
* @param String options[cssclass] CSS class to apply to input form. 'inherit' to copy from parent. **
* @param String options[style] Style to apply to input form 'inherit' to copy from parent. **
* @param String options[select] true or false, when true text is highlighted ??
* @param String options[placeholder] Placeholder text or html to insert when element is empty. **
* @param String options[onblur] 'cancel', 'submit', 'ignore' or function ??
*
* @param Function options[onsubmit] function(settings, original) { ... } called before submit
* @param Function options[onreset] function(settings, original) { ... } called before reset
* @param Function options[onerror] function(settings, original, xhr) { ... } called on error
*
* @param Hash options[ajaxoptions] jQuery Ajax options. See docs.jquery.com.
*
*/
(function($) {
$.fn.editable = function(target, options) {
if ('disable' == target) {
$(this).data('disabled.editable', true);
return;
}
if ('enable' == target) {
$(this).data('disabled.editable', false);
return;
}
if ('destroy' == target) {
$(this)
.unbind($(this).data('event.editable'))
.removeData('disabled.editable')
.removeData('event.editable');
return;
}
var settings = $.extend({}, $.fn.editable.defaults, {target:target}, options);
/* setup some functions */
var plugin = $.editable.types[settings.type].plugin || function() { };
var submit = $.editable.types[settings.type].submit || function() { };
var buttons = $.editable.types[settings.type].buttons
|| $.editable.types['defaults'].buttons;
var content = $.editable.types[settings.type].content
|| $.editable.types['defaults'].content;
var element = $.editable.types[settings.type].element
|| $.editable.types['defaults'].element;
var reset = $.editable.types[settings.type].reset
|| $.editable.types['defaults'].reset;
var callback = settings.callback || function() { };
var onedit = settings.onedit || function() { };
var onsubmit = settings.onsubmit || function() { };
var onreset = settings.onreset || function() { };
var onerror = settings.onerror || reset;
/* Show tooltip. */
if (settings.tooltip) {
$(this).attr('title', settings.tooltip);
}
settings.autowidth = 'auto' == settings.width;
settings.autoheight = 'auto' == settings.height;
return this.each(function() {
/* Save this to self because this changes when scope changes. */
var self = this;
/* Inlined block elements lose their width and height after first edit. */
/* Save them for later use as workaround. */
var savedwidth = $(self).width();
var savedheight = $(self).height();
/* Save so it can be later used by $.editable('destroy') */
$(this).data('event.editable', settings.event);
/* If element is empty add something clickable (if requested) */
if (!$.trim($(this).html())) {
$(this).html(settings.placeholder);
}
$(this).bind(settings.event, function(e) {
/* Abort if element is disabled. */
if (true === $(this).data('disabled.editable')) {
return;
}
/* Prevent throwing an exeption if edit field is clicked again. */
if (self.editing) {
return;
}
/* Abort if onedit hook returns false. */
if (false === onedit.apply(this, [settings, self])) {
return;
}
/* Prevent default action and bubbling. */
e.preventDefault();
e.stopPropagation();
/* Remove tooltip. */
if (settings.tooltip) {
$(self).removeAttr('title');
}
/* Figure out how wide and tall we are, saved width and height. */
/* Workaround for http://dev.jquery.com/ticket/2190 */
if (0 == $(self).width()) {
settings.width = savedwidth;
settings.height = savedheight;
} else {
if (settings.width != 'none') {
settings.width =
settings.autowidth ? $(self).width() : settings.width;
}
if (settings.height != 'none') {
settings.height =
settings.autoheight ? $(self).height() : settings.height;
}
}
/* Remove placeholder text, replace is here because of IE. */
if ($(this).html().toLowerCase().replace(/(;|"|\/)/g, '') ==
settings.placeholder.toLowerCase().replace(/(;|"|\/)/g, '')) {
$(this).html('');
}
self.editing = true;
self.revert = $(self).html();
$(self).html('');
/* Create the form object. */
var form = $('<form />');
/* Apply css or style or both. */
if (settings.cssclass) {
if ('inherit' == settings.cssclass) {
form.attr('class', $(self).attr('class'));
} else {
form.attr('class', settings.cssclass);
}
}
if (settings.style) {
if ('inherit' == settings.style) {
form.attr('style', $(self).attr('style'));
/* IE needs the second line or display wont be inherited. */
form.css('display', $(self).css('display'));
} else {
form.attr('style', settings.style);
}
}
/* Add main input element to form and store it in input. */
var input = element.apply(form, [settings, self]);
/* Set input content via POST, GET, given data or existing value. */
var input_content;
if (settings.loadurl) {
var t = setTimeout(function() {
input.disabled = true;
content.apply(form, [settings.loadtext, settings, self]);
}, 100);
var loaddata = {};
loaddata[settings.id] = self.id;
if ($.isFunction(settings.loaddata)) {
$.extend(loaddata, settings.loaddata.apply(self, [self.revert, settings]));
} else {
$.extend(loaddata, settings.loaddata);
}
$.ajax({
type : settings.loadtype,
url : settings.loadurl,
data : loaddata,
async : false,
success: function(result) {
window.clearTimeout(t);
input_content = result;
input.disabled = false;
}
});
} else if (settings.data) {
input_content = settings.data;
if ($.isFunction(settings.data)) {
input_content = settings.data.apply(self, [self.revert, settings]);
}
} else {
input_content = self.revert;
}
content.apply(form, [input_content, settings, self]);
input.attr('name', settings.name);
/* Add buttons to the form. */
buttons.apply(form, [settings, self]);
/* Add created form to self. */
$(self).append(form);
/* Attach 3rd party plugin if requested. */
plugin.apply(form, [settings, self]);
/* Focus to first visible form element. */
$(':input:visible:enabled:first', form).focus();
/* Highlight input contents when requested. */
if (settings.select) {
input.select();
}
/* discard changes if pressing esc */
input.keydown(function(e) {
if (e.keyCode == 27) {
e.preventDefault();
reset.apply(form, [settings, self]);
}
});
/* Discard, submit or nothing with changes when clicking outside. */
/* Do nothing is usable when navigating with tab. */
var t;
if ('cancel' == settings.onblur) {
input.blur(function(e) {
/* Prevent canceling if submit was clicked. */
t = setTimeout(function() {
reset.apply(form, [settings, self]);
}, 500);
});
} else if ('submit' == settings.onblur) {
input.blur(function(e) {
/* Prevent double submit if submit was clicked. */
t = setTimeout(function() {
form.submit();
}, 200);
});
} else if ($.isFunction(settings.onblur)) {
input.blur(function(e) {
settings.onblur.apply(self, [input.val(), settings]);
});
} else {
input.blur(function(e) {
/* TODO: maybe something here */
});
}
form.submit(function(e) {
if (t) {
clearTimeout(t);
}
/* Do no submit. */
e.preventDefault();
/* Call before submit hook. */
/* If it returns false abort submitting. */
if (false !== onsubmit.apply(form, [settings, self])) {
/* Custom inputs call before submit hook. */
/* If it returns false abort submitting. */
if (false !== submit.apply(form, [settings, self])) {
/* Check if given target is function */
if ($.isFunction(settings.target)) {
var str = settings.target.apply(self, [input.val(), settings]);
$(self).html(str);
self.editing = false;
callback.apply(self, [self.innerHTML, settings]);
/* TODO: this is not dry */
if (!$.trim($(self).html())) {
$(self).html(settings.placeholder);
}
} else {
/* Add edited content and id of edited element to POST. */
var submitdata = {};
submitdata[settings.name] = input.val();
submitdata[settings.id] = self.id;
/* Add extra data to be POST:ed. */
if ($.isFunction(settings.submitdata)) {
$.extend(submitdata, settings.submitdata.apply(self, [self.revert, settings]));
} else {
$.extend(submitdata, settings.submitdata);
}
/* Quick and dirty PUT support. */
if ('PUT' == settings.method) {
submitdata['_method'] = 'put';
}
/* Show the saving indicator. */
$(self).html(settings.indicator);
/* Defaults for ajaxoptions. */
var ajaxoptions = {
type : 'POST',
data : submitdata,
dataType: 'html',
url : settings.target,
success : function(result, status) {
if (ajaxoptions.dataType == 'html') {
$(self).html(result);
}
self.editing = false;
callback.apply(self, [result, settings]);
if (!$.trim($(self).html())) {
$(self).html(settings.placeholder);
}
},
error : function(xhr, status, error) {
onerror.apply(form, [settings, self, xhr]);
}
};
/* Override with what is given in settings.ajaxoptions. */
$.extend(ajaxoptions, settings.ajaxoptions);
$.ajax(ajaxoptions);
}
}
}
/* Show tooltip again. */
$(self).attr('title', settings.tooltip);
return false;
});
});
/* Privileged methods */
this.reset = function(form) {
/* Prevent calling reset twice when blurring. */
if (this.editing) {
/* Before reset hook, if it returns false abort reseting. */
if (false !== onreset.apply(form, [settings, self])) {
$(self).html(self.revert);
self.editing = false;
if (!$.trim($(self).html())) {
$(self).html(settings.placeholder);
}
/* Show tooltip again. */
if (settings.tooltip) {
$(self).attr('title', settings.tooltip);
}
}
}
};
});
};
$.editable = {
types: {
defaults: {
element : function(settings, original) {
var input = $('<input type="hidden"></input>');
$(this).append(input);
return(input);
},
content : function(string, settings, original) {
$(':input:first', this).val(string);
},
reset : function(settings, original) {
original.reset(this);
},
buttons : function(settings, original) {
var form = this;
if (settings.submit) {
/* If given html string use that. */
if (settings.submit.match(/>$/)) {
var submit = $(settings.submit).click(function() {
if (submit.attr("type") != "submit") {
form.submit();
}
});
/* Otherwise use button with given string as text. */
} else {
var submit = $('<button type="submit" />');
submit.html(settings.submit);
}
$(this).append(submit);
}
if (settings.cancel) {
/* If given html string use that. */
if (settings.cancel.match(/>$/)) {
var cancel = $(settings.cancel);
/* otherwise use button with given string as text */
} else {
var cancel = $('<button type="cancel" />');
cancel.html(settings.cancel);
}
$(this).append(cancel);
$(cancel).click(function(event) {
if ($.isFunction($.editable.types[settings.type].reset)) {
var reset = $.editable.types[settings.type].reset;
} else {
var reset = $.editable.types['defaults'].reset;
}
reset.apply(form, [settings, original]);
return false;
});
}
}
},
text: {
element : function(settings, original) {
var input = $('<input />');
if (settings.width != 'none') { input.attr('width', settings.width); }
if (settings.height != 'none') { input.attr('height', settings.height); }
/* https://bugzilla.mozilla.org/show_bug.cgi?id=236791 */
//input[0].setAttribute('autocomplete','off');
input.attr('autocomplete','off');
$(this).append(input);
return(input);
}
},
textarea: {
element : function(settings, original) {
var textarea = $('<textarea />');
if (settings.rows) {
textarea.attr('rows', settings.rows);
} else if (settings.height != "none") {
textarea.height(settings.height);
}
if (settings.cols) {
textarea.attr('cols', settings.cols);
} else if (settings.width != "none") {
textarea.width(settings.width);
}
$(this).append(textarea);
return(textarea);
}
},
select: {
element : function(settings, original) {
var select = $('<select />');
$(this).append(select);
return(select);
},
content : function(data, settings, original) {
/* If it is string assume it is json. */
if (String == data.constructor) {
eval ('var json = ' + data);
} else {
/* Otherwise assume it is a hash already. */
var json = data;
}
for (var key in json) {
if (!json.hasOwnProperty(key)) {
continue;
}
if ('selected' == key) {
continue;
}
var option = $('<option />').val(key).append(json[key]);
$('select', this).append(option);
}
/* Loop option again to set selected. IE needed this... */
$('select', this).children().each(function() {
if ($(this).val() == json['selected'] ||
$(this).text() == $.trim(original.revert)) {
$(this).attr('selected', 'selected');
}
});
/* Submit on change if no submit button defined. */
if (!settings.submit) {
var form = this;
$('select', this).change(function() {
form.submit();
});
}
}
}
},
/* Add new input type */
addInputType: function(name, input) {
$.editable.types[name] = input;
}
};
/* Publicly accessible defaults. */
$.fn.editable.defaults = {
name : 'value',
id : 'id',
type : 'text',
width : 'auto',
height : 'auto',
event : 'click.editable',
onblur : 'cancel',
loadtype : 'GET',
loadtext : 'Loading...',
placeholder: 'Click to edit',
loaddata : {},
submitdata : {},
ajaxoptions: {}
};
})(jQuery); | ztfy.myams | /ztfy.myams-0.1.33.tar.gz/ztfy.myams-0.1.33/src/ztfy/myams/resources/js/ext/jquery-jeditable.js | jquery-jeditable.js |
;(function(factory) {
'use strict';
if (typeof define === 'function' && define.amd) {
// AMD
define(['jquery'], factory);
} else if (typeof module !== 'undefined' && module.exports) {
// CommonJS
module.exports = factory(require('jquery'));
} else {
// Global
factory(jQuery);
}
})(function($) {
'use strict';
var $scrollTo = $.scrollTo = function(target, duration, settings) {
return $(window).scrollTo(target, duration, settings);
};
$scrollTo.defaults = {
axis:'xy',
duration: 0,
limit:true
};
function isWin(elem) {
return !elem.nodeName ||
$.inArray(elem.nodeName.toLowerCase(), ['iframe','#document','html','body']) !== -1;
}
$.fn.scrollTo = function(target, duration, settings) {
if (typeof duration === 'object') {
settings = duration;
duration = 0;
}
if (typeof settings === 'function') {
settings = { onAfter:settings };
}
if (target === 'max') {
target = 9e9;
}
settings = $.extend({}, $scrollTo.defaults, settings);
// Speed is still recognized for backwards compatibility
duration = duration || settings.duration;
// Make sure the settings are given right
var queue = settings.queue && settings.axis.length > 1;
if (queue) {
// Let's keep the overall duration
duration /= 2;
}
settings.offset = both(settings.offset);
settings.over = both(settings.over);
return this.each(function() {
// Null target yields nothing, just like jQuery does
if (target === null) return;
var win = isWin(this),
elem = win ? this.contentWindow || window : this,
$elem = $(elem),
targ = target,
attr = {},
toff;
switch (typeof targ) {
// A number will pass the regex
case 'number':
case 'string':
if (/^([+-]=?)?\d+(\.\d+)?(px|%)?$/.test(targ)) {
targ = both(targ);
// We are done
break;
}
// Relative/Absolute selector
targ = win ? $(targ) : $(targ, elem);
/* falls through */
case 'object':
if (targ.length === 0) return;
// DOMElement / jQuery
if (targ.is || targ.style) {
// Get the real position of the target
toff = (targ = $(targ)).offset();
}
}
var offset = $.isFunction(settings.offset) && settings.offset(elem, targ) || settings.offset;
$.each(settings.axis.split(''), function(i, axis) {
var Pos = axis === 'x' ? 'Left' : 'Top',
pos = Pos.toLowerCase(),
key = 'scroll' + Pos,
prev = $elem[key](),
max = $scrollTo.max(elem, axis);
if (toff) {// jQuery / DOMElement
attr[key] = toff[pos] + (win ? 0 : prev - $elem.offset()[pos]);
// If it's a dom element, reduce the margin
if (settings.margin) {
attr[key] -= parseInt(targ.css('margin'+Pos), 10) || 0;
attr[key] -= parseInt(targ.css('border'+Pos+'Width'), 10) || 0;
}
attr[key] += offset[pos] || 0;
if (settings.over[pos]) {
// Scroll to a fraction of its width/height
attr[key] += targ[axis === 'x'?'width':'height']() * settings.over[pos];
}
} else {
var val = targ[pos];
// Handle percentage values
attr[key] = val.slice && val.slice(-1) === '%' ?
parseFloat(val) / 100 * max
: val;
}
// Number or 'number'
if (settings.limit && /^\d+$/.test(attr[key])) {
// Check the limits
attr[key] = attr[key] <= 0 ? 0 : Math.min(attr[key], max);
}
// Don't waste time animating, if there's no need.
if (!i && settings.axis.length > 1) {
if (prev === attr[key]) {
// No animation needed
attr = {};
} else if (queue) {
// Intermediate animation
animate(settings.onAfterFirst);
// Don't animate this axis again in the next iteration.
attr = {};
}
}
});
animate(settings.onAfter);
function animate(callback) {
var opts = $.extend({}, settings, {
// The queue setting conflicts with animate()
// Force it to always be true
queue: true,
duration: duration,
complete: callback && function() {
callback.call(elem, targ, settings);
}
});
$elem.animate(attr, opts);
}
});
};
// Max scrolling position, works on quirks mode
// It only fails (not too badly) on IE, quirks mode.
$scrollTo.max = function(elem, axis) {
var Dim = axis === 'x' ? 'Width' : 'Height',
scroll = 'scroll'+Dim;
if (!isWin(elem))
return elem[scroll] - $(elem)[Dim.toLowerCase()]();
var size = 'client' + Dim,
doc = elem.ownerDocument || elem.document,
html = doc.documentElement,
body = doc.body;
return Math.max(html[scroll], body[scroll]) - Math.min(html[size], body[size]);
};
function both(val) {
return $.isFunction(val) || $.isPlainObject(val) ? val : { top:val, left:val };
}
// Add special hooks so that window scroll properties can be animated
$.Tween.propHooks.scrollLeft =
$.Tween.propHooks.scrollTop = {
get: function(t) {
return $(t.elem)[t.prop]();
},
set: function(t) {
var curr = this.get(t);
// If interrupt is true and user scrolled, stop animating
if (t.options.interrupt && t._last && t._last !== curr) {
return $(t.elem).stop();
}
var next = Math.round(t.now);
// Don't waste CPU
// Browsers don't render floating point scroll
if (curr !== next) {
$(t.elem)[t.prop](next);
t._last = this.get(t);
}
}
};
// AMD requirement
return $scrollTo;
}); | ztfy.myams | /ztfy.myams-0.1.33.tar.gz/ztfy.myams-0.1.33/src/ztfy/myams/resources/js/ext/jquery-scrollto-2.1.2.js | jquery-scrollto-2.1.2.js |
Subsets and Splits