From 36f3d9fcde3385733eaa9c273dcbf89522e67769 Mon Sep 17 00:00:00 2001 From: ludger Date: Sat, 6 Oct 2018 21:18:18 +0200 Subject: [PATCH] Took some hours but I merged the frontend and the backend --- .../templates/postings/frontend/entity.html | 197 + .../templates/postings/frontend/landing.html | 74 + .../templates/postings/frontend/results.html | 117 + .../templates/postings/frontend/review.html | 20 + .../templates/postings/generic_page.html | 3 +- backend/postings/views.py | 8 +- frontpage/css/{main.css => style.css} | 21 +- frontpage/css/{main.css.map => style.css.map} | 6 +- frontpage/css/{main.scss => style.scss} | 25 +- frontpage/entity.html | 251 + frontpage/js/main.js | 67 +- frontpage/rateables/css/bootstrap-theme.css | 470 ++ .../rateables/css/bootstrap-theme.css.map | 1 + .../rateables/css/bootstrap-theme.min.css | 5 + frontpage/rateables/css/bootstrap.css | 6332 +++++++++++++++++ frontpage/rateables/css/bootstrap.css.map | 1 + frontpage/rateables/css/bootstrap.min.css | 5 + frontpage/rateables/css/style.css | 103 + frontpage/rateables/css/style.css.map | 7 + frontpage/rateables/css/style.scss | 122 + .../fonts/glyphicons-halflings-regular.eot | Bin 0 -> 20335 bytes .../fonts/glyphicons-halflings-regular.svg | 229 + .../fonts/glyphicons-halflings-regular.ttf | Bin 0 -> 41280 bytes .../fonts/glyphicons-halflings-regular.woff | Bin 0 -> 23320 bytes frontpage/rateables/js/load_reviews.js | 33 + frontpage/rateables/js/main.js | 102 + frontpage/rateables/js/post_review.js | 47 + .../js/templates/review_item.handlebars | 34 + frontpage/rateables/js/vendor/bootstrap.js | 2320 ++++++ .../rateables/js/vendor/bootstrap.min.js | 7 + .../rateables/js/vendor/handlebars-v4.0.12.js | 4838 +++++++++++++ .../rateables/js/vendor/jquery-1.11.2.min.js | 4 + .../modernizr-2.8.3-respond-1.4.2.min.js | 11 + frontpage/rateables/js/vendor/npm.js | 13 + frontpage/templResults.html | 116 + frontpage/templSearchbar.html | 82 + 36 files changed, 15658 insertions(+), 13 deletions(-) create mode 100644 backend/postings/templates/postings/frontend/entity.html create mode 100644 backend/postings/templates/postings/frontend/landing.html create mode 100644 backend/postings/templates/postings/frontend/results.html create mode 100644 backend/postings/templates/postings/frontend/review.html rename frontpage/css/{main.css => style.css} (82%) rename frontpage/css/{main.css.map => style.css.map} (80%) rename frontpage/css/{main.scss => style.scss} (84%) create mode 100644 frontpage/entity.html create mode 100644 frontpage/rateables/css/bootstrap-theme.css create mode 100644 frontpage/rateables/css/bootstrap-theme.css.map create mode 100644 frontpage/rateables/css/bootstrap-theme.min.css create mode 100644 frontpage/rateables/css/bootstrap.css create mode 100644 frontpage/rateables/css/bootstrap.css.map create mode 100644 frontpage/rateables/css/bootstrap.min.css create mode 100644 frontpage/rateables/css/style.css create mode 100644 frontpage/rateables/css/style.css.map create mode 100644 frontpage/rateables/css/style.scss create mode 100644 frontpage/rateables/fonts/glyphicons-halflings-regular.eot create mode 100644 frontpage/rateables/fonts/glyphicons-halflings-regular.svg create mode 100644 frontpage/rateables/fonts/glyphicons-halflings-regular.ttf create mode 100644 frontpage/rateables/fonts/glyphicons-halflings-regular.woff create mode 100644 frontpage/rateables/js/load_reviews.js create mode 100644 frontpage/rateables/js/main.js create mode 100644 frontpage/rateables/js/post_review.js create mode 100644 frontpage/rateables/js/templates/review_item.handlebars create mode 100644 frontpage/rateables/js/vendor/bootstrap.js create mode 100644 frontpage/rateables/js/vendor/bootstrap.min.js create mode 100644 frontpage/rateables/js/vendor/handlebars-v4.0.12.js create mode 100644 frontpage/rateables/js/vendor/jquery-1.11.2.min.js create mode 100644 frontpage/rateables/js/vendor/modernizr-2.8.3-respond-1.4.2.min.js create mode 100644 frontpage/rateables/js/vendor/npm.js create mode 100644 frontpage/templResults.html create mode 100644 frontpage/templSearchbar.html diff --git a/backend/postings/templates/postings/frontend/entity.html b/backend/postings/templates/postings/frontend/entity.html new file mode 100644 index 0000000..77261c3 --- /dev/null +++ b/backend/postings/templates/postings/frontend/entity.html @@ -0,0 +1,197 @@ + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+
+

{{ entity.name }} {{ entity.average }}

+

{{ entity.average_rating|floatformat:"-2" }}

+
+
+
+
+
+
+

Average user rating

+

{{ entity.average_rating|floatformat:"-2" }} / 5

+
+
+
+

Rating breakdown

+
+
+
5
+
+
+
+
+ 80% Complete (danger) +
+
+
+
0
+
+
+
+
4
+
+
+
+
+ 80% Complete (danger) +
+
+
+
1
+
+
+
+
3
+
+
+
+
+ 80% Complete (danger) +
+
+
+
1
+
+
+
+
2
+
+
+
+
+ 80% Complete (danger) +
+
+
+
1
+
+
+
+
1
+
+
+
+
+ 80% Complete (danger) +
+
+
+
0
+
+
+
+ +
+
+
+
+ + +
+
+
+ + + +
+ +
+
+ {% for review in entity.review_set.all %} + {% include "postings/frontend/review.html" with review=review only %} + {% endfor %} +
+ +
+
+ +
+ + + + + + + + + + + + \ No newline at end of file diff --git a/backend/postings/templates/postings/frontend/landing.html b/backend/postings/templates/postings/frontend/landing.html new file mode 100644 index 0000000..41ad856 --- /dev/null +++ b/backend/postings/templates/postings/frontend/landing.html @@ -0,0 +1,74 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+

Find rated courses

+

The best course reviews by your fellow students!

+
+
+
+ +
+ +
+
+
+
+
+
+ + + + + + + + + + + + + diff --git a/backend/postings/templates/postings/frontend/results.html b/backend/postings/templates/postings/frontend/results.html new file mode 100644 index 0000000..38d4744 --- /dev/null +++ b/backend/postings/templates/postings/frontend/results.html @@ -0,0 +1,117 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+
+
+
+

+ 160 Courses found for: "Software engineering" +

+ Request time (0.23 seconds) + +
+
+
+ +
+ +
+
+
+
+ + {# Second section for displaying results, or whatever should be shown first. #} + {% if results %} + {% for entity in results %} +
+ + {% endfor %} + {% endif %} + +
+ + + + + + + + + +
+
+
+
+ + + + + + + + + + + diff --git a/backend/postings/templates/postings/frontend/review.html b/backend/postings/templates/postings/frontend/review.html new file mode 100644 index 0000000..953e1fb --- /dev/null +++ b/backend/postings/templates/postings/frontend/review.html @@ -0,0 +1,20 @@ + + + +
+
+
+ + +
{{ review.created_date|date:"j M, Y" }}
+
+
+
+
+ + +
+
{{ review.title }}
+
{{ review.content }}
+
+
\ No newline at end of file diff --git a/backend/postings/templates/postings/generic_page.html b/backend/postings/templates/postings/generic_page.html index f49084f..d1a5f4f 100644 --- a/backend/postings/templates/postings/generic_page.html +++ b/backend/postings/templates/postings/generic_page.html @@ -5,7 +5,7 @@ - {% block title %}RateMyCourse{% endblock %} + {% block title %}RateMyCourse{% endblock %} @@ -13,7 +13,6 @@

RateMyCourse

- {# All of a page's content to display should be placed in here. #}
{% block content %} diff --git a/backend/postings/views.py b/backend/postings/views.py index 1f65c22..4f0c918 100644 --- a/backend/postings/views.py +++ b/backend/postings/views.py @@ -3,6 +3,7 @@ from django.http import HttpResponse, Http404, HttpResponseBadRequest, HttpRespo from postings.models import * from postings.forms import * + # Create your views here. # The view for the homepage, or index.html @@ -13,8 +14,8 @@ def index(request): if search_query: # Filter objects based on case-insensitive contains filter. results = RateableEntity.objects.filter(name__icontains=search_query) - - return render(request, 'postings/index.html', {'results': results}) + return render(request, 'postings/frontend/results.html', {'results': results}) + return render(request, 'postings/frontend/landing.html', {'results': results}) # The view for listing all rateable entities. def rateables(request): @@ -47,7 +48,8 @@ def rateable_entity(request, entity_id): except RateableEntity.DoesNotExist: raise Http404("RateableEntity with id " + str(entity_id) + " does not exist.") - return render(request, "postings/rateables/" + template, {'entity': entity}) + return render(request, 'postings/frontend/entity.html', {'entity': entity}) + # return render(request, "postings/rateables/" + template, {'entity': entity}) # The view for receiving POST requests for new reviews. def post_review(request): diff --git a/frontpage/css/main.css b/frontpage/css/style.css similarity index 82% rename from frontpage/css/main.css rename to frontpage/css/style.css index 515b546..ab43fb5 100644 --- a/frontpage/css/main.css +++ b/frontpage/css/style.css @@ -1,5 +1,5 @@ .box { - position: relative; + position: absolute; width: 100%; background: #5850c7 url(https://d20ohkaloyme4g.cloudfront.net/img/hero-illustration-module.png) repeat; color: #fff; @@ -83,4 +83,21 @@ body { font-size: 24px; color: #d17581; } -/*# sourceMappingURL=main.css.map */ +.hr-line-dashed { + border-top: 1px dashed #E7EAEC; + color: #ffffff; + background-color: #ffffff; + height: 1px; + margin: 20px 0; } + +h2 { + font-size: 24px; + font-weight: 100; } + +.block3 { + background: white; } + +.search-form { + min-width: 60vw; } + +/*# sourceMappingURL=style.css.map */ diff --git a/frontpage/css/main.css.map b/frontpage/css/style.css.map similarity index 80% rename from frontpage/css/main.css.map rename to frontpage/css/style.css.map index 021c2fa..5b3cbef 100644 --- a/frontpage/css/main.css.map +++ b/frontpage/css/style.css.map @@ -1,7 +1,7 @@ { "version": 3, -"mappings": "AACA,IAAI;EACF,QAAQ,EAAE,QAAQ;EAClB,KAAK,EAAE,IAAI;EACX,UAAU,EAAE,0FAA0F;EACtG,KAAK,EAAE,IAAI;EACX,UAAU,EAAE,MAAM;EAClB,aAAa,EAAE,CAAC;EAChB,UAAU,EAAC,MAAM;;AAEnB,cAAe;EACb,OAAO,EAAE,IAAI;EACb,WAAW,EAAE,MAAM;EACnB,MAAM,EAAE,0BAA0B;EAClC,MAAM,EAAE,uBAAuB;EAC/B,MAAM,EAAE,kBAAkB;;AAE5B,iBAAiB;EACf,SAAS,EAAE,IAAI;;AAEjB,iBAAiB;EACf,aAAa,EAAE,IAAI;;AAOrB,KAAM;EACJ,UAAU,EAAE,OAAO;EACnB,QAAQ,EAAE,QAAQ;EAClB,KAAK,EAAE,IAAI;;AAGb,MAAM;EACJ,UAAU,EAAE,KAAK;;AAGnB,IAAK;EACH,WAAW,EAAE,IAAI;;AAEnB,SAAS;EACP,gBAAgB,EAAC,OAAO;EACxB,KAAK,EAAC,IAAI;;AAEZ,aAAa;EACX,gBAAgB,EAAC,OAAO;EACxB,MAAM,EAAC,iBAAiB;EACxB,OAAO,EAAC,mBAAmB;EAC3B,aAAa,EAAC,GAAG;;AAEnB,KAAK;EACH,WAAW,EAAC,GAAG;;AAEjB,iBAAiB;EACf,cAAc,EAAC,GAAG;;AAGpB,aAAa;EACX,gBAAgB,EAAC,OAAO;EACxB,MAAM,EAAC,iBAAiB;EACxB,OAAO,EAAC,IAAI;EACZ,aAAa,EAAC,GAAG;EACjB,aAAa,EAAC,IAAI;;AAEpB,kBAAkB;EAChB,SAAS,EAAC,IAAI;EACd,MAAM,EAAC,MAAM;;AAEf,kBAAkB;EAChB,SAAS,EAAC,IAAI;;AAEhB,kBAAkB;EAChB,SAAS,EAAC,IAAI;EACd,aAAa,EAAC,IAAI;;AAEpB,mBAAmB;EACjB,SAAS,EAAC,IAAI;EACd,WAAW,EAAC,GAAG;EACf,aAAa,EAAC,IAAI;;AAEpB,yBAAyB;EACvB,SAAS,EAAC,IAAI;;AAGhB,SAAU;EACR,kBAAkB,EAAE,WAAW;EAC/B,eAAe,EAAE,WAAW;EAC5B,UAAU,EAAE,WAAW;;AAGzB,MACA;EACE,MAAM,EAAE,MAAM;EACd,SAAS,EAAE,IAAI;EACf,KAAK,EAAE,OAAO", -"sources": ["main.scss"], +"mappings": "AACA,IAAI;EACF,QAAQ,EAAE,QAAQ;EAClB,KAAK,EAAE,IAAI;EACX,UAAU,EAAE,0FAA0F;EACtG,KAAK,EAAE,IAAI;EACX,UAAU,EAAE,MAAM;EAClB,aAAa,EAAE,CAAC;EAChB,UAAU,EAAC,MAAM;;AAEnB,cAAe;EACb,OAAO,EAAE,IAAI;EACb,WAAW,EAAE,MAAM;EACnB,MAAM,EAAE,0BAA0B;EAClC,MAAM,EAAE,uBAAuB;EAC/B,MAAM,EAAE,kBAAkB;;AAE5B,iBAAiB;EACf,SAAS,EAAE,IAAI;;AAEjB,iBAAiB;EACf,aAAa,EAAE,IAAI;;AAOrB,KAAM;EACJ,UAAU,EAAE,OAAO;EACnB,QAAQ,EAAE,QAAQ;EAClB,KAAK,EAAE,IAAI;;AAGb,MAAM;EACJ,UAAU,EAAE,KAAK;;AAGnB,IAAK;EACH,WAAW,EAAE,IAAI;;AAEnB,SAAS;EACP,gBAAgB,EAAC,OAAO;EACxB,KAAK,EAAC,IAAI;;AAEZ,aAAa;EACX,gBAAgB,EAAC,OAAO;EACxB,MAAM,EAAC,iBAAiB;EACxB,OAAO,EAAC,mBAAmB;EAC3B,aAAa,EAAC,GAAG;;AAEnB,KAAK;EACH,WAAW,EAAC,GAAG;;AAEjB,iBAAiB;EACf,cAAc,EAAC,GAAG;;AAGpB,aAAa;EACX,gBAAgB,EAAC,OAAO;EACxB,MAAM,EAAC,iBAAiB;EACxB,OAAO,EAAC,IAAI;EACZ,aAAa,EAAC,GAAG;EACjB,aAAa,EAAC,IAAI;;AAEpB,kBAAkB;EAChB,SAAS,EAAC,IAAI;EACd,MAAM,EAAC,MAAM;;AAEf,kBAAkB;EAChB,SAAS,EAAC,IAAI;;AAEhB,kBAAkB;EAChB,SAAS,EAAC,IAAI;EACd,aAAa,EAAC,IAAI;;AAEpB,mBAAmB;EACjB,SAAS,EAAC,IAAI;EACd,WAAW,EAAC,GAAG;EACf,aAAa,EAAC,IAAI;;AAEpB,yBAAyB;EACvB,SAAS,EAAC,IAAI;;AAGhB,SAAU;EACR,kBAAkB,EAAE,WAAW;EAC/B,eAAe,EAAE,WAAW;EAC5B,UAAU,EAAE,WAAW;;AAGzB,MACA;EACE,MAAM,EAAE,MAAM;EACd,SAAS,EAAE,IAAI;EACf,KAAK,EAAE,OAAO;;AAOhB,eAAgB;EACd,UAAU,EAAE,kBAAkB;EAC9B,KAAK,EAAE,OAAO;EACd,gBAAgB,EAAE,OAAO;EACzB,MAAM,EAAE,GAAG;EACX,MAAM,EAAE,MAAM;;AAGhB,EAAG;EACD,SAAS,EAAE,IAAI;EACf,WAAW,EAAE,GAAG;;AAElB,OAAQ;EACN,UAAU,EAAE,KAAK;;AAGnB,YAAY;EACV,SAAS,EAAC,IAAI", +"sources": ["style.scss"], "names": [], -"file": "main.css" +"file": "style.css" } \ No newline at end of file diff --git a/frontpage/css/main.scss b/frontpage/css/style.scss similarity index 84% rename from frontpage/css/main.scss rename to frontpage/css/style.scss index 2f1ca7d..6b91183 100644 --- a/frontpage/css/main.scss +++ b/frontpage/css/style.scss @@ -1,6 +1,6 @@ //Homepage .box{ - position: relative; + position: absolute; width: 100%; background: #5850c7 url(https://d20ohkaloyme4g.cloudfront.net/img/hero-illustration-module.png) repeat; color: #fff; @@ -98,4 +98,25 @@ body { .nopointer{ -} \ No newline at end of file +} + +.hr-line-dashed { + border-top: 1px dashed #E7EAEC; + color: #ffffff; + background-color: #ffffff; + height: 1px; + margin: 20px 0; +} + +h2 { + font-size: 24px; + font-weight: 100; +} +.block3 { + background: white; +} + +.search-form{ + min-width:60vw; +} + diff --git a/frontpage/entity.html b/frontpage/entity.html new file mode 100644 index 0000000..9689498 --- /dev/null +++ b/frontpage/entity.html @@ -0,0 +1,251 @@ + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+
+

Software engineering and startups

+

Rijksuniversiteit Groningen

+
+
+
+
+
+
+

Average user rating

+

3 / 5

+ + + + + +
+
+
+

Rating breakdown

+
+
+
5
+
+
+
+
+ 80% Complete (danger) +
+
+
+
0
+
+
+
+
4
+
+
+
+
+ 80% Complete (danger) +
+
+
+
1
+
+
+
+
3
+
+
+
+
+ 80% Complete (danger) +
+
+
+
1
+
+
+
+
2
+
+
+
+
+ 80% Complete (danger) +
+
+
+
1
+
+
+
+
1
+
+
+
+
+ 80% Complete (danger) +
+
+
+
0
+
+
+
+ +
+
+
+
+ + +
+
+
+ + + +
+ +
+
+ +
+ +
+
+ + +
January 29, 2016
1 day ago
+
+
+
+
+ + + + + +
+
Course review 3
+
Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley
+
+
+ + + + + +
+
+
+ +
+ + + + + + + + + + + + \ No newline at end of file diff --git a/frontpage/js/main.js b/frontpage/js/main.js index b61dd7d..75bf7e7 100644 --- a/frontpage/js/main.js +++ b/frontpage/js/main.js @@ -1,3 +1,8 @@ +// This is frontend javascript, DONT CHANGE!! + + + + (function(e){var t,o={className:"autosizejs",append:"",callback:!1,resizeDelay:10},i='",k.noCloneChecked=!!b.cloneNode(!0).lastChild.defaultValue,c.appendChild(b),b.innerHTML="",k.checkClone=b.cloneNode(!0).cloneNode(!0).lastChild.checked,k.noCloneEvent=!0,b.attachEvent&&(b.attachEvent("onclick",function(){k.noCloneEvent=!1}),b.cloneNode(!0).click()),null==k.deleteExpando){k.deleteExpando=!0;try{delete b.test}catch(d){k.deleteExpando=!1}}}(),function(){var b,c,d=y.createElement("div");for(b in{submit:!0,change:!0,focusin:!0})c="on"+b,(k[b+"Bubbles"]=c in a)||(d.setAttribute(c,"t"),k[b+"Bubbles"]=d.attributes[c].expando===!1);d=null}();var X=/^(?:input|select|textarea)$/i,Y=/^key/,Z=/^(?:mouse|pointer|contextmenu)|click/,$=/^(?:focusinfocus|focusoutblur)$/,_=/^([^.]*)(?:\.(.+)|)$/;function ab(){return!0}function bb(){return!1}function cb(){try{return y.activeElement}catch(a){}}m.event={global:{},add:function(a,b,c,d,e){var f,g,h,i,j,k,l,n,o,p,q,r=m._data(a);if(r){c.handler&&(i=c,c=i.handler,e=i.selector),c.guid||(c.guid=m.guid++),(g=r.events)||(g=r.events={}),(k=r.handle)||(k=r.handle=function(a){return typeof m===K||a&&m.event.triggered===a.type?void 0:m.event.dispatch.apply(k.elem,arguments)},k.elem=a),b=(b||"").match(E)||[""],h=b.length;while(h--)f=_.exec(b[h])||[],o=q=f[1],p=(f[2]||"").split(".").sort(),o&&(j=m.event.special[o]||{},o=(e?j.delegateType:j.bindType)||o,j=m.event.special[o]||{},l=m.extend({type:o,origType:q,data:d,handler:c,guid:c.guid,selector:e,needsContext:e&&m.expr.match.needsContext.test(e),namespace:p.join(".")},i),(n=g[o])||(n=g[o]=[],n.delegateCount=0,j.setup&&j.setup.call(a,d,p,k)!==!1||(a.addEventListener?a.addEventListener(o,k,!1):a.attachEvent&&a.attachEvent("on"+o,k))),j.add&&(j.add.call(a,l),l.handler.guid||(l.handler.guid=c.guid)),e?n.splice(n.delegateCount++,0,l):n.push(l),m.event.global[o]=!0);a=null}},remove:function(a,b,c,d,e){var f,g,h,i,j,k,l,n,o,p,q,r=m.hasData(a)&&m._data(a);if(r&&(k=r.events)){b=(b||"").match(E)||[""],j=b.length;while(j--)if(h=_.exec(b[j])||[],o=q=h[1],p=(h[2]||"").split(".").sort(),o){l=m.event.special[o]||{},o=(d?l.delegateType:l.bindType)||o,n=k[o]||[],h=h[2]&&new RegExp("(^|\\.)"+p.join("\\.(?:.*\\.|)")+"(\\.|$)"),i=f=n.length;while(f--)g=n[f],!e&&q!==g.origType||c&&c.guid!==g.guid||h&&!h.test(g.namespace)||d&&d!==g.selector&&("**"!==d||!g.selector)||(n.splice(f,1),g.selector&&n.delegateCount--,l.remove&&l.remove.call(a,g));i&&!n.length&&(l.teardown&&l.teardown.call(a,p,r.handle)!==!1||m.removeEvent(a,o,r.handle),delete k[o])}else for(o in k)m.event.remove(a,o+b[j],c,d,!0);m.isEmptyObject(k)&&(delete r.handle,m._removeData(a,"events"))}},trigger:function(b,c,d,e){var f,g,h,i,k,l,n,o=[d||y],p=j.call(b,"type")?b.type:b,q=j.call(b,"namespace")?b.namespace.split("."):[];if(h=l=d=d||y,3!==d.nodeType&&8!==d.nodeType&&!$.test(p+m.event.triggered)&&(p.indexOf(".")>=0&&(q=p.split("."),p=q.shift(),q.sort()),g=p.indexOf(":")<0&&"on"+p,b=b[m.expando]?b:new m.Event(p,"object"==typeof b&&b),b.isTrigger=e?2:3,b.namespace=q.join("."),b.namespace_re=b.namespace?new RegExp("(^|\\.)"+q.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,b.result=void 0,b.target||(b.target=d),c=null==c?[b]:m.makeArray(c,[b]),k=m.event.special[p]||{},e||!k.trigger||k.trigger.apply(d,c)!==!1)){if(!e&&!k.noBubble&&!m.isWindow(d)){for(i=k.delegateType||p,$.test(i+p)||(h=h.parentNode);h;h=h.parentNode)o.push(h),l=h;l===(d.ownerDocument||y)&&o.push(l.defaultView||l.parentWindow||a)}n=0;while((h=o[n++])&&!b.isPropagationStopped())b.type=n>1?i:k.bindType||p,f=(m._data(h,"events")||{})[b.type]&&m._data(h,"handle"),f&&f.apply(h,c),f=g&&h[g],f&&f.apply&&m.acceptData(h)&&(b.result=f.apply(h,c),b.result===!1&&b.preventDefault());if(b.type=p,!e&&!b.isDefaultPrevented()&&(!k._default||k._default.apply(o.pop(),c)===!1)&&m.acceptData(d)&&g&&d[p]&&!m.isWindow(d)){l=d[g],l&&(d[g]=null),m.event.triggered=p;try{d[p]()}catch(r){}m.event.triggered=void 0,l&&(d[g]=l)}return b.result}},dispatch:function(a){a=m.event.fix(a);var b,c,e,f,g,h=[],i=d.call(arguments),j=(m._data(this,"events")||{})[a.type]||[],k=m.event.special[a.type]||{};if(i[0]=a,a.delegateTarget=this,!k.preDispatch||k.preDispatch.call(this,a)!==!1){h=m.event.handlers.call(this,a,j),b=0;while((f=h[b++])&&!a.isPropagationStopped()){a.currentTarget=f.elem,g=0;while((e=f.handlers[g++])&&!a.isImmediatePropagationStopped())(!a.namespace_re||a.namespace_re.test(e.namespace))&&(a.handleObj=e,a.data=e.data,c=((m.event.special[e.origType]||{}).handle||e.handler).apply(f.elem,i),void 0!==c&&(a.result=c)===!1&&(a.preventDefault(),a.stopPropagation()))}return k.postDispatch&&k.postDispatch.call(this,a),a.result}},handlers:function(a,b){var c,d,e,f,g=[],h=b.delegateCount,i=a.target;if(h&&i.nodeType&&(!a.button||"click"!==a.type))for(;i!=this;i=i.parentNode||this)if(1===i.nodeType&&(i.disabled!==!0||"click"!==a.type)){for(e=[],f=0;h>f;f++)d=b[f],c=d.selector+" ",void 0===e[c]&&(e[c]=d.needsContext?m(c,this).index(i)>=0:m.find(c,this,null,[i]).length),e[c]&&e.push(d);e.length&&g.push({elem:i,handlers:e})}return h]","i"),hb=/^\s+/,ib=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,jb=/<([\w:]+)/,kb=/\s*$/g,rb={option:[1,""],legend:[1,"
","
"],area:[1,"",""],param:[1,"",""],thead:[1,"","
"],tr:[2,"","
"],col:[2,"","
"],td:[3,"","
"],_default:k.htmlSerialize?[0,"",""]:[1,"X
","
"]},sb=db(y),tb=sb.appendChild(y.createElement("div"));rb.optgroup=rb.option,rb.tbody=rb.tfoot=rb.colgroup=rb.caption=rb.thead,rb.th=rb.td;function ub(a,b){var c,d,e=0,f=typeof a.getElementsByTagName!==K?a.getElementsByTagName(b||"*"):typeof a.querySelectorAll!==K?a.querySelectorAll(b||"*"):void 0;if(!f)for(f=[],c=a.childNodes||a;null!=(d=c[e]);e++)!b||m.nodeName(d,b)?f.push(d):m.merge(f,ub(d,b));return void 0===b||b&&m.nodeName(a,b)?m.merge([a],f):f}function vb(a){W.test(a.type)&&(a.defaultChecked=a.checked)}function wb(a,b){return m.nodeName(a,"table")&&m.nodeName(11!==b.nodeType?b:b.firstChild,"tr")?a.getElementsByTagName("tbody")[0]||a.appendChild(a.ownerDocument.createElement("tbody")):a}function xb(a){return a.type=(null!==m.find.attr(a,"type"))+"/"+a.type,a}function yb(a){var b=pb.exec(a.type);return b?a.type=b[1]:a.removeAttribute("type"),a}function zb(a,b){for(var c,d=0;null!=(c=a[d]);d++)m._data(c,"globalEval",!b||m._data(b[d],"globalEval"))}function Ab(a,b){if(1===b.nodeType&&m.hasData(a)){var c,d,e,f=m._data(a),g=m._data(b,f),h=f.events;if(h){delete g.handle,g.events={};for(c in h)for(d=0,e=h[c].length;e>d;d++)m.event.add(b,c,h[c][d])}g.data&&(g.data=m.extend({},g.data))}}function Bb(a,b){var c,d,e;if(1===b.nodeType){if(c=b.nodeName.toLowerCase(),!k.noCloneEvent&&b[m.expando]){e=m._data(b);for(d in e.events)m.removeEvent(b,d,e.handle);b.removeAttribute(m.expando)}"script"===c&&b.text!==a.text?(xb(b).text=a.text,yb(b)):"object"===c?(b.parentNode&&(b.outerHTML=a.outerHTML),k.html5Clone&&a.innerHTML&&!m.trim(b.innerHTML)&&(b.innerHTML=a.innerHTML)):"input"===c&&W.test(a.type)?(b.defaultChecked=b.checked=a.checked,b.value!==a.value&&(b.value=a.value)):"option"===c?b.defaultSelected=b.selected=a.defaultSelected:("input"===c||"textarea"===c)&&(b.defaultValue=a.defaultValue)}}m.extend({clone:function(a,b,c){var d,e,f,g,h,i=m.contains(a.ownerDocument,a);if(k.html5Clone||m.isXMLDoc(a)||!gb.test("<"+a.nodeName+">")?f=a.cloneNode(!0):(tb.innerHTML=a.outerHTML,tb.removeChild(f=tb.firstChild)),!(k.noCloneEvent&&k.noCloneChecked||1!==a.nodeType&&11!==a.nodeType||m.isXMLDoc(a)))for(d=ub(f),h=ub(a),g=0;null!=(e=h[g]);++g)d[g]&&Bb(e,d[g]);if(b)if(c)for(h=h||ub(a),d=d||ub(f),g=0;null!=(e=h[g]);g++)Ab(e,d[g]);else Ab(a,f);return d=ub(f,"script"),d.length>0&&zb(d,!i&&ub(a,"script")),d=h=e=null,f},buildFragment:function(a,b,c,d){for(var e,f,g,h,i,j,l,n=a.length,o=db(b),p=[],q=0;n>q;q++)if(f=a[q],f||0===f)if("object"===m.type(f))m.merge(p,f.nodeType?[f]:f);else if(lb.test(f)){h=h||o.appendChild(b.createElement("div")),i=(jb.exec(f)||["",""])[1].toLowerCase(),l=rb[i]||rb._default,h.innerHTML=l[1]+f.replace(ib,"<$1>")+l[2],e=l[0];while(e--)h=h.lastChild;if(!k.leadingWhitespace&&hb.test(f)&&p.push(b.createTextNode(hb.exec(f)[0])),!k.tbody){f="table"!==i||kb.test(f)?""!==l[1]||kb.test(f)?0:h:h.firstChild,e=f&&f.childNodes.length;while(e--)m.nodeName(j=f.childNodes[e],"tbody")&&!j.childNodes.length&&f.removeChild(j)}m.merge(p,h.childNodes),h.textContent="";while(h.firstChild)h.removeChild(h.firstChild);h=o.lastChild}else p.push(b.createTextNode(f));h&&o.removeChild(h),k.appendChecked||m.grep(ub(p,"input"),vb),q=0;while(f=p[q++])if((!d||-1===m.inArray(f,d))&&(g=m.contains(f.ownerDocument,f),h=ub(o.appendChild(f),"script"),g&&zb(h),c)){e=0;while(f=h[e++])ob.test(f.type||"")&&c.push(f)}return h=null,o},cleanData:function(a,b){for(var d,e,f,g,h=0,i=m.expando,j=m.cache,l=k.deleteExpando,n=m.event.special;null!=(d=a[h]);h++)if((b||m.acceptData(d))&&(f=d[i],g=f&&j[f])){if(g.events)for(e in g.events)n[e]?m.event.remove(d,e):m.removeEvent(d,e,g.handle);j[f]&&(delete j[f],l?delete d[i]:typeof d.removeAttribute!==K?d.removeAttribute(i):d[i]=null,c.push(f))}}}),m.fn.extend({text:function(a){return V(this,function(a){return void 0===a?m.text(this):this.empty().append((this[0]&&this[0].ownerDocument||y).createTextNode(a))},null,a,arguments.length)},append:function(){return this.domManip(arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=wb(this,a);b.appendChild(a)}})},prepend:function(){return this.domManip(arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=wb(this,a);b.insertBefore(a,b.firstChild)}})},before:function(){return this.domManip(arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this)})},after:function(){return this.domManip(arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this.nextSibling)})},remove:function(a,b){for(var c,d=a?m.filter(a,this):this,e=0;null!=(c=d[e]);e++)b||1!==c.nodeType||m.cleanData(ub(c)),c.parentNode&&(b&&m.contains(c.ownerDocument,c)&&zb(ub(c,"script")),c.parentNode.removeChild(c));return this},empty:function(){for(var a,b=0;null!=(a=this[b]);b++){1===a.nodeType&&m.cleanData(ub(a,!1));while(a.firstChild)a.removeChild(a.firstChild);a.options&&m.nodeName(a,"select")&&(a.options.length=0)}return this},clone:function(a,b){return a=null==a?!1:a,b=null==b?a:b,this.map(function(){return m.clone(this,a,b)})},html:function(a){return V(this,function(a){var b=this[0]||{},c=0,d=this.length;if(void 0===a)return 1===b.nodeType?b.innerHTML.replace(fb,""):void 0;if(!("string"!=typeof a||mb.test(a)||!k.htmlSerialize&&gb.test(a)||!k.leadingWhitespace&&hb.test(a)||rb[(jb.exec(a)||["",""])[1].toLowerCase()])){a=a.replace(ib,"<$1>");try{for(;d>c;c++)b=this[c]||{},1===b.nodeType&&(m.cleanData(ub(b,!1)),b.innerHTML=a);b=0}catch(e){}}b&&this.empty().append(a)},null,a,arguments.length)},replaceWith:function(){var a=arguments[0];return this.domManip(arguments,function(b){a=this.parentNode,m.cleanData(ub(this)),a&&a.replaceChild(b,this)}),a&&(a.length||a.nodeType)?this:this.remove()},detach:function(a){return this.remove(a,!0)},domManip:function(a,b){a=e.apply([],a);var c,d,f,g,h,i,j=0,l=this.length,n=this,o=l-1,p=a[0],q=m.isFunction(p);if(q||l>1&&"string"==typeof p&&!k.checkClone&&nb.test(p))return this.each(function(c){var d=n.eq(c);q&&(a[0]=p.call(this,c,d.html())),d.domManip(a,b)});if(l&&(i=m.buildFragment(a,this[0].ownerDocument,!1,this),c=i.firstChild,1===i.childNodes.length&&(i=c),c)){for(g=m.map(ub(i,"script"),xb),f=g.length;l>j;j++)d=i,j!==o&&(d=m.clone(d,!0,!0),f&&m.merge(g,ub(d,"script"))),b.call(this[j],d,j);if(f)for(h=g[g.length-1].ownerDocument,m.map(g,yb),j=0;f>j;j++)d=g[j],ob.test(d.type||"")&&!m._data(d,"globalEval")&&m.contains(h,d)&&(d.src?m._evalUrl&&m._evalUrl(d.src):m.globalEval((d.text||d.textContent||d.innerHTML||"").replace(qb,"")));i=c=null}return this}}),m.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,b){m.fn[a]=function(a){for(var c,d=0,e=[],g=m(a),h=g.length-1;h>=d;d++)c=d===h?this:this.clone(!0),m(g[d])[b](c),f.apply(e,c.get());return this.pushStack(e)}});var Cb,Db={};function Eb(b,c){var d,e=m(c.createElement(b)).appendTo(c.body),f=a.getDefaultComputedStyle&&(d=a.getDefaultComputedStyle(e[0]))?d.display:m.css(e[0],"display");return e.detach(),f}function Fb(a){var b=y,c=Db[a];return c||(c=Eb(a,b),"none"!==c&&c||(Cb=(Cb||m("