]> git.openstreetmap.org Git - osqa.git/commitdiff
admin recalculate denormalized data tool and fix in comment votes
authorhernani <hernani@0cfe37f9-358a-4d5e-be75-b63607b5c754>
Sun, 18 Apr 2010 22:42:31 +0000 (22:42 +0000)
committerhernani <hernani@0cfe37f9-358a-4d5e-be75-b63607b5c754>
Sun, 18 Apr 2010 22:42:31 +0000 (22:42 +0000)
git-svn-id: http://svn.osqa.net/svnroot/osqa/trunk@51 0cfe37f9-358a-4d5e-be75-b63607b5c754

forum/reputation.py
forum/skins/css3/media/images/img_tag.jpg [deleted file]
forum/skins/css3/media/images/tag.png [deleted file]
forum/skins/css3/media/style/style.css [deleted file]
forum/skins/css3/templates/header.html [deleted file]
forum/skins/css3/templates/search.html [deleted file]
forum/skins/default/media/js/osqa.main.js
forum/skins/default/templates/node/comments.html
forum/skins/default/templates/osqaadmin/index.html
forum/urls.py
forum/views/admin.py

index 8ee3469ba27b62205c440a32064a8260f9c1e3ac..71f9d65fd7a5c8abb0c99bb52eb5b553f3083ad6 100644 (file)
@@ -58,7 +58,7 @@ answer_accepted_canceled.connect(on_answer_accepted)
 \r
 \r
 def on_vote(instance, created, **kwargs):\r
-    if created and not instance.content_object.wiki:\r
+    if created and (instance.content_object.node_type in ("question", "answer") and not instance.content_object.wiki):\r
         post = instance.content_object.leaf\r
         question = (post.__class__ == Question) and post or post.question\r
 \r
@@ -79,7 +79,7 @@ post_save.connect(on_vote, sender=Vote)
 \r
 \r
 def on_vote_canceled(instance, **kwargs):\r
-    if not instance.content_object.wiki:\r
+    if instance.content_object.node_type in ("question", "answer") and not instance.content_object.wiki:\r
         post = instance.content_object.leaf\r
         question = (post.__class__ == Question) and post or post.question\r
 \r
diff --git a/forum/skins/css3/media/images/img_tag.jpg b/forum/skins/css3/media/images/img_tag.jpg
deleted file mode 100644 (file)
index da9e409..0000000
Binary files a/forum/skins/css3/media/images/img_tag.jpg and /dev/null differ
diff --git a/forum/skins/css3/media/images/tag.png b/forum/skins/css3/media/images/tag.png
deleted file mode 100644 (file)
index ce209b2..0000000
Binary files a/forum/skins/css3/media/images/tag.png and /dev/null differ
diff --git a/forum/skins/css3/media/style/style.css b/forum/skins/css3/media/style/style.css
deleted file mode 100644 (file)
index 687ce7e..0000000
+++ /dev/null
@@ -1,2510 +0,0 @@
-@import url(jquery.autocomplete.css);\r
-\r
-body {\r
-    background: #EEE;\r
-    font-size: 12px;\r
-    line-height: 150%;\r
-    margin: 0;\r
-    padding: 0;\r
-    color: #000;\r
-    font-family: sans-serif;\r
-}\r
-\r
-div {\r
-    margin: 0 auto;\r
-    padding: 0;\r
-}\r
-\r
-h1, h2, h3, h4, h5, h6, ul, li, dl, dt, dd, form, img, p {\r
-    margin: 0;\r
-    padding: 0;\r
-    border: none;\r
-}\r
-\r
-label {\r
-    vertical-align: middle;\r
-}\r
-\r
-hr {\r
-    border: none;\r
-    border-top: 1px dashed #ccccce;\r
-}\r
-\r
-input, select {\r
-    vertical-align: middle;\r
-    font-family: Trebuchet MS, "segoe ui", Helvetica, "Microsoft YaHei", ? ?, Tahoma, Verdana, MingLiu, PMingLiu, Arial, sans-serif;\r
-}\r
-\r
-p {\r
-    margin-bottom: 13px;\r
-    font-size: 13px;\r
-    line-height: 140%;\r
-}\r
-\r
-a {\r
-    color: #333333;\r
-    text-decoration: none;\r
-}\r
-\r
-.badges a {\r
-    color: #763333;\r
-    text-decoration: underline;\r
-}\r
-\r
-a:hover {\r
-    text-decoration: underline;\r
-}\r
-\r
-.block {\r
-    width: 960px;\r
-    height: auto;\r
-}\r
-\r
-.fleft {\r
-    float: left;\r
-}\r
-\r
-.fright {\r
-    float: right;\r
-}\r
-\r
-.tleft {\r
-    text-align: left;\r
-}\r
-\r
-.tcenter {\r
-    text-align: center;\r
-}\r
-\r
-.tright {\r
-    text-align: right;\r
-}\r
-\r
-.dis {\r
-    display: block;\r
-}\r
-\r
-.inline {\r
-    display: inline;\r
-}\r
-\r
-.none {\r
-    display: none;\r
-}\r
-\r
-.red {\r
-    color: #CC0000;\r
-}\r
-\r
-.b {\r
-    font-weight: bold;\r
-}\r
-\r
-.f10 {\r
-    font-size: 10px;\r
-}\r
-\r
-.f11 {\r
-    font-size: 11px;\r
-}\r
-\r
-.f12 {\r
-    font-size: 12px;\r
-}\r
-\r
-.f13 {\r
-    font-size: 13px;\r
-}\r
-\r
-.f14 {\r
-    font-size: 14px;\r
-}\r
-\r
-.white {\r
-    color: #FFFFFF;\r
-}\r
-\r
-.u {\r
-    text-decoration: underline;\r
-}\r
-\r
-.spacer1 {\r
-    height: 6px;\r
-    line-height: 6px;\r
-    clear: both;\r
-    visibility: hidden;\r
-}\r
-\r
-.spacer3 {\r
-    height: 30px;\r
-    line-height: 30px;\r
-    clear: both;\r
-    visibility: hidden;\r
-}\r
-\r
-h1 {\r
-    font-size: 160%;\r
-    padding: 5px 0 5px 0;\r
-}\r
-\r
-h2 {\r
-    font-size: 140%;\r
-    padding: 3px 0 3px 0;\r
-}\r
-\r
-h3 {\r
-    font-size: 120%;\r
-    padding: 3px 0 3px 0;\r
-}\r
-\r
-ul {\r
-    list-style: disc;\r
-    margin-left: 20px;\r
-    padding-left: 0px;\r
-    margin-bottom: 1em;\r
-}\r
-\r
-ol {\r
-    list-style: decimal;\r
-    margin-left: 30px;\r
-    margin-bottom: 1em;\r
-    padding-left: 0px;\r
-}\r
-\r
-td ul {\r
-    vertical-align: middle;\r
-}\r
-\r
-li input {\r
-    margin: 3px 3px 4px 3px;\r
-}\r
-\r
-pre {\r
-    font-family: Consolas, Monaco, Liberation Mono, Lucida Console, Monospace;\r
-    font-size: 100%;\r
-    margin-bottom: 10px;\r
-    overflow: auto;\r
-    width: 580px;\r
-    background-color: #F5F5F5;\r
-    padding-left: 5px;\r
-    padding-top: 5px;\r
-    padding-bottom: 20px ! ie7;\r
-}\r
-\r
-code {\r
-    font-family: Consolas, Monaco, Liberation Mono, Lucida Console, Monospace;\r
-    font-size: 100%;\r
-\r
-}\r
-\r
-blockquote {\r
-    margin-bottom: 10px;\r
-    margin-right: 15px;\r
-    padding: 10px 0px 1px 10px;\r
-    background-color: #F5F5F5;\r
-}\r
-\r
-/*????*/\r
-#wrapper {\r
-    width: 972px;\r
-    background: #FFF;\r
-    margin: auto;\r
-    padding: 6px;\r
-}\r
-\r
-#roof {\r
-    position: relative;\r
-    margin-top: 0px;\r
-    background: #3291C9;\r
-}\r
-\r
-#room {\r
-    padding: 10px 0 10px 0;\r
-    border-bottom: 1px solid #777;\r
-}\r
-\r
-#CALeft {\r
-    width: 710px;\r
-    float: left;\r
-    position: relative;\r
-}\r
-\r
-#CARight {\r
-    width: 240px;\r
-    float: right;\r
-}\r
-\r
-#CAFull {\r
-    float: left;\r
-    padding: 0 5px 0 5px;\r
-    width: 950px;\r
-}\r
-\r
-#ground {\r
-    width: 100%;\r
-    border-top: 1px solid #000;\r
-    padding-top: 6px;\r
-    padding-bottom: 0px;\r
-    text-align: center;\r
-    background: #777;\r
-}\r
-\r
-/*#licenseLogo {position:absolute;top:10px;right:10px;}*/\r
-\r
-/*??????*/\r
-#top {\r
-    position: absolute;\r
-    top: 0px;\r
-    right: 0px;\r
-    height: 20px;\r
-    text-align: right;\r
-    padding: 3px;\r
-    width: 500px;\r
-}\r
-\r
-/*#header {width:960px;}*/\r
-#top a {\r
-    height: 35px;\r
-    text-align: right; /*letter-spacing:1px; */\r
-    margin-left: 20px;\r
-    text-decoration: underline;\r
-    font-size: 12px;\r
-    color: #333333;\r
-}\r
-\r
-#logo {\r
-    padding: 5px 0px 0px 0px;\r
-}\r
-\r
-#navBar {\r
-    float: clear;\r
-    position: relative;\r
-    display: block;\r
-    width: 960px;\r
-}\r
-\r
-#navBar .nav {\r
-    margin: 20px 0px 0px 16px; /*letter-spacing:1px; */\r
-}\r
-\r
-#navBar .nav a {\r
-    color: #333333;\r
-    background-color: #8BE334;\r
-    -moz-border-radius-topleft: 6px;\r
-    -webkit-border-top-left-radius: 6px;\r
-    -moz-border-radius-topright: 6px;\r
-    -webkit-border-top-right-radius: 6px;\r
-    border: 1px solid #888888;\r
-    border-bottom: none;\r
-    padding: 0px 15px 3px 15px;\r
-    height: 25px;\r
-    line-height: 30px;\r
-    margin-left: 3px;\r
-    font-size: 14px;\r
-    font-weight: 400;\r
-    text-decoration: none;\r
-    display: block;\r
-    float: left;\r
-}\r
-\r
-#navBar .nav a:hover {\r
-    text-decoration: underline\r
-}\r
-\r
-#navBar .nav a.on {\r
-    height: 24px;\r
-    line-height: 28px;\r
-    border-bottom: 1px solid #a40000;\r
-    border-right: 1px solid #820000;\r
-    border-top: 1px solid #d40000;\r
-    border-left: 1px solid #d40000; /*background:#A31E39; */\r
-    background: #a40000;\r
-    color: #FFF;\r
-    font-weight: 600;\r
-    text-decoration: none\r
-}\r
-\r
-#navBar .nav a.special {\r
-    font-size: 14px;\r
-    color: #B02B2C;\r
-    font-weight: bold;\r
-    text-decoration: none;\r
-}\r
-\r
-#navBar .nav a.special:hover {\r
-    text-decoration: underline;\r
-}\r
-\r
-#navBar .nav div.focus {\r
-    float: right;\r
-    padding-right: 0px;\r
-}\r
-\r
-#searchBar {\r
-    width: 958px;\r
-    background-color: #264A5F; /*#e9b96e;*/\r
-    border: 1px solid #aaaaaa;\r
-    padding: 12px;\r
-    -moz-border-radius-topleft: 6px;\r
-    -webkit-border-top-left-radius: 6px;\r
-    -moz-border-radius-topright: 6px;\r
-    -webkit-border-top-right-radius: 6px;\r
-}\r
-\r
-#searchBar .searchInput {\r
-    font-size: 25px;\r
-    height: 30px;\r
-    width: 600px;\r
-    background: #EEEEEE;\r
-}\r
-\r
-#searchBar .searchBtn {\r
-    font-size: 14px;\r
-    height: 26px;\r
-    width: 80px;\r
-}\r
-\r
-#searchBar .options {\r
-    padding: 3px 0 3px 0;\r
-    font-size: 100%;\r
-    color: #EEE; /*letter-spacing:1px;*/\r
-}\r
-\r
-#searchBar .options INPUT {\r
-    margin: 0 3px 0 15px;\r
-}\r
-\r
-#searchBar .options INPUT:hover {\r
-    cursor: pointer\r
-}\r
-\r
-#ask_teaser {\r
-    font-size: 35px;\r
-    color: white;\r
-    font-weight: bolder;\r
-    display: inline;\r
-    margin-right: 25px;\r
-    text-shadow: 4px 4px 4px #000;\r
-    vertical-align: middle;\r
-}\r
-\r
-#ask_input {\r
-    display: inline;\r
-}\r
-\r
-#go_btn {\r
-    width: 75px;\r
-    height: 40px;\r
-    font-weight: bolder;\r
-    font-size: 30px;\r
-    -moz-border-radius: 5px;\r
-    -webkit-border-radius: 5px;\r
-    border: 2px solid #35609A;\r
-    background-color: #72A0D0;\r
-    color: #555753;\r
-}\r
-\r
-/*????*/\r
-#listA {\r
-    float: left;\r
-    background-color: #FFF;\r
-    padding: 0 0px 0 0px;\r
-    width: 100%;\r
-}\r
-\r
-#listA .qstA {\r
-    position: relative;\r
-    padding: 3px 5px 5px 10px;\r
-    border-top: 1px dashed #ccccce;\r
-    /*border-left:1px solid #ebebbe;\r
-    border-right:1px solid #b4b48e;\r
-    border-bottom:1px solid #b4b48e;*/\r
-    background: white; /* #f9f7ed;*/\r
-/*margin:10px 0 10px 0;*/\r
-/*background:url(../images/quest-bg.gif) repeat-x top;*/\r
-}\r
-\r
-#listA .qstA thumb {\r
-    float: left;\r
-}\r
-\r
-#listA .qstA H2 {\r
-    font-size: 14px;\r
-    font-weight: 800;\r
-    margin: 8px auto;\r
-    padding: 0px;\r
-}\r
-\r
-#listA .qstA H2 a {\r
-    color: 333333 /*#2e3436*/;\r
-    font-size: 15px;\r
-}\r
-\r
-#listA .qstA .stat {\r
-    position: absolute;\r
-    right: 0px;\r
-    bottom: 5px;\r
-    font-size: 12px; /*letter-spacing:1px;*/\r
-    float: right;\r
-}\r
-\r
-#listA .qstA .stat span {\r
-    margin-right: 5px;\r
-}\r
-\r
-#listA .qstA .stat td {\r
-    min-width: 40px;\r
-    text-align: center;\r
-}\r
-\r
-#listA .qstA .stat .num {\r
-    font-family: sans-serif;\r
-    color: #a40000;\r
-    /*background:#eeeeec;\r
- border: 1px solid #babdb6;*/\r
-    margin: 0px;\r
-    font-size: 17px;\r
-    font-weight: 800;\r
-}\r
-\r
-#listA .qstA table {\r
-    border-spacing: 0px;\r
-}\r
-\r
-#listA .qstA table td {\r
-    padding: 0px;\r
-    width: 60px;\r
-    text-align: center;\r
-}\r
-\r
-#listA .qstA .stat .unit {\r
-    color: #777777;\r
-    margin: 0px\r
-}\r
-\r
-#listA .qstA .from {\r
-    margin-top: 5px;\r
-    font-size: 13px;\r
-    color: #777777;\r
-}\r
-\r
-#listA .qstA .from .score {\r
-    font-family: sans-serif;\r
-    color: #555555;\r
-}\r
-\r
-#listA .qstA .date {\r
-    margin-left: 10px;\r
-    color: #777777;\r
-}\r
-\r
-#listA .qstA .wiki {\r
-    color: #763333;\r
-    font-size: 12px;\r
-}\r
-\r
-#listA .qstA .from a {\r
-}\r
-\r
-#listA .qstA .from IMG {\r
-    vertical-align: middle;\r
-}\r
-\r
-#listA .qstA .author {\r
-    font-weight: 400;\r
-}\r
-\r
-#listA .qstA .author a {\r
-    color: #444444;\r
-}\r
-\r
-#listA .qstA .summary {\r
-    margin-right: 5px;\r
-}\r
-\r
-.short-summary {\r
-    position: relative;\r
-    padding: 3px 5px 5px 10px;\r
-    border-top: 1px dotted #ccccce;\r
-    overflow: hidden;\r
-    width: 700px;\r
-    float: left;\r
-}\r
-\r
-.short-summary h2 {\r
-    font-size: 16px;\r
-    font-family: "Trebuchet MS", "segoe ui", arial, sans-serif;\r
-}\r
-\r
-.short-summary .userinfo {\r
-    float: right;\r
-    margin-top: 8px;\r
-}\r
-\r
-.short-summary .counts {\r
-    float: right;\r
-    margin-top: 4px;\r
-}\r
-\r
-.short-summary .counts .item-count {\r
-    font-size: 17px;\r
-    font-weight: 800;\r
-}\r
-\r
-.short-summary .votes,\r
-.short-summary .status,\r
-.short-summary .views {\r
-    font-size: 12px;\r
-    text-align: center;\r
-    margin: 0 0 0 7px;\r
-    padding: 4px 2px 0px 2px;\r
-    width: 46px;\r
-    height: 48px;\r
-    float: left;\r
-    -moz-border-radius: 3px;\r
-    -khtml-border-radius: 3px;\r
-    -webkit-border-radius: 3px;\r
-    border-right: 1px solid #264A5F;\r
-    border-bottom: 1px solid #264A5F;\r
-}\r
-\r
-#question-table {\r
-    margin-bottom: 10px; /*border-bottom:1px solid #888a85;*/\r
-}\r
-\r
-.evenMore {\r
-    font-size: 14px;\r
-    font-weight: 800;\r
-}\r
-\r
-.questions-count {\r
-    font-size: 32px;\r
-    font-family: sans-serif;\r
-    font-weight: 600;\r
-    padding: 0 0 5px 0px;\r
-    color: #a40000;\r
-    margin-top: 3px;\r
-}\r
-\r
-/*???*/\r
-.boxA {\r
-    background: #264A5F;\r
-    padding: 6px;\r
-    margin-bottom: 8px;\r
-    border: 1px solid #babdb6;\r
-    -moz-border-radius: 5px;\r
-    -khtml-border-radius: 5px;\r
-    -webkit-border-radius: 5px;\r
-}\r
-\r
-.boxA H3 {\r
-    font-size: 13px;\r
-    font-weight: 800;\r
-    color: #FFF;\r
-    margin: 0;\r
-    padding: 0;\r
-    margin-bottom: 4px;\r
-}\r
-\r
-.boxA .body {\r
-    border: 1px solid #999;\r
-    padding: 8px;\r
-    background: #FFF;\r
-    font-size: 13px;\r
-}\r
-\r
-.boxA .more {\r
-    padding: 2px;\r
-    text-align: right;\r
-    font-weight: 800;\r
-}\r
-\r
-.boxB {\r
-    background: #F9F7ED;\r
-    padding: 6px;\r
-    margin-bottom: 8px;\r
-    border: solid 1px #aaaaaa;\r
-}\r
-\r
-.boxB H3 {\r
-    font-size: 13px;\r
-    font-weight: 800;\r
-    color: #000;\r
-    margin: 0;\r
-    padding: 0 0 0 15px;\r
-    margin-bottom: 4px;\r
-    background: url(../images/dot-g.gif) no-repeat left center;\r
-}\r
-\r
-.boxB .body {\r
-    border: 1px solid #aaaaaa;\r
-    padding: 8px;\r
-    background: #FFF;\r
-    font-size: 13px;\r
-    line-height: 160%;\r
-}\r
-\r
-.boxB .more {\r
-    padding: 1px;\r
-    text-align: right;\r
-    font-weight: 800;\r
-}\r
-\r
-.boxC {\r
-    background: #EEE; /*f9f7ed;*/\r
-    padding: 10px;\r
-    margin-bottom: 8px;\r
-    border-top: 1px solid #eeeeec;\r
-    border-left: 1px solid #eeeeec;\r
-    border-right: 1px solid #a9aca5;\r
-    border-bottom: 1px solid #babdb6;\r
-}\r
-\r
-.boxC p {\r
-    margin-bottom: 8px;\r
-}\r
-\r
-.boxC p.nomargin {\r
-    margin: 0px;\r
-}\r
-\r
-.boxC p.info-box-follow-up-links {\r
-    text-align: right;\r
-    margin: 0;\r
-}\r
-\r
-/*??*/\r
-.pager {\r
-    margin-top: 10px;\r
-    margin-bottom: 16px;\r
-    float: left;\r
-}\r
-\r
-.pagesize {\r
-    margin-top: 10px;\r
-    margin-bottom: 16px;\r
-    float: right;\r
-}\r
-\r
-/** PAGINATOR **/\r
-.paginator {\r
-    padding: 5px 0 10px 0;\r
-    font: normal 12px sans-serif;\r
-}\r
-\r
-.paginator .prev-na,\r
-.paginator .next-na {\r
-    padding: .3em;\r
-    font: bold .875em sans-serif;\r
-}\r
-\r
-.paginator .prev-na,\r
-.paginator .next-na {\r
-    border: 1px solid #ccc;\r
-    background-color: #f9f9f9;\r
-    color: #aaa;\r
-    font-weight: normal;\r
-}\r
-\r
-.paginator .prev a, .paginator .prev a:visited,\r
-.paginator .next a, .paginator .next a:visited {\r
-    border: 1px solid #fff;\r
-    background-color: #fff;\r
-    color: #777;\r
-    padding: 2px 4px 3px 4px;\r
-    font: bold 100% sans-serif;\r
-}\r
-\r
-.paginator .prev, .paginator .prev-na {\r
-    margin-right: .5em;\r
-}\r
-\r
-.paginator .next, .paginator .next-na {\r
-    margin-left: .5em;\r
-}\r
-\r
-.paginator .page a, .paginator .page a:visited, .paginator .curr {\r
-    padding: .25em;\r
-    font: normal .875em verdana;\r
-    border: 1px solid #ccc;\r
-    background-color: #fff;\r
-    margin: 0em .25em;\r
-    color: #777;\r
-}\r
-\r
-.paginator .curr {\r
-    background-color: #777;\r
-    color: #fff;\r
-    border: 1px solid #777;\r
-    font-weight: bold;\r
-}\r
-\r
-.paginator .page a:hover,\r
-.paginator .curr a:hover,\r
-.paginator .prev a:hover,\r
-.paginator .next a:hover {\r
-    color: #fff;\r
-    background-color: #777;\r
-    border: 1px solid #777;\r
-    text-decoration: none;\r
-}\r
-\r
-.paginator .text {\r
-    color: #777;\r
-    padding: .3em;\r
-    font: bold 100% sans-serif;\r
-}\r
-\r
-.paginator-container {\r
-    float: right;\r
-    padding: 10px 0 10px 0;\r
-}\r
-\r
-.paginator-container-left {\r
-    padding: 5px 0 10px 0;\r
-}\r
-\r
-/*??*/\r
-.tag {\r
-    font-size: 13px;\r
-    font-weight: normal;\r
-    color: #333;\r
-    text-decoration: none;\r
-    background-color: #EEE;\r
-    border-left: 3px solid #777;\r
-    border-top: 1px solid #EEE;\r
-    border-bottom: 1px solid #CCC;\r
-    border-right: 1px solid #CCC;\r
-    padding: 1px 8px 1px 8px;\r
-}\r
-\r
-.tags {\r
-    font-family: sans-serif;\r
-    line-height: 200%;\r
-    display: block;\r
-    margin-top: 5px;\r
-}\r
-\r
-.tags a {\r
-    background: url('/m/css3/media/images/tag.png') no-repeat center left;\r
-    white-space: nowrap;\r
-    font-size: 13px;\r
-    font-weight: normal;\r
-    color: #333;\r
-    text-decoration: none;\r
-    background-color: #EEE;\r
-    margin-right: 3px;\r
-    padding: 2px 10px 2px 16px;\r
-    -moz-border-radius: 2px;\r
-    -webkit-border-radius: 2px;\r
-    border-right: 1px solid #264A5F;\r
-    border-bottom: 1px solid #264A5F;\r
-}\r
-\r
-.tags a:hover {\r
-    background-color: #fFF;\r
-    color: #333;\r
-}\r
-\r
-.tagsbox {\r
-    line-height: 200%;\r
-}\r
-\r
-.tagsbox a {\r
-    font-size: 13px;\r
-    font-weight: normal;\r
-    color: #333;\r
-    text-decoration: none;\r
-    background-color: #EEE;\r
-    border-left: 3px solid #777;\r
-    border-top: 1px solid #EEE;\r
-    border-bottom: 1px solid #CCC;\r
-    border-right: 1px solid #CCC;\r
-    padding: 1px 8px 1px 8px;\r
-}\r
-\r
-.tagsbox a:hover {\r
-    background-color: #fFF;\r
-    color: #333;\r
-}\r
-\r
-.tag-number {\r
-    font-weight: 700;\r
-    font-family: sans-serif;\r
-}\r
-\r
-.marked-tags {\r
-    margin-top: 0px;\r
-    margin-bottom: 5px;\r
-}\r
-\r
-.deletable-tag {\r
-    margin-right: 3px;\r
-    white-space: nowrap;\r
-}\r
-\r
-/*??*/\r
-a.medal {\r
-    font-size: 14px;\r
-    line-height: 250%;\r
-    font-weight: 800;\r
-    color: #333;\r
-    text-decoration: none;\r
-    background: url(/m/default/media/images/medala.gif) no-repeat;\r
-    border-left: 1px solid #EEE;\r
-    border-top: 1px solid #EEE;\r
-    border-bottom: 1px solid #CCC;\r
-    border-right: 1px solid #CCC;\r
-    padding: 4px 12px 4px 6px;\r
-}\r
-\r
-a:hover.medal {\r
-    color: #333;\r
-    text-decoration: none;\r
-    background: url(/m/default/mediaimages/medala_on.gif) no-repeat;\r
-    border-left: 1px solid #E7E296;\r
-    border-top: 1px solid #E7E296;\r
-    border-bottom: 1px solid #D1CA3D;\r
-    border-right: 1px solid #D1CA3D;\r
-}\r
-\r
-/*Tab?*/\r
-.tabBar {\r
-    background-color: #FFF;\r
-    border-bottom: 1px solid white;\r
-    height: 30px;\r
-    width: 100%;\r
-    clear: both;\r
-    margin-bottom: 3px;\r
-    -moz-border-radius: 2px;\r
-    -khtml-border-radius: 2px;\r
-    -webkit-border-radius: 2px;\r
-}\r
-\r
-.tabsA {\r
-    background-color: #FFF;\r
-    float: right;\r
-    position: relative;\r
-    display: block;\r
-    font-weight: bold;\r
-    height: 20px;\r
-}\r
-\r
-.tabsB {\r
-    background-color: #FFF;\r
-    float: left;\r
-    position: relative;\r
-    display: block;\r
-    font-weight: bold;\r
-    height: 20px;\r
-}\r
-\r
-.tabsA a.on, .tabsA a:hover, .tabsB a.on, .tabsB a:hover {\r
-    background: #fff;\r
-    color: #a40000;\r
-    border-top: 1px solid #babdb6;\r
-    border-left: 1px solid #babdb6;\r
-    border-right: 1px solid #888a85;\r
-    border-bottom: 1px solid #888a85;\r
-    height: 24px;\r
-    line-height: 26px;\r
-    margin-top: 3px;\r
-    padding: 0px 11px 0px 11px;\r
-}\r
-\r
-.tabsA a {\r
-    background: #f9f7eb;\r
-    border-top: 1px solid #eeeeec;\r
-    border-left: 1px solid #eeeeec;\r
-    border-right: 1px solid #a9aca5;\r
-    border-bottom: 1px solid #888a85;\r
-    color: #888a85;\r
-    display: block;\r
-    float: left;\r
-    height: 20px;\r
-    line-height: 22px;\r
-    margin: 5px 4px 0 0;\r
-    padding: 0 11px 0 11px;\r
-    text-decoration: none;\r
-}\r
-\r
-.tabsB a {\r
-    background: #eee;\r
-    border: 1px solid #eee;\r
-    color: #777;\r
-    display: block;\r
-    float: left;\r
-    height: 22px;\r
-    line-height: 28px;\r
-    margin: 5px 0px 0 4px;\r
-    padding: 0 11px 0 11px;\r
-    text-decoration: none;\r
-}\r
-\r
-/*.tabsA a:hover, .tabsB a:hover {background: #fff;border: 1px solid #777;border-bottom:3px solid #FFF;}*/\r
-.headlineA {\r
-    font-size: 13px;\r
-    border-bottom: 1px solid #777;\r
-    padding-bottom: 2px;\r
-    font-weight: 800;\r
-    margin-bottom: 12px;\r
-    text-align: right;\r
-    height: 30px;\r
-}\r
-\r
-.headQuestions {\r
-    float: left;\r
-    height: 23px;\r
-    line-height: 23px;\r
-    margin: 5px 0 0 5px;\r
-    padding: 0px 6px 0px 15px;\r
-    font-size: 15px;\r
-    font-weight: 700;\r
-    border-bottom: 0px solid #777;\r
-    border-left: 0px solid #darkred;\r
-    background-color: #FFF;\r
-    background: url(../images/dot-list.gif) no-repeat left center;\r
-}\r
-\r
-.headAnswers {\r
-    float: left;\r
-    padding: 3px;\r
-    font-size: 18px;\r
-    font-weight: 800;\r
-    background: url(../images/ico_answers.gif) left 2px no-repeat;\r
-    padding-left: 24px;\r
-}\r
-\r
-.headTags {\r
-    float: left;\r
-    padding: 3px;\r
-    font-size: 18px;\r
-    font-weight: 800;\r
-    background: url(../images/ico_tags.gif) no-repeat;\r
-    padding-left: 24px;\r
-}\r
-\r
-.headUsers {\r
-    float: left;\r
-    height: 23px;\r
-    line-height: 23px;\r
-    margin: 5px 0 0 5px;\r
-    padding: 0px 6px 0px 15px;\r
-    font-size: 15px;\r
-    font-weight: 700;\r
-    border-bottom: 0px solid #777;\r
-    border-left: 0px solid #darkred;\r
-    background-color: #FFF;\r
-    background: url(../images/dot-list.gif) no-repeat left center;\r
-}\r
-\r
-.headMedals {\r
-    float: left;\r
-    height: 23px;\r
-    line-height: 23px;\r
-    margin: 5px 0 0 5px;\r
-    padding: 0px 6px 0px 15px;\r
-    font-size: 15px;\r
-    font-weight: 700;\r
-    border-bottom: 0px solid #777;\r
-    border-left: 0px solid #darkred;\r
-    background-color: #FFF;\r
-    background: url(../images/dot-list.gif) no-repeat left center;\r
-}\r
-\r
-.headLogin {\r
-    float: left;\r
-    padding: 3px;\r
-    font-size: 15px;\r
-    font-weight: 800;\r
-    background: url(../images/ico_login.gif) no-repeat;\r
-    padding-left: 24px;\r
-}\r
-\r
-.headNormal {\r
-    text-align: left;\r
-    padding: 3px;\r
-    font-size: 15px;\r
-    margin-bottom: 12px;\r
-    font-weight: bold;\r
-    border-bottom: 1px solid #777;\r
-}\r
-\r
-.headUser {\r
-    text-align: left;\r
-    padding: 5px;\r
-    font-size: 20px; /*letter-spacing:1px;*/\r
-    margin-bottom: 12px;\r
-    font-weight: 800;\r
-    border-bottom: 1px solid #777;\r
-}\r
-\r
-/*RSS??*/\r
-#feeds {\r
-    margin: 10px 0;\r
-}\r
-\r
-#feeds a {\r
-    background: url(../images/feed-icon-small.png) no-repeat 0;\r
-    padding-left: 18px;\r
-    font-weight: 700;\r
-    font-size: 13px;\r
-}\r
-\r
-/*??*/\r
-#question {\r
-    margin-bottom: 30px;\r
-}\r
-\r
-#question h1 {\r
-    font-size: 15px;\r
-    background: #CCC;\r
-    padding: 6px 8px;;\r
-}\r
-\r
-#question .body {\r
-    background: #F7F7F7;\r
-    padding: 20px 10px;\r
-}\r
-\r
-.starter {\r
-    padding: 10px;\r
-    background: #E0EAF1;\r
-}\r
-\r
-.vote {\r
-    font-size: 20px;\r
-    color: #666;\r
-    font-weight: 800;\r
-}\r
-\r
-.questions-related {\r
-    font-weight: 700;\r
-    word-wrap: break-word;\r
-}\r
-\r
-.questions-related p {\r
-    line-height: 20px;\r
-    margin-bottom: 10px;\r
-    font-size: 100%;\r
-}\r
-\r
-.question-status {\r
-    margin-top: 10px;\r
-    padding: 20px;\r
-    background-color: #F5F5F5;\r
-    text-align: center;\r
-}\r
-\r
-.question-status h3 {\r
-    font-size: 125%;\r
-}\r
-\r
-.question-body {\r
-    min-height: 100px;\r
-    font-size: 13px;\r
-    line-height: 20px;\r
-}\r
-\r
-.question-body IMG {\r
-    max-width: 600px;\r
-}\r
-\r
-.question-mark {\r
-    /*background-color:#fff5e0;\r
-    border-top: 1px solid #eeeeec;\r
-    border-right: 1px solid #babdb6;\r
-    border-bottom: 1px solid #babdb6;\r
-    border-left: 1px solid #eeeeec;*/\r
-    text-align: left;\r
-    padding: 5px;\r
-    overflow: hidden;\r
-}\r
-\r
-.question-edit {\r
-    text-align: left;\r
-    overflow: hidden;\r
-}\r
-\r
-.vote-buttons {\r
-    float: left;\r
-    text-align: center;\r
-}\r
-\r
-.vote-buttons IMG {\r
-    cursor: pointer;\r
-}\r
-\r
-.vote-number {\r
-    font-family: Arial;\r
-    padding: 0px 0 3px 0;\r
-    font-size: 140%;\r
-    font-weight: bold;\r
-    color: #777;\r
-}\r
-\r
-.question-img-upvote:hover {\r
-    background: url(../images/vote-arrow-up-on.png)\r
-}\r
-\r
-.question-img-downvote:hover {\r
-    background: url(../images/vote-arrow-down-on.png)\r
-}\r
-\r
-.question-img-favorite:hover {\r
-    background: url(../images/vote-favorite-on.png)\r
-}\r
-\r
-.favorite-number {\r
-    padding: 0px;\r
-    font-size: 100%;\r
-    font-family: Arial;\r
-    font-weight: bold;\r
-    color: #777;\r
-}\r
-\r
-.vote-notification {\r
-    z-index: 1;\r
-    cursor: pointer;\r
-    display: none;\r
-    position: absolute;\r
-    padding: 15px;\r
-    color: White;\r
-    background-color: darkred;\r
-    text-align: center;\r
-}\r
-\r
-.vote-notification a {\r
-    color: White;\r
-    text-decoration: underline;\r
-}\r
-\r
-.offensive-flag a {\r
-    color: #777;\r
-    padding: 3px;\r
-    cursor: pointer;\r
-}\r
-\r
-.offensive-flag a:hover {\r
-    background-color: #777;\r
-    text-decoration: none;\r
-    color: #fff;\r
-}\r
-\r
-.linksopt a {\r
-    color: #777;\r
-    padding: 3px;\r
-    cursor: pointer;\r
-}\r
-\r
-.linksopt a:hover {\r
-    background-color: #777;\r
-    text-decoration: none;\r
-    color: #fff;\r
-}\r
-\r
-.action-link a {\r
-    color: #777;\r
-    padding: 3px;\r
-    cursor: pointer;\r
-}\r
-\r
-.action-link: a hover {\r
-    background-color: #777;\r
-    text-decoration: none;\r
-    color: #fff;\r
-}\r
-\r
-.action-link-separator {\r
-    color: #ccc;\r
-}\r
-\r
-.wiki-category {\r
-    margin-left: 5px;\r
-    color: #999;\r
-    font-size: 90%;\r
-}\r
-\r
-div.comments {\r
-    line-height: 150%;\r
-    padding: 10px 0;\r
-}\r
-\r
-div.post-comments {\r
-    clear: both;\r
-    background: url(../images/gray-up-arrow-h18px.png) no-repeat;\r
-    width: 100%;\r
-    padding-left: 12px;\r
-    margin: 3px 0 10px 0;\r
-}\r
-\r
-form.post-comments textarea {\r
-    height: 6em;\r
-    margin-bottom: 4px;\r
-}\r
-\r
-form.post-comments input {\r
-    margin-left: 10px;\r
-    margin-top: 1px;\r
-    vertical-align: top;\r
-    width: 100px;\r
-}\r
-\r
-span.text-counter {\r
-    margin-right: 20px;\r
-    font-size: 11px;\r
-}\r
-\r
-span.form-error {\r
-    color: #990000;\r
-    font-weight: normal;\r
-    margin-left: 5px;\r
-}\r
-\r
-p.form-item {\r
-    margin: 0px;\r
-}\r
-\r
-div.comments-container, div.comments-container-accepted, div.comments-container-owner, div.comments-container-deleted {\r
-    padding: 0;\r
-}\r
-\r
-.post-comments a {\r
-    color: #888888;\r
-    padding: 0 3px 2px;\r
-}\r
-\r
-a.comments-link, a.comments-link-accepted, a.comments-link-owner, a.comments-link-deleted {\r
-    color: black;\r
-    font-size: 11px;\r
-    background: #eeeeee;\r
-    padding: 3px;\r
-    cursor: pointer;\r
-}\r
-\r
-.post-comments a:hover {\r
-    background-color: #777777;\r
-    color: white;\r
-    text-decoration: none;\r
-}\r
-\r
-a.comment-user, a.comment-user:hover {\r
-    background-color: inherit;\r
-    color: blue;\r
-    padding: 0;\r
-}\r
-\r
-a.comment-user:hover {\r
-    text-decoration: underline;\r
-}\r
-\r
-/*??*/\r
-#answers {\r
-}\r
-\r
-.answer {\r
-    padding-top: 10px;\r
-    width: 100%;\r
-    border-bottom: 1px solid #ccccce;\r
-}\r
-\r
-.answer-body {\r
-    min-height: 80px;\r
-    font-size: 13px;\r
-    line-height: 20px;\r
-}\r
-\r
-.answer-body IMG {\r
-    max-width: 600px;\r
-}\r
-\r
-.accepted-answer {\r
-    background-color: #EBFFE6;\r
-    border-bottom-color: #9BD59B;\r
-}\r
-\r
-.accepted-answer .comments-link {\r
-    background-color: #CCFFBF;\r
-}\r
-\r
-.accepted-answer .comments-container {\r
-    background-color: #CCFFBF;\r
-}\r
-\r
-.answered {\r
-    background: #72A0D0;\r
-    color: #000000;\r
-}\r
-\r
-.answered-accepted {\r
-    background: #8BE334;\r
-    color: #000000;\r
-}\r
-\r
-.unanswered {\r
-    background: #A40000;\r
-    color: white;\r
-}\r
-\r
-.answered-by-owner {\r
-    background: #E9E9FF;\r
-}\r
-\r
-.answered-by-owner .comments-link {\r
-    background-color: #E6ECFF;\r
-}\r
-\r
-.answered-by-owner .comments-container {\r
-    background-color: #E6ECFF;\r
-}\r
-\r
-.answered-accepted strong {\r
-    color: #E1E818;\r
-}\r
-\r
-.answer-img-accept:hover {\r
-    background: url(../images/vote-accepted-on.png)\r
-}\r
-\r
-.deleted {\r
-    background: #F4E7E7 none repeat scroll 0 0;\r
-}\r
-\r
-/*????*/\r
-/*\r
-.tagsbox {}\r
-.tagsbox a {color:#000;line-height:30px;margin-right:10px;font-size:100%;background-color:#F9F7ED;padding:3px;border:1px solid #aaaaaa;}\r
-.tagsbox a:hover {text-decoration:none;background-color:#F9F7ED;color:#B02B2C;} */\r
-.tagsList {\r
-    margin: 0;\r
-    list-style-type: none;\r
-    padding: 0px;\r
-    min-height: 360px;\r
-}\r
-\r
-.tagsList li {\r
-    width: 235px;\r
-    float: left;\r
-}\r
-\r
-.badge-list {\r
-    margin: 0;\r
-    list-style-type: none;\r
-}\r
-\r
-/*??*/\r
-.list-item {\r
-    margin-left: 15px;\r
-}\r
-\r
-.list-item LI {\r
-    list-style-type: disc;\r
-    font-size: 13px;\r
-    line-height: 20px;\r
-    margin-bottom: 10px;\r
-}\r
-\r
-/* openid styles */\r
-.form-row {\r
-    line-height: 25px;\r
-}\r
-\r
-table.form-as-table {\r
-    margin-top: 5px;\r
-}\r
-\r
-table.form-as-table ul {\r
-    list-style-type: none;\r
-    display: inline;\r
-}\r
-\r
-table.form-as-table li {\r
-    display: inline;\r
-}\r
-\r
-table.form-as-table th {\r
-    text-align: left;\r
-    font-weight: normal;\r
-}\r
-\r
-table.form-as-table pre {\r
-    display: inline;\r
-}\r
-\r
-table.check-table td {\r
-    padding-right: 50px;\r
-}\r
-\r
-/*.form-row li label {\r
-    display: inline\r
-}*/\r
-.submit-row {\r
-    line-height: 30px;\r
-    padding-top: 10px;\r
-    display: block;\r
-    clear: both;\r
-}\r
-\r
-.errors {\r
-    line-height: 20px;\r
-    color: red;\r
-}\r
-\r
-.error {\r
-    color: darkred;\r
-    margin: 0;\r
-    font-size: 10px;\r
-}\r
-\r
-.error-list li {\r
-    padding: 5px;\r
-}\r
-\r
-.fieldset {\r
-/*     border:solid 1px #777;*/\r
-    border: none;\r
-    margin-top: 10px;\r
-    padding: 10px;\r
-}\r
-\r
-.openid-input {\r
-    background: url(../images/openid.gif) no-repeat;\r
-    padding-left: 15px;\r
-    cursor: pointer;\r
-}\r
-\r
-.openid-login-input {\r
-    background-position: center left;\r
-    background: url(../images/openid.gif) no-repeat 0% 50%;\r
-    padding: 5px 5px 5px 15px;\r
-    cursor: pointer;\r
-    font-family: Trebuchet MS;\r
-    font-weight: 300;\r
-    font-size: 150%;\r
-    width: 500px;\r
-}\r
-\r
-.openid-login-submit {\r
-    height: 40px;\r
-    width: 80px;\r
-    line-height: 40px;\r
-    cursor: pointer;\r
-    border: 1px solid #777;\r
-    font-weight: bold;\r
-    font-size: 120%;\r
-}\r
-\r
-.openid-samples {\r
-\r
-}\r
-\r
-.openid-samples .list, .list li {\r
-    font-family: Trebuchet MS, "segoe ui", Helvetica, "Microsoft YaHei", ? ?, Tahoma, Verdana, MingLiu, PMingLiu, Arial, sans-serif;\r
-    list-style: none !important;\r
-    margin-left: -30px !important;\r
-    line-height: 20px !important;\r
-}\r
-\r
-/*????*/\r
-span.form-error {\r
-    color: #990000;\r
-    font-size: 90%;\r
-    font-weight: normal;\r
-    margin-left: 5px;\r
-}\r
-\r
-.title-desc {\r
-    color: #666666;\r
-    font-size: 90%;\r
-}\r
-\r
-/*adjustment for editor preview*/\r
-#editor {\r
-    font-size: 100%;\r
-    min-height: 200px;\r
-    line-height: 18px;\r
-    width: 100%;\r
-}\r
-\r
-.wmd-preview {\r
-    margin-top: 10px;\r
-    padding: 6px;\r
-    width: 100%;\r
-    background-color: #F5F5F5;\r
-    min-height: 20px;\r
-}\r
-\r
-.wmd-preview pre {\r
-    background-color: #E7F1F8;\r
-\r
-}\r
-\r
-.wmd-preview blockquote {\r
-    background-color: #eee;\r
-}\r
-\r
-.wmd-preview IMG {\r
-    max-width: 600px;\r
-}\r
-\r
-.preview-toggle {\r
-    font-weight: 600;\r
-    width: 100%;\r
-    color: #aaa; /*letter-spacing:1px;*/\r
-    text-align: left;\r
-}\r
-\r
-.preview-toggle span:hover {\r
-    cursor: pointer;\r
-}\r
-\r
-.edit-content-html {\r
-    border-top: 1px dotted #D8D2A9;\r
-    border-bottom: 1px dotted #D8D2A9;\r
-    margin: 5px 0 5px 0;\r
-}\r
-\r
-/*????*/\r
-\r
-#revisions {\r
-    width: 950px;\r
-}\r
-\r
-.revision {\r
-    margin: 10px 0 10px 0;\r
-    width: 100%;\r
-    font-size: 13px;\r
-}\r
-\r
-.revision .header {\r
-    background-color: #eee;\r
-    padding: 5px;\r
-    cursor: pointer;\r
-}\r
-\r
-.revision .author {\r
-    background-color: #E9E9FF;\r
-}\r
-\r
-.revision .summary {\r
-    padding: 5px 0 10px 0;\r
-}\r
-\r
-.revision .summary span {\r
-    background-color: yellow;\r
-    padding-left: 3px;\r
-    padding-right: 3px;\r
-    display: inline;\r
-}\r
-\r
-.revision h1 {\r
-    font-size: 130%;\r
-    font-weight: 600;\r
-    padding: 15px 0 15px 0;\r
-}\r
-\r
-.revision-mark {\r
-    width: 200px;\r
-    text-align: left;\r
-    display: inline-block;\r
-    font-size: 90%;\r
-    overflow: hidden;\r
-}\r
-\r
-.revision-number {\r
-    font-size: 300%;\r
-    font-weight: bold;\r
-    font-family: sans-serif;\r
-}\r
-\r
-.revision .body {\r
-    padding-left: 10px;\r
-    margin-bottom: 50px;\r
-}\r
-\r
-.revision .answerbody {\r
-    padding: 10px 0 5px 10px;\r
-}\r
-\r
-/* Revision pages */\r
-del {\r
-    color: #FF5F5F;\r
-}\r
-\r
-del .post-tag {\r
-    color: #FF5F5F;\r
-}\r
-\r
-ins {\r
-    background-color: #97ff97;\r
-}\r
-\r
-ins .post-tag {\r
-    background-color: #97ff97;\r
-}\r
-\r
-/*??????*/\r
-.count {\r
-    font-family: Arial;\r
-    font-size: 200%;\r
-    font-weight: 700;\r
-    color: #777\r
-}\r
-\r
-.scoreNumber {\r
-    font-family: Arial;\r
-    font-size: 35px;\r
-    font-weight: 800;\r
-    color: #777;\r
-    line-height: 40px; /*letter-spacing:0px*/\r
-}\r
-\r
-.user-details {\r
-    font-size: 13px;\r
-}\r
-\r
-.user-about {\r
-    background-color: #EEEEEE;\r
-    height: 200px;\r
-    line-height: 20px;\r
-    overflow: auto;\r
-    padding: 10px;\r
-    width: 90%;\r
-}\r
-\r
-.user-edit-link {\r
-    background: url(../images/edit.png) no-repeat;\r
-    padding-left: 20px;\r
-}\r
-\r
-.favorites-count-off {\r
-    color: #919191;\r
-    float: left;\r
-    padding: 3px;\r
-    margin: 10px 0 0 0;\r
-    text-align: center;\r
-}\r
-\r
-.favorites-count {\r
-    color: #D4A849;\r
-    float: left;\r
-    padding: 3px;\r
-    margin: 10px 0 0 0;\r
-    text-align: center;\r
-}\r
-\r
-.favorites-empty {\r
-    width: 32px;\r
-    height: 45px;\r
-    float: left;\r
-}\r
-\r
-.question-summary {\r
-    border-bottom: 1px dotted #999999;\r
-    float: left;\r
-    overflow: hidden;\r
-    padding: 11px 0;\r
-    width: 670px;\r
-}\r
-\r
-.user-info-table {\r
-    width: 950;\r
-    margin-bottom: 10px;\r
-}\r
-\r
-.user-stats-table .question-summary {\r
-    width: 800px;\r
-}\r
-\r
-.narrow .stats {\r
-    background: transparent none repeat scroll 0 0;\r
-    float: left;\r
-    height: 48px;\r
-    margin: 0 0 0 7px;\r
-    padding: 0;\r
-    width: auto;\r
-    font-family: Arial;\r
-}\r
-\r
-.stats div {\r
-    font-size: 11px;\r
-    text-align: center;\r
-}\r
-\r
-.narrow .votes {\r
-    background: #EEEEEE none repeat scroll 0 0;\r
-    float: left;\r
-    height: 42px;\r
-    margin: 0 3px 0 0;\r
-    padding: 5px;\r
-    width: 46px;\r
-    text-align: center;\r
-    -moz-border-radius: 5px;\r
-    -khtml-border-radius: 5px;\r
-    -webkit-border-radius: 5px;\r
-}\r
-\r
-.narrow .summary {\r
-    width: 600px;\r
-    display: inline-block;\r
-}\r
-\r
-.narrow .summary h3 {\r
-    padding: 0px;\r
-    margin: 0px;\r
-}\r
-\r
-.narrow .views {\r
-    height: 42px;\r
-    float: left;\r
-    margin: 0 7px 0 0; /*padding:5px 0 5px 4px;*/\r
-    padding: 5px;\r
-    width: 46px;\r
-    text-align: center;\r
-    -moz-border-radius: 5px;\r
-    -khtml-border-radius: 5px;\r
-    -webkit-border-radius: 5px;\r
-    color: #777;\r
-}\r
-\r
-.narrow .status {\r
-    float: left;\r
-    height: 42px;\r
-    margin: 0 3px 0 0;\r
-    padding: 5px;\r
-    width: 46px;\r
-    text-align: center;\r
-    -moz-border-radius: 5px;\r
-    -khtml-border-radius: 5px;\r
-    -webkit-border-radius: 5px;\r
-}\r
-\r
-.narrow .vote-count-post {\r
-    font-weight: 800;\r
-    display: block;\r
-    margin: 0;\r
-    font-size: 190%;\r
-    color: #555;\r
-    line-height: 20px;\r
-}\r
-\r
-.narrow .answer-count-post {\r
-    font-weight: 800;\r
-    display: block;\r
-    margin: 0;\r
-    font-size: 190%;\r
-}\r
-\r
-.narrow .views-count-post {\r
-    font-weight: 800;\r
-    display: block;\r
-    margin: 0;\r
-    font-size: 190%;\r
-}\r
-\r
-div.started {\r
-    color: #999999;\r
-    float: right;\r
-    line-height: 18px;\r
-\r
-}\r
-\r
-.narrow div.started {\r
-    line-height: inherit;\r
-    padding-top: 4px;\r
-    white-space: nowrap;\r
-    width: auto;\r
-}\r
-\r
-.relativetime {\r
-    font-weight: bold;\r
-    text-decoration: none;\r
-}\r
-\r
-div.started a {\r
-    font-weight: bold;\r
-}\r
-\r
-div.started .reputation-score {\r
-    margin-left: 1px;\r
-}\r
-\r
-.narrow  .tags {\r
-    float: left;\r
-}\r
-\r
-.answer-summary {\r
-    display: block;\r
-    clear: both;\r
-    padding: 3px;\r
-}\r
-\r
-.answer-votes {\r
-    background-color: #EEEEEE;\r
-    color: #555555;\r
-    float: left;\r
-    font-family: Arial;\r
-    font-size: 110%;\r
-    font-weight: bold;\r
-    height: 15px;\r
-    padding: 4px 4px 5px;\r
-    text-align: center;\r
-    text-decoration: none;\r
-    width: 20px;\r
-    margin-right: 10px;\r
-}\r
-\r
-.vote-count {\r
-    font-family: Arial;\r
-    font-size: 160%;\r
-    font-weight: 700;\r
-    color: #777;\r
-}\r
-\r
-.user-action {\r
-\r
-}\r
-\r
-.user-action-1 {\r
-    font-weight: bold;\r
-    color: #333;\r
-}\r
-\r
-.user-action-2 {\r
-    font-weight: bold;\r
-    color: #CCC;\r
-}\r
-\r
-.user-action-3 {\r
-    color: #333;\r
-}\r
-\r
-.user-action-4 {\r
-    color: #333;\r
-}\r
-\r
-.user-action-5 {\r
-    color: darkred;\r
-}\r
-\r
-.user-action-6 {\r
-    color: darkred;\r
-}\r
-\r
-.user-action-7 {\r
-    color: #333;\r
-}\r
-\r
-.user-action-8 {\r
-    padding: 3px;\r
-    font-weight: bold;\r
-    background-color: #CCC;\r
-    color: #763333;\r
-}\r
-\r
-.revision-summary {\r
-    background-color: #FFFE9B;\r
-    padding: 2px;\r
-}\r
-\r
-.question-title-link a {\r
-    font-weight: bold;\r
-    color: #0077CC;\r
-}\r
-\r
-.answer-title-link a {\r
-    color: #333;\r
-}\r
-\r
-.post-type-1 a {\r
-    font-weight: bold;\r
-\r
-}\r
-\r
-.post-type-3 a {\r
-    font-weight: bold;\r
-\r
-}\r
-\r
-.post-type-5 a {\r
-    font-weight: bold;\r
-}\r
-\r
-.post-type-2 a {\r
-    color: #333;\r
-}\r
-\r
-.post-type-4 a {\r
-    color: #333;\r
-}\r
-\r
-.post-type-6 a {\r
-    color: #333;\r
-}\r
-\r
-.post-type-8 a {\r
-    color: #333;\r
-}\r
-\r
-/*????*/\r
-.bookInfo {\r
-    float: left;\r
-    width: 940px;\r
-    padding: 5px;\r
-}\r
-\r
-.bookCover {\r
-    float: left;\r
-    width: 200px;\r
-}\r
-\r
-.bookCover img {\r
-    border: 1px solid #ccc;\r
-    max-width: 200px;\r
-}\r
-\r
-.bookSummary {\r
-    float: left;\r
-    font-size: 13px;\r
-}\r
-\r
-.blogRss {\r
-    float: right;\r
-    margin: 0 10px 0 0;\r
-    width: 460px;\r
-    height: 240px;\r
-    background-color: #EEE;\r
-    padding: 5px;\r
-}\r
-\r
-.bookQuestions {\r
-    margin-bottom: 10px;\r
-}\r
-\r
-.bookFeed {\r
-    float: right;\r
-}\r
-\r
-.bookAsk {\r
-/*letter-spacing:1px; */\r
-    float: right;\r
-    margin: -30px 10px 0 0;\r
-    padding: 3px 5px 3px 5px;\r
-}\r
-\r
-.bookAsk a {\r
-    font-size: 15px;\r
-    color: #FFF;\r
-    font-weight: bold;\r
-    text-decoration: none;\r
-    background-color: #EC7000;\r
-    padding: 3px 6px 3px 6px;\r
-}\r
-\r
-.bookAsk a:hover {\r
-    text-decoration: underline;\r
-}\r
-\r
-/*??????*/\r
-.hilite {\r
-    background-color: #ff0;\r
-}\r
-\r
-.hilite1 {\r
-    background-color: #ff0;\r
-}\r
-\r
-.hilite2 {\r
-    background-color: #f0f;\r
-}\r
-\r
-.hilite3 {\r
-    background-color: #0ff;\r
-}\r
-\r
-.userStatus {\r
-    margin-left: 12px;\r
-    color: #FFF;\r
-    float: right;\r
-}\r
-\r
-.userStatus a {\r
-    color: #FFF;\r
-}\r
-\r
-.gold, .badge1 {\r
-    color: #FFCC00;\r
-}\r
-\r
-.silver, .badge2 {\r
-    color: #CCCCCC;\r
-}\r
-\r
-.bronze, .badge3 {\r
-    color: #CC9933;\r
-}\r
-\r
-.score {\r
-    font-weight: 800;\r
-    color: #333;\r
-}\r
-\r
-.footerLinks {\r
-    color: #EEE;\r
-    font-size: 13px; /* letter-spacing:1px;*/\r
-}\r
-\r
-.footerLinks a {\r
-    color: #FFF;\r
-    font-size: 13px;\r
-}\r
-\r
-.subSearch {\r
-    margin-bottom: 12px;\r
-    padding: 4px;\r
-}\r
-\r
-a.comment {\r
-    background: #EEE;\r
-    color: #993300;\r
-    padding: 4px;\r
-}\r
-\r
-a.permLink {\r
-    padding: 2px;\r
-}\r
-\r
-a.offensive {\r
-    color: #999;\r
-}\r
-\r
-ul.bulleta li {\r
-    background: url(../images/bullet_green.gif) no-repeat 0px 2px;\r
-    padding-left: 16px;\r
-    margin-bottom: 4px;\r
-}\r
-\r
-.user {\r
-    padding: 5px;\r
-    line-height: 140%;\r
-    width: 170px;\r
-}\r
-\r
-.user ul {\r
-    margin: 0;\r
-    list-style-type: none;\r
-}\r
-\r
-.user .thumb {\r
-    clear: both;\r
-    float: left;\r
-    margin-right: 4px;\r
-    display: inline;\r
-}\r
-\r
-.yellowbg {\r
-    background: yellow;\r
-}\r
-\r
-.message {\r
-    padding: 5px;\r
-    margin: 10px 0 10px 0;\r
-    background-color: #eee;\r
-    border: 1px solid #aaaaaa;\r
-}\r
-\r
-.message h1 {\r
-    padding-top: 0px;\r
-    font-size: 15px;\r
-}\r
-\r
-.message p {\r
-    margin-bottom: 0px;\r
-}\r
-\r
-p.space-above {\r
-    margin-top: 10px;\r
-}\r
-\r
-.warning {\r
-    color: red;\r
-}\r
-\r
-.darkred {\r
-    color: darkred;\r
-}\r
-\r
-.submit {\r
-    cursor: pointer; /*letter-spacing:1px;*/\r
-    background-color: #D4D0C8;\r
-    height: 40px;\r
-    border: 1px solid #777777; /*      width:100px; */\r
-    font-weight: bold;\r
-    padding-bottom: 4px;\r
-    font-size: 120%;\r
-}\r
-\r
-.submit:hover {\r
-    text-decoration: underline;\r
-}\r
-\r
-.ask-body {\r
-    padding-right: 10px;\r
-}\r
-\r
-.thousand {\r
-    color: orange;\r
-}\r
-\r
-.notify {\r
-    position: fixed;\r
-    top: 0px;\r
-    left: 0px;\r
-    width: 100%;\r
-    z-index: 100;\r
-    padding: 0;\r
-    text-align: center;\r
-    font-weight: Bold;\r
-    color: #444;\r
-    background-color: #F4A83D;\r
-}\r
-\r
-.notify p {\r
-    margin-top: 5px;\r
-    margin-bottom: 5px;\r
-    font-size: 16px;\r
-}\r
-\r
-#close-notify {\r
-    position: absolute;\r
-    right: 5px;\r
-    top: 5px;\r
-    padding: 0 3px 0 3px;\r
-    color: #735005;\r
-    text-decoration: none;\r
-    font-size: 14px;\r
-    line-height: 18px;\r
-    background-color: #FAD163;\r
-    border: 2px #735005 solid;\r
-    cursor: pointer;\r
-}\r
-\r
-#close-notify:hover {\r
-    text-decoration: none;\r
-}\r
-\r
-.big {\r
-    font-size: 15px;\r
-}\r
-\r
-.bigger {\r
-    font-size: 14px;\r
-}\r
-\r
-.strong {\r
-    font-weight: bold;\r
-}\r
-\r
-.orange {\r
-    color: #d64000;\r
-    font-weight: bold;\r
-}\r
-\r
-.grey {\r
-    color: #808080;\r
-}\r
-\r
-.about div {\r
-    padding: 10px 5px 10px 5px;\r
-    border-top: 1px dashed #aaaaaa;\r
-}\r
-\r
-.about div.first {\r
-    padding-top: 0;\r
-    border-top: none;\r
-}\r
-\r
-.about p {\r
-    margin-bottom: 10px;\r
-}\r
-\r
-.about a {\r
-    color: #d64000;\r
-    text-decoration: underline;\r
-}\r
-\r
-.about h3 {\r
-    line-height: 30px;\r
-    font-size: 15px;\r
-    font-weight: 700;\r
-    padding-top: 0px;\r
-}\r
-\r
-.highlight {\r
-    background-color: #FFF8C6;\r
-}\r
-\r
-.nomargin {\r
-    margin: 0;\r
-}\r
-\r
-.margin-bottom {\r
-    margin-bottom: 10px;\r
-}\r
-\r
-.margin-top {\r
-    margin-top: 10px;\r
-}\r
-\r
-.inline-block {\r
-    display: inline-block;\r
-}\r
-\r
-.action-status {\r
-    margin: 0;\r
-    border: none;\r
-    text-align: center;\r
-    line-height: 10px;\r
-    font-size: 12px;\r
-    padding: 0;\r
-}\r
-\r
-.action-status span {\r
-    padding: 3px 5px 3px 5px;\r
-    background-color: #fff380; /* nice yellow */\r
-    font-weight: normal;\r
-    -moz-border-radius: 5px;\r
-    -khtml-border-radius: 5px;\r
-    -webkit-border-radius: 5px;\r
-}\r
-\r
-.tight {\r
-    margin: 0;\r
-    padding: 0;\r
-}\r
-\r
-.list-table td {\r
-    vertical-align: top;\r
-}\r
-\r
-p.comment {\r
-    border-top: 1px dotted #ccccce;\r
-    margin: 0;\r
-    font-size: 11px;\r
-    color: #444444;\r
-    padding: 5px 0 5px 0;\r
-}\r
-\r
-.delete-icon {\r
-    vertical-align: middle;\r
-    padding-left: 3px;\r
-}\r
-\r
-/* these need to go */\r
-table.form-as-table .errorlist {\r
-    display: block;\r
-    margin: 0;\r
-    padding: 0 0 0 5px;\r
-    text-align: left;\r
-    font-size: 10px;\r
-    color: darkred;\r
-}\r
-\r
-table.form-as-table input {\r
-    display: inline;\r
-    margin-left: 4px;\r
-}\r
-\r
-table.form-as-table th {\r
-    vertical-align: bottom;\r
-    padding-bottom: 4px;\r
-}\r
-\r
-.form-row-vertical {\r
-    margin-top: 8px;\r
-    display: block;\r
-}\r
-\r
-.form-row-vertical label {\r
-    margin-bottom: 3px;\r
-    display: block;\r
-}\r
-\r
-/* above stuff needs to go */\r
-.text-align-right {\r
-    text-align: center;\r
-}\r
-\r
-ul.form-horizontal-rows {\r
-    list-style: none;\r
-    margin: 0;\r
-}\r
-\r
-ul.form-horizontal-rows li {\r
-    position: relative;\r
-    height: 40px;\r
-}\r
-\r
-ul.form-horizontal-rows label {\r
-    display: inline-block;\r
-}\r
-\r
-ul.form-horizontal-rows ul.errorlist {\r
-    list-style: none;\r
-    color: darkred;\r
-    font-size: 10px;\r
-    line-height: 10px;\r
-    position: absolute;\r
-    top: 2px;\r
-    left: 180px;\r
-    text-align: left;\r
-    margin: 0;\r
-}\r
-\r
-ul.form-horizontal-rows ul.errorlist li {\r
-    height: 10px;\r
-}\r
-\r
-ul.form-horizontal-rows label {\r
-    position: absolute;\r
-    left: 0px;\r
-    bottom: 6px;\r
-    margin: 0px;\r
-    line-height: 12px;\r
-    font-size: 12px;\r
-}\r
-\r
-ul.form-horizontal-rows li input {\r
-    position: absolute;\r
-    bottom: 0px;\r
-    left: 180px;\r
-    margin: 0px;\r
-}\r
-\r
-#emailpw-form li input {\r
-    left: 170px;\r
-}\r
-\r
-#emailpw-form ul.errorlist {\r
-    left: 170px;\r
-}\r
-\r
-#changepw-form li input {\r
-    left: 150px;\r
-}\r
-\r
-#changepw-form ul.errorlist {\r
-    left: 150px;\r
-}\r
-\r
-.narrow .summary {\r
-    float: left;\r
-}\r
-\r
-.narrow .summary .question-title {\r
-    font-weight: bold;\r
-    font-size: 120%;\r
-}\r
-\r
-.user-profile-tool-links {\r
-    padding-bottom: 10px;\r
-    font-weight: bold;\r
-}\r
-\r
-.post-controls {\r
-    float: left;\r
-    font-size: 11px;\r
-    line-height: 12px;\r
-    min-width: 200px;\r
-    margin-bottom: 5px;\r
-}\r
-\r
-#question-controls .tags {\r
-    margin: 0 0 3px 0;\r
-}\r
-\r
-.post-update-info-container {\r
-    float: right;\r
-    min-width: 190px;\r
-}\r
-\r
-.post-update-info {\r
-    display: inline-block;\r
-    float: right;\r
-    width: 190px;\r
-    margin-bottom: 5px;\r
-}\r
-\r
-.post-update-info p {\r
-    font-size: 11px;\r
-    line-height: 15px;\r
-    margin: 0 0 4px 0;\r
-    padding: 0;\r
-}\r
-\r
-.post-update-info img {\r
-    float: left;\r
-    width: 32px;\r
-    margin: 4px 8px 0 0;\r
-}\r
-\r
-.comments-container {\r
-    clear: both;\r
-}\r
-\r
-.admin {\r
-    background-color: #fff380; /* nice yellow */\r
-    border: 1px solid darkred;\r
-    padding: 0 5px 0 5px;\r
-}\r
-\r
-.admin p {\r
-    margin-bottom: 3px;\r
-}\r
-\r
-.admin #action_status {\r
-    text-align: center;\r
-    font-weight: bold;\r
-}\r
-\r
-#tagSelector {\r
-    padding-bottom: 2px;\r
-}\r
-\r
-#hideIgnoredTagsControl {\r
-    margin: 5px 0 0 0;\r
-}\r
-\r
-#hideIgnoredTagsCb {\r
-    margin: 0 2px 0 1px;\r
-}\r
-\r
-#recaptcha_widget_div {\r
-    width: 318px;\r
-    float: left;\r
-    clear: both;\r
-}\r
-\r
-p.signup_p {\r
-    margin: 20px 0px 0px 0px;\r
-}\r
-\r
-.simple-subscribe-options ul {\r
-    list-style: none;\r
-    list-style-position: outside;\r
-    margin: 0;\r
-}\r
-\r
-a.sidebar_button {\r
-    color: black;\r
-    font-size: 11px;\r
-    background: #eeeeee;\r
-    padding: 3px;\r
-    cursor: pointer;\r
-}\r
-\r
-a.sidebar_button:hover {\r
-    background-color: #777777;\r
-    color: white;\r
-    text-decoration: none;\r
-}
\ No newline at end of file
diff --git a/forum/skins/css3/templates/header.html b/forum/skins/css3/templates/header.html
deleted file mode 100644 (file)
index 963990c..0000000
+++ /dev/null
@@ -1,58 +0,0 @@
-<!-- template header.html -->\r
-{% load extra_tags %}\r
-{% load i18n %}\r
-{% load user_tags %}\r
-       <div id="roof">\r
-               <div id="navBar">\r
-                       <div id="top">\r
-                {% if request.user.is_authenticated %}\r
-                    {% if request.user.is_superuser %}\r
-                        <a href="{% url admin_index %}">{% trans "administration" %}</a>\r
-                    {% endif %}\r
-                    {% user_signature_small_full request.user %}\r
-                    <a href="{% url logout %}">{% trans "logout" %}</a>\r
-                {% else %}\r
-                    <a href="{% url auth_signin %}">{% trans "login" %}</a>\r
-                {% endif %}\r
-                <a href="{% url about %}">{% trans "about" %}</a>\r
-                <a href="{% url faq %}">{% trans "faq" %}</a>\r
-                       </div>\r
-                       <table width="100%" border="0" cellspacing="0" cellpadding="0">\r
-                         <tr>\r
-                               <td width="23%">\r
-                                       <div id="logo">\r
-                                               <a href="{% url index %}">\r
-                                                       <img src="{{ settings.APP_LOGO }}" title="{% trans "back to home page" %}" alt="{{settings.APP_TITLE}} logo"/>\r
-                                               </a>\r
-                                       </div>\r
-               </td>\r
-                               <td width="77%" valign="bottom">\r
-                <div class="nav">\r
-                    <a id="nav_questions" href="{% url questions %}" >{% trans "questions" %}</a>\r
-                    <a id="nav_tags" href="{% url tags %}">{% trans "tags" %}</a>\r
-                    <a id="nav_users" href="{% url users %}">{% trans "users" %}</a>\r
-                    {% if settings.BOOKS_ON %}\r
-                    <a id="nav_books" href="{% url books %}">{% trans "books" %}</a>\r
-                    {% endif %}\r
-                    <a id="nav_badges" href="{% url badges %}">{% trans "badges" %}</a>\r
-                    <a id="nav_unanswered" href="{% url unanswered %}">{% trans "unanswered questions" %}</a>\r
-                    <div class="focus">\r
-                    <a id="nav_ask" href="{% url search %}" class="special">{% trans "advanced search" %}</a>\r
-                    </div>\r
-                </div>\r
-\r
-              </td>\r
-                         </tr>\r
-                       </table>\r
-               </div>\r
-               <div id="searchBar">\r
-            <form action="{% url ask %}" method="post">\r
-                <div id="ask_teaser">Your question:</div>\r
-                <div id="ask_input">\r
-                    <input type="text" class="searchInput" value="{{ keywords }}" name="q" id="keywords" />\r
-                    <input type="submit" value="{% trans "GO" %}" name="go" id="go_btn" />\r
-                </div>\r
-            </form>\r
-               </div>\r
-       </div>\r
-<!-- end template header.html -->\r
diff --git a/forum/skins/css3/templates/search.html b/forum/skins/css3/templates/search.html
deleted file mode 100644 (file)
index 1d9c416..0000000
+++ /dev/null
@@ -1,25 +0,0 @@
-{% extends "base.html" %}\r
-\r
-{% load i18n %}\r
-\r
-{% block content %}\r
-<div id="main-bar" class="headNormal">\r
-       {% blocktrans with settings.APP_SHORT_NAME as app_name %}\r
-           Search in {{  app_name }}\r
-       {%  endblocktrans %}\r
-</div>\r
-<div id="main-body" style="text-align: center; height: 400px;">\r
-<form action="{% url search %}" method="get">\r
-    <div>\r
-        <input type="text" class="searchInput" value="{{ keywords }}" name="q" id="keywords" style="width: 600px" />\r
-        <input type="submit" name="Submit" value="{% trans "search" %}" class="searchBtn" />\r
-    </div>\r
-    <div class="options">\r
-        <input id="type-question" type="radio" value="question" name="t"\r
-            checked="checked" /><label for="type-question">{% trans "questions" %}</label>\r
-        <input id="type-tag" type="radio" value="tag" name="t" /><label for="type-tag">{% trans "tags" %}</label>\r
-        <input id="type-user" type="radio" value="user" name="t" /><label for="type-user">{% trans "users" %}</label>\r
-    </div>\r
-</form>\r
-</div>\r
-{% endblock %}
\ No newline at end of file
index d929a16fb5a4c515f7771c73f37aea5c9c5922d9..e3726389178511360a33b8ba66cb93f815fb09ec 100644 (file)
@@ -1,7 +1,11 @@
 var response_commands = {\r
     update_post_score: function(id, inc) {\r
         var $score_board = $('#post-' + id + '-score');\r
-        $score_board.html(parseInt($score_board.html()) + inc)\r
+        var current = parseInt($score_board.html())\r
+        if (isNaN(current)){\r
+            current = 0;\r
+        }\r
+        $score_board.html(current + inc)\r
     },\r
 \r
     update_user_post_vote: function(id, vote_type) {\r
@@ -56,31 +60,6 @@ var response_commands = {
         $answer.find('.accept-answer').removeClass('on');\r
     },\r
 \r
-    update_comment_score: function(id, inc) {\r
-        var $comment_score = $('#comment-' + id + '-score');\r
-        var count = parseInt($comment_score.html());\r
-\r
-        if (isNaN(count))\r
-            count = 0;\r
-\r
-        count += inc;\r
-\r
-        if (count == 0)\r
-            count = '';\r
-\r
-        $comment_score.html(count);\r
-    },\r
-\r
-    update_likes_comment_mark: function(id, like_type) {\r
-        var $comment_like_mark = $("#comment-" + id + "-like");\r
-\r
-        if (like_type == "on") {\r
-            $comment_like_mark.addClass("on");\r
-        } else {\r
-            $comment_like_mark.removeClass("on");    \r
-        }\r
-    },\r
-\r
     remove_comment: function(id) {\r
         var $comment = $('#comment-' + id);\r
         $comment.css('background', 'red')\r
index 79f4df041fb663044d7df5b749afaecd4385284a..d62e521f1e774f113760665be7d526cf96b1179a 100644 (file)
@@ -6,7 +6,7 @@
         <a name="{{ comment.id }}"></a>\r
         <table class="comment{% if not comment.top_scorer %} not_top_scorer{% endif %}" id="comment-{{comment.id}}">\r
             <tr>\r
-                <td rowspan="2" class="comment-score" id="comment-{{ comment.id }}-score">\r
+                <td rowspan="2" class="comment-score" id="post-{{ comment.id }}-score">\r
                     {% if comment.score %}{{ comment.score }}{% endif %}\r
                 </td>\r
                 <td class="comment-text" id="comment-{{comment.id}}-text">\r
@@ -18,7 +18,7 @@
                     <a class="comment-user userinfo" href="{{comment.user.get_profile_url}}">{{comment.user}}</a>\r
                     <span class="comment-age">({% diff_date comment.added_at %})</span>\r
                     {% if comment.can_like %}\r
-                        <a id="comment-{{ comment.id }}-like" href="{% url like_comment id=comment.id %}"\r
+                        <a id="post-{{ comment.id }}-upvote" href="{% url vote_post id=comment.id,vote_type='up' %}"\r
                          title="{% trans "I like this comment (click again to cancel)" %}" class="ajax-command comment-like{% if comment.likes %} on{% endif %}"\r
                         rel="nofollow"> </a>\r
                     {% endif %}\r
index 5385da65794e7823ef131f64c3e1b1354671cf44..9e35a35c1ff3cdaae86e3be6c7c90c59cc6206b8 100644 (file)
@@ -56,6 +56,8 @@
                         </td>\r
                     </tr>\r
                 </table>\r
+                <h3>{%trans "Recalculate scores and reputation" %}</h3>\r
+                 <button onclick="if (window.confirm('{% trans "This is a heavy operation, are you sure?" %}')) window.location='{% url admin_denormalize %}';">{% trans "Recalculate" %}</button>\r
             </td>\r
         </tr>\r
         <tr>\r
index 3b9ce76451b6f4397269be9ce46dfa24a6a6f748..2fea646ebb96d3df16aa4c3e14bf8d1909e1edf3 100644 (file)
@@ -117,6 +117,7 @@ urlpatterns = patterns('',
 
 
     url(r'^%s$' % _('admin/'), app.admin.index, name="admin_index"),
+    url(r'^%s%s$' % (_('admin/'), _('denormalize/')), app.admin.recalculate_denormalized, name="admin_denormalize"),
     url(r'^%s%s$' % (_('admin/'), _('go_bootstrap/')), app.admin.go_bootstrap, name="admin_go_bootstrap"),
     url(r'^%s%s$' % (_('admin/'), _('go_defaults/')), app.admin.go_defaults, name="admin_go_defaults"),
     url(r'^%s(?P<set_name>\w+)/$' % _('admin/'), app.admin.settings_set, name="admin_set"),
index bd8a565e105773ce0cd0e18bbbab5146be436b12..3fa02bcfb0f82aef36f714aa7067d03fc30910e1 100644 (file)
@@ -5,11 +5,12 @@ from django.core.urlresolvers import reverse
 from django.http import HttpResponseRedirect, HttpResponse, HttpResponseForbidden, Http404
 from django.template import RequestContext
 from django.utils.translation import ugettext as _
+from django.db.models import Sum
 
 from forum.settings.base import Setting
 from forum.settings.forms import SettingsSetForm
 
-from forum.models import Activity, Question, Answer, User
+from forum.models import Activity, Question, Answer, User, Node
 from forum import const
 from forum import settings
 
@@ -154,3 +155,18 @@ def go_defaults(request):
     request.user.message_set.create(message=_('All values reverted to defaults'))
     return HttpResponseRedirect(reverse('admin_index'))
 
+
+@super_user_required
+def recalculate_denormalized(request):
+    for n in Node.objects.all():
+        n.vote_up_count = n.votes.filter(canceled=False, vote=1).count()
+        n.vote_down_count = n.votes.filter(canceled=False, vote=-1).count()
+        n.save()
+
+    for u in User.objects.all():
+        u.reputation = u.reputes.filter(canceled=False).aggregate(reputation=Sum('value'))['reputation']
+        u.save()
+
+    request.user.message_set.create(message=_('All values recalculated'))
+    return HttpResponseRedirect(reverse('admin_index'))
+