common-dialogs 0.0.1 → 0.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/README.md CHANGED
@@ -4,7 +4,11 @@ This provides asynchronous alternatives to alert, confirm and prompt.
4
4
 
5
5
  # Installing
6
6
 
7
- Add "gem 'common-dialogs'" to your Gemfile and run bundle.
7
+ If you're not using Rails, just grab the sources from lib/assets. If you're not using
8
+ CoffeeScript, you can always convert the sources to JavaScript in the "Try CoffeeScript"
9
+ tab in [coffeescript.org](http://coffeescript.org).
10
+
11
+ Otherwise, just add "gem 'common-dialogs'" to your Gemfile and run bundle.
8
12
 
9
13
  It also depends on jQuery-UI being installed. I recommend the
10
14
  [jquery-ui-themes](https://github.com/fatdude/jquery-ui-themes-rails) gem.
@@ -28,16 +32,18 @@ And in application.css (see the supported themes list in the link above):
28
32
 
29
33
  # Usage examples (in CoffeeScript for better readability)
30
34
 
31
- showMessage 'Any message' # Dialog title is "Message" by default
32
- showMessage 'Any message', title: 'Dialog Title', onClose: (-> console.log 'closed'), additionalClasses: 'success popup'
33
- # the CSS classes in additionalClasses will be added to the dialog div
34
- # All dialogs support those options.
35
- showError 'An error message with alert icon'
36
- confirmDialog 'Really remove task?', (-> console.log 'confirmed'), noAction: -> console.log 'answered no - this option is not required'
37
- inputDialog 'What is your name?', ((name)-> console.log "Your name is #{name}"),
38
- initialValue: 'Optional initial value'
39
- required: false # true by default, which means that an empty string is not allowed by default
40
- cancelAction: (-> console.log 'cancel was called - this option is not required')
35
+ ```coffeescript
36
+ showMessage 'Any message' # Dialog title is "Message" by default
37
+ showMessage 'Any message', title: 'Dialog Title', onClose: (-> console.log 'closed'), additionalClasses: 'success popup'
38
+ # the CSS classes in additionalClasses will be added to the dialog div
39
+ # All dialogs support those options.
40
+ showError 'An error message with alert icon'
41
+ confirmDialog 'Really remove task?', (-> console.log 'confirmed'), noAction: -> console.log 'answered no - this option is not required'
42
+ inputDialog 'What is your name?', ((name)-> console.log "Your name is #{name}"),
43
+ initialValue: 'Optional initial value'
44
+ required: false # true by default, which means that an empty string is not allowed by default
45
+ cancelAction: (-> console.log 'cancel was called - this option is not required')
46
+ ```
41
47
 
42
48
  # Custom messages and button names
43
49
 
@@ -4,15 +4,15 @@ div.alert-dialog, div.confirm-dialog, div.input-dialog {
4
4
  }
5
5
 
6
6
  div.alert-dialog {
7
- background: image-url('application/common-dialogs/info.gif') no-repeat left;
7
+ background: image-url('common-dialogs-message.gif') no-repeat left;
8
8
  }
9
9
 
10
10
  div.alert-dialog.error {
11
- background-image: image-url('application/common-dialogs/important.gif');
11
+ background-image: image-url('common-dialogs-error.gif');
12
12
  }
13
13
 
14
14
  div.confirm-dialog, div.input-dialog {
15
- background: image-url('application/common-dialogs/help.gif') no-repeat left;
15
+ background: image-url('common-dialogs-confirm.gif') no-repeat left;
16
16
  }
17
17
 
18
18
  div.input-dialog input {
@@ -1,3 +1,3 @@
1
1
  module CommonDialogs
2
- VERSION = "0.0.1"
2
+ VERSION = "0.0.2"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: common-dialogs
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -53,6 +53,9 @@ extra_rdoc_files: []
53
53
  files:
54
54
  - lib/common-dialogs/version.rb
55
55
  - lib/assets/javascripts/common-dialogs.js.coffee
56
+ - lib/assets/images/common-dialogs-error.gif
57
+ - lib/assets/images/common-dialogs-message.gif
58
+ - lib/assets/images/common-dialogs-confirm.gif
56
59
  - lib/assets/stylesheets/common-dialogs.scss
57
60
  - lib/tasks/common-dialogs_tasks.rake
58
61
  - lib/common-dialogs.rb
@@ -73,7 +76,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
73
76
  version: '0'
74
77
  segments:
75
78
  - 0
76
- hash: -3991690647463446503
79
+ hash: 4509660347765167959
77
80
  required_rubygems_version: !ruby/object:Gem::Requirement
78
81
  none: false
79
82
  requirements:
@@ -82,7 +85,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
82
85
  version: '0'
83
86
  segments:
84
87
  - 0
85
- hash: -3991690647463446503
88
+ hash: 4509660347765167959
86
89
  requirements: []
87
90
  rubyforge_project:
88
91
  rubygems_version: 1.8.21