Advertisement
NikolayPaskulov

Untitled

Nov 7th, 2014
180
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 34.13 KB | None | 0 0
  1. JS :
  2.  
  3. var showReference = document.getElementById('show-reference'),
  4. firstDateInput = document.getElementById('firstDate'),
  5. table = document.getElementById('table'),
  6. secDateInput = document.getElementById('secDate'),
  7. output = [],
  8. cells = [];
  9.  
  10.  
  11. document.getElementById('save').onclick = function () {
  12. saveFile(output.join(''));
  13. }
  14.  
  15. function sendRequestToServer(arr, wanted) {
  16. var request = new XMLHttpRequest();
  17. request.onreadystatechange = function () {
  18. if (request.readyState == 4 && request.status == 200) {
  19. if (wanted == 'documents') {
  20. wanted = request.responseText;
  21. wanted = wanted.replace(/,\s+}|,}/g, '}');
  22. wanted = JSON.parse(wanted);
  23. console.log(wanted);
  24. wanted.sort(function (a, b) { return a.date - b.date });
  25. fillArray(wanted);
  26. }
  27. }
  28. }
  29. request.open("POST", "http://192.168.1.184:8000/pm", true);
  30. request.send(JSON.stringify(arr));
  31. }
  32.  
  33. function fillArray(arr) {
  34. var strArray = [],
  35. footerArray = [],
  36. footerFullSum = document.getElementById('footerFullSum');
  37. output = [];
  38. for (var i = 0; i < arr.length; i++) {
  39. var client = arr[i].partner.slice(arr[i].partner.lastIndexOf(':') + 1),
  40. date = arr[i].date.slice(6, 8) + '/' + arr[i].date.slice(4, 6) + '/' + arr[i].date.slice(0, 4),
  41. vat = Number(arr[i].vat).toFixed(2) || '&nbsp;',
  42. sumWithoutVat = ((Number(arr[i].sum) - Number(arr[i].vat)).toFixed(2)) || '&nbsp;';
  43. cells[i] = [];
  44. cells[i][0] = i + 1;
  45. cells[i][1] = '';
  46. cells[i][2] = arr[i].ВИДДОК;
  47. cells[i][3] = arr[i].docNumber;
  48. cells[i][4] = date;
  49. cells[i][5] = 'Идент. номер';
  50. cells[i][6] = client;
  51. cells[i][7] = arr[i].comment || '';
  52. cells[i][8] = '';
  53. cells[i][9] = (arr[i].type == 3) ? sumWithoutVat : '';
  54. cells[i][10] = (arr[i].type == 1) ? sumWithoutVat : '';
  55. cells[i][11] = (arr[i].type == 1) ? vat : '';
  56. cells[i][12] = (arr[i].type == 2) ? sumWithoutVat : '';
  57. cells[i][13] = (arr[i].type == 2) ? vat : '';
  58. cells[i][14] = '';
  59. cells[i][15] = (arr[i].type == 4) ? sumWithoutVat : '';
  60.  
  61. footerArray[0] = (arr[i].type == 4) ? (footerArray[0]) ? footerArray[0] + Number(sumWithoutVat) : 0 + Number(sumWithoutVat) : footerArray[0];
  62. footerArray[1] = (arr[i].type == 1) ? (footerArray[1]) ? footerArray[1] + Number(sumWithoutVat) : 0 + Number(sumWithoutVat) : footerArray[1];
  63. footerArray[2] = (arr[i].type == 1) ? (footerArray[2]) ? footerArray[2] + Number(vat) : 0 + Number(vat) : footerArray[2];
  64. footerArray[3] = (arr[i].type == 2) ? (footerArray[3]) ? footerArray[3] + Number(sumWithoutVat) : 0 + Number(sumWithoutVat) : footerArray[3];
  65. footerArray[4] = (arr[i].type == 2) ? (footerArray[4]) ? footerArray[4] + Number(vat) : 0 + Number(vat) : footerArray[4];
  66.  
  67. filloutput(cells[i]);
  68.  
  69. strArray.push('<div class="table-row">')
  70. for (var a = 0; a < cells[i].length; a++) {
  71. strArray.push('<div class="table-cell">' + cells[i][a] + '</div>');
  72. }
  73. strArray.push('</div>');
  74. }
  75. for (var f = 3; f < footerFullSum.childElementCount; f++) {
  76. footerFullSum.children[f].innerHTML = (footerArray[f - 3]) ? (footerArray[f - 3]).toFixed(2) : '&nbsp;';
  77. }
  78. table.innerHTML = strArray.join('');
  79. }
  80.  
  81. function filloutput(arr) {
  82. var NumberZDDS = document.getElementById('InZDDS').innerHTML;
  83. output.push(addingSymbol(NumberZDDS, 15) + addingSymbol(arr[1], 4) + addingSymbol(arr[0], 15) + addingSymbol(arr[2], 2) + addingSymbol(arr[3], 20) + addingSymbol(arr[4], 8) +
  84. addingSymbol(arr[5], 15) + addingSymbol(arr[6], 50) + addingSymbol(arr[7], 30) + addingSymbol(Number(arr[9]).toFixed(2), 15) + addingSymbol(Number(arr[10]).toFixed(2), 15) +
  85. addingSymbol(Number(arr[11]).toFixed(2), 15) + addingSymbol(Number(arr[12]).toFixed(2), 15) + addingSymbol(Number(arr[13]).toFixed(2), 15) + addingSymbol(Number(arr[14]).toFixed(2), 15) +
  86. addingSymbol(Number(arr[15]).toFixed(2), 15) + addingSymbol(arr[8], 2) + '\r\n');
  87.  
  88.  
  89. //(NumberZDDS.length < 15) ? output.push(NumberZDDS + addingSymbol(15 - NumberZDDS).length, ' ') : NumberZDDS; // ИН по ЗДДС
  90. //output.push(document.getElementById('DanPer').innerHTML); // Данъчен период
  91. //(String(arr[1]).length < 4) ? output.push(arr[1] + addingSymbol(4 - String(arr[1].length), ' ')) : output.push(arr[1]); // клон
  92. //(String(arr[0]).length < 15) ? output.push(arr[0] + addingSymbol(15 - String(arr[0]).length, ' ')) : output.push(arr[0]); // пореден номер
  93. //output.push(arr[2]); // вид на документа
  94. //(String(arr[3]).length < 20) ? output.push(arr[3] + addingSymbol(20 - String(arr[3].length), ' ')) : output.push(arr[3]); // Номер на документа
  95. //output.push(arr[4]); // дата на документа
  96. //(String(arr[5]).length < 15) ? output.push(arr[5] + addingSymbol(15 - String(arr[5].length), ' ')) : output.push(arr[5]); // ИН на лицето
  97. //(String(arr[6]).length < 50) ? output.push(arr[6] + addingSymbol(50 - String(arr[6].length), ' ')) : output.push(arr[6]); // Име на лицето
  98. //(String(arr[7]).length < 30) ? output.push(arr[7] + addingSymbol(30 - String(arr[7].length), ' ')) : output.push(arr[7]);// Вид на стоката
  99. //(String(arr[9]).length < 15 && String(arr[9]) == '') ? output.push(Number(arr[9].toFixed(2)) + addingSymbol(11 - String(arr[9].length), ' ')) : (String(arr[9]).length < 15 && String(arr[9]) != '')? output.push(arr[9] + addingSymbol(12 - String(arr[9].length))) : output.push(arr[9]) // ДО без ПДК
  100. //(String(arr[10]).length < 15) ? output.push(arr[10] + addingSymbol(15 - String(arr[10].length), ' ')) : output.push(arr[10]); // ДО с ПДК
  101. //(String(arr[11]).length < 15) ? output.push(arr[11] + addingSymbol(15 - String(arr[11].length), ' ')) : output.push(arr[11]); // ДДЗ с ПДК
  102. //(String(arr[12]).length < 15) ? output.push(arr[12] + addingSymbol(15 - String(arr[12].length), ' ')) : output.push(arr[12]); // ДО с ЧДК
  103. //(String(arr[13]).length < 15) ? output.push(arr[13] + addingSymbol(15 - String(arr[13].length), ' ')) : output.push(arr[13]); // ДДЗ с ЧДК
  104. //(String(arr[14]).length < 15) ? output.push(arr[14] + addingSymbol(15 - String(arr[14].length), ' ')) : output.push(arr[14]); // Годишни корекции по член 73
  105. //(String(arr[15]).length < 15) ? output.push(arr[15] + addingSymbol(15 - String(arr[15].length), ' ')) : output.push(arr[15]); // ДО тристранни операции
  106. //(String(arr[8]).length < 2) ? output.push(arr[8] + addingSymbol(2 - String(arr[8].length), ' ')) : output.push(arr[8]);// Доставка по чл. 163а
  107. //output.push('\r\n');
  108. }
  109.  
  110. showReference.onclick = checkIfDatesInputAreActive;
  111.  
  112. function checkIfDatesInputAreActive() {
  113. var firstDateArr = (firstDateInput.value).split('-'),
  114. secDateArr = (secDateInput.value).split('-');
  115. if (firstDateInput.value && secDateInput.value) {
  116. document.getElementById('DanPer').innerHTML = secDateArr[2] + secDateArr[1];
  117. //sending request for documents at given
  118. sendRequestToServer(['documents', 'ЛЕЙДИ СОФИЯ АД', firstDateArr.reverse().join(''), secDateArr.reverse().join(''), '', 'forward', '{"doc":"+ФЕ"}', 'false'], 'documents');
  119.  
  120. }
  121. }
  122.  
  123. function saveFile(obj) {
  124. var filename = 'POKUPKI.txt',
  125. blob = new Blob([obj], { type: 'text/plain' }),
  126. a = document.getElementById('a');
  127. a.href = webkitURL.createObjectURL(blob);
  128. a.download = filename;
  129. a.click();
  130. }
  131.  
  132.  
  133. function addingSymbol(str, num) {
  134. if (typeof str != 'string') str = String(str);
  135. var len = num - str.length,
  136. spaceArray = [str];
  137. for (var i = 0; i < len; i++) spaceArray.push(' ');
  138. return spaceArray.join('');
  139. }
  140.  
  141. var datePickerBtns = document.querySelectorAll('.open-date-picker');
  142. for (var i = 0; i < datePickerBtns.length; i++) {
  143. datePickerBtns[i].onclick = generateDateForm;
  144. }
  145.  
  146. function generateDateForm(ev) {
  147. var datePicker = document.getElementById('date-picker');
  148.  
  149. //Set the main structure of the date-picker element;
  150. datePicker.innerHTML = '<div><button>&#9668;</button><span></span><button>&#9658;</button></div><span class="hor-line"></span><div id="date-picker-week"><span>Sun</span>' +
  151. '<span>Mon</span><span>Tue</span><span>Wed</span><span>Thu</span><span>Fri</span><span>Sat</span></div><span class="hor-line"></span><div id="date-picker-days"></div>';
  152.  
  153. var monthNames = ["January", "February", "March", "April", "May", "June",
  154. "July", "August", "September", "October", "November", "December"],
  155. month = datePicker.querySelectorAll('span')[0],
  156. startOrEndDate = this.previousSibling,
  157. currentMonth = Number(startOrEndDate.value.substr(3, 2)) - 1,
  158. currentYear = Number(startOrEndDate.value.substr(6, 4));
  159.  
  160. if (datePicker.style.display == 'inline-block' && datePicker.style.left == Math.floor(this.offsetLeft - datePicker.offsetWidth / 2) + 'px') {
  161. datePicker.style.display = 'none';
  162. return;
  163. }
  164. datePicker.style.display = 'inline-block';
  165.  
  166. datePicker.style.left = Math.floor(this.offsetLeft - (datePicker.offsetWidth / 2)) + 'px';
  167. datePicker.style.top = (this.offsetTop + 23) + 'px';
  168. month.innerHTML = monthNames[currentMonth] + '&nbsp;-&nbsp;' + currentYear;
  169.  
  170. //Change months
  171. document.querySelectorAll('#date-picker button')[0].onclick = function () {
  172. if (currentMonth > 0) {
  173. currentMonth -= 1;
  174. }
  175. else {
  176. currentMonth = 11;
  177. currentYear -= 1;
  178. }
  179. month.innerHTML = monthNames[currentMonth] + '&nbsp;-&nbsp;' + currentYear;
  180. generateDays(currentMonth, currentYear);
  181. }
  182.  
  183. document.querySelectorAll('#date-picker button')[1].onclick = function () {
  184. if (currentMonth < 11) {
  185. currentMonth += 1;
  186. }
  187. else {
  188. currentMonth = 0;
  189. currentYear += 1;
  190. }
  191. month.innerHTML = monthNames[currentMonth] + '&nbsp;-&nbsp;' + currentYear;
  192. generateDays(currentMonth, currentYear);
  193. }
  194.  
  195. //Click on day to pick date
  196. datePicker.onclick = function (ev) {
  197. var target = (typeof (event) != 'undefined') ? event.srcElement : ev.target;
  198.  
  199. if (target.className == 'active-day') {
  200. var inputMonth = (Number(currentMonth) + 1 > 9) ? Number(currentMonth) + 1 : 0 + '' + (Number(currentMonth) + 1),
  201. inputDay = (target.innerHTML > 9) ? target.innerHTML : 0 + '' + target.innerHTML;
  202. startOrEndDate.value = inputDay + '-' + inputMonth + '-' + currentYear;
  203. datePicker.style.display = 'none';
  204. }
  205. }
  206.  
  207. //Add days from current month, previous month (if current month starts from week day different from Sunday)
  208. //and next month (if there is empty space at the end of the last row with days)
  209. function generateDays(chosenMonth, chosenYear) {
  210. var activeMonth = new Date(chosenYear, chosenMonth),
  211. currentMonthDays = getDaysInMonth(chosenMonth, chosenYear).length,
  212. prevMonthDays = getDaysInMonth(chosenMonth - 1, chosenYear).length,
  213. wrapper = [],
  214. nextMonthDays = 0;
  215.  
  216. for (var z = 0; z < activeMonth.getDay() ; z++) {
  217. wrapper.push('<span class="inactive-day">' + ((prevMonthDays + 1) - (activeMonth.getDay() - z)) + '</span>');
  218. nextMonthDays++;
  219. }
  220. for (var i = 1; i <= currentMonthDays; i++) {
  221. wrapper.push('<span class="active-day">' + i + '</span>');
  222. nextMonthDays++;
  223. }
  224. lastDaysLength = (nextMonthDays <= 35) ? 35 : 42;
  225. lastDaysLength = ((nextMonthDays + activeMonth.getDay()) == 28) ? 28 : lastDaysLength;
  226. for (var h = 1; h <= lastDaysLength - nextMonthDays; h++) {
  227. wrapper.push('<span class="inactive-day">' + h + '</span>');
  228. }
  229. document.getElementById('date-picker-days').innerHTML = wrapper.join('');
  230. }
  231. generateDays(currentMonth, currentYear);
  232.  
  233. //Get the number of days in month
  234. function getDaysInMonth(month, year) {
  235. var month = month;
  236. if (month < 0) {
  237. month = 11;
  238. year -= year;
  239. }
  240. var date = new Date(year, month, 1),
  241. days = [];
  242. while (date.getMonth() === month) {
  243. days.push(new Date(date));
  244. date.setDate(date.getDate() + 1);
  245. }
  246. return days;
  247. }
  248.  
  249. document.onclick = function (ev) {
  250. var target = (typeof (event) != 'undefined') ? event.srcElement : ev.target;
  251. while (target) {
  252. if (target.id == 'date-picker' || target.className == 'open-date-picker') {
  253. return;
  254. };
  255. target = target.parentNode
  256. }
  257. datePicker.style.display = 'none';
  258. }
  259. }
  260.  
  261. html :
  262.  
  263. <!DOCTYPE html>
  264. <html xmlns="http://www.w3.org/1999/xhtml">
  265. <head>
  266. <title>Покупки</title>
  267. <link href="styles/purchasesSTYLE.css" rel="stylesheet" />
  268. <meta charset="UTF-8">
  269. </head>
  270. <body>
  271. <nav>
  272. <div id="dateHolder">
  273. <label for="firstDate">От:</label><input type="text" id="firstDate" value="01-06-2014" /><button class="open-date-picker">&#x25BC;</button>
  274. <label for="secDate">До:</label><input type="text" id="secDate" value="30-06-2014" /><button class="open-date-picker">&#x25BC;</button>
  275. <br />
  276. <button id="show-reference">Изведи</button>
  277. <button id="save">Запази</button>
  278. </div>
  279. </nav>
  280. <div id="main-wrapper">
  281. <div id="nameHeader" class="table-row">
  282. <div class="table-row">
  283. <div class="table-cell">ДНЕВНИК НА ПОКУПКИТЕ</div>
  284. <div class="table-cell">&nbsp;</div>
  285. <div class="table-cell">&nbsp;</div>
  286. </div>
  287. <div class="table-row">
  288. <div class="table-cell">ИН по ЗДДС: <span id="InZDDS">ИН ЗДДС</span></div>
  289. <div class="table-cell">&nbsp;</div>
  290. <div class="table-cell">&nbsp;</div>
  291. </div>
  292. <div class="table-row">
  293. <div class="table-cell">Данъчен период: <span id="DanPer"></span></div>
  294. <div class="table-cell">&nbsp;</div>
  295. <div class="table-cell">&nbsp;</div>
  296. </div>
  297. </div>
  298. <div id="tableHeader" class="table-row">
  299. <div class="table-row">
  300. <div class="table-cell">
  301. <div class="table-cell">
  302. <div class="table-cell">N</div>
  303. <div class="table-cell">&nbsp;</div>
  304. <div class="table-cell">&nbsp;</div>
  305. <div class="table-cell">Документ</div>
  306. <div class="table-cell">&nbsp;</div>
  307. <div class="table-cell">Идентиф.</div>
  308. </div>
  309. <div class="table-cell">
  310. <div class="table-cell">по</div>
  311. <div class="table-cell">&nbsp;</div>
  312. <div class="table-cell">&nbsp;</div>
  313. <div class="table-cell">&nbsp;</div>
  314. <div class="table-cell">&nbsp;</div>
  315. <div class="table-cell">номер на контр.</div>
  316. </div>
  317. <div class="table-cell">
  318. <div class="table-cell">ред</div>
  319. <div class="table-cell">Клон</div>
  320. <div class="table-cell">Вид</div>
  321. <div class="table-cell">Номер</div>
  322. <div class="table-cell">Дата</div>
  323. <div class="table-cell">доставчик</div>
  324. </div>
  325. </div>
  326. <div class="table-cell">
  327. <div class="table-cell">
  328. <div class="table-cell">&nbsp;</div>
  329. <div class="table-cell">Вид на</div>
  330. <div class="table-cell">Доставка по</div>
  331. <div class="table-cell">ДО и данък на получ.дост. ВОП,</div>
  332. <div class="table-cell">ДО на пол.дост ВОП,чл.82 ал.2-5 ЗДДС,</div>
  333. <div class="table-cell">ДДС с право</div>
  334. <div class="table-cell">ДО на пол.дост ВОП,чл.82 ал.2-5 ЗДДС,</div>
  335. </div>
  336. <div class="table-cell">
  337. <div class="table-cell">Име на контрагента (доставчик)</div>
  338. <div class="table-cell">стоката</div>
  339. <div class="table-cell">чл. 163а</div>
  340. <div class="table-cell">чл.82,ал2-5 ЗДДС и внос без </div>
  341. <div class="table-cell">внос, ДО на получ. дост. използвани за </div>
  342. <div class="table-cell">на пълен</div>
  343. <div class="table-cell">внос, ДО на получ. дост. използвани за</div>
  344. </div>
  345. <div class="table-cell">
  346. <div class="table-cell">&nbsp;</div>
  347. <div class="table-cell">услугата</div>
  348. <div class="table-cell">от ЗДДС</div>
  349. <div class="table-cell">право на дан.кред. или без данък</div>
  350. <div class="table-cell">дост. по чл.69 ал 2 ЗДДС с право на ПДК</div>
  351. <div class="table-cell">данъчен кредит</div>
  352. <div class="table-cell">дост.по чл.69 ал.2 ЗДДС с право на ЧДК</div>
  353. </div>
  354. </div>
  355. <div class="table-cell">
  356. <div class="table-cell">
  357. <div class="table-cell">ДДС с право на</div>
  358. <div class="table-cell">Годишна корекция по</div>
  359. <div class="table-cell">ДО при придобиване</div>
  360. </div>
  361. <div class="table-cell">
  362. <div class="table-cell">частичен данъчен </div>
  363. <div class="table-cell">чл. 73, ал8 ЗДДС</div>
  364. <div class="table-cell">на стоки от тристр.</div>
  365. </div>
  366. <div class="table-cell">
  367. <div class="table-cell">кредит</div>
  368. <div class="table-cell">&nbsp;</div>
  369. <div class="table-cell">операция</div>
  370. </div>
  371. </div>
  372. </div>
  373. </div>
  374. <div id="tableHeadersFooter" class="table-row">
  375. <div class="table-cell">&nbsp;</div>
  376. <div class="table-cell">
  377. <div class="table-cell">Общо: <span></span></div>
  378. <div class="table-cell">&nbsp;</div>
  379. <div class="table-cell">&nbsp;</div>
  380. <div class="table-cell">&nbsp;</div>
  381. <div class="table-cell">&nbsp;</div>
  382. </div>
  383. <div class="table-cell">
  384. <div class="table-cell">&nbsp;</div>
  385. <div class="table-cell">&nbsp;</div>
  386. <div class="table-cell">&nbsp;</div>
  387. </div>
  388. </div>
  389. <div id="table" class="table-row">
  390. <div class="table-row">
  391. <div class="table-cell">&nbsp;</div>
  392. <div class="table-cell">&nbsp;</div>
  393. <div class="table-cell">&nbsp;</div>
  394. <div class="table-cell">&nbsp;</div>
  395. <div class="table-cell">&nbsp;</div>
  396. <div class="table-cell">&nbsp;</div>
  397. <div class="table-cell">&nbsp;</div>
  398. <div class="table-cell">&nbsp;</div>
  399. <div class="table-cell">&nbsp;</div>
  400. <div class="table-cell">&nbsp;</div>
  401. <div class="table-cell">&nbsp;</div>
  402. <div class="table-cell">&nbsp;</div>
  403. <div class="table-cell">&nbsp;</div>
  404. <div class="table-cell">&nbsp;</div>
  405. <div class="table-cell">&nbsp;</div>
  406. <div class="table-cell">&nbsp;</div>
  407. </div>
  408. </div>
  409. <div id="footer" class="table-row">
  410. <div class="table-row">
  411. <div class="table-cell">&nbsp;</div>
  412. <div class="table-cell">&nbsp;</div>
  413. <div class="table-cell footerPaintBorder">Общо без вид 11,12,13:</div>
  414. <div class="table-cell footerPaintBorder">&nbsp;</div>
  415. <div class="table-cell footerPaintBorder">&nbsp;</div>
  416. <div class="table-cell footerPaintBorder">&nbsp;</div>
  417. <div class="table-cell footerPaintBorder">&nbsp;</div>
  418. <div class="table-cell footerPaintBorder">&nbsp;</div>
  419. <div class="table-cell footerPaintBorder">&nbsp;</div>
  420. <div class="table-cell footerPaintBorder">&nbsp;</div>
  421. </div>
  422. <div class="table-row" id="footerFullSum">
  423. <div class="table-cell">&nbsp;</div>
  424. <div class="table-cell">&nbsp;</div>
  425. <div class="table-cell footerPaintBorder">Общо:</div>
  426. <div class="table-cell footerPaintBorder">&nbsp;</div>
  427. <div class="table-cell footerPaintBorder">&nbsp;</div>
  428. <div class="table-cell footerPaintBorder">&nbsp;</div>
  429. <div class="table-cell footerPaintBorder">&nbsp;</div>
  430. <div class="table-cell footerPaintBorder">&nbsp;</div>
  431. <div class="table-cell footerPaintBorder">&nbsp;</div>
  432. <div class="table-cell footerPaintBorder">&nbsp;</div>
  433. </div>
  434. <div class="table-row">
  435. <div class="table-cell">
  436. <div class="table-cell">Длъжност:</div>
  437. <div class="table-cell">Управител:</div>
  438. </div>
  439. <div class="table-cell">Подпис и печат:</div>
  440. </div>
  441. </div>
  442. </div>
  443. <div id="date-picker" style="display:none;">
  444.  
  445. </div>
  446. <a id="a"></a>
  447. <script src="scripts/purchasesJS.js"></script>
  448. </body>
  449. </html>
  450.  
  451. css :
  452.  
  453. html, body, div, span, applet, object, iframe, h1, h2, h3, h4, h5, h6, p, blockquote, pre, a, abbr, acronym, address, big, cite, code, del, dfn, em, img, ins, kbd, q, s, samp, small, strike, strong, sub, sup, tt, var, b, u, i, center, dl, dt, dd, ol, ul, li, fieldset, form, label, legend, table, caption, tbody, tfoot, thead, tr, th, td, article, aside, canvas, details, embed, figure, figcaption, footer, header, hgroup, menu, nav, output, ruby, section, summary, time, mark, audio, video {
  454. margin: 0;
  455. padding: 0;
  456. border: 0;
  457. font-size: 100%;
  458. font: inherit;
  459. vertical-align: baseline;
  460. font-family: Calibri;
  461. }
  462.  
  463. body {
  464. -moz-user-select: -moz-none;
  465. -khtml-user-select: none;
  466. -webkit-user-select: none;
  467. -ms-user-select: none;
  468. user-select: none;
  469. }
  470.  
  471. body * {
  472. box-sizing: border-box;
  473. }
  474.  
  475. div, nav {
  476. display: inline-block;
  477. float: left;
  478. }
  479.  
  480. #main-wrapper {
  481. width: 1750px;
  482. border: 1px solid #999999;
  483. margin-top: 10px;
  484. margin-left: 10px;
  485. border-right: none;
  486. font-size: 12px;
  487. }
  488.  
  489. .table-row {
  490. width: 100%;
  491. }
  492.  
  493. .table-cell {
  494. border-right: 1px solid #999999;
  495. }
  496.  
  497. #nameHeader .table-cell:nth-child(3), #tableHeader .table-cell:nth-child(3), #nameHeader .table-cell:first-child, #tableHeader .table-cell:first-child {
  498. width: 20%;
  499. }
  500.  
  501. #nameHeader .table-cell:nth-child(2), #tableHeader .table-cell:nth-child(2) {
  502. width: 60%;
  503. }
  504.  
  505. #nameHeader .table-row:nth-child(2), #nameHeader .table-row:nth-child(3), #tableHeader {
  506. text-align: center;
  507. }
  508.  
  509. #nameHeader > .table-row:first-child {
  510. font-size: 20px;
  511. font-weight: bold;
  512. }
  513.  
  514. #tableHeader .table-row .table-cell .table-cell {
  515. width: 100%;
  516. border-right: none;
  517. }
  518.  
  519. #tableHeader .table-cell .table-cell .table-cell {
  520. height: 15px;
  521. }
  522.  
  523. #tableHeader > .table-row > .table-cell:first-child > .table-cell:first-child > .table-cell:nth-child(4) {
  524. text-align: left;
  525. }
  526.  
  527. #tableHeader .table-row .table-cell:first-child .table-cell .table-cell:first-child, #tableHeader .table-row .table-cell:first-child .table-cell .table-cell:nth-child(2) {
  528. width: 9%;
  529. }
  530.  
  531. #tableHeader .table-row .table-cell:first-child .table-cell .table-cell:nth-child(3) {
  532. width: 8%;
  533. }
  534.  
  535. #tableHeader .table-row .table-cell:first-child .table-cell .table-cell:nth-child(4) {
  536. width: 24%;
  537. }
  538.  
  539. #tableHeader .table-row .table-cell:first-child .table-cell .table-cell:nth-child(5) {
  540. width: 20%;
  541. }
  542.  
  543. #tableHeader .table-row .table-cell:first-child .table-cell .table-cell:nth-child(6) {
  544. width: 30%;
  545. }
  546.  
  547. #tableHeader .table-row .table-cell:nth-child(2) .table-cell .table-cell:first-child {
  548. width: 18%;
  549. }
  550.  
  551. #tableHeader .table-row .table-cell:nth-child(2) .table-cell .table-cell:nth-child(4),
  552. #tableHeader .table-row .table-cell:nth-child(2) .table-cell .table-cell:nth-child(5), #tableHeader .table-row .table-cell:nth-child(2) .table-cell .table-cell:nth-child(7),
  553. #tableHeadersFooter .table-cell:nth-child(2) .table-cell:nth-child(2), #tableHeadersFooter .table-cell:nth-child(2) .table-cell:nth-child(3),
  554. #tableHeadersFooter .table-cell:nth-child(2) .table-cell:nth-child(5) {
  555. width: 19.75%;
  556. }
  557.  
  558. #tableHeader .table-row .table-cell:nth-child(2) .table-cell .table-cell:nth-child(6), #tableHeadersFooter .table-cell:nth-child(2) .table-cell:nth-child(4) {
  559. width: 8.75%;
  560. }
  561.  
  562. #tableHeader .table-row .table-cell:nth-child(2) .table-cell .table-cell:nth-child(2) {
  563. width: 7%;
  564. overflow: hidden;
  565. height: 14px;
  566. }
  567.  
  568. #tableHeader .table-row .table-cell:nth-child(2) .table-cell .table-cell:nth-child(3) {
  569. width: 7%;
  570. }
  571.  
  572. #tableHeader .table-row .table-cell:nth-child(3) .table-cell .table-cell:first-child, #tableHeadersFooter .table-cell:nth-child(3) .table-cell:first-child {
  573. width: 30%;
  574. }
  575.  
  576. #tableHeader .table-row .table-cell:nth-child(3) .table-cell .table-cell:nth-child(2), #tableHeader .table-row .table-cell:nth-child(3) .table-cell .table-cell:nth-child(3),
  577. #tableHeadersFooter .table-cell:nth-child(3) .table-cell:nth-child(2), #tableHeadersFooter .table-cell:nth-child(3) .table-cell:nth-child(3) {
  578. width: 35%;
  579. }
  580.  
  581.  
  582. #tableHeadersFooter .table-cell:first-child, #tableHeadersFooter .table-cell:nth-child(3) {
  583. width: 20%;
  584. border-right: none;
  585. }
  586.  
  587. #tableHeadersFooter .table-cell:nth-child(2){
  588. width: 60%;
  589. }
  590.  
  591. #tableHeadersFooter .table-cell:nth-child(2) .table-cell:first-child {
  592. width: 32%;
  593. }
  594.  
  595. #tableHeadersFooter .table-cell, #tableHeader .table-row > .table-cell:first-child .table-cell:nth-child(3) {
  596. border-right: none;
  597. }
  598.  
  599.  
  600. #tableHeadersFooter .table-cell .table-cell, #tableHeadersFooter .table-cell:first-child, #tableHeader .table-row .table-cell .table-cell .table-cell,
  601. #tableHeader .table-row .table-cell:nth-child(3) .table-cell:first-child .table-cell:last-child {
  602. border-right: 1px solid #999999;
  603. }
  604.  
  605.  
  606. #tableHeader .table-row .table-cell:first-child .table-cell:last-child .table-cell:nth-child(4), #tableHeader .table-row .table-cell:first-child .table-cell:last-child .table-cell:nth-child(3),
  607. #tableHeader .table-row .table-cell:first-child .table-cell:last-child .table-cell:nth-child(5) {
  608. border-top: 1px solid #999999;
  609. }
  610.  
  611.  
  612. #tableHeadersFooter {
  613. background: #e5e5ff;
  614. }
  615.  
  616. #tableHeadersFooter > .table-cell:nth-child(2) > .table-cell {
  617. text-align: right;
  618. }
  619.  
  620. #tableHeadersFooter > .table-cell:nth-child(2) > .table-cell:first-child {
  621. padding-right: 40px;
  622. }
  623.  
  624.  
  625. #tableHeader, #nameHeader, #tableHeadersFooter, #table .table-row {
  626. border-bottom: 1px solid #999999;
  627. }
  628.  
  629.  
  630. .footerPaintBorder {
  631. border-bottom: 1px solid #999999;
  632. background: #e5e5ff;
  633. }
  634.  
  635. #table .table-row .table-cell:first-child {
  636. width:1.85%;
  637. }
  638.  
  639. #table .table-row .table-cell:nth-child(2) {
  640. width:1.8%;
  641. }
  642.  
  643. #table .table-row .table-cell:nth-child(3) {
  644. width:1.5%;
  645. }
  646. #table .table-row .table-cell:nth-child(4) {
  647. width:4.85%;
  648. }
  649. #table .table-row .table-cell:nth-child(5) {
  650. width:4%;
  651. }
  652. #table .table-row .table-cell:nth-child(6), #table .table-row .table-cell:nth-child(14), #footer .table-row > .table-cell:nth-child(8) {
  653. width:6%;
  654. }
  655. #table .table-row .table-cell:nth-child(7), #footer .table-row > .table-cell:nth-child(2) {
  656. width:10.8%;
  657. }
  658. #table .table-row .table-cell:nth-child(8), #table .table-row .table-cell:nth-child(9) {
  659. width:4.2%;
  660. }
  661. #table .table-row .table-cell:nth-child(10), #table .table-row .table-cell:nth-child(11), #table .table-row .table-cell:nth-child(13), #footer .table-row > .table-cell:nth-child(4),
  662. #footer .table-row > .table-cell:nth-child(5), #footer .table-row > .table-cell:nth-child(7) {
  663. width:11.85%;
  664. }
  665.  
  666. #table .table-row .table-cell:nth-child(12), #footer .table-row > .table-cell:nth-child(6) {
  667. width:5.25%;
  668. }
  669.  
  670. #table .table-row .table-cell:nth-child(15), #footer .table-row > .table-cell:last-child{
  671. width:7.05%;
  672. }
  673. #table .table-row .table-cell:nth-child(16), #footer .table-row > .table-cell:nth-child(9) {
  674. width:6.95%;
  675. }
  676.  
  677. #table .table-row .table-cell {
  678. height:14px;
  679. }
  680. #table .table-row .table-cell:nth-child(8) {
  681. overflow:hidden;
  682. }
  683.  
  684. #footer .table-row .table-cell:first-child {
  685. width:20%;
  686. }
  687.  
  688. #footer .table-row .table-cell:nth-child(3) {
  689. width:8.4%;
  690. }
  691.  
  692. #footer .table-row:last-child > .table-cell:first-child .table-cell:first-child, #footer .table-row:last-child > .table-cell:first-child .table-cell:nth-child(2) {
  693. width:50%;
  694. border-right:none;
  695. padding-left:5px;
  696. }
  697.  
  698. #footer .table-row:last-child .table-cell {
  699. line-height:40px;
  700. height:40px;
  701. }
  702.  
  703. #footer .table-row:last-child > .table-cell:nth-child(2) {
  704. width:80%;
  705. padding-left: 10.85%;
  706. }
  707.  
  708. #tableHeader > .table-row > .table-cell {
  709. border-right:none;
  710. }
  711.  
  712. #a {
  713. display:none;
  714. }
  715.  
  716. /*****************************************************************************************/
  717.  
  718. #dateHolder {
  719. margin-top: 30px;
  720. margin-left: 30px;
  721. border: 1px solid #999999;
  722. background: #e9e9e9;
  723. }
  724.  
  725. #dateHolder * {
  726. margin: 10px;
  727. }
  728.  
  729. #dateHolder label {
  730. margin-right: 0;
  731. }
  732.  
  733. #firstDate, #secDate {
  734. border: 1px solid lightblue;
  735. width: 102px;
  736. padding: 4px;
  737. margin: 10px 5px;
  738. }
  739.  
  740.  
  741. #start-date {
  742. width: 100px;
  743. }
  744.  
  745.  
  746. #date-picker {
  747. position: absolute;
  748. width: 215px;
  749. padding: 5px;
  750. border: 1px solid #999999;
  751. background: rgb(252,252,252); /* Old browsers */
  752. background: -moz-radial-gradient(center, ellipse cover, rgba(252,252,252,1) 41%, rgba(221,221,221,1) 100%); /* FF3.6+ */
  753. background: -webkit-gradient(radial, center center, 0px, center center, 100%, color-stop(41%,rgba(252,252,252,1)), color-stop(100%,rgba(221,221,221,1))); /* Chrome,Safari4+ */
  754. background: -webkit-radial-gradient(center, ellipse cover, rgba(252,252,252,1) 41%,rgba(221,221,221,1) 100%); /* Chrome10+,Safari5.1+ */
  755. background: -o-radial-gradient(center, ellipse cover, rgba(252,252,252,1) 41%,rgba(221,221,221,1) 100%); /* Opera 12+ */
  756. background: -ms-radial-gradient(center, ellipse cover, rgba(252,252,252,1) 41%,rgba(221,221,221,1) 100%); /* IE10+ */
  757. background: radial-gradient(ellipse at center, rgba(252,252,252,1) 41%,rgba(221,221,221,1) 100%); /* W3C */
  758. filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#fcfcfc', endColorstr='#dddddd',GradientType=1 ); /* IE6-9 fallback on horizontal gradient */
  759. border-bottom-left-radius: 12px;
  760. border-bottom-right-radius: 12px;
  761. overflow: hidden;
  762. }
  763.  
  764. #date-picker div:first-child button:first-child, #date-picker div:first-child button:last-child {
  765. cursor: pointer;
  766. margin: -1px;
  767. height: 23px;
  768. }
  769.  
  770. #date-picker div:first-child button {
  771. float: right;
  772. }
  773.  
  774. #date-picker div:first-child button:first-child {
  775. float: left;
  776. }
  777.  
  778. #main-wrapper #date-picker div:first-child {
  779. text-align: center;
  780. width: 100%;
  781. }
  782.  
  783. #main-wrapper #date-picker div:first-child span {
  784. width: 55%;
  785. border-bottom: 1px solid #999999;
  786. padding-bottom: 1px;
  787. }
  788.  
  789. #date-picker > div {
  790. padding: 5px 0px;
  791. }
  792.  
  793. #date-picker #date-picker-week {
  794. border-bottom: 1px solid #999999;
  795. }
  796.  
  797. #date-picker > div span {
  798. width: 29px;
  799. display: inline-block;
  800. text-align: center;
  801. font-size: 14px;
  802. }
  803.  
  804. #date-picker #date-picker-days span {
  805. display: inline-block;
  806. width: 29px;
  807. padding: 5px 0px;
  808. text-align: center;
  809. }
  810.  
  811. #date-picker #date-picker-days .active-day:hover {
  812. background-color: #bdedff;
  813. cursor: pointer;
  814. }
  815.  
  816. .inactive-day {
  817. color: #aaaaaa;
  818. }
  819.  
  820. #dateHolder .open-date-picker {
  821. width: 23px;
  822. height: 25px;
  823. margin: 0;
  824. padding: 0;
  825. margin-left: -28px;
  826. background: transparent;
  827. border: 1px solid lightblue;
  828. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement