1 oilsRptSetSubClass('oilsRptWidget', 'oilsRptObject');
2 oilsRptWidget.OILS_RPT_TRANSFORM_WIDGET = 0;
3 oilsRptWidget.OILS_RPT_OPERATION_WIDGET = 1;
5 function oilsRptWidget(args) {
7 this.dest = elem('input',{type:'text'});
10 oilsRptWidget.prototype.init = function(args) {
13 this.node = args.node;
14 this.type = args.type;
15 this.action = args.action;
16 this.column = args.column;
19 oilsRptWidget.prototype.getValue = function() {
20 return this.dest.value;
23 oilsRptWidget.prototype.draw = function() {
24 appendClear(this.node, this.dest);
27 /* ----------------------------------------------------------- */
29 oilsRptSetSubClass('oilsRptMultiInputWidget', 'oilsRptWidget');
30 function oilsRptMultiInputWidget(args) {
34 oilsRptMultiInputWidget.prototype.init = function(args) {
36 this.super.init(args);
37 this.count = (args.count) ? args.count : 2;
39 for( var i = 0; i < this.count; i++ )
40 this.dest.push(elem('input',{type:'text'}));
43 oilsRptMultiInputWidget.prototype.getValue = function() {
45 for( var i = 0; i < this.dest.length; i++ )
46 vals.push(this.dest.value);
50 oilsRptMultiInputWidget.prototype.draw = function() {
51 removeChildren(this.node);
52 for( var i = 0; i < this.dest.length; i++ ) {
53 this.node.appendChild(this.label[i]);
54 this.node.appendChild(this.dest[i]);
58 oilsRptMultiInputWidget.prototype.setLabels = function(labels) {
65 /* ----------------------------------------------------------- */
67 oilsRptSetSubClass('oilsRptMultiWidget', 'oilsRptWidget');
68 function oilsRptMultiWidget(args) {
72 oilsRptMultiWidget.prototype.init = function(args) {
74 this.super.init(args);
75 this.dest = elem('select',
76 {multiple:'multiple','class':'oils_rpt_info_selector'});
77 this.addButton = elem('button',null, 'Add');
78 this.addButton = this.getSourceCollector();
81 oilsRptMultiWidget.prototype.getValue = function() {
83 for( var i = 0; i < this.dest.options.length; i++ )
84 vals.push(this.dest.options[i].value);
88 oilsRptMultiWidget.prototype.removeSelected = function() {
89 oilsDeleteSelectedItems(this.dest);
92 oilsRptMultiWidget.prototype.addItem = function(name, val) {
93 for( var i = 0; i < this.dest.options.length; i++ )
94 if( this.dest.options[i].value == val )
96 insertSelectorVal(this.dest, -1, name, val);
99 oilsRptMultiWidget.prototype.setSource = function(src) {
103 oilsRptMultiWidget.prototype.draw = function() {
104 appendClear(this.node, this.source);
105 appendClear(this.node, this.dest);
109 /* ----------------------------------------------------------- */
111 oilsRptSetSubClass('oilsRptInputMultiWidget', 'oilsRptMultiWidget');
112 function oilsRptInputMultiWidget(args) {
115 oilsRptInputMultiWidget.prototype.init = function(args) {
117 this.super.init(args);
118 this.setSource(elem('input',{type:'text'}));
121 oilsRptInputMultiWidget.prototype.addItem = function(name, val) {
122 this.super.addItem(name, val);
123 this.source.value = "";
127 oilsRptInputMultiWidget.prototype.getSourceCollector = function() {
130 obj.addItem(obj.source.value, obj.source.value);
134 /* ----------------------------------------------------------- */
136 oilsRptSetSubClass('oilsRptSelectorMultiWidget', 'oilsRptMultiWidget');
137 function oilsRptSelectorMultiWidget(args) {
140 oilsRptSelectorMultiWidget.prototype.init = function(args) {
142 this.super.init(args);
144 elem('select',{multiple:multiple, 'class':'oils_rpt_info_selector'}));
147 oilsRptSelectorMultiWidget.prototype.getSourceCollector = function() {
150 for( var i = 0; i < obj.source.options.length; i++ )
151 obj.addItem(obj.source.options.name, obj.source.options.value);
155 /* ----------------------------------------------------------- */
157 oilsRptSetSubClass('oilsRptRemoteWidget', 'oilsRptSelectorMultiWidget');
158 function oilsRptRemoteWidget(args) {
161 oilsRptRemoteWidget.prototype.init = function(args) {
163 this.super.init(args);
164 this.selector = args.selector;
167 oilsRptRemoteWidget.prototype.draw = function() {
172 oilsRptRemoteWidget.prototype.setFetch = function(func) {