Skip to content

Commit 2fdd6db

Browse files
committed
Simplify ValueFormatter interface, remove ValueFormatterStore
1 parent 727ff2f commit 2fdd6db

File tree

3 files changed

+2
-164
lines changed

3 files changed

+2
-164
lines changed

src/valueFormatters/ValueFormatterStore.js

Lines changed: 0 additions & 132 deletions
This file was deleted.

src/valueFormatters/formatters/ValueFormatter.js

Lines changed: 2 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -10,41 +10,20 @@
1010
* @author H. Snater < mediawiki@snater.com >
1111
*
1212
* @constructor
13-
*
14-
* @param {Object} options
1513
*/
16-
var SELF = vf.ValueFormatter = function VpValueFormatter( options ) {
17-
this._options = $.extend( {}, options || {} );
18-
};
14+
var SELF = vf.ValueFormatter = function VpValueFormatter() { };
1915

2016
$.extend( SELF.prototype, {
21-
/**
22-
* Formatter options.
23-
* @property {Object}
24-
* @private
25-
*/
26-
_options: null,
27-
28-
/**
29-
* Returns the formatter's options as set in the constructor.
30-
*
31-
* @return {Object}
32-
*/
33-
getOptions: function() {
34-
return $.extend( {}, this._options );
35-
},
3617

3718
/**
3819
* Formats a value. Will return a jQuery.Promise which will be resolved if formatting is
3920
* successful or rejected if it fails. There are various reasons why formatting could fail, e.g.
40-
* the formatter is using the API and the API cannot be reached. In case of success, the
21+
* the formatter is using a API and the API cannot be reached. In case of success, the
4122
* callbacks will be passed a dataValues.DataValue object. In case of failure, the callback's
4223
* parameter will be an error object of some sort (not implemented yet!).
4324
* @abstract
4425
*
4526
* @param {dataValues.DataValue} dataValue
46-
* @param {string} [dataTypeId]
47-
* @param {string} [outputType] The output's preferred MIME type
4827
* @return {Object} jQuery.Promise
4928
* @return {Function} return.done
5029
* @return {string|null} return.done.formatted Formatted DataValue.

src/valueFormatters/resources.php

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -32,15 +32,6 @@
3232
),
3333
),
3434

35-
'valueFormatters.ValueFormatterStore' => $moduleTemplate + array(
36-
'scripts' => array(
37-
'ValueFormatterStore.js',
38-
),
39-
'dependencies' => array(
40-
'valueFormatters',
41-
),
42-
),
43-
4435
'valueFormatters.formatters' => $moduleTemplate + array(
4536
'scripts' => array(
4637
'formatters/NullFormatter.js',

0 commit comments

Comments
 (0)