Fix choose contact

This commit is contained in:
Emilio Blanco 2011-03-31 17:59:22 -03:00
parent d1e57475ce
commit a2bad3c81d
10 changed files with 105 additions and 100 deletions

View file

@ -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

View file

@ -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

View file

@ -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">
@ -54,7 +55,7 @@
<td><%=contact.email%></td>
</tr>
<% end %>
<tr class="rowsep"><td colspan="3"><%=_('Groups')%>:</td></tr>
<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"/>
@ -66,8 +67,8 @@
<% 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"%>
@ -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 %>

View file

@ -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">

View file

@ -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>

View file

@ -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%>'>

View file

@ -46,7 +46,9 @@ es-ES:
bcc: BCC
send: Enviar
choose_address: Elegir direcci&oacute;n desde contactos
choose: Elegir
compose_txt: Componer nuevo correo
groups: Grupos
attachment: Adjunto
add: Agregar
first_name: Nombre

View file

@ -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() {

View file

Before

Width:  |  Height:  |  Size: 155 B

After

Width:  |  Height:  |  Size: 155 B

View file

@ -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%; }