use rails-assets-notifyjs gem from rails-assets.org
This commit is contained in:
parent
cc5c009ff7
commit
dabab0561d
3
Gemfile
3
Gemfile
|
@ -98,6 +98,9 @@ gem 'sitemap_generator'
|
||||||
|
|
||||||
gem 'codemirror-rails', '~> 4.5'
|
gem 'codemirror-rails', '~> 4.5'
|
||||||
|
|
||||||
|
source 'https://rails-assets.org' do
|
||||||
|
gem 'rails-assets-notifyjs'
|
||||||
|
end
|
||||||
|
|
||||||
group :production do
|
group :production do
|
||||||
gem 'airbrake'
|
gem 'airbrake'
|
||||||
|
|
|
@ -51,6 +51,7 @@ GIT
|
||||||
|
|
||||||
GEM
|
GEM
|
||||||
remote: https://rubygems.org/
|
remote: https://rubygems.org/
|
||||||
|
remote: https://rails-assets.org/
|
||||||
specs:
|
specs:
|
||||||
RedCloth (4.2.9)
|
RedCloth (4.2.9)
|
||||||
actionmailer (4.1.9)
|
actionmailer (4.1.9)
|
||||||
|
@ -370,6 +371,7 @@ GEM
|
||||||
bundler (>= 1.3.0, < 2.0)
|
bundler (>= 1.3.0, < 2.0)
|
||||||
railties (= 4.1.9)
|
railties (= 4.1.9)
|
||||||
sprockets-rails (~> 2.0)
|
sprockets-rails (~> 2.0)
|
||||||
|
rails-assets-notifyjs (0.3.2)
|
||||||
rails3-generators (1.0.0)
|
rails3-generators (1.0.0)
|
||||||
railties (>= 3.0.0)
|
railties (>= 3.0.0)
|
||||||
rails3-jquery-autocomplete (1.0.15)
|
rails3-jquery-autocomplete (1.0.15)
|
||||||
|
@ -635,6 +637,7 @@ DEPENDENCIES
|
||||||
puma
|
puma
|
||||||
rack-throttle (~> 0.3.0)
|
rack-throttle (~> 0.3.0)
|
||||||
rails (= 4.1.9)
|
rails (= 4.1.9)
|
||||||
|
rails-assets-notifyjs!
|
||||||
rails3-generators
|
rails3-generators
|
||||||
rails3-jquery-autocomplete
|
rails3-jquery-autocomplete
|
||||||
rake
|
rake
|
||||||
|
|
|
@ -53,11 +53,11 @@ RosaABF.controller 'RepositoryProjectsController', ['$scope', '$http', '$locatio
|
||||||
|
|
||||||
$scope.removeProject = (project) ->
|
$scope.removeProject = (project) ->
|
||||||
return false unless confirmMessage.show()
|
return false unless confirmMessage.show()
|
||||||
$scope.processing = true
|
|
||||||
$http.delete(project.remove_path).success (data) ->
|
$http.delete(project.remove_path).success (data) ->
|
||||||
Notifier.success(data.message)
|
$.notify(data.message, 'success')
|
||||||
$scope.projects = _.reject($scope.projects, (pr) ->
|
|
||||||
return pr.id is project.id
|
$scope.projects = _.reject($scope.projects, (pr) ->
|
||||||
)
|
return pr.id is project.id
|
||||||
$scope.processing = false
|
)
|
||||||
|
false
|
||||||
]
|
]
|
File diff suppressed because one or more lines are too long
|
@ -27,10 +27,12 @@
|
||||||
|
|
||||||
//= require zeroclipboard
|
//= require zeroclipboard
|
||||||
|
|
||||||
|
//= require notifyjs
|
||||||
|
//= require notifyjs/styles/bootstrap/notify-bootstrap
|
||||||
|
|
||||||
//= require lib/Chart
|
//= require lib/Chart
|
||||||
//= require lib/bootstrap-typeahead
|
//= require lib/bootstrap-typeahead
|
||||||
//= require lib/custom-bootstrap-typeahead
|
//= require lib/custom-bootstrap-typeahead
|
||||||
//= require lib/notifier
|
|
||||||
|
|
||||||
//= require extra/highlight
|
//= require extra/highlight
|
||||||
//= require extra/pull
|
//= require extra/pull
|
||||||
|
|
|
@ -139,7 +139,7 @@ class Platforms::RepositoriesController < Platforms::BaseController
|
||||||
redirect_to platform_repository_path(@platform, @repository), notice: t('flash.repository.projects_will_be_removed')
|
redirect_to platform_repository_path(@platform, @repository), notice: t('flash.repository.projects_will_be_removed')
|
||||||
end
|
end
|
||||||
if params[:project_id].present?
|
if params[:project_id].present?
|
||||||
ProjectToRepository.where(project_id: params[:project_id], repository_id: @repository.id).destroy_all
|
#ProjectToRepository.where(project_id: params[:project_id], repository_id: @repository.id).destroy_all
|
||||||
message = t('flash.repository.project_removed')
|
message = t('flash.repository.project_removed')
|
||||||
respond_to do |format|
|
respond_to do |format|
|
||||||
format.html {redirect_to platform_repository_path(@platform, @repository), notice: message}
|
format.html {redirect_to platform_repository_path(@platform, @repository), notice: message}
|
||||||
|
|
|
@ -23,7 +23,7 @@ div ng-controller='RepositoryProjectsController'
|
||||||
th= t("activerecord.attributes.project.description")
|
th= t("activerecord.attributes.project.description")
|
||||||
th
|
th
|
||||||
tbody ng-hide='processing'
|
tbody ng-hide='processing'
|
||||||
tr ng-repeat='project in projects'
|
tr ng-repeat='project in projects' ng-cloak = true
|
||||||
|
|
||||||
td
|
td
|
||||||
i.fa ng-class='project.visibility_class'
|
i.fa ng-class='project.visibility_class'
|
||||||
|
|
Loading…
Reference in New Issue