ish_manager 0.1.8.381 → 0.1.8.383

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 4d2e5be382bc48dfdf58151137f5038df66d50c386e046cb44a0700fe0b6c3c7
4
- data.tar.gz: 361c1da27ebd6b09c154e0a101e65eb7e9c11260411be5847cc6c6bc17c6e710
3
+ metadata.gz: 3aae4c46f6f96a6a9caa0d44d807ca0f6e84c81d8bce8211bda475be394bf3f5
4
+ data.tar.gz: c9021cf3ec2a606fc8d6111f1dff32d17094b0fa829b0055304a93f75027c6d2
5
5
  SHA512:
6
- metadata.gz: 5b0de89b4b160a00565e0806fd5fcf5f9495090c64c040d2f4c06897766ecf8db96e54c0a5e259cbd31fcb79dc43ae9ba2f78e45dc29535cdb0399d1587671e6
7
- data.tar.gz: 999d4cff0011f3ad55e53bfa5c26c0432be283f1c811b33719de12aa0dfdd19333ea71143f4655005bb3f32403149b84f9dd60c37fae4e9b78ceef9254fe62c9
6
+ metadata.gz: 7f4f9255e0fa368ec06d6c1b55f5c93fa2f09ea180f32f41f59f7ce70c3b73c81cd32472258df83a115a5bab3d2e3e2c69a3e076eaf17f3e1cc520c50efab7df
7
+ data.tar.gz: 6168704327873458aa4c885277e0c96241e721ce97365bbfe9ffb6ab7299d6387cddc296778e6622113469394c514bb1586b99b77b37fd3037704cbf60b84112
@@ -33,13 +33,35 @@ const AppRouter = {
33
33
 
34
34
  $(function () {
35
35
 
36
+ var fileuploadCount = 0
36
37
  $('#fileupload').fileupload({
37
38
  dataType: 'json',
38
- done: function (e, data) {
39
- var photos = $('#photos');
40
- var tempUrl = data.result[0].thumbnail_url;
41
- $('<img/>').attr('src', tempUrl).appendTo(photos);
42
- }
39
+ success: function(ev) {
40
+ logg(ev, 'success')
41
+ ev = ev[0]
42
+ fileuploadCount += 1
43
+
44
+ var el = $('<div class="item" />')
45
+ var photosEl = $('#photos')
46
+
47
+ $('<div/>').html(fileuploadCount).appendTo(el)
48
+ $('<img/>').attr('src', ev.thumbnail_url).appendTo(el)
49
+ $('<div/>').html(ev.name).appendTo(el)
50
+ el.appendTo(photosEl)
51
+ },
52
+ error: function(err) {
53
+ logg(err, 'error')
54
+ err = err.responseJSON
55
+ fileuploadCount += 1
56
+
57
+ var el = $('<div class="item" />')
58
+ var errorsEl = $('.photos--multinew .errors')
59
+
60
+ $('<div/>').html(fileuploadCount).appendTo(el)
61
+ $('<div />').html(err.filename).appendTo(el)
62
+ $('<div />').html(err.message).appendTo(el)
63
+ el.appendTo(errorsEl)
64
+ },
43
65
  });
44
66
 
45
67
  $('*[data-confirm]').click(function(){
@@ -97,7 +119,6 @@ $(function () {
97
119
  })
98
120
 
99
121
  $(".expand-next").click(function (_e) {
100
- // logg($(this).next(), 'expand?')
101
122
  $(this).next().slideToggle()
102
123
  })
103
124
 
@@ -34,6 +34,17 @@
34
34
  overflow-x: auto;
35
35
  max-width: Max( 300px, 50vw );
36
36
  }
37
+
38
+ .errors > div {
39
+ border: 1px solid red;
40
+ }
41
+
42
+ .thumbnails {
43
+ .item {
44
+ border: 1px solid blue;
45
+ }
46
+ }
47
+
37
48
  }
38
49
 
39
50
  .row-deleted {
@@ -3,7 +3,7 @@ class IshManager::GalleriesController < IshManager::ApplicationController
3
3
  before_action :set_lists
4
4
  before_action :set_gallery, only: %w|destroy edit j_show show update update_ordering|
5
5
 
6
- # alphabetized! : )
6
+ # Alphabetized! : )
7
7
 
8
8
  def create
9
9
  params[:gallery][:shared_profiles] ||= []
@@ -19,7 +19,7 @@ class IshManager::GalleriesController < IshManager::ApplicationController
19
19
  redirect_to edit_gallery_path(@gallery)
20
20
  else
21
21
  puts! @gallery.errors.messages
22
- flash[:alert] = "Cannot create the gallery: #{@gallery.errors.full_messages}"
22
+ flash[:alert] = "Cannot create the gallery: #{@gallery.errors.full_messages.join(', ')}"
23
23
  render :action => 'new'
24
24
  end
25
25
  end
@@ -27,11 +27,10 @@ class IshManager::PhotosController < IshManager::ApplicationController
27
27
  end
28
28
 
29
29
  def j_create
30
- # find this gallery
31
30
  if params[:slug]
32
31
  gallery = Gallery.unscoped.where( :slug => params[:slug] ).first
33
32
  gallery ||= Gallery.unscoped.find params[:slug]
34
- elsif params[:gallery_id] # this one, let's normalize on id everywhere in manager.
33
+ elsif params[:gallery_id]
35
34
  gallery = Gallery.unscoped.find( params[:gallery_id] )
36
35
  gallery ||= Gallery.unscoped.where( :slug => params[:gallery_id] ).first
37
36
  end
@@ -41,7 +40,6 @@ class IshManager::PhotosController < IshManager::ApplicationController
41
40
  @photo.is_public = true
42
41
  @photo.gallery = gallery
43
42
 
44
- # cache
45
43
  @photo.gallery.touch
46
44
 
47
45
  if @photo.save
@@ -55,7 +53,10 @@ class IshManager::PhotosController < IshManager::ApplicationController
55
53
  }
56
54
  render :json => [ j ]
57
55
  else
58
- render :json => { "errors" => @photo.errors }
56
+ render :json => {
57
+ message: @photo.errors.full_messages.join(", "),
58
+ filename: @photo.photo.original_filename,
59
+ }, status: 400
59
60
  end
60
61
  end
61
62
 
@@ -17,8 +17,7 @@
17
17
  .leads.max-width
18
18
  Leads (#{@email_conversation.leads.length}):
19
19
  = @email_conversation.leads.map(&:id)
20
- .leadsC
21
- = render 'ish_manager/leads/index_rows', leads: @email_conversation.leads
20
+ -# .leadsC= render 'ish_manager/leads/index_rows', leads: @email_conversation.leads
22
21
 
23
22
  .messages.max-width
24
23
  - @email_messages.each do |msg|
@@ -26,21 +25,22 @@
26
25
 
27
26
  .item
28
27
  .row-1
29
- .gray= msg.id
30
-
31
- .chip.from
32
- = lead.email
33
-
34
- .relative
35
- %a.chip{ href: email_contexts_for_lead_path( lead ) }
36
- \(
37
- = lead.email_contexts.count
38
- %i.fa.fa-envelope
39
- \)
40
-
41
- .relative
42
- %i.fa.fa-clock-o.expand-next
43
- .expand-hide= render 'ish_manager/scheduled_email_actions/form', scheduled_email_action: Sch.new({ lead_id: lead.id })
28
+ .gray
29
+ %ul
30
+ %li
31
+ = msg.id
32
+ <b>To:</b> #{msg.to}
33
+ %li
34
+ <b>From:</b> #{msg.from}
35
+ = lead.email
36
+ %a.chip{ href: email_contexts_for_lead_path( lead ) }
37
+ \(
38
+ = lead.email_contexts.count
39
+ %i.fa.fa-envelope
40
+ \)
41
+ .relative.inline-block
42
+ %i.fa.fa-clock-o.expand-next
43
+ .expand-hide= render 'ish_manager/scheduled_email_actions/form', scheduled_email_action: Sch.new({ lead_id: lead.id })
44
44
 
45
45
  .datetime
46
46
  .date= msg.date&.strftime('%Y-%m-%d')
@@ -2,11 +2,11 @@
2
2
  -# ish_manager / galleries / show
3
3
  -#
4
4
 
5
- .galleries-show
5
+ .galleries-show.padded
6
6
  .row
7
- .col-sm-12.col-md-6
7
+ .col-md-6
8
8
  = render 'title', :gallery => @gallery
9
- .col-sm-12.col-md-6
9
+ .col-md-6
10
10
  = render 'ish_manager/photos/multinew', :gallery => @gallery
11
11
 
12
12
  .row-deleted
@@ -1,5 +1,6 @@
1
1
 
2
2
  .photos--multinew
3
3
  %h3 Add Photos
4
+ .errors
4
5
  %ul{ :id => 'photos', :class => 'thumbnails' }
5
6
  %input{ :id => 'fileupload', :type => 'file', :name => 'photo[photo]', 'data-url' => gallery_multiadd_path( gallery.id ), :multiple => '' }
@@ -47,7 +47,7 @@ namespace :office do
47
47
  task :email_worker => :environment do
48
48
  while true do
49
49
 
50
- ctxs = ::Ish::EmailContext.current.unsent
50
+ ctxs = ::Ish::EmailContext.scheduled.unsent
51
51
  puts! ctxs.count, 'ctxs'
52
52
  ctxs.map do |ctx|
53
53
  IshManager::OfficeMailer.send_context_email( ctx[:id].to_s ).deliver_later
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ish_manager
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.8.381
4
+ version: 0.1.8.383
5
5
  platform: ruby
6
6
  authors:
7
7
  - piousbox