<var C = GLOBAL.Def.Style.color>
<fake_person>
<BREAK>
</fake_person>
<small><small><div> </div></small></small>
<var _uidstr = client_id>
<if client_gutitle NEQ "">
<var _uidstr = trim(lcase(client_gutitle))>
</if>
<var _txt = GLOBAL.Def.Client.joelie_protected>
<ensure variable="get.s2" value="">
<div style="float:left; width:310px;" class="navbar">
<div style="float:right;"><a href="http://#this_domain#/new:">New...</a></div>
<h4><a href="http://#this_domain#/j:@#_uidstr#^joelie">@#_uidstr#</a></h4>
<div style="margin-left:0.64em;">
<set j="@#_uidstr#^joelie" maxrows="15">
<setcrawl>
<var _idstr = set.id>
<var _ttl = "-#set.id#">
<if set.gutitle NEQ "">
<var _idstr = set.gutitle>
<var _ttl = "-#set.gutitle#">
<elseif set.title NEQ "">
<var _ttl = ":#set.title#">
</if>
<if len(_ttl) GT 48>
<tag.clean_shortstring str="#_ttl#" chars="40">
<var _ttl = return>
</if>
<div style="padding-bottom:2px;">
<a href="http://#this_domain#/j:/#set.tbl#-#_idstr#" title="/#set.tbl#-#_idstr#">#escapeMarkup(_ttl)#</a>
</div>
</setcrawl>
</set>
</div>
</div>
<div style="margin-left:340px;">
<div class="navbar" style="margin-left:7px;">
<a id="view_mode_link" href="http://#this_domain#/home/view" style="display:inline;" class="<if get.s2 EQ 'view' OR get.s2 EQ ''>selected</if>">View Notes</a>
<a id="edit_mode_link" href="http://#this_domain#/home/edit" style="display:inline;" class="<if get.s2 EQ 'edit'>selected</if>">Edit Notes</a>
</div>
<div>
<if get.s2 EQ '' OR get.s2 EQ 'view'>
<div style="padding:7px; border:1px solid #C.pri#; border-radius:7px; background:#C.g1#; color:##eee;">
<var _sels = "/|-|~|@|\^|:|\.">
<var _txt = escapeMarkup(_txt)>
<var _txt = replaceNoCase(_txt,CHR(10),"<br>#CHR(10)#","all")>
<loop list="#_txt#" delimiters="#CHR(10)#" index="x">
<var x = replace(x,CHR(9)," ","all")>
<div>
<var x = trim(x)>
<var _xLen = len(x)>
<if _xLen GT 0>
<var _pos = 1>
<var _len = 1>
<loop condition="#_pos# LTE _xLen">
<var _next = reFindNoCase("[^[:alnum:][:punct:]]((#_sels#)[^ #CHR(10)#]+)",x,_pos,true)>
<if arrayLen(_next.pos) GT 1>
<if _pos LT _next.pos[2]>
#mid(x,_pos,_next.pos[2]-_pos)#
</if>
<var _jstr = mid(x,_next.pos[2],_next.len[2])>
<if right(_jstr,4) EQ "<br>">
<var _jstr = left(_jstr,len(_jstr)-4)>
<a href="http://#this_domain#/j:#_jstr#">#_jstr#</a><br>
<else>
<a href="http://#this_domain#/j:#_jstr#">#_jstr#</a>
</if>
<var _pos = _next.pos[2] + _next.len[2] + 1>
<else>
#reReplaceNoCase(mid(x,_pos,_xLen-_pos+1),'[^[:alnum:][:punct:]](http\:\/\/[^ #CHR(10)#<>]+)',' <a href="\1" target="_blank">\1</a>','all')#
<break>
</if>
</loop>
</if>
</div>
</loop>
</div>
<else>
<style type="text/css">
##contains_joelie_protected .jfield_view { padding:7px; border:1px solid #C.pri#; border-radius:7px; min-height:300px; overflow-x:hidden; }
</style>
<div id="contains_joelie_protected">
<tag.jfield j="/user-#_uidstr#.joelie_protected" v="#_txt#"
update="1"
type="code">
</div>
</if>
</div>
</div>