From 187bd610264a4f133890608af92ed8c6adee7db7 Mon Sep 17 00:00:00 2001 From: Tim Date: Fri, 13 May 2016 17:59:58 +0800 Subject: [PATCH 01/39] =?UTF-8?q?pull=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../javascripts/code_review.js | 706 +++--- .../stylesheets/activity.css | 6 +- .../stylesheets/code_review.css | 192 +- .../stylesheets/window_js/MIT-LICENSE | 38 +- .../stylesheets/window_js/alert.css | 238 +- .../stylesheets/window_js/alert_lite.css | 176 +- .../stylesheets/window_js/alphacube.css | 300 +-- .../stylesheets/window_js/behavior.htc | 100 +- .../stylesheets/window_js/darkX.css | 242 +-- .../stylesheets/window_js/debug.css | 50 +- .../stylesheets/window_js/default.css | 310 +-- .../stylesheets/window_js/iefix/iepngfix.css | 6 +- .../stylesheets/window_js/iefix/iepngfix.htc | 106 +- .../stylesheets/window_js/lighting.css | 1920 ++++++++--------- .../window_js/lighting/pngbehavior.htc | 134 +- .../stylesheets/window_js/mac_os_x.css | 666 +++--- .../stylesheets/window_js/mac_os_x_dialog.css | 320 +-- .../stylesheets/window_js/nuncio.css | 328 +-- .../stylesheets/window_js/spread.css | 216 +- 19 files changed, 3027 insertions(+), 3027 deletions(-) diff --git a/public/plugin_assets/redmine_code_review/javascripts/code_review.js b/public/plugin_assets/redmine_code_review/javascripts/code_review.js index 625f376c9..4f4d81691 100644 --- a/public/plugin_assets/redmine_code_review/javascripts/code_review.js +++ b/public/plugin_assets/redmine_code_review/javascripts/code_review.js @@ -1,354 +1,354 @@ -/* -# Code Review plugin for Redmine -# Copyright (C) 2009-2013 Haruyuki Iida -# -# This program is free software; you can redistribute it and/or -# modify it under the terms of the GNU General Public License -# as published by the Free Software Foundation; either version 2 -# 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 General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - */ - -var topZindex = 1000; -var action_type = ''; -var rev = ''; -var rev_to = ''; -var path = ''; -var urlprefix = ''; -var review_form_dialog = null; -var add_form_title = null; -var review_dialog_title = null; -var repository_id = null; -var filenames = []; - -var ReviewCount = function(total, open, progress){ - this.total = total; - this.open = open; - this.closed = total - open; - this.progress = progress -}; - -var CodeReview = function(id) { - this.id = id; - this.path = ''; - this.line = 0; - this.url = ''; - this.is_closed = false; -}; - -var review_counts = new Array(); -var code_reviews_map = new Array(); -var code_reviews_dialog_map = new Array(); - -function UpdateRepositoryView(title) { - var header = $("table.changesets thead tr:first"); - var th = $(''); - th.html(title); - header.append(th); - $('tr.changeset td.id a').each(function(i){ - var revision = this.getAttribute("href"); - revision = revision.substr(revision.lastIndexOf("/") + 1); - var review = review_counts['revision_' + revision]; - var td = $('',{ - 'class':'progress' - }); - td.html(review.progress); - $(this.parentNode.parentNode).append(td); - }); - } -//add function $.down -if(! $.fn.down) -(function($) { - $.fn.down = function() { - var el = this[0] && this[0].firstChild; - while (el && el.nodeType != 1) - el = el.nextSibling; - return $(el); - }; -})(jQuery); - -function UpdateRevisionView() { - $('li.change').each(function(){ - var li = $(this); - if (li.hasClass('folder')) return; - - var a = li.down('a'); - if (a.size() == 0) return; - var path = a.attr('href').replace(urlprefix, '').replace(/\?.*$/, ''); - - var reviewlist = code_reviews_map[path]; - if (reviewlist == null) return; - - var ul = $(''); - for (var j = 0; j < reviewlist.length; j++) { - var review = reviewlist[j]; - var icon = review.is_closed? 'icon-closed-review': 'icon-review'; - var item = $('
  • ', { - 'class': 'icon ' + icon + ' code_review_summary' - }); - item.html(review.url); - ul.append(item); - } - li.append(ul); - }); -} - -function setAddReviewButton(url, change_id, image_tag, is_readonly, is_diff, attachment_id){ - var filetables = []; - var j = 0; - $('table').each(function(){ - if($(this).hasClass('filecontent')){ - filetables[j++] = this; - } - }); - j = 0; - $('table.filecontent th.filename').each(function(){ - filenames[j] = $.trim($(this).text()); - j++; - }); - addReviewUrl = url + '?change_id=' + change_id + '&action_type=' + action_type + - '&rev=' + rev + '&rev_to=' + rev_to + - '&attachment_id=' + attachment_id + '&repository_id=' + encodeURIComponent(repository_id); - if (path != null && path.length > 0) { - addReviewUrl = addReviewUrl + '&path=' + encodeURIComponent(path); - } - var num = 0; - if (is_diff) { - num = 1; - } - var i, l, tl; - for (i = 0, tl = filetables.length; i < tl; i++) { - var table = filetables[i]; - var trs = table.getElementsByTagName('tr'); - - for (j = 0,l = trs.length; j < l; j++) { - var tr = trs[j]; - var ths = tr.getElementsByTagName('th'); - - var th = ths[num]; - if (th == null) { - continue; - } - - var th_html = th.innerHTML; - - var line = th_html.match(/[0-9]+/); - if (line == null) { - continue; - } - - var span_html = ''; - - if (!is_readonly) { - span_html += image_tag; - } - span_html += ''; - th.innerHTML = th_html + span_html; - - var img = th.getElementsByTagName('img')[0]; - if (img != null ) { - img.id = 'add_revew_img_' + line + '_' + i; - $(img).click(clickPencil); - } - } - } - - -} - -function clickPencil(e) -{ -// alert('$(e.target).attr("id") = ' + $(e.target).attr("id")); - var result = $(e.target).attr("id").match(/([0-9]+)_([0-9]+)/); - var line = result[1]; - var file_count = eval(result[2]); - var url = addReviewUrl + '&line=' + line + '&file_count=' + file_count; - - if (path == null || path.length == 0) { - url = url + '&path=' + encodeURIComponent(filenames[file_count]) + '&diff_all=true'; - } - addReview(url); - formPopup(e.pageX, e.pageY); - e.preventDefault(); -} -var addReviewUrl = null; -var showReviewUrl = null; -var showReviewImageTag = null; -var showClosedReviewImageTag = null; - -function setShowReviewButton(line, review_id, is_closed, file_count) { - //alert('file_count = ' + file_count); - var span = $('#review_span_' + line + '_' + file_count); - if (span.size() == 0) { - return; - } - var innerSpan = $('',{id: 'review_' + review_id}); - span.append(innerSpan); - innerSpan.html(is_closed? showClosedReviewImageTag : showReviewImageTag); - var div = $('
    ', { - 'class':'draggable', - id: 'show_review_' + review_id - }); - $('#code_review').append(div); - innerSpan.down('img').click(function(e) { - var review_id = $(e.target).parent().attr('id').match(/[0-9]+/)[0]; - var span = $('#review_' + review_id); // span element of view review button - var pos = span.offset(); - showReview(showReviewUrl, review_id, pos.left + 10 + 5, pos.top + 25); - }); -} - -function popupReview(review_id) { - var span = $('#review_' + review_id); // span element of view review button - var pos = span.offset(); - $('html,body').animate({ scrollTop: pos.top }, - {duration: 'fast', - complete: function(){showReview(showReviewUrl, review_id, pos.left + 10 + 5, pos.top)}}); - // position and show popup dialog - // create popup dialog - //var win = showReview(showReviewUrl, review_id, pos.left + 10 + 5, pos.top); -// win.toFront(); -} - -function showReview(url, review_id, x, y) { - if (code_reviews_dialog_map[review_id] != null) { - var cur_win = code_reviews_dialog_map[review_id]; - cur_win.hide(); - code_reviews_dialog_map[review_id] = null; - } - $('#show_review_' + review_id).load(url, {review_id: review_id}); - var review = getReviewObjById(review_id); - - var win = $('#show_review_' + review_id).dialog({ - show: {effect:'scale'},// ? 'top-left' - //position: [x, y + 5], - width:640, - zIndex: topZindex, - title: review_dialog_title - }); -// win.getContent().style.color = "#484848"; -// win.getContent().style.background = "#ffffff"; - topZindex++; - code_reviews_dialog_map[review_id] = win; - return win -} - -function getReviewObjById(review_id) { - for (var reviewlist in code_reviews_map) { - for (var i = 0; i < reviewlist.length; i++) { - var review = reviewlist[i]; - if (review.id == review_id) { - return review; - } - } - } - return null; -} - -function formPopup(x, y){ - //@see http://docs.jquery.com/UI/Effects/Scale - var win = $('#review-form-frame').dialog({ - show: {effect:'scale', direction: 'both'},// ? 'top-left' -// position: [x, y + 5], - width:640, - zIndex: topZindex, - title: add_form_title - }); -// win.getContent().style.background = "#ffffff"; - if (review_form_dialog != null) { - review_form_dialog.destroy(); - review_form_dialog = null; - } - review_form_dialog = win; - topZindex += 10; - return false; -} - -function hideForm() { - if (review_form_dialog == null) { - return; - } - review_form_dialog.dialog('close'); - review_form_dialog = null; - $('#review-form').html(''); -} -function addReview(url) { - $('#review-form').load(url); -} - -function deleteReview(review_id) { - $('show_review_' + review_id).remove(); - $('review_' + review_id).remove(); - -} - -function changeImage(review_id, is_closed) { - var span = $('review_' + review_id); - var new_image = null; - var dummy = new Element('span'); - if (is_closed) { - dummy.insert(showClosedReviewImageTag); - } - else { - dummy.insert(showReviewImageTag); - } - new_image = dummy.down().getAttribute('src'); - //alert(new_image); - span.down('img').setAttribute('src', new_image); - -} - -function make_addreview_link(project, link) { - var alist = $('#content p a'); - if (alist == null) { - return; - } - var a = alist[0]; - var p = a.parentNode; - p.innerHTML = p.innerHTML + " | " + link; -} - -function call_update_revisions(url) { - var changeset_ids = ''; - var links = $$('table.changesets tbody tr.changeset td.id a'); - for (var i = 0; i < links.length; i++) { - var link = links[i]; - var href = link.getAttribute('href'); - var id = href.replace(/^.*\/revisions\//, ''); - if (i > 0) { - changeset_ids += ','; - } - changeset_ids += id; - } - new Ajax.Updater('code_review_revisions', url, - { - evalScripts:true, - method:'get', - parameters: 'changeset_ids=' + encodeURI(changeset_ids) - }); -} - -$.fn.serialize2json = function() -{ - var o = {}; - var a = this.serializeArray(); - $.each(a, function() { - if (o[this.name]) { - if (!o[this.name].push) { - o[this.name] = [o[this.name]]; - } - o[this.name].push(this.value || ''); - } else { - o[this.name] = this.value || ''; - } - }); - return o; +/* +# Code Review plugin for Redmine +# Copyright (C) 2009-2013 Haruyuki Iida +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# 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 General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +var topZindex = 1000; +var action_type = ''; +var rev = ''; +var rev_to = ''; +var path = ''; +var urlprefix = ''; +var review_form_dialog = null; +var add_form_title = null; +var review_dialog_title = null; +var repository_id = null; +var filenames = []; + +var ReviewCount = function(total, open, progress){ + this.total = total; + this.open = open; + this.closed = total - open; + this.progress = progress +}; + +var CodeReview = function(id) { + this.id = id; + this.path = ''; + this.line = 0; + this.url = ''; + this.is_closed = false; +}; + +var review_counts = new Array(); +var code_reviews_map = new Array(); +var code_reviews_dialog_map = new Array(); + +function UpdateRepositoryView(title) { + var header = $("table.changesets thead tr:first"); + var th = $(''); + th.html(title); + header.append(th); + $('tr.changeset td.id a').each(function(i){ + var revision = this.getAttribute("href"); + revision = revision.substr(revision.lastIndexOf("/") + 1); + var review = review_counts['revision_' + revision]; + var td = $('',{ + 'class':'progress' + }); + td.html(review.progress); + $(this.parentNode.parentNode).append(td); + }); + } +//add function $.down +if(! $.fn.down) +(function($) { + $.fn.down = function() { + var el = this[0] && this[0].firstChild; + while (el && el.nodeType != 1) + el = el.nextSibling; + return $(el); + }; +})(jQuery); + +function UpdateRevisionView() { + $('li.change').each(function(){ + var li = $(this); + if (li.hasClass('folder')) return; + + var a = li.down('a'); + if (a.size() == 0) return; + var path = a.attr('href').replace(urlprefix, '').replace(/\?.*$/, ''); + + var reviewlist = code_reviews_map[path]; + if (reviewlist == null) return; + + var ul = $(''); + for (var j = 0; j < reviewlist.length; j++) { + var review = reviewlist[j]; + var icon = review.is_closed? 'icon-closed-review': 'icon-review'; + var item = $('
  • ', { + 'class': 'icon ' + icon + ' code_review_summary' + }); + item.html(review.url); + ul.append(item); + } + li.append(ul); + }); +} + +function setAddReviewButton(url, change_id, image_tag, is_readonly, is_diff, attachment_id){ + var filetables = []; + var j = 0; + $('table').each(function(){ + if($(this).hasClass('filecontent')){ + filetables[j++] = this; + } + }); + j = 0; + $('table.filecontent th.filename').each(function(){ + filenames[j] = $.trim($(this).text()); + j++; + }); + addReviewUrl = url + '?change_id=' + change_id + '&action_type=' + action_type + + '&rev=' + rev + '&rev_to=' + rev_to + + '&attachment_id=' + attachment_id + '&repository_id=' + encodeURIComponent(repository_id); + if (path != null && path.length > 0) { + addReviewUrl = addReviewUrl + '&path=' + encodeURIComponent(path); + } + var num = 0; + if (is_diff) { + num = 1; + } + var i, l, tl; + for (i = 0, tl = filetables.length; i < tl; i++) { + var table = filetables[i]; + var trs = table.getElementsByTagName('tr'); + + for (j = 0,l = trs.length; j < l; j++) { + var tr = trs[j]; + var ths = tr.getElementsByTagName('th'); + + var th = ths[num]; + if (th == null) { + continue; + } + + var th_html = th.innerHTML; + + var line = th_html.match(/[0-9]+/); + if (line == null) { + continue; + } + + var span_html = ''; + + if (!is_readonly) { + span_html += image_tag; + } + span_html += ''; + th.innerHTML = th_html + span_html; + + var img = th.getElementsByTagName('img')[0]; + if (img != null ) { + img.id = 'add_revew_img_' + line + '_' + i; + $(img).click(clickPencil); + } + } + } + + +} + +function clickPencil(e) +{ +// alert('$(e.target).attr("id") = ' + $(e.target).attr("id")); + var result = $(e.target).attr("id").match(/([0-9]+)_([0-9]+)/); + var line = result[1]; + var file_count = eval(result[2]); + var url = addReviewUrl + '&line=' + line + '&file_count=' + file_count; + + if (path == null || path.length == 0) { + url = url + '&path=' + encodeURIComponent(filenames[file_count]) + '&diff_all=true'; + } + addReview(url); + formPopup(e.pageX, e.pageY); + e.preventDefault(); +} +var addReviewUrl = null; +var showReviewUrl = null; +var showReviewImageTag = null; +var showClosedReviewImageTag = null; + +function setShowReviewButton(line, review_id, is_closed, file_count) { + //alert('file_count = ' + file_count); + var span = $('#review_span_' + line + '_' + file_count); + if (span.size() == 0) { + return; + } + var innerSpan = $('',{id: 'review_' + review_id}); + span.append(innerSpan); + innerSpan.html(is_closed? showClosedReviewImageTag : showReviewImageTag); + var div = $('
    ', { + 'class':'draggable', + id: 'show_review_' + review_id + }); + $('#code_review').append(div); + innerSpan.down('img').click(function(e) { + var review_id = $(e.target).parent().attr('id').match(/[0-9]+/)[0]; + var span = $('#review_' + review_id); // span element of view review button + var pos = span.offset(); + showReview(showReviewUrl, review_id, pos.left + 10 + 5, pos.top + 25); + }); +} + +function popupReview(review_id) { + var span = $('#review_' + review_id); // span element of view review button + var pos = span.offset(); + $('html,body').animate({ scrollTop: pos.top }, + {duration: 'fast', + complete: function(){showReview(showReviewUrl, review_id, pos.left + 10 + 5, pos.top)}}); + // position and show popup dialog + // create popup dialog + //var win = showReview(showReviewUrl, review_id, pos.left + 10 + 5, pos.top); +// win.toFront(); +} + +function showReview(url, review_id, x, y) { + if (code_reviews_dialog_map[review_id] != null) { + var cur_win = code_reviews_dialog_map[review_id]; + cur_win.hide(); + code_reviews_dialog_map[review_id] = null; + } + $('#show_review_' + review_id).load(url, {review_id: review_id}); + var review = getReviewObjById(review_id); + + var win = $('#show_review_' + review_id).dialog({ + show: {effect:'scale'},// ? 'top-left' + //position: [x, y + 5], + width:640, + zIndex: topZindex, + title: review_dialog_title + }); +// win.getContent().style.color = "#484848"; +// win.getContent().style.background = "#ffffff"; + topZindex++; + code_reviews_dialog_map[review_id] = win; + return win +} + +function getReviewObjById(review_id) { + for (var reviewlist in code_reviews_map) { + for (var i = 0; i < reviewlist.length; i++) { + var review = reviewlist[i]; + if (review.id == review_id) { + return review; + } + } + } + return null; +} + +function formPopup(x, y){ + //@see http://docs.jquery.com/UI/Effects/Scale + var win = $('#review-form-frame').dialog({ + show: {effect:'scale', direction: 'both'},// ? 'top-left' +// position: [x, y + 5], + width:640, + zIndex: topZindex, + title: add_form_title + }); +// win.getContent().style.background = "#ffffff"; + if (review_form_dialog != null) { + review_form_dialog.destroy(); + review_form_dialog = null; + } + review_form_dialog = win; + topZindex += 10; + return false; +} + +function hideForm() { + if (review_form_dialog == null) { + return; + } + review_form_dialog.dialog('close'); + review_form_dialog = null; + $('#review-form').html(''); +} +function addReview(url) { + $('#review-form').load(url); +} + +function deleteReview(review_id) { + $('show_review_' + review_id).remove(); + $('review_' + review_id).remove(); + +} + +function changeImage(review_id, is_closed) { + var span = $('review_' + review_id); + var new_image = null; + var dummy = new Element('span'); + if (is_closed) { + dummy.insert(showClosedReviewImageTag); + } + else { + dummy.insert(showReviewImageTag); + } + new_image = dummy.down().getAttribute('src'); + //alert(new_image); + span.down('img').setAttribute('src', new_image); + +} + +function make_addreview_link(project, link) { + var alist = $('#content p a'); + if (alist == null) { + return; + } + var a = alist[0]; + var p = a.parentNode; + p.innerHTML = p.innerHTML + " | " + link; +} + +function call_update_revisions(url) { + var changeset_ids = ''; + var links = $$('table.changesets tbody tr.changeset td.id a'); + for (var i = 0; i < links.length; i++) { + var link = links[i]; + var href = link.getAttribute('href'); + var id = href.replace(/^.*\/revisions\//, ''); + if (i > 0) { + changeset_ids += ','; + } + changeset_ids += id; + } + new Ajax.Updater('code_review_revisions', url, + { + evalScripts:true, + method:'get', + parameters: 'changeset_ids=' + encodeURI(changeset_ids) + }); +} + +$.fn.serialize2json = function() +{ + var o = {}; + var a = this.serializeArray(); + $.each(a, function() { + if (o[this.name]) { + if (!o[this.name].push) { + o[this.name] = [o[this.name]]; + } + o[this.name].push(this.value || ''); + } else { + o[this.name] = this.value || ''; + } + }); + return o; }; \ No newline at end of file diff --git a/public/plugin_assets/redmine_code_review/stylesheets/activity.css b/public/plugin_assets/redmine_code_review/stylesheets/activity.css index e3cdc3d55..202ed54e3 100644 --- a/public/plugin_assets/redmine_code_review/stylesheets/activity.css +++ b/public/plugin_assets/redmine_code_review/stylesheets/activity.css @@ -1,4 +1,4 @@ - -dt.code_review { - background-image: url(../images/review.png); + +dt.code_review { + background-image: url(../images/review.png); } \ No newline at end of file diff --git a/public/plugin_assets/redmine_code_review/stylesheets/code_review.css b/public/plugin_assets/redmine_code_review/stylesheets/code_review.css index 11939ae79..e25dc6d72 100644 --- a/public/plugin_assets/redmine_code_review/stylesheets/code_review.css +++ b/public/plugin_assets/redmine_code_review/stylesheets/code_review.css @@ -1,97 +1,97 @@ -/* -# Code Review plugin for Redmine -# Copyright (C) 2009 Haruyuki Iida -# -# This program is free software; you can redistribute it and/or -# modify it under the terms of the GNU General Public License -# as published by the Free Software Foundation; either version 2 -# 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 General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. -*/ -#review-form-frame { -height: 100%; -} - -.autoscroll table.filecontent th.line-num { - white-space: nowrap; - vertical-align: bottom; - padding-top: 0; - padding-bottom: 0; - text-align:left; -} - -table.filecontent th.line-num img{ - padding: 0; - margin: 0; - cursor: pointer; -} - - -.code-review-form-title { - background-color: #002059; - color: white; - padding-left: 2px; - padding-right: 2px; - cursor: default; -} - - -.code_review_viewer { - - min-width: 300px; - /* - max-width: 60%; - */ - /* max-height: 400px; */ -} - -.code_review_viewer .issue{ - -} - -.code_review_body { - background-color: white; - - padding:2px; - -} - -#code_review_list table.list td { - text-align: center; -} - -#code_review_list table.list td.path { - text-align: left; -} - -#code_review_list table.list td.subject { - text-align: left; -} - -.icon-review { - background-image: url(../images/review.png); - background-repeat: no-repeat; -} - -.icon-closed-review { - background-image: url(../images/closed_review.png); - background-repeat: no-repeat; -} - -.icon-settings { - background-image: url(../../../images/changeset.png); - background-repeat: no-repeat; -} - - -li.code_review_summary { - list-style-type: none; +/* +# Code Review plugin for Redmine +# Copyright (C) 2009 Haruyuki Iida +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# 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 General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +*/ +#review-form-frame { +height: 100%; +} + +.autoscroll table.filecontent th.line-num { + white-space: nowrap; + vertical-align: bottom; + padding-top: 0; + padding-bottom: 0; + text-align:left; +} + +table.filecontent th.line-num img{ + padding: 0; + margin: 0; + cursor: pointer; +} + + +.code-review-form-title { + background-color: #002059; + color: white; + padding-left: 2px; + padding-right: 2px; + cursor: default; +} + + +.code_review_viewer { + + min-width: 300px; + /* + max-width: 60%; + */ + /* max-height: 400px; */ +} + +.code_review_viewer .issue{ + +} + +.code_review_body { + background-color: white; + + padding:2px; + +} + +#code_review_list table.list td { + text-align: center; +} + +#code_review_list table.list td.path { + text-align: left; +} + +#code_review_list table.list td.subject { + text-align: left; +} + +.icon-review { + background-image: url(../images/review.png); + background-repeat: no-repeat; +} + +.icon-closed-review { + background-image: url(../images/closed_review.png); + background-repeat: no-repeat; +} + +.icon-settings { + background-image: url(../../../images/changeset.png); + background-repeat: no-repeat; +} + + +li.code_review_summary { + list-style-type: none; } \ No newline at end of file diff --git a/public/plugin_assets/redmine_code_review/stylesheets/window_js/MIT-LICENSE b/public/plugin_assets/redmine_code_review/stylesheets/window_js/MIT-LICENSE index 5bcdad1bd..0a7cf9ad1 100644 --- a/public/plugin_assets/redmine_code_review/stylesheets/window_js/MIT-LICENSE +++ b/public/plugin_assets/redmine_code_review/stylesheets/window_js/MIT-LICENSE @@ -1,19 +1,19 @@ -Copyright (c) 2006 Sébastien Gruhier (http://xilinus.com, http://itseb.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. +Copyright (c) 2006 Sébastien Gruhier (http://xilinus.com, http://itseb.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. diff --git a/public/plugin_assets/redmine_code_review/stylesheets/window_js/alert.css b/public/plugin_assets/redmine_code_review/stylesheets/window_js/alert.css index 432d14e36..4846e6185 100644 --- a/public/plugin_assets/redmine_code_review/stylesheets/window_js/alert.css +++ b/public/plugin_assets/redmine_code_review/stylesheets/window_js/alert.css @@ -1,119 +1,119 @@ -.overlay_alert { - background-color: #85BBEF; - filter:alpha(opacity=60); - -moz-opacity: 0.6; - opacity: 0.6; -} - -.alert_nw { - width: 5px; - height: 5px; - background: transparent url(alert/top_left.gif) no-repeat bottom left; -} - -.alert_n { - height: 5px; - background: transparent url(alert/top.gif) repeat-x bottom left; -} - -.alert_ne { - width: 5px; - height: 5px; - background: transparent url(alert/top_right.gif) no-repeat bottom left -} - -.alert_e { - width: 5px; - background: transparent url(alert/right.gif) repeat-y 0 0; -} - -.alert_w { - width: 5px; - background: transparent url(alert/left.gif) repeat-y 0 0; -} - -.alert_sw { - width: 5px; - height: 5px; - background: transparent url(alert/bottom_left.gif) no-repeat 0 0; -} - -.alert_s { - height: 5px; - background: transparent url(alert/bottom.gif) repeat-x 0 0; -} - -.alert_se, .alert_sizer { - width: 5px; - height: 5px; - background: transparent url(alert/bottom_right.gif) no-repeat 0 0; -} - -.alert_close { - width:0px; - height:0px; - display:none; -} - -.alert_minimize { - width:0px; - height:0px; - display:none; -} - -.alert_maximize { - width:0px; - height:0px; - display:none; -} - -.alert_title { - float:left; - height:1px; - width:100%; -} - -.alert_content { - overflow:visible; - color: #000; - font-family: Tahoma, Arial, sans-serif; - font: 12px arial; - background: #FFF; -} - -/* For alert/confirm dialog */ -.alert_window { - background: #FFF; - padding:20px; - margin-left:auto; - margin-right:auto; - width:400px; -} - -.alert_message { - font: 12px arial; - width:100%; - color:#F00; - padding-bottom:10px; -} - -.alert_buttons { - text-align:center; - width:100%; -} - -.alert_buttons input { - width:20%; - margin:10px; -} - -.alert_progress { - float:left; - margin:auto; - text-align:center; - width:100%; - height:16px; - background: #FFF url('alert/progress.gif') no-repeat center center -} - - +.overlay_alert { + background-color: #85BBEF; + filter:alpha(opacity=60); + -moz-opacity: 0.6; + opacity: 0.6; +} + +.alert_nw { + width: 5px; + height: 5px; + background: transparent url(alert/top_left.gif) no-repeat bottom left; +} + +.alert_n { + height: 5px; + background: transparent url(alert/top.gif) repeat-x bottom left; +} + +.alert_ne { + width: 5px; + height: 5px; + background: transparent url(alert/top_right.gif) no-repeat bottom left +} + +.alert_e { + width: 5px; + background: transparent url(alert/right.gif) repeat-y 0 0; +} + +.alert_w { + width: 5px; + background: transparent url(alert/left.gif) repeat-y 0 0; +} + +.alert_sw { + width: 5px; + height: 5px; + background: transparent url(alert/bottom_left.gif) no-repeat 0 0; +} + +.alert_s { + height: 5px; + background: transparent url(alert/bottom.gif) repeat-x 0 0; +} + +.alert_se, .alert_sizer { + width: 5px; + height: 5px; + background: transparent url(alert/bottom_right.gif) no-repeat 0 0; +} + +.alert_close { + width:0px; + height:0px; + display:none; +} + +.alert_minimize { + width:0px; + height:0px; + display:none; +} + +.alert_maximize { + width:0px; + height:0px; + display:none; +} + +.alert_title { + float:left; + height:1px; + width:100%; +} + +.alert_content { + overflow:visible; + color: #000; + font-family: Tahoma, Arial, sans-serif; + font: 12px arial; + background: #FFF; +} + +/* For alert/confirm dialog */ +.alert_window { + background: #FFF; + padding:20px; + margin-left:auto; + margin-right:auto; + width:400px; +} + +.alert_message { + font: 12px arial; + width:100%; + color:#F00; + padding-bottom:10px; +} + +.alert_buttons { + text-align:center; + width:100%; +} + +.alert_buttons input { + width:20%; + margin:10px; +} + +.alert_progress { + float:left; + margin:auto; + text-align:center; + width:100%; + height:16px; + background: #FFF url('alert/progress.gif') no-repeat center center +} + + diff --git a/public/plugin_assets/redmine_code_review/stylesheets/window_js/alert_lite.css b/public/plugin_assets/redmine_code_review/stylesheets/window_js/alert_lite.css index c2ad538ca..a74fc71c3 100644 --- a/public/plugin_assets/redmine_code_review/stylesheets/window_js/alert_lite.css +++ b/public/plugin_assets/redmine_code_review/stylesheets/window_js/alert_lite.css @@ -1,88 +1,88 @@ -.overlay_alert_lite { - background-color: #85BBEF; - filter:alpha(opacity=60); - -moz-opacity: 0.6; - opacity: 0.6; -} - -.alert_lite_sizer { - width:0px; - height:0px; - display:none; -} - -.alert_lite_close { - width:0px; - height:0px; - display:none; -} - -.alert_lite_minimize { - width:0px; - height:0px; - display:none; -} - -.alert_lite_maximize { - width:0px; - height:0px; - display:none; -} - -.alert_lite_title { - width:0px; - height:0px; - display:none; -} - -.alert_lite_content { - overflow:auto; - color: #000; - font-family: Tahoma, Arial, sans-serif; - font-size: 10px; - background: #FFF; -} - - -/* For alert/confirm dialog */ -.alert_lite_window { - border:1px solid #F00; - background: #FFF; - padding:20px; - margin-left:auto; - margin-right:auto; - width:400px; -} - -.alert_lite_message { - font-size:16px; - text-align:center; - width:100%; - color:#F00; - padding-bottom:10px; -} - -.alert_lite_buttons { - text-align:center; - width:100%; -} - -.alert_lite_buttons input { - width:20%; - margin:10px; -} - -.alert_lite_progress { - float:left; - margin:auto; - text-align:center; - width:100%; - height:16px; - background: #FFF url('alert/progress.gif') no-repeat center center -} - -table.alert_lite_header { - border:1px solid #F00; - background:#FFF -} - +.overlay_alert_lite { + background-color: #85BBEF; + filter:alpha(opacity=60); + -moz-opacity: 0.6; + opacity: 0.6; +} + +.alert_lite_sizer { + width:0px; + height:0px; + display:none; +} + +.alert_lite_close { + width:0px; + height:0px; + display:none; +} + +.alert_lite_minimize { + width:0px; + height:0px; + display:none; +} + +.alert_lite_maximize { + width:0px; + height:0px; + display:none; +} + +.alert_lite_title { + width:0px; + height:0px; + display:none; +} + +.alert_lite_content { + overflow:auto; + color: #000; + font-family: Tahoma, Arial, sans-serif; + font-size: 10px; + background: #FFF; +} + + +/* For alert/confirm dialog */ +.alert_lite_window { + border:1px solid #F00; + background: #FFF; + padding:20px; + margin-left:auto; + margin-right:auto; + width:400px; +} + +.alert_lite_message { + font-size:16px; + text-align:center; + width:100%; + color:#F00; + padding-bottom:10px; +} + +.alert_lite_buttons { + text-align:center; + width:100%; +} + +.alert_lite_buttons input { + width:20%; + margin:10px; +} + +.alert_lite_progress { + float:left; + margin:auto; + text-align:center; + width:100%; + height:16px; + background: #FFF url('alert/progress.gif') no-repeat center center +} + +table.alert_lite_header { + border:1px solid #F00; + background:#FFF +} + diff --git a/public/plugin_assets/redmine_code_review/stylesheets/window_js/alphacube.css b/public/plugin_assets/redmine_code_review/stylesheets/window_js/alphacube.css index 7d2790e75..6d2862c0e 100644 --- a/public/plugin_assets/redmine_code_review/stylesheets/window_js/alphacube.css +++ b/public/plugin_assets/redmine_code_review/stylesheets/window_js/alphacube.css @@ -1,150 +1,150 @@ -.overlay_alphacube { - background-color: #85BBEF; - filter:alpha(opacity=60); - -moz-opacity: 0.6; - opacity: 0.6; -} - -.alphacube_nw { - background: transparent url(alphacube/left-top.gif) no-repeat 0 0; - width:10px; - height:25px; -} - -.alphacube_n { - background: transparent url(alphacube/top-middle.gif) repeat-x 0 0; - height:25px; -} - -.alphacube_ne { - background: transparent url(alphacube/right-top.gif) no-repeat 0 0; - width:10px; - height:25px; -} - -.alphacube_w { - background: transparent url(alphacube/frame-left.gif) repeat-y top left; - width:7px; -} - -.alphacube_e { - background: transparent url(alphacube/frame-right.gif) repeat-y top right; - width:7px; -} - -.alphacube_sw { - background: transparent url(alphacube/bottom-left-c.gif) no-repeat 0 0; - width:7px; - height:7px; -} - -.alphacube_s { - background: transparent url(alphacube/bottom-middle.gif) repeat-x 0 0; - height:7px; -} - -.alphacube_se, .alphacube_sizer { - background: transparent url(alphacube/bottom-right-c.gif) no-repeat 0 0; - width:7px; - height:7px; -} - -.alphacube_sizer { - cursor:se-resize; -} - -.alphacube_close { - width: 23px; - height: 23px; - background: transparent url(alphacube/button-close-focus.gif) no-repeat 0 0; - position:absolute; - top:0px; - right:11px; - cursor:pointer; - z-index:1000; -} - -.alphacube_minimize { - width: 23px; - height: 23px; - background: transparent url(alphacube/button-min-focus.gif) no-repeat 0 0; - position:absolute; - top:0px; - right:55px; - cursor:pointer; - z-index:1000; -} - -.alphacube_maximize { - width: 23px; - height: 23px; - background: transparent url(alphacube/button-max-focus.gif) no-repeat 0 0; - position:absolute; - top:0px; - right:33px; - cursor:pointer; - z-index:1000; -} - -.alphacube_title { - float:left; - height:14px; - font-size:14px; - text-align:center; - margin-top:2px; - width:100%; - color:#123456; -} - -.alphacube_content { - overflow:auto; - color: #000; - font-family: Tahoma, Arial, sans-serif; - font: 12px arial; - background:#FDFDFD; -} - -/* For alert/confirm dialog */ -.alphacube_window { - border:1px solid #F00; - background: #FFF; - padding:20px; - margin-left:auto; - margin-right:auto; - width:400px; -} - -.alphacube_message { - font: 12px arial; - text-align:center; - width:100%; - padding-bottom:10px; -} - -.alphacube_buttons { - text-align:center; - width:100%; -} - -.alphacube_buttons input { - width:20%; - margin:10px; -} - -.alphacube_progress { - float:left; - margin:auto; - text-align:center; - width:100%; - height:16px; - background: #FFF url('alert/progress.gif') no-repeat center center -} - -.alphacube_wired_frame { - background: #FFF; - filter:alpha(opacity=60); - -moz-opacity: 0.6; - opacity: 0.6; -} - - +.overlay_alphacube { + background-color: #85BBEF; + filter:alpha(opacity=60); + -moz-opacity: 0.6; + opacity: 0.6; +} + +.alphacube_nw { + background: transparent url(alphacube/left-top.gif) no-repeat 0 0; + width:10px; + height:25px; +} + +.alphacube_n { + background: transparent url(alphacube/top-middle.gif) repeat-x 0 0; + height:25px; +} + +.alphacube_ne { + background: transparent url(alphacube/right-top.gif) no-repeat 0 0; + width:10px; + height:25px; +} + +.alphacube_w { + background: transparent url(alphacube/frame-left.gif) repeat-y top left; + width:7px; +} + +.alphacube_e { + background: transparent url(alphacube/frame-right.gif) repeat-y top right; + width:7px; +} + +.alphacube_sw { + background: transparent url(alphacube/bottom-left-c.gif) no-repeat 0 0; + width:7px; + height:7px; +} + +.alphacube_s { + background: transparent url(alphacube/bottom-middle.gif) repeat-x 0 0; + height:7px; +} + +.alphacube_se, .alphacube_sizer { + background: transparent url(alphacube/bottom-right-c.gif) no-repeat 0 0; + width:7px; + height:7px; +} + +.alphacube_sizer { + cursor:se-resize; +} + +.alphacube_close { + width: 23px; + height: 23px; + background: transparent url(alphacube/button-close-focus.gif) no-repeat 0 0; + position:absolute; + top:0px; + right:11px; + cursor:pointer; + z-index:1000; +} + +.alphacube_minimize { + width: 23px; + height: 23px; + background: transparent url(alphacube/button-min-focus.gif) no-repeat 0 0; + position:absolute; + top:0px; + right:55px; + cursor:pointer; + z-index:1000; +} + +.alphacube_maximize { + width: 23px; + height: 23px; + background: transparent url(alphacube/button-max-focus.gif) no-repeat 0 0; + position:absolute; + top:0px; + right:33px; + cursor:pointer; + z-index:1000; +} + +.alphacube_title { + float:left; + height:14px; + font-size:14px; + text-align:center; + margin-top:2px; + width:100%; + color:#123456; +} + +.alphacube_content { + overflow:auto; + color: #000; + font-family: Tahoma, Arial, sans-serif; + font: 12px arial; + background:#FDFDFD; +} + +/* For alert/confirm dialog */ +.alphacube_window { + border:1px solid #F00; + background: #FFF; + padding:20px; + margin-left:auto; + margin-right:auto; + width:400px; +} + +.alphacube_message { + font: 12px arial; + text-align:center; + width:100%; + padding-bottom:10px; +} + +.alphacube_buttons { + text-align:center; + width:100%; +} + +.alphacube_buttons input { + width:20%; + margin:10px; +} + +.alphacube_progress { + float:left; + margin:auto; + text-align:center; + width:100%; + height:16px; + background: #FFF url('alert/progress.gif') no-repeat center center +} + +.alphacube_wired_frame { + background: #FFF; + filter:alpha(opacity=60); + -moz-opacity: 0.6; + opacity: 0.6; +} + + diff --git a/public/plugin_assets/redmine_code_review/stylesheets/window_js/behavior.htc b/public/plugin_assets/redmine_code_review/stylesheets/window_js/behavior.htc index 437c5ec92..e5c6edc1c 100644 --- a/public/plugin_assets/redmine_code_review/stylesheets/window_js/behavior.htc +++ b/public/plugin_assets/redmine_code_review/stylesheets/window_js/behavior.htc @@ -1,51 +1,51 @@ - - - + + + \ No newline at end of file diff --git a/public/plugin_assets/redmine_code_review/stylesheets/window_js/darkX.css b/public/plugin_assets/redmine_code_review/stylesheets/window_js/darkX.css index 2f83cfd46..e3df3e0a4 100644 --- a/public/plugin_assets/redmine_code_review/stylesheets/window_js/darkX.css +++ b/public/plugin_assets/redmine_code_review/stylesheets/window_js/darkX.css @@ -1,121 +1,121 @@ -.overlay_darkX { - background-color: #85BBEF; - filter:alpha(opacity=60); - -moz-opacity: 0.6; - opacity: 0.6; -} - -.darkX_nw { - background: transparent url(darkX/titlebar-left-focused.png) no-repeat 0 0; - width:6px; - height:21px; -} -.darkX_n { - background: transparent url(darkX/titlebar-mid-focused.png) repeat-x 0 0; - height:21px; -} -.darkX_ne { - background: transparent url(darkX/titlebar-right-focused.png) no-repeat 0 0; - width:6px; - height:21px; -} -.darkX_w { - background: transparent url(darkX/frame-left-focused.png) repeat-y top left; - width:3px; -} - -.darkX_e { - background: transparent url(darkX/frame-right-focused.png) repeat-y top right; - width:3px; -} - -.darkX_sw { - background: transparent url(darkX/frame-bottom-left-focused.png) no-repeat 0 0; - width:5px; - height:3px; -} -.darkX_s { - background: transparent url(darkX/frame-bottom-mid-focused.png) repeat-x 0 0; - height:3px; -} -.darkX_se, .darkX_sizer { - background: transparent url(darkX/frame-bottom-right-focused.png) no-repeat 0 0; - width:5px; - height:3px; -} - -.darkX_sizer { - cursor:se-resize; -} - -.darkX_close { - width: 21px; - height: 21px; - background: transparent url(darkX/button-close-focused.png) no-repeat 0 0; - position:absolute; - top:0px; - right:5px; - cursor:pointer; - z-index:1000; -} - -.darkX_minimize { - width: 21px; - height: 21px; - background: transparent url(darkX/button-minimize-focused.png) no-repeat 0 0; - position:absolute; - top:0px; - right:26px; - cursor:pointer; - z-index:1000; -} - -.darkX_maximize { - width: 21px; - height: 21px; - background: transparent url(darkX/button-maximize-focused.png) no-repeat 0 0; - position:absolute; - top:0px; - right:47px; - cursor:pointer; - z-index:1000; -} - - -.darkX_title { - float:left; - height:14px; - font-size:12px; - text-align:center; - margin-top:2px; - width:100%; - color:#FFF; -} - -.darkX_content { - overflow:auto; - color: #E6DF2A; - font-family: Tahoma, Arial, sans-serif; - font-size: 14px; - background:#5E5148; -} - - -/* FOR IE */ -* html .darkX_minimize { - background-color: transparent; - background-image: none; - filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/darkX/button-minimize-focused.png", sizingMethod="crop"); -} - -* html .darkX_maximize { - background-color: transparent; - background-image: none; - filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/darkX/button-maximize-focused.png", sizingMethod="scale"); -} - -* html .darkX_close { - background-color: transparent; - background-image: none; - filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/darkX/button-close-focused.png", sizingMethod="crop"); -} +.overlay_darkX { + background-color: #85BBEF; + filter:alpha(opacity=60); + -moz-opacity: 0.6; + opacity: 0.6; +} + +.darkX_nw { + background: transparent url(darkX/titlebar-left-focused.png) no-repeat 0 0; + width:6px; + height:21px; +} +.darkX_n { + background: transparent url(darkX/titlebar-mid-focused.png) repeat-x 0 0; + height:21px; +} +.darkX_ne { + background: transparent url(darkX/titlebar-right-focused.png) no-repeat 0 0; + width:6px; + height:21px; +} +.darkX_w { + background: transparent url(darkX/frame-left-focused.png) repeat-y top left; + width:3px; +} + +.darkX_e { + background: transparent url(darkX/frame-right-focused.png) repeat-y top right; + width:3px; +} + +.darkX_sw { + background: transparent url(darkX/frame-bottom-left-focused.png) no-repeat 0 0; + width:5px; + height:3px; +} +.darkX_s { + background: transparent url(darkX/frame-bottom-mid-focused.png) repeat-x 0 0; + height:3px; +} +.darkX_se, .darkX_sizer { + background: transparent url(darkX/frame-bottom-right-focused.png) no-repeat 0 0; + width:5px; + height:3px; +} + +.darkX_sizer { + cursor:se-resize; +} + +.darkX_close { + width: 21px; + height: 21px; + background: transparent url(darkX/button-close-focused.png) no-repeat 0 0; + position:absolute; + top:0px; + right:5px; + cursor:pointer; + z-index:1000; +} + +.darkX_minimize { + width: 21px; + height: 21px; + background: transparent url(darkX/button-minimize-focused.png) no-repeat 0 0; + position:absolute; + top:0px; + right:26px; + cursor:pointer; + z-index:1000; +} + +.darkX_maximize { + width: 21px; + height: 21px; + background: transparent url(darkX/button-maximize-focused.png) no-repeat 0 0; + position:absolute; + top:0px; + right:47px; + cursor:pointer; + z-index:1000; +} + + +.darkX_title { + float:left; + height:14px; + font-size:12px; + text-align:center; + margin-top:2px; + width:100%; + color:#FFF; +} + +.darkX_content { + overflow:auto; + color: #E6DF2A; + font-family: Tahoma, Arial, sans-serif; + font-size: 14px; + background:#5E5148; +} + + +/* FOR IE */ +* html .darkX_minimize { + background-color: transparent; + background-image: none; + filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/darkX/button-minimize-focused.png", sizingMethod="crop"); +} + +* html .darkX_maximize { + background-color: transparent; + background-image: none; + filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/darkX/button-maximize-focused.png", sizingMethod="scale"); +} + +* html .darkX_close { + background-color: transparent; + background-image: none; + filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/darkX/button-close-focused.png", sizingMethod="crop"); +} diff --git a/public/plugin_assets/redmine_code_review/stylesheets/window_js/debug.css b/public/plugin_assets/redmine_code_review/stylesheets/window_js/debug.css index 69e3b7fc2..d7981e9ca 100644 --- a/public/plugin_assets/redmine_code_review/stylesheets/window_js/debug.css +++ b/public/plugin_assets/redmine_code_review/stylesheets/window_js/debug.css @@ -1,25 +1,25 @@ -div.inspector div.inspectable { - padding: 0.25em 0 0.25em 1em; - background-color: Gray; - color: white; - border: outset 2px white; - cursor: pointer; -} - -div.inspector div.child { - margin: 0 0 0 1em; -} - -#debug_window_content { /* DIV container for debug sizing*/ - width:250px; - height:100px; - background-color:#000; -} - -#debug { /* DIV container for debug contents*/ - padding:3px; - color:#0f0; - font-family:monaco, Tahoma, Verdana, Arial, Helvetica, sans-serif; - font-size:10px; -} - +div.inspector div.inspectable { + padding: 0.25em 0 0.25em 1em; + background-color: Gray; + color: white; + border: outset 2px white; + cursor: pointer; +} + +div.inspector div.child { + margin: 0 0 0 1em; +} + +#debug_window_content { /* DIV container for debug sizing*/ + width:250px; + height:100px; + background-color:#000; +} + +#debug { /* DIV container for debug contents*/ + padding:3px; + color:#0f0; + font-family:monaco, Tahoma, Verdana, Arial, Helvetica, sans-serif; + font-size:10px; +} + diff --git a/public/plugin_assets/redmine_code_review/stylesheets/window_js/default.css b/public/plugin_assets/redmine_code_review/stylesheets/window_js/default.css index 6ab13789d..591451723 100644 --- a/public/plugin_assets/redmine_code_review/stylesheets/window_js/default.css +++ b/public/plugin_assets/redmine_code_review/stylesheets/window_js/default.css @@ -1,155 +1,155 @@ -.overlay_dialog { - background-color: #666666; - filter:alpha(opacity=60); - -moz-opacity: 0.6; - opacity: 0.6; -} - -.overlay___invisible__ { - background-color: #666666; - filter:alpha(opacity=0); - -moz-opacity: 0; - opacity: 0; -} - -.dialog_nw { - width: 9px; - height: 23px; - background: transparent url(default/top_left.gif) no-repeat 0 0; -} - -.dialog_n { - background: transparent url(default/top_mid.gif) repeat-x 0 0; - height: 23px; -} - -.dialog_ne { - width: 9px; - height: 23px; - background: transparent url(default/top_right.gif) no-repeat 0 0; -} - -.dialog_e { - width: 2px; - background: transparent url(default/center_right.gif) repeat-y 0 0; -} - -.dialog_w { - width: 2px; - background: transparent url(default/center_left.gif) repeat-y 0 0; -} - -.dialog_sw { - width: 9px; - height: 19px; - background: transparent url(default/bottom_left.gif) no-repeat 0 0; -} - -.dialog_s { - background: transparent url(default/bottom_mid.gif) repeat-x 0 0; - height: 19px; -} - -.dialog_se { - width: 9px; - height: 19px; - background: transparent url(default/bottom_right.gif) no-repeat 0 0; -} - -.dialog_sizer { - width: 9px; - height: 19px; - background: transparent url(default/sizer.gif) no-repeat 0 0; - cursor:se-resize; -} - -.dialog_close { - width: 14px; - height: 14px; - background: transparent url(default/close.gif) no-repeat 0 0; - position:absolute; - top:5px; - left:8px; - cursor:pointer; - z-index:2000; -} - -.dialog_minimize { - width: 14px; - height: 15px; - background: transparent url(default/minimize.gif) no-repeat 0 0; - position:absolute; - top:5px; - left:28px; - cursor:pointer; - z-index:2000; -} - -.dialog_maximize { - width: 14px; - height: 15px; - background: transparent url(default/maximize.gif) no-repeat 0 0; - position:absolute; - top:5px; - left:49px; - cursor:pointer; - z-index:2000; -} - -.dialog_title { - float:left; - height:14px; - font-family: Tahoma, Arial, sans-serif; - font-size:12px; - text-align:center; - width:100%; - color:#000; -} - -.dialog_content { - overflow:auto; - color: #DDD; - font-family: Tahoma, Arial, sans-serif; - font-size: 10px; - background-color:#123; -} - -.top_draggable, .bottom_draggable { - cursor:move; -} - -.status_bar { - font-size:12px; -} -.status_bar input{ - font-size:12px; -} - -.wired_frame { - display: block; - position: absolute; - border: 1px #000 dashed; -} - -/* DO NOT CHANGE THESE VALUES*/ -.dialog { - display: block; - position: absolute; -} - -.dialog table.table_window { - border-collapse: collapse; - border-spacing: 0; - width: 100%; - margin: 0px; - padding:0px; -} - -.dialog table.table_window td , .dialog table.table_window th { - padding: 0; -} - -.dialog .title_window { - -moz-user-select:none; -} - +.overlay_dialog { + background-color: #666666; + filter:alpha(opacity=60); + -moz-opacity: 0.6; + opacity: 0.6; +} + +.overlay___invisible__ { + background-color: #666666; + filter:alpha(opacity=0); + -moz-opacity: 0; + opacity: 0; +} + +.dialog_nw { + width: 9px; + height: 23px; + background: transparent url(default/top_left.gif) no-repeat 0 0; +} + +.dialog_n { + background: transparent url(default/top_mid.gif) repeat-x 0 0; + height: 23px; +} + +.dialog_ne { + width: 9px; + height: 23px; + background: transparent url(default/top_right.gif) no-repeat 0 0; +} + +.dialog_e { + width: 2px; + background: transparent url(default/center_right.gif) repeat-y 0 0; +} + +.dialog_w { + width: 2px; + background: transparent url(default/center_left.gif) repeat-y 0 0; +} + +.dialog_sw { + width: 9px; + height: 19px; + background: transparent url(default/bottom_left.gif) no-repeat 0 0; +} + +.dialog_s { + background: transparent url(default/bottom_mid.gif) repeat-x 0 0; + height: 19px; +} + +.dialog_se { + width: 9px; + height: 19px; + background: transparent url(default/bottom_right.gif) no-repeat 0 0; +} + +.dialog_sizer { + width: 9px; + height: 19px; + background: transparent url(default/sizer.gif) no-repeat 0 0; + cursor:se-resize; +} + +.dialog_close { + width: 14px; + height: 14px; + background: transparent url(default/close.gif) no-repeat 0 0; + position:absolute; + top:5px; + left:8px; + cursor:pointer; + z-index:2000; +} + +.dialog_minimize { + width: 14px; + height: 15px; + background: transparent url(default/minimize.gif) no-repeat 0 0; + position:absolute; + top:5px; + left:28px; + cursor:pointer; + z-index:2000; +} + +.dialog_maximize { + width: 14px; + height: 15px; + background: transparent url(default/maximize.gif) no-repeat 0 0; + position:absolute; + top:5px; + left:49px; + cursor:pointer; + z-index:2000; +} + +.dialog_title { + float:left; + height:14px; + font-family: Tahoma, Arial, sans-serif; + font-size:12px; + text-align:center; + width:100%; + color:#000; +} + +.dialog_content { + overflow:auto; + color: #DDD; + font-family: Tahoma, Arial, sans-serif; + font-size: 10px; + background-color:#123; +} + +.top_draggable, .bottom_draggable { + cursor:move; +} + +.status_bar { + font-size:12px; +} +.status_bar input{ + font-size:12px; +} + +.wired_frame { + display: block; + position: absolute; + border: 1px #000 dashed; +} + +/* DO NOT CHANGE THESE VALUES*/ +.dialog { + display: block; + position: absolute; +} + +.dialog table.table_window { + border-collapse: collapse; + border-spacing: 0; + width: 100%; + margin: 0px; + padding:0px; +} + +.dialog table.table_window td , .dialog table.table_window th { + padding: 0; +} + +.dialog .title_window { + -moz-user-select:none; +} + diff --git a/public/plugin_assets/redmine_code_review/stylesheets/window_js/iefix/iepngfix.css b/public/plugin_assets/redmine_code_review/stylesheets/window_js/iefix/iepngfix.css index 257a1b1e3..249388be5 100644 --- a/public/plugin_assets/redmine_code_review/stylesheets/window_js/iefix/iepngfix.css +++ b/public/plugin_assets/redmine_code_review/stylesheets/window_js/iefix/iepngfix.css @@ -1,3 +1,3 @@ -/* PNG fix for all themes that uses PNG images on IE */ -td, div { behavior: url(../themes/iefix/iepngfix.htc) } - +/* PNG fix for all themes that uses PNG images on IE */ +td, div { behavior: url(../themes/iefix/iepngfix.htc) } + diff --git a/public/plugin_assets/redmine_code_review/stylesheets/window_js/iefix/iepngfix.htc b/public/plugin_assets/redmine_code_review/stylesheets/window_js/iefix/iepngfix.htc index a6c683b9f..9a13f32bf 100644 --- a/public/plugin_assets/redmine_code_review/stylesheets/window_js/iefix/iepngfix.htc +++ b/public/plugin_assets/redmine_code_review/stylesheets/window_js/iefix/iepngfix.htc @@ -1,54 +1,54 @@ - - - - + + + + \ No newline at end of file diff --git a/public/plugin_assets/redmine_code_review/stylesheets/window_js/lighting.css b/public/plugin_assets/redmine_code_review/stylesheets/window_js/lighting.css index 95ec287a9..0d955c3d7 100644 --- a/public/plugin_assets/redmine_code_review/stylesheets/window_js/lighting.css +++ b/public/plugin_assets/redmine_code_review/stylesheets/window_js/lighting.css @@ -1,960 +1,960 @@ -.overlay___invisible__ { - background-color: #666; - filter:alpha(opacity=0); - -moz-opacity: 0; - opacity: 0; -} - -.top_draggable, .bottom_draggable { - cursor:move; -} - -.status_bar { - font-size:12px; -} -.status_bar input{ - font-size:12px; -} - -.wired_frame { - display:block; - position:absolute; - border:1px #000 dashed; -} - - - -.overlay_bluelighting { - background-color:#FFF; - filter:alpha(opacity=60); - -moz-opacity:0.6; - opacity:0.6; -} - -.bluelighting_wired_frame { - background:#FFF; - filter:alpha(opacity=60); - -moz-opacity:0.6; - opacity:0.6; -} - -.bluelighting_nw { - background:transparent url(lighting/top-left-blue.png) no-repeat 0 0; - width:9px; - height:28px; -} - -.bluelighting_n { - background:transparent url(lighting/top-middle-blue.png) repeat-x 0 0; - height:28px; -} - -.bluelighting_ne { - background:transparent url(lighting/top-right-blue.png) no-repeat 0 0; - width:15px; - height:28px; -} - -.bluelighting_w { - background:transparent url(lighting/left-blue.png) repeat-y top left; - width:9px; -} - -.bluelighting_e { - background:transparent url(lighting/right-blue.png) repeat-y top right; - width:15px; -} - -.bluelighting_sw { - background:transparent url(lighting/bottom-left-blue.png) no-repeat 0 0; - width:9px; - height:15px; -} - -.bluelighting_s { - background:transparent url(lighting/bottom-middle-blue.png) repeat-x 0 0; - height:15px; -} - -.bluelighting_se, .bluelighting_sizer { - background:transparent url(lighting/bottom-right-blue.png) no-repeat 0 0; - width:15px; - height:15px; -} - -.bluelighting_sizer { - cursor:se-resize; -} - -.bluelighting_close { - width:15px; - height:9px; - background:transparent url(lighting/button-close-blue.png) no-repeat 0 0; - position:absolute; - top:11px; - right:10px; - cursor:pointer; - z-index:1000; -} - -.bluelighting_maximize { - width:15px; - height:9px; - background:transparent url(lighting/button-maximize-blue.png) no-repeat 0 0; - position:absolute; - top:11px; - right:25px; - cursor:pointer; - z-index:1000; -} - -.bluelighting_minimize { - width:15px; - height:9px; - background:transparent url(lighting/button-minimize-blue.png) no-repeat 0 0; - position:absolute; - top:11px; - right:40px; - cursor:pointer; - z-index:1000; -} - -.bluelighting_title { - float:left; - height:14px; - font-size:14px; - font-weight:bold; - font-family:Verdana, Arial, sans-serif; - text-align:center; - margin-top:2px; - width:100%; - color:#17385B; -} - -.bluelighting_content { - overflow:auto; - color:#000; - font-family:Verdana, Arial, sans-serif; - font-size:12px; - background:#BFDBFF; -} - -/* For alert/confirm dialog */ -.bluelighting_window { - border:1px solid #F00; - background:#FFF; - padding:20px; - margin-left:auto; - margin-right:auto; - width:400px; -} - -.bluelighting_message { - font-size:12px; - text-align:center; - width:100%; - padding-bottom:10px; -} - -.bluelighting_buttons { - text-align:center; - width:100%; -} - -.bluelighting_buttons input { - border:1px solid #999; - border-top-color:#CCC; - border-left-color:#CCC; - padding:2px; - background-color:#FFF; - color:#333; - background-image:url(lighting/background_buttons.gif); - background-repeat:repeat-x; - font-family:Verdana, Arial, sans-serif; - font-size:10px; - font-weight:bold; - text-align:center; -} - -.bluelighting_progress { - float:left; - margin:auto; - text-align:center; - width:100%; - height:16px; - background:transparent url('lighting/spinner.gif') no-repeat center center -} - -/* FOR IE */ -* html .bluelighting_nw { - background-color: transparent; - background-image: none; - filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/lighting/top-left-blue.png", sizingMethod="crop"); -} - -* html .bluelighting_n { - background-color: transparent; - background-image: none; - filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/lighting/top-middle-blue.png", sizingMethod="scale"); -} - -* html .bluelighting_ne { - background-color: transparent; - background-image: none; - filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/lighting/top-right-blue.png", sizingMethod="crop"); -} - -* html .bluelighting_w { - background-color: transparent; - background-image: none; - filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/lighting/left-blue.png", sizingMethod="scale"); -} - -* html .bluelighting_e { - background-color: transparent; - background-image: none; - filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/lighting/right-blue.png", sizingMethod="scale"); -} - -* html .bluelighting_sw { - background-color: transparent; - background-image: none; - filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/lighting/bottom-left-blue.png", sizingMethod="crop"); -} - -* html .bluelighting_s { - background-color: transparent; - background-image: none; - filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/lighting/bottom-middle-blue.png", sizingMethod="scale"); -} - -* html .bluelighting_se, * html .bluelighting_sizer { - background-color: transparent; - background-image: none; - filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/lighting/bottom-right-blue.png", sizingMethod="crop"); -} - -* html .bluelighting_close { - background-color: transparent; - background-image: none; - filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/lighting/button-close-blue.png", sizingMethod="crop"); -} - -* html .bluelighting_minimize { - background-color: transparent; - background-image: none; - filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/lighting/button-minimize-blue.png", sizingMethod="crop"); -} - -* html .bluelighting_maximize { - background-color: transparent; - background-image: none; - filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/lighting/button-maximize-blue.png", sizingMethod="crop"); -} - -* html .bluelighting_content { - background:#B8D7FF; -} - - - -.overlay_greylighting { - background-color:#FFF; - filter:alpha(opacity=60); - -moz-opacity:0.6; - opacity:0.6; -} - -.greylighting_wired_frame { - background:#FFF; - filter:alpha(opacity=60); - -moz-opacity:0.6; - opacity:0.6; -} - -.greylighting_nw { - background:transparent url(lighting/top-left-grey.png) no-repeat 0 0; - width:9px; - height:28px; -} - -.greylighting_n { - background:transparent url(lighting/top-middle-grey.png) repeat-x 0 0; - height:28px; -} - -.greylighting_ne { - background:transparent url(lighting/top-right-grey.png) no-repeat 0 0; - width:15px; - height:28px; -} - -.greylighting_w { - background:transparent url(lighting/left-grey.png) repeat-y top left; - width:9px; -} - -.greylighting_e { - background:transparent url(lighting/right-grey.png) repeat-y top right; - width:15px; -} - -.greylighting_sw { - background:transparent url(lighting/bottom-left-grey.png) no-repeat 0 0; - width:9px; - height:15px; -} - -.greylighting_s { - background:transparent url(lighting/bottom-middle-grey.png) repeat-x 0 0; - height:15px; -} - -.greylighting_se, .greylighting_sizer { - background:transparent url(lighting/bottom-right-grey.png) no-repeat 0 0; - width:15px; - height:15px; -} - -.greylighting_sizer { - cursor:se-resize; -} - -.greylighting_close { - width:15px; - height:9px; - background:transparent url(lighting/button-close-grey.png) no-repeat 0 0; - position:absolute; - top:11px; - right:10px; - cursor:pointer; - z-index:1000; -} - -.greylighting_maximize { - width:15px; - height:9px; - background:transparent url(lighting/button-maximize-grey.png) no-repeat 0 0; - position:absolute; - top:11px; - right:25px; - cursor:pointer; - z-index:1000; -} - -.greylighting_minimize { - width:15px; - height:9px; - background:transparent url(lighting/button-minimize-grey.png) no-repeat 0 0; - position:absolute; - top:11px; - right:40px; - cursor:pointer; - z-index:1000; -} - -.greylighting_title { - float:left; - height:14px; - font-size:14px; - font-weight:bold; - font-family:Verdana, Arial, sans-serif; - text-align:center; - margin-top:2px; - width:100%; - color:#525252; -} - -.greylighting_content { - overflow:auto; - color:#000; - font-family:Verdana, Arial, sans-serif; - font-size:12px; - background:#CDCDCD; -} - -/* For alert/confirm dialog */ -.greylighting_window { - border:1px solid #F00; - background:#FFF; - padding:20px; - margin-left:auto; - margin-right:auto; - width:400px; -} - -.greylighting_message { - font-size:12px; - text-align:center; - width:100%; - padding-bottom:10px; -} - -.greylighting_buttons { - text-align:center; - width:100%; -} - -.greylighting_buttons input { - border:1px solid #999; - border-top-color:#CCC; - border-left-color:#CCC; - padding:2px; - background-color:#FFF; - color:#333; - background-image:url(lighting/background_buttons.gif); - background-repeat:repeat-x; - font-family:Verdana, Arial, sans-serif; - font-size:10px; - font-weight:bold; - text-align:center; -} - -.greylighting_progress { - float:left; - margin:auto; - text-align:center; - width:100%; - height:16px; - background:transparent url('lighting/spinner.gif') no-repeat center center -} - -/* FOR IE */ -* html .greylighting_nw { - background-color: transparent; - background-image: none; - filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/lighting/top-left-grey.png", sizingMethod="crop"); -} - -* html .greylighting_n { - background-color: transparent; - background-image: none; - filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/lighting/top-middle-grey.png", sizingMethod="scale"); -} - -* html .greylighting_ne { - background-color: transparent; - background-image: none; - filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/lighting/top-right-grey.png", sizingMethod="crop"); -} - -* html .greylighting_w { - background-color: transparent; - background-image: none; - filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/lighting/left-grey.png", sizingMethod="scale"); -} - -* html .greylighting_e { - background-color: transparent; - background-image: none; - filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/lighting/right-grey.png", sizingMethod="scale"); -} - -* html .greylighting_sw { - background-color: transparent; - background-image: none; - filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/lighting/bottom-left-grey.png", sizingMethod="crop"); -} - -* html .greylighting_s { - background-color: transparent; - background-image: none; - filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/lighting/bottom-middle-grey.png", sizingMethod="scale"); -} - -* html greylighting_se, * html .greylighting_sizer { - background-color: transparent; - background-image: none; - filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/lighting/bottom-right-grey.png", sizingMethod="crop"); -} - -* html .greylighting_close { - background-color: transparent; - background-image: none; - filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/lighting/button-close-grey.png", sizingMethod="crop"); -} - -* html .greylighting_minimize { - background-color: transparent; - background-image: none; - filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/lighting/button-minimize-grey.png", sizingMethod="crop"); -} - -* html .greylighting_maximize { - background-color: transparent; - background-image: none; - filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/lighting/button-maximize-grey.png", sizingMethod="crop"); -} - -* html .greylighting_content { - background:#C7C7C7; -} - - - -.overlay_greenlighting { - background-color:#FFF; - filter:alpha(opacity=60); - -moz-opacity:0.6; - opacity:0.6; -} - -.greenlighting_wired_frame { - background:#FFF; - filter:alpha(opacity=60); - -moz-opacity:0.6; - opacity:0.6; -} - -.greenlighting_nw { - background:transparent url(lighting/top-left-green.png) no-repeat 0 0; - width:9px; - height:28px; -} - -.greenlighting_n { - background:transparent url(lighting/top-middle-green.png) repeat-x 0 0; - height:28px; -} - -.greenlighting_ne { - background:transparent url(lighting/top-right-green.png) no-repeat 0 0; - width:15px; - height:28px; -} - -.greenlighting_w { - background:transparent url(lighting/left-green.png) repeat-y top left; - width:9px; -} - -.greenlighting_e { - background:transparent url(lighting/right-green.png) repeat-y top right; - width:15px; -} - -.greenlighting_sw { - background:transparent url(lighting/bottom-left-green.png) no-repeat 0 0; - width:9px; - height:15px; -} - -.greenlighting_s { - background:transparent url(lighting/bottom-middle-green.png) repeat-x 0 0; - height:15px; -} - -.greenlighting_se, .greenlighting_sizer { - background:transparent url(lighting/bottom-right-green.png) no-repeat 0 0; - width:15px; - height:15px; -} - -.greenlighting_sizer { - cursor:se-resize; -} - -.greenlighting_close { - width:15px; - height:9px; - background:transparent url(lighting/button-close-green.png) no-repeat 0 0; - position:absolute; - top:11px; - right:10px; - cursor:pointer; - z-index:1000; -} - -.greenlighting_maximize { - width:15px; - height:9px; - background:transparent url(lighting/button-maximize-green.png) no-repeat 0 0; - position:absolute; - top:11px; - right:25px; - cursor:pointer; - z-index:1000; -} - -.greenlighting_minimize { - width:15px; - height:9px; - background:transparent url(lighting/button-minimize-green.png) no-repeat 0 0; - position:absolute; - top:11px; - right:40px; - cursor:pointer; - z-index:1000; -} - -.greenlighting_title { - float:left; - height:14px; - font-size:14px; - font-weight:bold; - font-family:Verdana, Arial, sans-serif; - text-align:center; - margin-top:2px; - width:100%; - color:#2A6002; -} - -.greenlighting_content { - overflow:auto; - color:#000; - font-family:Verdana, Arial, sans-serif; - font-size:12px; - background:#ACFCAF; -} - -/* For alert/confirm dialog */ -.greenlighting_window { - border:1px solid #F00; - background:#FFF; - padding:20px; - margin-left:auto; - margin-right:auto; - width:400px; -} - -.greenlighting_message { - font-size:12px; - text-align:center; - width:100%; - padding-bottom:10px; -} - -.greenlighting_buttons { - text-align:center; - width:100%; -} - -.greenlighting_buttons input { - border:1px solid #999; - border-top-color:#CCC; - border-left-color:#CCC; - padding:2px; - background-color:#FFF; - color:#333; - background-image:url(lighting/background_buttons.gif); - background-repeat:repeat-x; - font-family:Verdana, Arial, sans-serif; - font-size:10px; - font-weight:bold; - text-align:center; -} - -.greenlighting_progress { - float:left; - margin:auto; - text-align:center; - width:100%; - height:16px; - background:transparent url('lighting/spinner.gif') no-repeat center center -} - -/* FOR IE */ -* html .greenlighting_nw { - background-color: transparent; - background-image: none; - filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/lighting/top-left-green.png", sizingMethod="crop"); -} - -* html .greenlighting_n { - background-color: transparent; - background-image: none; - filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/lighting/top-middle-green.png", sizingMethod="scale"); -} - -* html .greenlighting_ne { - background-color: transparent; - background-image: none; - filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/lighting/top-right-green.png", sizingMethod="crop"); -} - -* html .greenlighting_w { - background-color: transparent; - background-image: none; - filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/lighting/left-green.png", sizingMethod="scale"); -} - -* html .greenlighting_e { - background-color: transparent; - background-image: none; - filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/lighting/right-green.png", sizingMethod="scale"); -} - -* html .greenlighting_sw { - background-color: transparent; - background-image: none; - filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/lighting/bottom-left-green.png", sizingMethod="crop"); -} - -* html .greenlighting_s { - background-color: transparent; - background-image: none; - filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/lighting/bottom-middle-green.png", sizingMethod="scale"); -} - -* html greenlighting_se, * html .greenlighting_sizer { - background-color: transparent; - background-image: none; - filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/lighting/bottom-right-green.png", sizingMethod="crop"); -} - -* html .greenlighting_close { - background-color: transparent; - background-image: none; - filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/lighting/button-close-green.png", sizingMethod="crop"); -} - -* html .greenlighting_minimize { - background-color: transparent; - background-image: none; - filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/lighting/button-minimize-green.png", sizingMethod="crop"); -} - -* html .greenlighting_maximize { - background-color: transparent; - background-image: none; - filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/lighting/button-maximize-green.png", sizingMethod="crop"); -} - -* html .greenlighting_content { - background:#A4FCA7; -} - - - -.overlay_darkbluelighting { - background-color:#FFF; - filter:alpha(opacity=60); - -moz-opacity:0.6; - opacity:0.6; -} - -.darkbluelighting_wired_frame { - background:#FFF; - filter:alpha(opacity=60); - -moz-opacity:0.6; - opacity:0.6; -} - -.darkbluelighting_nw { - background:transparent url(lighting/top-left-darkblue.png) no-repeat 0 0; - width:9px; - height:28px; -} - -.darkbluelighting_n { - background:transparent url(lighting/top-middle-darkblue.png) repeat-x 0 0; - height:28px; -} - -.darkbluelighting_ne { - background:transparent url(lighting/top-right-darkblue.png) no-repeat 0 0; - width:15px; - height:28px; -} - -.darkbluelighting_w { - background:transparent url(lighting/left-darkblue.png) repeat-y top left; - width:9px; -} - -.darkbluelighting_e { - background:transparent url(lighting/right-darkblue.png) repeat-y top right; - width:15px; -} - -.darkbluelighting_sw { - background:transparent url(lighting/bottom-left-darkblue.png) no-repeat 0 0; - width:9px; - height:15px; -} - -.darkbluelighting_s { - background:transparent url(lighting/bottom-middle-darkblue.png) repeat-x 0 0; - height:15px; -} - -.darkbluelighting_se, .darkbluelighting_sizer { - background:transparent url(lighting/bottom-right-darkblue.png) no-repeat 0 0; - width:15px; - height:15px; -} - -.darkbluelighting_sizer { - cursor:se-resize; -} - -.darkbluelighting_close { - width:15px; - height:9px; - background:transparent url(lighting/button-close-darkblue.png) no-repeat 0 0; - position:absolute; - top:11px; - right:10px; - cursor:pointer; - z-index:1000; -} - -.darkbluelighting_maximize { - width:15px; - height:9px; - background:transparent url(lighting/button-maximize-darkblue.png) no-repeat 0 0; - position:absolute; - top:11px; - right:25px; - cursor:pointer; - z-index:1000; -} - -.darkbluelighting_minimize { - width:15px; - height:9px; - background:transparent url(lighting/button-minimize-darkblue.png) no-repeat 0 0; - position:absolute; - top:11px; - right:40px; - cursor:pointer; - z-index:1000; -} - -.darkbluelighting_title { - float:left; - height:14px; - font-size:14px; - font-weight:bold; - font-family:Verdana, Arial, sans-serif; - text-align:center; - margin-top:2px; - width:100%; - color:#E4EFFD; -} - -.darkbluelighting_content { - overflow:auto; - color:#FFF; - font-family:Verdana, Arial, sans-serif; - font-size:12px; - background:#0413C0; -} - -/* For alert/confirm dialog */ -.darkbluelighting_window { - border:1px solid #F00; - background:#FFF; - padding:20px; - margin-left:auto; - margin-right:auto; - width:400px; -} - -.darkbluelighting_message { - font-size:12px; - text-align:center; - width:100%; - padding-bottom:10px; -} - -.darkbluelighting_buttons { - text-align:center; - width:100%; -} - -.darkbluelighting_buttons input { - border:1px solid #999; - border-top-color:#CCC; - border-left-color:#CCC; - padding:2px; - background-color:#FFF; - color:#333; - background-image:url(lighting/background_buttons.gif); - background-repeat:repeat-x; - font-family:Verdana, Arial, sans-serif; - font-size:10px; - font-weight:bold; - text-align:center; -} - -.darkbluelighting_progress { - float:left; - margin:auto; - text-align:center; - width:100%; - height:16px; - background:transparent url('lighting/spinner.gif') no-repeat center center -} - -/* FOR IE */ -* html .darkbluelighting_nw { - background-color: transparent; - background-image: none; - filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/lighting/top-left-darkblue.png", sizingMethod="crop"); -} - -* html .darkbluelighting_n { - background-color: transparent; - background-image: none; - filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/lighting/top-middle-darkblue.png", sizingMethod="scale"); -} - -* html .darkbluelighting_ne { - background-color: transparent; - background-image: none; - filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/lighting/top-right-darkblue.png", sizingMethod="crop"); -} - -* html .darkbluelighting_w { - background-color: transparent; - background-image: none; - filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/lighting/left-darkblue.png", sizingMethod="scale"); -} - -* html .darkbluelighting_e { - background-color: transparent; - background-image: none; - filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/lighting/right-darkblue.png", sizingMethod="scale"); -} - -* html .darkbluelighting_sw { - background-color: transparent; - background-image: none; - filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/lighting/bottom-left-darkblue.png", sizingMethod="crop"); -} - -* html .darkbluelighting_s { - background-color: transparent; - background-image: none; - filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/lighting/bottom-middle-darkblue.png", sizingMethod="scale"); -} - -* html darkbluelighting_se, * html .darkbluelighting_sizer { - background-color: transparent; - background-image: none; - filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/lighting/bottom-right-darkblue.png", sizingMethod="crop"); -} - -* html .darkbluelighting_close { - background-color: transparent; - background-image: none; - filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/lighting/button-close-darkblue.png", sizingMethod="crop"); -} - -* html .darkbluelighting_minimize { - background-color: transparent; - background-image: none; - filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/lighting/button-minimize-darkblue.png", sizingMethod="crop"); -} - -* html .darkbluelighting_maximize { - background-color: transparent; - background-image: none; - filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/lighting/button-maximize-darkblue.png", sizingMethod="crop"); -} - -* html .darkbluelighting_content { - background:#020EBA; -} - +.overlay___invisible__ { + background-color: #666; + filter:alpha(opacity=0); + -moz-opacity: 0; + opacity: 0; +} + +.top_draggable, .bottom_draggable { + cursor:move; +} + +.status_bar { + font-size:12px; +} +.status_bar input{ + font-size:12px; +} + +.wired_frame { + display:block; + position:absolute; + border:1px #000 dashed; +} + + + +.overlay_bluelighting { + background-color:#FFF; + filter:alpha(opacity=60); + -moz-opacity:0.6; + opacity:0.6; +} + +.bluelighting_wired_frame { + background:#FFF; + filter:alpha(opacity=60); + -moz-opacity:0.6; + opacity:0.6; +} + +.bluelighting_nw { + background:transparent url(lighting/top-left-blue.png) no-repeat 0 0; + width:9px; + height:28px; +} + +.bluelighting_n { + background:transparent url(lighting/top-middle-blue.png) repeat-x 0 0; + height:28px; +} + +.bluelighting_ne { + background:transparent url(lighting/top-right-blue.png) no-repeat 0 0; + width:15px; + height:28px; +} + +.bluelighting_w { + background:transparent url(lighting/left-blue.png) repeat-y top left; + width:9px; +} + +.bluelighting_e { + background:transparent url(lighting/right-blue.png) repeat-y top right; + width:15px; +} + +.bluelighting_sw { + background:transparent url(lighting/bottom-left-blue.png) no-repeat 0 0; + width:9px; + height:15px; +} + +.bluelighting_s { + background:transparent url(lighting/bottom-middle-blue.png) repeat-x 0 0; + height:15px; +} + +.bluelighting_se, .bluelighting_sizer { + background:transparent url(lighting/bottom-right-blue.png) no-repeat 0 0; + width:15px; + height:15px; +} + +.bluelighting_sizer { + cursor:se-resize; +} + +.bluelighting_close { + width:15px; + height:9px; + background:transparent url(lighting/button-close-blue.png) no-repeat 0 0; + position:absolute; + top:11px; + right:10px; + cursor:pointer; + z-index:1000; +} + +.bluelighting_maximize { + width:15px; + height:9px; + background:transparent url(lighting/button-maximize-blue.png) no-repeat 0 0; + position:absolute; + top:11px; + right:25px; + cursor:pointer; + z-index:1000; +} + +.bluelighting_minimize { + width:15px; + height:9px; + background:transparent url(lighting/button-minimize-blue.png) no-repeat 0 0; + position:absolute; + top:11px; + right:40px; + cursor:pointer; + z-index:1000; +} + +.bluelighting_title { + float:left; + height:14px; + font-size:14px; + font-weight:bold; + font-family:Verdana, Arial, sans-serif; + text-align:center; + margin-top:2px; + width:100%; + color:#17385B; +} + +.bluelighting_content { + overflow:auto; + color:#000; + font-family:Verdana, Arial, sans-serif; + font-size:12px; + background:#BFDBFF; +} + +/* For alert/confirm dialog */ +.bluelighting_window { + border:1px solid #F00; + background:#FFF; + padding:20px; + margin-left:auto; + margin-right:auto; + width:400px; +} + +.bluelighting_message { + font-size:12px; + text-align:center; + width:100%; + padding-bottom:10px; +} + +.bluelighting_buttons { + text-align:center; + width:100%; +} + +.bluelighting_buttons input { + border:1px solid #999; + border-top-color:#CCC; + border-left-color:#CCC; + padding:2px; + background-color:#FFF; + color:#333; + background-image:url(lighting/background_buttons.gif); + background-repeat:repeat-x; + font-family:Verdana, Arial, sans-serif; + font-size:10px; + font-weight:bold; + text-align:center; +} + +.bluelighting_progress { + float:left; + margin:auto; + text-align:center; + width:100%; + height:16px; + background:transparent url('lighting/spinner.gif') no-repeat center center +} + +/* FOR IE */ +* html .bluelighting_nw { + background-color: transparent; + background-image: none; + filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/lighting/top-left-blue.png", sizingMethod="crop"); +} + +* html .bluelighting_n { + background-color: transparent; + background-image: none; + filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/lighting/top-middle-blue.png", sizingMethod="scale"); +} + +* html .bluelighting_ne { + background-color: transparent; + background-image: none; + filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/lighting/top-right-blue.png", sizingMethod="crop"); +} + +* html .bluelighting_w { + background-color: transparent; + background-image: none; + filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/lighting/left-blue.png", sizingMethod="scale"); +} + +* html .bluelighting_e { + background-color: transparent; + background-image: none; + filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/lighting/right-blue.png", sizingMethod="scale"); +} + +* html .bluelighting_sw { + background-color: transparent; + background-image: none; + filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/lighting/bottom-left-blue.png", sizingMethod="crop"); +} + +* html .bluelighting_s { + background-color: transparent; + background-image: none; + filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/lighting/bottom-middle-blue.png", sizingMethod="scale"); +} + +* html .bluelighting_se, * html .bluelighting_sizer { + background-color: transparent; + background-image: none; + filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/lighting/bottom-right-blue.png", sizingMethod="crop"); +} + +* html .bluelighting_close { + background-color: transparent; + background-image: none; + filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/lighting/button-close-blue.png", sizingMethod="crop"); +} + +* html .bluelighting_minimize { + background-color: transparent; + background-image: none; + filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/lighting/button-minimize-blue.png", sizingMethod="crop"); +} + +* html .bluelighting_maximize { + background-color: transparent; + background-image: none; + filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/lighting/button-maximize-blue.png", sizingMethod="crop"); +} + +* html .bluelighting_content { + background:#B8D7FF; +} + + + +.overlay_greylighting { + background-color:#FFF; + filter:alpha(opacity=60); + -moz-opacity:0.6; + opacity:0.6; +} + +.greylighting_wired_frame { + background:#FFF; + filter:alpha(opacity=60); + -moz-opacity:0.6; + opacity:0.6; +} + +.greylighting_nw { + background:transparent url(lighting/top-left-grey.png) no-repeat 0 0; + width:9px; + height:28px; +} + +.greylighting_n { + background:transparent url(lighting/top-middle-grey.png) repeat-x 0 0; + height:28px; +} + +.greylighting_ne { + background:transparent url(lighting/top-right-grey.png) no-repeat 0 0; + width:15px; + height:28px; +} + +.greylighting_w { + background:transparent url(lighting/left-grey.png) repeat-y top left; + width:9px; +} + +.greylighting_e { + background:transparent url(lighting/right-grey.png) repeat-y top right; + width:15px; +} + +.greylighting_sw { + background:transparent url(lighting/bottom-left-grey.png) no-repeat 0 0; + width:9px; + height:15px; +} + +.greylighting_s { + background:transparent url(lighting/bottom-middle-grey.png) repeat-x 0 0; + height:15px; +} + +.greylighting_se, .greylighting_sizer { + background:transparent url(lighting/bottom-right-grey.png) no-repeat 0 0; + width:15px; + height:15px; +} + +.greylighting_sizer { + cursor:se-resize; +} + +.greylighting_close { + width:15px; + height:9px; + background:transparent url(lighting/button-close-grey.png) no-repeat 0 0; + position:absolute; + top:11px; + right:10px; + cursor:pointer; + z-index:1000; +} + +.greylighting_maximize { + width:15px; + height:9px; + background:transparent url(lighting/button-maximize-grey.png) no-repeat 0 0; + position:absolute; + top:11px; + right:25px; + cursor:pointer; + z-index:1000; +} + +.greylighting_minimize { + width:15px; + height:9px; + background:transparent url(lighting/button-minimize-grey.png) no-repeat 0 0; + position:absolute; + top:11px; + right:40px; + cursor:pointer; + z-index:1000; +} + +.greylighting_title { + float:left; + height:14px; + font-size:14px; + font-weight:bold; + font-family:Verdana, Arial, sans-serif; + text-align:center; + margin-top:2px; + width:100%; + color:#525252; +} + +.greylighting_content { + overflow:auto; + color:#000; + font-family:Verdana, Arial, sans-serif; + font-size:12px; + background:#CDCDCD; +} + +/* For alert/confirm dialog */ +.greylighting_window { + border:1px solid #F00; + background:#FFF; + padding:20px; + margin-left:auto; + margin-right:auto; + width:400px; +} + +.greylighting_message { + font-size:12px; + text-align:center; + width:100%; + padding-bottom:10px; +} + +.greylighting_buttons { + text-align:center; + width:100%; +} + +.greylighting_buttons input { + border:1px solid #999; + border-top-color:#CCC; + border-left-color:#CCC; + padding:2px; + background-color:#FFF; + color:#333; + background-image:url(lighting/background_buttons.gif); + background-repeat:repeat-x; + font-family:Verdana, Arial, sans-serif; + font-size:10px; + font-weight:bold; + text-align:center; +} + +.greylighting_progress { + float:left; + margin:auto; + text-align:center; + width:100%; + height:16px; + background:transparent url('lighting/spinner.gif') no-repeat center center +} + +/* FOR IE */ +* html .greylighting_nw { + background-color: transparent; + background-image: none; + filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/lighting/top-left-grey.png", sizingMethod="crop"); +} + +* html .greylighting_n { + background-color: transparent; + background-image: none; + filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/lighting/top-middle-grey.png", sizingMethod="scale"); +} + +* html .greylighting_ne { + background-color: transparent; + background-image: none; + filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/lighting/top-right-grey.png", sizingMethod="crop"); +} + +* html .greylighting_w { + background-color: transparent; + background-image: none; + filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/lighting/left-grey.png", sizingMethod="scale"); +} + +* html .greylighting_e { + background-color: transparent; + background-image: none; + filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/lighting/right-grey.png", sizingMethod="scale"); +} + +* html .greylighting_sw { + background-color: transparent; + background-image: none; + filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/lighting/bottom-left-grey.png", sizingMethod="crop"); +} + +* html .greylighting_s { + background-color: transparent; + background-image: none; + filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/lighting/bottom-middle-grey.png", sizingMethod="scale"); +} + +* html greylighting_se, * html .greylighting_sizer { + background-color: transparent; + background-image: none; + filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/lighting/bottom-right-grey.png", sizingMethod="crop"); +} + +* html .greylighting_close { + background-color: transparent; + background-image: none; + filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/lighting/button-close-grey.png", sizingMethod="crop"); +} + +* html .greylighting_minimize { + background-color: transparent; + background-image: none; + filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/lighting/button-minimize-grey.png", sizingMethod="crop"); +} + +* html .greylighting_maximize { + background-color: transparent; + background-image: none; + filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/lighting/button-maximize-grey.png", sizingMethod="crop"); +} + +* html .greylighting_content { + background:#C7C7C7; +} + + + +.overlay_greenlighting { + background-color:#FFF; + filter:alpha(opacity=60); + -moz-opacity:0.6; + opacity:0.6; +} + +.greenlighting_wired_frame { + background:#FFF; + filter:alpha(opacity=60); + -moz-opacity:0.6; + opacity:0.6; +} + +.greenlighting_nw { + background:transparent url(lighting/top-left-green.png) no-repeat 0 0; + width:9px; + height:28px; +} + +.greenlighting_n { + background:transparent url(lighting/top-middle-green.png) repeat-x 0 0; + height:28px; +} + +.greenlighting_ne { + background:transparent url(lighting/top-right-green.png) no-repeat 0 0; + width:15px; + height:28px; +} + +.greenlighting_w { + background:transparent url(lighting/left-green.png) repeat-y top left; + width:9px; +} + +.greenlighting_e { + background:transparent url(lighting/right-green.png) repeat-y top right; + width:15px; +} + +.greenlighting_sw { + background:transparent url(lighting/bottom-left-green.png) no-repeat 0 0; + width:9px; + height:15px; +} + +.greenlighting_s { + background:transparent url(lighting/bottom-middle-green.png) repeat-x 0 0; + height:15px; +} + +.greenlighting_se, .greenlighting_sizer { + background:transparent url(lighting/bottom-right-green.png) no-repeat 0 0; + width:15px; + height:15px; +} + +.greenlighting_sizer { + cursor:se-resize; +} + +.greenlighting_close { + width:15px; + height:9px; + background:transparent url(lighting/button-close-green.png) no-repeat 0 0; + position:absolute; + top:11px; + right:10px; + cursor:pointer; + z-index:1000; +} + +.greenlighting_maximize { + width:15px; + height:9px; + background:transparent url(lighting/button-maximize-green.png) no-repeat 0 0; + position:absolute; + top:11px; + right:25px; + cursor:pointer; + z-index:1000; +} + +.greenlighting_minimize { + width:15px; + height:9px; + background:transparent url(lighting/button-minimize-green.png) no-repeat 0 0; + position:absolute; + top:11px; + right:40px; + cursor:pointer; + z-index:1000; +} + +.greenlighting_title { + float:left; + height:14px; + font-size:14px; + font-weight:bold; + font-family:Verdana, Arial, sans-serif; + text-align:center; + margin-top:2px; + width:100%; + color:#2A6002; +} + +.greenlighting_content { + overflow:auto; + color:#000; + font-family:Verdana, Arial, sans-serif; + font-size:12px; + background:#ACFCAF; +} + +/* For alert/confirm dialog */ +.greenlighting_window { + border:1px solid #F00; + background:#FFF; + padding:20px; + margin-left:auto; + margin-right:auto; + width:400px; +} + +.greenlighting_message { + font-size:12px; + text-align:center; + width:100%; + padding-bottom:10px; +} + +.greenlighting_buttons { + text-align:center; + width:100%; +} + +.greenlighting_buttons input { + border:1px solid #999; + border-top-color:#CCC; + border-left-color:#CCC; + padding:2px; + background-color:#FFF; + color:#333; + background-image:url(lighting/background_buttons.gif); + background-repeat:repeat-x; + font-family:Verdana, Arial, sans-serif; + font-size:10px; + font-weight:bold; + text-align:center; +} + +.greenlighting_progress { + float:left; + margin:auto; + text-align:center; + width:100%; + height:16px; + background:transparent url('lighting/spinner.gif') no-repeat center center +} + +/* FOR IE */ +* html .greenlighting_nw { + background-color: transparent; + background-image: none; + filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/lighting/top-left-green.png", sizingMethod="crop"); +} + +* html .greenlighting_n { + background-color: transparent; + background-image: none; + filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/lighting/top-middle-green.png", sizingMethod="scale"); +} + +* html .greenlighting_ne { + background-color: transparent; + background-image: none; + filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/lighting/top-right-green.png", sizingMethod="crop"); +} + +* html .greenlighting_w { + background-color: transparent; + background-image: none; + filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/lighting/left-green.png", sizingMethod="scale"); +} + +* html .greenlighting_e { + background-color: transparent; + background-image: none; + filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/lighting/right-green.png", sizingMethod="scale"); +} + +* html .greenlighting_sw { + background-color: transparent; + background-image: none; + filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/lighting/bottom-left-green.png", sizingMethod="crop"); +} + +* html .greenlighting_s { + background-color: transparent; + background-image: none; + filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/lighting/bottom-middle-green.png", sizingMethod="scale"); +} + +* html greenlighting_se, * html .greenlighting_sizer { + background-color: transparent; + background-image: none; + filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/lighting/bottom-right-green.png", sizingMethod="crop"); +} + +* html .greenlighting_close { + background-color: transparent; + background-image: none; + filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/lighting/button-close-green.png", sizingMethod="crop"); +} + +* html .greenlighting_minimize { + background-color: transparent; + background-image: none; + filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/lighting/button-minimize-green.png", sizingMethod="crop"); +} + +* html .greenlighting_maximize { + background-color: transparent; + background-image: none; + filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/lighting/button-maximize-green.png", sizingMethod="crop"); +} + +* html .greenlighting_content { + background:#A4FCA7; +} + + + +.overlay_darkbluelighting { + background-color:#FFF; + filter:alpha(opacity=60); + -moz-opacity:0.6; + opacity:0.6; +} + +.darkbluelighting_wired_frame { + background:#FFF; + filter:alpha(opacity=60); + -moz-opacity:0.6; + opacity:0.6; +} + +.darkbluelighting_nw { + background:transparent url(lighting/top-left-darkblue.png) no-repeat 0 0; + width:9px; + height:28px; +} + +.darkbluelighting_n { + background:transparent url(lighting/top-middle-darkblue.png) repeat-x 0 0; + height:28px; +} + +.darkbluelighting_ne { + background:transparent url(lighting/top-right-darkblue.png) no-repeat 0 0; + width:15px; + height:28px; +} + +.darkbluelighting_w { + background:transparent url(lighting/left-darkblue.png) repeat-y top left; + width:9px; +} + +.darkbluelighting_e { + background:transparent url(lighting/right-darkblue.png) repeat-y top right; + width:15px; +} + +.darkbluelighting_sw { + background:transparent url(lighting/bottom-left-darkblue.png) no-repeat 0 0; + width:9px; + height:15px; +} + +.darkbluelighting_s { + background:transparent url(lighting/bottom-middle-darkblue.png) repeat-x 0 0; + height:15px; +} + +.darkbluelighting_se, .darkbluelighting_sizer { + background:transparent url(lighting/bottom-right-darkblue.png) no-repeat 0 0; + width:15px; + height:15px; +} + +.darkbluelighting_sizer { + cursor:se-resize; +} + +.darkbluelighting_close { + width:15px; + height:9px; + background:transparent url(lighting/button-close-darkblue.png) no-repeat 0 0; + position:absolute; + top:11px; + right:10px; + cursor:pointer; + z-index:1000; +} + +.darkbluelighting_maximize { + width:15px; + height:9px; + background:transparent url(lighting/button-maximize-darkblue.png) no-repeat 0 0; + position:absolute; + top:11px; + right:25px; + cursor:pointer; + z-index:1000; +} + +.darkbluelighting_minimize { + width:15px; + height:9px; + background:transparent url(lighting/button-minimize-darkblue.png) no-repeat 0 0; + position:absolute; + top:11px; + right:40px; + cursor:pointer; + z-index:1000; +} + +.darkbluelighting_title { + float:left; + height:14px; + font-size:14px; + font-weight:bold; + font-family:Verdana, Arial, sans-serif; + text-align:center; + margin-top:2px; + width:100%; + color:#E4EFFD; +} + +.darkbluelighting_content { + overflow:auto; + color:#FFF; + font-family:Verdana, Arial, sans-serif; + font-size:12px; + background:#0413C0; +} + +/* For alert/confirm dialog */ +.darkbluelighting_window { + border:1px solid #F00; + background:#FFF; + padding:20px; + margin-left:auto; + margin-right:auto; + width:400px; +} + +.darkbluelighting_message { + font-size:12px; + text-align:center; + width:100%; + padding-bottom:10px; +} + +.darkbluelighting_buttons { + text-align:center; + width:100%; +} + +.darkbluelighting_buttons input { + border:1px solid #999; + border-top-color:#CCC; + border-left-color:#CCC; + padding:2px; + background-color:#FFF; + color:#333; + background-image:url(lighting/background_buttons.gif); + background-repeat:repeat-x; + font-family:Verdana, Arial, sans-serif; + font-size:10px; + font-weight:bold; + text-align:center; +} + +.darkbluelighting_progress { + float:left; + margin:auto; + text-align:center; + width:100%; + height:16px; + background:transparent url('lighting/spinner.gif') no-repeat center center +} + +/* FOR IE */ +* html .darkbluelighting_nw { + background-color: transparent; + background-image: none; + filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/lighting/top-left-darkblue.png", sizingMethod="crop"); +} + +* html .darkbluelighting_n { + background-color: transparent; + background-image: none; + filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/lighting/top-middle-darkblue.png", sizingMethod="scale"); +} + +* html .darkbluelighting_ne { + background-color: transparent; + background-image: none; + filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/lighting/top-right-darkblue.png", sizingMethod="crop"); +} + +* html .darkbluelighting_w { + background-color: transparent; + background-image: none; + filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/lighting/left-darkblue.png", sizingMethod="scale"); +} + +* html .darkbluelighting_e { + background-color: transparent; + background-image: none; + filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/lighting/right-darkblue.png", sizingMethod="scale"); +} + +* html .darkbluelighting_sw { + background-color: transparent; + background-image: none; + filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/lighting/bottom-left-darkblue.png", sizingMethod="crop"); +} + +* html .darkbluelighting_s { + background-color: transparent; + background-image: none; + filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/lighting/bottom-middle-darkblue.png", sizingMethod="scale"); +} + +* html darkbluelighting_se, * html .darkbluelighting_sizer { + background-color: transparent; + background-image: none; + filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/lighting/bottom-right-darkblue.png", sizingMethod="crop"); +} + +* html .darkbluelighting_close { + background-color: transparent; + background-image: none; + filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/lighting/button-close-darkblue.png", sizingMethod="crop"); +} + +* html .darkbluelighting_minimize { + background-color: transparent; + background-image: none; + filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/lighting/button-minimize-darkblue.png", sizingMethod="crop"); +} + +* html .darkbluelighting_maximize { + background-color: transparent; + background-image: none; + filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/lighting/button-maximize-darkblue.png", sizingMethod="crop"); +} + +* html .darkbluelighting_content { + background:#020EBA; +} + diff --git a/public/plugin_assets/redmine_code_review/stylesheets/window_js/lighting/pngbehavior.htc b/public/plugin_assets/redmine_code_review/stylesheets/window_js/lighting/pngbehavior.htc index 36ea182e7..92248c665 100644 --- a/public/plugin_assets/redmine_code_review/stylesheets/window_js/lighting/pngbehavior.htc +++ b/public/plugin_assets/redmine_code_review/stylesheets/window_js/lighting/pngbehavior.htc @@ -1,67 +1,67 @@ - - - - \ No newline at end of file diff --git a/app/views/users/_resources_list.html.erb b/app/views/users/_resources_list.html.erb index ebe111507..720fed133 100644 --- a/app/views/users/_resources_list.html.erb +++ b/app/views/users/_resources_list.html.erb @@ -11,13 +11,22 @@
  • <%= link_to truncate(attach.filename, :length => 30), download_named_attachment_path(attach.id, attach.filename), :title => attach.filename, :class => 'resourcesBlack resource-list-middle hidden mw280' %> - <% if attach.is_public == 0 && @type == "6" %> + <% if attach.is_public == 0 && @type == "6" && attach.author != User.current %> 私有 <% end %>
  • - <% if attach.is_public == 0 && @type == "6" %> - 请求分享 + <% if attach.is_public == 0 && @type == "6" && attach.author != User.current %> + <% ah = attach.get_status_by_attach(attach.author_id) %> + <% if ah.nil? %> + <%= link_to("请求分享", apply_resource_user_path(User.current.id, :attachment_id => attach.id), :class => 'green_btn_share c_white', :remote => true) %> + <% elsif ah.status == 1 %> + 等待回复 + <% elsif ah.status == 2 %> + 可引用 + <% elsif ah.status == 3 %> + 已拒绝 + <% end %> <% else %> -- <% end %> diff --git a/app/views/users/apply_for_resource.js.erb b/app/views/users/apply_for_resource.js.erb new file mode 100644 index 000000000..c37632810 --- /dev/null +++ b/app/views/users/apply_for_resource.js.erb @@ -0,0 +1,15 @@ +<% if @state == 1 %> +hideModal(); +alert("您还未登录,请先登录"); +<% elsif @state == 2 %> +$("#ajax-modal").html('<%= escape_javascript( render :partial => 'users/apply_for_resource', :locals => {:attachment => @attachment, :state => @state}) %>'); +showModal('ajax-modal', '500px'); +$('#ajax-modal').siblings().remove(); +$('#ajax-modal').before("" + + ""); +$('#ajax-modal').parent().css("top","30%").css("left","50%").css("position","fixed").css("border","3px solid #269ac9"); +$("#homework_apply_status_<%= @attachment.id %>").html("等待回复"); +<% elsif @state == 3 %> +hideModal(); +alert("您已申请过该资源"); +<% end %> \ No newline at end of file diff --git a/app/views/users/apply_resource.js.erb b/app/views/users/apply_resource.js.erb new file mode 100644 index 000000000..62afcfd48 --- /dev/null +++ b/app/views/users/apply_resource.js.erb @@ -0,0 +1,10 @@ +<% if @state == 1 %> +alert("您还未登录"); +<% elsif @state == 2 %> +$("#ajax-modal").html('<%= escape_javascript( render :partial => 'users/apply_resource', :locals => {:attachment => @attachment}) %>'); +showModal('ajax-modal', '500px'); +$('#ajax-modal').siblings().remove(); +$('#ajax-modal').before("" + + ""); +$('#ajax-modal').parent().css("top","30%").css("left","30%").css("position","fixed").css("border","3px solid #269ac9"); +<% end %> \ No newline at end of file diff --git a/app/views/users/user_resource.html.erb b/app/views/users/user_resource.html.erb index 9420fa3ff..f7e239d97 100644 --- a/app/views/users/user_resource.html.erb +++ b/app/views/users/user_resource.html.erb @@ -56,7 +56,7 @@ 我的资源
  • - 私有资源 + 私有资源
  •  
  • diff --git a/config/routes.rb b/config/routes.rb index 6554d1779..85e3198a3 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -561,6 +561,7 @@ RedmineApp::Application.routes.draw do match 'apply_homework', :to => 'users#apply_homework', :via => :get match 'user_homeworks', :to => 'users#user_homeworks', :via => :get match 'student_homeworks', :to => 'users#student_homeworks', :via => :get + get 'apply_resource' get 'user_import_homeworks' get 'user_search_homeworks' get 'choose_user_course' @@ -630,6 +631,7 @@ RedmineApp::Application.routes.draw do get 'user_ref_homework_search' get 'show_homework_detail' post 'apply_for_homework' + post 'apply_for_resource' # end end #resources :blogs diff --git a/db/migrate/20160517091224_create_apply_resources.rb b/db/migrate/20160517091224_create_apply_resources.rb new file mode 100644 index 000000000..8e2516966 --- /dev/null +++ b/db/migrate/20160517091224_create_apply_resources.rb @@ -0,0 +1,11 @@ +class CreateApplyResources < ActiveRecord::Migration + def change + create_table :apply_resources do |t| + t.integer :status + t.integer :user_id + t.integer :attachment_id + + t.timestamps + end + end +end diff --git a/db/migrate/20160518031514_add_column_to_apply_resource.rb b/db/migrate/20160518031514_add_column_to_apply_resource.rb new file mode 100644 index 000000000..164bad7b7 --- /dev/null +++ b/db/migrate/20160518031514_add_column_to_apply_resource.rb @@ -0,0 +1,6 @@ +class AddColumnToApplyResource < ActiveRecord::Migration + def change + add_column :apply_resources, :container_id, :integer + add_column :apply_resources, :container_type, :string + end +end diff --git a/db/migrate/20160518060243_add_column_content_to_apply_resource.rb b/db/migrate/20160518060243_add_column_content_to_apply_resource.rb new file mode 100644 index 000000000..e741527e0 --- /dev/null +++ b/db/migrate/20160518060243_add_column_content_to_apply_resource.rb @@ -0,0 +1,6 @@ +class AddColumnContentToApplyResource < ActiveRecord::Migration + def change + add_column :apply_resources, :content, :text + add_column :apply_resources, :apply_user_id, :integer + end +end diff --git a/db/schema.rb b/db/schema.rb index 092252062..58cb9b8ae 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -11,7 +11,7 @@ # # It's strongly recommended to check this file into your version control system. -ActiveRecord::Schema.define(:version => 20160513120002) do +ActiveRecord::Schema.define(:version => 20160518060243) do create_table "activities", :force => true do |t| t.integer "act_id", :null => false @@ -52,6 +52,28 @@ ActiveRecord::Schema.define(:version => 20160513120002) do add_index "api_keys", ["access_token"], :name => "index_api_keys_on_access_token" add_index "api_keys", ["user_id"], :name => "index_api_keys_on_user_id" + create_table "application_settings", :force => true do |t| + t.integer "default_projects_limit" + t.boolean "signup_enabled" + t.boolean "signin_enabled" + t.boolean "gravatar_enabled" + t.text "sign_in_text" + t.datetime "created_at" + t.datetime "updated_at" + t.string "home_page_url" + t.integer "default_branch_protection", :default => 2 + t.boolean "twitter_sharing_enabled", :default => true + t.text "restricted_visibility_levels" + t.boolean "version_check_enabled", :default => true + t.integer "max_attachment_size", :default => 10, :null => false + t.integer "default_project_visibility" + t.integer "default_snippet_visibility" + t.text "restricted_signup_domains" + t.boolean "user_oauth_applications", :default => true + t.string "after_sign_out_path" + t.integer "session_expire_delay", :default => 10080, :null => false + end + create_table "applied_projects", :force => true do |t| t.integer "project_id", :null => false t.integer "user_id", :null => false @@ -77,6 +99,18 @@ ActiveRecord::Schema.define(:version => 20160513120002) do t.datetime "updated_at", :null => false end + create_table "apply_resources", :force => true do |t| + t.integer "status" + t.integer "user_id" + t.integer "attachment_id" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + t.integer "container_id" + t.string "container_type" + t.text "content" + t.integer "apply_user_id" + end + create_table "at_messages", :force => true do |t| t.integer "user_id" t.integer "at_message_id" @@ -144,6 +178,20 @@ ActiveRecord::Schema.define(:version => 20160513120002) do t.string "typeName", :limit => 50 end + create_table "audit_events", :force => true do |t| + t.integer "author_id", :null => false + t.string "type", :null => false + t.integer "entity_id", :null => false + t.string "entity_type", :null => false + t.text "details" + t.datetime "created_at" + t.datetime "updated_at" + end + + add_index "audit_events", ["author_id"], :name => "index_audit_events_on_author_id" + add_index "audit_events", ["entity_id", "entity_type"], :name => "index_audit_events_on_entity_id_and_entity_type" + add_index "audit_events", ["type"], :name => "index_audit_events_on_type" + create_table "auth_sources", :force => true do |t| t.string "type", :limit => 30, :default => "", :null => false t.string "name", :limit => 60, :default => "", :null => false @@ -241,6 +289,17 @@ ActiveRecord::Schema.define(:version => 20160513120002) do add_index "boards", ["last_message_id"], :name => "index_boards_on_last_message_id" add_index "boards", ["project_id"], :name => "boards_project_id" + create_table "broadcast_messages", :force => true do |t| + t.text "message", :null => false + t.datetime "starts_at" + t.datetime "ends_at" + t.integer "alert_type" + t.datetime "created_at" + t.datetime "updated_at" + t.string "color" + t.string "font" + end + create_table "bug_to_osps", :force => true do |t| t.integer "osp_id" t.integer "relative_memo_id" @@ -540,6 +599,10 @@ ActiveRecord::Schema.define(:version => 20160513120002) do t.integer "visits", :default => 0 end + add_index "courses", ["id"], :name => "id", :unique => true + add_index "courses", ["tea_id"], :name => "tea_id" + add_index "courses", ["visits"], :name => "visits" + create_table "custom_fields", :force => true do |t| t.string "type", :limit => 30, :default => "", :null => false t.string "name", :limit => 30, :default => "", :null => false @@ -601,6 +664,15 @@ ActiveRecord::Schema.define(:version => 20160513120002) do add_index "delayed_jobs", ["priority", "run_at"], :name => "delayed_jobs_priority" + create_table "deploy_keys_projects", :force => true do |t| + t.integer "deploy_key_id", :null => false + t.integer "project_id", :null => false + t.datetime "created_at" + t.datetime "updated_at" + end + + add_index "deploy_keys_projects", ["project_id"], :name => "index_deploy_keys_projects_on_project_id" + create_table "discuss_demos", :force => true do |t| t.string "title" t.text "body" @@ -650,6 +722,16 @@ ActiveRecord::Schema.define(:version => 20160513120002) do t.datetime "created_at" end + create_table "emails", :force => true do |t| + t.integer "user_id", :null => false + t.string "email", :null => false + t.datetime "created_at" + t.datetime "updated_at" + end + + add_index "emails", ["email"], :name => "index_emails_on_email", :unique => true + add_index "emails", ["user_id"], :name => "index_emails_on_user_id" + create_table "enabled_modules", :force => true do |t| t.integer "project_id" t.string "name", :null => false @@ -672,6 +754,25 @@ ActiveRecord::Schema.define(:version => 20160513120002) do add_index "enumerations", ["id", "type"], :name => "index_enumerations_on_id_and_type" add_index "enumerations", ["project_id"], :name => "index_enumerations_on_project_id" + create_table "events", :force => true do |t| + t.string "target_type" + t.integer "target_id" + t.string "title" + t.text "data" + t.integer "project_id" + t.datetime "created_at" + t.datetime "updated_at" + t.integer "action" + t.integer "author_id" + end + + add_index "events", ["action"], :name => "index_events_on_action" + add_index "events", ["author_id"], :name => "index_events_on_author_id" + add_index "events", ["created_at"], :name => "index_events_on_created_at" + add_index "events", ["project_id"], :name => "index_events_on_project_id" + add_index "events", ["target_id"], :name => "index_events_on_target_id" + add_index "events", ["target_type"], :name => "index_events_on_target_type" + create_table "exercise_answers", :force => true do |t| t.integer "user_id" t.integer "exercise_question_id" @@ -774,6 +875,15 @@ ActiveRecord::Schema.define(:version => 20160513120002) do add_index "forge_messages", ["forge_message_id", "forge_message_type"], :name => "index_forge_messages_on_forge_message_id_and_forge_message_type" add_index "forge_messages", ["user_id", "project_id", "created_at"], :name => "index_forge_messages_on_user_id_and_project_id_and_created_at" + create_table "forked_project_links", :force => true do |t| + t.integer "forked_to_project_id", :null => false + t.integer "forked_from_project_id", :null => false + t.datetime "created_at" + t.datetime "updated_at" + end + + add_index "forked_project_links", ["forked_to_project_id"], :name => "index_forked_project_links_on_forked_to_project_id", :unique => true + create_table "forums", :force => true do |t| t.string "name", :null => false t.text "description" @@ -903,6 +1013,17 @@ ActiveRecord::Schema.define(:version => 20160513120002) do t.datetime "updated_at", :null => false end + create_table "identities", :force => true do |t| + t.string "extern_uid" + t.string "provider" + t.integer "user_id" + t.datetime "created_at" + t.datetime "updated_at" + end + + add_index "identities", ["created_at", "id"], :name => "index_identities_on_created_at_and_id" + add_index "identities", ["user_id"], :name => "index_identities_on_user_id" + create_table "invite_lists", :force => true do |t| t.integer "project_id" t.integer "user_id" @@ -1046,6 +1167,20 @@ ActiveRecord::Schema.define(:version => 20160513120002) do t.integer "private", :default => 0 end + create_table "keys", :force => true do |t| + t.integer "user_id" + t.datetime "created_at" + t.datetime "updated_at" + t.text "key" + t.string "title" + t.string "type" + t.string "fingerprint" + t.boolean "public", :default => false, :null => false + end + + add_index "keys", ["created_at", "id"], :name => "index_keys_on_created_at_and_id" + add_index "keys", ["user_id"], :name => "index_keys_on_user_id" + create_table "kindeditor_assets", :force => true do |t| t.string "asset" t.integer "file_size" @@ -1057,6 +1192,27 @@ ActiveRecord::Schema.define(:version => 20160513120002) do t.integer "owner_type", :default => 0 end + create_table "label_links", :force => true do |t| + t.integer "label_id" + t.integer "target_id" + t.string "target_type" + t.datetime "created_at" + t.datetime "updated_at" + end + + add_index "label_links", ["label_id"], :name => "index_label_links_on_label_id" + add_index "label_links", ["target_id", "target_type"], :name => "index_label_links_on_target_id_and_target_type" + + create_table "labels", :force => true do |t| + t.string "title" + t.string "color" + t.integer "project_id" + t.datetime "created_at" + t.datetime "updated_at" + end + + add_index "labels", ["project_id"], :name => "index_labels_on_project_id" + create_table "member_roles", :force => true do |t| t.integer "member_id", :null => false t.integer "role_id", :null => false @@ -1107,23 +1263,47 @@ ActiveRecord::Schema.define(:version => 20160513120002) do t.integer "viewed_count", :default => 0 end - create_table "mess", :id => false, :force => true do |t| - t.string "课程名" - t.integer "课程ID", :default => 0, :null => false - t.string "教师姓", :default => "", :null => false - t.string "教师名", :limit => 30, :default => "", :null => false - t.string "主贴名", :default => "", :null => false - t.integer "主贴或回帖ID", :default => 0, :null => false - t.integer "回帖对应主贴ID" - t.integer "帖子点赞数" - t.integer "主贴回复数", :default => 0, :null => false - t.text "主贴或回帖内容" - t.datetime "发帖时间", :null => false - t.integer "发帖或回帖用户ID", :default => 0, :null => false - t.string "发帖或回帖用户姓", :default => "", :null => false - t.string "发帖或回帖用户名", :limit => 30, :default => "", :null => false + create_table "merge_request_diffs", :force => true do |t| + t.string "state" + t.text "st_commits", :limit => 2147483647 + t.text "st_diffs", :limit => 2147483647 + t.integer "merge_request_id", :null => false + t.datetime "created_at" + t.datetime "updated_at" end + add_index "merge_request_diffs", ["merge_request_id"], :name => "index_merge_request_diffs_on_merge_request_id", :unique => true + + create_table "merge_requests", :force => true do |t| + t.string "target_branch", :null => false + t.string "source_branch", :null => false + t.integer "source_project_id", :null => false + t.integer "author_id" + t.integer "assignee_id" + t.string "title" + t.datetime "created_at" + t.datetime "updated_at" + t.integer "milestone_id" + t.string "state" + t.string "merge_status" + t.integer "target_project_id", :null => false + t.integer "iid" + t.text "description" + t.integer "position", :default => 0 + t.datetime "locked_at" + end + + add_index "merge_requests", ["assignee_id"], :name => "index_merge_requests_on_assignee_id" + add_index "merge_requests", ["author_id"], :name => "index_merge_requests_on_author_id" + add_index "merge_requests", ["created_at", "id"], :name => "index_merge_requests_on_created_at_and_id" + add_index "merge_requests", ["created_at"], :name => "index_merge_requests_on_created_at" + add_index "merge_requests", ["milestone_id"], :name => "index_merge_requests_on_milestone_id" + add_index "merge_requests", ["source_branch"], :name => "index_merge_requests_on_source_branch" + add_index "merge_requests", ["source_project_id"], :name => "index_merge_requests_on_source_project_id" + add_index "merge_requests", ["target_branch"], :name => "index_merge_requests_on_target_branch" + add_index "merge_requests", ["target_project_id", "iid"], :name => "index_merge_requests_on_target_project_id_and_iid", :unique => true + add_index "merge_requests", ["title"], :name => "index_merge_requests_on_title" + create_table "message_alls", :force => true do |t| t.integer "user_id" t.integer "message_id" @@ -1158,6 +1338,39 @@ ActiveRecord::Schema.define(:version => 20160513120002) do add_index "messages", ["last_reply_id"], :name => "index_messages_on_last_reply_id" add_index "messages", ["parent_id"], :name => "messages_parent_id" + create_table "milestones", :force => true do |t| + t.string "title", :null => false + t.integer "project_id", :null => false + t.text "description" + t.date "due_date" + t.datetime "created_at" + t.datetime "updated_at" + t.string "state" + t.integer "iid" + end + + add_index "milestones", ["created_at", "id"], :name => "index_milestones_on_created_at_and_id" + add_index "milestones", ["due_date"], :name => "index_milestones_on_due_date" + add_index "milestones", ["project_id", "iid"], :name => "index_milestones_on_project_id_and_iid", :unique => true + add_index "milestones", ["project_id"], :name => "index_milestones_on_project_id" + + create_table "namespaces", :force => true do |t| + t.string "name", :null => false + t.string "path", :null => false + t.integer "owner_id" + t.datetime "created_at" + t.datetime "updated_at" + t.string "type" + t.string "description", :default => "", :null => false + t.string "avatar" + end + + add_index "namespaces", ["created_at", "id"], :name => "index_namespaces_on_created_at_and_id" + add_index "namespaces", ["name"], :name => "index_namespaces_on_name", :unique => true + add_index "namespaces", ["owner_id"], :name => "index_namespaces_on_owner_id" + add_index "namespaces", ["path"], :name => "index_namespaces_on_path", :unique => true + add_index "namespaces", ["type"], :name => "index_namespaces_on_type" + create_table "news", :force => true do |t| t.integer "project_id" t.string "title", :limit => 60, :default => "", :null => false @@ -1183,6 +1396,31 @@ ActiveRecord::Schema.define(:version => 20160513120002) do t.datetime "updated_at", :null => false end + create_table "notes", :force => true do |t| + t.text "note" + t.string "noteable_type" + t.integer "author_id" + t.datetime "created_at" + t.datetime "updated_at" + t.integer "project_id" + t.string "attachment" + t.string "line_code" + t.string "commit_id" + t.integer "noteable_id" + t.boolean "system", :default => false, :null => false + t.text "st_diff", :limit => 2147483647 + end + + add_index "notes", ["author_id"], :name => "index_notes_on_author_id" + add_index "notes", ["commit_id"], :name => "index_notes_on_commit_id" + add_index "notes", ["created_at", "id"], :name => "index_notes_on_created_at_and_id" + add_index "notes", ["created_at"], :name => "index_notes_on_created_at" + add_index "notes", ["noteable_id", "noteable_type"], :name => "index_notes_on_noteable_id_and_noteable_type" + add_index "notes", ["noteable_type"], :name => "index_notes_on_noteable_type" + add_index "notes", ["project_id", "noteable_type"], :name => "index_notes_on_project_id_and_noteable_type" + add_index "notes", ["project_id"], :name => "index_notes_on_project_id" + add_index "notes", ["updated_at"], :name => "index_notes_on_updated_at" + create_table "notificationcomments", :force => true do |t| t.string "notificationcommented_type" t.integer "notificationcommented_id" @@ -1192,6 +1430,49 @@ ActiveRecord::Schema.define(:version => 20160513120002) do t.datetime "updated_at", :null => false end + create_table "oauth_access_grants", :force => true do |t| + t.integer "resource_owner_id", :null => false + t.integer "application_id", :null => false + t.string "token", :null => false + t.integer "expires_in", :null => false + t.text "redirect_uri", :null => false + t.datetime "created_at", :null => false + t.datetime "revoked_at" + t.string "scopes" + end + + add_index "oauth_access_grants", ["token"], :name => "index_oauth_access_grants_on_token", :unique => true + + create_table "oauth_access_tokens", :force => true do |t| + t.integer "resource_owner_id" + t.integer "application_id" + t.string "token", :null => false + t.string "refresh_token" + t.integer "expires_in" + t.datetime "revoked_at" + t.datetime "created_at", :null => false + t.string "scopes" + end + + add_index "oauth_access_tokens", ["refresh_token"], :name => "index_oauth_access_tokens_on_refresh_token", :unique => true + add_index "oauth_access_tokens", ["resource_owner_id"], :name => "index_oauth_access_tokens_on_resource_owner_id" + add_index "oauth_access_tokens", ["token"], :name => "index_oauth_access_tokens_on_token", :unique => true + + create_table "oauth_applications", :force => true do |t| + t.string "name", :null => false + t.string "uid", :null => false + t.string "secret", :null => false + t.text "redirect_uri", :null => false + t.string "scopes", :default => "", :null => false + t.datetime "created_at" + t.datetime "updated_at" + t.integer "owner_id" + t.string "owner_type" + end + + add_index "oauth_applications", ["owner_id", "owner_type"], :name => "index_oauth_applications_on_owner_id_and_owner_type" + add_index "oauth_applications", ["uid"], :name => "index_oauth_applications_on_uid", :unique => true + create_table "onclick_times", :force => true do |t| t.integer "user_id" t.datetime "onclick_time" @@ -1348,6 +1629,23 @@ ActiveRecord::Schema.define(:version => 20160513120002) do t.integer "allow_teacher", :default => 0 end + create_table "permissions", :force => true do |t| + t.string "controller", :limit => 30, :default => "", :null => false + t.string "action", :limit => 30, :default => "", :null => false + t.string "description", :limit => 60, :default => "", :null => false + t.boolean "is_public", :default => false, :null => false + t.integer "sort", :default => 0, :null => false + t.boolean "mail_option", :default => false, :null => false + t.boolean "mail_enabled", :default => false, :null => false + end + + create_table "permissions_roles", :id => false, :force => true do |t| + t.integer "permission_id", :default => 0, :null => false + t.integer "role_id", :default => 0, :null => false + end + + add_index "permissions_roles", ["role_id"], :name => "permissions_roles_role_id" + create_table "phone_app_versions", :force => true do |t| t.string "version" t.text "description" @@ -1430,6 +1728,11 @@ ActiveRecord::Schema.define(:version => 20160513120002) do t.datetime "updated_at", :null => false end + create_table "project_import_data", :force => true do |t| + t.integer "project_id" + t.text "data" + end + create_table "project_infos", :force => true do |t| t.integer "project_id" t.integer "user_id" @@ -1519,6 +1822,16 @@ ActiveRecord::Schema.define(:version => 20160513120002) do add_index "projects_trackers", ["project_id", "tracker_id"], :name => "projects_trackers_unique", :unique => true add_index "projects_trackers", ["project_id"], :name => "projects_trackers_project_id" + create_table "protected_branches", :force => true do |t| + t.integer "project_id", :null => false + t.string "name", :null => false + t.datetime "created_at" + t.datetime "updated_at" + t.boolean "developers_can_push", :default => false, :null => false + end + + add_index "protected_branches", ["project_id"], :name => "index_protected_branches_on_project_id" + create_table "queries", :force => true do |t| t.integer "project_id" t.string "name", :default => "", :null => false @@ -1653,6 +1966,25 @@ ActiveRecord::Schema.define(:version => 20160513120002) do t.integer "is_teacher_score", :default => 0 end + create_table "services", :force => true do |t| + t.string "type" + t.string "title" + t.integer "project_id" + t.datetime "created_at" + t.datetime "updated_at" + t.boolean "active", :default => false, :null => false + t.text "properties" + t.boolean "template", :default => false + t.boolean "push_events", :default => true + t.boolean "issues_events", :default => true + t.boolean "merge_requests_events", :default => true + t.boolean "tag_push_events", :default => true + t.boolean "note_events", :default => true, :null => false + end + + add_index "services", ["created_at", "id"], :name => "index_services_on_created_at_and_id" + add_index "services", ["project_id"], :name => "index_services_on_project_id" + create_table "settings", :force => true do |t| t.string "name", :default => "", :null => false t.text "value" @@ -1691,6 +2023,26 @@ ActiveRecord::Schema.define(:version => 20160513120002) do t.datetime "updated_at", :null => false end + create_table "snippets", :force => true do |t| + t.string "title" + t.text "content", :limit => 2147483647 + t.integer "author_id", :null => false + t.integer "project_id" + t.datetime "created_at" + t.datetime "updated_at" + t.string "file_name" + t.datetime "expires_at" + t.string "type" + t.integer "visibility_level", :default => 0, :null => false + end + + add_index "snippets", ["author_id"], :name => "index_snippets_on_author_id" + add_index "snippets", ["created_at", "id"], :name => "index_snippets_on_created_at_and_id" + add_index "snippets", ["created_at"], :name => "index_snippets_on_created_at" + add_index "snippets", ["expires_at"], :name => "index_snippets_on_expires_at" + add_index "snippets", ["project_id"], :name => "index_snippets_on_project_id" + add_index "snippets", ["visibility_level"], :name => "index_snippets_on_visibility_level" + create_table "softapplications", :force => true do |t| t.string "name" t.text "description" @@ -1763,9 +2115,9 @@ ActiveRecord::Schema.define(:version => 20160513120002) do t.integer "absence_penalty", :default => 0 t.float "system_score", :default => 0.0 t.boolean "is_test", :default => false + t.float "work_score" t.integer "simi_id" t.integer "simi_value" - t.float "work_score" end add_index "student_works", ["homework_common_id", "user_id"], :name => "index_student_works_on_homework_common_id_and_user_id" @@ -1813,13 +2165,13 @@ ActiveRecord::Schema.define(:version => 20160513120002) do create_table "sub_domains", :force => true do |t| t.integer "org_subfield_id" - t.integer "priority", :default => 0 + t.integer "priority" t.string "name" t.string "field_type" - t.integer "hide", :default => 0 - t.integer "status", :default => 0 - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false + t.integer "hide" + t.integer "status" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false end create_table "subfield_subdomain_dirs", :force => true do |t| @@ -1829,6 +2181,17 @@ ActiveRecord::Schema.define(:version => 20160513120002) do t.datetime "updated_at", :null => false end + create_table "subscriptions", :force => true do |t| + t.integer "user_id" + t.integer "subscribable_id" + t.string "subscribable_type" + t.boolean "subscribed" + t.datetime "created_at" + t.datetime "updated_at" + end + + add_index "subscriptions", ["subscribable_id", "subscribable_type", "user_id"], :name => "subscriptions_user_id_and_ref_fields", :unique => true + create_table "system_messages", :force => true do |t| t.integer "user_id" t.string "content" @@ -2068,6 +2431,17 @@ ActiveRecord::Schema.define(:version => 20160513120002) do add_index "users", ["id", "type"], :name => "index_users_on_id_and_type" add_index "users", ["type"], :name => "index_users_on_type" + create_table "users_star_projects", :force => true do |t| + t.integer "project_id", :null => false + t.integer "user_id", :null => false + t.datetime "created_at" + t.datetime "updated_at" + end + + add_index "users_star_projects", ["project_id"], :name => "index_users_star_projects_on_project_id" + add_index "users_star_projects", ["user_id", "project_id"], :name => "index_users_star_projects_on_user_id_and_project_id", :unique => true + add_index "users_star_projects", ["user_id"], :name => "index_users_star_projects_on_user_id" + create_table "versions", :force => true do |t| t.integer "project_id", :default => 0, :null => false t.string "name", :default => "", :null => false @@ -2119,6 +2493,23 @@ ActiveRecord::Schema.define(:version => 20160513120002) do t.datetime "updated_at", :null => false end + create_table "web_hooks", :force => true do |t| + t.string "url" + t.integer "project_id" + t.datetime "created_at" + t.datetime "updated_at" + t.string "type", :default => "ProjectHook" + t.integer "service_id" + t.boolean "push_events", :default => true, :null => false + t.boolean "issues_events", :default => false, :null => false + t.boolean "merge_requests_events", :default => false, :null => false + t.boolean "tag_push_events", :default => false + t.boolean "note_events", :default => false, :null => false + end + + add_index "web_hooks", ["created_at", "id"], :name => "index_web_hooks_on_created_at_and_id" + add_index "web_hooks", ["project_id"], :name => "index_web_hooks_on_project_id" + create_table "wechat_logs", :force => true do |t| t.string "openid", :null => false t.text "request_raw" diff --git a/public/stylesheets/public.css b/public/stylesheets/public.css index fcbd79e0b..8489b0fa1 100644 --- a/public/stylesheets/public.css +++ b/public/stylesheets/public.css @@ -1134,3 +1134,6 @@ a.st_down{ display: block; width:8px; float:left; height:13px; background:url(.. .likeText{color: #7f7f7f} .likeNum{color: #7f7f7f} + +/*弹框*/ +.apply_content{ border:1px solid #ddd;line-height: 16px; height:80px;width:420px; background:#fff; margin-bottom:10px;} \ No newline at end of file diff --git a/spec/factories/apply_resources.rb b/spec/factories/apply_resources.rb new file mode 100644 index 000000000..92e48632b --- /dev/null +++ b/spec/factories/apply_resources.rb @@ -0,0 +1,8 @@ +FactoryGirl.define do + factory :apply_resource do + status 1 +user_id 1 +attachment_id 1 + end + +end diff --git a/spec/models/apply_resource_spec.rb b/spec/models/apply_resource_spec.rb new file mode 100644 index 000000000..a0d4b48b1 --- /dev/null +++ b/spec/models/apply_resource_spec.rb @@ -0,0 +1,5 @@ +require 'rails_helper' + +RSpec.describe ApplyResource, :type => :model do + pending "add some examples to (or delete) #{__FILE__}" +end From f3f75a57bdad2096e33b521479061efd4b31b39f Mon Sep 17 00:00:00 2001 From: huang Date: Wed, 18 May 2016 17:37:48 +0800 Subject: [PATCH 09/39] =?UTF-8?q?=E7=94=B3=E8=AF=B7=E8=B5=84=E6=BA=90?= =?UTF-8?q?=E6=B6=88=E6=81=AF=E8=B5=84=E6=BA=90=E5=8F=91=E5=B8=83=E8=BF=99?= =?UTF-8?q?=E6=94=B6=E5=88=B0=E6=B6=88=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/users_controller.rb | 101 ++++++++++++++++-- app/models/apply_resource.rb | 3 +- .../_apply_resource_course_message.html.erb | 29 +++++ app/views/users/_resources_list.html.erb | 10 +- app/views/users/_user_message_course.html.erb | 6 ++ .../users/_user_resource_type_filter.html.erb | 2 +- app/views/users/apply_for_resource.js.erb | 2 +- 7 files changed, 136 insertions(+), 17 deletions(-) create mode 100644 app/views/users/_apply_resource_course_message.html.erb diff --git a/app/controllers/users_controller.rb b/app/controllers/users_controller.rb index dd1d8f876..b6fed88af 100644 --- a/app/controllers/users_controller.rb +++ b/app/controllers/users_controller.rb @@ -311,6 +311,30 @@ class UsersController < ApplicationController end end + # 处理资源引用请求 + # status + def deal_with_apply_resource + @msg = CourseMessage.find(params[:msg_id]) + ah = ApplyHomework.where("user_id = ? and homework_common_id = ?",@msg.apply_user_id, @msg.course_message_id) + case params[:agree] + when 'Y' + unless ah.empty? + ah.first.update_column('status', 2) + CourseMessage.create(:user_id => @msg.apply_user_id, :course_id => @msg.course_id, :viewed => false,:content=> @msg.content,:course_message_id=>@msg.course_message_id,:content=>@msg.content,:course_message_type=>'HomeworkCommon',:status=>6,:apply_result=>1) + @msg.update_attributes(:apply_result=>1,:viewed=>1) + end + when 'N' + unless ah.empty? + ah.first.update_column('status', 3) + CourseMessage.create(:user_id => @msg.apply_user_id, :course_id => @msg.course_id, :viewed => false,:content=> @msg.content,:course_message_id=>@msg.course_message_id,:content=>@msg.content,:course_message_type=>'HomeworkCommon',:status=>6,:apply_result=>2) + @msg.update_attributes(:apply_result=>2,:viewed=>1) + end + end + respond_to do |format| + format.js + end + end + #处理引用作业的请求 #status 1 同意 2 拒绝 def dealwith_apply_homework @@ -419,6 +443,19 @@ class UsersController < ApplicationController end # end + # 资源分享请求弹框 + def apply_resource + if User.current.logged? + @attachment = Attachment.find params[:attachment_id] + @state = 2 + else + @state = 1 + end + respond_to do |format| + format.js + end + end + #引用作业请求弹框 def apply_homework if User.current.logged? @@ -432,6 +469,27 @@ class UsersController < ApplicationController end end + # 申请引用资源 + def apply_for_resource + if User.current.logged? + @attachment = Attachment.where("id =?", params[:attachment_id].to_i).first + unless @attachment.nil? + ar = ApplyResource.where("user_id = ? and attachment_id = ?", User.current.id, params[:attacment_id].to_i) + if ar.empty? + ApplyResource.create(:user_id => params[:id].to_i, :attachment_id => params[:attachment_id].to_i, :status => true, :container_id => @attachment.container_id, :container_type => @attachment.container_type, :content => params[:content], :apply_user_id => @attachment.author_id) + @state = 2 + else + @state = 3 + end + end + else + @state = 1 + end + respond_to do |format| + format.js + end + end + #申请引用非公开作业 def apply_for_homework if User.current.logged? @@ -2608,7 +2666,7 @@ class UsersController < ApplicationController # 获取公共资源 def get_public_resources user_course_ids, user_project_ids, order, score - attachments = Attachment.where("(is_publish = 1 and is_public =1 and container_id is not null and container_type in('Project','OrgSubfield','Principal','Course')) ").order("#{order.nil? ? 'created_on' : order} #{score}") + attachments = Attachment.where("(is_publish = 1 and container_id is not null and container_type in('Project','OrgSubfield','Principal','Course')) ").order("#{order.nil? ? 'created_on' : order} #{score}") end # 获取公共资源搜索 @@ -2637,6 +2695,17 @@ class UsersController < ApplicationController and is_publish = 1 and container_id is not null)" ).order("#{order.nil? ? 'created_on' : order} #{score}") end + # 获取我的私有资源分享结果 + def get_my_private_resources apply_ids, resource_type, order, score + attachments = Attachment.where("id in (#{apply_ids.empty? ? '0': apply_ids.join(',')}) and container_type in(#{resource_type})").order("#{order.nil? ? 'created_on' : order} #{score}") + end + + # 获取我的私有资源分享结果 + def get_course_private_resources author_id, user_course_ids, order, score + apply_id = ApplyResource.where("user_id =?", author_id).map{|ar| ar.attachment_id} + attachments = Attachment.where("user_id =? and attachment_id =?") + end + # 获取我的课程资源中搜索结果 def get_course_resources_search author_id, user_course_ids, order, score, search attchments = Attachment.where("((author_id = #{author_id} and is_publish = 1 and container_id is not null and container_type = 'Course')"+ @@ -2646,12 +2715,12 @@ class UsersController < ApplicationController # 获取公共资源中课程资源 def get_course_resources_public user_course_ids, order, score - attchments = Attachment.where("(container_type = 'Course'and container_id is not null and is_publish = 1 and is_public =1)").order("#{order.nil? ? 'created_on' : order} #{score}") + attchments = Attachment.where("(container_type = 'Course'and container_id is not null and is_publish = 1)").order("#{order.nil? ? 'created_on' : order} #{score}") end # 获取公共资源中课程资源搜索结果 def get_course_resources_public_search user_course_ids, order, score, search - attchments = Attachment.where("(container_type = 'Course'and container_id is not null and is_publish = 1 and is_public =1) and (filename like :p)", :p => search ).order("#{order.nil? ? 'created_on' : order} #{score}") + attchments = Attachment.where("(container_type = 'Course'and container_id is not null and is_publish = 1) and (filename like :p)", :p => search ).order("#{order.nil? ? 'created_on' : order} #{score}") end # 获取我的项目资源 @@ -2670,12 +2739,12 @@ class UsersController < ApplicationController # 获取公共资源的项目资源 def get_project_resources_public user_project_ids, order, score - attchments = Attachment.where("container_type = 'Project' and container_id is not null and is_public =1").order("#{order.nil? ? 'created_on' : order} #{score}") + attchments = Attachment.where("container_type = 'Project' and container_id is not null").order("#{order.nil? ? 'created_on' : order} #{score}") end # 获取公共资源的项目资源搜索 def get_project_resources_public_search user_project_ids, order, score, search - attchments = Attachment.where("(container_type = 'Project' and container_id is not null and is_public =1) and (filename like :p)", :p => search ).order("#{order.nil? ? 'created_on' : order} #{score}") + attchments = Attachment.where("(container_type = 'Project' and container_id is not null) and (filename like :p)", :p => search ).order("#{order.nil? ? 'created_on' : order} #{score}") end # 获取我上传的附件 @@ -2693,13 +2762,13 @@ class UsersController < ApplicationController # 获取公共资源中我上传的附件 def get_attch_resources_public order, score attchments = Attachment.where("container_type in('Issue','Document','Message','News','StudentWorkScore','HomewCommon','OrgSubfield','Principal') - and container_id is not null and is_public =1").order("#{order.nil? ? 'created_on' : order} #{score}") + and container_id is not null").order("#{order.nil? ? 'created_on' : order} #{score}") end # 获取公共资源中我上传的附件 def get_attch_resources_public_search order, score, search attchments = Attachment.where("(container_type in('Issue','Document','Message','News','StudentWorkScore','HomewCommon','OrgSubfield','Principal') - and container_id is not null and is_public =1) and (filename like :p)", :p => search).order("#{order.nil? ? 'created_on' : order} #{score}") + and container_id is not null) and (filename like :p)", :p => search).order("#{order.nil? ? 'created_on' : order} #{score}") end # 获取我的用户类型资源 @@ -2714,12 +2783,12 @@ class UsersController < ApplicationController # 获取我的用户类型资源 def get_principal_resources_public order, score - attchments = Attachment.where("container_type = 'Principal'and container_id is not null and is_public =1").order("#{order.nil? ? 'created_on' : order} #{score}") + attchments = Attachment.where("container_type = 'Principal'and container_id is not null").order("#{order.nil? ? 'created_on' : order} #{score}") end # 获取我的用户类型资源 def get_principal_resources_public_search order, score, search - attchments = Attachment.where("(container_type = 'Principal'and container_id is not null and is_public =1) and (filename like :p)", :p => search).order("#{order.nil? ? 'created_on' : order} #{score}") + attchments = Attachment.where("(container_type = 'Principal'and container_id is not null) and (filename like :p)", :p => search).order("#{order.nil? ? 'created_on' : order} #{score}") end # 资源库 分为全部 课程资源 项目资源 附件 @@ -2761,6 +2830,20 @@ class UsersController < ApplicationController # 公共资源库:所有公开资源或者我上传的私有资源 @attachments = get_public_resources(user_course_ids, user_project_ids, params[:order], @score) end + elsif params[:type] == "2" # 私有资源 + apply_ids = ApplyResource.where("user_id =? and status =?", params[:id], 2).map { |ar| ar.attachment_id} + # apply_id = ApplyResource.where("user_id =?", author_id).map{|ar| ar.attachment_id} + if params[:status] == "2" + resource_type = "'Course'" + elsif params[:status] == "3" + resource_type = "'Project'" + elsif params[:status] == "5" + resource_type = "'Principal'" + else + # 公共资源库:所有公开资源或者我上传的私有资源 + resource_type = "'Project','OrgSubfield','Principal','Course'" + end + @attachments = get_my_private_resources(apply_ids, resource_type, @order, @score) end @status = params[:status] @type = params[:type] diff --git a/app/models/apply_resource.rb b/app/models/apply_resource.rb index 50fdeebcb..ac65c0e3d 100644 --- a/app/models/apply_resource.rb +++ b/app/models/apply_resource.rb @@ -1,4 +1,5 @@ class ApplyResource < ActiveRecord::Base + # status:1. 等待回复 2.审核通过 3.已拒绝 attr_accessible :attachment_id, :status, :user_id, :container_type, :container_id, :apply_user_id, :content belongs_to :user belongs_to :attachment @@ -6,7 +7,7 @@ class ApplyResource < ActiveRecord::Base after_create :act_as_apply_resource_message def act_as_apply_resource_message - self.course_messages << CourseMessage.new(:user_id => self.user_id, :course_id => self.container_id, :viewed => false, :status => 5) + self.course_messages << CourseMessage.new(:user_id => self.apply_user_id, :course_id => self.container_id, :viewed => false, :status => 5) # REDO:发送邮件 # Mailer.run.apply_for_resource_request(self.container_id, User.current) end diff --git a/app/views/users/_apply_resource_course_message.html.erb b/app/views/users/_apply_resource_course_message.html.erb new file mode 100644 index 000000000..154ae3172 --- /dev/null +++ b/app/views/users/_apply_resource_course_message.html.erb @@ -0,0 +1,29 @@ +
  • + +
  • +
  • + <%= link_to ma.course_message.user.show_name, user_path(ma.course_message.user), :class => "newsBlue homepageNewsPublisher" %> + ">申请引用资源: +
  • +
  • + <% content = ma.course_message.content.nil? ? '' : ':'+ ma.course_message.content.to_s %> + " class = "<%= ma.viewed == 0 ? "newsBlack" : "newsGrey "%>"> + <%= ma.course_message.user.show_name + "申请引用资源\""+"#{ma.course_message.attachment.try(:name)}"+"\"#{content}" %> + +
  • + +
  • + + <% if ma.apply_result == 0 || ma.apply_result.nil?%> + <%= link_to '同意', dealwith_apply_homework_user_path(User.current,:agree => 'Y', :msg_id => ma.id), :remote => 'true' %> | + <%= link_to '拒绝', dealwith_apply_homework_user_path(User.current, :agree => 'N', :msg_id => ma.id), :remote => 'true' %> + <% elsif ma.apply_result == 1 %> + 您已经同意了该申请 + <% elsif ma.apply_result == 2 %> + 您已经拒绝了该申请 + <%end %> + +
  • +
  • <%= time_tag(ma.created_at).html_safe %>
  • \ No newline at end of file diff --git a/app/views/users/_resources_list.html.erb b/app/views/users/_resources_list.html.erb index 720fed133..18d20cd60 100644 --- a/app/views/users/_resources_list.html.erb +++ b/app/views/users/_resources_list.html.erb @@ -15,16 +15,16 @@ 私有 <% end %> -
  • +
  • <% if attach.is_public == 0 && @type == "6" && attach.author != User.current %> - <% ah = attach.get_status_by_attach(attach.author_id) %> + <% ah = attach.get_status_by_attach(User.current.id) %> <% if ah.nil? %> <%= link_to("请求分享", apply_resource_user_path(User.current.id, :attachment_id => attach.id), :class => 'green_btn_share c_white', :remote => true) %> - <% elsif ah.status == 1 %> + <% elsif ah == 1 %> 等待回复 - <% elsif ah.status == 2 %> + <% elsif ah == 2 %> 可引用 - <% elsif ah.status == 3 %> + <% elsif ah == 3 %> 已拒绝 <% end %> <% else %> diff --git a/app/views/users/_user_message_course.html.erb b/app/views/users/_user_message_course.html.erb index d278c7d74..9befe2b0b 100644 --- a/app/views/users/_user_message_course.html.erb +++ b/app/views/users/_user_message_course.html.erb @@ -234,6 +234,12 @@ <%= render :partial => 'apply_homework_course_message', :locals => {:ma => ma} %> <% end %> + + <% if ma.course_message_type == "ApplyResource" %> +
      + <%= render :partial => 'apply_resource_course_message', :locals => {:ma => ma} %> +
    + <% end %> <% if ma.course_message_type == "HomeworkCommon" && ma.status == 6 %>
    • diff --git a/app/views/users/_user_resource_type_filter.html.erb b/app/views/users/_user_resource_type_filter.html.erb index 6e5ed51c3..d2aa29eed 100644 --- a/app/views/users/_user_resource_type_filter.html.erb +++ b/app/views/users/_user_resource_type_filter.html.erb @@ -17,7 +17,7 @@ <%#= link_to '用户资源' ,user_resource_user_path(:id=>@user.id,:type=>5), id="resource_type_user", :remote=>true,:method => 'get', :class=>'resourcesTypeUser resourcesGrey' %>
      - <% if @type != "6" %> + <% unless (@type == "6" || @type == "2") %>
    • 附件 <%#= link_to '附件' ,user_resource_user_path(:id=>@user.id,:type=>4), id="resource_type_file", :remote=>true,:method => 'get',:class=>'resourcesTypeAtt resourcesGrey' %> diff --git a/app/views/users/apply_for_resource.js.erb b/app/views/users/apply_for_resource.js.erb index c37632810..10dd326e8 100644 --- a/app/views/users/apply_for_resource.js.erb +++ b/app/views/users/apply_for_resource.js.erb @@ -8,7 +8,7 @@ $('#ajax-modal').siblings().remove(); $('#ajax-modal').before("" + ""); $('#ajax-modal').parent().css("top","30%").css("left","50%").css("position","fixed").css("border","3px solid #269ac9"); -$("#homework_apply_status_<%= @attachment.id %>").html("等待回复"); +$("#resource_apply_status_<%= @attachment.id %>").html("等待回复"); <% elsif @state == 3 %> hideModal(); alert("您已申请过该资源"); From 99cbf0b54ef3058c79b1d303374573af0c48ecfd Mon Sep 17 00:00:00 2001 From: huang Date: Thu, 19 May 2016 11:32:58 +0800 Subject: [PATCH 10/39] =?UTF-8?q?=E8=B5=84=E6=BA=90=E5=BC=95=E7=94=A8?= =?UTF-8?q?=E6=B6=88=E6=81=AF=E9=80=9A=E7=9F=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/users_controller.rb | 26 +++++++++---------- app/models/apply_resource.rb | 6 ++++- app/models/course_message.rb | 2 ++ .../_apply_resource_course_message.html.erb | 12 ++++----- ...ply_resource_course_message_reply.html.erb | 21 +++++++++++++++ app/views/users/_user_message_course.html.erb | 10 +++++-- .../users/deal_with_apply_resource.js.erb | 1 + app/views/users/user_resource.html.erb | 2 +- config/routes.rb | 1 + 9 files changed, 57 insertions(+), 24 deletions(-) create mode 100644 app/views/users/_apply_resource_course_message_reply.html.erb create mode 100644 app/views/users/deal_with_apply_resource.js.erb diff --git a/app/controllers/users_controller.rb b/app/controllers/users_controller.rb index b6fed88af..7542ef3ee 100644 --- a/app/controllers/users_controller.rb +++ b/app/controllers/users_controller.rb @@ -315,20 +315,18 @@ class UsersController < ApplicationController # status def deal_with_apply_resource @msg = CourseMessage.find(params[:msg_id]) - ah = ApplyHomework.where("user_id = ? and homework_common_id = ?",@msg.apply_user_id, @msg.course_message_id) - case params[:agree] - when 'Y' - unless ah.empty? - ah.first.update_column('status', 2) - CourseMessage.create(:user_id => @msg.apply_user_id, :course_id => @msg.course_id, :viewed => false,:content=> @msg.content,:course_message_id=>@msg.course_message_id,:content=>@msg.content,:course_message_type=>'HomeworkCommon',:status=>6,:apply_result=>1) - @msg.update_attributes(:apply_result=>1,:viewed=>1) - end - when 'N' - unless ah.empty? - ah.first.update_column('status', 3) - CourseMessage.create(:user_id => @msg.apply_user_id, :course_id => @msg.course_id, :viewed => false,:content=> @msg.content,:course_message_id=>@msg.course_message_id,:content=>@msg.content,:course_message_type=>'HomeworkCommon',:status=>6,:apply_result=>2) - @msg.update_attributes(:apply_result=>2,:viewed=>1) - end + ar = ApplyResource.where("id = ?", @msg.course_message_id).first + unless ar.nil? + case params[:agree] + when 'Y' + ar.update_column('status', 2) + @msg.update_attributes(:apply_result => 1, :viewed => 1) + ar.course_messages << CourseMessage.new(:user_id => ar.user_id, :course_id => -1, :viewed => false, :apply_result => 2, :status => 1) + when 'N' + ar.update_column('status', 3) + @msg.update_attributes(:apply_result => 2, :viewed => 1) + ar.course_messages << CourseMessage.new(:user_id => ar.user_id, :course_id => -1, :viewed => false, :apply_result => 3, :status => 1) + end end respond_to do |format| format.js diff --git a/app/models/apply_resource.rb b/app/models/apply_resource.rb index ac65c0e3d..df646166c 100644 --- a/app/models/apply_resource.rb +++ b/app/models/apply_resource.rb @@ -7,9 +7,13 @@ class ApplyResource < ActiveRecord::Base after_create :act_as_apply_resource_message def act_as_apply_resource_message - self.course_messages << CourseMessage.new(:user_id => self.apply_user_id, :course_id => self.container_id, :viewed => false, :status => 5) + self.course_messages << CourseMessage.new(:user_id => self.apply_user_id, :course_id => -1, :viewed => false, :status => 0, ) # REDO:发送邮件 # Mailer.run.apply_for_resource_request(self.container_id, User.current) end + def find_attachment attachment_id + Attachment.find(attachment_id) + end + end diff --git a/app/models/course_message.rb b/app/models/course_message.rb index 703da936b..59fcfe456 100644 --- a/app/models/course_message.rb +++ b/app/models/course_message.rb @@ -1,5 +1,7 @@ class CourseMessage < ActiveRecord::Base # status说明: status在课程不同的类型,区分不同的功能 status = 9 作品的提交记录 + # ApplyResource status: + # 0: 发送申请 1:回复允许申请 2:拒绝申请消息 # HomeworkCommon:status: # nil:发布了作业; 1:作业截止时间到了提醒!;2:开启匿评; 3:关闭匿评; 4:匿评开始失败; 5:申请引用作业, 6:申请结果 # apply_user_id: 申请者的用户id diff --git a/app/views/users/_apply_resource_course_message.html.erb b/app/views/users/_apply_resource_course_message.html.erb index 154ae3172..55dcb4d22 100644 --- a/app/views/users/_apply_resource_course_message.html.erb +++ b/app/views/users/_apply_resource_course_message.html.erb @@ -9,16 +9,16 @@
    • <% content = ma.course_message.content.nil? ? '' : ':'+ ma.course_message.content.to_s %> - " class = "<%= ma.viewed == 0 ? "newsBlack" : "newsGrey "%>"> - <%= ma.course_message.user.show_name + "申请引用资源\""+"#{ma.course_message.attachment.try(:name)}"+"\"#{content}" %> + " class = "<%= ma.viewed == 0 ? "newsBlack" : "newsGrey "%>"> + <%= ma.course_message.user.show_name + "申请引用资源\""+"#{ma.course_message.user.try(:name)}"+"\"#{content}" %>
    • - - <% if ma.apply_result == 0 || ma.apply_result.nil?%> - <%= link_to '同意', dealwith_apply_homework_user_path(User.current,:agree => 'Y', :msg_id => ma.id), :remote => 'true' %> | - <%= link_to '拒绝', dealwith_apply_homework_user_path(User.current, :agree => 'N', :msg_id => ma.id), :remote => 'true' %> + + <% if ma.apply_result == 0 || ma.apply_result.nil? %> + <%= link_to '同意', deal_with_apply_resource_user_path(User.current, :agree => 'Y', :msg_id => ma.id, :apply_user_id => ma.course_message.apply_user_id), :remote => 'true' %> | + <%= link_to '拒绝', deal_with_apply_resource_user_path(User.current, :agree => 'N', :msg_id => ma.id, :apply_user_id => ma.course_message.apply_user_id), :remote => 'true' %> <% elsif ma.apply_result == 1 %> 您已经同意了该申请 <% elsif ma.apply_result == 2 %> diff --git a/app/views/users/_apply_resource_course_message_reply.html.erb b/app/views/users/_apply_resource_course_message_reply.html.erb new file mode 100644 index 000000000..4869c4393 --- /dev/null +++ b/app/views/users/_apply_resource_course_message_reply.html.erb @@ -0,0 +1,21 @@ + \ No newline at end of file diff --git a/app/views/users/_user_message_course.html.erb b/app/views/users/_user_message_course.html.erb index 9befe2b0b..8e3aa4873 100644 --- a/app/views/users/_user_message_course.html.erb +++ b/app/views/users/_user_message_course.html.erb @@ -235,11 +235,17 @@
    <% end %> - <% if ma.course_message_type == "ApplyResource" %> -
      + <% if ma.course_message_type == "ApplyResource" && ma.status == 0 %> +
        <%= render :partial => 'apply_resource_course_message', :locals => {:ma => ma} %>
      <% end %> + + <% if ma.course_message_type == "ApplyResource" && ma.status == 1 %> +
        + <%= render :partial => 'apply_resource_course_message_reply', :locals => {:ma => ma} %> +
      + <% end %> <% if ma.course_message_type == "HomeworkCommon" && ma.status == 6 %>
      • diff --git a/app/views/users/deal_with_apply_resource.js.erb b/app/views/users/deal_with_apply_resource.js.erb new file mode 100644 index 000000000..dbf07217c --- /dev/null +++ b/app/views/users/deal_with_apply_resource.js.erb @@ -0,0 +1 @@ +$("#apply_resource_message_<%= @msg.id %>").html('<%= escape_javascript(render :partial => 'users/apply_resource_course_message', :locals => {:ma => @msg}) %>'); \ No newline at end of file diff --git a/app/views/users/user_resource.html.erb b/app/views/users/user_resource.html.erb index f7e239d97..0bd5724c1 100644 --- a/app/views/users/user_resource.html.erb +++ b/app/views/users/user_resource.html.erb @@ -56,7 +56,7 @@ 我的资源
      • - 私有资源 + 私有资源
      •  
      • diff --git a/config/routes.rb b/config/routes.rb index 85e3198a3..98d90c753 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -623,6 +623,7 @@ RedmineApp::Application.routes.draw do post 'import_resources_to_homework' get 'dealwith_apply_request' get 'dealwith_apply_homework' + get 'deal_with_apply_resource' get 'store_selected_resource' get 'user_organizations' get 'search_user_orgs' From bddc807057f7cf0de8a570be89b4fa0b85b159be Mon Sep 17 00:00:00 2001 From: huang Date: Thu, 19 May 2016 13:41:32 +0800 Subject: [PATCH 11/39] =?UTF-8?q?=E4=BF=AE=E6=AD=A3=E8=B5=84=E6=BA=90?= =?UTF-8?q?=E5=BA=93=E5=BC=B9=E6=A1=86=E4=BD=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/users/apply_for_resource.js.erb | 2 +- app/views/users/apply_resource.js.erb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/views/users/apply_for_resource.js.erb b/app/views/users/apply_for_resource.js.erb index 10dd326e8..7debbcba2 100644 --- a/app/views/users/apply_for_resource.js.erb +++ b/app/views/users/apply_for_resource.js.erb @@ -7,7 +7,7 @@ showModal('ajax-modal', '500px'); $('#ajax-modal').siblings().remove(); $('#ajax-modal').before("" + ""); -$('#ajax-modal').parent().css("top","30%").css("left","50%").css("position","fixed").css("border","3px solid #269ac9"); +$('#ajax-modal').parent().css("top","30%").css("left","37%").css("position","fixed").css("border","3px solid #269ac9"); $("#resource_apply_status_<%= @attachment.id %>").html("等待回复"); <% elsif @state == 3 %> hideModal(); diff --git a/app/views/users/apply_resource.js.erb b/app/views/users/apply_resource.js.erb index 62afcfd48..14a795fe5 100644 --- a/app/views/users/apply_resource.js.erb +++ b/app/views/users/apply_resource.js.erb @@ -6,5 +6,5 @@ showModal('ajax-modal', '500px'); $('#ajax-modal').siblings().remove(); $('#ajax-modal').before("" + ""); -$('#ajax-modal').parent().css("top","30%").css("left","30%").css("position","fixed").css("border","3px solid #269ac9"); +$('#ajax-modal').parent().css("top","30%").css("left","37%").css("position","fixed").css("border","3px solid #269ac9"); <% end %> \ No newline at end of file From 4c68da9beeeb233fdfcfc5c8227ee5cf9ab4b55b Mon Sep 17 00:00:00 2001 From: huang Date: Thu, 19 May 2016 13:49:29 +0800 Subject: [PATCH 12/39] =?UTF-8?q?=E4=BF=AE=E6=AD=A3=E9=93=BE=E6=8E=A5?= =?UTF-8?q?=E8=B5=84=E6=BA=90=E5=90=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/users/_apply_resource_course_message.html.erb | 4 ++-- app/views/users/_apply_resource_course_message_reply.html.erb | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/app/views/users/_apply_resource_course_message.html.erb b/app/views/users/_apply_resource_course_message.html.erb index 55dcb4d22..4dbec8127 100644 --- a/app/views/users/_apply_resource_course_message.html.erb +++ b/app/views/users/_apply_resource_course_message.html.erb @@ -9,8 +9,8 @@
      • <% content = ma.course_message.content.nil? ? '' : ':'+ ma.course_message.content.to_s %> - " class = "<%= ma.viewed == 0 ? "newsBlack" : "newsGrey "%>"> - <%= ma.course_message.user.show_name + "申请引用资源\""+"#{ma.course_message.user.try(:name)}"+"\"#{content}" %> + " class = "<%= ma.viewed == 0 ? "newsBlack" : "newsGrey "%>"> + <%= ma.course_message.user.show_name + "申请引用资源\""+"#{ma.course_message.find_attachment(ma.course_message.attachment_id).try(:filename)}"+"\"#{content}" %>
      • diff --git a/app/views/users/_apply_resource_course_message_reply.html.erb b/app/views/users/_apply_resource_course_message_reply.html.erb index 4869c4393..7cf246c53 100644 --- a/app/views/users/_apply_resource_course_message_reply.html.erb +++ b/app/views/users/_apply_resource_course_message_reply.html.erb @@ -11,9 +11,9 @@
      • <% link_str = ma.apply_result == 1 ? - '您申请引用资源"'+ ma.course_message.find_attachment(ma.course_message.apply_user_id).try(:filename) + '"的申请已通过' + '您申请引用资源"'+ ma.course_message.find_attachment(ma.course_message.attachment_id).try(:filename) + '"的申请已通过' : - '您申请引用资源"'+ ma.course_message.find_attachment(ma.course_message.apply_user_id).try(:filename) + '"的申请被婉拒' %> + '您申请引用资源"'+ ma.course_message.find_attachment(ma.course_message.attachment_id).try(:filename) + '"的申请被婉拒' %> <%= link_to link_str, user_resource_user_path(User.current, :type => 2), :title => link_str,:class => "#{ma.viewed == 0 ? "newsBlack" : "newsGrey "}" %>
      • From 0b2f6c9a53a3d3134ae2b1add26f2b015a62f529 Mon Sep 17 00:00:00 2001 From: huang Date: Thu, 19 May 2016 14:28:13 +0800 Subject: [PATCH 13/39] =?UTF-8?q?=E7=A7=81=E6=9C=89=E8=B5=84=E6=BA=90?= =?UTF-8?q?=E7=9A=84=E6=90=9C=E7=B4=A2=E5=92=8C=E6=8E=92=E5=BA=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/users_controller.rb | 22 ++++++++++++++++------ app/views/users/_resources_list.html.erb | 2 +- 2 files changed, 17 insertions(+), 7 deletions(-) diff --git a/app/controllers/users_controller.rb b/app/controllers/users_controller.rb index 7542ef3ee..b0194a2d8 100644 --- a/app/controllers/users_controller.rb +++ b/app/controllers/users_controller.rb @@ -2698,10 +2698,9 @@ class UsersController < ApplicationController attachments = Attachment.where("id in (#{apply_ids.empty? ? '0': apply_ids.join(',')}) and container_type in(#{resource_type})").order("#{order.nil? ? 'created_on' : order} #{score}") end - # 获取我的私有资源分享结果 - def get_course_private_resources author_id, user_course_ids, order, score - apply_id = ApplyResource.where("user_id =?", author_id).map{|ar| ar.attachment_id} - attachments = Attachment.where("user_id =? and attachment_id =?") + # 获取我的私有资源分享搜索结果 + def get_my_private_resources_search apply_ids, resource_type, order, score, search + attachments = Attachment.where("id in (#{apply_ids.empty? ? '0': apply_ids.join(',')}) and container_type in(#{resource_type}) and (filename like :p)", :p => search).order("#{order.nil? ? 'created_on' : order} #{score}") end # 获取我的课程资源中搜索结果 @@ -2830,7 +2829,6 @@ class UsersController < ApplicationController end elsif params[:type] == "2" # 私有资源 apply_ids = ApplyResource.where("user_id =? and status =?", params[:id], 2).map { |ar| ar.attachment_id} - # apply_id = ApplyResource.where("user_id =?", author_id).map{|ar| ar.attachment_id} if params[:status] == "2" resource_type = "'Course'" elsif params[:status] == "3" @@ -2838,7 +2836,6 @@ class UsersController < ApplicationController elsif params[:status] == "5" resource_type = "'Principal'" else - # 公共资源库:所有公开资源或者我上传的私有资源 resource_type = "'Project','OrgSubfield','Principal','Course'" end @attachments = get_my_private_resources(apply_ids, resource_type, @order, @score) @@ -3022,6 +3019,19 @@ class UsersController < ApplicationController # 公共资源库:所有公开资源或者我上传的私有资源 @attachments = get_public_resources_search(user_course_ids, user_project_ids, @order, @score, search) end + elsif params[:type] == "2" # 私有资源 + apply_ids = ApplyResource.where("user_id =? and status =?", params[:id], 2).map { |ar| ar.attachment_id} + if params[:status] == "2" + resource_type = "'Course'" + elsif params[:status] == "3" + resource_type = "'Project'" + elsif params[:status] == "5" + resource_type = "'Principal'" + else + resource_type = "'Project','OrgSubfield','Principal','Course'" + end + @attachments = get_my_private_resources_search(apply_ids, resource_type, @order, @score, search) + @attachments end @status = params[:status] @type = params[:type] diff --git a/app/views/users/_resources_list.html.erb b/app/views/users/_resources_list.html.erb index 18d20cd60..63ef92667 100644 --- a/app/views/users/_resources_list.html.erb +++ b/app/views/users/_resources_list.html.erb @@ -11,7 +11,7 @@
      • <%= link_to truncate(attach.filename, :length => 30), download_named_attachment_path(attach.id, attach.filename), :title => attach.filename, :class => 'resourcesBlack resource-list-middle hidden mw280' %> - <% if attach.is_public == 0 && @type == "6" && attach.author != User.current %> + <% if attach.is_public == 0 && (@type == "6" || @type == "2") && attach.author != User.current %> 私有 <% end %>
      • From 984f7067224510d98040d490d78d6cc838a46eb4 Mon Sep 17 00:00:00 2001 From: huang Date: Thu, 19 May 2016 15:59:59 +0800 Subject: [PATCH 14/39] =?UTF-8?q?=E5=8F=AF=E5=8F=91=E9=80=81=E6=9D=83?= =?UTF-8?q?=E9=99=90=E6=8E=A7=E5=88=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/models/attachment.rb | 5 ++++ app/views/users/_resources_list.html.erb | 34 +++++++++++++++--------- 2 files changed, 27 insertions(+), 12 deletions(-) diff --git a/app/models/attachment.rb b/app/models/attachment.rb index 72205fdc5..b7ec264fd 100644 --- a/app/models/attachment.rb +++ b/app/models/attachment.rb @@ -140,6 +140,11 @@ class Attachment < ActiveRecord::Base } ) end + + def get_apply_resource_status attachment_id, author_id + ApplyResource.where("attachment_id =? and apply_user_id =?", attachment_id, author_id).first.try(:status) + end + # add by nwb # 公开的项目id列表 def self.public_project_id diff --git a/app/views/users/_resources_list.html.erb b/app/views/users/_resources_list.html.erb index 63ef92667..252798227 100644 --- a/app/views/users/_resources_list.html.erb +++ b/app/views/users/_resources_list.html.erb @@ -16,7 +16,7 @@ <% end %>
      • - <% if attach.is_public == 0 && @type == "6" && attach.author != User.current %> + <% if attach.is_public == 0 && (@type == "6" || @type == "2") && attach.author != User.current %> <% ah = attach.get_status_by_attach(User.current.id) %> <% if ah.nil? %> <%= link_to("请求分享", apply_resource_user_path(User.current.id, :attachment_id => attach.id), :class => 'green_btn_share c_white', :remote => true) %> @@ -39,6 +39,8 @@
      • <%= get_resource_type(attach.container_type)%>
      • +
      • <%= attach.is_public %>
      • +
      • <%= attach.get_apply_resource_status(attach.id, attach.author_id) %>
      • <%= attach.id %>
      @@ -87,19 +89,27 @@ document.oncontextmenu = function() {return true;} line.children().css("background-color",'white'); id = line.children().last().html(); - if (lastSendType === '2'){ //如果已经发送过一次了,那么就应该沿用上次发送的类型。 - $.ajax({ - type: 'get', - url: '<%= search_user_project_user_path(User.current.id) %>' + "?send_id=" + id + "&type=<%= @type %>", - data:{send_type:'file'} - }); + is_public = line.children().eq(11).html(); + user_id = line.children().eq(6).html(); + apply_status = line.children().eq(12).html(); + if(is_public == 0 && user_id != '<%= User.current.id %>' && apply_status != 2){ + alert('您无权发送私有资源') }else{ - $.ajax({ - type: 'get', - url: '<%= search_user_course_user_path(User.current.id)%>' + "?send_id=" + id + "&type=<%= @type %>", - data:{send_type:'file'} - }); + if (lastSendType === '2'){ //如果已经发送过一次了,那么就应该沿用上次发送的类型。 + $.ajax({ + type: 'get', + url: '<%= search_user_project_user_path(User.current.id) %>' + "?send_id=" + id + "&type=<%= @type %>", + data:{send_type:'file'} + }); + }else{ + $.ajax({ + type: 'get', + url: '<%= search_user_course_user_path(User.current.id)%>' + "?send_id=" + id + "&type=<%= @type %>", + data:{send_type:'file'} + }); + } } + } function batch_send(){ From df70c33bcd4c86805cb0b52b65f1028d3200dffe Mon Sep 17 00:00:00 2001 From: cxt Date: Thu, 19 May 2016 16:39:14 +0800 Subject: [PATCH 15/39] =?UTF-8?q?=E5=AD=A6=E7=94=9F=E5=88=97=E8=A1=A8?= =?UTF-8?q?=E6=B4=BB=E8=B7=83=E5=BA=A6=E4=B8=BA0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/courses_controller.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/controllers/courses_controller.rb b/app/controllers/courses_controller.rb index 1478bceae..374e26431 100644 --- a/app/controllers/courses_controller.rb +++ b/app/controllers/courses_controller.rb @@ -1177,7 +1177,7 @@ class CoursesController < ApplicationController AND homework_commons.course_id = #{@course.id} AND student_works.user_id = members.user_id ) AS score,(SELECT (message_num*2 + message_reply_num*1 + news_reply_num*1 + news_num*1 + - resource_num*5 + journal_num*1 + homework_journal_num*1 ) FROM `course_contributor_scores` AS ccs WHERE ccs.course_id = 577 AND ccs.user_id = members.user_id + resource_num*5 + journal_num*1 + homework_journal_num*1 ) FROM `course_contributor_scores` AS ccs WHERE ccs.course_id = #{@course.id} AND ccs.user_id = members.user_id ) AS act_score FROM members JOIN students_for_courses @@ -1191,7 +1191,7 @@ class CoursesController < ApplicationController AND homework_commons.course_id = #{@course.id} AND student_works.user_id = members.user_id ) AS score,(SELECT (message_num*2 + message_reply_num*1 + news_reply_num*1 + news_num*1 + - resource_num*5 + journal_num*1 + homework_journal_num*1 ) FROM `course_contributor_scores` AS ccs WHERE ccs.course_id = 577 AND ccs.user_id = members.user_id + resource_num*5 + journal_num*1 + homework_journal_num*1 ) FROM `course_contributor_scores` AS ccs WHERE ccs.course_id = #{@course.id} AND ccs.user_id = members.user_id ) AS act_score FROM members JOIN students_for_courses From 1402f2076a91b49bd5c71abce7072159cf0ff5d2 Mon Sep 17 00:00:00 2001 From: huang Date: Thu, 19 May 2016 16:53:22 +0800 Subject: [PATCH 16/39] =?UTF-8?q?=E8=B5=84=E6=BA=90=E7=94=B3=E8=AF=B7?= =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E9=93=BE=E6=8E=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../users/_apply_resource_course_message.html.erb | 15 ++++++++++++--- .../_apply_resource_course_message_reply.html.erb | 13 +++++++++++++ 2 files changed, 25 insertions(+), 3 deletions(-) diff --git a/app/views/users/_apply_resource_course_message.html.erb b/app/views/users/_apply_resource_course_message.html.erb index 4dbec8127..fd493daf2 100644 --- a/app/views/users/_apply_resource_course_message.html.erb +++ b/app/views/users/_apply_resource_course_message.html.erb @@ -9,9 +9,18 @@
    • <% content = ma.course_message.content.nil? ? '' : ':'+ ma.course_message.content.to_s %> - " class = "<%= ma.viewed == 0 ? "newsBlack" : "newsGrey "%>"> - <%= ma.course_message.user.show_name + "申请引用资源\""+"#{ma.course_message.find_attachment(ma.course_message.attachment_id).try(:filename)}"+"\"#{content}" %> - + <% show_content = ma.course_message.user.show_name + "申请引用资源\""+"#{ma.course_message.find_attachment(ma.course_message.attachment_id).try(:filename)}"+"\"#{content}" %> + <% if ma.course_message.container_type == "Course" %> + <%= link_to show_content, course_files_path(ma.course_message.container_id), :title => show_content, :class => " #{ma.viewed == 0 ? "newsBlack" : "newsGrey "}" %> + <% elsif ma.course_message.container_type == "Project" %> + <%= link_to show_content, project_files_path(ma.course_message.container_id), :title => show_content, :class => " #{ma.viewed == 0 ? "newsBlack" : "newsGrey "}" %> + <% elsif ma.course_message.container_type == "OrgSubfield" %> + <%= link_to show_content, org_subfield_files_path(ma.course_message.container_id), :title => show_content, :class => " #{ma.viewed == 0 ? "newsBlack" : "newsGrey "}" %> + <% else %> + "> + <%= show_content %> + + <% end %>
    • diff --git a/app/views/users/_apply_resource_course_message_reply.html.erb b/app/views/users/_apply_resource_course_message_reply.html.erb index 7cf246c53..617ee53c3 100644 --- a/app/views/users/_apply_resource_course_message_reply.html.erb +++ b/app/views/users/_apply_resource_course_message_reply.html.erb @@ -14,6 +14,19 @@ '您申请引用资源"'+ ma.course_message.find_attachment(ma.course_message.attachment_id).try(:filename) + '"的申请已通过' : '您申请引用资源"'+ ma.course_message.find_attachment(ma.course_message.attachment_id).try(:filename) + '"的申请被婉拒' %> + <% if ma.course_message.container_type == "Course" %> + <%= link_to link_str, course_files_path(ma.course_message.container_id), :title => link_str, :class => " #{ma.viewed == 0 ? "newsBlack" : "newsGrey "}" %> + <% elsif ma.course_message.container_type == "Project" %> + <%= link_to link_str, project_files_path(ma.course_message.container_id), :title => link_str, :class => " #{ma.viewed == 0 ? "newsBlack" : "newsGrey "}" %> + <% elsif ma.course_message.container_type == "OrgSubfield" %> + <%= link_to link_str, org_subfield_files_path(ma.course_message.container_id), :title => link_str, :class => " #{ma.viewed == 0 ? "newsBlack" : "newsGrey "}" %> + <% else %> + "> + <%= link_str %> + + <% end %> + + <%= link_to link_str, user_resource_user_path(User.current, :type => 2), :title => link_str,:class => "#{ma.viewed == 0 ? "newsBlack" : "newsGrey "}" %>
    • From e0370e3e32409a0e86c3242994ff973925726fa8 Mon Sep 17 00:00:00 2001 From: huang Date: Thu, 19 May 2016 17:04:46 +0800 Subject: [PATCH 17/39] =?UTF-8?q?=E7=A7=81=E6=9C=89=E8=B5=84=E6=BA=90?= =?UTF-8?q?=E4=B8=AD=E5=8F=91=E9=80=81=E6=96=87=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/users_controller.rb | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/app/controllers/users_controller.rb b/app/controllers/users_controller.rb index b0194a2d8..5148f3318 100644 --- a/app/controllers/users_controller.rb +++ b/app/controllers/users_controller.rb @@ -2199,6 +2199,18 @@ class UsersController < ApplicationController # 公共资源库:所有公开资源或者我上传的私有资源 @attachments = get_public_resources(user_course_ids, user_project_ids, params[:order], @score) end + elsif params[:type] == "2" + apply_ids = ApplyResource.where("user_id =? and status =?", params[:id], 2).map { |ar| ar.attachment_id} + if params[:status] == "2" + resource_type = "'Course'" + elsif params[:status] == "3" + resource_type = "'Project'" + elsif params[:status] == "5" + resource_type = "'Principal'" + else + resource_type = "'Project','OrgSubfield','Principal','Course'" + end + @attachments = get_my_private_resources(apply_ids, resource_type, @order, @score) end @status = params[:status] @type = params[:type] From f806dbf587dd20d910b251ed658a7e5d26803b9b Mon Sep 17 00:00:00 2001 From: huang Date: Thu, 19 May 2016 17:12:33 +0800 Subject: [PATCH 18/39] =?UTF-8?q?=E8=B5=84=E6=BA=90=E5=8F=91=E9=80=81?= =?UTF-8?q?=E8=87=B3=E7=BB=84=E7=BB=87=E5=92=8C=E8=AF=BE=E7=A8=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/users_controller.rb | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/app/controllers/users_controller.rb b/app/controllers/users_controller.rb index 5148f3318..d86ce379b 100644 --- a/app/controllers/users_controller.rb +++ b/app/controllers/users_controller.rb @@ -2058,6 +2058,18 @@ class UsersController < ApplicationController # 公共资源库:所有公开资源或者我上传的私有资源 @attachments = get_public_resources(user_course_ids, user_project_ids, params[:order], @score) end + elsif params[:type] == "2" + apply_ids = ApplyResource.where("user_id =? and status =?", params[:id], 2).map { |ar| ar.attachment_id} + if params[:status] == "2" + resource_type = "'Course'" + elsif params[:status] == "3" + resource_type = "'Project'" + elsif params[:status] == "5" + resource_type = "'Principal'" + else + resource_type = "'Project','OrgSubfield','Principal','Course'" + end + @attachments = get_my_private_resources(apply_ids, resource_type, @order, @score) end @type = params[:type] @limit = 25 @@ -2340,6 +2352,18 @@ class UsersController < ApplicationController # 公共资源库:所有公开资源或者我上传的私有资源 @attachments = get_public_resources(user_course_ids, user_project_ids, params[:order], @score) end + elsif params[:type] == "2" + apply_ids = ApplyResource.where("user_id =? and status =?", params[:id], 2).map { |ar| ar.attachment_id} + if params[:status] == "2" + resource_type = "'Course'" + elsif params[:status] == "3" + resource_type = "'Project'" + elsif params[:status] == "5" + resource_type = "'Principal'" + else + resource_type = "'Project','OrgSubfield','Principal','Course'" + end + @attachments = get_my_private_resources(apply_ids, resource_type, @order, @score) end @type = params[:type] @limit = 25 From b03b9a3c27feea203d763e41a952e4a1192cd73f Mon Sep 17 00:00:00 2001 From: cxt Date: Fri, 20 May 2016 09:59:41 +0800 Subject: [PATCH 19/39] =?UTF-8?q?=E8=AF=BE=E7=A8=8B=EF=BC=9A=E9=97=AE?= =?UTF-8?q?=E5=8D=B7=E5=AF=BC=E5=85=A5=E6=97=B6=E6=98=BE=E7=A4=BA=E7=9A=84?= =?UTF-8?q?=E6=95=B0=E6=8D=AE=E6=9C=AA=E8=BF=9B=E8=A1=8C=E8=BF=87=E6=BB=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/poll_controller.rb | 10 +++++++--- db/schema.rb | 21 ++++++++------------- 2 files changed, 15 insertions(+), 16 deletions(-) diff --git a/app/controllers/poll_controller.rb b/app/controllers/poll_controller.rb index 1d7b4117d..e4cf31f55 100644 --- a/app/controllers/poll_controller.rb +++ b/app/controllers/poll_controller.rb @@ -423,9 +423,13 @@ class PollController < ApplicationController # 将其他地方的问卷导出来 def other_poll # 查作者是我,或者作者是当前课程的老师,且不在当前课程内的问卷 进行导入 - tea_ids = '(' - tea_ids << Course.find(params[:polls_group_id]).tea_id.to_s << ','<< User.current.id.to_s << ')' - @polls = Poll.where("user_id in #{tea_ids} and polls_type = 'course' and polls_group_id != #{params[:polls_group_id]}") + courses = User.current.courses.select { |course| User.current.allowed_to?(:as_teacher,course)} + course_ids = courses.empty? ? "(-1)" : "(" + courses.map { |course| course.id}.join(',') + ")" + none_courses = User.current.courses.where("is_delete = 1 or #{Course.table_name}.id = #{params[:polls_group_id].to_i}") + none_course_ids = none_courses.empty? ? "(-1)" : "(" + none_courses.map { |course| course.id}.join(',') + ")" + #tea_ids = '(' + #tea_ids << Course.find(params[:polls_group_id]).tea_id.to_s << ','<< User.current.id.to_s << ')' + @polls = Poll.where("(user_id = #{User.current.id} or polls_group_id in #{course_ids}) and polls_type = 'course' and polls_group_id not in #{none_course_ids}") @polls_group_id = params[:polls_group_id] respond_to do |format| format.js diff --git a/db/schema.rb b/db/schema.rb index 02a79aa9b..9c4b4b333 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -11,12 +11,7 @@ # # It's strongly recommended to check this file into your version control system. -<<<<<<< HEAD - -ActiveRecord::Schema.define(:version => 20160513120002) do -======= -ActiveRecord::Schema.define(:version => 20160513021204) do ->>>>>>> weixin_guange +ActiveRecord::Schema.define(:version => 20160519070718) do create_table "activities", :force => true do |t| t.integer "act_id", :null => false @@ -455,15 +450,15 @@ ActiveRecord::Schema.define(:version => 20160513021204) do create_table "course_contributor_scores", :force => true do |t| t.integer "course_id" t.integer "user_id" - t.integer "message_num" - t.integer "message_reply_num" - t.integer "news_reply_num" - t.integer "resource_num" - t.integer "journal_num" - t.integer "journal_reply_num" + t.integer "message_num", :default => 0 + t.integer "message_reply_num", :default => 0 + t.integer "news_reply_num", :default => 0 + t.integer "resource_num", :default => 0 + t.integer "journal_num", :default => 0 + t.integer "journal_reply_num", :default => 0 t.datetime "created_at", :null => false t.datetime "updated_at", :null => false - t.integer "total_score" + t.integer "total_score", :default => 0 t.integer "homework_journal_num", :default => 0 t.integer "news_num", :default => 0 end From 92f55e0dc159f4be2ce5adfbd7914ddb9f06335f Mon Sep 17 00:00:00 2001 From: huang Date: Fri, 20 May 2016 10:02:59 +0800 Subject: [PATCH 20/39] =?UTF-8?q?=E5=85=AC=E5=85=B1=E8=B5=84=E6=BA=90?= =?UTF-8?q?=E5=BA=93=EF=BC=8C=E7=82=B9=E5=87=BB=E5=BA=95=E9=83=A8=E4=B8=8D?= =?UTF-8?q?=E8=83=BD=E5=8F=91=E9=80=81=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/users_controller.rb | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/app/controllers/users_controller.rb b/app/controllers/users_controller.rb index d86ce379b..6c5cbd390 100644 --- a/app/controllers/users_controller.rb +++ b/app/controllers/users_controller.rb @@ -1942,7 +1942,7 @@ class UsersController < ApplicationController # 将资源发送到对应的课程,分为发送单个,或者批量发送 def add_exist_file_to_course @flag = true - if params[:send_id].present? + if params[:send_id].present? send_id = params[:send_id] @ori = Attachment.find_by_id(send_id) course_ids = params[:course_ids] @@ -1989,14 +1989,14 @@ class UsersController < ApplicationController end send_ids.each do |send_id| quotes = 0 - ori = Attachment.find_by_id(send_id) + @ori = Attachment.find_by_id(send_id) unless course_ids.nil? course_ids.each do |id| quotes = 0 - next if ori.blank? + next if @ori.blank? @exist = false Course.find(id).attachments.each do |att| #如果课程中包含该资源 - if att.id == ori.id || (!att.copy_from.nil? && !ori.copy_from.nil? && att.copy_from == ori.copy_from) || att.copy_from == ori.id || att.id == ori.copy_from + if att.id == @ori.id || (!att.copy_from.nil? && !@ori.copy_from.nil? && att.copy_from == @ori.copy_from) || att.copy_from == @ori.id || att.id == @ori.copy_from att.created_on = Time.now att.save @exist = true @@ -2004,21 +2004,21 @@ class UsersController < ApplicationController end end next if @exist - attach_copied_obj = ori.copy - attach_copied_obj.tag_list.add(ori.tag_list) # tag关联 + attach_copied_obj = @ori.copy + attach_copied_obj.tag_list.add(@ori.tag_list) # tag关联 attach_copied_obj.container = Course.find(id) attach_copied_obj.created_on = Time.now attach_copied_obj.author_id = User.current.id attach_copied_obj.is_public = 0 - attach_copied_obj.copy_from = ori.copy_from.nil? ? ori.id : ori.copy_from #发送要添加copy_from + attach_copied_obj.copy_from = @ori.copy_from.nil? ? @ori.id : @ori.copy_from #发送要添加copy_from if attach_copied_obj.attachtype == nil attach_copied_obj.attachtype = 4 end if attach_copied_obj.save # 更新引用次数 - quotes = ori.quotes.to_i + 1 - ori.update_attribute(:quotes, quotes) unless ori.nil? - ori.forwards << Forward.new(:to_type => attach_copied_obj.class.name, :to_id => attach_copied_obj.id,:created_at => Time.now) + quotes = @ori.quotes.to_i + 1 + @ori.update_attribute(:quotes, quotes) unless @ori.nil? + @ori.forwards << Forward.new(:to_type => attach_copied_obj.class.name, :to_id => attach_copied_obj.id,:created_at => Time.now) end @save_message = attach_copied_obj.errors.full_messages end From 80f829c0187cb9b0cbe630a7a875ca3a8e5657e0 Mon Sep 17 00:00:00 2001 From: huang Date: Fri, 20 May 2016 10:48:17 +0800 Subject: [PATCH 21/39] =?UTF-8?q?=E8=A7=A3=E5=86=B3=E6=90=9C=E7=B4=A2?= =?UTF-8?q?=E4=B8=8D=E8=83=BD=E7=94=A8=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/organizations_controller.rb | 2 +- app/views/organizations/teachers.html.erb | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/app/controllers/organizations_controller.rb b/app/controllers/organizations_controller.rb index c94f734e1..62876d757 100644 --- a/app/controllers/organizations_controller.rb +++ b/app/controllers/organizations_controller.rb @@ -164,7 +164,7 @@ class OrganizationsController < ApplicationController return end q = params[:search].nil? ? "" : "#{params[:search].strip}" - @field = OrgSubfield.find(params[:org_subfield_id]) + @field = params[:org_subfield_id].nil? ? OrgSubfield.where("organization_id =? and field_type =?", params[:id].to_i, "Comptec").first : OrgSubfield.find(params[:org_subfield_id]) @type = params[:type] if @type == "courses" || @type.nil? @org_teachers = User.find_by_sql("select u.*, ue.technical_title, ue.school_id,(select count(*) from courses where courses.tea_id = u.id) as course_count diff --git a/app/views/organizations/teachers.html.erb b/app/views/organizations/teachers.html.erb index c368adef7..dac36f7a5 100644 --- a/app/views/organizations/teachers.html.erb +++ b/app/views/organizations/teachers.html.erb @@ -9,8 +9,7 @@
      <% end%> - + <% end %> <% if student_work.homework_common && student_work.homework_common.teacher_priority == 1 && student_work.teacher_score %> @@ -79,7 +77,7 @@ <% else %> <% score = student_work.respond_to?("score") ? student_work.score : (student_work.final_score || 0) - student_work.absence_penalty - student_work.late_penalty%> <% end %> -
    • + <%= score.nil? ? "--" : format("%.1f",score<0 ? 0 : score)%> <% unless score.nil?%>
      @@ -97,9 +95,9 @@  <%= format("%.1f",score<0 ? 0 : score)%> 分。
      <% end%> -
    • - -
    + + 点击查看详情 +