fnp
/
redakcja.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'master' into view-refactor
[redakcja.git]
/
project
/
static
/
js
/
views
/
view.js
diff --git
a/project/static/js/views/view.js
b/project/static/js/views/view.js
index
975eeb9
..
498341e
100644
(file)
--- 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,
template: null,
overlayClass: 'view-overlay',
overlay: null,
-
+ id: null,
+
init: function(element, model, template) {
this.element = $(element);
this.model = model;
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, {}));
}
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;
},
frozen: function() {
return !!this.overlay;
},
@@
-51,3
+60,6
@@
var View = Class.extend({
this.element.contents().remove();
}
});
this.element.contents().remove();
}
});
+
+
+View.lastId = 0;