# this is _msgs_wide.js

||ifequal||sid||0||
auth_error('||auth_fail_reason||');
||else||

# Need to know our current folder "type"
||if(equal(search_type,(imap)))||
#	hack it for now - if not good enough needs to be output on a per message basis instead	
	||define||fld_type||1||
||else||
	||tcmd_load_fld_info||
||endif||
||if(search)||
	||define||show_fld||true||
||endif||
||define||show_size||true||
||define||show_att||true||
||ifdef||alt||
	||undef||show_sel||
||endif||

setMessages('<span>\
			<table id="x_msgs_table" class="msgs_table wide_list" style="width:100%;table-layout:fixed;">\
		<colgroup>\
			<col style="width:20px;">\
			<col style="width:100%;">\
		</colgroup>\
||undef||done_some||\
\
||begin_list_messages||	||ifndef||done_some|| ||define||first_item||msg_id|| ||endif|| ||define||done_some||true|| \
\
# ||if(not(istrue(context_disable)))||\
  ||if(and(not(istrue(opanel_hist)),not(istrue(done_hdr1))))||\
	<tr><td class="separator_right"></td><td class="separator_right"><a href="#" class="link_blue" style="float:right;margin-right:5px;"> Manage </a> \
				Pending</td></tr>\
	||define||done_hdr1||true||\
  ||endif||\
\
  ||if(and(istrue(opanel_hist),not(istrue(done_hdr2))))||\
	<tr><td class="separator_right"></td><td class="separator_right">\
	||ifndef||done_hdr1||\
		<a href="#" class="link_blue" style="float:right;margin-right:5px;"> Manage </a> \
	||endif||\
				History </td></tr>\
	||define||done_hdr2||true||\
  ||endif||\
# ||endif||\
\
	<tr class="msgs_line ||iftrue(h_unread)||msg_unread||endif|| ||iftrue(h_recent)||msg_recent||endif|| ||h_replied|| ||if(and(equal(fld_type,3),not(blank(search))))||msg_sent||endif||" ||iftrue(h_draft)||msg_draft="true" ||endif||  from_email="||web_encode_js(h_from_short)||" msg_id="||msg_id||">\
	  <td class="mi" valign="center">\
	||iftrue(h_deferred)||\
	 ||iftrue(h_returned)||\
	  <div class="wide_itm"><div class="star star_blue"></div></div>\
	 ||else||\
	  <div class="wide_itm"><div class="deferred"></div></div>\
	 ||endif||\
	||else||\
 	 ||iftrue(h_flagged)||\
	  <div style="margin-top:6px;"><div class="star star_sel"></div></div>\
	 ||else||\
	  <div class="x_replied" style="margin-top:5px;"></div>\
	 ||endif||\
	||endif||\
	  </td>\
  	  <td class="mi" style="padding:5px; padding-left:3px;">\
		<div class="mi" style="padding-top:1px;"><div class="xtrim"><div class="xwide">\
		  <div style="float:right;">\
	||ifdef||show_fld||\
		<a class="wide_fld" title="||web_encode_js(msg_fld)||" style="font-style:italic;">||web_encode_js(msg_fld)||</a> &nbsp; \
	||endif||\
		  	<span class="md wxc" title="||msg_date|| ||msg_time||">||date_basic(msg_xdate)||</span>\
		  </div>\
		  <div class="infoicons" style="margin-right:10px;">\
			  ||ifdef||show_att||\
				||if(greater_than(msg_attach,0))||<div class="msgline_clip as"></div>||endif||\
				||if(equal(msg_priority,(high)))||<div class="msgline_high as"></div>||endif||\
				||if(equal(msg_priority,(low)))||<div class="msgline_low as"></div>||endif||\
			  ||endif||\
			  
		  </div>\
		  <a class="wide_to" style="font-size:1.1em;" title="||web_encode_js(show_rcpts(h_from))||">||web_encode_js(show_rcpts_2(h_from))||</a>\
		</div></div></div>\
		<div class="mi" style="padding-top:1px;"><div class="x_trim"><div class="x_wide">\
		    <div style="float:left;">\
			  ||iftrue(pref_devt_mode)||\
				<div class="ar asl"><div class="at"><div class="au"><div class="av">||msg_id||</div></div></div></div>\
			  ||endif||\
		    </div>\
			<div class="labels" style="float:right;">\
		 	 <span class="wxc">||bytes_basic(msg_size)||</span>\
		 	</div>\
			<div class="xwide" style="padding-top:1px;"><a class="wide_subj">||web_encode_js(web_encode(h_subject))||</a></div>\
		</div></div></div>\
		<div class="mi">\
	  	||if(and(istrue(h_deferred),not(istrue(h_returned))))||\
			<div class="snippet_outer_wide" style="height:14px;"><span class="snippet">$$st_deferred_until$$ ||date_basic(msg_xdefer)||</span></div>\
		||else||\
		  ||iftrue(show_snippets)||\
			<div class="snippet_outer_wide" style="height:||mul(pref_snippet_lines,14)||px;"><span class="snippet">||web_encode_js(web_encode(h_snippet))||</span></div>\
		  ||endif||\
		||endif||\
		</div>\
	  	<div class="mi"><div class="xtrim"><div class="xwide">\
		  <div class="labels" style="float:right;">\
		  ||begin_list_msg_labels||\
			<div class="ar as" label_id="||web_encode_js(label_name)||"><div class="at" style="background-color: ||label_bg||; border-color: ||label_bdr||;"><div class="au" style="border-color:||label_bdr||;"><div class="av" style="color: ||label_col||;">||web_encode_js(label_name)||</div></div></div></div>\
		  ||end_list_msg_labels||\
		</div>\
		</div>\
		<div class="mi">\
		  ||if(not(blank(h_comment)))||\
			<div class="ar asl"><div class="at" style="background-color: #EAEA1B; border-color: #EAEA1B;"><div class="au" style="border-color:#EAEA1B"><div class="av">||web_encode_js(h_comment)||</div></div></div></div>\
		  ||endif||\
		</div></div></div>\
	</td>\
	  </tr>\
||end_list_messages||\
		</table>\
	||iftrue(and(done_some,not(alt)))||\
		<div class="msglist_nav">$$st_displayed$$ <span id="msg_navigator_wide"></span></div>\
	||endif||\
	||ifndef||done_some||\
	  ||ifndef||alt||\
		<div class="nomessages">$$st_info_nomsg_fld$$</div>\
	  ||else||\
# SURGEMAIL SRC: sw_searchspec_parse 
#		<div class="nomessages">$$st_info_nomsg_conv$$ ||web_encode_js(raw_search)||.</div>\
		<div class="nomessages">$$st_info_nomsg_conv$$ ||web_encode_js(search)||.</div>\
	  ||endif||\
	||endif||</span>',||msgs_count||,||newest_uid||);



set_first_message('||msg_wanted||',false,||json_validate_bool(disable_markread)||,false,true,'opanel');

||endif||

