X-Git-Url: https://git.mdrn.pl/redakcja.git/blobdiff_plain/9490c431ea46a6c3d9f1d348a5b525c0bd3b6359..eb77cf373a37d609fcf39626c36d2878d4a60e6c:/project/static/js/views/view.js?ds=inline 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;