LaravelTest
884 строки · 24.0 Кб
1(function() {2
3var db = {4
5loadData: function(filter) {6return $.grep(this.clients, function(client) {7return (!filter.Name || client.Name.indexOf(filter.Name) > -1)8&& (filter.Age === undefined || client.Age === filter.Age)9&& (!filter.Address || client.Address.indexOf(filter.Address) > -1)10&& (!filter.Country || client.Country === filter.Country)11&& (filter.Married === undefined || client.Married === filter.Married);12});13},14
15insertItem: function(insertingClient) {16this.clients.push(insertingClient);17},18
19updateItem: function(updatingClient) { },20
21deleteItem: function(deletingClient) {22var clientIndex = $.inArray(deletingClient, this.clients);23this.clients.splice(clientIndex, 1);24}25
26};27
28window.db = db;29
30
31db.countries = [32{ Name: "", Id: 0 },33{ Name: "United States", Id: 1 },34{ Name: "Canada", Id: 2 },35{ Name: "United Kingdom", Id: 3 },36{ Name: "France", Id: 4 },37{ Name: "Brazil", Id: 5 },38{ Name: "China", Id: 6 },39{ Name: "Russia", Id: 7 }40];41
42db.clients = [43{44"Name": "Otto Clay",45"Age": 61,46"Country": 6,47"Address": "Ap #897-1459 Quam Avenue",48"Married": false49},50{51"Name": "Connor Johnston",52"Age": 73,53"Country": 7,54"Address": "Ap #370-4647 Dis Av.",55"Married": false56},57{58"Name": "Lacey Hess",59"Age": 29,60"Country": 7,61"Address": "Ap #365-8835 Integer St.",62"Married": false63},64{65"Name": "Timothy Henson",66"Age": 78,67"Country": 1,68"Address": "911-5143 Luctus Ave",69"Married": false70},71{72"Name": "Ramona Benton",73"Age": 43,74"Country": 5,75"Address": "Ap #614-689 Vehicula Street",76"Married": true77},78{79"Name": "Ezra Tillman",80"Age": 51,81"Country": 1,82"Address": "P.O. Box 738, 7583 Quisque St.",83"Married": true84},85{86"Name": "Dante Carter",87"Age": 59,88"Country": 1,89"Address": "P.O. Box 976, 6316 Lorem, St.",90"Married": false91},92{93"Name": "Christopher Mcclure",94"Age": 58,95"Country": 1,96"Address": "847-4303 Dictum Av.",97"Married": true98},99{100"Name": "Ruby Rocha",101"Age": 62,102"Country": 2,103"Address": "5212 Sagittis Ave",104"Married": false105},106{107"Name": "Imelda Hardin",108"Age": 39,109"Country": 5,110"Address": "719-7009 Auctor Av.",111"Married": false112},113{114"Name": "Jonah Johns",115"Age": 28,116"Country": 5,117"Address": "P.O. Box 939, 9310 A Ave",118"Married": false119},120{121"Name": "Herman Rosa",122"Age": 49,123"Country": 7,124"Address": "718-7162 Molestie Av.",125"Married": true126},127{128"Name": "Arthur Gay",129"Age": 20,130"Country": 7,131"Address": "5497 Neque Street",132"Married": false133},134{135"Name": "Xena Wilkerson",136"Age": 63,137"Country": 1,138"Address": "Ap #303-6974 Proin Street",139"Married": true140},141{142"Name": "Lilah Atkins",143"Age": 33,144"Country": 5,145"Address": "622-8602 Gravida Ave",146"Married": true147},148{149"Name": "Malik Shepard",150"Age": 59,151"Country": 1,152"Address": "967-5176 Tincidunt Av.",153"Married": false154},155{156"Name": "Keely Silva",157"Age": 24,158"Country": 1,159"Address": "P.O. Box 153, 8995 Praesent Ave",160"Married": false161},162{163"Name": "Hunter Pate",164"Age": 73,165"Country": 7,166"Address": "P.O. Box 771, 7599 Ante, Road",167"Married": false168},169{170"Name": "Mikayla Roach",171"Age": 55,172"Country": 5,173"Address": "Ap #438-9886 Donec Rd.",174"Married": true175},176{177"Name": "Upton Joseph",178"Age": 48,179"Country": 4,180"Address": "Ap #896-7592 Habitant St.",181"Married": true182},183{184"Name": "Jeanette Pate",185"Age": 59,186"Country": 2,187"Address": "P.O. Box 177, 7584 Amet, St.",188"Married": false189},190{191"Name": "Kaden Hernandez",192"Age": 79,193"Country": 3,194"Address": "366 Ut St.",195"Married": true196},197{198"Name": "Kenyon Stevens",199"Age": 20,200"Country": 3,201"Address": "P.O. Box 704, 4580 Gravida Rd.",202"Married": false203},204{205"Name": "Jerome Harper",206"Age": 31,207"Country": 5,208"Address": "2464 Porttitor Road",209"Married": false210},211{212"Name": "Jelani Patel",213"Age": 36,214"Country": 2,215"Address": "P.O. Box 541, 5805 Nec Av.",216"Married": true217},218{219"Name": "Keaton Oconnor",220"Age": 21,221"Country": 1,222"Address": "Ap #657-1093 Nec, Street",223"Married": false224},225{226"Name": "Bree Johnston",227"Age": 31,228"Country": 2,229"Address": "372-5942 Vulputate Avenue",230"Married": false231},232{233"Name": "Maisie Hodges",234"Age": 70,235"Country": 7,236"Address": "P.O. Box 445, 3880 Odio, Rd.",237"Married": false238},239{240"Name": "Kuame Calhoun",241"Age": 39,242"Country": 2,243"Address": "P.O. Box 609, 4105 Rutrum St.",244"Married": true245},246{247"Name": "Carlos Cameron",248"Age": 38,249"Country": 5,250"Address": "Ap #215-5386 A, Avenue",251"Married": false252},253{254"Name": "Fulton Parsons",255"Age": 25,256"Country": 7,257"Address": "P.O. Box 523, 3705 Sed Rd.",258"Married": false259},260{261"Name": "Wallace Christian",262"Age": 43,263"Country": 3,264"Address": "416-8816 Mauris Avenue",265"Married": true266},267{268"Name": "Caryn Maldonado",269"Age": 40,270"Country": 1,271"Address": "108-282 Nonummy Ave",272"Married": false273},274{275"Name": "Whilemina Frank",276"Age": 20,277"Country": 7,278"Address": "P.O. Box 681, 3938 Egestas. Av.",279"Married": true280},281{282"Name": "Emery Moon",283"Age": 41,284"Country": 4,285"Address": "Ap #717-8556 Non Road",286"Married": true287},288{289"Name": "Price Watkins",290"Age": 35,291"Country": 4,292"Address": "832-7810 Nunc Rd.",293"Married": false294},295{296"Name": "Lydia Castillo",297"Age": 59,298"Country": 7,299"Address": "5280 Placerat, Ave",300"Married": true301},302{303"Name": "Lawrence Conway",304"Age": 53,305"Country": 1,306"Address": "Ap #452-2808 Imperdiet St.",307"Married": false308},309{310"Name": "Kalia Nicholson",311"Age": 67,312"Country": 5,313"Address": "P.O. Box 871, 3023 Tellus Road",314"Married": true315},316{317"Name": "Brielle Baxter",318"Age": 45,319"Country": 3,320"Address": "Ap #822-9526 Ut, Road",321"Married": true322},323{324"Name": "Valentine Brady",325"Age": 72,326"Country": 7,327"Address": "8014 Enim. Road",328"Married": true329},330{331"Name": "Rebecca Gardner",332"Age": 57,333"Country": 4,334"Address": "8655 Arcu. Road",335"Married": true336},337{338"Name": "Vladimir Tate",339"Age": 26,340"Country": 1,341"Address": "130-1291 Non, Rd.",342"Married": true343},344{345"Name": "Vernon Hays",346"Age": 56,347"Country": 4,348"Address": "964-5552 In Rd.",349"Married": true350},351{352"Name": "Allegra Hull",353"Age": 22,354"Country": 4,355"Address": "245-8891 Donec St.",356"Married": true357},358{359"Name": "Hu Hendrix",360"Age": 65,361"Country": 7,362"Address": "428-5404 Tempus Ave",363"Married": true364},365{366"Name": "Kenyon Battle",367"Age": 32,368"Country": 2,369"Address": "921-6804 Lectus St.",370"Married": false371},372{373"Name": "Gloria Nielsen",374"Age": 24,375"Country": 4,376"Address": "Ap #275-4345 Lorem, Street",377"Married": true378},379{380"Name": "Illiana Kidd",381"Age": 59,382"Country": 2,383"Address": "7618 Lacus. Av.",384"Married": false385},386{387"Name": "Adria Todd",388"Age": 68,389"Country": 6,390"Address": "1889 Tincidunt Road",391"Married": false392},393{394"Name": "Kirsten Mayo",395"Age": 71,396"Country": 1,397"Address": "100-8640 Orci, Avenue",398"Married": false399},400{401"Name": "Willa Hobbs",402"Age": 60,403"Country": 6,404"Address": "P.O. Box 323, 158 Tristique St.",405"Married": false406},407{408"Name": "Alexis Clements",409"Age": 69,410"Country": 5,411"Address": "P.O. Box 176, 5107 Proin Rd.",412"Married": false413},414{415"Name": "Akeem Conrad",416"Age": 60,417"Country": 2,418"Address": "282-495 Sed Ave",419"Married": true420},421{422"Name": "Montana Silva",423"Age": 79,424"Country": 6,425"Address": "P.O. Box 120, 9766 Consectetuer St.",426"Married": false427},428{429"Name": "Kaseem Hensley",430"Age": 77,431"Country": 6,432"Address": "Ap #510-8903 Mauris. Av.",433"Married": true434},435{436"Name": "Christopher Morton",437"Age": 35,438"Country": 5,439"Address": "P.O. Box 234, 3651 Sodales Avenue",440"Married": false441},442{443"Name": "Wade Fernandez",444"Age": 49,445"Country": 6,446"Address": "740-5059 Dolor. Road",447"Married": true448},449{450"Name": "Illiana Kirby",451"Age": 31,452"Country": 2,453"Address": "527-3553 Mi Ave",454"Married": false455},456{457"Name": "Kimberley Hurley",458"Age": 65,459"Country": 5,460"Address": "P.O. Box 637, 9915 Dictum St.",461"Married": false462},463{464"Name": "Arthur Olsen",465"Age": 74,466"Country": 5,467"Address": "887-5080 Eget St.",468"Married": false469},470{471"Name": "Brody Potts",472"Age": 59,473"Country": 2,474"Address": "Ap #577-7690 Sem Road",475"Married": false476},477{478"Name": "Dillon Ford",479"Age": 60,480"Country": 1,481"Address": "Ap #885-9289 A, Av.",482"Married": true483},484{485"Name": "Hannah Juarez",486"Age": 61,487"Country": 2,488"Address": "4744 Sapien, Rd.",489"Married": true490},491{492"Name": "Vincent Shaffer",493"Age": 25,494"Country": 2,495"Address": "9203 Nunc St.",496"Married": true497},498{499"Name": "George Holt",500"Age": 27,501"Country": 6,502"Address": "4162 Cras Rd.",503"Married": false504},505{506"Name": "Tobias Bartlett",507"Age": 74,508"Country": 4,509"Address": "792-6145 Mauris St.",510"Married": true511},512{513"Name": "Xavier Hooper",514"Age": 35,515"Country": 1,516"Address": "879-5026 Interdum. Rd.",517"Married": false518},519{520"Name": "Declan Dorsey",521"Age": 31,522"Country": 2,523"Address": "Ap #926-4171 Aenean Road",524"Married": true525},526{527"Name": "Clementine Tran",528"Age": 43,529"Country": 4,530"Address": "P.O. Box 176, 9865 Eu Rd.",531"Married": true532},533{534"Name": "Pamela Moody",535"Age": 55,536"Country": 6,537"Address": "622-6233 Luctus Rd.",538"Married": true539},540{541"Name": "Julie Leon",542"Age": 43,543"Country": 6,544"Address": "Ap #915-6782 Sem Av.",545"Married": true546},547{548"Name": "Shana Nolan",549"Age": 79,550"Country": 5,551"Address": "P.O. Box 603, 899 Eu St.",552"Married": false553},554{555"Name": "Vaughan Moody",556"Age": 37,557"Country": 5,558"Address": "880 Erat Rd.",559"Married": false560},561{562"Name": "Randall Reeves",563"Age": 44,564"Country": 3,565"Address": "1819 Non Street",566"Married": false567},568{569"Name": "Dominic Raymond",570"Age": 68,571"Country": 1,572"Address": "Ap #689-4874 Nisi Rd.",573"Married": true574},575{576"Name": "Lev Pugh",577"Age": 69,578"Country": 5,579"Address": "Ap #433-6844 Auctor Avenue",580"Married": true581},582{583"Name": "Desiree Hughes",584"Age": 80,585"Country": 4,586"Address": "605-6645 Fermentum Avenue",587"Married": true588},589{590"Name": "Idona Oneill",591"Age": 23,592"Country": 7,593"Address": "751-8148 Aliquam Avenue",594"Married": true595},596{597"Name": "Lani Mayo",598"Age": 76,599"Country": 1,600"Address": "635-2704 Tristique St.",601"Married": true602},603{604"Name": "Cathleen Bonner",605"Age": 40,606"Country": 1,607"Address": "916-2910 Dolor Av.",608"Married": false609},610{611"Name": "Sydney Murray",612"Age": 44,613"Country": 5,614"Address": "835-2330 Fringilla St.",615"Married": false616},617{618"Name": "Brenna Rodriguez",619"Age": 77,620"Country": 6,621"Address": "3687 Imperdiet Av.",622"Married": true623},624{625"Name": "Alfreda Mcdaniel",626"Age": 38,627"Country": 7,628"Address": "745-8221 Aliquet Rd.",629"Married": true630},631{632"Name": "Zachery Atkins",633"Age": 30,634"Country": 1,635"Address": "549-2208 Auctor. Road",636"Married": true637},638{639"Name": "Amelia Rich",640"Age": 56,641"Country": 4,642"Address": "P.O. Box 734, 4717 Nunc Rd.",643"Married": false644},645{646"Name": "Kiayada Witt",647"Age": 62,648"Country": 3,649"Address": "Ap #735-3421 Malesuada Avenue",650"Married": false651},652{653"Name": "Lysandra Pierce",654"Age": 36,655"Country": 1,656"Address": "Ap #146-2835 Curabitur St.",657"Married": true658},659{660"Name": "Cara Rios",661"Age": 58,662"Country": 4,663"Address": "Ap #562-7811 Quam. Ave",664"Married": true665},666{667"Name": "Austin Andrews",668"Age": 55,669"Country": 7,670"Address": "P.O. Box 274, 5505 Sociis Rd.",671"Married": false672},673{674"Name": "Lillian Peterson",675"Age": 39,676"Country": 2,677"Address": "6212 A Avenue",678"Married": false679},680{681"Name": "Adria Beach",682"Age": 29,683"Country": 2,684"Address": "P.O. Box 183, 2717 Nunc Avenue",685"Married": true686},687{688"Name": "Oleg Durham",689"Age": 80,690"Country": 4,691"Address": "931-3208 Nunc Rd.",692"Married": false693},694{695"Name": "Casey Reese",696"Age": 60,697"Country": 4,698"Address": "383-3675 Ultrices, St.",699"Married": false700},701{702"Name": "Kane Burnett",703"Age": 80,704"Country": 1,705"Address": "759-8212 Dolor. Ave",706"Married": false707},708{709"Name": "Stewart Wilson",710"Age": 46,711"Country": 7,712"Address": "718-7845 Sagittis. Av.",713"Married": false714},715{716"Name": "Charity Holcomb",717"Age": 31,718"Country": 6,719"Address": "641-7892 Enim. Ave",720"Married": false721},722{723"Name": "Kyra Cummings",724"Age": 43,725"Country": 4,726"Address": "P.O. Box 702, 6621 Mus. Av.",727"Married": false728},729{730"Name": "Stuart Wallace",731"Age": 25,732"Country": 7,733"Address": "648-4990 Sed Rd.",734"Married": true735},736{737"Name": "Carter Clarke",738"Age": 59,739"Country": 6,740"Address": "Ap #547-2921 A Street",741"Married": false742}743];744
745db.users = [746{747"ID": "x",748"Account": "A758A693-0302-03D1-AE53-EEFE22855556",749"Name": "Carson Kelley",750"RegisterDate": "2002-04-20T22:55:52-07:00"751},752{753"Account": "D89FF524-1233-0CE7-C9E1-56EFF017A321",754"Name": "Prescott Griffin",755"RegisterDate": "2011-02-22T05:59:55-08:00"756},757{758"Account": "06FAAD9A-5114-08F6-D60C-961B2528B4F0",759"Name": "Amir Saunders",760"RegisterDate": "2014-08-13T09:17:49-07:00"761},762{763"Account": "EED7653D-7DD9-A722-64A8-36A55ECDBE77",764"Name": "Derek Thornton",765"RegisterDate": "2012-02-27T01:31:07-08:00"766},767{768"Account": "2A2E6D40-FEBD-C643-A751-9AB4CAF1E2F6",769"Name": "Fletcher Romero",770"RegisterDate": "2010-06-25T15:49:54-07:00"771},772{773"Account": "3978F8FA-DFF0-DA0E-0A5D-EB9D281A3286",774"Name": "Thaddeus Stein",775"RegisterDate": "2013-11-10T07:29:41-08:00"776},777{778"Account": "658DBF5A-176E-569A-9273-74FB5F69FA42",779"Name": "Nash Knapp",780"RegisterDate": "2005-06-24T09:11:19-07:00"781},782{783"Account": "76D2EE4B-7A73-1212-F6F2-957EF8C1F907",784"Name": "Quamar Vega",785"RegisterDate": "2011-04-13T20:06:29-07:00"786},787{788"Account": "00E46809-A595-CE82-C5B4-D1CAEB7E3E58",789"Name": "Philip Galloway",790"RegisterDate": "2008-08-21T18:59:38-07:00"791},792{793"Account": "C196781C-DDCC-AF83-DDC2-CA3E851A47A0",794"Name": "Mason French",795"RegisterDate": "2000-11-15T00:38:37-08:00"796},797{798"Account": "5911F201-818A-B393-5888-13157CE0D63F",799"Name": "Ross Cortez",800"RegisterDate": "2010-05-27T17:35:32-07:00"801},802{803"Account": "B8BB78F9-E1A1-A956-086F-E12B6FE168B6",804"Name": "Logan King",805"RegisterDate": "2003-07-08T16:58:06-07:00"806},807{808"Account": "06F636C3-9599-1A2D-5FD5-86B24ADDE626",809"Name": "Cedric Leblanc",810"RegisterDate": "2011-06-30T14:30:10-07:00"811},812{813"Account": "FE880CDD-F6E7-75CB-743C-64C6DE192412",814"Name": "Simon Sullivan",815"RegisterDate": "2013-06-11T16:35:07-07:00"816},817{818"Account": "BBEDD673-E2C1-4872-A5D3-C4EBD4BE0A12",819"Name": "Jamal West",820"RegisterDate": "2001-03-16T20:18:29-08:00"821},822{823"Account": "19BC22FA-C52E-0CC6-9552-10365C755FAC",824"Name": "Hector Morales",825"RegisterDate": "2012-11-01T01:56:34-07:00"826},827{828"Account": "A8292214-2C13-5989-3419-6B83DD637D6C",829"Name": "Herrod Hart",830"RegisterDate": "2008-03-13T19:21:04-07:00"831},832{833"Account": "0285564B-F447-0E7F-EAA1-7FB8F9C453C8",834"Name": "Clark Maxwell",835"RegisterDate": "2004-08-05T08:22:24-07:00"836},837{838"Account": "EA78F076-4F6E-4228-268C-1F51272498AE",839"Name": "Reuben Walter",840"RegisterDate": "2011-01-23T01:55:59-08:00"841},842{843"Account": "6A88C194-EA21-426F-4FE2-F2AE33F51793",844"Name": "Ira Ingram",845"RegisterDate": "2008-08-15T05:57:46-07:00"846},847{848"Account": "4275E873-439C-AD26-56B3-8715E336508E",849"Name": "Damian Morrow",850"RegisterDate": "2015-09-13T01:50:55-07:00"851},852{853"Account": "A0D733C4-9070-B8D6-4387-D44F0BA515BE",854"Name": "Macon Farrell",855"RegisterDate": "2011-03-14T05:41:40-07:00"856},857{858"Account": "B3683DE8-C2FA-7CA0-A8A6-8FA7E954F90A",859"Name": "Joel Galloway",860"RegisterDate": "2003-02-03T04:19:01-08:00"861},862{863"Account": "01D95A8E-91BC-2050-F5D0-4437AAFFD11F",864"Name": "Rigel Horton",865"RegisterDate": "2015-06-20T11:53:11-07:00"866},867{868"Account": "F0D12CC0-31AC-A82E-FD73-EEEFDBD21A36",869"Name": "Sylvester Gaines",870"RegisterDate": "2004-03-12T09:57:13-08:00"871},872{873"Account": "874FCC49-9A61-71BC-2F4E-2CE88348AD7B",874"Name": "Abbot Mckay",875"RegisterDate": "2008-12-26T20:42:57-08:00"876},877{878"Account": "B8DA1912-20A0-FB6E-0031-5F88FD63EF90",879"Name": "Solomon Green",880"RegisterDate": "2013-09-04T01:44:47-07:00"881}882];883
884}());