diff --git a/app/controllers/bids_controller.rb b/app/controllers/bids_controller.rb index b9f9245c8..ef0be71ac 100644 --- a/app/controllers/bids_controller.rb +++ b/app/controllers/bids_controller.rb @@ -482,7 +482,7 @@ class BidsController < ApplicationController #ended end - if @bid.homework_type == 1 + if @bid.homework_type @homework = HomeworkAttach.new #@homework_list = @bid.homeworks #增加作业按评分排序, diff --git a/app/controllers/issues_controller.rb b/app/controllers/issues_controller.rb index 2f7d6e600..edff1888b 100644 --- a/app/controllers/issues_controller.rb +++ b/app/controllers/issues_controller.rb @@ -119,6 +119,7 @@ class IssuesController < ApplicationController @time_entry = TimeEntry.new(:issue => @issue, :project => @issue.project) @project_base_tag = (params[:project_id] || @issue.project) ? 'base_projects':'base'#by young + @available_watchers = (@issue.project.users.sort + @issue.watcher_users).uniq respond_to do |format| format.html { @@ -194,6 +195,30 @@ class IssuesController < ApplicationController end if saved + + #修改界面增加跟踪者 + watcherlist = @issue.watcher_users + select_users = [] + if params[:issue] + if params[:issue][:watcher_user_ids] + params[:issue][:watcher_user_ids].each do |user_id| + select_users << User.find(user_id) + end + end + end + select_users.each do |user| + if watcherlist.include? user + else + @issue.add_watcher user + end + end + watcherlist.each do |user| + if select_users.include? user + else + @issue.remove_watcher user + end + end + render_attachment_warning_if_needed(@issue) reply_id = params[:reference_user_id].to_i if reply_id > 0 diff --git a/app/controllers/projects_controller.rb b/app/controllers/projects_controller.rb index 1d3f0ec42..136703c68 100644 --- a/app/controllers/projects_controller.rb +++ b/app/controllers/projects_controller.rb @@ -490,11 +490,11 @@ class ProjectsController < ApplicationController end end - def create - + def create + @course_tag = params[:project][:project_type] if(@course_tag=="1") - if User.current.user_extensions.identity#.include?(UserExtensions::TEACHER,UserExtensions::DEVELOPER) + if User.current.user_extensions.identity#.include?(UserExtensions::TEACHER,UserExtensions::DEVELOPER) @course = Course.new @course.extra='course' + DateTime.parse(Time.now.to_s).strftime('%Y-%m-%d_%H-%M-%S').to_s @course.safe_attributes = params[:project][:course] @@ -513,11 +513,12 @@ class ProjectsController < ApplicationController @trackers = Tracker.sorted.all @project = Project.new @project.user_id = User.current.id + @project.dts_test = params[:project][:dts_test] @project.safe_attributes = params[:project] if @course_tag == '1' @project.identifier = @course.extra end - if @course_tag == '1' + if @course_tag == '1' if User.current.user_extensions.identity == 0 if@course.save if validate_parent_id && @project.save @@ -528,7 +529,7 @@ class ProjectsController < ApplicationController m = Member.new(:user => User.current, :roles => [r]) project = ProjectInfo.new(:user_id => User.current.id, :project_id => @project.id) user_grades = UserGrade.create(:user_id => User.current.id, :project_id => @project.id) - if params[:project][:is_public] == '1' + if params[:project][:is_public] == '1' project_status = ProjectStatus.create(:project_id => @project.id, :watchers_count => 0, :changesets_count => 0, :grade => 0, :project_type => @course_tag) end @project.members << m @@ -541,7 +542,7 @@ class ProjectsController < ApplicationController attrs = {:parent_id => @project.parent_id}.reject {|k,v| v.nil?} redirect_to new_project_path(attrs, :course => '0') #Added by young - + elsif params[:course_continue] redirect_to new_project_path(:course => '1') #Ended by young @@ -574,10 +575,11 @@ class ProjectsController < ApplicationController end end else + #@project.memberships.create if validate_parent_id && @project.save @project.set_allowed_parent!(params[:project]['parent_id']) if params[:project].has_key?('parent_id') # Add current user as a project member if he is not admin - unless User.current.admin? + #unless User.current.admin? r = Role.givable.find_by_id(Setting.new_project_user_role_id.to_i) || Role.givable.first m = Member.new(:user => User.current, :roles => [r]) project = ProjectInfo.new(:user_id => User.current.id, :project_id => @project.id) @@ -587,7 +589,7 @@ class ProjectsController < ApplicationController end @project.members << m @project.project_infos << project - end + #end respond_to do |format| format.html { flash[:notice] = l(:notice_successful_create) @@ -595,7 +597,7 @@ class ProjectsController < ApplicationController attrs = {:parent_id => @project.parent_id}.reject {|k,v| v.nil?} redirect_to new_project_path(attrs, :course => '0') #Added by young - + elsif params[:course_continue] redirect_to new_project_path(:course => '1') #Ended by young @@ -844,6 +846,7 @@ class ProjectsController < ApplicationController def update @project.safe_attributes = params[:project] + @project.dts_test = params[:project][:dts_test] if validate_parent_id && @project.save @course = Course.find_by_extra(@project.identifier) unless @course.nil? diff --git a/app/controllers/users_controller.rb b/app/controllers/users_controller.rb index a3d512b5d..36e57de5a 100644 --- a/app/controllers/users_controller.rb +++ b/app/controllers/users_controller.rb @@ -329,7 +329,7 @@ class UsersController < ApplicationController when 'xml', 'json' @offset, @limit = api_offset_and_limit({:limit => 15}) else - @limit = 15#per_page_option + @limit = 15#per_page_option end @status = params[:status] || 1 diff --git a/app/models/course.rb b/app/models/course.rb index 248f80e0b..f68832476 100644 --- a/app/models/course.rb +++ b/app/models/course.rb @@ -108,6 +108,11 @@ class Course < ActiveRecord::Base #description.gsub(/^(.{#{length}}[^\n\r]*).*$/m, '\1...').strip if description end + # 课程的短名称信息 + def short_name(length = 8) + name.gsub(/<\/?.*?>/,"").html_safe if name + end + def strip_html(html) return html if html.empty? || !html.include?('<') output = "" @@ -300,7 +305,7 @@ class Course < ActiveRecord::Base end #项目与课程分离后,很多课程的名称等信息为空,这些数据信息存储在项目表中!!就是数据兼容的问题 - def name - read_attribute('name') || Project.find_by_identifier(self.extra).try(:name) - end + #def name + # read_attribute('name') || Project.find_by_identifier(self.extra).try(:name) + #end end diff --git a/app/views/bids/_homework_list.html.erb b/app/views/bids/_homework_list.html.erb index 9f6b45dbd..a8f1f4356 100644 --- a/app/views/bids/_homework_list.html.erb +++ b/app/views/bids/_homework_list.html.erb @@ -86,10 +86,12 @@ - + 开发项目:  <% if homework.project != nil %> + <%= link_to homework.project.name,project_path(homework.project.id)%> + <% else %> 暂无 <% end %> diff --git a/app/views/bids/show_courseEx.html.erb b/app/views/bids/show_courseEx.html.erb index 039de6b7a..992abfd96 100644 --- a/app/views/bids/show_courseEx.html.erb +++ b/app/views/bids/show_courseEx.html.erb @@ -1,4 +1,4 @@ -<% if @bid.homework_type == Bid::HomeworkFile %> +<% if @bid.homework_type %> <%= render :partial => 'homework' %> diff --git a/app/views/courses/show.html.erb b/app/views/courses/show.html.erb index f0cc62140..8b713476e 100644 --- a/app/views/courses/show.html.erb +++ b/app/views/courses/show.html.erb @@ -58,39 +58,65 @@ <% end -%> + <% if (@events_pages.page == @events_pages.last_page) %> +
+ + + + + +
<%= image_tag(url_to_avatar(@user), :class => "avatar") %> + + + + + +
+ <% if @canShowRealName %> + (<%= link_to_user(@user, @canShowRealName) %> + ) + <% else %> + <%= link_to_user(@user)%> + <% end %> + <%= l(:label_user_create_project) %> <%= link_to @course.name %> + !
<%= l :label_create_time %> + : <%= format_time(@course.created_at) %> +
+
+
+ <% end %> + + <%else%> +
+ + + + + +
<%= image_tag(url_to_avatar(@user), :class => "avatar") %> + + + + + +
+ <% if @canShowRealName %> + (<%= link_to_user(@user, @canShowRealName) %> + ) + <% else %> + <%= link_to_user(@user)%> + <% end %> + + <%= l(:label_user_create_project) %> <%= link_to @course.name %> + !
<%= l :label_create_time %> + : <%= format_time(@course.created_at) %> +
+
<% end %> -
- - - - - -
<%= image_tag(url_to_avatar(@user), :class => "avatar") %> - - - - - -
- <% - #判断是否显示真名 - if @canShowRealName - %> - <%= link_to (h @user.try(:name)), user_path(@user) if @user %> - (<%= link_to (h @user.try(:realname)), user_path(@user) if @user %>) - <% else %> - <%= link_to (h @user.try(:name)), user_path(@user) if @user %> - <% end %> - <%= l(:label_user_create_project) %> <%= link_to @course.name %> - !
<%= l :label_create_time %> - : <%= format_time(@course.created_at) %> -
-
-
<%= f.hidden_field :lock_version %> diff --git a/app/views/layouts/_base_header.html.erb b/app/views/layouts/_base_header.html.erb index 9b03fd776..bd21c4fff 100644 --- a/app/views/layouts/_base_header.html.erb +++ b/app/views/layouts/_base_header.html.erb @@ -45,7 +45,7 @@ @@ -54,7 +54,7 @@
  • <%= link_to l(:label_my_projects), {:controller => 'users', :action => 'user_projects', id: User.current.id, host: Setting.project_domain} %>
  • diff --git a/app/views/projects/_form.html.erb b/app/views/projects/_form.html.erb index 420cc5100..f5781b26a 100644 --- a/app/views/projects/_form.html.erb +++ b/app/views/projects/_form.html.erb @@ -15,6 +15,9 @@

    <%= f.check_box :is_public, :style => "margin-left:10px;" %>

    <%= f.check_box :hidden_repo, :style => "margin-left:10px;" %>

    +

    + <%= f.check_box :dts_test, :style => "margin-left:10px;" %> +

    <%= f.text_field :project_type, :value => 0 %>

    <%= wikitoolbar_for 'project_description' %> diff --git a/app/views/projects/_tools_expand.html.erb b/app/views/projects/_tools_expand.html.erb index d5aadc419..aec1ad7a2 100644 --- a/app/views/projects/_tools_expand.html.erb +++ b/app/views/projects/_tools_expand.html.erb @@ -14,7 +14,9 @@
  • <%= link_to l(:project_module_gantt) ,project_gantt_path(@project) %>
  • diff --git a/app/views/projects/new.html.erb b/app/views/projects/new.html.erb index aa03a1cc1..e1637e94b 100644 --- a/app/views/projects/new.html.erb +++ b/app/views/projects/new.html.erb @@ -5,17 +5,22 @@
    <%= render :partial => 'course_form', :locals => { :f => f } %> - <%= submit_tag l(:button_create), :class => "enterprise"%> - + + <%= submit_tag l(:button_create), :class => "enterprise"%> + +
    + <% else %>

    <%=l(:label_project_new)%>

    <%=raw l(:label_project_new_description)%>

    <%= render :partial => 'form', :locals => { :f => f } %> - <%= submit_tag l(:button_create), :class => "enterprise"%> - + + <%= submit_tag l(:button_create), :class => "enterprise"%> + +
    + <% end %> <%= javascript_tag "$('#project_name').focus();" %> - <% end %> diff --git a/app/views/projects/show.html.erb b/app/views/projects/show.html.erb index 04fb4eb7c..5367f9f7c 100644 --- a/app/views/projects/show.html.erb +++ b/app/views/projects/show.html.erb @@ -1,77 +1,103 @@ <% if @events_by_day.size >0 %> -
    -

    - <%= l(:label_date_from_to, :start => format_date(@date_to - @days), :end => format_date(@date_to-1)) %> -

    +
    +

    + <%= l(:label_date_from_to, :start => format_date(@date_to - @days), :end => format_date(@date_to-1)) %> +

    - <% @events_by_day.keys.sort.reverse.each do |day| %> - <% sort_activity_events(@events_by_day[day]).each do |e, in_group| -%> -
    -
    - <%= image_tag(url_to_avatar(e.event_author), :class => "avatar")%> -
    -
    - <%= h(e.project) if @project.nil? || @project.id != e.project.id %> + <% @events_by_day.keys.sort.reverse.each do |day| %> + <% sort_activity_events(@events_by_day[day]).each do |e, in_group| -%> +
    +
    + <%= image_tag(url_to_avatar(e.event_author), :class => "avatar") %> +
    +
    + <%= h(e.project) if @project.nil? || @project.id != e.project.id %> <% if @canShowRealName %> - <%= link_to_user(e.event_author) if e.respond_to?(:event_author) %>(<%= link_to_user(e.event_author,@canShowRealName) if e.respond_to?(:event_author) %>) + <%= link_to_user(e.event_author) if e.respond_to?(:event_author) %> + (<%= link_to_user(e.event_author, @canShowRealName) if e.respond_to?(:event_author) %>) <% else %> <%= link_to_user(e.event_author) if e.respond_to?(:event_author) %> <% end %> <%= l(:label_new_activity) %> - <%= link_to "#{eventToLanguageCourse(e.event_type, @project)}: "<< format_activity_title(e.event_title), (e.event_type.eql?("attachment")&&e.container.kind_of?(Project)) ? project_files_path(e.container) : e.event_url %> + <%= link_to "#{eventToLanguageCourse(e.event_type, @project)}: "<< format_activity_title(e.event_title), (e.event_type.eql?("attachment")&&e.container.kind_of?(Project)) ? project_files_path(e.container) : e.event_url %> + +
    + <%= h(truncate(strip_tags(e.event_description).gsub(/ /, ' '), length: 30, omission: '...')) %> +
    +
    + <%= l :label_activity_time %> + :  <%= format_activity_day(day) %> <%= format_time(e.event_datetime, false) %> + <% if e.event_type == "issue" %> +
    + <%= link_to l(:label_find_all_comments), issue_path(e) %> <%= l(:label_comments_count, :count => e.journals.count) %> +
    + <% end %> +
    +
    +
    -
    - <%= h(truncate(strip_tags(e.event_description).gsub(/ /,' '), length: 30, omission:'...')) %> -
    -
    - <%= l :label_activity_time %>:  <%= format_activity_day(day) %> <%= format_time(e.event_datetime, false) %> - <% if e.event_type == "issue" %> -
    - <%= link_to l(:label_find_all_comments), issue_path(e) %> <%= l(:label_comments_count, :count => e.journals.count)%> -
    <% end %> -
    -
    -
    - - <% end %> - <% end -%> - <% if(@events_pages.page == @events_pages.last_page) %> -
    -
    - <%= image_tag(url_to_avatar(@user), :class => "avatar") %> -
    -
    + <% end -%> + <% if (@events_pages.page == @events_pages.last_page) %> +
    +
    + <%= image_tag(url_to_avatar(@user), :class => "avatar") %> +
    +
    - <% if @canShowRealName %> - <%= link_to (h @user.try(:name)), user_path(@user) if @user %>(<%= link_to (h @user.try(:realname)), user_path(@user) if @user %>) - <% else %> - <%= link_to (h @user.try(:name)), user_path(@user) if @user %> - <% end %> + <% if @canShowRealName %> + (<%= link_to_user(@user, @canShowRealName) %> + ) + <% else %> + <%= link_to_user(@user) %> + <% end %> <%#= l(:label_new_activity) %> - <%= l(:label_user_create_project) %> <%= link_to @project.name %> ! -
    + <%= l(:label_user_create_project) %> <%= link_to @project.name %> + ! +
    +
    +
    + <%= l :label_activity_time %>: <%= format_time(@project.created_on) %> +
    +
    +
    + <% end %> +
    +<% else %> +
    +
    + <%= image_tag(url_to_avatar(@user), :class => "avatar") %>
    -
    - <%= l :label_activity_time %>: <%= format_time(@project.created_on) %> +
    + + <% if @canShowRealName %> + (<%= link_to_user(@user, @canShowRealName) %> + ) + <% else %> + <%= link_to_user(@user) %> + <% end %> + <%#= l(:label_new_activity) %> + + <%= l(:label_user_create_project) %> <%= link_to @project.name %> + ! +
    +
    +
    + <%= l :label_activity_time %>: <%= format_time(@project.created_on) %> +
    -
    - <% end %> -
    -<%end%> - - +<% end %> diff --git a/app/views/school/index.html.erb b/app/views/school/index.html.erb index 8a5aa5f49..47ac3f968 100644 --- a/app/views/school/index.html.erb +++ b/app/views/school/index.html.erb @@ -50,8 +50,14 @@ +
    - <%= form_tag(:controller => 'users', :action => 'search', :method => :get) do %> + <%= form_tag( users_search_path, :method => :get, :id => 'search_user_form') do %> @@ -9,8 +21,9 @@ diff --git a/app/views/users/search.html.erb b/app/views/users/search.html.erb index 307803b1d..98becc197 100644 --- a/app/views/users/search.html.erb +++ b/app/views/users/search.html.erb @@ -1,7 +1,17 @@ - +
    - <%= form_tag(:controller => 'users', :action => 'search', :method => :get) do %> + <%= form_tag( users_search_path, :method => :get, :id => 'search_user_form') do %>
    <%= l(:label_software_user ) %>
    @@ -10,8 +20,9 @@ diff --git a/config/locales/zh.yml b/config/locales/zh.yml index b1ec95186..96c7b0560 100644 --- a/config/locales/zh.yml +++ b/config/locales/zh.yml @@ -1904,6 +1904,7 @@ zh: field_teacher_name: 教 师 field_hidden_repo: 隐藏代码库 + field_dts_test: DTS测试工具 label_newbie_faq: '新手指引 & 问答' label_hot_project: '热门项目' diff --git a/db/migrate/20140715015540_dst_test.rb b/db/migrate/20140715015540_dst_test.rb new file mode 100644 index 000000000..46d592d58 --- /dev/null +++ b/db/migrate/20140715015540_dst_test.rb @@ -0,0 +1,9 @@ +class DstTest < ActiveRecord::Migration + def up + add_column :projects, :dts_test, :integer, :default => 0 + end + + def down + remove_column :projects, :dts_test + end +end diff --git a/plugins/redmine_ckeditor/assets/ckeditor/ckeditor.js b/plugins/redmine_ckeditor/assets/ckeditor/ckeditor.js index 39e27dc7a..48e4c510d 100644 --- a/plugins/redmine_ckeditor/assets/ckeditor/ckeditor.js +++ b/plugins/redmine_ckeditor/assets/ckeditor/ckeditor.js @@ -1,978 +1,15553 @@ /* -Copyright (c) 2003-2014, CKSource - Frederico Knabben. All rights reserved. -For licensing, see LICENSE.html or http://ckeditor.com/license -*/ -(function(){if(window.CKEDITOR&&window.CKEDITOR.dom)return;window.CKEDITOR||(window.CKEDITOR=function(){var a={timestamp:"E0LB",version:"4.3.2",revision:"ba625e6",rnd:Math.floor(900*Math.random())+100,_:{pending:[]},status:"unloaded",basePath:function(){var b=window.CKEDITOR_BASEPATH||"";if(!b)for(var d=document.getElementsByTagName("script"),a=0;a=0;o--)if(n[o].priority<=m){n.splice(o+1,0,j);return{removeListener:i}}n.unshift(j)}return{removeListener:i}}, -once:function(){var b=arguments[1];arguments[1]=function(d){d.removeListener();return b.apply(this,arguments)};return this.on.apply(this,arguments)},capture:function(){CKEDITOR.event.useCapture=1;var b=this.on.apply(this,arguments);CKEDITOR.event.useCapture=0;return b},fire:function(){var b=0,d=function(){b=1},a=0,h=function(){a=1};return function(m,j,i){var n=e(this)[m],m=b,r=a;b=a=0;if(n){var o=n.listeners;if(o.length)for(var o=o.slice(0),u,f=0;f=0&&a.listeners.splice(h,1)}},removeAllListeners:function(){var b=e(this),d;for(d in b)delete b[d]},hasListeners:function(b){return(b=e(this)[b])&&b.listeners.length>0}}}()); -CKEDITOR.editor||(CKEDITOR.editor=function(){CKEDITOR._.pending.push([this,arguments]);CKEDITOR.event.call(this)},CKEDITOR.editor.prototype.fire=function(a,e){a in{instanceReady:1,loaded:1}&&(this[a]=true);return CKEDITOR.event.prototype.fire.call(this,a,e,this)},CKEDITOR.editor.prototype.fireOnce=function(a,e){a in{instanceReady:1,loaded:1}&&(this[a]=true);return CKEDITOR.event.prototype.fireOnce.call(this,a,e,this)},CKEDITOR.event.implementOn(CKEDITOR.editor.prototype)); -CKEDITOR.env||(CKEDITOR.env=function(){var a=navigator.userAgent.toLowerCase(),e=window.opera,b={ie:a.indexOf("trident/")>-1,opera:!!e&&e.version,webkit:a.indexOf(" applewebkit/")>-1,air:a.indexOf(" adobeair/")>-1,mac:a.indexOf("macintosh")>-1,quirks:document.compatMode=="BackCompat"&&(!document.documentMode||document.documentMode<10),mobile:a.indexOf("mobile")>-1,iOS:/(ipad|iphone|ipod)/.test(a),isCustomDomain:function(){if(!this.ie)return false;var d=document.domain,b=window.location.hostname;return d!= -b&&d!="["+b+"]"},secure:location.protocol=="https:"};b.gecko=navigator.product=="Gecko"&&!b.webkit&&!b.opera&&!b.ie;if(b.webkit)a.indexOf("chrome")>-1?b.chrome=true:b.safari=true;var c=0;if(b.ie){c=b.quirks||!document.documentMode?parseFloat(a.match(/msie (\d+)/)[1]):document.documentMode;b.ie9Compat=c==9;b.ie8Compat=c==8;b.ie7Compat=c==7;b.ie6Compat=c<7||b.quirks}if(b.gecko){var d=a.match(/rv:([\d\.]+)/);if(d){d=d[1].split(".");c=d[0]*1E4+(d[1]||0)*100+(d[2]||0)*1}}b.opera&&(c=parseFloat(e.version())); -b.air&&(c=parseFloat(a.match(/ adobeair\/(\d+)/)[1]));b.webkit&&(c=parseFloat(a.match(/ applewebkit\/(\d+)/)[1]));b.version=c;b.isCompatible=b.iOS&&c>=534||!b.mobile&&(b.ie&&c>6||b.gecko&&c>=10801||b.opera&&c>=9.5||b.air&&c>=1||b.webkit&&c>=522||false);b.hidpi=window.devicePixelRatio>=2;b.needsBrFiller=b.gecko||b.webkit||b.ie&&c>10;b.needsNbspFiller=b.ie&&c<11;b.cssClass="cke_browser_"+(b.ie?"ie":b.gecko?"gecko":b.opera?"opera":b.webkit?"webkit":"unknown");if(b.quirks)b.cssClass=b.cssClass+" cke_browser_quirks"; -if(b.ie){b.cssClass=b.cssClass+(" cke_browser_ie"+(b.quirks||b.version<7?"6":b.version));if(b.quirks)b.cssClass=b.cssClass+" cke_browser_iequirks"}if(b.gecko)if(c<10900)b.cssClass=b.cssClass+" cke_browser_gecko18";else if(c<=11E3)b.cssClass=b.cssClass+" cke_browser_gecko19";if(b.air)b.cssClass=b.cssClass+" cke_browser_air";if(b.iOS)b.cssClass=b.cssClass+" cke_browser_ios";if(b.hidpi)b.cssClass=b.cssClass+" cke_hidpi";return b}()); -"unloaded"==CKEDITOR.status&&function(){CKEDITOR.event.implementOn(CKEDITOR);CKEDITOR.loadFullCore=function(){if(CKEDITOR.status!="basic_ready")CKEDITOR.loadFullCore._load=1;else{delete CKEDITOR.loadFullCore;var a=document.createElement("script");a.type="text/javascript";a.src=CKEDITOR.basePath+"ckeditor.js";document.getElementsByTagName("head")[0].appendChild(a)}};CKEDITOR.loadFullCoreTimeout=0;CKEDITOR.add=function(a){(this._.pending||(this._.pending=[])).push(a)};(function(){CKEDITOR.domReady(function(){var a= -CKEDITOR.loadFullCore,e=CKEDITOR.loadFullCoreTimeout;if(a){CKEDITOR.status="basic_ready";a&&a._load?a():e&&setTimeout(function(){CKEDITOR.loadFullCore&&CKEDITOR.loadFullCore()},e*1E3)}})})();CKEDITOR.status="basic_loaded"}();CKEDITOR.dom={}; -(function(){var a=[],e=CKEDITOR.env.gecko?"-moz-":CKEDITOR.env.webkit?"-webkit-":CKEDITOR.env.opera?"-o-":CKEDITOR.env.ie?"-ms-":"";CKEDITOR.on("reset",function(){a=[]});CKEDITOR.tools={arrayCompare:function(b,a){if(!b&&!a)return true;if(!b||!a||b.length!=a.length)return false;for(var d=0;d"+a+""):d.push('');return d.join("")},htmlEncode:function(b){return(""+b).replace(/&/g,"&").replace(/>/g,">").replace(//g,">")},htmlDecodeAttr:function(b){return b.replace(/"/g,'"').replace(/</g,"<").replace(/>/g,">")},getNextNumber:function(){var b=0;return function(){return++b}}(),getNextId:function(){return"cke_"+this.getNextNumber()},override:function(b,a){var d=a(b);d.prototype=b.prototype;return d},setTimeout:function(b,a,d,g,e){e||(e=window);d||(d=e);return e.setTimeout(function(){g?b.apply(d,[].concat(g)): -b.apply(d)},a||0)},trim:function(){var b=/(?:^[ \t\n\r]+)|(?:[ \t\n\r]+$)/g;return function(a){return a.replace(b,"")}}(),ltrim:function(){var b=/^[ \t\n\r]+/g;return function(a){return a.replace(b,"")}}(),rtrim:function(){var b=/[ \t\n\r]+$/g;return function(a){return a.replace(b,"")}}(),indexOf:function(b,a){if(typeof a=="function")for(var d=0,g=b.length;d=0?b[d]:null},bind:function(b,a){return function(){return b.apply(a,arguments)}},createClass:function(b){var a=b.$,d=b.base,g=b.privates||b._,e=b.proto,b=b.statics;!a&&(a=function(){d&&this.base.apply(this,arguments)});if(g)var m=a,a=function(){var d=this._||(this._={}),a;for(a in g){var b=g[a];d[a]=typeof b=="function"?CKEDITOR.tools.bind(b,this):b}m.apply(this,arguments)};if(d){a.prototype=this.prototypedCopy(d.prototype);a.prototype.constructor=a;a.base= -d;a.baseProto=d.prototype;a.prototype.base=function(){this.base=d.prototype.base;d.apply(this,arguments);this.base=arguments.callee}}e&&this.extend(a.prototype,e,true);b&&this.extend(a,b,true);return a},addFunction:function(b,c){return a.push(function(){return b.apply(c||this,arguments)})-1},removeFunction:function(b){a[b]=null},callFunction:function(b){var c=a[b];return c&&c.apply(window,Array.prototype.slice.call(arguments,1))},cssLength:function(){var a=/^-?\d+\.?\d*px$/,c;return function(d){c= -CKEDITOR.tools.trim(d+"")+"px";return a.test(c)?c:d||""}}(),convertToPx:function(){var a;return function(c){if(!a){a=CKEDITOR.dom.element.createFromHtml('
    ',CKEDITOR.document);CKEDITOR.document.getBody().append(a)}if(!/%$/.test(c)){a.setStyle("width",c);return a.$.clientWidth}return c}}(),repeat:function(a,c){return Array(c+1).join(a)},tryThese:function(){for(var a,c=0,d=arguments.length;c8)&&e)a=e+":"+a;return new CKEDITOR.dom.nodeList(this.$.getElementsByTagName(a))},getHead:function(){var a=this.$.getElementsByTagName("head")[0];return a= -a?new CKEDITOR.dom.element(a):this.getDocumentElement().append(new CKEDITOR.dom.element("head"),true)},getBody:function(){return new CKEDITOR.dom.element(this.$.body)},getDocumentElement:function(){return new CKEDITOR.dom.element(this.$.documentElement)},getWindow:function(){return new CKEDITOR.dom.window(this.$.parentWindow||this.$.defaultView)},write:function(a){this.$.open("text/html","replace");CKEDITOR.env.ie&&(a=a.replace(/(?:^\s*]*?>)|^/i,'$&\n
    <%= l(:label_software_user ) %>