X-Git-Url: https://git.mdrn.pl/fnpeditor.git/blobdiff_plain/3db378e91ce58920fd1d1cdb6cd6997c88089edb..26b12d5df692dc8e76fa79ec98e9bdd491d1a8d4:/src/editor/plugins/core/edumed/match/element.js diff --git a/src/editor/plugins/core/edumed/match/element.js b/src/editor/plugins/core/edumed/match/element.js new file mode 100644 index 0000000..dda31ba --- /dev/null +++ b/src/editor/plugins/core/edumed/match/element.js @@ -0,0 +1,29 @@ +define(function(require) { + +'use strict'; + + +var $ = require('libs/jquery'), + _ = require('libs/underscore'), + elementBase = require('plugins/core/edumed/elementBase'), + viewTemplate = require('libs/text!./view.html'); + +var MatchExerciseElement = Object.create(elementBase); +_.extend(MatchExerciseElement, { + init: function() { + elementBase.init.call(this); + var view = $(_.template(viewTemplate)()); + this._container().append(view); + + this.createContainer(this.wlxmlNode.contents(), { + resetBackground: true, + manages: function() { + return true; + } + }); + } +}); + +return {tag: 'div', klass: 'exercise.match', prototype: MatchExerciseElement}; + +});