JQuery in, Prototype/Scriptaculous out (#11445).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10068 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
1 parent
387836f8aa
commit
6a2ca5e034
122 files changed
+1431
-10962
No files matched your search
@@ -20,7 +20,7 @@ class AutoCompletesController < ApplicationController
|
||||
|
||||
def issues
|
||||
@issues = []
|
||||
q = params[:q].to_s
|
||||
q = (params[:q] || params[:term]).to_s
|
||||
query = (params[:scope] == "all" && Setting.cross_project_issue_relations?) ? Issue : @project.issues
|
||||
if q.match(/^\d+$/)
|
||||
@issues << query.visible.find_by_id(q.to_i)
|
||||
|
||||
@@ -179,7 +179,8 @@ class MyController < ApplicationController
|
||||
group = params[:group]
|
||||
@user = User.current
|
||||
if group.is_a?(String)
|
||||
group_items = (params["list-#{group}"] || []).collect(&:underscore)
|
||||
group_items = (params["blocks"] || []).collect(&:underscore)
|
||||
group_items.each {|s| s.sub!(/^block_/, '')}
|
||||
if group_items and group_items.is_a? Array
|
||||
layout = @user.pref[:my_page_layout] || {}
|
||||
# remove group blocks if they are presents in other groups
|
||||
|
||||
@@ -42,7 +42,6 @@ class RepositoriesController < ApplicationController
|
||||
@repository = Repository.factory(scm)
|
||||
@repository.is_default = @project.repository.nil?
|
||||
@repository.project = @project
|
||||
render :layout => !request.xhr?
|
||||
end
|
||||
|
||||
def create
|
||||
|
||||
@@ -43,13 +43,6 @@ module ApplicationHelper
|
||||
link_to(name, options, html_options, *parameters_for_method_reference) if authorize_for(options[:controller] || params[:controller], options[:action])
|
||||
end
|
||||
|
||||
# Display a link to remote if user is authorized
|
||||
def link_to_remote_if_authorized(name, options = {}, html_options = nil)
|
||||
ActiveSupport::Deprecation.warn "ApplicationHelper#link_to_remote_if_authorized is deprecated and will be removed in Redmine 2.2."
|
||||
url = options[:url] || {}
|
||||
link_to_remote(name, options, html_options) if authorize_for(url[:controller] || params[:controller], url[:action])
|
||||
end
|
||||
|
||||
# Displays a link to user's account page if active
|
||||
def link_to_user(user, options={})
|
||||
if user.is_a?(User)
|
||||
@@ -161,8 +154,8 @@ module ApplicationHelper
|
||||
end
|
||||
|
||||
def toggle_link(name, id, options={})
|
||||
onclick = "Element.toggle('#{id}'); "
|
||||
onclick << (options[:focus] ? "Form.Element.focus('#{options[:focus]}'); " : "this.blur(); ")
|
||||
onclick = "$('##{id}').toggle(); "
|
||||
onclick << (options[:focus] ? "$('##{options[:focus]}').focus(); " : "this.blur(); ")
|
||||
onclick << "return false;"
|
||||
link_to(name, "#", :onclick => onclick)
|
||||
end
|
||||
@@ -175,11 +168,6 @@ module ApplicationHelper
|
||||
}))
|
||||
end
|
||||
|
||||
def prompt_to_remote(name, text, param, url, html_options = {})
|
||||
html_options[:onclick] = "promptToRemote('#{text}', '#{param}', '#{url_for(url)}'); return false;"
|
||||
link_to name, {}, html_options
|
||||
end
|
||||
|
||||
def format_activity_title(text)
|
||||
h(truncate_single_line(text, :length => 100))
|
||||
end
|
||||
@@ -1042,7 +1030,7 @@ module ApplicationHelper
|
||||
end
|
||||
@context_menu_included = true
|
||||
end
|
||||
javascript_tag "new ContextMenu('#{ url_for(url) }')"
|
||||
javascript_tag "contextMenuInit('#{ url_for(url) }')"
|
||||
end
|
||||
|
||||
def calendar_for(field_id)
|
||||
@@ -1173,9 +1161,9 @@ module ApplicationHelper
|
||||
|
||||
# Returns the javascript tags that are included in the html layout head
|
||||
def javascript_heads
|
||||
tags = javascript_include_tag('prototype', 'effects', 'dragdrop', 'controls', 'rails', 'application')
|
||||
tags = javascript_include_tag('jquery-1.7.2-ui-1.8.21-ujs-2.0.2', 'application')
|
||||
unless User.current.pref.warn_on_leaving_unsaved == '0'
|
||||
tags << "\n".html_safe + javascript_tag("Event.observe(window, 'load', function(){ new WarnLeavingUnsaved('#{escape_javascript( l(:text_warn_on_leaving_unsaved) )}'); });")
|
||||
tags << "\n".html_safe + javascript_tag("$(window).load(function(){ warnLeavingUnsaved('#{escape_javascript l(:text_warn_on_leaving_unsaved)}'); });")
|
||||
end
|
||||
tags
|
||||
end
|
||||
|
||||
@@ -29,7 +29,7 @@ module JournalsHelper
|
||||
:method => 'post',
|
||||
:title => l(:button_quote)) if options[:reply_links]
|
||||
links << link_to_in_place_notes_editor(image_tag('edit.png'), "journal-#{journal.id}-notes",
|
||||
{ :controller => 'journals', :action => 'edit', :id => journal },
|
||||
{ :controller => 'journals', :action => 'edit', :id => journal, :format => 'js' },
|
||||
:title => l(:button_edit)) if editable
|
||||
end
|
||||
content << content_tag('div', links.join(' ').html_safe, :class => 'contextual') unless links.empty?
|
||||
@@ -40,7 +40,7 @@ module JournalsHelper
|
||||
end
|
||||
|
||||
def link_to_in_place_notes_editor(text, field_id, url, options={})
|
||||
onclick = "new Ajax.Request('#{url_for(url)}', {asynchronous:true, evalScripts:true, method:'get'}); return false;"
|
||||
onclick = "$.ajax({url: '#{url_for(url)}', type: 'get'}); return false;"
|
||||
link_to text, '#', options.merge(:onclick => onclick)
|
||||
end
|
||||
end
|
||||
@@ -141,12 +141,7 @@ module RepositoriesHelper
|
||||
select_tag('repository_scm',
|
||||
options_for_select(scm_options, repository.class.name.demodulize),
|
||||
:disabled => (repository && !repository.new_record?),
|
||||
:onchange => remote_function(
|
||||
:url => new_project_repository_path(@project),
|
||||
:method => :get,
|
||||
:update => 'content',
|
||||
:with => "Form.serialize(this.form)")
|
||||
)
|
||||
:data => {:remote => true, :method => 'get'})
|
||||
end
|
||||
|
||||
def with_leading_slash(path)
|
||||
|
||||
@@ -36,7 +36,7 @@
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<%= javascript_tag "Form.Element.focus('username');" %>
|
||||
<%= javascript_tag "$('#username').focus();" %>
|
||||
<% end %>
|
||||
</div>
|
||||
<%= call_hook :view_account_login_bottom %>
|
||||
@@ -1,9 +1,7 @@
|
||||
<ul>
|
||||
<% if @issues.any? -%>
|
||||
<% @issues.each do |issue| -%>
|
||||
<%= content_tag 'li', h("#{issue.tracker} ##{issue.id}: #{issue.subject}"), :id => issue.id %>
|
||||
<% end -%>
|
||||
<% else -%>
|
||||
<%= content_tag("li", l(:label_none), :style => 'display:none') %>
|
||||
<% end -%>
|
||||
</ul>
|
||||
<%= raw @issues.map {|issue| {
|
||||
'id' => issue.id,
|
||||
'label' => "#{issue.tracker} ##{issue.id}: #{truncate issue.subject.to_s, :length => 60}",
|
||||
'value' => issue.id
|
||||
}
|
||||
}.to_json
|
||||
%>
|
||||
@@ -4,7 +4,7 @@
|
||||
<%= link_to_if_authorized l(:label_message_new),
|
||||
{:controller => 'messages', :action => 'new', :board_id => @board},
|
||||
:class => 'icon icon-add',
|
||||
:onclick => 'Element.show("add-message"); Form.Element.focus("message_subject"); return false;' %>
|
||||
:onclick => 'showAndScrollTo("add-message", "message_subject"); return false;' %>
|
||||
<%= watcher_tag(@board, User.current) %>
|
||||
</div>
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
<%= render :partial => 'messages/form', :locals => {:f => f} %>
|
||||
<p><%= submit_tag l(:button_create) %>
|
||||
<%= preview_link({:controller => 'messages', :action => 'preview', :board_id => @board}, 'message-form') %> |
|
||||
<%= link_to l(:button_cancel), "#", :onclick => 'Element.hide("add-message")' %></p>
|
||||
<%= link_to l(:button_cancel), "#", :onclick => '$("#add-message").hide(); return false;' %></p>
|
||||
<% end %>
|
||||
<div id="preview" class="wiki"></div>
|
||||
<% end %>
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
<%= label_tag('year', l(:label_year)) %>
|
||||
<%= select_year(@year, :prefix => "year", :discard_type => true) %>
|
||||
|
||||
<%= link_to_function l(:button_apply), '$("query_form").submit()', :class => 'icon icon-checked' %>
|
||||
<%= link_to_function l(:button_apply), '$("#query_form").submit()', :class => 'icon icon-checked' %>
|
||||
<%= link_to l(:button_clear), { :project_id => @project, :set_filter => 1 }, :class => 'icon icon-reload' %>
|
||||
</p>
|
||||
<% end %>
|
||||
|
||||
@@ -16,8 +16,8 @@
|
||||
</div>
|
||||
|
||||
<script>
|
||||
Event.observe(window, 'load', function() { displayTabsButtons(); });
|
||||
Event.observe(window, 'resize', function() { displayTabsButtons(); });
|
||||
$(document).ready(displayTabsButtons);
|
||||
$(window).resize(displayTabsButtons);
|
||||
</script>
|
||||
|
||||
<% tabs.each do |tab| -%>
|
||||
|
||||
@@ -3,63 +3,65 @@
|
||||
<script type="text/javascript">
|
||||
//<![CDATA[
|
||||
function toggle_custom_field_format() {
|
||||
format = $("custom_field_field_format");
|
||||
p_length = $("custom_field_min_length");
|
||||
p_regexp = $("custom_field_regexp");
|
||||
p_values = $("custom_field_possible_values");
|
||||
p_searchable = $("custom_field_searchable");
|
||||
p_default = $("custom_field_default_value");
|
||||
p_multiple = $("custom_field_multiple");
|
||||
var format = $("#custom_field_field_format").val();
|
||||
var p_length = $("#custom_field_min_length");
|
||||
var p_regexp = $("#custom_field_regexp");
|
||||
var p_values = $("#custom_field_possible_values");
|
||||
var p_searchable = $("#custom_field_searchable");
|
||||
var p_default = $("#custom_field_default_value");
|
||||
var p_multiple = $("#custom_field_multiple");
|
||||
// can't change type on JQuery objects
|
||||
var p_default2 = document.getElementById("custom_field_default_value");
|
||||
|
||||
p_default.setAttribute('type','text');
|
||||
Element.show(p_default.parentNode);
|
||||
p_default2.type = 'text';
|
||||
p_default.parent().show();
|
||||
|
||||
switch (format.value) {
|
||||
switch (format) {
|
||||
case "list":
|
||||
Element.hide(p_length.parentNode);
|
||||
Element.hide(p_regexp.parentNode);
|
||||
if (p_searchable) Element.show(p_searchable.parentNode);
|
||||
Element.show(p_values.parentNode);
|
||||
Element.show(p_multiple.parentNode);
|
||||
p_length.parent().hide();
|
||||
p_regexp.parent().hide();
|
||||
p_searchable.parent().show();
|
||||
p_values.parent().show();
|
||||
p_multiple.parent().show();
|
||||
break;
|
||||
case "bool":
|
||||
p_default.setAttribute('type','checkbox');
|
||||
Element.hide(p_length.parentNode);
|
||||
Element.hide(p_regexp.parentNode);
|
||||
if (p_searchable) Element.hide(p_searchable.parentNode);
|
||||
Element.hide(p_values.parentNode);
|
||||
Element.hide(p_multiple.parentNode);
|
||||
p_default2.type = 'checkbox';
|
||||
p_length.parent().hide();
|
||||
p_regexp.parent().hide();
|
||||
p_searchable.parent().hide();
|
||||
p_values.parent().hide();
|
||||
p_multiple.parent().hide();
|
||||
break;
|
||||
case "date":
|
||||
Element.hide(p_length.parentNode);
|
||||
Element.hide(p_regexp.parentNode);
|
||||
if (p_searchable) Element.hide(p_searchable.parentNode);
|
||||
Element.hide(p_values.parentNode);
|
||||
Element.hide(p_multiple.parentNode);
|
||||
p_length.parent().hide();
|
||||
p_regexp.parent().hide();
|
||||
p_searchable.parent().hide();
|
||||
p_values.parent().hide();
|
||||
p_multiple.parent().hide();
|
||||
break;
|
||||
case "float":
|
||||
case "int":
|
||||
Element.show(p_length.parentNode);
|
||||
Element.show(p_regexp.parentNode);
|
||||
if (p_searchable) Element.hide(p_searchable.parentNode);
|
||||
Element.hide(p_values.parentNode);
|
||||
Element.hide(p_multiple.parentNode);
|
||||
p_length.parent().show();
|
||||
p_regexp.parent().show();
|
||||
p_searchable.parent().hide();
|
||||
p_values.parent().hide();
|
||||
p_multiple.parent().hide();
|
||||
break;
|
||||
case "user":
|
||||
case "version":
|
||||
Element.hide(p_length.parentNode);
|
||||
Element.hide(p_regexp.parentNode);
|
||||
if (p_searchable) Element.hide(p_searchable.parentNode);
|
||||
Element.hide(p_values.parentNode);
|
||||
Element.hide(p_default.parentNode);
|
||||
Element.show(p_multiple.parentNode);
|
||||
p_length.parent().hide();
|
||||
p_regexp.parent().hide();
|
||||
p_searchable.parent().hide();
|
||||
p_values.parent().hide();
|
||||
p_multiple.parent().show();
|
||||
p_default.parent().hide();
|
||||
break;
|
||||
default:
|
||||
Element.show(p_length.parentNode);
|
||||
Element.show(p_regexp.parentNode);
|
||||
if (p_searchable) Element.show(p_searchable.parentNode);
|
||||
Element.hide(p_values.parentNode);
|
||||
Element.hide(p_multiple.parentNode);
|
||||
p_length.parent().show();
|
||||
p_regexp.parent().show();
|
||||
p_searchable.parent().show();
|
||||
p_values.parent().hide();
|
||||
p_multiple.parent().hide();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<div class="contextual">
|
||||
<%= link_to l(:label_document_new), new_project_document_path(@project), :class => 'icon icon-add',
|
||||
:onclick => 'Element.show("add-document"); Form.Element.focus("document_title"); return false;' if User.current.allowed_to?(:manage_documents, @project) %>
|
||||
:onclick => 'showAndScrollTo("add-document", "document_title"); return false;' if User.current.allowed_to?(:manage_documents, @project) %>
|
||||
</div>
|
||||
|
||||
<div id="add-document" style="display:none;">
|
||||
@@ -9,7 +9,7 @@
|
||||
<%= render :partial => 'form', :locals => {:f => f} %>
|
||||
<p>
|
||||
<%= submit_tag l(:button_create) %>
|
||||
<%= link_to l(:button_cancel), "#", :onclick => 'Element.hide("add-document")' %>
|
||||
<%= link_to l(:button_cancel), "#", :onclick => '$("#add-document").hide(); return false;' %>
|
||||
</p>
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
<%= link_to_attachments @document %>
|
||||
|
||||
<% if authorize_for('documents', 'add_attachment') %>
|
||||
<p><%= link_to l(:label_attachment_new), {}, :onclick => "Element.show('add_attachment_form'); Element.hide(this); Element.scrollTo('add_attachment_form'); return false;",
|
||||
<p><%= link_to l(:label_attachment_new), {}, :onclick => "$('#add_attachment_form').show(); return false;",
|
||||
:id => 'attach_files_link' %></p>
|
||||
<%= form_tag({ :controller => 'documents', :action => 'add_attachment', :id => @document }, :multipart => true, :id => "add_attachment_form", :style => "display:none;") do %>
|
||||
<div class="box">
|
||||
|
||||
@@ -25,14 +25,14 @@
|
||||
<p><%= submit_tag l(:button_change) %>
|
||||
<%= link_to_function(
|
||||
l(:button_cancel),
|
||||
"$('member-#{membership.id}-roles').show(); $('member-#{membership.id}-roles-form').hide(); return false;"
|
||||
"$('#member-#{membership.id}-roles').show(); $('#member-#{membership.id}-roles-form').hide(); return false;"
|
||||
) %></p>
|
||||
<% end %>
|
||||
</td>
|
||||
<td class="buttons">
|
||||
<%= link_to_function(
|
||||
l(:button_edit),
|
||||
"$('member-#{membership.id}-roles').hide(); $('member-#{membership.id}-roles-form').show(); return false;",
|
||||
"$('#member-#{membership.id}-roles').hide(); $('#member-#{membership.id}-roles-form').show(); return false;",
|
||||
:class => 'icon icon-edit'
|
||||
) %>
|
||||
<%= delete_link({:controller => 'groups', :action => 'destroy_membership', :id => @group, :membership_id => membership},
|
||||
|
||||
@@ -29,15 +29,7 @@
|
||||
<fieldset><legend><%=l(:label_user_new)%></legend>
|
||||
|
||||
<p><%= label_tag "user_search", l(:label_user_search) %><%= text_field_tag 'user_search', nil %></p>
|
||||
<%= observe_field(:user_search,
|
||||
:frequency => 0.5,
|
||||
:update => :users,
|
||||
:url => autocomplete_for_user_group_path(@group),
|
||||
:method => :get,
|
||||
:before => '$("user_search").addClassName("ajax-loading")',
|
||||
:complete => '$("user_search").removeClassName("ajax-loading")',
|
||||
:with => 'q')
|
||||
%>
|
||||
<%= javascript_tag "observeSearchfield('user_search', 'users', '#{ escape_javascript autocomplete_for_user_group_path(@group) }')" %>
|
||||
|
||||
<div id="users">
|
||||
<%= principals_check_box_tags 'user_ids[]', users %>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
Element.update('tab-content-users', '<%= escape_javascript(render :partial => 'groups/users') %>');
|
||||
$('#tab-content-users').html('<%= escape_javascript(render :partial => 'groups/users') %>');
|
||||
<% @users.each do |user| %>
|
||||
new Effect.Highlight('user-<%= user.id %>');
|
||||
$('#user-<%= user.id %>').effect("highlight");
|
||||
<% end %>
|
||||
@@ -1 +1 @@
|
||||
Element.update('tab-content-memberships', '<%= escape_javascript(render :partial => 'groups/memberships') %>');
|
||||
$('#tab-content-memberships').html('<%= escape_javascript(render :partial => 'groups/memberships') %>');
|
||||
@@ -1,6 +1,6 @@
|
||||
<% if @membership.valid? %>
|
||||
Element.update('tab-content-memberships', '<%= escape_javascript(render :partial => 'groups/memberships') %>');
|
||||
new Effect.Highlight('member-<%= @membership.id %>');
|
||||
$('#tab-content-memberships').html('<%= escape_javascript(render :partial => 'groups/memberships') %>');
|
||||
$('#member-<%= @membership.id %>').effect("highlight");
|
||||
<% else %>
|
||||
alert('<%= escape_javascript(l(:notice_failed_to_save_members, :errors => @membership.errors.full_messages.join(', '))) %>');
|
||||
<% end %>
|
||||
@@ -1 +1 @@
|
||||
Element.update('tab-content-users', '<%= escape_javascript(render :partial => 'groups/users') %>');
|
||||
$('#tab-content-users').html('<%= escape_javascript(render :partial => 'groups/users') %>');
|
||||
@@ -1,3 +1,3 @@
|
||||
hideModal();
|
||||
<% select = content_tag('select', content_tag('option') + options_from_collection_for_select(@project.issue_categories, 'id', 'name', @category.id), :id => 'issue_category_id', :name => 'issue[category_id]') %>
|
||||
Element.replace('issue_category_id', '<%= escape_javascript(select) %>');
|
||||
$('#issue_category_id').replaceWith('<%= escape_javascript(select) %>');
|
||||
@@ -1,3 +1,2 @@
|
||||
Element.update('ajax-modal', '<%= escape_javascript(render :partial => 'issue_categories/new_modal') %>');
|
||||
$('#ajax-modal').html('<%= escape_javascript(render :partial => 'issue_categories/new_modal') %>');
|
||||
showModal('ajax-modal', '600px');
|
||||
Form.Element.focus('issue_category_name');
|
||||
@@ -9,7 +9,6 @@
|
||||
<%= toggle_link l(:button_cancel), 'new-relation-form'%>
|
||||
</p>
|
||||
|
||||
<div id="related_issue_candidates" class="autocomplete"></div>
|
||||
<%= javascript_tag "observeRelatedIssueField('#{auto_complete_issues_path(:id => @issue, :project_id => @project) }')" %>
|
||||
<%= javascript_tag "observeAutocompleteField('relation_issue_to_id', '#{escape_javascript auto_complete_issues_path(:id => @issue, :project_id => @project, :scope => 'all')}')" %>
|
||||
|
||||
<%= javascript_tag "setPredecessorFieldsVisibility();" %>
|
||||
@@ -1,5 +1,6 @@
|
||||
Element.update('relations', '<%= escape_javascript(render :partial => 'issues/relations') %>');
|
||||
$('#relations').html('<%= escape_javascript(render :partial => 'issues/relations') %>');
|
||||
<% if @relation.errors.empty? %>
|
||||
$('relation_delay').value = ''
|
||||
$('relation_issue_to_id').value = ''
|
||||
$('#relation_delay').val('');
|
||||
$('#relation_issue_to_id').val('');
|
||||
$('#relation_issue_to_id').focus();
|
||||
<% end %>
|
||||
@@ -1 +1 @@
|
||||
Element.remove('<%= "relation-#{@relation.id}" %>');
|
||||
$('#relation-<%= @relation.id %>').remove();
|
||||
@@ -3,9 +3,8 @@
|
||||
<div class="splitcontent">
|
||||
<div class="splitcontentleft">
|
||||
<% if @issue.safe_attribute? 'status_id' %>
|
||||
<p><%= f.select :status_id, (@allowed_statuses.collect {|p| [p.name, p.id]}), :required => true %></p>
|
||||
<%= observe_field :issue_status_id, :url => project_issue_form_path(@project, :id => @issue),
|
||||
:with => "Form.serialize('issue-form')" %>
|
||||
<p><%= f.select :status_id, (@allowed_statuses.collect {|p| [p.name, p.id]}), {:required => true},
|
||||
:onchange => "updateIssueFrom('#{escape_javascript project_issue_form_path(@project, :id => @issue, :format => 'js')}')" %></p>
|
||||
|
||||
<% else %>
|
||||
<p><label><%= l(:field_status) %></label> <%= h(@issue.status.name) %></p>
|
||||
@@ -44,8 +43,7 @@
|
||||
<div class="splitcontentright">
|
||||
<% if @issue.safe_attribute? 'parent_issue_id' %>
|
||||
<p id="parent_issue"><%= f.text_field :parent_issue_id, :size => 10, :required => @issue.required_attribute?('parent_issue_id') %></p>
|
||||
<div id="parent_issue_candidates" class="autocomplete"></div>
|
||||
<%= javascript_tag "observeParentIssueField('#{auto_complete_issues_path(:id => @issue, :project_id => @issue.project) }')" %>
|
||||
<%= javascript_tag "observeAutocompleteField('issue_parent_issue_id', '#{escape_javascript auto_complete_issues_path(:id => @issue, :project_id => @issue.project)}')" %>
|
||||
<% end %>
|
||||
|
||||
<% if @issue.safe_attribute? 'start_date' %>
|
||||
|
||||
@@ -8,15 +8,13 @@
|
||||
<% end %>
|
||||
|
||||
<% if @issue.safe_attribute? 'project_id' %>
|
||||
<p><%= f.select :project_id, project_tree_options_for_select(@issue.allowed_target_projects, :selected => @issue.project), :required => true %></p>
|
||||
<%= observe_field :issue_project_id, :url => project_issue_form_path(@project, :id => @issue),
|
||||
:with => "Form.serialize('issue-form')" %>
|
||||
<p><%= f.select :project_id, project_tree_options_for_select(@issue.allowed_target_projects, :selected => @issue.project), {:required => true},
|
||||
:onchange => "updateIssueFrom('#{escape_javascript project_issue_form_path(@project, :id => @issue, :format => 'js')}')" %></p>
|
||||
<% end %>
|
||||
|
||||
<% if @issue.safe_attribute? 'tracker_id' %>
|
||||
<p><%= f.select :tracker_id, @issue.project.trackers.collect {|t| [t.name, t.id]}, :required => true %></p>
|
||||
<%= observe_field :issue_tracker_id, :url => project_issue_form_path(@project, :id => @issue),
|
||||
:with => "Form.serialize('issue-form')" %>
|
||||
<p><%= f.select :tracker_id, @issue.project.trackers.collect {|t| [t.name, t.id]}, {:required => true},
|
||||
:onchange => "updateIssueFrom('#{escape_javascript project_issue_form_path(@project, :id => @issue, :format => 'js')}')" %></p>
|
||||
<% end %>
|
||||
|
||||
<% if @issue.safe_attribute? 'subject' %>
|
||||
@@ -26,8 +24,7 @@
|
||||
<% if @issue.safe_attribute? 'description' %>
|
||||
<p>
|
||||
<%= f.label_for_field :description, :required => @issue.required_attribute?('description') %>
|
||||
<%= link_to_function image_tag('edit.png'),
|
||||
'Element.hide(this); Effect.toggle("issue_description_and_toolbar", "appear", {duration:0.3})' unless @issue.new_record? %>
|
||||
<%= link_to_function image_tag('edit.png'), '$(this).hide(); $("#issue_description_and_toolbar").show()' unless @issue.new_record? %>
|
||||
<%= content_tag 'span', :id => "issue_description_and_toolbar", :style => (@issue.new_record? ? nil : 'display:none') do %>
|
||||
<%= f.text_area :description,
|
||||
:cols => 60,
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<div class="autoscroll">
|
||||
<table class="list issues">
|
||||
<thead><tr>
|
||||
<th class="checkbox hide-when-print"><%= link_to image_tag('toggle_check.png'), {}, :onclick => 'toggleIssuesSelection(Element.up(this, "form")); return false;',
|
||||
<th class="checkbox hide-when-print"><%= link_to image_tag('toggle_check.png'), {}, :onclick => 'toggleIssuesSelection(this); return false;',
|
||||
:title => "#{l(:button_check_all)}/#{l(:button_uncheck_all)}" %>
|
||||
</th>
|
||||
<%= sort_header_tag('id', :caption => '#', :default_order => 'desc') %>
|
||||
|
||||
@@ -35,7 +35,6 @@
|
||||
:as => :relation, :remote => true,
|
||||
:url => {:controller => 'issue_relations', :action => 'create', :issue_id => @issue},
|
||||
:method => :post,
|
||||
:complete => "Form.Element.focus('relation_issue_to_id');",
|
||||
:html => {:id => 'new-relation-form', :style => (@relation ? '' : 'display: none;')}
|
||||
} do |f| %>
|
||||
<%= render :partial => 'issue_relations/form', :locals => {:f => f}%>
|
||||
|
||||
@@ -1,9 +1,7 @@
|
||||
Element.update('all_attributes', '<%= escape_javascript(render :partial => 'form') %>');
|
||||
$('#all_attributes').html('<%= escape_javascript(render :partial => 'form') %>');
|
||||
|
||||
if ($('log_time')) {
|
||||
<% if User.current.allowed_to?(:log_time, @issue.project) %>
|
||||
Element.show('log_time');
|
||||
<% else %>
|
||||
Element.hide('log_time');
|
||||
<% end %>
|
||||
}
|
||||
<% if User.current.allowed_to?(:log_time, @issue.project) %>
|
||||
$('#log_time').show();
|
||||
<% else %>
|
||||
$('#log_time').hide();
|
||||
<% end %>
|
||||
@@ -17,11 +17,9 @@
|
||||
<% if @allowed_projects.present? %>
|
||||
<p>
|
||||
<label for="issue_project_id"><%= l(:field_project) %></label>
|
||||
<%= select_tag('issue[project_id]', content_tag('option', l(:label_no_change_option), :value => '') + project_tree_options_for_select(@allowed_projects, :selected => @target_project)) %>
|
||||
<%= select_tag('issue[project_id]', content_tag('option', l(:label_no_change_option), :value => '') + project_tree_options_for_select(@allowed_projects, :selected => @target_project),
|
||||
:onchange => "updateBulkEditFrom('#{escape_javascript url_for(:action => 'bulk_edit', :format => 'js')}')") %>
|
||||
</p>
|
||||
<%= observe_field :issue_project_id, :url => {:action => 'bulk_edit'},
|
||||
:update => 'content',
|
||||
:with => "Form.serialize('bulk_edit_form')" %>
|
||||
<% end %>
|
||||
<p>
|
||||
<label for="issue_tracker_id"><%= l(:field_tracker) %></label>
|
||||
@@ -97,8 +95,7 @@
|
||||
<label for='issue_parent_issue_id'><%= l(:field_parent_issue) %></label>
|
||||
<%= text_field_tag 'issue[parent_issue_id]', '', :size => 10 %>
|
||||
</p>
|
||||
<div id="parent_issue_candidates" class="autocomplete"></div>
|
||||
<%= javascript_tag "observeParentIssueField('#{auto_complete_issues_path(:project_id => @project) }')" %>
|
||||
<%= javascript_tag "observeAutocompleteField('issue_parent_issue_id', '#{escape_javascript auto_complete_issues_path(:project_id => @project)}')" %>
|
||||
<% end %>
|
||||
|
||||
<% if @safe_attributes.include?('start_date') %>
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
$('#content').html('<%= escape_javascript(render :template => 'issues/bulk_edit.html') %>');
|
||||
@@ -7,8 +7,8 @@
|
||||
<p>
|
||||
<label><%= radio_button_tag 'todo', 'destroy', true %> <%= l(:text_destroy_time_entries) %></label><br />
|
||||
<label><%= radio_button_tag 'todo', 'nullify', false %> <%= l(:text_assign_time_entries_to_project) %></label><br />
|
||||
<label><%= radio_button_tag 'todo', 'reassign', false, :onchange => 'if (this.checked) { $("reassign_to_id").focus(); }' %> <%= l(:text_reassign_time_entries) %></label>
|
||||
<%= text_field_tag 'reassign_to_id', params[:reassign_to_id], :size => 6, :onfocus => '$("todo_reassign").checked=true;' %>
|
||||
<label><%= radio_button_tag 'todo', 'reassign', false, :onchange => 'if (this.checked) { $("#reassign_to_id").focus(); }' %> <%= l(:text_reassign_time_entries) %></label>
|
||||
<%= text_field_tag 'reassign_to_id', params[:reassign_to_id], :size => 6, :onfocus => '$("#todo_reassign").attr("checked", true);' %>
|
||||
</p>
|
||||
</div>
|
||||
<%= submit_tag l(:button_apply) %>
|
||||
|
||||
@@ -44,7 +44,7 @@
|
||||
<%= link_to l(:button_clear), { :set_filter => 1, :project_id => @project }, :class => 'icon icon-reload' %>
|
||||
<% if @query.new_record? && User.current.allowed_to?(:save_queries, @project, :global => true) %>
|
||||
<%= link_to_function l(:button_save),
|
||||
"$('query_form').action='#{ @project ? new_project_query_path(@project) : new_query_path }'; submit_query_form('query_form')",
|
||||
"$('#query_form').attr('action', '#{ @project ? new_project_query_path(@project) : new_query_path }'); submit_query_form('query_form')",
|
||||
:class => 'icon icon-save' %>
|
||||
<% end %>
|
||||
</p>
|
||||
|
||||
@@ -39,7 +39,7 @@
|
||||
<%= submit_tag l(:button_create_and_continue), :name => 'continue' %>
|
||||
<%= preview_link preview_new_issue_path(:project_id => @project), 'issue-form' %>
|
||||
|
||||
<%= javascript_tag "Form.Element.focus('issue_subject');" %>
|
||||
<%= javascript_tag "$('#issue_subject').focus();" %>
|
||||
<% end %>
|
||||
|
||||
<div id="preview" class="wiki"></div>
|
||||
|
||||
@@ -11,8 +11,7 @@
|
||||
<%= preview_link preview_edit_issue_path(:project_id => @project, :id => @journal.issue),
|
||||
"journal-#{@journal.id}-form",
|
||||
"journal_#{@journal.id}_preview" %> |
|
||||
<%= link_to l(:button_cancel), '#', :onclick => "Element.remove('journal-#{@journal.id}-form'); " +
|
||||
"Element.show('journal-#{@journal.id}-notes'); return false;" %></p>
|
||||
<%= link_to l(:button_cancel), '#', :onclick => "$('#journal-#{@journal.id}-form').remove(); $('#journal-#{@journal.id}-notes').show(); return false;" %></p>
|
||||
|
||||
<div id="journal_<%= @journal.id %>_preview" class="wiki"></div>
|
||||
<% end %>
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
Element.hide("journal-<%= @journal.id %>-notes");
|
||||
Element.insert("journal-<%= @journal.id %>-notes", {'after': '<%= escape_javascript(render :partial => 'notes_form') %>'});
|
||||
$("#journal-<%= @journal.id %>-notes").hide();
|
||||
$("#journal-<%= @journal.id %>-notes").after('<%= escape_javascript(render :partial => 'notes_form') %>');
|
||||
@@ -1,5 +1,3 @@
|
||||
$('notes').value = "<%= raw escape_javascript(@content) %>";
|
||||
Element.show('update');
|
||||
Form.Element.focus('notes');
|
||||
Element.scrollTo('update');
|
||||
$('notes').scrollTop = $('notes').scrollHeight - $('notes').clientHeight;
|
||||
$('#notes').val("<%= raw escape_javascript(@content) %>");
|
||||
showAndScrollTo("update", "notes");
|
||||
$('#notes').scrollTop = $('#notes').scrollHeight - $('#notes').clientHeight;
|
||||
@@ -1,9 +1,9 @@
|
||||
<% if @journal.frozen? %>
|
||||
Element.remove("change-<%= @journal.id %>");
|
||||
$("#change-<%= @journal.id %>").remove();
|
||||
<% else %>
|
||||
Element.replace("journal-<%= @journal.id %>-notes", '<%= escape_javascript(render_notes(@journal.issue, @journal, :reply_links => authorize_for('issues', 'edit'))) %>');
|
||||
Element.show("journal-<%= @journal.id %>-notes");
|
||||
Element.remove("journal-<%= @journal.id %>-form");
|
||||
$("#journal-<%= @journal.id %>-notes").replaceWith('<%= escape_javascript(render_notes(@journal.issue, @journal, :reply_links => authorize_for('issues', 'edit'))) %>');
|
||||
$("#journal-<%= @journal.id %>-notes").show();
|
||||
$("#journal-<%= @journal.id %>-form").remove();
|
||||
<% end %>
|
||||
|
||||
<%= call_hook(:view_journals_update_js_bottom, { :journal => @journal }) %>
|
||||
@@ -8,7 +8,7 @@
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=9; IE=8; IE=7; IE=EDGE" />
|
||||
<%= csrf_meta_tag %>
|
||||
<%= favicon %>
|
||||
<%= stylesheet_link_tag 'application', :media => 'all' %>
|
||||
<%= stylesheet_link_tag 'jquery/jquery-ui-1.8.21', 'application', :media => 'all' %>
|
||||
<%= stylesheet_link_tag 'rtl', :media => 'all' if l(:direction) == 'rtl' %>
|
||||
<%= javascript_heads %>
|
||||
<%= heads_for_theme %>
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
Element.update('tab-content-members', '<%= escape_javascript(render :partial => 'projects/settings/members') %>');
|
||||
$('#tab-content-members').html('<%= escape_javascript(render :partial => 'projects/settings/members') %>');
|
||||
hideOnLoad();
|
||||
|
||||
<% if @members.present? && @members.all? {|m| m.valid? } %>
|
||||
<% @members.each do |member| %>
|
||||
new Effect.Highlight("member-<%= member.id %>");
|
||||
$("#member-<%= member.id %>").effect("highlight");
|
||||
<% end %>
|
||||
<% else %>
|
||||
<% errors = @members.collect {|m| m.errors.full_messages}.flatten.uniq.join(', ') %>
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
Element.update('tab-content-members', '<%= escape_javascript(render :partial => 'projects/settings/members') %>');
|
||||
$('#tab-content-members').html('<%= escape_javascript(render :partial => 'projects/settings/members') %>');
|
||||
hideOnLoad();
|
||||
@@ -1,3 +1,3 @@
|
||||
Element.update('tab-content-members', '<%= escape_javascript(render :partial => 'projects/settings/members') %>');
|
||||
$('#tab-content-members').html('<%= escape_javascript(render :partial => 'projects/settings/members') %>');
|
||||
hideOnLoad();
|
||||
new Effect.Highlight("member-<%= @member.id %>");
|
||||
$("#member-<%= @member.id %>").effect("highlight");
|
||||
@@ -1,6 +1,4 @@
|
||||
$('message_subject').value = "<%= raw escape_javascript(@subject) %>";
|
||||
$('message_content').value = "<%= raw escape_javascript(@content) %>";
|
||||
Element.show('reply');
|
||||
Form.Element.focus('message_content');
|
||||
Element.scrollTo('reply');
|
||||
$('message_content').scrollTop = $('message_content').scrollHeight - $('message_content').clientHeight;
|
||||
$('#message_subject').val("<%= raw escape_javascript(@subject) %>");
|
||||
$('#message_content').val("<%= raw escape_javascript(@content) %>");
|
||||
showAndScrollTo("reply", "message_content");
|
||||
$('#message_content').scrollTop = $('#message_content').scrollHeight - $('#message_content').clientHeight;
|
||||
@@ -5,7 +5,7 @@
|
||||
<%= select_tag 'block',
|
||||
content_tag('option') + options_for_select(@block_options),
|
||||
:id => "block-select" %>
|
||||
<%= link_to l(:button_add), '#', :onclick => '$("block-form").submit()', :class => 'icon icon-add' %>
|
||||
<%= link_to l(:button_add), '#', :onclick => '$("#block-form").submit()', :class => 'icon icon-add' %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
<%= link_to l(:button_back), {:action => 'page'}, :class => 'icon icon-cancel' %>
|
||||
@@ -34,34 +34,8 @@
|
||||
<% end if @blocks['right'] %>
|
||||
</div>
|
||||
|
||||
<%= sortable_element 'list-top',
|
||||
:tag => 'div',
|
||||
:only => 'mypage-box',
|
||||
:handle => "handle",
|
||||
:dropOnEmpty => true,
|
||||
:containment => ['list-top', 'list-left', 'list-right'],
|
||||
:constraint => false,
|
||||
:url => { :action => "order_blocks", :group => "top" }
|
||||
%>
|
||||
|
||||
<%= sortable_element 'list-left',
|
||||
:tag => 'div',
|
||||
:only => 'mypage-box',
|
||||
:handle => "handle",
|
||||
:dropOnEmpty => true,
|
||||
:containment => ['list-top', 'list-left', 'list-right'],
|
||||
:constraint => false,
|
||||
:url => { :action => "order_blocks", :group => "left" }
|
||||
%>
|
||||
|
||||
<%= sortable_element 'list-right',
|
||||
:tag => 'div',
|
||||
:only => 'mypage-box',
|
||||
:handle => "handle",
|
||||
:dropOnEmpty => true,
|
||||
:containment => ['list-top', 'list-left', 'list-right'],
|
||||
:constraint => false,
|
||||
:url => { :action => "order_blocks", :group => "right" }
|
||||
%>
|
||||
<%= javascript_tag "initMyPageSortable('top', '#{ escape_javascript url_for(:action => "order_blocks", :group => "top") }');" %>
|
||||
<%= javascript_tag "initMyPageSortable('left', '#{ escape_javascript url_for(:action => "order_blocks", :group => "left") }');" %>
|
||||
<%= javascript_tag "initMyPageSortable('right', '#{ escape_javascript url_for(:action => "order_blocks", :group => "right") }');" %>
|
||||
|
||||
<% html_title(l(:label_my_page)) -%>
|
||||
@@ -2,7 +2,7 @@
|
||||
<%= link_to(l(:label_news_new),
|
||||
new_project_news_path(@project),
|
||||
:class => 'icon icon-add',
|
||||
:onclick => 'Element.show("add-news"); Form.Element.focus("news_title"); return false;') if @project && User.current.allowed_to?(:manage_news, @project) %>
|
||||
:onclick => 'showAndScrollTo("add-news", "news_title"); return false;') if @project && User.current.allowed_to?(:manage_news, @project) %>
|
||||
</div>
|
||||
|
||||
<div id="add-news" style="display:none;">
|
||||
@@ -12,7 +12,7 @@
|
||||
<%= render :partial => 'news/form', :locals => { :f => f } %>
|
||||
<%= submit_tag l(:button_create) %>
|
||||
<%= preview_link preview_news_path(:project_id => @project), 'news-form' %> |
|
||||
<%= link_to l(:button_cancel), "#", :onclick => 'Element.hide("add-news")' %>
|
||||
<%= link_to l(:button_cancel), "#", :onclick => '$("#add-news").hide()' %>
|
||||
<% end if @project %>
|
||||
<div id="preview" class="wiki"></div>
|
||||
</div>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
edit_news_path(@news),
|
||||
:class => 'icon icon-edit',
|
||||
:accesskey => accesskey(:edit),
|
||||
:onclick => 'Element.show("edit-news"); return false;') if User.current.allowed_to?(:manage_news, @project) %>
|
||||
:onclick => '$("#edit-news").show(); return false;') if User.current.allowed_to?(:manage_news, @project) %>
|
||||
<%= delete_link news_path(@news) if User.current.allowed_to?(:manage_news, @project) %>
|
||||
</div>
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
<%= render :partial => 'form', :locals => { :f => f } %>
|
||||
<%= submit_tag l(:button_save) %>
|
||||
<%= preview_link preview_news_path(:project_id => @project), 'news-form' %> |
|
||||
<%= link_to l(:button_cancel), "#", :onclick => 'Element.hide("edit-news"); return false;' %>
|
||||
<%= link_to l(:button_cancel), "#", :onclick => '$("#edit-news").hide(); return false;' %>
|
||||
<% end %>
|
||||
<div id="preview" class="wiki"></div>
|
||||
</div>
|
||||
|
||||
@@ -4,5 +4,5 @@
|
||||
<%= render :partial => 'form', :locals => { :f => f } %>
|
||||
<%= submit_tag l(:button_create) %>
|
||||
<%= submit_tag l(:button_create_and_continue), :name => 'continue' %>
|
||||
<%= javascript_tag "Form.Element.focus('project_name');" %>
|
||||
<%= javascript_tag "$('#project_name').focus();" %>
|
||||
<% end %>
|
||||
@@ -29,13 +29,13 @@
|
||||
<%= hidden_field_tag 'membership[role_ids][]', '' %>
|
||||
<p><%= submit_tag l(:button_change), :class => "small" %>
|
||||
<%= link_to_function l(:button_cancel),
|
||||
"$('member-#{member.id}-roles').show(); $('member-#{member.id}-roles-form').hide(); return false;"
|
||||
"$('#member-#{member.id}-roles').show(); $('#member-#{member.id}-roles-form').hide(); return false;"
|
||||
%></p>
|
||||
<% end %>
|
||||
</td>
|
||||
<td class="buttons">
|
||||
<%= link_to_function l(:button_edit),
|
||||
"$('member-#{member.id}-roles').hide(); $('member-#{member.id}-roles-form').show(); return false;",
|
||||
"$('#member-#{member.id}-roles').hide(); $('#member-#{member.id}-roles-form').show(); return false;",
|
||||
:class => 'icon icon-edit' %>
|
||||
<%= delete_link membership_path(member),
|
||||
:remote => true,
|
||||
@@ -55,23 +55,11 @@
|
||||
|
||||
<div class="splitcontentright">
|
||||
<% if roles.any? && principals.any? %>
|
||||
<%= form_for(@member, {:as => :membership, :remote => true,
|
||||
:url => project_memberships_path(@project), :method => :post,
|
||||
:loading => '$(\'member-add-submit\').disable();',
|
||||
:complete => 'if($(\'member-add-submit\')) $(\'member-add-submit\').enable();'
|
||||
} ) do |f| %>
|
||||
<%= form_for(@member, {:as => :membership, :url => project_memberships_path(@project), :remote => true, :method => :post}) do |f| %>
|
||||
<fieldset><legend><%=l(:label_member_new)%></legend>
|
||||
|
||||
<p><%= label_tag "principal_search", l(:label_principal_search) %><%= text_field_tag 'principal_search', nil %></p>
|
||||
<%= observe_field(:principal_search,
|
||||
:frequency => 0.5,
|
||||
:update => :principals,
|
||||
:url => autocomplete_project_memberships_path(@project),
|
||||
:method => :get,
|
||||
:before => '$("principal_search").addClassName("ajax-loading")',
|
||||
:complete => '$("principal_search").removeClassName("ajax-loading")',
|
||||
:with => 'q')
|
||||
%>
|
||||
<%= javascript_tag "observeSearchfield('principal_search', 'principals', '#{ escape_javascript autocomplete_project_memberships_path(@project) }')" %>
|
||||
|
||||
<div id="principals">
|
||||
<%= principals_check_box_tags 'membership[user_ids][]', principals %>
|
||||
|
||||
@@ -50,4 +50,4 @@
|
||||
</tr>
|
||||
</table>
|
||||
<%= hidden_field_tag 'f[]', '' %>
|
||||
<%= javascript_tag 'Event.observe(window,"load",apply_filters_observer);' %>
|
||||
<%= javascript_tag '$(document).ready(function(){observeIssueFilters();});' %>
|
||||
@@ -8,7 +8,7 @@
|
||||
<% if User.current.admin? || User.current.allowed_to?(:manage_public_queries, @project) %>
|
||||
<p><label for="query_is_public"><%=l(:field_is_public)%></label>
|
||||
<%= check_box 'query', 'is_public',
|
||||
:onchange => (User.current.admin? ? nil : 'if (this.checked) {$("query_is_for_all").checked = false; $("query_is_for_all").disabled = true;} else {$("query_is_for_all").disabled = false;}') %></p>
|
||||
:onchange => (User.current.admin? ? nil : 'if (this.checked) {$("#query_is_for_all").removeAttr("checked"); $("#query_is_for_all").attr("disabled", true);} else {$("#query_is_for_all").removeAttr("disabled");}') %></p>
|
||||
<% end %>
|
||||
|
||||
<p><label for="query_is_for_all"><%=l(:field_is_for_all)%></label>
|
||||
@@ -17,7 +17,7 @@
|
||||
|
||||
<p><label for="query_default_columns"><%=l(:label_default_columns)%></label>
|
||||
<%= check_box_tag 'default_columns', 1, @query.has_default_columns?, :id => 'query_default_columns',
|
||||
:onclick => 'if (this.checked) {Element.hide("columns")} else {Element.show("columns")}' %></p>
|
||||
:onclick => 'if (this.checked) {$("#columns").hide();} else {$("#columns").show();}' %></p>
|
||||
|
||||
<p><label for="query_group_by"><%= l(:field_group_by) %></label>
|
||||
<%= select 'query', 'group_by', @query.groupable_columns.collect {|c| [c.caption, c.name.to_s]}, :include_blank => true %></p>
|
||||
|
||||
@@ -7,22 +7,14 @@
|
||||
<td style="padding-left: <%=18 * depth%>px;" class="<%=
|
||||
@repository.report_last_commit ? "filename" : "filename_no_report" %>";>
|
||||
<% if entry.is_dir? %>
|
||||
<span class="expander" onclick="<%= remote_function(
|
||||
:url => {
|
||||
<span class="expander" onclick="scmEntryClick('<%= tr_id %>', '<%= escape_javascript(url_for(
|
||||
:action => 'show',
|
||||
:id => @project,
|
||||
:repository_id => @repository.identifier_param,
|
||||
:path => to_path_param(ent_path),
|
||||
:rev => @rev,
|
||||
:depth => (depth + 1),
|
||||
:parent_id => tr_id
|
||||
},
|
||||
:method => :get,
|
||||
:update => { :success => tr_id },
|
||||
:position => :after,
|
||||
:success => "scmEntryLoaded('#{tr_id}')",
|
||||
:condition => "scmEntryClick('#{tr_id}')"
|
||||
) %>"> </span>
|
||||
:parent_id => tr_id)) %>');"> </span>
|
||||
<% end %>
|
||||
<%= link_to h(ent_name),
|
||||
{:action => (entry.is_dir? ? 'show' : 'changes'), :id => @project, :repository_id => @repository.identifier_param, :path => to_path_param(ent_path), :rev => @rev},
|
||||
|
||||
@@ -29,7 +29,6 @@
|
||||
:id => @project, :repository_id => @repository.identifier_param,
|
||||
:rev => @changeset.identifier},
|
||||
:method => :post,
|
||||
:complete => "Form.Element.focus('issue_id');",
|
||||
:html => {:id => 'new-relation-form', :style => (@issue ? '' : 'display: none;')}) do |f| %>
|
||||
<%= l(:label_issue) %> #<%= text_field_tag 'issue_id', '', :size => 10 %>
|
||||
<%= submit_tag l(:button_add) %>
|
||||
|
||||
@@ -2,17 +2,16 @@
|
||||
<%= javascript_include_tag 'revision_graph.js' %>
|
||||
|
||||
<script type="text/javascript" charset="utf-8">
|
||||
function revisionGraphHandler(){
|
||||
drawRevisionGraph(
|
||||
document.getElementById('holder'),
|
||||
<%= commits.to_json.html_safe %>,
|
||||
<%= space %>
|
||||
);
|
||||
}
|
||||
|
||||
['load', 'resize'].each(function(window_event) {
|
||||
|
||||
Event.observe(window, window_event, function(){
|
||||
|
||||
drawRevisionGraph(
|
||||
document.getElementById('holder'),
|
||||
<%= commits.to_json.html_safe %>,
|
||||
<%= space %>);
|
||||
});
|
||||
});
|
||||
$(document).ready(revisionGraphHandler);
|
||||
$(window).resize(revisionGraphHandler);
|
||||
</script>
|
||||
|
||||
<div id="holder" class="revision-graph"></div>
|
||||
@@ -37,8 +37,8 @@ end %>
|
||||
<%= content_tag(:td, :class => 'id', :style => id_style) do %>
|
||||
<%= link_to_revision(changeset, @repository) %>
|
||||
<% end %>
|
||||
<td class="checkbox"><%= radio_button_tag('rev', changeset.identifier, (line_num==1), :id => "cb-#{line_num}", :onclick => "$('cbto-#{line_num+1}').checked=true;") if show_diff && (line_num < revisions.size) %></td>
|
||||
<td class="checkbox"><%= radio_button_tag('rev_to', changeset.identifier, (line_num==2), :id => "cbto-#{line_num}", :onclick => "if ($('cb-#{line_num}').checked==true) {$('cb-#{line_num-1}').checked=true;}") if show_diff && (line_num > 1) %></td>
|
||||
<td class="checkbox"><%= radio_button_tag('rev', changeset.identifier, (line_num==1), :id => "cb-#{line_num}", :onclick => "$('#cbto-#{line_num+1}').attr('checked',true);") if show_diff && (line_num < revisions.size) %></td>
|
||||
<td class="checkbox"><%= radio_button_tag('rev_to', changeset.identifier, (line_num==2), :id => "cbto-#{line_num}", :onclick => "if ($('#cb-#{line_num}').attr('checked')) {$('#cb-#{line_num-1}').attr('checked',true);}") if show_diff && (line_num > 1) %></td>
|
||||
<td class="committed_on"><%= format_time(changeset.committed_on) %></td>
|
||||
<td class="author"><%= h truncate(changeset.author.to_s, :length => 30) %></td>
|
||||
<td class="comments"><%= textilizable(truncate_at_line_break(changeset.comments)) %></td>
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
<% if @issue %>
|
||||
Element.update('related-issues', '<%= escape_javascript(render :partial => "related_issues") %>');
|
||||
Effect.highlight('related-issue-<%= @issue.id %>');
|
||||
$('#related-issues').html('<%= escape_javascript(render :partial => "related_issues") %>');
|
||||
$('#related-issue-<%= @issue.id %>').effect("highlight");
|
||||
$('#issue_id').focus();
|
||||
<% else %>
|
||||
alert("<%= escape_javascript(l(:label_issue) + ' ' + l('activerecord.errors.messages.invalid')) %>");
|
||||
<% end %>
|
||||
@@ -1,5 +1,5 @@
|
||||
<h2><%= l(:label_repository) %></h2>
|
||||
|
||||
<%= labelled_form_for :repository, @repository, :url => repository_path(@repository), :html => {:method => :put} do |f| %>
|
||||
<%= labelled_form_for :repository, @repository, :url => repository_path(@repository), :html => {:method => :put, :id => 'repository-form'} do |f| %>
|
||||
<%= render :partial => 'form', :locals => {:f => f} %>
|
||||
<% end %>
|
||||
@@ -1,5 +1,5 @@
|
||||
<h2><%= l(:label_repository_new) %></h2>
|
||||
|
||||
<%= labelled_form_for :repository, @repository, :url => project_repositories_path(@project) do |f| %>
|
||||
<%= labelled_form_for :repository, @repository, :url => project_repositories_path(@project), :html => {:id => 'repository-form'} do |f| %>
|
||||
<%= render :partial => 'form', :locals => {:f => f} %>
|
||||
<% end %>
|
||||
@@ -0,0 +1 @@
|
||||
$('#content').html('<%= escape_javascript(render :template => 'repositories/new.html') %>');
|
||||
@@ -1 +1 @@
|
||||
Element.remove('related-issue-<%= @issue.id %>');
|
||||
$('#related-issue-<%= @issue.id %>').remove();
|
||||
@@ -4,7 +4,7 @@
|
||||
<%= form_tag({}, :method => :get) do %>
|
||||
<%= label_tag "search-input", l(:description_search), :class => "hidden-for-sighted" %>
|
||||
<p><%= text_field_tag 'q', @question, :size => 60, :id => 'search-input' %>
|
||||
<%= javascript_tag "Field.focus('search-input')" %>
|
||||
<%= javascript_tag "$('#search-input').focus()" %>
|
||||
<%= project_select_tag %>
|
||||
<%= hidden_field_tag 'all_words', '', :id => nil %>
|
||||
<label><%= check_box_tag 'all_words', 1, @all_words %> <%= l(:label_all_words) %></label>
|
||||
|
||||
@@ -9,12 +9,12 @@
|
||||
|
||||
<div class="box tabular settings">
|
||||
<p><%= setting_check_box :mail_handler_api_enabled,
|
||||
:onclick => "if (this.checked) { Form.Element.enable('settings_mail_handler_api_key'); } else { Form.Element.disable('settings_mail_handler_api_key'); }"%></p>
|
||||
:onclick => "if (this.checked) { $('#settings_mail_handler_api_key').removeAttr('disabled'); } else { $('#settings_mail_handler_api_key').attr('disabled', true); }"%></p>
|
||||
|
||||
<p><%= setting_text_field :mail_handler_api_key, :size => 30,
|
||||
:id => 'settings_mail_handler_api_key',
|
||||
:disabled => !Setting.mail_handler_api_enabled? %>
|
||||
<%= link_to_function l(:label_generate_key), "if ($('settings_mail_handler_api_key').disabled == false) { $('settings_mail_handler_api_key').value = randomKey(20) }" %>
|
||||
<%= link_to_function l(:label_generate_key), "if (!$('#settings_mail_handler_api_key').attr('disabled')) { $('#settings_mail_handler_api_key').val(randomKey(20)) }" %>
|
||||
</p>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -49,7 +49,7 @@
|
||||
|
||||
<p><%= setting_check_box :sys_api_enabled,
|
||||
:onclick =>
|
||||
"if (this.checked) { Form.Element.enable('settings_sys_api_key'); } else { Form.Element.disable('settings_sys_api_key'); }" %></p>
|
||||
"if (this.checked) { $('#settings_sys_api_key').removeAttr('disabled'); } else { $('#settings_sys_api_key').attr('disabled', true); }" %></p>
|
||||
|
||||
<p><%= setting_text_field :sys_api_key,
|
||||
:size => 30,
|
||||
@@ -57,7 +57,7 @@
|
||||
:disabled => !Setting.sys_api_enabled?,
|
||||
:label => :setting_mail_handler_api_key %>
|
||||
<%= link_to_function l(:label_generate_key),
|
||||
"if ($('settings_sys_api_key').disabled == false) { $('settings_sys_api_key').value = randomKey(20) }" %>
|
||||
"if (!$('#settings_sys_api_key').attr('disabled')) { $('#settings_sys_api_key').val(randomKey(20)) }" %>
|
||||
</p>
|
||||
|
||||
<p><%= setting_text_field :repository_log_display_limit, :size => 6 %></p>
|
||||
@@ -85,7 +85,7 @@
|
||||
|
||||
<p><%= setting_check_box :commit_logtime_enabled,
|
||||
:onclick =>
|
||||
"if (this.checked) { Form.Element.enable('settings_commit_logtime_activity_id'); } else { Form.Element.disable('settings_commit_logtime_activity_id'); }"%></p>
|
||||
"if (this.checked) { $('#settings_commit_logtime_activity_id').removeAttr('disabled'); } else { $('#settings_commit_logtime_activity_id').attr('disabled', true); }"%></p>
|
||||
|
||||
<p><%= setting_select :commit_logtime_activity_id,
|
||||
[[l(:label_default), 0]] +
|
||||
|
||||
@@ -3,16 +3,16 @@
|
||||
<div>
|
||||
<p>
|
||||
<%= label_tag "period_type_list", l(:description_date_range_list), :class => "hidden-for-sighted" %>
|
||||
<%= radio_button_tag 'period_type', '1', !@free_period, :onclick => 'Form.Element.disable("from");Form.Element.disable("to");Form.Element.enable("period");', :id => "period_type_list"%>
|
||||
<%= radio_button_tag 'period_type', '1', !@free_period, :onclick => '$("#from,#to").attr("disabled", true);$("#period").removeAttr("disabled");', :id => "period_type_list"%>
|
||||
<%= select_tag 'period', options_for_period_select(params[:period]),
|
||||
:onchange => 'this.form.submit();',
|
||||
:onfocus => '$("period_type_1").checked = true;',
|
||||
:onfocus => '$("#period_type_1").attr("checked", true);',
|
||||
:disabled => @free_period %>
|
||||
</p>
|
||||
<p>
|
||||
<%= label_tag "period_type_interval", l(:description_date_range_interval), :class => "hidden-for-sighted" %>
|
||||
<%= radio_button_tag 'period_type', '2', @free_period, :onclick => 'Form.Element.enable("from");Form.Element.enable("to");Form.Element.disable("period");', :id => "period_type_interval" %>
|
||||
<span onclick="$('period_type_interval').checked = true;Form.Element.enable('from');Form.Element.enable('to');Form.Element.disable('period');">
|
||||
<%= radio_button_tag 'period_type', '2', @free_period, :onclick => '$("#from,#to").removeAttr("disabled");$("#period").attr("disabled", true);', :id => "period_type_interval" %>
|
||||
<span onclick="$('#period_type_interval').attr('checked', true);$('#from,#to').removeAttr('disabled');$('#period').attr('disabled', true);">
|
||||
<%= l(:label_date_from_to,
|
||||
:start => ((label_tag "from", l(:description_date_from), :class => "hidden-for-sighted") +
|
||||
text_field_tag('from', @from, :size => 10, :disabled => !@free_period) + calendar_for('from')),
|
||||
@@ -23,7 +23,7 @@
|
||||
</div>
|
||||
</fieldset>
|
||||
<p class="buttons">
|
||||
<%= link_to_function l(:button_apply), '$("query_form").submit()', :class => 'icon icon-checked' %>
|
||||
<%= link_to_function l(:button_apply), '$("#query_form").submit()', :class => 'icon icon-checked' %>
|
||||
<%= link_to l(:button_clear), {:controller => controller_name, :action => action_name, :project_id => @project, :issue_id => @issue}, :class => 'icon icon-reload' %>
|
||||
</p>
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
<th class="checkbox hide-when-print">
|
||||
<%= link_to image_tag('toggle_check.png'),
|
||||
{},
|
||||
:onclick => 'toggleIssuesSelection(Element.up(this, "form")); return false;',
|
||||
:onclick => 'toggleIssuesSelection(this); return false;',
|
||||
:title => "#{l(:button_check_all)}/#{l(:button_uncheck_all)}" %>
|
||||
</th>
|
||||
<%= sort_header_tag('spent_on', :caption => l(:label_date), :default_order => 'desc') %>
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
<fieldset class="box tabular">
|
||||
<legend><%=l(:label_authentication)%></legend>
|
||||
<% unless @auth_sources.empty? %>
|
||||
<p><%= f.select :auth_source_id, ([[l(:label_internal), ""]] + @auth_sources.collect { |a| [a.name, a.id] }), {}, :onchange => "if (this.value=='') {Element.show('password_fields');} else {Element.hide('password_fields');}" %></p>
|
||||
<p><%= f.select :auth_source_id, ([[l(:label_internal), ""]] + @auth_sources.collect { |a| [a.name, a.id] }), {}, :onchange => "if (this.value=='') {$('#password_fields').show();} else {$('#password_fields').hide();}" %></p>
|
||||
<% end %>
|
||||
<div id="password_fields" style="<%= 'display:none;' if @user.auth_source %>">
|
||||
<p><%= f.password_field :password, :required => true, :size => 25 %>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
'user[mail_notification]',
|
||||
options_for_select(
|
||||
user_mail_notification_options(@user), @user.mail_notification),
|
||||
:onchange => 'if (this.value == "selected") {Element.show("notified-projects")} else {Element.hide("notified-projects")}'
|
||||
:onchange => 'if (this.value == "selected") {$("#notified-projects").show();} else {$("#notified-projects").hide();}'
|
||||
) %>
|
||||
</p>
|
||||
<%= content_tag 'div', :id => 'notified-projects', :style => (@user.mail_notification == 'selected' ? '' : 'display:none;') do %>
|
||||
|
||||
@@ -30,13 +30,13 @@
|
||||
<%= hidden_field_tag 'membership[role_ids][]', '' %>
|
||||
<p><%= submit_tag l(:button_change) %>
|
||||
<%= link_to_function l(:button_cancel),
|
||||
"$('member-#{membership.id}-roles').show(); $('member-#{membership.id}-roles-form').hide(); return false;"
|
||||
"$('#member-#{membership.id}-roles').show(); $('#member-#{membership.id}-roles-form').hide(); return false;"
|
||||
%></p>
|
||||
<% end %>
|
||||
</td>
|
||||
<td class="buttons">
|
||||
<%= link_to_function l(:button_edit),
|
||||
"$('member-#{membership.id}-roles').hide(); $('member-#{membership.id}-roles-form').show(); return false;",
|
||||
"$('#member-#{membership.id}-roles').hide(); $('#member-#{membership.id}-roles-form').show(); return false;",
|
||||
:class => 'icon icon-edit'
|
||||
%>
|
||||
<%= delete_link user_membership_path(@user, membership), :remote => true if membership.deletable? %>
|
||||
|
||||
@@ -1 +1 @@
|
||||
Element.update('tab-content-memberships', '<%= escape_javascript(render :partial => 'users/memberships') %>');
|
||||
$('#tab-content-memberships').html('<%= escape_javascript(render :partial => 'users/memberships') %>');
|
||||
@@ -1,6 +1,6 @@
|
||||
<% if @membership.valid? %>
|
||||
Element.update("tab-content-memberships", '<%= escape_javascript(render :partial => 'users/memberships') %>');
|
||||
new Effect.Highlight("member-<%= @membership.id %>")
|
||||
$('#tab-content-memberships').html('<%= escape_javascript(render :partial => 'users/memberships') %>');
|
||||
$("#member-<%= @membership.id %>").effect("highlight");
|
||||
<% else %>
|
||||
alert('<%= escape_javascript l(:notice_failed_to_save_members, :errors => @membership.errors.full_messages.join(', ')) %>');
|
||||
<% end %>
|
||||
@@ -5,8 +5,7 @@
|
||||
select_tag('status_by',
|
||||
status_by_options_for_select(criteria),
|
||||
:id => 'status_by_select',
|
||||
:onchange => remote_function(:url => status_by_version_path(version),
|
||||
:with => "Form.serialize('status_by_form')"))).html_safe %>
|
||||
:data => {:remote => true, :method => 'post', :url => status_by_version_path(version)})).html_safe %>
|
||||
</legend>
|
||||
<% if counts.empty? %>
|
||||
<p><em><%= l(:label_no_data) %></em></p>
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
hideModal();
|
||||
<% select = content_tag('select', content_tag('option') + version_options_for_select(@project.shared_versions.open, @version), :id => 'issue_fixed_version_id', :name => 'issue[fixed_version_id]') %>
|
||||
Element.replace('issue_fixed_version_id', '<%= escape_javascript(select) %>');
|
||||
$('#issue_fixed_version_id').replaceWith('<%= escape_javascript(select) %>');
|
||||
@@ -54,7 +54,7 @@
|
||||
<% if @completed_versions.present? %>
|
||||
<p>
|
||||
<%= link_to_function l(:label_completed_versions),
|
||||
'Element.toggleClassName("toggle-completed-versions", "collapsed"); Element.toggle("completed-versions")',
|
||||
'$("#toggle-completed-versions").toggleClass("collapsed"); $("#completed-versions").toggle()',
|
||||
:id => 'toggle-completed-versions', :class => 'collapsible collapsed' %><br />
|
||||
<span id="completed-versions" style="display:none;">
|
||||
<%= @completed_versions.map {|version| link_to format_version_name(version), version_path(version)}.join("<br />\n").html_safe %>
|
||||
|
||||
@@ -1,3 +1,2 @@
|
||||
Element.update('ajax-modal', '<%= escape_javascript(render :partial => 'versions/new_modal') %>');
|
||||
$('#ajax-modal').html('<%= escape_javascript(render :partial => 'versions/new_modal') %>');
|
||||
showModal('ajax-modal', '600px');
|
||||
Form.Element.focus('version_name');
|
||||
@@ -1 +1 @@
|
||||
Element.update('status_by', '<%= escape_javascript(render_issue_status_by(@version, params[:status_by])) %>');
|
||||
$('#status_by').html('<%= escape_javascript(render_issue_status_by(@version, params[:status_by])) %>');
|
||||
@@ -9,18 +9,10 @@
|
||||
:id => 'new-watcher-form') do %>
|
||||
|
||||
<p><%= label_tag 'user_search', l(:label_user_search) %><%= text_field_tag 'user_search', nil %></p>
|
||||
<%= observe_field(:user_search,
|
||||
:frequency => 0.5,
|
||||
:update => :users_for_watcher,
|
||||
:method => :get,
|
||||
:before => '$("user_search").addClassName("ajax-loading")',
|
||||
:complete => '$("user_search").removeClassName("ajax-loading")',
|
||||
:url => {
|
||||
:controller => 'watchers',
|
||||
<%= javascript_tag "observeSearchfield('user_search', 'users_for_watcher', '#{ escape_javascript url_for(:controller => 'watchers',
|
||||
:action => 'autocomplete_for_user',
|
||||
:object_type => watched.class.name.underscore,
|
||||
:object_id => watched},
|
||||
:with => 'q') %>
|
||||
:object_id => watched) }')" %>
|
||||
|
||||
<div id="users_for_watcher">
|
||||
<%= principals_check_box_tags 'watcher[user_ids][]', (watched ? watched.addable_watcher_users : User.active.all(:limit => 100)) %>
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
<% selector = ".#{watcher_css(watched)}" %>
|
||||
$$("<%= selector %>").each(function(el){el.update("<%= escape_javascript watcher_link(watched, user) %>")});
|
||||
$("<%= selector %>").each(function(){$(this).html("<%= escape_javascript watcher_link(watched, user) %>")});
|
||||
@@ -1,4 +1,4 @@
|
||||
<% @users.each do |user| %>
|
||||
$$("#issue_watcher_user_ids_<%= user.id %>").each(function(el){el.remove();});
|
||||
$("#issue_watcher_user_ids_<%= user.id %>").remove();
|
||||
<% end %>
|
||||
Element.insert('watchers_inputs', '<%= escape_javascript(watchers_checkboxes(nil, @users, true)) %>');
|
||||
$('#watchers_inputs').append('<%= escape_javascript(watchers_checkboxes(nil, @users, true)) %>');
|
||||
@@ -1,2 +1,2 @@
|
||||
Element.update('ajax-modal', '<%= escape_javascript(render(:partial => 'watchers/new', :locals => {:watched => @watched})) %>');
|
||||
Element.update('watchers', '<%= escape_javascript(render(:partial => 'watchers/watchers', :locals => {:watched => @watched})) %>');
|
||||
$('#ajax-modal').html('<%= escape_javascript(render(:partial => 'watchers/new', :locals => {:watched => @watched})) %>');
|
||||
$('#watchers').html('<%= escape_javascript(render(:partial => 'watchers/watchers', :locals => {:watched => @watched})) %>');
|
||||
@@ -1 +1 @@
|
||||
Element.update('watchers', '<%= escape_javascript(render(:partial => 'watchers/watchers', :locals => {:watched => @watched})) %>');
|
||||
$('#watchers').html('<%= escape_javascript(render(:partial => 'watchers/watchers', :locals => {:watched => @watched})) %>');
|
||||
@@ -1,3 +1,3 @@
|
||||
Element.update('ajax-modal', '<%= escape_javascript(render :partial => 'watchers/new', :locals => {:watched => @watched}) %>');
|
||||
$('#ajax-modal').html('<%= escape_javascript(render :partial => 'watchers/new', :locals => {:watched => @watched}) %>');
|
||||
showModal('ajax-modal', '400px');
|
||||
$('ajax-modal').addClassName('new-watcher');
|
||||
$('#ajax-modal').addClass('new-watcher');
|
||||
@@ -12,7 +12,7 @@
|
||||
<label><%= radio_button_tag 'todo', 'reassign', false %> <%= l(:text_wiki_page_reassign_children) %></label>:
|
||||
<%= label_tag "reassign_to_id", l(:description_wiki_subpages_reassign), :class => "hidden-for-sighted" %>
|
||||
<%= select_tag 'reassign_to_id', wiki_page_options_for_select(@reassignable_to),
|
||||
:onclick => "$('todo_reassign').checked = true;" %>
|
||||
:onclick => "$('#todo_reassign').attr('checked', true);" %>
|
||||
<% end %>
|
||||
</p>
|
||||
</div>
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
<% @versions.each do |ver| %>
|
||||
<tr class="wiki-page-version <%= cycle("odd", "even") %>">
|
||||
<td class="id"><%= link_to h(ver.version), :action => 'show', :id => @page.title, :project_id => @page.project, :version => ver.version %></td>
|
||||
<td class="checkbox"><%= radio_button_tag('version', ver.version, (line_num==1), :id => "cb-#{line_num}", :onclick => "$('cbto-#{line_num+1}').checked=true;") if show_diff && (line_num < @versions.size) %></td>
|
||||
<td class="checkbox"><%= radio_button_tag('version', ver.version, (line_num==1), :id => "cb-#{line_num}", :onclick => "$('#cbto-#{line_num+1}').attr('checked', true);") if show_diff && (line_num < @versions.size) %></td>
|
||||
<td class="checkbox"><%= radio_button_tag('version_from', ver.version, (line_num==2), :id => "cbto-#{line_num}") if show_diff && (line_num > 1) %></td>
|
||||
<td class="updated_on"><%= format_time(ver.updated_on) %></td>
|
||||
<td class="author"><%= link_to_user ver.author %></td>
|
||||
|
||||
@@ -40,7 +40,7 @@
|
||||
|
||||
<% if @editable && authorize_for('wiki', 'add_attachment') %>
|
||||
<div id="wiki_add_attachment">
|
||||
<p><%= link_to l(:label_attachment_new), {}, :onclick => "Element.show('add_attachment_form'); Element.hide(this); Element.scrollTo('add_attachment_form'); return false;",
|
||||
<p><%= link_to l(:label_attachment_new), {}, :onclick => "$('#add_attachment_form').show(); return false;",
|
||||
:id => 'attach_files_link' %></p>
|
||||
<%= form_tag({:controller => 'wiki', :action => 'add_attachment',
|
||||
:project_id => @project, :id => @page.title},
|
||||
@@ -50,7 +50,7 @@
|
||||
<p><%= render :partial => 'attachments/form' %></p>
|
||||
</div>
|
||||
<%= submit_tag l(:button_add) %>
|
||||
<%= link_to l(:button_cancel), {}, :onclick => "Element.hide('add_attachment_form'); Element.show('attach_files_link'); return false;" %>
|
||||
<%= link_to l(:button_cancel), {}, :onclick => "$('#add_attachment_form').hide(); return false;" %>
|
||||
<% end %>
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
@@ -1 +1 @@
|
||||
Element.update('tab-content-wiki', '<%= escape_javascript(render :partial => 'projects/settings/wiki') %>');
|
||||
$('#tab-content-wiki').html('<%= escape_javascript(render :partial => 'projects/settings/wiki') %>');
|
||||
@@ -41,7 +41,7 @@
|
||||
<%= render :partial => 'form', :locals => {:name => 'author', :workflows => @workflows['author']} %>
|
||||
</div>
|
||||
</fieldset>
|
||||
<%= javascript_tag "hideFieldset($('author_workflows'))" unless @workflows['author'].present? %>
|
||||
<%= javascript_tag "hideFieldset($('#author_workflows'))" unless @workflows['author'].present? %>
|
||||
|
||||
<fieldset class="collapsible" style="padding: 0;">
|
||||
<legend onclick="toggleFieldset(this);"><%= l(:label_additional_workflow_transitions_for_assignee) %></legend>
|
||||
@@ -49,7 +49,7 @@
|
||||
<%= render :partial => 'form', :locals => {:name => 'assignee', :workflows => @workflows['assignee']} %>
|
||||
</div>
|
||||
</fieldset>
|
||||
<%= javascript_tag "hideFieldset($('assignee_workflows'))" unless @workflows['assignee'].present? %>
|
||||
<%= javascript_tag "hideFieldset($('#assignee_workflows'))" unless @workflows['assignee'].present? %>
|
||||
</div>
|
||||
<%= submit_tag l(:button_save) %>
|
||||
<% end %>
|
||||
|
||||
Reference in new issue
Block a user