%PDF- %PDF-
| Direktori : /data/www_bck/varak.net_bck/wiki.varak.net/extensions.old/MobileFrontend/javascripts/ |
| Current File : //data/www_bck/varak.net_bck/wiki.varak.net/extensions.old/MobileFrontend/javascripts/Section.js |
( function( M, $ ) {
var
View = M.require( 'View' ),
Section;
/**
* @class Section
* @extends View
*/
Section = View.extend( {
template: M.template.get( 'section.hogan' ),
defaults: {
line: '',
text: '',
editLabel: mw.msg( 'mobile-frontend-editor-edit' )
},
initialize: function( options ) {
var self = this;
options.tag = 'h' + options.level;
this.line = options.line;
this.text = options.text;
this.hasReferences = options.hasReferences || false;
this.id = options.id || null;
this.anchor = options.anchor;
this.children = [];
$.each( options.children || [], function() {
self.children.push( new Section( this ) );
} );
View.prototype.initialize.apply( self, arguments );
}
} );
M.define( 'Section', Section );
}( mw.mobileFrontend, jQuery ) );