X-Git-Url: https://git.mdrn.pl/redakcja.git/blobdiff_plain/9490c431ea46a6c3d9f1d348a5b525c0bd3b6359..e823ad27e90d5cba05fb2ea8ac2a0d258be2f707:/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;