use rails-assets-notifyjs gem from rails-assets.org

This commit is contained in:
Alexander Machehin 2015-03-20 15:07:35 +05:00
parent cc5c009ff7
commit dabab0561d
7 changed files with 17 additions and 114 deletions

View File

@ -98,6 +98,9 @@ gem 'sitemap_generator'
gem 'codemirror-rails', '~> 4.5'
source 'https://rails-assets.org' do
gem 'rails-assets-notifyjs'
end
group :production do
gem 'airbrake'

View File

@ -51,6 +51,7 @@ GIT
GEM
remote: https://rubygems.org/
remote: https://rails-assets.org/
specs:
RedCloth (4.2.9)
actionmailer (4.1.9)
@ -370,6 +371,7 @@ GEM
bundler (>= 1.3.0, < 2.0)
railties (= 4.1.9)
sprockets-rails (~> 2.0)
rails-assets-notifyjs (0.3.2)
rails3-generators (1.0.0)
railties (>= 3.0.0)
rails3-jquery-autocomplete (1.0.15)
@ -635,6 +637,7 @@ DEPENDENCIES
puma
rack-throttle (~> 0.3.0)
rails (= 4.1.9)
rails-assets-notifyjs!
rails3-generators
rails3-jquery-autocomplete
rake

View File

@ -53,11 +53,11 @@ RosaABF.controller 'RepositoryProjectsController', ['$scope', '$http', '$locatio
$scope.removeProject = (project) ->
return false unless confirmMessage.show()
$scope.processing = true
$http.delete(project.remove_path).success (data) ->
Notifier.success(data.message)
$scope.projects = _.reject($scope.projects, (pr) ->
return pr.id is project.id
)
$scope.processing = false
$.notify(data.message, 'success')
$scope.projects = _.reject($scope.projects, (pr) ->
return pr.id is project.id
)
false
]

File diff suppressed because one or more lines are too long

View File

@ -27,10 +27,12 @@
//= require zeroclipboard
//= require notifyjs
//= require notifyjs/styles/bootstrap/notify-bootstrap
//= require lib/Chart
//= require lib/bootstrap-typeahead
//= require lib/custom-bootstrap-typeahead
//= require lib/notifier
//= require extra/highlight
//= require extra/pull

View File

@ -139,7 +139,7 @@ class Platforms::RepositoriesController < Platforms::BaseController
redirect_to platform_repository_path(@platform, @repository), notice: t('flash.repository.projects_will_be_removed')
end
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')
respond_to do |format|
format.html {redirect_to platform_repository_path(@platform, @repository), notice: message}

View File

@ -23,7 +23,7 @@ div ng-controller='RepositoryProjectsController'
th= t("activerecord.attributes.project.description")
th
tbody ng-hide='processing'
tr ng-repeat='project in projects'
tr ng-repeat='project in projects' ng-cloak = true
td
i.fa ng-class='project.visibility_class'