Proyectos de Subversion Moodle

Rev

| Ultima modificación | Ver Log |

Rev Autor Línea Nro. Línea
1 efrain 1
/* global ns */
2
/**
3
 * Create a field without html
4
 *
5
 * @param {mixed} parent
6
 * @param {object} field
7
 * @param {mixed} params
8
 * @param {function} setValue
9
 */
10
ns.None = function (parent, field, params, setValue) {
11
  this.parent = parent;
12
  this.field = field;
13
  this.params = params;
14
  this.setValue = setValue;
15
};
16
 
17
/**
18
 * Implementation of appendTo
19
 *
20
 * None doesn't append anything
21
 */
22
ns.None.prototype.appendTo = function () {};
23
 
24
/**
25
 * Implementation of validate
26
 *
27
 * None allways validates
28
 */
29
ns.None.prototype.validate = function () {
30
  return true;
31
};
32
 
33
/**
34
 * Collect functions to execute once the tree is complete.
35
 *
36
 * @param {function} ready
37
 */
38
ns.None.prototype.ready = function (ready) {
39
  this.parent.ready(ready);
40
};
41
 
42
/**
43
 * Remove this item.
44
 */
45
ns.None.prototype.remove = function () {
46
  ns.removeChildren(this.children);
47
};
48
 
49
// Tell the editor what widget we are.
50
ns.widgets.none = ns.None;