document.captureEvents(Event.MOUSEMOVE);
document.onmousemove = setMousePos;
+ DEBUGSLIM = true;
+
var cgi = new CGI();
fetchUser(cgi.param('ses'));
DOM.oils_rpt_user.appendChild(text(USER.usrname()));
oilsRptFilterPicker.prototype.addOpt = function(key) {
var filter = OILS_RPT_FILTERS[key];
var label = filter.label;
- if( filter.labels && filter.labels[this.dtype] )
- label = filter.labels[this.dtype];
- var obj = this;
insertSelectorVal( this.selector, -1, label, key);
+ if( filter.labels && filter.labels[this.dtype] )
+ insertSelectorVal( this.selector, -1, filter.labels[this.dtype], key);
}
oilsRptFilterPicker.prototype.getSelected = function() {
/* display the time-relative options if necessary */
oilsRptParamEditor.prototype.buildRelWidget = function(par, row) {
+
var field = oilsRptFindField(
oilsIDL[oilsRptPathClass(par.path)], oilsRptPathCol(par.path));
+
_debug('checking rel widget for datatype '+field.datatype);
- if( field.datatype != 'timestamp' ) return;
+
+ if(field.datatype != 'timestamp') return;
+ if(par.op != '=') return;
var dom = $n(row,'reldate_div');
unHideMe(dom);
}
-
switch(param.op) {
case 'in':
case 'not in':
default:
switch(dtype) {
case 'timestamp':
- return new oilsRptRelDatePicker({node:node});
+ return new oilsRptWidget({node:node});
default:
return new oilsRptWidget({node:node});
}
<td name='transform'/>
<td name='action'/>
<td>
- <div name='widget'/>
+ <div>
+ <span name='hint'/>
+ <span name='widget'/>
+ </div>
<div name='reldate_div' style='margin-top: 5px;' class='hide_me'>
<div><b> - OR - </b></div>
<input type='checkbox' name='choose_rel'/> Use a relative date instead.
oilsRptSetSubClass('oilsRptReportEditor', 'oilsRptObject');
var oilsRptReportEditorFolderTree;
+
function oilsRptReportEditor(rptObject, folderWindow) {
var tmpl = rptObject.templateObject;
var rpt = rptObject.reportObject;
//return;
+ var obj = this;
var req = new Request(OILS_RPT_CREATE_REPORT, SESSION, report, schedule );
req.callback(
function(r) {
var res = r.getResultObject();
oilsRptAlertSuccess();
oilsRptCurrentFolderManager.draw();
+ obj.folderWindow.draw();
}
);
req.send();
label : 'Age'
},
+ relative_year : {
+ datatype : OILS_RPT_DTYPE_TIMESTAMP,
+ label : 'Relative year'
+ },
+
+ relative_month : {
+ datatype : OILS_RPT_DTYPE_TIMESTAMP,
+ label : 'Relative month'
+ },
+
+ relative_week : {
+ datatype : OILS_RPT_DTYPE_TIMESTAMP,
+ label : 'Relative week'
+ },
+
+ relative_date : {
+ datatype : OILS_RPT_DTYPE_TIMESTAMP,
+ label : 'Relative date'
+ },
/* int / float transforms ----------------------------------- */
sum : {
+
+
+
+
+
+
+
+/* --------------------------------------------------------------------- */
+/* --------------------------------------------------------------------- */
+
+function oilsRptAtomicWidget(args) {
+ this.node = args.node;
+ this.source = args.source;
+ this.dest = elem('input',{type:'text',size:12});
+}
+oilsRptAtomicWidget.prototype.draw = function() {
+ if( this.source )
+ appendClear(this.node, this.source);
+ appendClear(this.node, this.dest);
+}
+oilsRptAtomicWidget.prototype.getValue = function() {
+ return this.dest.value;
+}
+/* --------------------------------------------------------------------- */
+function oilsRptListWidget(args) {
+ this.node = args.node;
+ this.source = args.source;
+ this.dest = elem('select',
+ {multiple:'multiple','class':'oils_rpt_small_info_selector'});
+}
+oilsRptListWidget.prototype.draw = function() {
+ appendClear(this.source);
+ appendClear(this.dest);
+}
+oilsRptListWidget.prototype.getValue = function() {
+ return getSelectedList(this.dest);
+}
+/* --------------------------------------------------------------------- */
+function oilsRptBetweenWidget(args) {
+ this.node = args.node;
+ this.startSource = args.startSource;
+ this.endSource = args.endSource;
+ this.dest = elem('select',
+ {multiple:'multiple','class':'oils_rpt_small_info_selector'});
+}
+oilsRptBetweenWidget.prototype.draw = function() {
+ appendClear(this.startSource);
+ appendClear(this.endSource);
+ appendClear(this.dest);
+}
+oilsRptBetweenWidget.prototype.getValue = function() {
+ return getSelectedList(this.dest);
+}
+
+
+
+