# HG changeset patch # User ymh # Date 1366750381 -7200 # Node ID 603ffa4c6fa5db84222b0a2e8ad859d4d054d8b4 # Parent a60a450b8f3bbae74cb57646f3c65f463882599f correct ";" and "," in javascripts diff -r a60a450b8f3b -r 603ffa4c6fa5 client/js/full-json.js --- a/client/js/full-json.js Tue Apr 23 22:30:09 2013 +0200 +++ b/client/js/full-json.js Tue Apr 23 22:53:01 2013 +0200 @@ -10,7 +10,7 @@ _proj.set(_data, {validate: true}); _renkan.renderer.autoScale(); }); - } + }; var _save = function() { var _data = _proj.toJSON(); if (!_renkan.read_only) { @@ -24,10 +24,10 @@ }); } - } + }; var _thrSave = Rkns._.throttle( function() { - setTimeout(_save, 100) + setTimeout(_save, 100); }, 1000); _proj.on("add:nodes add:edges add:users", function(_model) { _model.on("change remove", function(_model) { @@ -40,4 +40,4 @@ }); _load(); -} +}; diff -r a60a450b8f3b -r 603ffa4c6fa5 client/js/ldtjson-bin.js --- a/client/js/ldtjson-bin.js Tue Apr 23 22:30:09 2013 +0200 +++ b/client/js/ldtjson-bin.js Tue Apr 23 22:53:01 2013 +0200 @@ -1,4 +1,4 @@ -Rkns.Ldt = {} +Rkns.Ldt = {}; Rkns.Ldt.Bin = function(_renkan, _opts) { if (_opts.ldt_type) { @@ -8,7 +8,7 @@ } } console.error("No such LDT Bin Type"); -} +}; Rkns.Ldt.ProjectBin = Rkns.Utils.inherit(Rkns._BaseBin); @@ -29,13 +29,13 @@ this.title_$.html(_opts.title); this.title_icon_$.addClass('Rk-Ldt-Title-Icon'); this.refresh(); -} +}; Rkns.Ldt.ProjectBin.prototype.render = function(searchstr) { if (searchstr) { var rxbase = searchstr.replace(/(\W)/g,'\\$1'), _rgxp = new RegExp('('+rxbase+')','gi'), - rxtest = new RegExp(rxbase,'i') + rxtest = new RegExp(rxbase,'i'); } function highlight(_text) { return searchstr ? _text.replace(_rgxp, "$1") : _text; @@ -54,7 +54,7 @@ _seconds = _totalSeconds % 60, _res = ''; if (_hours) { - _res += pad(_hours) + ':' + _res += pad(_hours) + ':'; } _res += pad(_minutes) + ':' + pad(_seconds); return _res; @@ -77,7 +77,7 @@ htitle: highlight(_title), encodedtitle : encodeURIComponent(_title), static_url: _this.renkan.options.static_url - }) + }); }); _html += '
  • Annotations

  • '; Rkns._(_this.data.annotations).map(function(_annotation) { @@ -121,7 +121,7 @@ this.$.show(); } this.renkan.resizeBins(); -} +}; Rkns.Ldt.ProjectBin.prototype.refresh = function() { var _this = this; @@ -133,20 +133,20 @@ _this.render(); } }); -} +}; Rkns.Ldt.Search = function(_renkan, _opts) { this.renkan = _renkan; this.lang = _opts.lang || "en"; -} +}; Rkns.Ldt.Search.prototype.getBgClass = function() { return "Rk-Ldt-Icon"; -} +}; Rkns.Ldt.Search.prototype.getSearchTitle = function() { return this.renkan.translate("Lignes de Temps"); -} +}; Rkns.Ldt.Search.prototype.search = function(_q) { this.renkan.tabs.push( @@ -154,7 +154,7 @@ search: _q }) ); -} +}; Rkns.Ldt.ResultsBin = Rkns.Utils.inherit(Rkns._BaseBin); @@ -171,13 +171,13 @@ this.title_$.html('Lignes de Temps: "' + _opts.search + '"'); this.title_icon_$.addClass('Rk-Ldt-Title-Icon'); this.refresh(); -} +}; Rkns.Ldt.ResultsBin.prototype.render = function(searchstr) { if (searchstr) { var rxbase = searchstr.replace(/(\W)/g,'\\$1'), _rgxp = new RegExp('('+rxbase+')','gi'), - rxtest = new RegExp(rxbase,'i') + rxtest = new RegExp(rxbase,'i'); } else { var rxbase = this.search.replace(/(\W)/g,'\\$1'), _rgxp = new RegExp('('+rxbase+')','gi'); @@ -199,7 +199,7 @@ _seconds = _totalSeconds % 60, _res = ''; if (_hours) { - _res += pad(_hours) + ':' + _res += pad(_hours) + ':'; } _res += pad(_minutes) + ':' + pad(_seconds); return _res; @@ -217,7 +217,7 @@ count++; var _duration = _segment.duration, _begin = _segment.start_ts, - _end = + _segment.duration + _begin + _end = + _segment.duration + _begin, _img = ( _duration ? _this.renkan.options.static_url + "img/ldt-segment.png" @@ -252,7 +252,7 @@ this.$.show(); } this.renkan.resizeBins(); -} +}; Rkns.Ldt.ResultsBin.prototype.refresh = function() { var _this = this; @@ -269,4 +269,4 @@ _this.render(); } }); -} \ No newline at end of file +}; \ No newline at end of file diff -r a60a450b8f3b -r 603ffa4c6fa5 client/js/list-bin.js --- a/client/js/list-bin.js Tue Apr 23 22:30:09 2013 +0200 +++ b/client/js/list-bin.js Tue Apr 23 22:53:01 2013 +0200 @@ -18,7 +18,7 @@ this.data = _opts.list; } this.refresh(); -} +}; Rkns.ResourceList.Bin.prototype.render = function(searchstr) { if (searchstr) { @@ -38,7 +38,7 @@ Rkns._(this.data).each(function(_item) { if (typeof _item === "string") { if (/^(https?:\/\/|www)/.test(_item)) { - var _element = { url: _item } + var _element = { url: _item }; } else { var _element = { title: _item.replace(/[:,]?\s?(https?:\/\/|www)[\d\w\/.&?=#%-_]+\s?/,'').trim() }, _match = _item.match(/(https?:\/\/|www)[\d\w\/.&?=#%-_]+/); @@ -86,10 +86,10 @@ this.$.show(); } this.renkan.resizeBins(); -} +}; Rkns.ResourceList.Bin.prototype.refresh = function() { if (this.data) { this.render(); } -} \ No newline at end of file +}; \ No newline at end of file diff -r a60a450b8f3b -r 603ffa4c6fa5 client/js/main.js --- a/client/js/main.js Tue Apr 23 22:30:09 2013 +0200 +++ b/client/js/main.js Tue Apr 23 22:53:01 2013 +0200 @@ -19,7 +19,7 @@ /* Declaring the Renkan Namespace Rkns and Default values */ if (typeof Rkns !== "object") { - Rkns = {} + Rkns = {}; } Rkns.$ = jQuery; @@ -93,7 +93,7 @@ if (_opts.auto_refresh) { window.setInterval(function() { _this.refresh(); - },_opts.auto_refresh) + },_opts.auto_refresh); } } }; @@ -138,7 +138,7 @@ } else { var _tmpl = Rkns._.template('
  • <%= title %>
  • '), _select = this.$.find(".Rk-Search-List"), - _input = this.$.find(".Rk-Web-Search-Input") + _input = this.$.find(".Rk-Web-Search-Input"), _form = this.$.find(".Rk-Web-Search-Form"); Rkns._(this.options.search).each(function(_search, _key) { if (Rkns[_search.type] && Rkns[_search.type].Search) { @@ -251,7 +251,7 @@ }); }); this.$.find(".Rk-Bins-Search-Form").submit(function() { - return false + return false; }); }; @@ -300,9 +300,9 @@ _ID_AUTO_INCREMENT : 0, _ID_BASE : (function(_d) { - function pad(n){return n<10 ? '0'+n : n} + function pad(n){return n<10 ? '0'+n : n;} function fillrand(n) { - var _res = '' + var _res = ''; for (var i=0; i" + _renkan.translate("Drag items from this website, drop them in Renkan").replace(/ /g,"_") - + "

    '.replace(/_/g,String.fromCharCode(32));b.appendChild(d);e=[{r:/https?:\\/\\/[^\\/]*twitter\\.com\\//,s:'.tweet',n:'twitter'},{r:/https?:\\/\\/[^\\/]*google\\.[^\\/]+\\//,s:'.g',n:'google'},{r:/https?:\\/\\/[^\\/]*lemonde\\.fr\\//,s:'[data-vr-contentbox]',n:'lemonde'}];f=false;e.forEach(function(g){if(g.r.test(c)){f=g;}});if(f){h=function(){Array.prototype.forEach.call(a.querySelectorAll(f.s),function(i){i[j]=true;k=i.style;k.borderWidth='2px';k.borderColor='#909';k.borderStyle='solid';k.backgroundColor='rgba(200,0,180,.1)';})};window.setInterval(h,500);h();};a.addEventListener('dragstart',function(k){l=k.dataTransfer;l.setData(m+'source-uri',c);l.setData(m+'source-title',a.title);n=k.target;if(f){o=n;while(!o.attributes[j]){o=o.parentNode;if(o==b){break;}}}if(f&&o.attributes[j]){p=o.cloneNode(true);l.setData(m+'specific-site',f.n)}else{q=a.getSelection();if(q.type==='Range'||!q.type){p=q.getRangeAt(0).cloneContents();}else{p=n.cloneNode();}}r=a.createElement('div');r.appendChild(p);l.setData('text/x-iri-selected-text',r.textContent.trim());l.setData('text/x-iri-selected-html',r.innerHTML);},false);})();" + + "

    '.replace(/_/g,String.fromCharCode(32));b.appendChild(d);e=[{r:/https?:\\/\\/[^\\/]*twitter\\.com\\//,s:'.tweet',n:'twitter'},{r:/https?:\\/\\/[^\\/]*google\\.[^\\/]+\\//,s:'.g',n:'google'},{r:/https?:\\/\\/[^\\/]*lemonde\\.fr\\//,s:'[data-vr-contentbox]',n:'lemonde'}];f=false;e.forEach(function(g){if(g.r.test(c)){f=g;}});if(f){h=function(){Array.prototype.forEach.call(a.querySelectorAll(f.s),function(i){i[j]=true;k=i.style;k.borderWidth='2px';k.borderColor='#909';k.borderStyle='solid';k.backgroundColor='rgba(200,0,180,.1)';})};window.setInterval(h,500);h();};a.addEventListener('dragstart',function(k){l=k.dataTransfer;l.setData(m+'source-uri',c);l.setData(m+'source-title',a.title);n=k.target;if(f){o=n;while(!o.attributes[j]){o=o.parentNode;if(o==b){break;}}}if(f&&o.attributes[j]){p=o.cloneNode(true);l.setData(m+'specific-site',f.n)}else{q=a.getSelection();if(q.type==='Range'||!q.type){p=q.getRangeAt(0).cloneContents();}else{p=n.cloneNode();}}r=a.createElement('div');r.appendChild(p);l.setData('text/x-iri-selected-text',r.textContent.trim());l.setData('text/x-iri-selected-html',r.innerHTML);},false);})();"; }, shortenText : function(_text, _maxlength) { return (_text.length > _maxlength ? (_text.substr(0,_maxlength) + '…') : _text); @@ -35,7 +35,7 @@ drawEditBox : function(_options, _coords, _path, _xmargin, _selector) { _selector.css({ width: ( _options.tooltip_width - 2* _options.tooltip_padding ), - }) + }); var _height = _selector.outerHeight() + 2* _options.tooltip_padding, _isLeft = (_coords.x < paper.view.center.x ? 1 : -1), _left = _coords.x + _isLeft * ( _xmargin + _options.tooltip_arrow_length ), @@ -75,7 +75,7 @@ }); return _path; } -} +}; Rkns.Renderer._BaseRepresentation = function(_renderer, _model) { if (typeof _renderer !== "undefined") { @@ -88,62 +88,62 @@ var _this = this; this._changeBinding = function() { _this.redraw(); - } + }; this._removeBinding = function() { _renderer.removeRepresentation(_this); _(function() { - _renderer.redraw() + _renderer.redraw(); }).defer(); - } + }; this._selectBinding = function() { _this.select(); - } + }; this._unselectBinding = function() { _this.unselect(); - } + }; this.model.on("change", this._changeBinding ); this.model.on("remove", this._removeBinding ); this.model.on("select", this._selectBinding ); this.model.on("unselect", this._unselectBinding ); } } -} +}; Rkns.Renderer._BaseRepresentation.prototype.super = function(_func) { Rkns.Renderer._BaseRepresentation.prototype[_func].apply(this, Array.prototype.slice.call(arguments, 1)); -} +}; -Rkns.Renderer._BaseRepresentation.prototype.redraw = function() {} +Rkns.Renderer._BaseRepresentation.prototype.redraw = function() {}; -Rkns.Renderer._BaseRepresentation.prototype.moveTo = function() {} +Rkns.Renderer._BaseRepresentation.prototype.moveTo = function() {}; -Rkns.Renderer._BaseRepresentation.prototype.show = function() {} +Rkns.Renderer._BaseRepresentation.prototype.show = function() {}; -Rkns.Renderer._BaseRepresentation.prototype.hide = function() {} +Rkns.Renderer._BaseRepresentation.prototype.hide = function() {}; Rkns.Renderer._BaseRepresentation.prototype.select = function() { if (this.model) { this.model.trigger("selected"); } -} +}; Rkns.Renderer._BaseRepresentation.prototype.unselect = function() { if (this.model) { this.model.trigger("unselected"); } -} +}; -Rkns.Renderer._BaseRepresentation.prototype.highlight = function() {} +Rkns.Renderer._BaseRepresentation.prototype.highlight = function() {}; -Rkns.Renderer._BaseRepresentation.prototype.unhighlight = function() {} +Rkns.Renderer._BaseRepresentation.prototype.unhighlight = function() {}; -Rkns.Renderer._BaseRepresentation.prototype.mousedown = function() {} +Rkns.Renderer._BaseRepresentation.prototype.mousedown = function() {}; Rkns.Renderer._BaseRepresentation.prototype.mouseup = function() { if (this.model) { this.model.trigger("clicked"); } -} +}; Rkns.Renderer._BaseRepresentation.prototype.destroy = function() { if (this.model) { @@ -152,7 +152,7 @@ this.model.off("select", this._selectBinding ); this.model.off("unselect", this._unselectBinding ); } -} +}; /* */ @@ -160,30 +160,30 @@ Rkns.Renderer._BaseButton.prototype.moveTo = function(_pos) { this.sector.moveTo(_pos); -} +}; Rkns.Renderer._BaseButton.prototype.show = function() { this.sector.show(); -} +}; Rkns.Renderer._BaseButton.prototype.hide = function() { this.sector.hide(); -} +}; Rkns.Renderer._BaseButton.prototype.select = function() { this.sector.select(); -} +}; Rkns.Renderer._BaseButton.prototype.unselect = function(_newTarget) { this.sector.unselect(); if (!_newTarget || (_newTarget !== this.source_representation && _newTarget.source_representation !== this.source_representation)) { this.source_representation.unselect(); } -} +}; Rkns.Renderer._BaseButton.prototype.destroy = function() { this.sector.destroy(); -} +}; /* */ @@ -212,7 +212,7 @@ this.pending_delete_buttons = [ new Rkns.Renderer.NodeRevertButton(this.renderer, null) ]; - this.all_buttons = this.normal_buttons.concat(this.pending_delete_buttons) + this.all_buttons = this.normal_buttons.concat(this.pending_delete_buttons); for (var i = 0; i < this.all_buttons.length; i++) { this.all_buttons[i].source_representation = this; } @@ -228,7 +228,7 @@ this.minimap_circle.__representation = this.renderer.minimap.miniframe.__representation; this.renderer.minimap.node_group.addChild(this.minimap_circle); } -} +}; Rkns.Renderer.Node.prototype.redraw = function(_dontRedrawEdges) { var _model_coords = new paper.Point(this.model.get("position")), @@ -294,7 +294,7 @@ left: this.paper_coords.x, top: this.paper_coords.y + this.circle_radius * this.h_ratio + this.options.node_label_distance, opacity: opacity - }) + }); var _color = this.model.get("color") || (this.model.get("created_by") || Rkns.Renderer._USER_PLACEHOLDER(this.renkan)).get("color"); this.circle.strokeColor = _color; var _pc = this.paper_coords; @@ -335,7 +335,7 @@ _this.node_image.fitBounds(bounds); _this.redraw(); paper.view.draw(); - } + }; _image.src = _img; } this.img = _img; @@ -361,7 +361,7 @@ }, this); } -} +}; Rkns.Renderer.Node.prototype.paperShift = function(_delta) { if (this.options.editor_mode) { @@ -373,14 +373,14 @@ } else { this.renderer.paperShift(_delta); } -} +}; Rkns.Renderer.Node.prototype.openEditor = function() { this.renderer.removeRepresentationsOfType("editor"); var _editor = this.renderer.addRepresentation("NodeEditor",null); _editor.source_representation = this; _editor.draw(); -} +}; Rkns.Renderer.Node.prototype.select = function() { this.selected = true; @@ -408,7 +408,7 @@ this.minimap_circle.strokeColor = this.options.minimap_highlight_color; } this.super("select"); -} +}; Rkns.Renderer.Node.prototype.unselect = function(_newTarget) { if (!_newTarget || _newTarget.source_representation !== this) { @@ -423,7 +423,7 @@ } this.super("unselect"); } -} +}; Rkns.Renderer.Node.prototype.highlight = function() { if (this.highlighted) { @@ -432,7 +432,7 @@ this.highlighted = true; this.redraw(); this.renderer.throttledPaperDraw(); -} +}; Rkns.Renderer.Node.prototype.unhighlight = function() { if (!this.highlighted) { @@ -441,7 +441,7 @@ this.highlighted = false; this.redraw(); this.renderer.throttledPaperDraw(); -} +}; Rkns.Renderer.Node.prototype.saveCoords = function() { var _coords = this.renderer.toModelCoords(this.paper_coords), @@ -454,14 +454,14 @@ if (this.renderer.isEditable()) { this.model.set(_data); } -} +}; Rkns.Renderer.Node.prototype.mousedown = function(_event, _isTouch) { if (_isTouch) { this.renderer.unselectAll(); this.select(); } -} +}; Rkns.Renderer.Node.prototype.mouseup = function(_event, _isTouch) { if (this.renderer.is_dragging && this.renderer.isEditable()) { @@ -475,7 +475,7 @@ this.renderer.click_target = null; this.renderer.is_dragging = false; this.is_dragging = false; -} +}; Rkns.Renderer.Node.prototype.destroy = function(_event) { this.super("destroy"); @@ -490,7 +490,7 @@ if (this.node_image) { this.node_image.remove(); } -} +}; /* */ @@ -523,7 +523,7 @@ this.pending_delete_buttons = [ new Rkns.Renderer.EdgeRevertButton(this.renderer, null) ]; - this.all_buttons = this.normal_buttons.concat(this.pending_delete_buttons) + this.all_buttons = this.normal_buttons.concat(this.pending_delete_buttons); for (var i = 0; i < this.all_buttons.length; i++) { this.all_buttons[i].source_representation = this; } @@ -539,7 +539,7 @@ this.minimap_line.__representation = this.renderer.minimap.miniframe.__representation; this.minimap_line.strokeWidth = 1; } -} +}; Rkns.Renderer.Edge.prototype.redraw = function() { this.from_representation = this.renderer.getRepresentationByModel(this.model.get("from")); @@ -628,14 +628,14 @@ this.minimap_line.segments[0].point = this.renderer.toMinimapCoords(new paper.Point(this.from_representation.model.get("position"))); this.minimap_line.segments[1].point = this.renderer.toMinimapCoords(new paper.Point(this.to_representation.model.get("position"))); } -} +}; Rkns.Renderer.Edge.prototype.openEditor = function() { this.renderer.removeRepresentationsOfType("editor"); var _editor = this.renderer.addRepresentation("EdgeEditor",null); _editor.source_representation = this; _editor.draw(); -} +}; Rkns.Renderer.Edge.prototype.select = function() { this.selected = true; @@ -649,7 +649,7 @@ this.openEditor(); } this.super("select"); -} +}; Rkns.Renderer.Edge.prototype.unselect = function(_newTarget) { if (!_newTarget || _newTarget.source_representation !== this) { @@ -662,14 +662,14 @@ this.line.strokeWidth = this.options.edge_stroke_width; this.super("unselect"); } -} +}; Rkns.Renderer.Edge.prototype.mousedown = function(_event, _isTouch) { if (_isTouch) { this.renderer.unselectAll(); this.select(); } -} +}; Rkns.Renderer.Edge.prototype.mouseup = function(_event, _isTouch) { if (!this.renkan.read_only && this.renderer.is_dragging) { @@ -685,7 +685,7 @@ } this.renderer.click_target = null; this.renderer.is_dragging = false; -} +}; Rkns.Renderer.Edge.prototype.paperShift = function(_delta) { if (this.options.editor_mode) { @@ -696,7 +696,7 @@ } else { this.renderer.paperShift(_delta); } -} +}; Rkns.Renderer.Edge.prototype.destroy = function() { this.super("destroy"); @@ -713,7 +713,7 @@ this.bundle.edges = Rkns._(this.bundle.edges).reject(function(_edge) { return _edge === _this; }); -} +}; /* */ @@ -739,7 +739,7 @@ ); this.arrow.__representation = this; this.arrow_angle = 0; -} +}; Rkns.Renderer.TempEdge.prototype.redraw = function() { var _p0 = this.from_representation.paper_coords, @@ -751,7 +751,7 @@ this.arrow.rotate(_a - this.arrow_angle); this.arrow.position = _c; this.arrow_angle = _a; -} +}; Rkns.Renderer.TempEdge.prototype.paperShift = function(_delta) { if (!this.renderer.isEditable()) { @@ -763,7 +763,7 @@ var _hitResult = paper.project.hitTest(this.end_pos); this.renderer.findTarget(_hitResult); this.redraw(); -} +}; Rkns.Renderer.TempEdge.prototype.mouseup = function(_event, _isTouch) { var _hitResult = paper.project.hitTest(_event.point), @@ -797,12 +797,12 @@ this.renderer.removeRepresentation(this); paper.view.draw(); } -} +}; Rkns.Renderer.TempEdge.prototype.destroy = function() { this.arrow.remove(); this.line.remove(); -} +}; /* */ @@ -812,7 +812,7 @@ this.renderer.buttons_layer.activate(); this.type = "editor"; this.editor_block = new paper.Path(); - var _pts = Rkns._(Rkns._.range(8)).map(function() {return [0,0]}); + var _pts = Rkns._(Rkns._.range(8)).map(function() {return [0,0];}); this.editor_block.add.apply(this.editor_block, _pts); this.editor_block.strokeWidth = this.options.tooltip_border_width; this.editor_block.strokeColor = this.options.tooltip_border_color; @@ -824,12 +824,12 @@ opacity: .8 }) .hide(); -} +}; Rkns.Renderer._BaseEditor.prototype.destroy = function() { this.editor_block.remove(); this.editor_$.remove(); -} +}; /* */ @@ -886,7 +886,7 @@ closeEditor = function() { _this.renderer.removeRepresentation(_this); paper.view.draw(); - } + }; this.editor_$.find(".Rk-CloseX").click(closeEditor); @@ -904,7 +904,7 @@ description: _this.editor_$.find(".Rk-Edit-Description").val(), uri: _uri, image: _image - } + }; _model.set(_data); _this.redraw(); } else { @@ -937,7 +937,7 @@ fr.onload = function(e) { _this.editor_$.find(".Rk-Edit-Image").val(e.target.result); onFieldChange(); - } + }; fr.readAsDataURL(f); } }); @@ -963,7 +963,7 @@ }, function(_e) { _e.preventDefault(); - _this.editor_$.find(".Rk-Edit-Color").css("background", _model.get("color") || (_model.get("created_by") || Rkns.Renderer._USER_PLACEHOLDER(_this.renkan)).get("color")) + _this.editor_$.find(".Rk-Edit-Color").css("background", _model.get("color") || (_model.get("created_by") || Rkns.Renderer._USER_PLACEHOLDER(_this.renkan)).get("color")); } ).click(function(_e) { _e.preventDefault(); @@ -999,14 +999,14 @@ this.editor_$.find("img").load(function() { _this.redraw(); }); -} +}; Rkns.Renderer.NodeEditor.prototype.redraw = function() { var _coords = this.source_representation.paper_coords; Rkns.Renderer.drawEditBox(this.options, _coords, this.editor_block, this.source_representation.circle_radius * .75, this.editor_$); this.editor_$.show(); paper.view.draw(); -} +}; /* */ @@ -1069,7 +1069,7 @@ closeEditor = function() { _this.renderer.removeRepresentation(_this); paper.view.draw(); - } + }; this.editor_$.find(".Rk-CloseX").click(closeEditor); if (this.renderer.isEditable()) { @@ -1081,7 +1081,7 @@ var _data = { title: _this.editor_$.find(".Rk-Edit-Title").val(), uri: _this.editor_$.find(".Rk-Edit-URI").val() - } + }; _model.set(_data); paper.view.draw(); } else { @@ -1139,7 +1139,7 @@ }, function(_e) { _e.preventDefault(); - _this.editor_$.find(".Rk-Edit-Color").css("background", _model.get("color") || (_model.get("created_by") || Rkns.Renderer._USER_PLACEHOLDER(_this.renkan)).get("color")) + _this.editor_$.find(".Rk-Edit-Color").css("background", _model.get("color") || (_model.get("created_by") || Rkns.Renderer._USER_PLACEHOLDER(_this.renkan)).get("color")); } ).click(function(_e) { _e.preventDefault(); @@ -1152,14 +1152,14 @@ } }); } -} +}; Rkns.Renderer.EdgeEditor.prototype.redraw = function() { var _coords = this.source_representation.paper_coords; Rkns.Renderer.drawEditBox(this.options, _coords, this.editor_block, 5, this.editor_$); this.editor_$.show(); paper.view.draw(); -} +}; /* */ @@ -1182,7 +1182,7 @@ ); this.lastSectorInner = sectorInner; } -} +}; /* */ @@ -1195,13 +1195,13 @@ this.endAngle = -45; this.imageName = "edit"; this.text = "Edit"; -} +}; Rkns.Renderer.NodeEditButton.prototype.mouseup = function() { if (!this.renderer.is_dragging) { this.source_representation.openEditor(); } -} +}; /* */ @@ -1214,7 +1214,7 @@ this.endAngle = 90; this.imageName = "remove"; this.text = "Remove"; -} +}; Rkns.Renderer.NodeRemoveButton.prototype.mouseup = function() { this.renderer.click_target = null; @@ -1228,7 +1228,7 @@ }); this.source_representation.model.set("delete_scheduled", delid); } -} +}; /* */ @@ -1241,7 +1241,7 @@ this.endAngle = 135; this.imageName = "revert"; this.text = "Cancel deletion"; -} +}; Rkns.Renderer.NodeRevertButton.prototype.mouseup = function() { this.renderer.click_target = null; @@ -1249,7 +1249,7 @@ if (this.renderer.isEditable()) { this.source_representation.model.unset("delete_scheduled"); } -} +}; /* */ @@ -1262,7 +1262,7 @@ this.endAngle = 180; this.imageName = "link"; this.text = "Link to another node"; -} +}; Rkns.Renderer.NodeLinkButton.prototype.mousedown = function(_event, _isTouch) { if (this.renderer.isEditable()) { @@ -1275,7 +1275,7 @@ this.renderer.removeRepresentationsOfType("editor"); this.renderer.addTempEdge(this.source_representation, _point); } -} +}; /* */ @@ -1288,7 +1288,7 @@ this.endAngle = 0; this.imageName = "enlarge"; this.text = "Enlarge"; -} +}; Rkns.Renderer.NodeEnlargeButton.prototype.mouseup = function() { var _newsize = 1 + (this.source_representation.model.get("size") || 0); @@ -1296,7 +1296,7 @@ this.source_representation.select(); this.select(); paper.view.draw(); -} +}; /* */ @@ -1309,7 +1309,7 @@ this.endAngle = -135; this.imageName = "shrink"; this.text = "Shrink"; -} +}; Rkns.Renderer.NodeShrinkButton.prototype.mouseup = function() { var _newsize = -1 + (this.source_representation.model.get("size") || 0); @@ -1317,7 +1317,7 @@ this.source_representation.select(); this.select(); paper.view.draw(); -} +}; /* */ @@ -1326,13 +1326,13 @@ Rkns.Renderer.EdgeEditButton.prototype._init = function() { this.type = "Edge-edit-button"; this.sector = this.renderer.drawSector(this, Rkns.Renderer._EDGE_BUTTON_INNER, Rkns.Renderer._EDGE_BUTTON_OUTER, -270, -90, 1, "edit", this.renkan.translate("Edit")); -} +}; Rkns.Renderer.EdgeEditButton.prototype.mouseup = function() { if (!this.renderer.is_dragging) { this.source_representation.openEditor(); } -} +}; /* */ @@ -1341,7 +1341,7 @@ Rkns.Renderer.EdgeRemoveButton.prototype._init = function() { this.type = "Edge-remove-button"; this.sector = this.renderer.drawSector(this, Rkns.Renderer._EDGE_BUTTON_INNER, Rkns.Renderer._EDGE_BUTTON_OUTER, -90, 90, 1, "remove", this.renkan.translate("Remove")); -} +}; Rkns.Renderer.EdgeRemoveButton.prototype.mouseup = function() { this.renderer.click_target = null; @@ -1355,7 +1355,7 @@ }); this.source_representation.model.set("delete_scheduled", delid); } -} +}; /* */ @@ -1364,7 +1364,7 @@ Rkns.Renderer.EdgeRevertButton.prototype._init = function() { this.type = "Edge-revert-button"; this.sector = this.renderer.drawSector(this, Rkns.Renderer._EDGE_BUTTON_INNER, Rkns.Renderer._EDGE_BUTTON_OUTER, -135, 135, 1, "revert", this.renkan.translate("Cancel deletion")); -} +}; Rkns.Renderer.EdgeRevertButton.prototype.mouseup = function() { this.renderer.click_target = null; @@ -1372,7 +1372,7 @@ if (this.renderer.isEditable()) { this.source_representation.model.unset("delete_scheduled"); } -} +}; /* */ @@ -1381,12 +1381,12 @@ Rkns.Renderer.MiniFrame.prototype.paperShift = function(_delta) { this.renderer.offset = this.renderer.offset.subtract(_delta.divide(this.renderer.minimap.scale).multiply(this.renderer.scale)); this.renderer.redraw(); -} +}; Rkns.Renderer.MiniFrame.prototype.mouseup = function(_delta) { this.renderer.click_target = null; this.renderer.is_dragging = false; -} +}; /* */ @@ -1419,7 +1419,7 @@ node_layer: new paper.Layer(), node_group: new paper.Group(), size: new paper.Size( _renkan.options.minimap_width, _renkan.options.minimap_height ) - } + }; this.minimap.background_layer.activate(); this.minimap.topleft = paper.view.bounds.bottomRight.subtract(this.minimap.size); @@ -1618,7 +1618,7 @@ _this.setScale( _newScale, _offset ); }); this.$.find(".Rk-CurrentUser").mouseenter( - function() { _this.$.find(".Rk-UserList").slideDown() } + function() { _this.$.find(".Rk-UserList").slideDown(); } ); this.$.find(".Rk-Users").mouseleave( function() { _this.$.find(".Rk-UserList").slideUp(); } @@ -1699,12 +1699,12 @@ paper.view.onResize = function(_event) { _this.offset = _this.offset.add(_event.delta.divide(2)); if (_this.minimap) { - _this.minimap.topleft = paper.view.bounds.bottomRight.subtract(_this.minimap.size) + _this.minimap.topleft = paper.view.bounds.bottomRight.subtract(_this.minimap.size); _this.minimap.rectangle.fitBounds(_this.minimap.topleft.subtract([2,2]), _this.minimap.size.add([4,4])); _this.minimap.cliprectangle.fitBounds(_this.minimap.topleft, _this.minimap.size); } _this.redraw(); - } + }; var _thRedraw = Rkns._.throttle(function() { _this.redraw(); @@ -1718,7 +1718,7 @@ this.$.find(".Rk-PadTitle").on("keyup input paste", function() { _renkan.project.set({"title": $(this).val()}); - }) + }); this.renkan.project.get("users").each(function(_user) { _this.addUser(_user); @@ -1783,17 +1783,17 @@ } }); _this.delete_list = _this.delete_list.filter(function(d) { - return _renkan.project.get("nodes").findWhere({"delete_scheduled":d.id}) || _renkan.project.get("edges").findWhere({"delete_scheduled":d.id}) + return _renkan.project.get("nodes").findWhere({"delete_scheduled":d.id}) || _renkan.project.get("edges").findWhere({"delete_scheduled":d.id}); }); }, 500); if (this.minimap) { window.setInterval(function() { - _this.rescaleMinimap() + _this.rescaleMinimap(); }, 2000); } -} +}; Rkns.Renderer.Scene.prototype.template = Rkns._.template( '<% if (options.show_top_bar) { %>
    <% if (!options.editor_mode) { %>

    <%- project.get("title") || translate("Untitled project")%>

    ' @@ -1831,7 +1831,7 @@ if (_autoscale) { this.autoScale(); } -} +}; Rkns.Renderer.Scene.prototype.drawSector = function(_repr, _inR, _outR, _startAngle, _endAngle, _padding, _imgname, _caption) { var _options = this.renkan.options, @@ -1922,7 +1922,7 @@ destroy: function() { _grp.remove(); } - } + }; function showImage() { var _raster = new paper.Raster(_img); _raster.position = _imgdelta.add(_grp.position).subtract(_delta); @@ -1934,8 +1934,8 @@ Rkns.$(_img).on("load",showImage); } - return _res -} + return _res; +}; Rkns.Renderer.Scene.prototype.addToBundles = function(_edgeRepr) { var _bundle = Rkns._(this.bundles).find(function(_bundle) { @@ -1945,7 +1945,7 @@ ); }); if (typeof _bundle !== "undefined") { - _bundle.edges.push(_edgeRepr) + _bundle.edges.push(_edgeRepr); } else { _bundle = { from: _edgeRepr.from_representation, @@ -1955,15 +1955,15 @@ var _dir = (_er.from_representation === this.from) ? 1 : -1; return _dir * ( Rkns._(this.edges).indexOf(_er) - (this.edges.length - 1) / 2 ); } - } + }; this.bundles.push(_bundle); } return _bundle; -} +}; Rkns.Renderer.Scene.prototype.isEditable = function() { - return (this.renkan.options.editor_mode && !this.renkan.read_only) -} + return (this.renkan.options.editor_mode && !this.renkan.read_only); +}; Rkns.Renderer.Scene.prototype.onStatusChange = function() { var savebtn = this.$.find(".Rk-Save-Button"), @@ -1980,23 +1980,23 @@ tip.text(this.renkan.translate("Auto-save enabled")); } } -} +}; Rkns.Renderer.Scene.prototype.setScale = function(_newScale, _offset) { if (_newScale > Rkns.Renderer._MIN_SCALE && _newScale < Rkns.Renderer._MAX_SCALE) { this.scale = _newScale; if (_offset) { - this.offset = _offset + this.offset = _offset; } this.redraw(); } -} +}; Rkns.Renderer.Scene.prototype.autoScale = function() { - var nodes = this.renkan.project.get("nodes") + var nodes = this.renkan.project.get("nodes"); if (nodes.length > 1) { - var _xx = nodes.map(function(_node) { return _node.get("position").x }), - _yy = nodes.map(function(_node) { return _node.get("position").y }), + var _xx = nodes.map(function(_node) { return _node.get("position").x; }), + _yy = nodes.map(function(_node) { return _node.get("position").y; }), _minx = Math.min.apply(Math, _xx), _miny = Math.min.apply(Math, _yy), _maxx = Math.max.apply(Math, _xx), @@ -2007,19 +2007,19 @@ if (nodes.length === 1) { this.setScale(1, paper.view.center.subtract(new paper.Point([nodes.at(0).get("position").x, nodes.at(0).get("position").y]))); } -} +}; Rkns.Renderer.Scene.prototype.redrawMiniframe = function() { var topleft = this.toMinimapCoords(this.toModelCoords(new paper.Point([0,0]))), bottomright = this.toMinimapCoords(this.toModelCoords(paper.view.bounds.bottomRight)); this.minimap.miniframe.fitBounds(topleft, bottomright); -} +}; Rkns.Renderer.Scene.prototype.rescaleMinimap = function() { - var nodes = this.renkan.project.get("nodes") + var nodes = this.renkan.project.get("nodes"); if (nodes.length > 1) { - var _xx = nodes.map(function(_node) { return _node.get("position").x }), - _yy = nodes.map(function(_node) { return _node.get("position").y }), + var _xx = nodes.map(function(_node) { return _node.get("position").x; }), + _yy = nodes.map(function(_node) { return _node.get("position").y; }), _minx = Math.min.apply(Math, _xx), _miny = Math.min.apply(Math, _yy), _maxx = Math.max.apply(Math, _xx), @@ -2038,32 +2038,32 @@ this.minimap.offset = this.minimap.size.divide(2).subtract(new paper.Point([nodes.at(0).get("position").x, nodes.at(0).get("position").y]).multiply(this.minimap.scale)); } this.redraw(); -} +}; Rkns.Renderer.Scene.prototype.toPaperCoords = function(_point) { return _point.multiply(this.scale).add(this.offset); -} +}; Rkns.Renderer.Scene.prototype.toMinimapCoords = function(_point) { return _point.multiply(this.minimap.scale).add(this.minimap.offset).add(this.minimap.topleft); -} +}; Rkns.Renderer.Scene.prototype.toModelCoords = function(_point) { return _point.subtract(this.offset).divide(this.scale); -} +}; Rkns.Renderer.Scene.prototype.addRepresentation = function(_type, _model) { var _repr = new Rkns.Renderer[_type](this, _model); this.representations.push(_repr); return _repr; -} +}; Rkns.Renderer.Scene.prototype.addRepresentations = function(_type, _collection) { var _this = this; _collection.forEach(function(_model) { _this.addRepresentation(_type, _model); }); -} +}; Rkns.Renderer.Scene.prototype.userTemplate = Rkns._.template( '
  • <%=name%>
  • ' @@ -2083,22 +2083,22 @@ ) ); } -} +}; Rkns.Renderer.Scene.prototype.removeRepresentation = function(_representation) { _representation.destroy(); this.representations = Rkns._(this.representations).reject( function(_repr) { - return _repr == _representation + return _repr == _representation; } ); -} +}; Rkns.Renderer.Scene.prototype.getRepresentationByModel = function(_model) { return Rkns._(this.representations).find(function(_repr) { return _repr.model === _model; }); -} +}; Rkns.Renderer.Scene.prototype.removeRepresentationsOfType = function(_type) { var _representations = Rkns._(this.representations).filter(function(_repr) { @@ -2108,26 +2108,26 @@ Rkns._(_representations).each(function(_repr) { _this.removeRepresentation(_repr); }); -} +}; Rkns.Renderer.Scene.prototype.highlightModel = function(_model) { var _repr = this.getRepresentationByModel(_model); if (_repr) { _repr.highlight(); } -} +}; Rkns.Renderer.Scene.prototype.unhighlightAll = function(_model) { Rkns._(this.representations).each(function(_repr) { _repr.unhighlight(); }); -} +}; Rkns.Renderer.Scene.prototype.unselectAll = function(_model) { Rkns._(this.representations).each(function(_repr) { _repr.unselect(); }); -} +}; Rkns.Renderer.Scene.prototype.redraw = function() { Rkns._(this.representations).each(function(_representation) { @@ -2137,7 +2137,7 @@ this.redrawMiniframe(); } paper.view.draw(); -} +}; Rkns.Renderer.Scene.prototype.addTempEdge = function(_from, _point) { var _tmpEdge = this.addRepresentation("TempEdge",null); @@ -2145,7 +2145,7 @@ _tmpEdge.from_representation = _from; _tmpEdge.redraw(); this.click_target = _tmpEdge; -} +}; Rkns.Renderer.Scene.prototype.findTarget = function(_hitResult) { if (_hitResult && typeof _hitResult.item.__representation !== "undefined") { @@ -2163,12 +2163,12 @@ } this.selected_target = null; } -} +}; Rkns.Renderer.Scene.prototype.paperShift = function(_delta) { this.offset = this.offset.add(_delta); this.redraw(); -} +}; Rkns.Renderer.Scene.prototype.onMouseMove = function(_event) { var _off = this.canvas_$.offset(), @@ -2192,7 +2192,7 @@ this.findTarget(_hitResult); } paper.view.draw(); -} +}; Rkns.Renderer.Scene.prototype.onMouseDown = function(_event, _isTouch) { var _off = this.canvas_$.offset(), @@ -2240,7 +2240,7 @@ } } paper.view.draw(); -} +}; Rkns.Renderer.Scene.prototype.onMouseUp = function(_event, _isTouch) { this.mouse_down = false; @@ -2263,7 +2263,7 @@ } } paper.view.draw(); -} +}; Rkns.Renderer.Scene.prototype.onScroll = function(_event, _scrolldelta) { this.totalScroll += _scrolldelta; @@ -2280,7 +2280,7 @@ } this.totalScroll = 0; } -} +}; Rkns.Renderer.Scene.prototype.onDoubleClick = function(_event) { if (!this.isEditable()) { @@ -2306,7 +2306,7 @@ this.getRepresentationByModel(_node).openEditor(); } paper.view.draw(); -} +}; Rkns.Renderer.Scene.prototype.dropData = function(_data, _event) { if (!this.isEditable()) { @@ -2323,7 +2323,7 @@ switch(_data["text/x-iri-specific-site"]) { case "twitter": var snippet = Rkns.$('
    ').html(_data["text/x-iri-selected-html"]), - tweetdiv = snippet.find(".tweet") + tweetdiv = snippet.find(".tweet"); newNode.title = _renkan.translate("Tweet by ") + tweetdiv.attr("data-name"); newNode.uri = "http://twitter.com/" + tweetdiv.attr("data-screen-name") + "/status/" + tweetdiv.attr("data-tweet-id"); newNode.image = tweetdiv.find(".avatar").attr("src"); @@ -2412,4 +2412,4 @@ if (_event.type === "drop") { _repr.openEditor(); } -} +}; diff -r a60a450b8f3b -r 603ffa4c6fa5 client/js/random-data.js --- a/client/js/random-data.js Tue Apr 23 22:30:09 2013 +0200 +++ b/client/js/random-data.js Tue Apr 23 22:53:01 2013 +0200 @@ -4,7 +4,7 @@ _opts.node_count = _opts.node_count || 20; _opts.edge_count = _opts.edge_count || 2 * _opts.node_count; _opts.user_colors = _opts.user_colors || ["#ff0000", "#008000", "#0000ff", "#808000", "#808080", "#c000c0", "#00c0c0"]; - var _proj = _renkan.project + var _proj = _renkan.project; for (var i = 0; i < _opts.user_count; i++) { _proj.addUser({ id: "user-"+i, @@ -38,4 +38,4 @@ }); } _renkan.current_user = "user-0"; -} +}; diff -r a60a450b8f3b -r 603ffa4c6fa5 client/js/retrieve-kc.js --- a/client/js/retrieve-kc.js Tue Apr 23 22:30:09 2013 +0200 +++ b/client/js/retrieve-kc.js Tue Apr 23 22:53:01 2013 +0200 @@ -2,7 +2,7 @@ Rkns.retrieveKC = function(_renkan, _opts) { if (typeof _opts === "undefined") { - var _opts = {} + var _opts = {}; } var _proj = _renkan.project, _username = _opts.user_name || "Yves-Marie", @@ -10,7 +10,7 @@ _usercolor = _opts.user_color || "#800000", _allid = _opts.all_id || "B0000044", _projid = _opts.proj || "ozu_silent", - _kcept = _opts.endpoint || "/sites/kcproxy/allRetrieve.jsp" + _kcept = _opts.endpoint || "/sites/kcproxy/allRetrieve.jsp"; var _load = function() { Rkns.$.getJSON(_kcept, { @@ -34,7 +34,7 @@ y: _node.y }, created_by: _userid - }) + }); }); Rkns._(_data.edge).each(function(_edge) { _proj.addEdge({ @@ -46,6 +46,6 @@ }); }); }); - } + }; _load(); -} +}; diff -r a60a450b8f3b -r 603ffa4c6fa5 client/js/save-once.js --- a/client/js/save-once.js Tue Apr 23 22:30:09 2013 +0200 +++ b/client/js/save-once.js Tue Apr 23 22:53:01 2013 +0200 @@ -24,7 +24,7 @@ _renkan.renderer.autoScale(); } }); - } + }; var _save = function() { _proj.set("saved_at", new Date()); var _data = _proj.toJSON(); @@ -40,7 +40,7 @@ $(".Rk-Notifications").text("Saved as "+document.location.href).fadeIn().delay(2000).fadeOut(); } }); - } + }; var _checkLeave = function() { var title = _proj.get("title"); if (title && _proj.get("nodes").length) { @@ -55,7 +55,7 @@ _saveWarn = true; $(window).on("beforeunload", _onLeave); } - } + }; _load(); _proj.on("add:nodes add:edges add:users change", function(_model) { _model.on("change remove", function(_model) { @@ -72,4 +72,4 @@ _save(); } }); -} +}; diff -r a60a450b8f3b -r 603ffa4c6fa5 client/js/twitter-bin.js --- a/client/js/twitter-bin.js Tue Apr 23 22:30:09 2013 +0200 +++ b/client/js/twitter-bin.js Tue Apr 23 22:53:01 2013 +0200 @@ -1,18 +1,18 @@ Rkns.Twitter = { -} +}; Rkns.Twitter.Search = function(_renkan, _opts) { this.renkan = _renkan; this.opts = _opts; -} +}; Rkns.Twitter.Search.prototype.getBgClass = function() { return "Rk-Twitter-Icon"; -} +}; Rkns.Twitter.Search.prototype.getSearchTitle = function() { return this.renkan.translate("Twitter"); -} +}; Rkns.Twitter.Search.prototype.search = function(_q) { this.renkan.tabs.push( @@ -20,7 +20,7 @@ search: _q }) ); -} +}; Rkns.Twitter.Bin = Rkns.Utils.inherit(Rkns._BaseBin); @@ -43,7 +43,7 @@ this.title_icon_$.addClass('Rk-Twitter-Title-Icon'); this.title_$.html(this.search).addClass("Rk-Twitter-Title"); this.refresh(); -} +}; Rkns.Twitter.Bin.prototype.render = function(searchstr) { var _rgxp = new RegExp('('+(searchstr || this.search).replace(/(\W)/g,'\\$1')+')','gi'); @@ -53,7 +53,7 @@ function highlight(_text) { return _text.replace(_rgxp, "$1"); } - var _html = "" + var _html = "", _this = this, count = 0; Rkns._(this.data.results).each(function(_result) { @@ -94,7 +94,7 @@ } } - var _urls = _result.text.match(/(www\.|https?:\/\/)[\w./_\-]+/gim), + var _urls = _result.text.match(/(www\.|https?:\/\/)[\w.\/_\-]+/gim), _lastpos = 0; if (_urls) { for (var _i = 0; _i < _urls.length; _i++) { @@ -109,7 +109,7 @@ }); } } - _entities = Rkns._(_entities).sortBy(function(a) { return a.start }); + _entities = Rkns._(_entities).sortBy(function(a) { return a.start; }); var _lastend = 0, _text = Rkns._(_entities).map(function(_e) { var _txt = highlight(_result.text.substring(_lastend, _e.start)) + _e.link + highlight(_e.text) + ''; @@ -135,7 +135,7 @@ this.$.show(); } this.renkan.resizeBins(); -} +}; Rkns.Twitter.Bin.prototype.refresh = function() { var _this = this; @@ -151,4 +151,4 @@ _this.render(); } }); -} +}; diff -r a60a450b8f3b -r 603ffa4c6fa5 client/js/wikipedia-bin.js --- a/client/js/wikipedia-bin.js Tue Apr 23 22:30:09 2013 +0200 +++ b/client/js/wikipedia-bin.js Tue Apr 23 22:53:01 2013 +0200 @@ -1,27 +1,27 @@ Rkns.Wikipedia = { -} +}; Rkns.Wikipedia.Search = function(_renkan, _opts) { this.renkan = _renkan; this.lang = _opts.lang || "en"; -} +}; Rkns.Wikipedia.Search.prototype.getBgClass = function() { return "Rk-Wikipedia-Search-Icon Rk-Wikipedia-Lang-" + this.lang; -} +}; Rkns.Wikipedia.Search.prototype.getSearchTitle = function() { var langs = { "fr": "French", "en": "English", "ja": "Japanese" - } + }; if (langs[this.lang]) { return this.renkan.translate("Wikipedia in ") + this.renkan.translate(langs[this.lang]); } else { return this.renkan.translate("Wikipedia") + " [" + this.lang + "]"; } -} +}; Rkns.Wikipedia.Search.prototype.search = function(_q) { this.renkan.tabs.push( @@ -30,7 +30,7 @@ search: _q }) ); -} +}; Rkns.Wikipedia.Bin = Rkns.Utils.inherit(Rkns._BaseBin); @@ -48,7 +48,7 @@ this.title_icon_$.addClass('Rk-Wikipedia-Title-Icon Rk-Wikipedia-Lang-' + this.lang); this.title_$.html(this.search).addClass("Rk-Wikipedia-Title"); this.refresh(); -} +}; Rkns.Wikipedia.Bin.prototype.render = function(searchstr) { var _rgxp = new RegExp('('+(searchstr || this.search).replace(/(\W)/g,'\\$1')+')','gi'); @@ -90,7 +90,7 @@ this.$.show(); } this.renkan.resizeBins(); -} +}; Rkns.Wikipedia.Bin.prototype.refresh = function() { var _this = this; @@ -102,4 +102,4 @@ _this.render(); } }); -} \ No newline at end of file +}; \ No newline at end of file