From e7f8fb6312d8dad3b86d91a2de23f3d09afc101a Mon Sep 17 00:00:00 2001 From: Vokhmin Alexey V Date: Fri, 14 Mar 2014 03:00:52 +0400 Subject: [PATCH] #345: Fixed JS --- Gemfile | 1 + Gemfile.lock | 2 ++ app/assets/javascripts/angularjs/models/project_ref.js | 6 +++--- app/assets/javascripts/application.js | 1 + 4 files changed, 7 insertions(+), 3 deletions(-) diff --git a/Gemfile b/Gemfile index b05ed6233..fdf916ec9 100644 --- a/Gemfile +++ b/Gemfile @@ -51,6 +51,7 @@ gem 'will_paginate', '~> 3.0.5' gem 'meta-tags', '~> 1.5', require: 'meta_tags' gem "haml-rails", '~> 0.5' gem 'jquery-rails', '~> 2.3.0' +gem 'jquery-migrate-rails' gem 'ruby-haml-js', '~> 0.0.5' gem 'friendly_id', '~> 5.0.3' diff --git a/Gemfile.lock b/Gemfile.lock index d17f4ccdd..049e710bc 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -170,6 +170,7 @@ GEM jbuilder (2.0.3) activesupport (>= 3.0.0) multi_json (>= 1.2.0) + jquery-migrate-rails (1.2.1) jquery-rails (2.3.0) railties (>= 3.0, < 5.0) thor (>= 0.14, < 2.0) @@ -479,6 +480,7 @@ DEPENDENCIES highline (~> 1.6.20) hirb jbuilder (~> 2.0.3) + jquery-migrate-rails jquery-rails (~> 2.3.0) js-routes localeapp diff --git a/app/assets/javascripts/angularjs/models/project_ref.js b/app/assets/javascripts/angularjs/models/project_ref.js index ac0e02825..71f7b1aea 100644 --- a/app/assets/javascripts/angularjs/models/project_ref.js +++ b/app/assets/javascripts/angularjs/models/project_ref.js @@ -14,15 +14,15 @@ var ProjectRef = function(atts) { self.ui_container = false; self.path = function(project) { - return Routes.tree_path(project.owner.uname, project.name, self.ref); + return Routes.tree_path(project.fullname, self.ref); } self.diff_path = function(project, current_ref) { - return Routes.diff_path(project.owner.uname, project.name, current_ref + '...' + self.ref); + return Routes.diff_path(project.fullname, current_ref + '...' + self.ref); } self.archive_path = function(project, type) { - return Routes.archive_path(project.owner.uname, project.name, project.name + '-' + self.ref, {format: type}); + return Routes.archive_path(project.fullname, project.name + '-' + self.ref, {format: type}); } //return the scope-safe instance diff --git a/app/assets/javascripts/application.js b/app/assets/javascripts/application.js index e2427d249..b547db2c5 100644 --- a/app/assets/javascripts/application.js +++ b/app/assets/javascripts/application.js @@ -1,4 +1,5 @@ //= require jquery +//= require jquery-migrate-min //= require jquery_ujs //= require jquery-ui //= require autocomplete-rails