diff -r 1b7289414d3c -r fca0475da9a7 client/js/main.js
--- a/client/js/main.js Tue Apr 23 10:38:48 2013 +0200
+++ b/client/js/main.js Tue Apr 23 17:08:42 2013 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright 2012 Institut de recherche et d'innovation
+ * Copyright 2012-2013 Institut de recherche et d'innovation
* contributor(s) : Yves-Marie Haussonne, Raphael Velt, Samuel Huron
*
* contact@iri.centrepompidou.fr
@@ -96,12 +96,12 @@
},_opts.auto_refresh)
}
}
-}
+};
Rkns._BaseBin.prototype.destroy = function() {
this.$.detach();
this.renkan.resizeBins();
-}
+};
/* Point of entry */
@@ -253,7 +253,7 @@
this.$.find(".Rk-Bins-Search-Form").submit(function() {
return false
});
-}
+};
Rkns.Renkan.prototype.template = Rkns._.template(
'<% if (options.show_bins) { %>
<%- translate("Select contents:")%>
'
@@ -273,16 +273,16 @@
return Rkns.i18n[this.options.language.substr(0,2)][_text];
}
return _text;
-}
+};
Rkns.Renkan.prototype.onStatusChange = function() {
this.renderer.onStatusChange();
-}
+};
Rkns.Renkan.prototype.setSearchEngine = function(_key) {
this.search_engine = this.search_engines[_key];
this.$.find(".Rk-Search-Current").attr("class","Rk-Search-Current " + this.search_engine.getBgClass());
-}
+};
Rkns.Renkan.prototype.resizeBins = function() {
var _d = + this.$.find(".Rk-Bins-Head").outerHeight();
@@ -292,7 +292,7 @@
this.$.find(".Rk-Bin-Main").css({
height: this.$.find(".Rk-Bins").height() - _d
});
-}
+};
/* Utility functions */
@@ -341,17 +341,18 @@
},
inherit : function(_baseClass, _callbefore) {
- var _class = function() {
+ var _class = function(_arg) {
if (typeof _callbefore === "function") {
_callbefore.apply(this, Array.prototype.slice.call(arguments, 0));
}
_baseClass.apply(this, Array.prototype.slice.call(arguments, 0));
- if (typeof this._init == "function") {
+ if (typeof this._init == "function" && !this._initialized) {
this._init.apply(this, Array.prototype.slice.call(arguments, 0));
+ this._initialized = true;
}
}
- _class.prototype = new _baseClass();
+ Rkns._(_class.prototype).extend(_baseClass.prototype);
return _class;
}
-}
\ No newline at end of file
+};