/*** ZEN Client Class Definitions ***/
/*** Package:   ISS.ZEN.Extended ***/
/*** Namespace:   DEV-APP-LIB ***/
/*** Generated: 2007-10-17 20:18:12 ***/

// version number: must match %ZENVersion
js_ISS_ZEN_Extended = 14;

// ================================================================================
_zenClassIdx['http://www.intsoftsol.com.au/zen/buttonAttach'] = 'ISS_ZEN_Extended_buttonAttach';
function ISS_ZEN_Extended_buttonAttach(index,id) {
	if (index>=0) {ISS_ZEN_Extended_buttonAttach__init(this,index,id);}
}

function ISS_ZEN_Extended_buttonAttach__init(o,index,id) {
	('undefined' == typeof ISS_ZEN_Component_button__init) ?zenMaster.ISS_ZEN_Component_button__init(o,index,id):ISS_ZEN_Component_button__init(o,index,id);
	o.caption = 'Attach';
	o.controller = true;
	o.onclick = 'zenThis.openAttachments();';
	o.parentClass = '';
	o.parentId = '';
	o.redirect = 'ISS.UI.App.FileAttachment.cls';
}
function ISS_ZEN_Extended_buttonAttach_serialize(set,s)
{
	s[0]='147149355';s[1]=this.index;s[2]=this.id;s[3]=this.name;s[4]=set.addObject(this.parent,'parent');s[5]=set.addObject(this.composite,'composite');s[6]=this.align;s[7]=this.aux;s[8]=this.caption;s[9]=this.clientType;s[10]=this.containerStyle;s[11]=this.controlClass;s[12]=this.controlStyle;s[13]=(this.controller?1:0);s[14]=this.dataBinding;s[15]=(this.disabled?1:0);s[16]=(this.dynamic?1:0);s[17]=this.enclosingClass;s[18]=this.enclosingStyle;s[19]=this.error;s[20]=this.height;s[21]=(this.hidden?1:0);s[22]=(this.invalid?1:0);s[23]=this.invalidMessage;s[24]=this.label;s[25]=this.labelClass;s[26]=this.labelStyle;s[27]=this.onblur;s[28]=this.onchange;s[29]=this.onclick;s[30]=this.ondblclick;s[31]=this.onfocus;s[32]=this.onhide;s[33]=this.onkeydown;s[34]=this.onkeypress;s[35]=this.onkeyup;s[36]=this.onmousedown;s[37]=this.onmouseout;s[38]=this.onmouseover;s[39]=this.onmouseup;s[40]=this.onrefresh;s[41]=this.onshow;s[42]=this.onsubmit;s[43]=this.onupdate;s[44]=this.onvalidate;s[45]=this.originalValue;s[46]=this.overlayMode;s[47]=this.parentClass;s[48]=this.parentId;s[49]=(this.readOnly?1:0);s[50]=this.redirect;s[51]=this.renderFlag;s[52]=(this.required?1:0);s[53]=this.requiredMessage;s[54]=this.slice;s[55]=this.title;s[56]=this.tuple;s[57]=this.valign;s[58]=('boolean'==typeof this.value?(this.value?1:0):this.value);s[59]=(this.visible?1:0);s[60]=this.width;
}
function ISS_ZEN_Extended_buttonAttach_getSettings(s)
{
	s['name'] = 'string';
	s['caption'] = 'caption';
	s['controller'] = 'boolean';
	s['onclick'] = 'eventHandler';
	s['parentClass'] = 'string';
	s['parentId'] = 'string';
	s['redirect'] = 'uri';
	this.invokeSuper('getSettings',arguments);
}

function ISS_ZEN_Extended_buttonAttach_openAttachments() {
	var form = this.getForm();
	var ds = form.getController();
	var pclass = this.parentClass;
	var pid = this.parentId;
	if (ds) {
		if (pclass=='') { pclass = ds.getProperty('modelClass'); }
		if (pid=='') { pid = ds.getModelId(); }
	}
	if (pid!='') {
		var parms = new Object;
		parms['parentClass'] = pclass;
		parms['parentId'] = pid;
		zenPage.openPopup(this.redirect,'FileAttachment','status,scrollbars,resizable',parms);
	}
}

function ISS_ZEN_Extended_buttonAttach_ReallyRefreshContents() {
	zenInstanceMethod(this,'ReallyRefreshContents','','',arguments);
}
function ISS_ZEN_Extended_buttonAttach__Loader() {
	zenLoadClass('ISS_ZEN_Component_button');
	ISS_ZEN_Extended_buttonAttach.prototype = zenCreate('ISS_ZEN_Component_button',-1);
	var p = ISS_ZEN_Extended_buttonAttach.prototype;
	p.constructor = ISS_ZEN_Extended_buttonAttach;
	p.superClass = ('undefined' == typeof ISS_ZEN_Component_button) ? zenMaster.ISS_ZEN_Component_button.prototype:ISS_ZEN_Component_button.prototype;
	p.__ZENcomponent = true;
	p._serverClass = 'ISS.ZEN.Extended.buttonAttach';
	p._type = 'buttonAttach';
	p.serialize = ISS_ZEN_Extended_buttonAttach_serialize;
	p.getSettings = ISS_ZEN_Extended_buttonAttach_getSettings;
	p.ReallyRefreshContents = ISS_ZEN_Extended_buttonAttach_ReallyRefreshContents;
	p.openAttachments = ISS_ZEN_Extended_buttonAttach_openAttachments;
}

// ================================================================================
_zenClassIdx['http://www.intsoftsol.com.au/zen/buttonDelete'] = 'ISS_ZEN_Extended_buttonDelete';
function ISS_ZEN_Extended_buttonDelete(index,id) {
	if (index>=0) {ISS_ZEN_Extended_buttonDelete__init(this,index,id);}
}

function ISS_ZEN_Extended_buttonDelete__init(o,index,id) {
	('undefined' == typeof ISS_ZEN_Component_button__init) ?zenMaster.ISS_ZEN_Component_button__init(o,index,id):ISS_ZEN_Component_button__init(o,index,id);
	o.caption = 'Delete';
	o.confirmMessage = 'Delete the current record?';
	o.controller = false;
	o.linkedTable = '';
	o.onclick = 'zenThis.deleteForm();';
	o.redirect = '';
}
function ISS_ZEN_Extended_buttonDelete_serialize(set,s)
{
	s[0]='441551961';s[1]=this.index;s[2]=this.id;s[3]=this.name;s[4]=set.addObject(this.parent,'parent');s[5]=set.addObject(this.composite,'composite');s[6]=this.align;s[7]=this.aux;s[8]=this.caption;s[9]=this.clientType;s[10]=this.confirmMessage;s[11]=this.containerStyle;s[12]=this.controlClass;s[13]=this.controlStyle;s[14]=(this.controller?1:0);s[15]=this.dataBinding;s[16]=(this.disabled?1:0);s[17]=(this.dynamic?1:0);s[18]=this.enclosingClass;s[19]=this.enclosingStyle;s[20]=this.error;s[21]=this.height;s[22]=(this.hidden?1:0);s[23]=(this.invalid?1:0);s[24]=this.invalidMessage;s[25]=this.label;s[26]=this.labelClass;s[27]=this.labelStyle;s[28]=this.linkedTable;s[29]=this.onblur;s[30]=this.onchange;s[31]=this.onclick;s[32]=this.ondblclick;s[33]=this.onfocus;s[34]=this.onhide;s[35]=this.onkeydown;s[36]=this.onkeypress;s[37]=this.onkeyup;s[38]=this.onmousedown;s[39]=this.onmouseout;s[40]=this.onmouseover;s[41]=this.onmouseup;s[42]=this.onrefresh;s[43]=this.onshow;s[44]=this.onsubmit;s[45]=this.onupdate;s[46]=this.onvalidate;s[47]=this.originalValue;s[48]=this.overlayMode;s[49]=(this.readOnly?1:0);s[50]=this.redirect;s[51]=this.renderFlag;s[52]=(this.required?1:0);s[53]=this.requiredMessage;s[54]=this.slice;s[55]=this.title;s[56]=this.tuple;s[57]=this.valign;s[58]=('boolean'==typeof this.value?(this.value?1:0):this.value);s[59]=(this.visible?1:0);s[60]=this.width;
}
function ISS_ZEN_Extended_buttonDelete_getSettings(s)
{
	s['name'] = 'string';
	s['caption'] = 'caption';
	s['confirmMessage'] = 'caption';
	s['controller'] = 'boolean';
	s['linkedTable'] = 'string';
	s['onclick'] = 'eventHandler';
	s['redirect'] = 'uri';
	this.invokeSuper('getSettings',arguments);
}

function ISS_ZEN_Extended_buttonDelete_deleteForm() {
	var form = this.getForm();
	var ds = form.getController();
	if (ds&&(ds.getModelId()!='')&&(confirm(this.confirmMessage))) {
		ds.deleteId(ds.getModelId());
		if (ds.getModelId()==''&&(this.LinkedTable!='')) {
			var table = zenPage.getComponentById(this.linkedTable);
			table.setProperty('selectedIndex',-1);
			table.executeQuery();
		}
	}
}

function ISS_ZEN_Extended_buttonDelete_ReallyRefreshContents() {
	zenInstanceMethod(this,'ReallyRefreshContents','','',arguments);
}
function ISS_ZEN_Extended_buttonDelete__Loader() {
	zenLoadClass('ISS_ZEN_Component_button');
	ISS_ZEN_Extended_buttonDelete.prototype = zenCreate('ISS_ZEN_Component_button',-1);
	var p = ISS_ZEN_Extended_buttonDelete.prototype;
	p.constructor = ISS_ZEN_Extended_buttonDelete;
	p.superClass = ('undefined' == typeof ISS_ZEN_Component_button) ? zenMaster.ISS_ZEN_Component_button.prototype:ISS_ZEN_Component_button.prototype;
	p.__ZENcomponent = true;
	p._serverClass = 'ISS.ZEN.Extended.buttonDelete';
	p._type = 'buttonDelete';
	p.serialize = ISS_ZEN_Extended_buttonDelete_serialize;
	p.getSettings = ISS_ZEN_Extended_buttonDelete_getSettings;
	p.ReallyRefreshContents = ISS_ZEN_Extended_buttonDelete_ReallyRefreshContents;
	p.deleteForm = ISS_ZEN_Extended_buttonDelete_deleteForm;
}

// ================================================================================
_zenClassIdx['http://www.intsoftsol.com.au/zen/buttonNew'] = 'ISS_ZEN_Extended_buttonNew';
function ISS_ZEN_Extended_buttonNew(index,id) {
	if (index>=0) {ISS_ZEN_Extended_buttonNew__init(this,index,id);}
}

function ISS_ZEN_Extended_buttonNew__init(o,index,id) {
	('undefined' == typeof ISS_ZEN_Component_button__init) ?zenMaster.ISS_ZEN_Component_button__init(o,index,id):ISS_ZEN_Component_button__init(o,index,id);
	o.caption = 'New';
	o.controller = true;
	o.linkedTable = '';
	o.onclick = 'zenThis.newForm();';
	o.redirect = '';
}
function ISS_ZEN_Extended_buttonNew_serialize(set,s)
{
	s[0]='2548091029';s[1]=this.index;s[2]=this.id;s[3]=this.name;s[4]=set.addObject(this.parent,'parent');s[5]=set.addObject(this.composite,'composite');s[6]=this.align;s[7]=this.aux;s[8]=this.caption;s[9]=this.clientType;s[10]=this.containerStyle;s[11]=this.controlClass;s[12]=this.controlStyle;s[13]=(this.controller?1:0);s[14]=this.dataBinding;s[15]=(this.disabled?1:0);s[16]=(this.dynamic?1:0);s[17]=this.enclosingClass;s[18]=this.enclosingStyle;s[19]=this.error;s[20]=this.height;s[21]=(this.hidden?1:0);s[22]=(this.invalid?1:0);s[23]=this.invalidMessage;s[24]=this.label;s[25]=this.labelClass;s[26]=this.labelStyle;s[27]=this.linkedTable;s[28]=this.onblur;s[29]=this.onchange;s[30]=this.onclick;s[31]=this.ondblclick;s[32]=this.onfocus;s[33]=this.onhide;s[34]=this.onkeydown;s[35]=this.onkeypress;s[36]=this.onkeyup;s[37]=this.onmousedown;s[38]=this.onmouseout;s[39]=this.onmouseover;s[40]=this.onmouseup;s[41]=this.onrefresh;s[42]=this.onshow;s[43]=this.onsubmit;s[44]=this.onupdate;s[45]=this.onvalidate;s[46]=this.originalValue;s[47]=this.overlayMode;s[48]=(this.readOnly?1:0);s[49]=this.redirect;s[50]=this.renderFlag;s[51]=(this.required?1:0);s[52]=this.requiredMessage;s[53]=this.slice;s[54]=this.title;s[55]=this.tuple;s[56]=this.valign;s[57]=('boolean'==typeof this.value?(this.value?1:0):this.value);s[58]=(this.visible?1:0);s[59]=this.width;
}
function ISS_ZEN_Extended_buttonNew_getSettings(s)
{
	s['name'] = 'string';
	s['caption'] = 'caption';
	s['controller'] = 'boolean';
	s['linkedTable'] = 'string';
	s['onclick'] = 'eventHandler';
	s['redirect'] = 'uri';
	this.invokeSuper('getSettings',arguments);
}

function ISS_ZEN_Extended_buttonNew_newForm() {
	var form = this.getForm();
	var ds = form.getController();
	if (ds) {
		ds.setModelId('');
		if (this.LinkedTable!='') {
			var table = zenPage.getComponentById(this.linkedTable);
			table.setProperty('selectedIndex',-1);
			table.executeQuery();
		}
	}
}

function ISS_ZEN_Extended_buttonNew_ReallyRefreshContents() {
	zenInstanceMethod(this,'ReallyRefreshContents','','',arguments);
}
function ISS_ZEN_Extended_buttonNew__Loader() {
	zenLoadClass('ISS_ZEN_Component_button');
	ISS_ZEN_Extended_buttonNew.prototype = zenCreate('ISS_ZEN_Component_button',-1);
	var p = ISS_ZEN_Extended_buttonNew.prototype;
	p.constructor = ISS_ZEN_Extended_buttonNew;
	p.superClass = ('undefined' == typeof ISS_ZEN_Component_button) ? zenMaster.ISS_ZEN_Component_button.prototype:ISS_ZEN_Component_button.prototype;
	p.__ZENcomponent = true;
	p._serverClass = 'ISS.ZEN.Extended.buttonNew';
	p._type = 'buttonNew';
	p.serialize = ISS_ZEN_Extended_buttonNew_serialize;
	p.getSettings = ISS_ZEN_Extended_buttonNew_getSettings;
	p.ReallyRefreshContents = ISS_ZEN_Extended_buttonNew_ReallyRefreshContents;
	p.newForm = ISS_ZEN_Extended_buttonNew_newForm;
}

// ================================================================================
_zenClassIdx['http://www.intsoftsol.com.au/zen/buttonSave'] = 'ISS_ZEN_Extended_buttonSave';
function ISS_ZEN_Extended_buttonSave(index,id) {
	if (index>=0) {ISS_ZEN_Extended_buttonSave__init(this,index,id);}
}

function ISS_ZEN_Extended_buttonSave__init(o,index,id) {
	('undefined' == typeof ISS_ZEN_Component_button__init) ?zenMaster.ISS_ZEN_Component_button__init(o,index,id):ISS_ZEN_Component_button__init(o,index,id);
	o.caption = 'Save';
	o.clearController = true;
	o.controller = false;
	o.linkedTable = '';
	o.onclick = 'zenThis.saveForm();';
	o.redirect = '';
}
function ISS_ZEN_Extended_buttonSave_serialize(set,s)
{
	s[0]='2715141656';s[1]=this.index;s[2]=this.id;s[3]=this.name;s[4]=set.addObject(this.parent,'parent');s[5]=set.addObject(this.composite,'composite');s[6]=this.align;s[7]=this.aux;s[8]=this.caption;s[9]=(this.clearController?1:0);s[10]=this.clientType;s[11]=this.containerStyle;s[12]=this.controlClass;s[13]=this.controlStyle;s[14]=(this.controller?1:0);s[15]=this.dataBinding;s[16]=(this.disabled?1:0);s[17]=(this.dynamic?1:0);s[18]=this.enclosingClass;s[19]=this.enclosingStyle;s[20]=this.error;s[21]=this.height;s[22]=(this.hidden?1:0);s[23]=(this.invalid?1:0);s[24]=this.invalidMessage;s[25]=this.label;s[26]=this.labelClass;s[27]=this.labelStyle;s[28]=this.linkedTable;s[29]=this.onblur;s[30]=this.onchange;s[31]=this.onclick;s[32]=this.ondblclick;s[33]=this.onfocus;s[34]=this.onhide;s[35]=this.onkeydown;s[36]=this.onkeypress;s[37]=this.onkeyup;s[38]=this.onmousedown;s[39]=this.onmouseout;s[40]=this.onmouseover;s[41]=this.onmouseup;s[42]=this.onrefresh;s[43]=this.onshow;s[44]=this.onsubmit;s[45]=this.onupdate;s[46]=this.onvalidate;s[47]=this.originalValue;s[48]=this.overlayMode;s[49]=(this.readOnly?1:0);s[50]=this.redirect;s[51]=this.renderFlag;s[52]=(this.required?1:0);s[53]=this.requiredMessage;s[54]=this.slice;s[55]=this.title;s[56]=this.tuple;s[57]=this.valign;s[58]=('boolean'==typeof this.value?(this.value?1:0):this.value);s[59]=(this.visible?1:0);s[60]=this.width;
}
function ISS_ZEN_Extended_buttonSave_getSettings(s)
{
	s['name'] = 'string';
	s['caption'] = 'caption';
	s['clearController'] = 'boolean';
	s['controller'] = 'boolean';
	s['linkedTable'] = 'string';
	s['onclick'] = 'eventHandler';
	s['redirect'] = 'uri';
	this.invokeSuper('getSettings',arguments);
}

function ISS_ZEN_Extended_buttonSave_saveForm() {
	var id = '';
	var form = this.getForm();
	var ds = form.getController();
	if (form) {
		id = form.save();
		if (form.error!='') { return ''; }
		if (ds&&this.clearController) { ds.createNewObject(); }
		if (this.linkedTable!='') {
			var table = zenPage.getComponentById(this.linkedTable);
			table.setProperty('selectedIndex',-1);
			table.executeQuery();
		}
	}
	return id;
}

function ISS_ZEN_Extended_buttonSave_ReallyRefreshContents() {
	zenInstanceMethod(this,'ReallyRefreshContents','','',arguments);
}
function ISS_ZEN_Extended_buttonSave__Loader() {
	zenLoadClass('ISS_ZEN_Component_button');
	ISS_ZEN_Extended_buttonSave.prototype = zenCreate('ISS_ZEN_Component_button',-1);
	var p = ISS_ZEN_Extended_buttonSave.prototype;
	p.constructor = ISS_ZEN_Extended_buttonSave;
	p.superClass = ('undefined' == typeof ISS_ZEN_Component_button) ? zenMaster.ISS_ZEN_Component_button.prototype:ISS_ZEN_Component_button.prototype;
	p.__ZENcomponent = true;
	p._serverClass = 'ISS.ZEN.Extended.buttonSave';
	p._type = 'buttonSave';
	p.serialize = ISS_ZEN_Extended_buttonSave_serialize;
	p.getSettings = ISS_ZEN_Extended_buttonSave_getSettings;
	p.ReallyRefreshContents = ISS_ZEN_Extended_buttonSave_ReallyRefreshContents;
	p.saveForm = ISS_ZEN_Extended_buttonSave_saveForm;
}
/* EOF */
