diff --git a/exmo/COPYING b/exmo/COPYING
index 0cd800bf..097a2556 100644
--- a/exmo/COPYING
+++ b/exmo/COPYING
@@ -345,6 +345,34 @@ along with this program. If not, see .
--
+exmo/scores/static/js/jquery.autosize.js
+
+Autosize 1.15.2 - jQuery plugin for textareas
+
+The MIT License (MIT)
+
+Copyright (c) 2012 Jack Moore - jacklmoore.com
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
+
+--
+
exmo/exmo2010/static/exmo2010/ckeditor/
Copyright (C) 2003 - 2013 CKSource - Frederico Knabben
diff --git a/exmo/static/exmo2010/css/score.css b/exmo/scores/static/css/score.css
similarity index 85%
rename from exmo/static/exmo2010/css/score.css
rename to exmo/scores/static/css/score.css
index 93cf08f1..2b3371ae 100644
--- a/exmo/static/exmo2010/css/score.css
+++ b/exmo/scores/static/css/score.css
@@ -19,52 +19,12 @@
#
*/
-/* Parameter */
-
-.table-parameter
-{
- margin-bottom: 20px;
- border-spacing: 0;
- border-collapse: separate;
- *border-collapse: collapse;
- border: #fff 1px solid;
+form.score {
+ float: left;
+ display: block;
width: 100%;
}
-.table-parameter th
-{
- padding: 8px 12px;
- background-image: none;
- background-color: transparent;
- border-bottom: #fff 1px solid;
- border-left: #bbb 1px solid;
- color: #333;
-}
-
-.table-parameter td
-{
- padding: 8px 12px;
- border-left: #bbb 1px solid;
- border-top: #bbb 1px solid;
- border-bottom: #fff 1px solid;
-}
-
-.table-parameter td:first-child
-{
- border-left: #fff 1px solid;
-}
-
-.table-parameter .value
-{
- width: 80px;
- text-align: center;
-}
-
-.table-parameter .criteria
-{
- width: 20%;
-}
-
.heading-comments-parameter
{
margin-top: 34px;
@@ -282,3 +242,57 @@ form.score {
{
background-color: #FFFFD6;
}
+
+.button-bar {
+ padding-left: 15px;
+}
+
+.non-relevant-button {
+ float: right;
+}
+
+.non-relevant-button input {
+ background-color: #ffd8dd;
+ background-image: none;
+}
+
+.reset-button {
+ border: 1px solid #fff;
+ border-bottom: 1px dotted;
+ padding: 0;
+}
+
+.reset-button input {
+ cursor: pointer;
+ color: #005C9C;
+ background-color: transparent;
+ border: none;
+ margin: 0;
+ padding: 0;
+}
+
+.reset-button input:hover {
+ color: #005580;
+}
+
+h1 {
+ margin-bottom: 7px;
+}
+
+.recomendation-container {
+ padding-right: 7px;
+}
+
+#id_score-comment {
+ width: 100%;
+ resize: none;
+}
+
+.recomendation {
+ color: #333;
+ font-size: 13px;
+}
+
+#non_editable_table {
+ margin-top: 20px;
+}
diff --git a/exmo/static/exmo2010/css/score_list-parameter-colours.css b/exmo/scores/static/css/score_list-parameter-colours.css
similarity index 100%
rename from exmo/static/exmo2010/css/score_list-parameter-colours.css
rename to exmo/scores/static/css/score_list-parameter-colours.css
diff --git a/exmo/static/exmo2010/css/score_messages.css b/exmo/scores/static/css/score_messages.css
similarity index 100%
rename from exmo/static/exmo2010/css/score_messages.css
rename to exmo/scores/static/css/score_messages.css
diff --git a/exmo/scores/static/css/tables.css b/exmo/scores/static/css/tables.css
new file mode 100644
index 00000000..a0140526
--- /dev/null
+++ b/exmo/scores/static/css/tables.css
@@ -0,0 +1,103 @@
+/*
+# This file is part of EXMO2010 software.
+# Copyright 2010, 2011, 2013 Al Nikolov
+# Copyright 2010, 2011 non-profit partnership Institute of Information Freedom Development
+# Copyright 2012, 2013 Foundation "Institute for Information Freedom Development"
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Affero General Public License as
+# published by the Free Software Foundation, either version 3 of the
+# License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU Affero General Public License for more details.
+#
+# You should have received a copy of the GNU Affero General Public License
+# along with this program. If not, see .
+#
+*/
+
+/* Non-editable table, Partially editable table and Editable table */
+
+.score-table {
+ margin-bottom: 20px;
+ border-spacing: 0;
+ border-collapse: separate;
+ *border-collapse: collapse;
+ border: #fff 1px solid;
+ width: 100%;
+}
+
+.score-table label {
+ color: #333;
+}
+
+.score-table th {
+ padding: 8px 12px;
+ background: none, transparent;
+ border-bottom: #fff 1px solid;
+ border-left: #bbb 1px solid;
+ color: #333;
+}
+
+.score-table td {
+ padding: 8px 12px;
+ height: 22px;
+ border-left: #bbb 1px solid;
+ border-top: #bbb 1px solid;
+ border-bottom: #fff 1px solid;
+}
+
+.score-table td:first-child {
+ border-left: #fff 1px solid;
+}
+
+.criteria {
+ width: 165px;
+}
+
+.score-table textarea {
+ height: 1.2em;
+ resize: none;
+ width: 99%;
+ margin: 0;
+ color: #333;
+}
+
+/* Non-editable table and Partially editable table */
+
+.non-editable .value, .partially-editable .value {
+ width: 80px;
+ text-align: center;
+}
+
+/* Editable table */
+
+.editable .value {
+ width: 170px;
+ padding: 0 14px;
+ white-space: nowrap;
+}
+
+.editable .value ul {
+ list-style: none;
+ margin: 0;
+ padding: 7px 0;
+ position: relative;
+ top: 7px;
+ display: inline;
+ white-space:nowrap;
+}
+
+.editable .value ul li {
+ list-style: none;
+ display: inline;
+ padding-left: 20px;
+ padding-top: 4px;
+}
+
+.editable .value ul li:first-child {
+ padding-left: 0;
+}
diff --git a/exmo/static/exmo2010/js/jquery.autosize.js b/exmo/scores/static/js/jquery.autosize.js
similarity index 96%
rename from exmo/static/exmo2010/js/jquery.autosize.js
rename to exmo/scores/static/js/jquery.autosize.js
index 705d79de..7e318235 100644
--- a/exmo/static/exmo2010/js/jquery.autosize.js
+++ b/exmo/scores/static/js/jquery.autosize.js
@@ -1,181 +1,181 @@
-// Autosize 1.15.2 - jQuery plugin for textareas
-// (c) 2012 Jack Moore - jacklmoore.com
-// license: www.opensource.org/licenses/mit-license.php
-
-(function ($) {
- var
- defaults = {
- className: 'autosizejs',
- append: "",
- callback: false
- },
- hidden = 'hidden',
- borderBox = 'border-box',
- lineHeight = 'lineHeight',
-
- // border:0 is unnecessary, but avoids a bug in FireFox on OSX (http://www.jacklmoore.com/autosize#comment-851)
- copy = '',
-
- // line-height is conditionally included because IE7/IE8/old Opera do not return the correct value.
- copyStyle = [
- 'fontFamily',
- 'fontSize',
- 'fontWeight',
- 'fontStyle',
- 'letterSpacing',
- 'textTransform',
- 'wordSpacing',
- 'textIndent'
- ],
- oninput = 'oninput',
- onpropertychange = 'onpropertychange',
-
- // to keep track which textarea is being mirrored when adjust() is called.
- mirrored,
-
- // the mirror element, which is used to calculate what size the mirrored element should be.
- mirror = $(copy).data('autosize', true)[0];
-
- // test that line-height can be accurately copied.
- mirror.style.lineHeight = '99px';
- if ($(mirror).css(lineHeight) === '99px') {
- copyStyle.push(lineHeight);
- }
- mirror.style.lineHeight = '';
-
- $.fn.autosize = function (options) {
- options = $.extend({}, defaults, options || {});
-
- if (mirror.parentNode !== document.body) {
- $(document.body).append(mirror);
- }
-
- return this.each(function () {
- var
- ta = this,
- $ta = $(ta),
- minHeight = $ta.height(),
- maxHeight = parseInt($ta.css('maxHeight'), 10),
- active,
- resize,
- boxOffset = 0,
- value = ta.value,
- callback = $.isFunction(options.callback);
-
- if ($ta.data('autosize')) {
- // exit if autosize has already been applied, or if the textarea is the mirror element.
- return;
- }
-
- if ($ta.css('box-sizing') === borderBox || $ta.css('-moz-box-sizing') === borderBox || $ta.css('-webkit-box-sizing') === borderBox){
- boxOffset = $ta.outerHeight() - $ta.height();
- }
-
- resize = $ta.css('resize') === 'none' ? 'none' : 'horizontal';
-
- $ta.css({
- overflow: hidden,
- overflowY: hidden,
- wordWrap: 'break-word',
- resize: resize
- }).data('autosize', true);
-
- // Opera returns '-1px' when max-height is set to 'none'.
- maxHeight = maxHeight && maxHeight > 0 ? maxHeight : 9e4;
-
- function initMirror() {
- mirrored = ta;
- mirror.className = options.className;
-
- // mirror is a duplicate textarea located off-screen that
- // is automatically updated to contain the same text as the
- // original textarea. mirror always has a height of 0.
- // This gives a cross-browser supported way getting the actual
- // height of the text, through the scrollTop property.
- $.each(copyStyle, function(i, val){
- mirror.style[val] = $ta.css(val);
- });
- }
-
- // Using mainly bare JS in this function because it is going
- // to fire very often while typing, and needs to very efficient.
- function adjust() {
- var height, overflow, original;
-
- if (mirrored !== ta) {
- initMirror();
- }
-
- // the active flag keeps IE from tripping all over itself. Otherwise
- // actions in the adjust function will cause IE to call adjust again.
- if (!active) {
- active = true;
- mirror.value = ta.value + options.append;
- mirror.style.overflowY = ta.style.overflowY;
- original = parseInt(ta.style.height,10);
-
- // Update the width in case the original textarea width has changed
- mirror.style.width = $ta.width() + 'px';
-
- // Needed for IE7 to reliably return the correct scrollHeight
- mirror.scrollTop = 0;
-
- // Set a very high value for scrollTop to be sure the
- // mirror is scrolled all the way to the bottom.
- mirror.scrollTop = 9e4;
-
- height = mirror.scrollTop;
- if (height > maxHeight) {
- height = maxHeight;
- overflow = 'scroll';
- } else if (height < minHeight) {
- height = minHeight;
- }
- height += boxOffset;
- ta.style.overflowY = overflow || hidden;
-
- if (original !== height) {
- ta.style.height = height + 'px';
- if (callback) {
- options.callback.call(ta);
- }
- }
-
- // This small timeout gives IE a chance to draw it's scrollbar
- // before adjust can be run again (prevents an infinite loop).
- setTimeout(function () {
- active = false;
- }, 1);
- }
- }
-
- if (onpropertychange in ta) {
- if (oninput in ta) {
- // Detects IE9. IE9 does not fire onpropertychange or oninput for deletions,
- // so binding to onkeyup to catch most of those occassions. There is no way that I
- // know of to detect something like 'cut' in IE9.
- ta[oninput] = ta.onkeyup = adjust;
- } else {
- // IE7 / IE8
- ta[onpropertychange] = adjust;
- }
- } else {
- // Modern Browsers
- ta[oninput] = adjust;
-
- // The textarea overflow is now hidden, but Chrome doesn't reflow the text to account for the
- // new space made available by removing the scrollbars. This workaround causes Chrome to reflow the text.
- ta.value = '';
- ta.value = value;
- }
-
- $(window).resize(adjust);
-
- // Allow for manual triggering if needed.
- $ta.bind('autosize', adjust);
-
- // Call adjust in case the textarea already contains text.
- adjust();
- });
- };
+// Autosize 1.15.2 - jQuery plugin for textareas
+// (c) 2012 Jack Moore - jacklmoore.com
+// license: www.opensource.org/licenses/mit-license.php
+
+(function ($) {
+ var
+ defaults = {
+ className: 'autosizejs',
+ append: "",
+ callback: false
+ },
+ hidden = 'hidden',
+ borderBox = 'border-box',
+ lineHeight = 'lineHeight',
+
+ // border:0 is unnecessary, but avoids a bug in FireFox on OSX (http://www.jacklmoore.com/autosize#comment-851)
+ copy = '',
+
+ // line-height is conditionally included because IE7/IE8/old Opera do not return the correct value.
+ copyStyle = [
+ 'fontFamily',
+ 'fontSize',
+ 'fontWeight',
+ 'fontStyle',
+ 'letterSpacing',
+ 'textTransform',
+ 'wordSpacing',
+ 'textIndent'
+ ],
+ oninput = 'oninput',
+ onpropertychange = 'onpropertychange',
+
+ // to keep track which textarea is being mirrored when adjust() is called.
+ mirrored,
+
+ // the mirror element, which is used to calculate what size the mirrored element should be.
+ mirror = $(copy).data('autosize', true)[0];
+
+ // test that line-height can be accurately copied.
+ mirror.style.lineHeight = '99px';
+ if ($(mirror).css(lineHeight) === '99px') {
+ copyStyle.push(lineHeight);
+ }
+ mirror.style.lineHeight = '';
+
+ $.fn.autosize = function (options) {
+ options = $.extend({}, defaults, options || {});
+
+ if (mirror.parentNode !== document.body) {
+ $(document.body).append(mirror);
+ }
+
+ return this.each(function () {
+ var
+ ta = this,
+ $ta = $(ta),
+ minHeight = $ta.height(),
+ maxHeight = parseInt($ta.css('maxHeight'), 10),
+ active,
+ resize,
+ boxOffset = 0,
+ value = ta.value,
+ callback = $.isFunction(options.callback);
+
+ if ($ta.data('autosize')) {
+ // exit if autosize has already been applied, or if the textarea is the mirror element.
+ return;
+ }
+
+ if ($ta.css('box-sizing') === borderBox || $ta.css('-moz-box-sizing') === borderBox || $ta.css('-webkit-box-sizing') === borderBox){
+ boxOffset = $ta.outerHeight() - $ta.height();
+ }
+
+ resize = $ta.css('resize') === 'none' ? 'none' : 'horizontal';
+
+ $ta.css({
+ overflow: hidden,
+ overflowY: hidden,
+ wordWrap: 'break-word',
+ resize: resize
+ }).data('autosize', true);
+
+ // Opera returns '-1px' when max-height is set to 'none'.
+ maxHeight = maxHeight && maxHeight > 0 ? maxHeight : 9e4;
+
+ function initMirror() {
+ mirrored = ta;
+ mirror.className = options.className;
+
+ // mirror is a duplicate textarea located off-screen that
+ // is automatically updated to contain the same text as the
+ // original textarea. mirror always has a height of 0.
+ // This gives a cross-browser supported way getting the actual
+ // height of the text, through the scrollTop property.
+ $.each(copyStyle, function(i, val){
+ mirror.style[val] = $ta.css(val);
+ });
+ }
+
+ // Using mainly bare JS in this function because it is going
+ // to fire very often while typing, and needs to very efficient.
+ function adjust() {
+ var height, overflow, original;
+
+ if (mirrored !== ta) {
+ initMirror();
+ }
+
+ // the active flag keeps IE from tripping all over itself. Otherwise
+ // actions in the adjust function will cause IE to call adjust again.
+ if (!active) {
+ active = true;
+ mirror.value = ta.value + options.append;
+ mirror.style.overflowY = ta.style.overflowY;
+ original = parseInt(ta.style.height,10);
+
+ // Update the width in case the original textarea width has changed
+ mirror.style.width = $ta.width() + 'px';
+
+ // Needed for IE7 to reliably return the correct scrollHeight
+ mirror.scrollTop = 0;
+
+ // Set a very high value for scrollTop to be sure the
+ // mirror is scrolled all the way to the bottom.
+ mirror.scrollTop = 9e4;
+
+ height = mirror.scrollTop;
+ if (height > maxHeight) {
+ height = maxHeight;
+ overflow = 'scroll';
+ } else if (height < minHeight) {
+ height = minHeight;
+ }
+ height += boxOffset;
+ ta.style.overflowY = overflow || hidden;
+
+ if (original !== height) {
+ ta.style.height = height + 'px';
+ if (callback) {
+ options.callback.call(ta);
+ }
+ }
+
+ // This small timeout gives IE a chance to draw it's scrollbar
+ // before adjust can be run again (prevents an infinite loop).
+ setTimeout(function () {
+ active = false;
+ }, 1);
+ }
+ }
+
+ if (onpropertychange in ta) {
+ if (oninput in ta) {
+ // Detects IE9. IE9 does not fire onpropertychange or oninput for deletions,
+ // so binding to onkeyup to catch most of those occassions. There is no way that I
+ // know of to detect something like 'cut' in IE9.
+ ta[oninput] = ta.onkeyup = adjust;
+ } else {
+ // IE7 / IE8
+ ta[onpropertychange] = adjust;
+ }
+ } else {
+ // Modern Browsers
+ ta[oninput] = adjust;
+
+ // The textarea overflow is now hidden, but Chrome doesn't reflow the text to account for the
+ // new space made available by removing the scrollbars. This workaround causes Chrome to reflow the text.
+ ta.value = '';
+ ta.value = value;
+ }
+
+ $(window).resize(adjust);
+
+ // Allow for manual triggering if needed.
+ $ta.bind('autosize', adjust);
+
+ // Call adjust in case the textarea already contains text.
+ adjust();
+ });
+ };
}(window.jQuery || window.Zepto));
\ No newline at end of file
diff --git a/exmo/static/exmo2010/js/score.form.js b/exmo/scores/static/js/score.form.js
similarity index 89%
rename from exmo/static/exmo2010/js/score.form.js
rename to exmo/scores/static/js/score.form.js
index daa42cad..8ac5d31a 100644
--- a/exmo/static/exmo2010/js/score.form.js
+++ b/exmo/scores/static/js/score.form.js
@@ -100,6 +100,13 @@ $(document).ready(function() {
$("#submit_score").prop('disabled',true);
});
+ var $non_editable = $('#non_editable_table');
+ var $editable = $('#editable_table');
+ var $partially_editable = $('#partially_editable_table');
+
+ $editable.hide();
+ $partially_editable.hide();
+
$('.edit-tabs').live('click', function(e) {
var $link;
var $form_comment = $('.comment-form');
@@ -108,14 +115,23 @@ $(document).ready(function() {
case '#reply':
$link = $('a[href="#reply"]');
$form_comment.show();
+ $non_editable.show();
+ $editable.hide();
+ $partially_editable.hide();
break;
case '#change_score':
$link = $('a[href="#change_score"]');
$form_comment.hide();
+// $non_editable.hide();
+// $editable.show();
+// $partially_editable.hide();
break;
case '#edit':
$link = $('a[href="#edit"]');
$form_comment.hide();
+ $non_editable.hide();
+ $editable.hide();
+ $partially_editable.show();
break;
}
diff --git a/exmo/scores/templates/detail.html b/exmo/scores/templates/detail.html
index 176654d5..252d900a 100644
--- a/exmo/scores/templates/detail.html
+++ b/exmo/scores/templates/detail.html
@@ -23,9 +23,10 @@
{% block extrastyle %}
{{ block.super }}
-
-
-
+
+
+
+
{% endblock %}
@@ -48,11 +49,13 @@
{% load criteria_css_class %}
-