{"size": 1777, "ext": "js", "max_stars_repo_path": "src/main/resources/scm/scm.directfilelink.js", "max_stars_repo_name": "scm-manager/scm-directfilelink-plugin", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "src/main/resources/scm/scm.directfilelink.js", "max_issues_repo_name": "scm-manager/scm-directfilelink-plugin", "max_issues_repo_issues_event_min_datetime": "2020-07-18T15:14:55.000Z", "max_issues_repo_issues_event_max_datetime": "2022-02-26T19:22:15.000Z", "max_forks_repo_path": "src/main/resources/scm/scm.directfilelink.js", "max_forks_repo_name": "scm-manager/scm-directfilelink-plugin", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": 5, "max_forks_count": null, "avg_line_length": 45.5641025641, "max_line_length": 106, "alphanum_fraction": 0.7400112549}
/*
 * MIT License
 *
 * Copyright (c) 2020-present Cloudogu GmbH and Contributors
 *
 * Permission is hereby granted, free of charge, to any person obtaining a copy
 * of this software and associated documentation files (the "Software"), to deal
 * in the Software without restriction, including without limitation the rights
 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
 * copies of the Software, and to permit persons to whom the Software is
 * furnished to do so, subject to the following conditions:
 *
 * The above copyright notice and this permission notice shall be included in all
 * copies or substantial portions of the Software.
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
 * SOFTWARE.
 */
Sonia.repository.ContentPanel.prototype.appendRepositoryPropertiesDirectFileLink 
        = Sonia.repository.ContentPanel.prototype.appendRepositoryProperties;

Ext.override(Sonia.repository.ContentPanel, {
  
  appendRepositoryProperties: function(bar){
    // encode path, see http://goo.gl/H869J6
    var url = 'directfilelink/' + this.repository.id + '/' + encodeURIComponent(this.path);
    bar.push(' ',{
      xtype: 'tbtext', 
      html: '<a style="color: white; font-weight: bold;" href="' + url + '">(Download Latest Version)</a>'
    });
    this.appendRepositoryPropertiesDirectFileLink(bar);
  }
  
});