/
Last.js
58 lines (50 loc) · 1.46 KB
/
Last.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
/**
* Representation of a button element preconfigured with a 'next' event
* @class LastButton
* @constructor
* @extends Button
* @requires ptclass
* @param {HTMLElement} element The HTML element surrounded by the control
* @param {Object} settings Configuration properties for this instance
*/
var Class = require( 'class' ),
Button = require( 'athena/Button' ),
LastButton;
LastButton = Class.create( Button, ( function () {
// RETURN METHODS OBJECT
return {
/**
* PTClass constructor
* @method initialize
* @public
* @param {Object} $super Pointer to superclass constructor
* @param {Object} $element JQuery object for the element wrapped by the component
* @param {Object} settings Configuration settings
*/
initialize: function ( $super, $element, settings ) {
// PRIVATE INSTANCE PROPERTIES
/**
* Default configuration values
* @property defaults
* @type Object
* @private
* @final
*/
var defaults = {
action: 'last'
};
// MIX THE DEFAULTS INTO THE SETTINGS VALUES
_.defaults( settings, defaults );
// CALL THE PARENT'S CONSTRUCTOR
$super( $element, settings );
}
};
}() ));
//Export to Common JS Loader
if( module ) {
if( typeof module.setExports === 'function' ){
module.setExports( LastButton );
} else if( module.exports ) {
module.exports = LastButton;
}
}