<NotesSubForm name="Custom_CSS">
.s-masthead-height {
overflow:visible;
}
.inote-icon{
background:transparent url(/iNotes/Forms85_x.nsf/inote-icon.gif?openfileresource) no-repeat scroll left top;
height:2.3em;
vertical-align: middle;
}
.inote-title-text {
font-size:75%;font-weight: bold;color: <dwa:property id="D_COLOR_DIVDIALOG_SHADOW" quotes="none"/>;
}
.inote-title {
background-color: <dwa:property id="D_COLOR_DIVDIALOG_TITLE" quotes="none"/>;
border-bottom: 1px solid <dwa:property id="D_COLOR_DIVDIALOG_TITLE_BORDER" quotes="none"/>;
}
</NotesSubForm>
<NotesSubForm name="Custom_LazyLoad_Subforms">
<NotesDictionary>
<NotesVar name="s_inote_library" AllowPreset="yes">
</NotesDictionary>
<InsertNotesSubForm optional="yes" name=@{@If(s_inote_library="1"; "x_inote_library"; "")}>
</NotesSubForm>
<NotesSubForm name="x_inote_library">
/************/
/* This library is lazy-loaded. It is not loaded until after the first press of the "New iNote" icon. */
/************/
function x_new_inote(sId)
{
// x_new_inote creates a new dialog to enter a note. Using "new" allows us to create as many dialogs as we want.
var EJs=ELU.EJs[this.sId=sId];
var EcK=AAA.EcK;
var EoR='e-dialog-inote-' + (x_new_inote.YT++);
var EFb=EoR + ':x_inote_dialog';
var nTop=(x_new_inote.YT % 10) * 20;
var nLeft=(x_new_inote.YT % 10) * 20;
var oDtFmt=new EJw('yyyy-MM-dd');
var sTitle=oDtFmt.format((new EYB).setDate(new Date()));
var ETv=EcK.getElementById(EoR);
if (!ETv) {
var sHtml=''
+ '<div id="' + EoR + '" class="s-popup" style="z-index:99;display:none;top:' + nTop + 'px;left:' + nLeft + 'px;height:' + Math.min(200, EcK.body.clientHeight) + 'px;width:' + Math.min(300, EcK.body.clientWidth) + 'px;"'
+ ' com_ibm_dwa_ui_widget_class="x_inote_dialog"'
+ '>'
// DIALOG TITLE
+ '<div id="' + EoR + '-title"'
+ ' com_ibm_dwa_ui_draggable="true"'
+ ' com_ibm_dwa_ui_draggable_ids="' + EoR + '"'
+ '>'
+ '<table width="100%" class="inote-title" cellpadding="2" cellspacing="0"><tr><td width="100%" class="inote-title-text">iNote</td>'
+ '<td width="5"><button onclick="AAA.DSq.EKc.prototype.EYl[\'' + EFb + '\'].save();"><dwa:string id="L_OK" quotes="none"/></button></td>'
+ '<td width="5"><button onclick="AAA.DSq.EKc.prototype.EYl[\'' + EFb + '\'].close();">X</button></td>'
+ '</tr></table>'
+ '</div>'
+ '<div>'
// DIALOG BODY
+ '<form name="' + EoR + '-form" id="' + EoR + '-form"'
+ ' onsubmit="AAA.DSq.EKc.prototype.EYl[\'' + EFb + '\'].save();"'
+ '><table border="0">'
+ '<tr><td><dwa:string id="L_SUBJECT" quotes="none"/></td>'
+ '<td><input name="Subject" id="' + EoR + '-subj" type="text" size="32" value="' + sTitle + '" /></td></tr>'
+ '<tr><td colspan="2"><textarea name="Body" id="' + EoR + '-body" cols="32" rows="6"></textarea></td></tr>'
+ '</table>'
+ '</form>'
+ '</div>'
+ '</div>';
// show popup by adding html to main page, then tell DWA to load the x_inote_dialog widget
var oDiv=EcK.createElement('DIV');
oDiv.innerHTML=sHtml;
EcK.body.appendChild(oDiv.firstChild);
// main widget initialization function
EKc.prototype.ESH[EFb]=function() {
AAA.EcK.getElementById(EoR).style.display='block';
}
// load all widgets defined by the attribute "com_ibm_dwa_ui_widget_class"
EPl(EcK.getElementById(EoR));
} else{
EKc.prototype.ESH[EFb]();
}
}
x_new_inote.YT=1;
function x_inote_dialog(sId)
{
this.sId=sId;
}
x_inote_dialog.prototype.close=function x_inote_dialog_close()
{
AAA.EcK.getElementById(this.sId).style.display='none';
};
x_inote_dialog.prototype.save=function x_inote_dialog_save()
{
var EcK=AAA.EcK;
var oForm=EcK.forms[this.sId + '-form'];
var EFb=this.sId + ':x_inote_dialog';
this.close();
if(!AAA.FyN) {
var BRQ=EcK.createElement('div');
BRQ.className='s-hidden-iframe';
BRQ.innerHTML =
'<iframe name="iframeToRedirect" src="'
+ AAA.EuR
+ s_FF
+ '/iNotes/Proxy/?OpenDocument&Form=s_Blank'
+ AAA.ELM.s_StaticHTMLXHRArgs
+'"></iframe>';
BRQ=EcK.body.appendChild(BRQ);
AAA.FyN=BRQ;
}
oForm.encoding='multipart/form-data';
oForm.method='POST';
oForm.target='iframeToRedirect';
oForm.action =
AAA.MO
+ '/0/$new/?EditDocument&Form=s_RunAgent'
+ (AAA.ELM.s_Charset ? ('&charset=' + AAA.ELM.s_Charset) : '');
var DXX=[
{id:'%%Nonce', value:AAA.getNonce()}
,{id:'fnCB', value:'parent.AAA.DSq.EKc.prototype.EYl[\'' + EFb + '\'].DlJ'}
,{id:'AgentName', value:'wInoteSave'}
,{id:'CommonAgent', value:'2'}
,{id:'NotesItems', value:'Form=JournalEntry;TitleFormula=Subject;Categories=iNote;WebCategories=iNote;Subject;Body;'}
];
for (var i=0; i<DXX.length; i++)
{
var oItem=DXX[i];
var oInp=oForm[oItem.name];
if (!oInp) {
var oInp=EcK.createElement('INPUT');
oInp.name=oItem.id;
oInp.id=this.sid + '-' + oItem.id;
oInp.value=oItem.value;
oInp.type='hidden';
oForm.appendChild(oInp);
} else {
oInp.value=oItem.value;
}
}
oForm.submit();
this.EiW=EKc.prototype.EYl[AAA.Enm];
if (this.EiW)
this.EiW.Enl(1);
AAA.EVI.sr(
2
,''
,<dwa:string id="L_SAVING_DATA" quotes="single"/>
);
this.Elp=setTimeout('AAA.DSq.EKc.prototype.EYl[\'' + EFb + '\'].DlJ()',20000);
};
x_inote_dialog.prototype.DlJ=function x_inote_dialog_onDatasetComplete(oData)
{
if (this.Elp) {
clearTimeout(this.Elp);
this.Elp=null;
}
if (this.EiW) {
this.EiW.Enl(-1);
this.EiW=null;
}
if (!oData || !oData.items || oData.error.status) {
parent.alert(<dwa:string id="L_NPW_COPY_ERROR" quotes="single"/>);
return;
}
AAA.EVI.sr(
2
,''
, (x_inote_dialog.kDOCUMENT_VALID == oData.items[1].status ? 'Saved: ' : 'Error saving: ') + oData.items[1].id
);
};
x_inote_dialog.kDOCUMENT_VALID=1001;
x_inote_dialog.kDOCUMENT_DUPLICATE=1002;
x_inote_dialog.kDOCUMENT_ERROR=1003;
x_inote_dialog.kDOCUMENT_DUMMY=9999;
EKc.prototype.FKd['inote_library']=true;
</NotesSubForm>
<NotesSubForm name="Custom_JS_Lite">
function Custom_Scene_PostLoad_Lite(s_SceneName)
{
if (s_SceneName == 'e-panelmanager:EVy') {
setTimeout('inote_initialize()', 0);
}
}
function inote_initialize()
{
AAA.DSq.EKc.prototype.EQj['x_new_inote']=['inote_library'];
var tf=AAA.BYp('transparent.gif');
var sHtml=''
+ '<div id="e-new-inote" class="s-rightpanel inote-icon"'
+ ' onclick="AAA.DSq.ELU(event, \'e-new-inote\', \'x_new_inote\');return false;"'
+ ' onmouseover="this.style.backgroundColor=\'rgb(251,215,116)\'"'
+ ' onmouseout="this.style.backgroundColor=\'\'"'
+ '>'
+ '<img border="0"'
+ ' alt="iNote" title="iNote"'
+ ' width="21" height="21"'
+ ' src="' + tf + '"'
+ ' /></div>';
AAA.EcK.getElementById('e-ftsearch-container').style.right='22px';
var oDiv=AAA.EcK.createElement('DIV');
oDiv.innerHTML=sHtml;
AAA.EcK.getElementById('e-ftsearch-container').parentNode.appendChild(oDiv.firstChild);
}
</NotesSubForm>
<NotesSubForm name="Custom_About">
<NotesDictionary>
<NotesVar name=CustomExtFormsVersion value={L_ABOUT_RELEASE_NUM}>
<NotesVar name=CustomUserVersion value={1.0}>
</NotesDictionary>
</NotesSubForm>
<NotesFileResource mimetype="image/gif" name="inote-icon.gif" value="../customization/x-inote/inote-icon.gif" hide_from_web="no" hide_from_notes="yes" language_specific="no"></NotesFileResource>
<NotesAgent name="(wInoteSave)" copy_from_template="../customization/x-inote/resources.nsf"></NotesAgent>