newMinutes.js 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574
  1. $(document).ready(function() {
  2. $( "#meetingDate" ).datepicker({
  3. numberOfMonths: 2
  4. });
  5. $( "#meetingDateConfirm" ).datepicker({
  6. numberOfMonths: 2
  7. });
  8. $( "#approvedOn" ).datepicker({
  9. numberOfMonths: 2
  10. });
  11. $( "#approved" ).change(function() {
  12. $value = $( "#approved").val();
  13. if($value == 'yes')
  14. {
  15. $(' #approvedOn ').prop('disabled', false);
  16. $(' #approvedOn ').select();
  17. }
  18. else
  19. {
  20. $(' #approvedOn ').prop('disabled', true);
  21. }
  22. });
  23. CKEDITOR.replace( 'openingComments', {
  24. on: {
  25. change: function() {
  26. $data = CKEDITOR.instances.openingComments.getData();
  27. $count = CKEDITOR.instances.openingComments.getData().length;
  28. if($data != "")
  29. {
  30. $('#openingCommentsLink').html("<i class=\"fi-check\"></i> Opening Comments");
  31. }
  32. else
  33. {
  34. $('#openingCommentsLink').html("Opening Comments");
  35. }
  36. //Count characters in the field
  37. $percent = ($count/10000)*100;
  38. $percent = $percent.toFixed(2);
  39. if($percent > 100)
  40. {
  41. $('#openingCommentsLimit').width('100%');
  42. $('#limit').foundation('reveal', 'open');
  43. }
  44. else
  45. {
  46. $('#openingCommentsLimit').animate({width: $percent+'%'}, 100);
  47. }
  48. }
  49. }
  50. } );
  51. CKEDITOR.replace( 'communications', {
  52. on: {
  53. change: function() {
  54. $data = CKEDITOR.instances.communications.getData();
  55. $count = CKEDITOR.instances.communications.getData().length;
  56. if($data != "")
  57. {
  58. $('#communicationsLink').html("<i class=\"fi-check\"></i> Communications");
  59. }
  60. else
  61. {
  62. $('#communicationsLink').html("Communications");
  63. }
  64. //Count characters in the field
  65. $percent = ($count/10000)*100;
  66. $percent = $percent.toFixed(2);
  67. if($percent > 100)
  68. {
  69. $('#communicationsLimit').width('100%');
  70. $('#limit').foundation('reveal', 'open');
  71. }
  72. else
  73. {
  74. $('#communicationsLimit').animate({width: $percent+'%'}, 100);
  75. }
  76. }
  77. }
  78. } );
  79. CKEDITOR.replace( 'cityCouncil', {
  80. on: {
  81. change: function() {
  82. $data = CKEDITOR.instances.cityCouncil.getData();
  83. $count = CKEDITOR.instances.cityCouncil.getData().length;
  84. if($data != "")
  85. {
  86. $('#cityCouncilLink').html("<i class=\"fi-check\"></i> City Council");
  87. }
  88. else
  89. {
  90. $('#cityCouncilLink').html("City Council");
  91. }
  92. //Count characters in the field
  93. $percent = ($count/10000)*100;
  94. $percent = $percent.toFixed(2);
  95. if($percent > 100)
  96. {
  97. $('#cityCouncilLimit').width('100%');
  98. $('#limit').foundation('reveal', 'open');
  99. }
  100. else
  101. {
  102. $('#cityCouncilLimit').animate({width: $percent+'%'}, 100);
  103. }
  104. }
  105. }
  106. } );
  107. CKEDITOR.replace( 'foundation', {
  108. on: {
  109. change: function() {
  110. $data = CKEDITOR.instances.foundation.getData();
  111. $count = CKEDITOR.instances.foundation.getData().length;
  112. if($data != "")
  113. {
  114. $('#foundationLink').html("<i class=\"fi-check\"></i> Foundation");
  115. }
  116. else
  117. {
  118. $('#foundationLink').html("Foundation");
  119. }
  120. //Count characters in the field
  121. $percent = ($count/10000)*100;
  122. $percent = $percent.toFixed(2);
  123. if($percent > 100)
  124. {
  125. $('#foundationLimit').width('100%');
  126. $('#limit').foundation('reveal', 'open');
  127. }
  128. else
  129. {
  130. $('#foundationLimit').animate({width: $percent+'%'}, 100);
  131. }
  132. }
  133. }
  134. } );
  135. CKEDITOR.replace( 'financeBudgeting', {
  136. on: {
  137. change: function() {
  138. $data = CKEDITOR.instances.financeBudgeting.getData();
  139. $count = CKEDITOR.instances.financeBudgeting.getData().length;
  140. if($data != "")
  141. {
  142. $('#financeBudgetingLink').html("<i class=\"fi-check\"></i> Finance & Budgeting");
  143. }
  144. else
  145. {
  146. $('#financeBudgetingLink').html("Finance & Budgeting");
  147. }
  148. //Count characters in the field
  149. $percent = ($count/10000)*100;
  150. $percent = $percent.toFixed(2);
  151. if($percent > 100)
  152. {
  153. $('#financeBudgetLimit').width('100%');
  154. $('#limit').foundation('reveal', 'open');
  155. }
  156. else
  157. {
  158. $('#financeBudgetLimit').animate({width: $percent+'%'}, 100);
  159. }
  160. }
  161. }
  162. } );
  163. CKEDITOR.replace( 'buildingGrounds', {
  164. on: {
  165. change: function() {
  166. $data = CKEDITOR.instances.buildingGrounds.getData();
  167. $count = CKEDITOR.instances.buildingGrounds.getData().length;
  168. if($data != "")
  169. {
  170. $('#buildingGroundsLink').html("<i class=\"fi-check\"></i> Building & Grounds");
  171. }
  172. else
  173. {
  174. $('#buildingGroundsLink').html("Building & Grounds");
  175. }
  176. //Count characters in the field
  177. $percent = ($count/10000)*100;
  178. $percent = $percent.toFixed(2);
  179. if($percent > 100)
  180. {
  181. $('#buildingGroundsLimit').width('100%');
  182. $('#limit').foundation('reveal', 'open');
  183. }
  184. else
  185. {
  186. $('#buildingGroundsLimit').animate({width: $percent+'%'}, 100);
  187. }
  188. }
  189. }
  190. } );
  191. CKEDITOR.replace( 'planningPublicRelations', {
  192. on: {
  193. change: function() {
  194. $data = CKEDITOR.instances.planningPublicRelations.getData();
  195. $count = CKEDITOR.instances.planningPublicRelations.getData().length;
  196. if($data != "")
  197. {
  198. $('#planningPublicRelationsLink').html("<i class=\"fi-check\"></i> Planning & Public Relations");
  199. }
  200. else
  201. {
  202. $('#planningPublicRelationsLink').html("Planning & Public Relations");
  203. }
  204. //Count characters in the field
  205. $percent = ($count/10000)*100;
  206. $percent = $percent.toFixed(2);
  207. if($percent > 100)
  208. {
  209. $('#planningPublicRelationsLimit').width('100%');
  210. $('#limit').foundation('reveal', 'open');
  211. }
  212. else
  213. {
  214. $('#planningPublicRelationsLimit').animate({width: $percent+'%'}, 100);
  215. }
  216. }
  217. }
  218. } );
  219. CKEDITOR.replace( 'operationsPersonnel', {
  220. on: {
  221. change: function() {
  222. $data = CKEDITOR.instances.operationsPersonnel.getData();
  223. $count = CKEDITOR.instances.operationsPersonnel.getData().length;
  224. if($data != "")
  225. {
  226. $('#operationsPersonnelLink').html("<i class=\"fi-check\"></i> Operations & Personnel");
  227. }
  228. else
  229. {
  230. $('#operationsPersonnelLink').html("Operations/Personnel");
  231. }
  232. //Count characters in the field
  233. $percent = ($count/10000)*100;
  234. $percent = $percent.toFixed(2);
  235. if($percent > 100)
  236. {
  237. $('#operationsPersonnelLimit').width('100%');
  238. $('#limit').foundation('reveal', 'open');
  239. }
  240. else
  241. {
  242. $('#operationsPersonnelLimit').animate({width: $percent+'%'}, 100);
  243. }
  244. }
  245. }
  246. } );
  247. CKEDITOR.replace( 'businessIssues', {
  248. on: {
  249. change: function() {
  250. $data = CKEDITOR.instances.businessIssues.getData();
  251. $count = CKEDITOR.instances.businessIssues.getData().length;
  252. if($data != "")
  253. {
  254. $('#businessIssuesLink').html("<i class=\"fi-check\"></i> Business Issues");
  255. }
  256. else
  257. {
  258. $('#businessIssuesLink').html("Business Issues");
  259. }
  260. //Count characters in the field
  261. $percent = ($count/10000)*100;
  262. $percent = $percent.toFixed(2);
  263. if($percent > 100)
  264. {
  265. $('#businessIssuesLimit').width('100%');
  266. $('#limit').foundation('reveal', 'open');
  267. }
  268. else
  269. {
  270. $('#businessIssuesLimit').animate({width: $percent+'%'}, 100);
  271. }
  272. }
  273. }
  274. } );
  275. CKEDITOR.replace( 'libraryStaff', {
  276. on: {
  277. change: function() {
  278. $data = CKEDITOR.instances.libraryStaff.getData();
  279. $count = CKEDITOR.instances.libraryStaff.getData().length;
  280. if($data != "")
  281. {
  282. $('#libraryStaffLink').html("<i class=\"fi-check\"></i> Library Staff Report");
  283. }
  284. else
  285. {
  286. $('#libraryStaffLink').html("Library Staff Report");
  287. }
  288. //Count characters in the field
  289. $percent = ($count/10000)*100;
  290. $percent = $percent.toFixed(2);
  291. if($percent > 100)
  292. {
  293. $('#libraryStaffLimit').width('100%');
  294. $('#limit').foundation('reveal', 'open');
  295. }
  296. else
  297. {
  298. $('#libraryStaffLimit').animate({width: $percent+'%'}, 100);
  299. }
  300. }
  301. }
  302. } );
  303. CKEDITOR.replace( 'libraryDirector', {
  304. on: {
  305. change: function() {
  306. $data = CKEDITOR.instances.libraryDirector.getData();
  307. $count = CKEDITOR.instances.libraryDirector.getData().length;
  308. if($data != "")
  309. {
  310. $('#libraryDirectorLink').html("<i class=\"fi-check\"></i> Library Director Report");
  311. }
  312. else
  313. {
  314. $('#libraryDirectorLink').html("Library Director Report");
  315. }
  316. //Count characters in the field
  317. $percent = ($count/10000)*100;
  318. $percent = $percent.toFixed(2);
  319. if($percent > 100)
  320. {
  321. $('#libraryDirectorLimit').width('100%');
  322. $('#limit').foundation('reveal', 'open');
  323. }
  324. else
  325. {
  326. $('#libraryDirectorLimit').animate({width: $percent+'%'}, 100);
  327. }
  328. }
  329. }
  330. } );
  331. CKEDITOR.replace( 'publicComment', {
  332. on: {
  333. change: function() {
  334. $data = CKEDITOR.instances.publicComment.getData();
  335. $count = CKEDITOR.instances.publicComment.getData().length;
  336. if($data != "")
  337. {
  338. $('#publicCommentLink').html("<i class=\"fi-check\"></i> Public Comment");
  339. }
  340. else
  341. {
  342. $('#publicCommentLink').html("Public Comment");
  343. }
  344. //Count characters in the field
  345. $percent = ($count/10000)*100;
  346. $percent = $percent.toFixed(2);
  347. if($percent > 100)
  348. {
  349. $('#publicCommentLimit').width('100%');
  350. $('#limit').foundation('reveal', 'open');
  351. }
  352. else
  353. {
  354. $('#publicCommentLimit').animate({width: $percent+'%'}, 100);
  355. }
  356. }
  357. }
  358. } );
  359. CKEDITOR.replace( 'additionalComments', {
  360. on: {
  361. change: function() {
  362. $data = CKEDITOR.instances.additionalComments.getData();
  363. $count = CKEDITOR.instances.additionalComments.getData().length;
  364. if($data != "")
  365. {
  366. $('#additionalCommentsLink').html("<i class=\"fi-check\"></i> Addtional Comments");
  367. }
  368. else
  369. {
  370. $('#additionalCommentsLink').html("Additional Comments");
  371. }
  372. //Count characters in the field
  373. $percent = ($count/10000)*100;
  374. $percent = $percent.toFixed(2);
  375. if($percent > 100)
  376. {
  377. $('#additionalCommentsLimit').width('100%');
  378. $('#limit').foundation('reveal', 'open');
  379. }
  380. else
  381. {
  382. $('#additionalCommentsLimit').animate({width: $percent+'%'}, 100);
  383. }
  384. }
  385. }
  386. } );
  387. $data = CKEDITOR.instances.openingComments.getData();
  388. if($data != "")
  389. {
  390. $('#openingCommentsLink').html("<i class=\"fi-check\"></i> Opening Comments");
  391. }
  392. else
  393. {
  394. $('#openingCommentsLink').html("Opening Comments");
  395. }
  396. $data = CKEDITOR.instances.communications.getData();
  397. if($data != "")
  398. {
  399. $('#communicationsLink').html("<i class=\"fi-check\"></i> Communications");
  400. }
  401. else
  402. {
  403. $('#communicationsLink').html("Communications");
  404. }
  405. $data = CKEDITOR.instances.cityCouncil.getData();
  406. if($data != "")
  407. {
  408. $('#cityCouncilLink').html("<i class=\"fi-check\"></i> City Council");
  409. }
  410. else
  411. {
  412. $('#cityCouncilLink').html("City Council");
  413. }
  414. $data = CKEDITOR.instances.foundation.getData();
  415. if($data != "")
  416. {
  417. $('#foundationLink').html("<i class=\"fi-check\"></i> Foundation");
  418. }
  419. else
  420. {
  421. $('#foundationLink').html("Foundation");
  422. }
  423. $data = CKEDITOR.instances.financeBudgeting.getData();
  424. if($data != "")
  425. {
  426. $('#financeBudgetingLink').html("<i class=\"fi-check\"></i> Finance & Budgeting");
  427. }
  428. else
  429. {
  430. $('#financeBudgetingLink').html("Finance & Budgeting");
  431. }
  432. $data = CKEDITOR.instances.buildingGrounds.getData();
  433. if($data != "")
  434. {
  435. $('#buildingGroundsLink').html("<i class=\"fi-check\"></i> Building & Grounds");
  436. }
  437. else
  438. {
  439. $('#buildingGroundsLink').html("Building & Grounds");
  440. }
  441. $data = CKEDITOR.instances.planningPublicRelations.getData();
  442. if($data != "")
  443. {
  444. $('#planningPublicRelationsLink').html("<i class=\"fi-check\"></i> Planning & Public Relations");
  445. }
  446. else
  447. {
  448. $('#planningPublicRelationsLink').html("Planning & Public Relations");
  449. }
  450. $data = CKEDITOR.instances.operationsPersonnel.getData();
  451. if($data != "")
  452. {
  453. $('#operationsPersonnelLink').html("<i class=\"fi-check\"></i> Operations & Personnel");
  454. }
  455. else
  456. {
  457. $('#operationsPersonnelLink').html("Operations & Personnel");
  458. }
  459. $data = CKEDITOR.instances.businessIssues.getData();
  460. if($data != "")
  461. {
  462. $('#businessIssuesLink').html("<i class=\"fi-check\"></i> Business Issues");
  463. }
  464. else
  465. {
  466. $('#businessIssuesLink').html("Business Issues");
  467. }
  468. $data = CKEDITOR.instances.libraryStaff.getData();
  469. if($data != "")
  470. {
  471. $('#libraryStaffLink').html("<i class=\"fi-check\"></i> Library Staff");
  472. }
  473. else
  474. {
  475. $('#libraryStaffLink').html("Library Staff");
  476. }
  477. $data = CKEDITOR.instances.libraryDirector.getData();
  478. if($data != "")
  479. {
  480. $('#libraryDirectorLink').html("<i class=\"fi-check\"></i> Library Director");
  481. }
  482. else
  483. {
  484. $('#libraryDirectorLink').html("Library Director");
  485. }
  486. $data = CKEDITOR.instances.publicComment.getData();
  487. if($data != "")
  488. {
  489. $('#publicCommentLink').html("<i class=\"fi-check\"></i> Public Comment");
  490. }
  491. else
  492. {
  493. $('#publicCommentLink').html("Public Comment");
  494. }
  495. $data = CKEDITOR.instances.additionalComments.getData();
  496. if($data != "")
  497. {
  498. $('#additionalCommentsLink').html("<i class=\"fi-check\"></i> Additional Comments");
  499. }
  500. else
  501. {
  502. $('#additionalCommentsLink').html("Additional Comments");
  503. }
  504. });