client/js/main.js
changeset 433 e457ec945e50
parent 430 d3ae63bc18c6
child 444 19f0b7803aed
child 447 e246651b6626
--- a/client/js/main.js	Fri Apr 24 18:02:09 2015 +0200
+++ b/client/js/main.js	Sat Apr 25 04:13:53 2015 +0200
@@ -100,7 +100,7 @@
     this.options = _.defaults(_opts, Rkns.defaults, {templates: renkanJST});
     this.template = renkanJST['templates/main.html'];
 
-    _(this.options.property_files).each(function(f) {
+    _.each(this.options.property_files,function(f) {
         Rkns.$.getJSON(f, function(data) {
             _this.options.properties = _this.options.properties.concat(data);
         });
@@ -118,7 +118,7 @@
     	this.current_user = user_id;
     	this.renderer.redrawUsers();
     };
-    
+
     if (typeof this.options.user_id !== "undefined") {
         this.current_user = this.options.user_id;
     }
@@ -154,7 +154,7 @@
             _select = this.$.find(".Rk-Search-List"),
             _input = this.$.find(".Rk-Web-Search-Input"),
             _form = this.$.find(".Rk-Web-Search-Form");
-        _(this.options.search).each(function(_search, _key) {
+        _.each(this.options.search, function(_search, _key) {
             if (Rkns[_search.type] && Rkns[_search.type].Search) {
                 _this.search_engines.push(new Rkns[_search.type].Search(_this, _search));
             }
@@ -188,7 +188,7 @@
         );
         this.setSearchEngine(0);
     }
-    _(this.options.bins).each(function(_bin) {
+    _.each(this.options.bins, function(_bin) {
         if (Rkns[_bin.type] && Rkns[_bin.type].Bin) {
             _this.tabs.push(new Rkns[_bin.type].Bin(_this, _bin));
         }
@@ -213,7 +213,7 @@
                 var _models = _this.project.get("nodes").where({
                     uri: $(_t).attr("data-uri")
                 });
-                _(_models).each(function(_model) {
+                _.each(_models, function(_model) {
                     _this.renderer.highlightModel(_model);
                 });
             }
@@ -277,7 +277,7 @@
             return;
         }
         lastsearch = search.source;
-        _(_this.tabs).each(function(tab) {
+        _.each(_this.tabs, function(tab) {
             tab.render(search);
         });
 
@@ -377,7 +377,7 @@
                 this._initialized = true;
             }
         };
-        _(_class.prototype).extend(_baseClass.prototype);
+        _.extend(_class.prototype,_baseClass.prototype);
 
         return _class;
 
@@ -398,7 +398,7 @@
             ],
             remsrc = "[\\" + removeChars.join("\\") + "]",
             remrx = new RegExp(remsrc, "gm"),
-            charsrx = _(charsub).map(function(c) {
+            charsrx = _.map(charsub, function(c) {
                 return new RegExp(c);
             });
 
@@ -414,7 +414,7 @@
                     src += remsrc + "*";
                 }
                 var l = txt[j];
-                _(charsub).each(makeReplaceFunc(l));
+                _.each(charsub, makeReplaceFunc(l));
                 src += l;
             }
             return src;
@@ -426,7 +426,7 @@
                     return replaceText(inp);
                 case "object":
                     var src = '';
-                    _(inp).each(function(v) {
+                    _.each(inp, function(v) {
                         var res = getSource(v);
                         if (res) {
                             if (src) {