Fix choose contact
This commit is contained in:
parent
d1e57475ce
commit
a2bad3c81d
|
@ -272,7 +272,7 @@ class WebmailController < ApplicationController
|
|||
@filter.expressions << Expression.new
|
||||
@expressions = @filter.expressions
|
||||
@destfolders = get_to_folders
|
||||
render_action("filter")
|
||||
render "filter"
|
||||
end
|
||||
# end of filters
|
||||
|
||||
|
@ -314,8 +314,8 @@ class WebmailController < ApplicationController
|
|||
protected
|
||||
|
||||
def additional_scripts()
|
||||
'<link rel="stylesheet" href="/stylesheets/webmail/webmail.css" type="text/css" media="screen" />'<<
|
||||
'<script type="text/javascript" src="/javascripts/webmail.js"></script>'
|
||||
@additional_css = ["webmail/webmail"]
|
||||
@additional_js = ["webmail"]
|
||||
end
|
||||
|
||||
private
|
||||
|
|
|
@ -25,11 +25,11 @@ module NavigationHelper
|
|||
|
||||
def link_import_preview() "/contacts/import_preview" end
|
||||
def link_main_index() root_url end
|
||||
def link_contact_import() "/contacts/import" end
|
||||
def link_contact_choose() "/contacts/contact/choose" end
|
||||
def link_contact_import() url_for(:controller => :contacts, :action => :import) end
|
||||
def link_contact_choose() url_for(:controller => :contacts, :action => :choose) end
|
||||
|
||||
def link_contact_list
|
||||
link_to(_('List'), :controller => "/contacts/contact", :action => "list")
|
||||
link_to(t(:list), :controller => :contacts, :action => :index)
|
||||
end
|
||||
|
||||
def link_contact_add_one
|
||||
|
@ -37,11 +37,11 @@ module NavigationHelper
|
|||
end
|
||||
|
||||
def link_contact_add_multiple
|
||||
link_to(t(:add_multiple), :controller => "/contacts/contact", :action => "add_multiple")
|
||||
link_to(t(:add_multiple), :controller => :contacts, :action => "add_multiple")
|
||||
end
|
||||
|
||||
def link_contact_group_list
|
||||
link_to(_('Groups'), :controller => "/contacts/contact_group", :action => "list")
|
||||
link_to(t(:groups), :controller => :contact_group, :action => :index)
|
||||
end
|
||||
|
||||
def link_folders
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
<h1><%= t :contacts %></h1>
|
||||
<% unless @mode == "choose" %>
|
||||
<div id="header">
|
||||
<ul id="primary">
|
||||
<li><%=link_folders%></li>
|
||||
|
@ -16,7 +17,7 @@
|
|||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<% end -%>
|
||||
<div id="tab_main">
|
||||
<div id="tab_content">
|
||||
|
||||
|
@ -45,7 +46,7 @@
|
|||
<th><%= t :name %></th>
|
||||
<th><%= t :email %></th>
|
||||
</tr>
|
||||
<% for contact in @contacts %>
|
||||
<% for contact in @contacts %>
|
||||
<tr class="<%= alternator %>">
|
||||
<td><input type="checkbox" name="contacts_to[<%=contact.id%>]" value="1"/>
|
||||
<input type="checkbox" name="contacts_cc[<%=contact.id%>]" value="1"/>
|
||||
|
@ -54,8 +55,8 @@
|
|||
<td><%=contact.email%></td>
|
||||
</tr>
|
||||
<% end %>
|
||||
<tr class="rowsep"><td colspan="3"><%=_('Groups')%>:</td></tr>
|
||||
<% for group in @contactgroups %>
|
||||
<tr class="rowsep"><td colspan="3"><%=t(:groups)%>:</td></tr>
|
||||
<% for group in @contactgroups %>
|
||||
<tr class="<%= alternator %>">
|
||||
<td><input type="checkbox" name="groups_to[<%=group.id%>]" value="1"/>
|
||||
<input type="checkbox" name="groups_cc[<%=group.id%>]" value="1"/>
|
||||
|
@ -66,18 +67,18 @@
|
|||
<% end %>
|
||||
<tr>
|
||||
<td colspan=3 class="buttonBar">
|
||||
<input type="submit" value="<%= _('choose')%>">
|
||||
<input type="button" value="<%= _('cancel')%>" onclick="javascript:window.close();">
|
||||
<input type="submit" value="<%= t(:choose)%>">
|
||||
<input type="button" value="<%= t(:cancel)%>" onclick="javascript:window.close();">
|
||||
</td>
|
||||
</tr>
|
||||
<% elsif @mode == "groups"%>
|
||||
<% elsif @mode == "groups"%>
|
||||
<tr>
|
||||
<th></th>
|
||||
<th width="200px"><%= t(:name)%></th>
|
||||
<th><%= t(:email)%></th>
|
||||
</tr>
|
||||
<% for contact in @contacts %>
|
||||
<input type="hidden" id="contacts_for_group[<%=contact.id%>]" name="contacts_for_group[<%=contact.id%>]" value="<%=@contacts_for_group[contact.id]%>" >
|
||||
<% for contact in @contacts %>
|
||||
<input type="hidden" id="contacts_for_group[<%=contact.id%>]" name="contacts_for_group[<%=contact.id%>]" value="<%=@contacts_for_group[contact.id]%>" >
|
||||
<tr class="<%= alternator %>">
|
||||
<td><input type="checkbox" id="contacts_for_group[<%=contact.id%>]" name="contacts_for_group[<%=contact.id%>]"
|
||||
value="<%=@contacts_for_group[contact.id]%>" onclick="toggleCheckbox(this)"
|
||||
|
@ -88,8 +89,8 @@
|
|||
<% end %>
|
||||
<tr>
|
||||
<td colspan=2 class="buttonBar">
|
||||
<input type="submit" value="<%= _('Save')%>">
|
||||
<input type="button" value="<%= _('Back to groups')%>" onclick="window.location='<%=link_contact_group_list%>'">
|
||||
<input type="submit" value="<%= t(:save)%>">
|
||||
<input type="button" value="<%= t(:back_to_groups)%>" onclick="window.location='<%=link_contact_group_list%>'">
|
||||
</td>
|
||||
</tr>
|
||||
<% else %>
|
||||
|
@ -98,7 +99,7 @@
|
|||
<th><%= t(:email)%></th>
|
||||
<th> </th>
|
||||
</tr>
|
||||
<% for contact in @contacts %>
|
||||
<% for contact in @contacts %>
|
||||
<tr class="<%= alternator %>">
|
||||
<td><%= link_to(contact.full_name, :controller=>:contacts, :action => "edit", :id => contact.id ) %></td>
|
||||
<td><%= link_to( contact.email, :controller => :webmail, :action => "compose", :params => { "mail[to]" => contact.email } ) %></td>
|
||||
|
@ -111,4 +112,4 @@
|
|||
</table>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -4,9 +4,11 @@
|
|||
<head>
|
||||
<title><%= t :mailr %></title>
|
||||
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
|
||||
<%=stylesheet_link_tag "admin", "tabs", "mailr", "webmail" %>
|
||||
<%=javascript_include_tag :defaults, "global", "webmail", [] %>
|
||||
<%=(@content_for_scripts ? @content_for_scripts : @additional_scripts )%>
|
||||
<% @additional_css ||= [] %>
|
||||
<% @additional_js ||= [] %>
|
||||
<%=stylesheet_link_tag "admin", "tabs", "mailr", @additional_css %>
|
||||
<%=javascript_include_tag :defaults, "global", "webmail", @additional_js %>
|
||||
<%#=(@content_for_scripts ? @content_for_scripts : @additional_scripts )%>
|
||||
</head>
|
||||
<body id="bodyID" onload="<%=@onload_function%>">
|
||||
<div id="wholepage">
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
<ul id="secondary">
|
||||
<li><%= link_compose_new %></li>
|
||||
<li><a href='#' onclick="getFormField('composeMail').submit();"><%= t :send %></a></li>
|
||||
<li><a href="#" onclick="chooseContacts();"><%= t :choose_address %></a></li>
|
||||
<li><a href="#" onclick="chooseContacts('<%=url_for(:controller => :contacts, :action => :index) %>');"><%= t :choose_address %></a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><%=link_mail_prefs%></li>
|
||||
|
|
|
@ -27,7 +27,7 @@
|
|||
<input type="hidden" name="page" value="<%=@page%>"/>
|
||||
|
||||
<a href='#' onclick='toggle_msg_operations(true);'>
|
||||
<%=t :operations%><img id='img_msgops' alt='open' src='/images/list_<%=@ops_img_src%>.gif'/>
|
||||
<%=t :operations%><img id='img_msgops' alt='open' src='../images/list_<%=@ops_img_src%>.gif'/>
|
||||
</a>
|
||||
|
||||
<div id="msgops" class='<%=@ops_class%>'>
|
||||
|
|
|
@ -46,7 +46,9 @@ es-ES:
|
|||
bcc: BCC
|
||||
send: Enviar
|
||||
choose_address: Elegir dirección desde contactos
|
||||
choose: Elegir
|
||||
compose_txt: Componer nuevo correo
|
||||
groups: Grupos
|
||||
attachment: Adjunto
|
||||
add: Agregar
|
||||
first_name: Nombre
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
function chooseContacts() {
|
||||
rs('', '/contacts/contact/list?mode=choose',550,480,0);
|
||||
function chooseContacts(url) {
|
||||
rs('', url + '?mode=choose',550,480,0);
|
||||
}
|
||||
|
||||
function setBulk() {
|
||||
|
|
Before Width: | Height: | Size: 155 B After Width: | Height: | Size: 155 B |
|
@ -32,7 +32,7 @@
|
|||
|
||||
#folders { margin: 0 0 0 0; padding: 0; border: 1px solid #888; background: #fff; text-align: left; }
|
||||
#folders ul { margin: 0; padding: 10px; }
|
||||
#folders ul li { margin: 0; padding-left: 20px; list-style-type:none; font-size: 1em; background: url("/images/icon-folder-open.gif") top left no-repeat; }
|
||||
#folders ul li { margin: 0; padding-left: 20px; list-style-type:none; font-size: 1em; background: url("icon-folder-open.gif") top left no-repeat; }
|
||||
#folders h4 { margin: 0; padding: 5px; text-align: left; }
|
||||
|
||||
#messages { margin: 0 0 0 0; padding: 0; width: 100%; }
|
||||
|
|
Loading…
Reference in a new issue