X-Git-Url: https://git.mdrn.pl/redakcja.git/blobdiff_plain/9490c431ea46a6c3d9f1d348a5b525c0bd3b6359..80a2c67a898b06c9c28bda89d7aa012676c2a23a:/project/static/js/views/view.js diff --git a/project/static/js/views/view.js b/project/static/js/views/view.js index 975eeb9d..498341e7 100644 --- a/project/static/js/views/view.js +++ b/project/static/js/views/view.js @@ -5,7 +5,8 @@ var View = Class.extend({ template: null, overlayClass: 'view-overlay', overlay: null, - + id: null, + init: function(element, model, template) { this.element = $(element); this.model = model; @@ -14,8 +15,16 @@ var View = Class.extend({ if (this.template) { this.element.html(render_template(this.template, {})); } + + View.lastId = View.lastId + 1; + this.id = 'view-' + View.lastId; }, - + + // Identyczność + hash: function() { + + }, + frozen: function() { return !!this.overlay; }, @@ -51,3 +60,6 @@ var View = Class.extend({ this.element.contents().remove(); } }); + + +View.lastId = 0;