.docxpressoPlugin { font-size: 83.35%; } .h5p_layout { box-sizing: content-box !important; } .h5p_layout *{ float: none; text-align: initial; box-sizing: border-box; } /*to make sure that floating elements are always inside the document bounds*/ .h5p_layout:after { content: " "; display: block; height: 0; clear: both; visibility: hidden; } /* a default layout for documents without maste styles */ .h5p_default_layout { margin-top: 3.6rem; margin-left: 8.50464rem; margin-bottom: 3.6rem; margin-right: 8.50464rem; writing-mode: lr-tb; } /*hack for IE */ wbr:after { content: "\00200B"; } /*hack to get some extra top margin for anchors if needed*/ .h5p_layout span[id^="_Toc"]{ padding-top: 10px; margin-top: -10px; } /* Remove unwanted numbering styles */ .h5p_layout .removeNumbering:before{ content: initial !important; display: none; all: initial !important; } /* give zero default top and bottom paddings for paragraphs*/ .h5p_layout p { color: #000000; line-height: 1; margin-top: 0; margin-bottom: 0; } .h5p_layout span { color: #000000; font-weight: normal; } .h5p_layout span.dropcap { color: inherit; font-family: inherit !important; } .h5p_layout h1, .h5p_layout h2, .h5p_layout h3, .h5p_layout h4, .h5p_layout h5, .h5p_layout h6 { margin-top: 0; margin-bottom: 0; font-family: inherit; font-weight: 500; line-height: 1; color: inherit; } /* give zero default top and bottom paddings for paragraphs in tables*/ .h5p_layout table p { margin-top: 0; margin-bottom: 0; } .h5p_layout ul, .h5p_layout ol { list-style-type: none; margin-top: 0; margin-bottom: 0.5em; padding-left: 0; } .h5p_layout ul li, .h5p_layout ol li { list-style-type: none; margin-top: 0; margin-bottom: 0.5em; } .h5p_layout li p { margin-top: 0; margin-bottom: 0; } .h5p_layout table { border: none; } .h5p_layout td { vertical-align: top; border: none; } .h5p_layout th { vertical-align: top; border: none; } .h5p_layout div { margin-bottom: 10pt; } .h5p_layout img { margin: 0; padding: 0; } .h5p_layout ul ul { margin-top: 0; margin-bottom: 0; } .h5p_layout li { margin-top: 0; margin-bottom: 0; list-style-type: none !important; } .h5p_layout ul, .h5p_layout ol { list-style-type: none !important; } .h5p_layout td[data-sorting] p:before, .h5p_layout th[data-sorting] p:before { content: ' '; padding-right: 16px; background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAsAAAALAQMAAACTYuVlAAAAA3NCSVQICAjb4U/gAAAABlBMVEUjLTD////tm/tRAAAACXBIWXMAAAsSAAALEgHS3X78AAAAFnRFWHRDcmVhdGlvbiBUaW1lADAyLzEwLzE2RFpLjQAAACB0RVh0U29mdHdhcmUATWFjcm9tZWRpYSBGaXJld29ya3MgTVi7kSokAAAAI0lEQVR4nGP4/4Dh9wOGjw8YHjxgOJDA8B9MPgCLAMX/PwAANZUStiyS6NsAAAAASUVORK5CYII=); background-position: left center; background-repeat: no-repeat; } .sortDecorator { border-bottom: 3px solid #b70000 !important; } /* This is a spacial class designed to remove unwanted bullets when a li has ul as its first child*/ .h5p_layout .removeBullet:before { content: none !important; } /*responsive tables*/ .h5p_layout div.dxoResponsiveTable{ margin: 0 !important; padding: 0 !important; overflow-x: auto !important; overflow-y: hidden; } /* chart tooltips */ .c3-tooltip-container td.name { white-space: nowrap; } /* External services*/ .h5p_layout iframe { resize: vertical; border: 1px solid #fff; } .h5p_layout div.youtube { position:relative; padding-bottom:56.25%; height:0; overflow:hidden; background-color: transparent; } .h5p_layout div.youtube iframe { resize: none; position:absolute; top:0; left:0; width:100%; height:100%; } div#h5p_6a7bf4bb5b330 ul.LFO1 {counter-reset: ulLFO1_1;margin-left: 0;padding: 0; list-style-type: none;font-size: 11pt;} div#h5p_6a7bf4bb5b330 ul.LFO1 ul {counter-reset: ulLFO1_2;margin-left: -0.5in;padding: 0; list-style-type: none;font-size: 11pt;} div#h5p_6a7bf4bb5b330 ul.LFO1 li {margin-left: 0.5in;text-indent: -0.25in;font-size: 11pt;} div#h5p_6a7bf4bb5b330 ul.LFO1 li:before {counter-increment: ulLFO1_1;content: counter(ulLFO1_1, decimal) ". ";margin-left: -0.25in;display: table-cell;} div#h5p_6a7bf4bb5b330 ul.LFO1 ul ul {counter-reset: ulLFO1_3;margin-left: -1in;padding: 0; list-style-type: none;font-size: 11pt;} div#h5p_6a7bf4bb5b330 ul.LFO1 li ul li {margin-left: 1in;text-indent: -0.25in;font-size: 11pt;} div#h5p_6a7bf4bb5b330 ul.LFO1 li ul li:before {counter-increment: ulLFO1_2;content: counter(ulLFO1_2, lower-latin) ". ";margin-left: -0.25in;display: table-cell;} div#h5p_6a7bf4bb5b330 ul.LFO1 ul ul ul {counter-reset: ulLFO1_4;margin-left: -1.5in;padding: 0; list-style-type: none;font-size: 11pt;} div#h5p_6a7bf4bb5b330 ul.LFO1 li ul li ul li {margin-left: 1.5in;text-indent: -0.125in;font-size: 11pt;} div#h5p_6a7bf4bb5b330 ul.LFO1 li ul li ul li:before {counter-increment: ulLFO1_3;content: counter(ulLFO1_3, lower-roman) ". ";margin-left: -0.125in;display: table-cell;} div#h5p_6a7bf4bb5b330 ul.LFO1 ul ul ul ul {counter-reset: ulLFO1_5;margin-left: -2in;padding: 0; list-style-type: none;font-size: 11pt;} div#h5p_6a7bf4bb5b330 ul.LFO1 li ul li ul li ul li {margin-left: 2in;text-indent: -0.25in;font-size: 11pt;} div#h5p_6a7bf4bb5b330 ul.LFO1 li ul li ul li ul li:before {counter-increment: ulLFO1_4;content: counter(ulLFO1_4, decimal) ". ";margin-left: -0.25in;display: table-cell;} div#h5p_6a7bf4bb5b330 ul.LFO1 ul ul ul ul ul {counter-reset: ulLFO1_6;margin-left: -2.5in;padding: 0; list-style-type: none;font-size: 11pt;} div#h5p_6a7bf4bb5b330 ul.LFO1 li ul li ul li ul li ul li {margin-left: 2.5in;text-indent: -0.25in;font-size: 11pt;} div#h5p_6a7bf4bb5b330 ul.LFO1 li ul li ul li ul li ul li:before {counter-increment: ulLFO1_5;content: counter(ulLFO1_5, lower-latin) ". ";margin-left: -0.25in;display: table-cell;} div#h5p_6a7bf4bb5b330 ul.LFO1 ul ul ul ul ul ul {counter-reset: ulLFO1_7;margin-left: -3in;padding: 0; list-style-type: none;font-size: 11pt;} div#h5p_6a7bf4bb5b330 ul.LFO1 li ul li ul li ul li ul li ul li {margin-left: 3in;text-indent: -0.125in;font-size: 11pt;} div#h5p_6a7bf4bb5b330 ul.LFO1 li ul li ul li ul li ul li ul li:before {counter-increment: ulLFO1_6;content: counter(ulLFO1_6, lower-roman) ". ";margin-left: -0.125in;display: table-cell;} div#h5p_6a7bf4bb5b330 ul.LFO1 ul ul ul ul ul ul ul {counter-reset: ulLFO1_8;margin-left: -3.5in;padding: 0; list-style-type: none;font-size: 11pt;} div#h5p_6a7bf4bb5b330 ul.LFO1 li ul li ul li ul li ul li ul li ul li {margin-left: 3.5in;text-indent: -0.25in;font-size: 11pt;} div#h5p_6a7bf4bb5b330 ul.LFO1 li ul li ul li ul li ul li ul li ul li:before {counter-increment: ulLFO1_7;content: counter(ulLFO1_7, decimal) ". ";margin-left: -0.25in;display: table-cell;} div#h5p_6a7bf4bb5b330 ul.LFO1 ul ul ul ul ul ul ul ul {counter-reset: ulLFO1_9;margin-left: -4in;padding: 0; list-style-type: none;font-size: 11pt;} div#h5p_6a7bf4bb5b330 ul.LFO1 li ul li ul li ul li ul li ul li ul li ul li {margin-left: 4in;text-indent: -0.25in;font-size: 11pt;} div#h5p_6a7bf4bb5b330 ul.LFO1 li ul li ul li ul li ul li ul li ul li ul li:before {counter-increment: ulLFO1_8;content: counter(ulLFO1_8, lower-latin) ". ";margin-left: -0.25in;display: table-cell;} div#h5p_6a7bf4bb5b330 ul.LFO1 ul ul ul ul ul ul ul ul ul {counter-reset: ulLFO1_10;margin-left: -4.5in;padding: 0; list-style-type: none;font-size: 11pt;} div#h5p_6a7bf4bb5b330 ul.LFO1 li ul li ul li ul li ul li ul li ul li ul li ul li {margin-left: 4.5in;text-indent: -0.125in;font-size: 11pt;} div#h5p_6a7bf4bb5b330 ul.LFO1 li ul li ul li ul li ul li ul li ul li ul li ul li:before {counter-increment: ulLFO1_9;content: counter(ulLFO1_9, lower-roman) ". ";margin-left: -0.125in;display: table-cell;} div#h5p_6a7bf4bb5b330 p.P1 {break-before: page !important;text-align: justify !important;line-height: 1.5 !important;font-size: 11pt;} div#h5p_6a7bf4bb5b330 p.P1 span {hyphenate: false;font-family: Times New Roman;font-weight: bold;font-size: 12pt;text-decoration: single;text-decoration: underline;text-decoration-style: solid;language: en;country: US;} div#h5p_6a7bf4bb5b330 p.P2 {text-align: justify !important;line-height: 1.5 !important;font-size: 11pt;} div#h5p_6a7bf4bb5b330 p.P2 span {hyphenate: false;font-family: Times New Roman;font-size: 12pt;language: en;country: US;} div#h5p_6a7bf4bb5b330 p.P3 {text-align: justify !important;line-height: 1.5 !important;font-size: 11pt;} div#h5p_6a7bf4bb5b330 span.T4 {font-family: Times New Roman !important;font-weight: bold !important;font-style: italic !important;font-size: 12pt !important;language: en !important;country: US !important;} div#h5p_6a7bf4bb5b330 p.P5 {text-align: justify !important;line-height: 1.5 !important;font-size: 11pt;} div#h5p_6a7bf4bb5b330 p.P5 span {hyphenate: false;font-family: Times New Roman;font-weight: bold;font-style: italic;font-size: 12pt;language: en;country: US;} div#h5p_6a7bf4bb5b330 p.P6 {text-align: justify !important;line-height: 1.5 !important;font-size: 11pt;} div#h5p_6a7bf4bb5b330 p.P6 span {hyphenate: false;font-family: Times New Roman;font-size: 12pt;language: en;country: US;} div#h5p_6a7bf4bb5b330 p.P7 {text-align: justify !important;line-height: 1.5 !important;font-size: 11pt;} div#h5p_6a7bf4bb5b330 p.P7 span {hyphenate: false;font-family: Times New Roman;font-weight: bold;font-size: 12pt;text-decoration: single;text-decoration: underline;text-decoration-style: solid;language: en;country: US;} div#h5p_6a7bf4bb5b330 p.P8 {text-align: justify !important;line-height: 1.5 !important;font-size: 11pt;} div#h5p_6a7bf4bb5b330 span.T9 {font-family: Times New Roman !important;font-size: 12pt !important;language: en !important;country: US !important;} div#h5p_6a7bf4bb5b330 span.T10 {font-family: Times New Roman !important;font-size: 12pt !important;language: en !important;country: US !important;} div#h5p_6a7bf4bb5b330 span.T11 {font-family: Times New Roman !important;font-size: 12pt !important;language: en !important;country: US !important;} div#h5p_6a7bf4bb5b330 span.T12 {font-family: Times New Roman !important;font-size: 12pt !important;language: en !important;country: US !important;} div#h5p_6a7bf4bb5b330 span.T13 {font-family: Times New Roman !important;font-size: 12pt !important;language: en !important;country: US !important;} div#h5p_6a7bf4bb5b330 span.T14 {font-family: Times New Roman !important;font-size: 12pt !important;language: en !important;country: US !important;} div#h5p_6a7bf4bb5b330 span.T15 {font-family: Times New Roman !important;font-size: 12pt !important;language: en !important;country: US !important;} div#h5p_6a7bf4bb5b330 span.T16 {font-family: Times New Roman !important;font-size: 12pt !important;language: en !important;country: US !important;} div#h5p_6a7bf4bb5b330 span.T17 {font-family: Times New Roman !important;font-size: 12pt !important;language: en !important;country: US !important;} div#h5p_6a7bf4bb5b330 span.T18 {font-family: Times New Roman !important;vertical-align: super; font-size: 66.6% !important;font-size: 12pt !important;language: en !important;country: US !important;} div#h5p_6a7bf4bb5b330 span.T19 {font-family: Times New Roman !important;font-size: 12pt !important;language: en !important;country: US !important;} div#h5p_6a7bf4bb5b330 p.P20 {text-align: justify !important;line-height: 1.5 !important;font-size: 11pt;} div#h5p_6a7bf4bb5b330 span.T21 {font-family: Times New Roman !important;font-weight: bold !important;font-style: italic !important;font-size: 12pt !important;language: en !important;country: US !important;} div#h5p_6a7bf4bb5b330 p.P22 {text-align: justify !important;line-height: 1.5 !important;font-size: 11pt;} div#h5p_6a7bf4bb5b330 p.P22 span {hyphenate: false;font-family: Times New Roman;font-size: 12pt;language: en;country: US;} div#h5p_6a7bf4bb5b330 p.P23 {text-align: justify !important;line-height: 1.5 !important;font-size: 11pt;} div#h5p_6a7bf4bb5b330 p.P23 span {hyphenate: false;font-family: Times New Roman;font-weight: bold;font-style: italic;font-size: 12pt;language: en;country: US;} div#h5p_6a7bf4bb5b330 p.P24 {text-align: justify !important;line-height: 1.5 !important;font-size: 11pt;} div#h5p_6a7bf4bb5b330 p.P24 span {hyphenate: false;font-family: Times New Roman;font-size: 12pt;language: en;country: US;} div#h5p_6a7bf4bb5b330 p.P25 {text-align: justify !important;line-height: 1.5 !important;font-size: 11pt;} div#h5p_6a7bf4bb5b330 p.P25 span {hyphenate: false;font-family: Times New Roman;font-weight: bold;font-style: italic;font-size: 12pt;language: en;country: US;} div#h5p_6a7bf4bb5b330 p.P26 {text-align: justify !important;line-height: 1.5 !important;font-size: 11pt;} div#h5p_6a7bf4bb5b330 p.P26 span {hyphenate: false;font-family: Times New Roman;font-size: 12pt;language: en;country: US;} div#h5p_6a7bf4bb5b330 p.P27 {text-align: justify !important;line-height: 1.5 !important;font-size: 11pt;} div#h5p_6a7bf4bb5b330 p.P27 span {hyphenate: false;font-family: Times New Roman;font-size: 12pt;language: en;country: US;} div#h5p_6a7bf4bb5b330 p.P28 {text-align: justify !important;line-height: 1.5 !important;font-size: 11pt;} div#h5p_6a7bf4bb5b330 p.P28 span {hyphenate: false;font-family: Times New Roman;font-size: 12pt;language: en;country: US;} div#h5p_6a7bf4bb5b330 p.P29 {text-align: justify !important;line-height: 1.5 !important;font-size: 11pt;} div#h5p_6a7bf4bb5b330 span.T30 {font-family: Times New Roman !important;font-weight: bold !important;font-style: italic !important;font-size: 12pt !important;language: en !important;country: US !important;} div#h5p_6a7bf4bb5b330 p.P31 {text-align: justify !important;line-height: 1.5 !important;font-size: 11pt;} div#h5p_6a7bf4bb5b330 p.P31 span {hyphenate: false;font-family: Times New Roman;font-weight: bold;font-style: italic;font-size: 12pt;language: en;country: US;} div#h5p_6a7bf4bb5b330 p.P32 {text-align: justify !important;line-height: 1.5 !important;font-size: 11pt;} div#h5p_6a7bf4bb5b330 p.P32 span {hyphenate: false;font-family: Times New Roman;font-size: 12pt;language: en;country: US;} div#h5p_6a7bf4bb5b330 p.P33 {text-align: justify !important;line-height: 1.5 !important;font-size: 11pt;} div#h5p_6a7bf4bb5b330 p.P33 span {hyphenate: false;font-family: Times New Roman;font-size: 12pt;language: en;country: US;} div#h5p_6a7bf4bb5b330 p.P34 {text-align: justify !important;line-height: 1.5 !important;font-size: 11pt;} div#h5p_6a7bf4bb5b330 p.P34 span {hyphenate: false;font-family: Times New Roman;font-size: 12pt;language: en;country: US;} div#h5p_6a7bf4bb5b330 p.P35 {font-size: 11pt;} div#h5p_6a7bf4bb5b330 p.P35 span {hyphenate: false;font-family: Times New Roman;font-size: 12pt;language: en;country: US;} div#h5p_6a7bf4bb5b330 p.P36 {font-size: 11pt;} div#h5p_6a7bf4bb5b330 p.P36 span {hyphenate: false;font-family: Times New Roman;font-size: 12pt;language: en;country: US;} div#h5p_6a7bf4bb5b330 p.P37 {font-size: 11pt;} div#h5p_6a7bf4bb5b330 p.P37 span {hyphenate: false;font-family: Times New Roman;font-size: 12pt;language: en;country: US;} div#h5p_6a7bf4bb5b330 p.P38 {font-size: 11pt;} div#h5p_6a7bf4bb5b330 p.P38 span {hyphenate: false;font-family: Times New Roman;font-size: 12pt;language: en;country: US;} div#h5p_6a7bf4bb5b330 p.P39 {font-size: 11pt;} div#h5p_6a7bf4bb5b330 p.P39 span {hyphenate: false;font-family: Times New Roman;font-size: 12pt;language: en;country: US;} div#h5p_6a7bf4bb5b330 p.P40 {font-size: 11pt;} div#h5p_6a7bf4bb5b330 p.P40 span {hyphenate: false;font-family: Times New Roman;font-size: 12pt;language: en;country: US;} div#h5p_6a7bf4bb5b330 p.P41 {font-size: 11pt;} div#h5p_6a7bf4bb5b330 p.P41 span {hyphenate: false;font-family: Times New Roman;font-size: 12pt;language: en;country: US;} div#h5p_6a7bf4bb5b330 p.P42 {font-size: 11pt;} div#h5p_6a7bf4bb5b330 span.T43 {font-family: Times New Roman !important;font-size: 12pt !important;language: en !important;country: US !important;} div#h5p_6a7bf4bb5b330 div.a0 {border: none !important;background-color: transparent !important;font-size: 11pt;} div#h5p_6a7bf4bb5b330 div.a1 {border: none !important;background-color: transparent !important;font-size: 11pt;} div#h5p_6a7bf4bb5b330 div.a2 {border: none !important;background-color: transparent !important;font-size: 11pt;} div#h5p_6a7bf4bb5b330 p.Normal {font-size: 11pt;} div#h5p_6a7bf4bb5b330 p.Normal span {hyphenate: false;font-size: 11pt;} div#h5p_6a7bf4bb5b330 span.DefaultParagraphFont {font-size: 11pt;} div#h5p_6a7bf4bb5b330 p.ListParagraph {margin-left: 0.5in !important;font-size: 11pt;} div#h5p_6a7bf4bb5b330 p.ListParagraph span {hyphenate: false;hyphenate: false;font-size: 11pt;} div#h5p_6a7bf4bb5b330 div {font-size: 11pt;} div#h5p_6a7bf4bb5b330 div.Graphics {font-size: 11pt;} div#h5p_6a7bf4bb5b330 p.P3 span {hyphenate: false;hyphenate: false;font-size: 11pt;} div#h5p_6a7bf4bb5b330 p.P8 span {hyphenate: false;hyphenate: false;font-size: 11pt;} div#h5p_6a7bf4bb5b330 p.P20 span {hyphenate: false;hyphenate: false;font-size: 11pt;} div#h5p_6a7bf4bb5b330 p.P29 span {hyphenate: false;hyphenate: false;font-size: 11pt;} div#h5p_6a7bf4bb5b330 p.P42 span {hyphenate: false;hyphenate: false;font-size: 11pt;} div#h5p_6a7bf4bb5b330 table {margin-left: 0in;border-collapse: collapse;writing-mode: lr-tb;font-size: 11pt;} div#h5p_6a7bf4bb5b330 table tr {height: 0in;keep-together: auto;font-size: 11pt;} div#h5p_6a7bf4bb5b330 table td, table th {background-color: transparent;vertical-align: top;wrap-option: wrap;font-size: 11pt;} div#h5p_6a7bf4bb5b330 p {keep-with-next: auto;keep-together: auto;widows: 2;orphans: 2;break-before: auto;border: none;text-align: left;writing-mode: lr-tb;margin-bottom: 0.1111in;line-height: 1.07;background-color: transparent;font-size: 11pt;} div#h5p_6a7bf4bb5b330 p span {font-family: Calibri;font-weight: normal;font-style: normal;text-transform: none;font-variant: normal;letter-spacing: normal;font-size: 11pt;background-color: transparent;text-decoration: none;text-decoration-color: font-color;language: en;country: IN;hyphenate: true;}
POSITIVE MORALITYEven if no restrictions are provided by the Constitution, if the constitutional functionary has been given a discretionary power, the principles and philosophy of the Constitution i.e., essence of the Constitution act as the implicit guidelines upon the Constitutional functionary. The powers given to functionaries are arbitrary powers, rather they are guided powers and they are controlled by the essence of the Constitution. A constitutional functionary has to adhere to the basic structure of the Constitution and in no circumstances, it can violate the essence of the Constitution. This principle of adherence to Principle of Constitution is Positive Morality or Constitutional Morality. This concept is about the essence of Constitution acting as implicit guidelines upon the various Constitutional functionary. B.R. Kapoor v State of Tamil Nadu (2001) (SC)It was held in this case that the Constitutional functionary are bound to develop healthy practices and conventions where even constitution is silent and discretionary powers has been given to him. These practices should be in line with the essence of the Constitution. These practices or conventions are unwritten maxims of Constitution and they are an essential part of the Constitution. In present case, even if there is no express violation of the Constitution, the Governor should have explored the possibility of getting some other person from some political party to be appointed as Chief Minister.CONSTITUTIONALISMThe first aspect of constitutionalism is that there can be a Constitution which can organize and regulate the society the society according to some set principles and in fact the society can be moved i.e., progressed in a particular direction. It can be taken towards certain goals. The idea is that the Constitution can bind the society and bring greater cohesion in the society. The essential principle of the Constitution will provide the organic and vitality to the Constitution. The idea is also that Constitution always remains at work. The Constitution adjusts itself to the changing requirements of society in order to govern itself. In this process, the essential philosophies on the Constitution i.e., Vitality (essence) of Constitution is not lost. In other words, the basic structure of the Constitution will always remain the same. The idea of Constitutionalism is basically the idea that the Constitution will always remain an effective tool of governance. In the 2nd dimension, Constitution is about supremacy of Constitution. M. Nagaraj v Union of India (2016) (SC)It was held that Constitution is about the real identity of Constitution, which is supreme, it is not just about identity of Constitution, rather it is about the continuance of identity. The Supreme Court held in this case that the fidelity of the Court is not with test of Constitution rather with the spirit of Constitution. It was held in this case that Constitution is about limits and aspirations. I R Coelho (dead) by LRs v State of Tamil Nadu (2007) (SC)It was held that Constitutionalism is about checks and balances of the power of the Government. Since the Constitution is Supreme, the Government becomes a limited Government. Ashok Kumar Thakur v Union of India (2008) (SC)It was held that Constitutionalism is about the theory of guided powers i.e.the implicit and explicit guidelines given in the Constitution (function( $ ) {
//footnotes
$('.defaultNote').children(":first").css('cursor', 'pointer');
$('.defaultNote').children(":first").click(function(){
var gotoID = '#' + $(this).parent().attr('id');
$('html, body').animate(
{
scrollTop: $('a[href="' + gotoID + '"]').offset().top - 60,
},
250,
'linear'
)
});
}(jQuery));
var numFormat = ",.";
(function( $ ) {
"use strict";
//do some cleaning on load
var sortCells = $('td[data-sorting], th[data-sorting]');
sortCells.each(function(){
var first = $(this).text().trim().charAt(0);
if (first == '@'){
var oldHTML = $(this).html();
var newHTML = oldHTML.replace('@', '');
$(this).html(newHTML);
}
});
function sortingTable(node, pos, ordBy){
var rows = node.children('tbody').children('tr').get();
rows.sort(function(a, b) {
var X = $(a).children('td').eq(pos).text().toUpperCase();
var Y = $(b).children('td').eq(pos).text().toUpperCase();
if (numFormat != '.,'){
//we are dealing with a different locale and we need to do some
//transformation in numbers
X = convert2number(X);
Y = convert2number(Y);
} else {
X = X.replace(/,/g, '').replace(/ /g, '');
Y = Y.replace(/,/g, '').replace(/ /g, '');
}
var currencies = ['$', '¥', '£', '€'];
var arrayLength = currencies.length;
var XX = X;
var YY = Y;
for (var i = 0; i < arrayLength; i++) {
XX = XX.replace(currencies[i], '');
YY = YY.replace(currencies[i], '');
}
if (!isNaN(XX) && !isNaN(YY)){
var floatXX = parseFloat(XX);
var floatYY = parseFloat(YY);
return -(floatYY-floatXX) * ordBy;
} else if (!isNaN(XX) && isNaN(YY)){
return -1 * ordBy;
} else if (isNaN(XX) && !isNaN(YY)){
return ordBy;
} else {
if(X < Y) {
return -1 * ordBy;
}
if(X > Y) {
return 1 * ordBy;
}
return 0;
}
});
$.each(rows, function(index, row) {
node.children('tbody').append(row);
});
}
function removeTableCellDecoration() {
$("td[data-sorting], th[data-sorting]").removeClass('sortDecorator');
}
//unbind the click event just in case we are loading more than one document
$("td[data-sorting], th[data-sorting]").off('click');
$("td[data-sorting], th[data-sorting]").click(function(){
removeTableCellDecoration();
$(this).addClass('sortDecorator');
//get desired ordering
var ordering = $(this).attr('data-sortOrdering');
if (ordering == 'ASC'){
var ordBy = -1;
$(this).attr('data-sortOrdering', 'DESC');
} else {
var ordBy = 1;
$(this).attr('data-sortOrdering', 'ASC');
}
var cellPosition = $(this).prevAll().length;
var table = $(this).parents('table:first');
sortingTable(table, cellPosition, ordBy);
});
function convert2number(str) {
str = str.trim();
if (str.match(/^\d+/)) {
//we have to take special care when the thousand separators are '.'
var result_0 = str.replace(/\./g, '_@_');
var result_1 = result_0.replace(window.numFormat[0], '.');
var result = result_1.replace(/_@_/g, '');
result .replace(/ /g, '');
return result;
} else {
return str;
}
}
}(jQuery));
Subscribe for updates
Join 10,000+ subscribers.
AP
Aparna Shukla
Contributing author
Have a doubt about this?Ask Doubts


