Produced by Araxis Merge on 2/1/2017 2:57:59 PM Eastern Standard Time. See www.araxis.com for information about Merge. This report uses XHTML and CSS2, and is best viewed with a modern standards-compliant browser. For optimum results when printing this report, use landscape orientation and enable printing of background images and colours in your browser.
| # | Location | File | Last Modified |
|---|---|---|---|
| 1 | C:\Araxis_Merge_Comprasion\Pub_un\BTSSS_CIF_122016.zip\BTSSS_CIF_12_20_16\clean\CRM Portal\trunk\BTSSSPortal\js | jquery.bootstrap-pagination.js | Tue Dec 20 19:50:42 2016 UTC |
| 2 | Wed Feb 1 19:57:59 2017 UTC |
| Description | Between Files 1 and 2 |
|
|---|---|---|
| Text Blocks | Lines | |
| Unchanged | 0 | 0 |
| Changed | 0 | 0 |
| Inserted | 0 | 0 |
| Removed | 1 | 226 |
| Whitespace | |
|---|---|
| Character case | Differences in character case are significant |
| Line endings | Differences in line endings (CR and LF characters) are ignored |
| CR/LF characters | Not shown in the comparison detail |
No regular expressions were active.
| 1 | /* | |||||
| 2 | jQuery Boo tstrap Pag ination | |||||
| 3 | Copyright (c) 2012 M ark Bates | |||||
| 4 | ||||||
| 5 | Permission is hereby granted, free of ch arge, to a ny person obtaining a copy of this softw are and as sociated d ocumentati on files ( the "Softw are"), to deal in th e Software without r estriction , includin g without limitation the right s to use, copy, modi fy, merge, publish, distribute , sublicen se, and/or sell copi es of the Software, and to per mit person s to whom the Softwa re is furn ished to d o so, subj ect to the following condition s: | |||||
| 6 | ||||||
| 7 | The above copyright notice and this perm ission not ice shall be include d in all c opies or s ubstantial portions of the Sof tware. | |||||
| 8 | ||||||
| 9 | THE SOFTWA RE IS PROV IDED "AS I S", WITHOU T WARRANTY OF ANY KI ND, EXPRES S OR IMPLI ED, INCLUD ING BUT NO T LIMITED TO THE WAR RANTIES OF MERCHANTA BILITY, FI TNESS FOR A PARTICUL AR PURPOSE AND NONIN FRINGEMENT . IN NO EV ENT SHALL THE AUTHOR S OR COPYR IGHT HOLDE RS BE LIAB LE FOR ANY CLAIM, DA MAGES OR O THER LIABI LITY, WHET HER IN AN ACTION OF CONTRACT, TORT OR OT HERWISE, A RISING FRO M, OUT OF OR IN CONN ECTION WIT H THE SOFT WARE OR TH E USE OR O THER DEALI NGS IN THE SOFTWARE. | |||||
| 10 | */ | |||||
| 11 | ||||||
| 12 | (function () { | |||||
| 13 | var __bi nd = funct ion (fn, m e) { retur n function () { retu rn fn.appl y(me, argu ments); }; }, | |||||
| 14 | __inde xOf = [].i ndexOf || function ( item) { fo r (var i = 0, l = th is.length; i < l; i+ +) { if (i in this & & this[i] === item) return i; } return - 1; }; | |||||
| 15 | ||||||
| 16 | (functio n ($) { | |||||
| 17 | /* | |||||
| 18 | $(".my -paginatio n").pagina tion(); | |||||
| 19 | ||||||
| 20 | $(".my -paginatio n").pagina tion({tota l_pages: 3 , current_ page: 1}); | |||||
| 21 | ||||||
| 22 | $(".my -paginatio n").pagina tion({ | |||||
| 23 | tota l_pages: 3 , | |||||
| 24 | curr ent_page: 1, | |||||
| 25 | call back: func tion(event , page) { | |||||
| 26 | al ert("Click ed: " + pa ge); | |||||
| 27 | } | |||||
| 28 | }); | |||||
| 29 | */ | |||||
| 30 | ||||||
| 31 | var Pa ginationVi ew; | |||||
| 32 | ||||||
| 33 | $.fn.p agination = function (options) { | |||||
| 34 | retu rn this.ea ch(functio n () { | |||||
| 35 | re turn new P aginationV iew($(this ), options ).render() ; | |||||
| 36 | }); | |||||
| 37 | }; | |||||
| 38 | return Paginatio nView = (f unction () { | |||||
| 39 | func tion Pagin ationView( el, option s) { | |||||
| 40 | va r defaults ; | |||||
| 41 | ||||||
| 42 | th is.el = el ; | |||||
| 43 | th is.change = __bind(t his.change , this); | |||||
| 44 | th is.clicked = __bind( this.click ed, this); | |||||
| 45 | th is.isValid Page = __b ind(this.i sValidPage , this); | |||||
| 46 | th is.render = __bind(t his.render , this); | |||||
| 47 | th is.pages = __bind(th is.pages, this); | |||||
| 48 | th is.buildLi nk = __bin d(this.bui ldLink, th is); | |||||
| 49 | th is.buildLi = __bind( this.build Li, this); | |||||
| 50 | th is.buildLi nks = __bi nd(this.bu ildLinks, this); | |||||
| 51 | de faults = { | |||||
| 52 | current_pa ge: 1, | |||||
| 53 | total_page s: 1, | |||||
| 54 | next: "> ;", | |||||
| 55 | prev: "< ;", | |||||
| 56 | first: fal se, | |||||
| 57 | last: fals e, | |||||
| 58 | display_ma x: 8, | |||||
| 59 | ignore_sin gle_page: true, | |||||
| 60 | no_turboli nk: false | |||||
| 61 | }; | |||||
| 62 | th is.setting s = $.exte nd(default s, options ); | |||||
| 63 | if ($(docume nt).on) { | |||||
| 64 | $(this.el) .on("click ", "a", th is.clicked ); | |||||
| 65 | } else { | |||||
| 66 | $("a", thi s.el).live ("click", this.click ed); | |||||
| 67 | } | |||||
| 68 | th is.el.data ("paginati onView", t his); | |||||
| 69 | } | |||||
| 70 | ||||||
| 71 | Pagi nationView .prototype .buildLink s = functi on () { | |||||
| 72 | va r current_ page, link s, page, _ i, _len, _ ref; | |||||
| 73 | ||||||
| 74 | cu rrent_page = this.se ttings.cur rent_page; | |||||
| 75 | li nks = []; | |||||
| 76 | if (this.set tings.firs t) { | |||||
| 77 | links.push (this.buil dLi(1, thi s.settings .first)); | |||||
| 78 | } | |||||
| 79 | if (this.set tings.prev ) { | |||||
| 80 | links.push (this.buil dLi(curren t_page - 1 , this.set tings.prev )); | |||||
| 81 | } | |||||
| 82 | _r ef = this. pages(); | |||||
| 83 | fo r (_i = 0, _len = _r ef.length; _i < _len ; _i++) { | |||||
| 84 | page = _re f[_i]; | |||||
| 85 | links.push (this.buil dLi(page, page)); | |||||
| 86 | } | |||||
| 87 | if (this.set tings.next ) { | |||||
| 88 | links.push (this.buil dLi(curren t_page + 1 , this.set tings.next )); | |||||
| 89 | } | |||||
| 90 | if (this.set tings.last ) { | |||||
| 91 | links.push (this.buil dLi(this.s ettings.to tal_pages, this.sett ings.last) ); | |||||
| 92 | } | |||||
| 93 | re turn links ; | |||||
| 94 | }; | |||||
| 95 | ||||||
| 96 | Pagi nationView .prototype .buildLi = function (page, tex t) { | |||||
| 97 | if (text == null) { | |||||
| 98 | text = pag e; | |||||
| 99 | } | |||||
| 100 | re turn "<li> " + (this. buildLink( page, text )) + "</li >"; | |||||
| 101 | }; | |||||
| 102 | ||||||
| 103 | Pagi nationView .prototype .buildLink = functio n (page, t ext) { | |||||
| 104 | va r data_att r; | |||||
| 105 | ||||||
| 106 | if (text == null) { | |||||
| 107 | text = pag e; | |||||
| 108 | } | |||||
| 109 | if (this.set tings.no_t urbolink) { | |||||
| 110 | data_attr = " data-n o-turbolin k='1'"; | |||||
| 111 | } else { | |||||
| 112 | data_attr = ""; | |||||
| 113 | } | |||||
| 114 | re turn "<a h ref='#' da ta-page='" + page + "'" + data _attr + "> " + text + "</a>"; | |||||
| 115 | }; | |||||
| 116 | ||||||
| 117 | Pagi nationView .prototype .pages = f unction () { | |||||
| 118 | va r buf, cur rent_page, max, page , pages, t otal_pages , _i, _j, _k, _l, _m , _ref, _r ef1, _ref2 , _ref3; | |||||
| 119 | ||||||
| 120 | to tal_pages = this.set tings.tota l_pages; | |||||
| 121 | cu rrent_page = this.se ttings.cur rent_page; | |||||
| 122 | pa ges = []; | |||||
| 123 | ma x = this.s ettings.di splay_max; | |||||
| 124 | if (total_pa ges > 10) { | |||||
| 125 | pages.push (1); | |||||
| 126 | if (curren t_page > m ax - 1) { | |||||
| 127 | pages.pu sh(".."); | |||||
| 128 | } | |||||
| 129 | if (curren t_page === total_pag es) { | |||||
| 130 | for (pag e = _i = _ ref = tota l_pages - max; _ref <= total_p ages ? _i <= total_p ages : _i >= total_p ages; page = _ref <= total_pag es ? ++_i : --_i) { | |||||
| 131 | pages. push(page) ; | |||||
| 132 | } | |||||
| 133 | } | |||||
| 134 | if (total_ pages - cu rrent_page < max - 1 ) { | |||||
| 135 | for (pag e = _j = _ ref1 = tot al_pages - max; _ref 1 <= total _pages ? _ j <= total _pages : _ j >= total _pages; pa ge = _ref1 <= total_ pages ? ++ _j : --_j) { | |||||
| 136 | pages. push(page) ; | |||||
| 137 | } | |||||
| 138 | } else if (current_p age > max - 1) { | |||||
| 139 | buf = ma x / 2; | |||||
| 140 | for (pag e = _k = _ ref2 = cur rent_page - buf, _re f3 = curre nt_page + buf; _ref2 <= _ref3 ? _k <= _r ef3 : _k > = _ref3; p age = _ref 2 <= _ref3 ? ++_k : --_k) { | |||||
| 141 | pages. push(page) ; | |||||
| 142 | } | |||||
| 143 | } else if (current_p age <= max - 1) { | |||||
| 144 | for (pag e = _l = 2 ; 2 <= max ? _l <= m ax : _l >= max; page = 2 <= ma x ? ++_l : --_l) { | |||||
| 145 | pages. push(page) ; | |||||
| 146 | } | |||||
| 147 | } | |||||
| 148 | pages = $. grep(pages , function (v, k) { | |||||
| 149 | return $ .inArray(v , pages) = == k; | |||||
| 150 | }); | |||||
| 151 | if (__inde xOf.call(p ages, tota l_pages) < 0) { | |||||
| 152 | if (!((t otal_pages - current _page) < m ax - 1)) { | |||||
| 153 | pages. push("..") ; | |||||
| 154 | } | |||||
| 155 | pages.pu sh(total_p ages); | |||||
| 156 | } | |||||
| 157 | } else { | |||||
| 158 | for (page = _m = 1; 1 <= total _pages ? _ m <= total _pages : _ m >= total _pages; pa ge = 1 <= total_page s ? ++_m : --_m) { | |||||
| 159 | pages.pu sh(page); | |||||
| 160 | } | |||||
| 161 | } | |||||
| 162 | re turn pages ; | |||||
| 163 | }; | |||||
| 164 | ||||||
| 165 | Pagi nationView .prototype .render = function ( ) { | |||||
| 166 | va r html, li nk, _i, _l en, _ref; | |||||
| 167 | ||||||
| 168 | th is.el.html (""); | |||||
| 169 | if (this.set tings.tota l_pages == = 1 && thi s.settings .ignore_si ngle_page) { | |||||
| 170 | return; | |||||
| 171 | } | |||||
| 172 | ht ml = ["<di v class='j query-boot strap-pagi nation'>"] ; | |||||
| 173 | ht ml.push("< ul class=' pagination '>"); | |||||
| 174 | _r ef = this. buildLinks (); | |||||
| 175 | fo r (_i = 0, _len = _r ef.length; _i < _len ; _i++) { | |||||
| 176 | link = _re f[_i]; | |||||
| 177 | html.push( link); | |||||
| 178 | } | |||||
| 179 | ht ml.push("< /ul>"); | |||||
| 180 | ht ml.push("< /div>"); | |||||
| 181 | th is.el.html (html.join ("\n")); | |||||
| 182 | $( "[data-pag e=" + this .settings. current_pa ge + "]", this.el).c losest("li ").addClas s("active" ); | |||||
| 183 | $( "[data-pag e='..']", this.el).c losest("li ").addClas s("disable d"); | |||||
| 184 | $( "[data-pag e='0']", t his.el).cl osest("li" ).addClass ("disabled "); | |||||
| 185 | $( "[data-pag e='" + (th is.setting s.total_pa ges + 1) + "']", thi s.el).clos est("li"). addClass(" disabled") ; | |||||
| 186 | if (this.set tings.curr ent_page = == 1 && th is.setting s.first) { | |||||
| 187 | $("li:firs t", this.e l).removeC lass("acti ve").addCl ass("disab led"); | |||||
| 188 | } | |||||
| 189 | if (this.set tings.curr ent_page = == this.se ttings.tot al_pages & & this.set tings.last ) { | |||||
| 190 | return $(" li:last", this.el).r emoveClass ("active") .addClass( "disabled" ); | |||||
| 191 | } | |||||
| 192 | }; | |||||
| 193 | ||||||
| 194 | Pagi nationView .prototype .isValidPa ge = funct ion (page) { | |||||
| 195 | re turn page > 0 && pag e !== this .settings. current_pa ge && page <= this.s ettings.to tal_pages; | |||||
| 196 | }; | |||||
| 197 | ||||||
| 198 | Pagi nationView .prototype .clicked = function (event) { | |||||
| 199 | event.st opPropagat ion(); | |||||
| 200 | va r page; | |||||
| 201 | ||||||
| 202 | pa ge = parse Int($(even t.target). attr("data -page")); | |||||
| 203 | if (!this.is ValidPage( page)) { | |||||
| 204 | return; | |||||
| 205 | } | |||||
| 206 | if (this.set tings.call back != nu ll) { | |||||
| 207 | this.setti ngs.callba ck(event, page); | |||||
| 208 | } | |||||
| 209 | re turn this. change(pag e); | |||||
| 210 | }; | |||||
| 211 | ||||||
| 212 | Pagi nationView .prototype .change = function ( page) { | |||||
| 213 | pa ge = parse Int(page); | |||||
| 214 | if (!this.is ValidPage( page)) { | |||||
| 215 | return; | |||||
| 216 | } | |||||
| 217 | th is.setting s.current_ page = pag e; | |||||
| 218 | re turn this. render(); | |||||
| 219 | }; | |||||
| 220 | ||||||
| 221 | retu rn Paginat ionView; | |||||
| 222 | ||||||
| 223 | })(); | |||||
| 224 | })(jQuer y); | |||||
| 225 | ||||||
| 226 | }).call(th is); |
Araxis Merge (but not the data content of this report) is Copyright © 1993-2016 Araxis Ltd (www.araxis.com). All rights reserved.