aflash 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.DS_Store +0 -0
- data/.gitignore +9 -0
- data/CODE_OF_CONDUCT.md +49 -0
- data/Gemfile +4 -0
- data/LICENSE.txt +21 -0
- data/README.md +41 -0
- data/Rakefile +2 -0
- data/aflash.gemspec +27 -0
- data/bin/console +14 -0
- data/bin/setup +8 -0
- data/lib/aflash.rb +17 -0
- data/lib/aflash/version.rb +3 -0
- data/vendor/.DS_Store +0 -0
- data/vendor/assets/.DS_Store +0 -0
- data/vendor/assets/javascripts/.DS_Store +0 -0
- data/vendor/assets/javascripts/ajax_flash.js +40 -0
- data/vendor/assets/javascripts/flash.js +1 -0
- data/vendor/assets/javascripts/toastr.min.js +2 -0
- data/vendor/assets/javascripts/underscore-min.js +6 -0
- data/vendor/assets/stylesheets/.DS_Store +0 -0
- data/vendor/assets/stylesheets/flash.css +4 -0
- data/vendor/assets/stylesheets/style.css +169 -0
- data/vendor/assets/stylesheets/toastr.scss +199 -0
- metadata +95 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 235f474e0a70f85a715b3ef27e51dd6318202ef8
|
4
|
+
data.tar.gz: da3ee844aa5a3599006bcf7d564b13688fb83d19
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 5ba1e672c21531caca221287fbb882c7f5ccb4701c2959748def22e68f54568605b9b58aadd76b8fb4ba1843686a8af3121ca177137b780ec898982acf0d2ac7
|
7
|
+
data.tar.gz: 6599728aaa186a82eb0fc78538bb4c6601eab76c24718019b725b620f415ebf0c24670027360bd0d2919adba0174ddfb86522d46b4c0fc945e51479020b33812
|
data/.DS_Store
ADDED
Binary file
|
data/.gitignore
ADDED
data/CODE_OF_CONDUCT.md
ADDED
@@ -0,0 +1,49 @@
|
|
1
|
+
# Contributor Code of Conduct
|
2
|
+
|
3
|
+
As contributors and maintainers of this project, and in the interest of
|
4
|
+
fostering an open and welcoming community, we pledge to respect all people who
|
5
|
+
contribute through reporting issues, posting feature requests, updating
|
6
|
+
documentation, submitting pull requests or patches, and other activities.
|
7
|
+
|
8
|
+
We are committed to making participation in this project a harassment-free
|
9
|
+
experience for everyone, regardless of level of experience, gender, gender
|
10
|
+
identity and expression, sexual orientation, disability, personal appearance,
|
11
|
+
body size, race, ethnicity, age, religion, or nationality.
|
12
|
+
|
13
|
+
Examples of unacceptable behavior by participants include:
|
14
|
+
|
15
|
+
* The use of sexualized language or imagery
|
16
|
+
* Personal attacks
|
17
|
+
* Trolling or insulting/derogatory comments
|
18
|
+
* Public or private harassment
|
19
|
+
* Publishing other's private information, such as physical or electronic
|
20
|
+
addresses, without explicit permission
|
21
|
+
* Other unethical or unprofessional conduct
|
22
|
+
|
23
|
+
Project maintainers have the right and responsibility to remove, edit, or
|
24
|
+
reject comments, commits, code, wiki edits, issues, and other contributions
|
25
|
+
that are not aligned to this Code of Conduct, or to ban temporarily or
|
26
|
+
permanently any contributor for other behaviors that they deem inappropriate,
|
27
|
+
threatening, offensive, or harmful.
|
28
|
+
|
29
|
+
By adopting this Code of Conduct, project maintainers commit themselves to
|
30
|
+
fairly and consistently applying these principles to every aspect of managing
|
31
|
+
this project. Project maintainers who do not follow or enforce the Code of
|
32
|
+
Conduct may be permanently removed from the project team.
|
33
|
+
|
34
|
+
This code of conduct applies both within project spaces and in public spaces
|
35
|
+
when an individual is representing the project or its community.
|
36
|
+
|
37
|
+
Instances of abusive, harassing, or otherwise unacceptable behavior may be
|
38
|
+
reported by contacting a project maintainer at tauqeer.ahmad2008@gmail.com. All
|
39
|
+
complaints will be reviewed and investigated and will result in a response that
|
40
|
+
is deemed necessary and appropriate to the circumstances. Maintainers are
|
41
|
+
obligated to maintain confidentiality with regard to the reporter of an
|
42
|
+
incident.
|
43
|
+
|
44
|
+
This Code of Conduct is adapted from the [Contributor Covenant][homepage],
|
45
|
+
version 1.3.0, available at
|
46
|
+
[http://contributor-covenant.org/version/1/3/0/][version]
|
47
|
+
|
48
|
+
[homepage]: http://contributor-covenant.org
|
49
|
+
[version]: http://contributor-covenant.org/version/1/3/0/
|
data/Gemfile
ADDED
data/LICENSE.txt
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
The MIT License (MIT)
|
2
|
+
|
3
|
+
Copyright (c) 2016 Tauqeer Ahmad
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
7
|
+
in the Software without restriction, including without limitation the rights
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
10
|
+
furnished to do so, subject to the following conditions:
|
11
|
+
|
12
|
+
The above copyright notice and this permission notice shall be included in
|
13
|
+
all copies or substantial portions of the Software.
|
14
|
+
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
21
|
+
THE SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,41 @@
|
|
1
|
+
# Aflash
|
2
|
+
|
3
|
+
Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/aflash`. To experiment with that code, run `bin/console` for an interactive prompt.
|
4
|
+
|
5
|
+
TODO: Delete this and the text above, and describe your gem
|
6
|
+
|
7
|
+
## Installation
|
8
|
+
|
9
|
+
Add this line to your application's Gemfile:
|
10
|
+
|
11
|
+
```ruby
|
12
|
+
gem 'aflash'
|
13
|
+
```
|
14
|
+
|
15
|
+
And then execute:
|
16
|
+
|
17
|
+
$ bundle
|
18
|
+
|
19
|
+
Or install it yourself as:
|
20
|
+
|
21
|
+
$ gem install aflash
|
22
|
+
|
23
|
+
## Usage
|
24
|
+
|
25
|
+
TODO: Write usage instructions here
|
26
|
+
|
27
|
+
## Development
|
28
|
+
|
29
|
+
After checking out the repo, run `bin/setup` to install dependencies. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
|
30
|
+
|
31
|
+
To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
|
32
|
+
|
33
|
+
## Contributing
|
34
|
+
|
35
|
+
Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/aflash. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
|
36
|
+
|
37
|
+
|
38
|
+
## License
|
39
|
+
|
40
|
+
The gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).
|
41
|
+
|
data/Rakefile
ADDED
data/aflash.gemspec
ADDED
@@ -0,0 +1,27 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
lib = File.expand_path('../lib', __FILE__)
|
3
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
+
require 'aflash/version'
|
5
|
+
|
6
|
+
Gem::Specification.new do |spec|
|
7
|
+
spec.name = "aflash"
|
8
|
+
spec.version = Aflash::VERSION
|
9
|
+
spec.authors = ["Tauqeer Ahmad"]
|
10
|
+
spec.email = ["tauqeer.ahmad2008@gmail.com"]
|
11
|
+
|
12
|
+
spec.summary = %q{AFlash displays flash messages on ajax calls.}
|
13
|
+
spec.description = %q{AFlash displays flash messages on ajax calls.}
|
14
|
+
spec.homepage = "https://github.com/tauqeer-ahmad/aflash"
|
15
|
+
spec.license = "MIT"
|
16
|
+
|
17
|
+
# Prevent pushing this gem to RubyGems.org by setting 'allowed_push_host', or
|
18
|
+
# delete this section to allow pushing this gem to any host.
|
19
|
+
|
20
|
+
spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
|
21
|
+
spec.bindir = "exe"
|
22
|
+
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
23
|
+
spec.require_paths = ["lib"]
|
24
|
+
|
25
|
+
spec.add_development_dependency "bundler", "~> 1.11"
|
26
|
+
spec.add_development_dependency "rake", "~> 10.0"
|
27
|
+
end
|
data/bin/console
ADDED
@@ -0,0 +1,14 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
require "bundler/setup"
|
4
|
+
require "aflash"
|
5
|
+
|
6
|
+
# You can add fixtures and/or initialization code here to make experimenting
|
7
|
+
# with your gem easier. You can also use a different console, if you like.
|
8
|
+
|
9
|
+
# (If you use this, don't forget to add pry to your Gemfile!)
|
10
|
+
# require "pry"
|
11
|
+
# Pry.start
|
12
|
+
|
13
|
+
require "irb"
|
14
|
+
IRB.start
|
data/bin/setup
ADDED
data/lib/aflash.rb
ADDED
@@ -0,0 +1,17 @@
|
|
1
|
+
require "aflash/version"
|
2
|
+
|
3
|
+
module Aflash
|
4
|
+
class Engine < ::Rails::Engine; end
|
5
|
+
extend ActiveSupport::Concern
|
6
|
+
|
7
|
+
included do
|
8
|
+
after_filter :add_flash_to_header
|
9
|
+
end
|
10
|
+
|
11
|
+
private
|
12
|
+
def add_flash_to_header
|
13
|
+
return unless request.xhr?
|
14
|
+
response.headers['X-Flash'] = flash.to_h.to_json
|
15
|
+
flash.discard
|
16
|
+
end
|
17
|
+
end
|
data/vendor/.DS_Store
ADDED
Binary file
|
Binary file
|
Binary file
|
@@ -0,0 +1,40 @@
|
|
1
|
+
(function(){
|
2
|
+
var notifiers, showErrorsInResponse, showFlashMessages;
|
3
|
+
|
4
|
+
notifiers = {
|
5
|
+
notice: 'success',
|
6
|
+
alert: 'error',
|
7
|
+
info: 'info'
|
8
|
+
};
|
9
|
+
|
10
|
+
showFlashMessages = function(jqXHR) {
|
11
|
+
var flash;
|
12
|
+
if (!jqXHR || !jqXHR.getResponseHeader) return;
|
13
|
+
flash = jqXHR.getResponseHeader('X-Flash');
|
14
|
+
flash = JSON.parse(flash);
|
15
|
+
return _.each(flash, function(message, key) {
|
16
|
+
return toastr[notifiers[key]](message);
|
17
|
+
});
|
18
|
+
};
|
19
|
+
|
20
|
+
showErrorsInResponse = function(jqXHR) {
|
21
|
+
var error, response;
|
22
|
+
(jqXHR.responseJSON)
|
23
|
+
if (!jqXHR || !jqXHR.responseJSON || !jqXHR.responseJSON.errors) return;
|
24
|
+
response = jqXHR.responseJSON;
|
25
|
+
error = _.map(response.errors, function(messages, property) {
|
26
|
+
return _.map(messages, function(x) {
|
27
|
+
return "" + property + " " + x;
|
28
|
+
}).join("<br />");
|
29
|
+
});
|
30
|
+
return toastr.error(error, "ERROR");
|
31
|
+
};
|
32
|
+
|
33
|
+
$(function() {
|
34
|
+
toastr.options.positionClass = 'toast-top-right';
|
35
|
+
return $(document).ajaxComplete(function(event, xhr, settings) {
|
36
|
+
showFlashMessages(xhr);
|
37
|
+
showErrorsInResponse(xhr);
|
38
|
+
});
|
39
|
+
});
|
40
|
+
})(this)
|
@@ -0,0 +1 @@
|
|
1
|
+
//= require_tree .
|
@@ -0,0 +1,2 @@
|
|
1
|
+
!function(e){e(["jquery"],function(e){return function(){function t(e,t,n){return f({type:O.error,iconClass:g().iconClasses.error,message:e,optionsOverride:n,title:t})}function n(t,n){return t||(t=g()),v=e("#"+t.containerId),v.length?v:(n&&(v=c(t)),v)}function i(e,t,n){return f({type:O.info,iconClass:g().iconClasses.info,message:e,optionsOverride:n,title:t})}function o(e){w=e}function s(e,t,n){return f({type:O.success,iconClass:g().iconClasses.success,message:e,optionsOverride:n,title:t})}function a(e,t,n){return f({type:O.warning,iconClass:g().iconClasses.warning,message:e,optionsOverride:n,title:t})}function r(e){var t=g();v||n(t),l(e,t)||u(t)}function d(t){var i=g();return v||n(i),t&&0===e(":focus",t).length?void h(t):void(v.children().length&&v.remove())}function u(t){for(var n=v.children(),i=n.length-1;i>=0;i--)l(e(n[i]),t)}function l(t,n){return t&&0===e(":focus",t).length?(t[n.hideMethod]({duration:n.hideDuration,easing:n.hideEasing,complete:function(){h(t)}}),!0):!1}function c(t){return v=e("<div/>").attr("id",t.containerId).addClass(t.positionClass).attr("aria-live","polite").attr("role","alert"),v.appendTo(e(t.target)),v}function p(){return{tapToDismiss:!0,toastClass:"toast",containerId:"toast-container",debug:!1,showMethod:"fadeIn",showDuration:300,showEasing:"swing",onShown:void 0,hideMethod:"fadeOut",hideDuration:1e3,hideEasing:"swing",onHidden:void 0,extendedTimeOut:1e3,iconClasses:{error:"toast-error",info:"toast-info",success:"toast-success",warning:"toast-warning"},iconClass:"toast-info",positionClass:"toast-top-right",timeOut:5e3,titleClass:"toast-title",messageClass:"toast-message",target:"body",closeHtml:'<button type="button">×</button>',newestOnTop:!0,preventDuplicates:!1,progressBar:!1}}function m(e){w&&w(e)}function f(t){function i(t){return!e(":focus",l).length||t?(clearTimeout(O.intervalId),l[r.hideMethod]({duration:r.hideDuration,easing:r.hideEasing,complete:function(){h(l),r.onHidden&&"hidden"!==b.state&&r.onHidden(),b.state="hidden",b.endTime=new Date,m(b)}})):void 0}function o(){(r.timeOut>0||r.extendedTimeOut>0)&&(u=setTimeout(i,r.extendedTimeOut),O.maxHideTime=parseFloat(r.extendedTimeOut),O.hideEta=(new Date).getTime()+O.maxHideTime)}function s(){clearTimeout(u),O.hideEta=0,l.stop(!0,!0)[r.showMethod]({duration:r.showDuration,easing:r.showEasing})}function a(){var e=(O.hideEta-(new Date).getTime())/O.maxHideTime*100;f.width(e+"%")}var r=g(),d=t.iconClass||r.iconClass;if("undefined"!=typeof t.optionsOverride&&(r=e.extend(r,t.optionsOverride),d=t.optionsOverride.iconClass||d),r.preventDuplicates){if(t.message===C)return;C=t.message}T++,v=n(r,!0);var u=null,l=e("<div/>"),c=e("<div/>"),p=e("<div/>"),f=e("<div/>"),w=e(r.closeHtml),O={intervalId:null,hideEta:null,maxHideTime:null},b={toastId:T,state:"visible",startTime:new Date,options:r,map:t};return t.iconClass&&l.addClass(r.toastClass).addClass(d),t.title&&(c.append(t.title).addClass(r.titleClass),l.append(c)),t.message&&(p.append(t.message).addClass(r.messageClass),l.append(p)),r.closeButton&&(w.addClass("toast-close-button").attr("role","button"),l.prepend(w)),r.progressBar&&(f.addClass("toast-progress"),l.prepend(f)),l.hide(),r.newestOnTop?v.prepend(l):v.append(l),l[r.showMethod]({duration:r.showDuration,easing:r.showEasing,complete:r.onShown}),r.timeOut>0&&(u=setTimeout(i,r.timeOut),O.maxHideTime=parseFloat(r.timeOut),O.hideEta=(new Date).getTime()+O.maxHideTime,r.progressBar&&(O.intervalId=setInterval(a,10))),l.hover(s,o),!r.onclick&&r.tapToDismiss&&l.click(i),r.closeButton&&w&&w.click(function(e){e.stopPropagation?e.stopPropagation():void 0!==e.cancelBubble&&e.cancelBubble!==!0&&(e.cancelBubble=!0),i(!0)}),r.onclick&&l.click(function(){r.onclick(),i()}),m(b),r.debug&&console&&console.log(b),l}function g(){return e.extend({},p(),b.options)}function h(e){v||(v=n()),e.is(":visible")||(e.remove(),e=null,0===v.children().length&&(v.remove(),C=void 0))}var v,w,C,T=0,O={error:"error",info:"info",success:"success",warning:"warning"},b={clear:r,remove:d,error:t,getContainer:n,info:i,options:{},subscribe:o,success:s,version:"2.1.0",warning:a};return b}()})}("function"==typeof define&&define.amd?define:function(e,t){"undefined"!=typeof module&&module.exports?module.exports=t(require("jquery")):window.toastr=t(window.jQuery)});
|
2
|
+
//# sourceMappingURL=toastr.js.map
|
@@ -0,0 +1,6 @@
|
|
1
|
+
// Underscore.js 1.8.3
|
2
|
+
// http://underscorejs.org
|
3
|
+
// (c) 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
|
4
|
+
// Underscore may be freely distributed under the MIT license.
|
5
|
+
(function(){function n(n){function t(t,r,e,u,i,o){for(;i>=0&&o>i;i+=n){var a=u?u[i]:i;e=r(e,t[a],a,t)}return e}return function(r,e,u,i){e=b(e,i,4);var o=!k(r)&&m.keys(r),a=(o||r).length,c=n>0?0:a-1;return arguments.length<3&&(u=r[o?o[c]:c],c+=n),t(r,e,u,o,c,a)}}function t(n){return function(t,r,e){r=x(r,e);for(var u=O(t),i=n>0?0:u-1;i>=0&&u>i;i+=n)if(r(t[i],i,t))return i;return-1}}function r(n,t,r){return function(e,u,i){var o=0,a=O(e);if("number"==typeof i)n>0?o=i>=0?i:Math.max(i+a,o):a=i>=0?Math.min(i+1,a):i+a+1;else if(r&&i&&a)return i=r(e,u),e[i]===u?i:-1;if(u!==u)return i=t(l.call(e,o,a),m.isNaN),i>=0?i+o:-1;for(i=n>0?o:a-1;i>=0&&a>i;i+=n)if(e[i]===u)return i;return-1}}function e(n,t){var r=I.length,e=n.constructor,u=m.isFunction(e)&&e.prototype||a,i="constructor";for(m.has(n,i)&&!m.contains(t,i)&&t.push(i);r--;)i=I[r],i in n&&n[i]!==u[i]&&!m.contains(t,i)&&t.push(i)}var u=this,i=u._,o=Array.prototype,a=Object.prototype,c=Function.prototype,f=o.push,l=o.slice,s=a.toString,p=a.hasOwnProperty,h=Array.isArray,v=Object.keys,g=c.bind,y=Object.create,d=function(){},m=function(n){return n instanceof m?n:this instanceof m?void(this._wrapped=n):new m(n)};"undefined"!=typeof exports?("undefined"!=typeof module&&module.exports&&(exports=module.exports=m),exports._=m):u._=m,m.VERSION="1.8.3";var b=function(n,t,r){if(t===void 0)return n;switch(null==r?3:r){case 1:return function(r){return n.call(t,r)};case 2:return function(r,e){return n.call(t,r,e)};case 3:return function(r,e,u){return n.call(t,r,e,u)};case 4:return function(r,e,u,i){return n.call(t,r,e,u,i)}}return function(){return n.apply(t,arguments)}},x=function(n,t,r){return null==n?m.identity:m.isFunction(n)?b(n,t,r):m.isObject(n)?m.matcher(n):m.property(n)};m.iteratee=function(n,t){return x(n,t,1/0)};var _=function(n,t){return function(r){var e=arguments.length;if(2>e||null==r)return r;for(var u=1;e>u;u++)for(var i=arguments[u],o=n(i),a=o.length,c=0;a>c;c++){var f=o[c];t&&r[f]!==void 0||(r[f]=i[f])}return r}},j=function(n){if(!m.isObject(n))return{};if(y)return y(n);d.prototype=n;var t=new d;return d.prototype=null,t},w=function(n){return function(t){return null==t?void 0:t[n]}},A=Math.pow(2,53)-1,O=w("length"),k=function(n){var t=O(n);return"number"==typeof t&&t>=0&&A>=t};m.each=m.forEach=function(n,t,r){t=b(t,r);var e,u;if(k(n))for(e=0,u=n.length;u>e;e++)t(n[e],e,n);else{var i=m.keys(n);for(e=0,u=i.length;u>e;e++)t(n[i[e]],i[e],n)}return n},m.map=m.collect=function(n,t,r){t=x(t,r);for(var e=!k(n)&&m.keys(n),u=(e||n).length,i=Array(u),o=0;u>o;o++){var a=e?e[o]:o;i[o]=t(n[a],a,n)}return i},m.reduce=m.foldl=m.inject=n(1),m.reduceRight=m.foldr=n(-1),m.find=m.detect=function(n,t,r){var e;return e=k(n)?m.findIndex(n,t,r):m.findKey(n,t,r),e!==void 0&&e!==-1?n[e]:void 0},m.filter=m.select=function(n,t,r){var e=[];return t=x(t,r),m.each(n,function(n,r,u){t(n,r,u)&&e.push(n)}),e},m.reject=function(n,t,r){return m.filter(n,m.negate(x(t)),r)},m.every=m.all=function(n,t,r){t=x(t,r);for(var e=!k(n)&&m.keys(n),u=(e||n).length,i=0;u>i;i++){var o=e?e[i]:i;if(!t(n[o],o,n))return!1}return!0},m.some=m.any=function(n,t,r){t=x(t,r);for(var e=!k(n)&&m.keys(n),u=(e||n).length,i=0;u>i;i++){var o=e?e[i]:i;if(t(n[o],o,n))return!0}return!1},m.contains=m.includes=m.include=function(n,t,r,e){return k(n)||(n=m.values(n)),("number"!=typeof r||e)&&(r=0),m.indexOf(n,t,r)>=0},m.invoke=function(n,t){var r=l.call(arguments,2),e=m.isFunction(t);return m.map(n,function(n){var u=e?t:n[t];return null==u?u:u.apply(n,r)})},m.pluck=function(n,t){return m.map(n,m.property(t))},m.where=function(n,t){return m.filter(n,m.matcher(t))},m.findWhere=function(n,t){return m.find(n,m.matcher(t))},m.max=function(n,t,r){var e,u,i=-1/0,o=-1/0;if(null==t&&null!=n){n=k(n)?n:m.values(n);for(var a=0,c=n.length;c>a;a++)e=n[a],e>i&&(i=e)}else t=x(t,r),m.each(n,function(n,r,e){u=t(n,r,e),(u>o||u===-1/0&&i===-1/0)&&(i=n,o=u)});return i},m.min=function(n,t,r){var e,u,i=1/0,o=1/0;if(null==t&&null!=n){n=k(n)?n:m.values(n);for(var a=0,c=n.length;c>a;a++)e=n[a],i>e&&(i=e)}else t=x(t,r),m.each(n,function(n,r,e){u=t(n,r,e),(o>u||1/0===u&&1/0===i)&&(i=n,o=u)});return i},m.shuffle=function(n){for(var t,r=k(n)?n:m.values(n),e=r.length,u=Array(e),i=0;e>i;i++)t=m.random(0,i),t!==i&&(u[i]=u[t]),u[t]=r[i];return u},m.sample=function(n,t,r){return null==t||r?(k(n)||(n=m.values(n)),n[m.random(n.length-1)]):m.shuffle(n).slice(0,Math.max(0,t))},m.sortBy=function(n,t,r){return t=x(t,r),m.pluck(m.map(n,function(n,r,e){return{value:n,index:r,criteria:t(n,r,e)}}).sort(function(n,t){var r=n.criteria,e=t.criteria;if(r!==e){if(r>e||r===void 0)return 1;if(e>r||e===void 0)return-1}return n.index-t.index}),"value")};var F=function(n){return function(t,r,e){var u={};return r=x(r,e),m.each(t,function(e,i){var o=r(e,i,t);n(u,e,o)}),u}};m.groupBy=F(function(n,t,r){m.has(n,r)?n[r].push(t):n[r]=[t]}),m.indexBy=F(function(n,t,r){n[r]=t}),m.countBy=F(function(n,t,r){m.has(n,r)?n[r]++:n[r]=1}),m.toArray=function(n){return n?m.isArray(n)?l.call(n):k(n)?m.map(n,m.identity):m.values(n):[]},m.size=function(n){return null==n?0:k(n)?n.length:m.keys(n).length},m.partition=function(n,t,r){t=x(t,r);var e=[],u=[];return m.each(n,function(n,r,i){(t(n,r,i)?e:u).push(n)}),[e,u]},m.first=m.head=m.take=function(n,t,r){return null==n?void 0:null==t||r?n[0]:m.initial(n,n.length-t)},m.initial=function(n,t,r){return l.call(n,0,Math.max(0,n.length-(null==t||r?1:t)))},m.last=function(n,t,r){return null==n?void 0:null==t||r?n[n.length-1]:m.rest(n,Math.max(0,n.length-t))},m.rest=m.tail=m.drop=function(n,t,r){return l.call(n,null==t||r?1:t)},m.compact=function(n){return m.filter(n,m.identity)};var S=function(n,t,r,e){for(var u=[],i=0,o=e||0,a=O(n);a>o;o++){var c=n[o];if(k(c)&&(m.isArray(c)||m.isArguments(c))){t||(c=S(c,t,r));var f=0,l=c.length;for(u.length+=l;l>f;)u[i++]=c[f++]}else r||(u[i++]=c)}return u};m.flatten=function(n,t){return S(n,t,!1)},m.without=function(n){return m.difference(n,l.call(arguments,1))},m.uniq=m.unique=function(n,t,r,e){m.isBoolean(t)||(e=r,r=t,t=!1),null!=r&&(r=x(r,e));for(var u=[],i=[],o=0,a=O(n);a>o;o++){var c=n[o],f=r?r(c,o,n):c;t?(o&&i===f||u.push(c),i=f):r?m.contains(i,f)||(i.push(f),u.push(c)):m.contains(u,c)||u.push(c)}return u},m.union=function(){return m.uniq(S(arguments,!0,!0))},m.intersection=function(n){for(var t=[],r=arguments.length,e=0,u=O(n);u>e;e++){var i=n[e];if(!m.contains(t,i)){for(var o=1;r>o&&m.contains(arguments[o],i);o++);o===r&&t.push(i)}}return t},m.difference=function(n){var t=S(arguments,!0,!0,1);return m.filter(n,function(n){return!m.contains(t,n)})},m.zip=function(){return m.unzip(arguments)},m.unzip=function(n){for(var t=n&&m.max(n,O).length||0,r=Array(t),e=0;t>e;e++)r[e]=m.pluck(n,e);return r},m.object=function(n,t){for(var r={},e=0,u=O(n);u>e;e++)t?r[n[e]]=t[e]:r[n[e][0]]=n[e][1];return r},m.findIndex=t(1),m.findLastIndex=t(-1),m.sortedIndex=function(n,t,r,e){r=x(r,e,1);for(var u=r(t),i=0,o=O(n);o>i;){var a=Math.floor((i+o)/2);r(n[a])<u?i=a+1:o=a}return i},m.indexOf=r(1,m.findIndex,m.sortedIndex),m.lastIndexOf=r(-1,m.findLastIndex),m.range=function(n,t,r){null==t&&(t=n||0,n=0),r=r||1;for(var e=Math.max(Math.ceil((t-n)/r),0),u=Array(e),i=0;e>i;i++,n+=r)u[i]=n;return u};var E=function(n,t,r,e,u){if(!(e instanceof t))return n.apply(r,u);var i=j(n.prototype),o=n.apply(i,u);return m.isObject(o)?o:i};m.bind=function(n,t){if(g&&n.bind===g)return g.apply(n,l.call(arguments,1));if(!m.isFunction(n))throw new TypeError("Bind must be called on a function");var r=l.call(arguments,2),e=function(){return E(n,e,t,this,r.concat(l.call(arguments)))};return e},m.partial=function(n){var t=l.call(arguments,1),r=function(){for(var e=0,u=t.length,i=Array(u),o=0;u>o;o++)i[o]=t[o]===m?arguments[e++]:t[o];for(;e<arguments.length;)i.push(arguments[e++]);return E(n,r,this,this,i)};return r},m.bindAll=function(n){var t,r,e=arguments.length;if(1>=e)throw new Error("bindAll must be passed function names");for(t=1;e>t;t++)r=arguments[t],n[r]=m.bind(n[r],n);return n},m.memoize=function(n,t){var r=function(e){var u=r.cache,i=""+(t?t.apply(this,arguments):e);return m.has(u,i)||(u[i]=n.apply(this,arguments)),u[i]};return r.cache={},r},m.delay=function(n,t){var r=l.call(arguments,2);return setTimeout(function(){return n.apply(null,r)},t)},m.defer=m.partial(m.delay,m,1),m.throttle=function(n,t,r){var e,u,i,o=null,a=0;r||(r={});var c=function(){a=r.leading===!1?0:m.now(),o=null,i=n.apply(e,u),o||(e=u=null)};return function(){var f=m.now();a||r.leading!==!1||(a=f);var l=t-(f-a);return e=this,u=arguments,0>=l||l>t?(o&&(clearTimeout(o),o=null),a=f,i=n.apply(e,u),o||(e=u=null)):o||r.trailing===!1||(o=setTimeout(c,l)),i}},m.debounce=function(n,t,r){var e,u,i,o,a,c=function(){var f=m.now()-o;t>f&&f>=0?e=setTimeout(c,t-f):(e=null,r||(a=n.apply(i,u),e||(i=u=null)))};return function(){i=this,u=arguments,o=m.now();var f=r&&!e;return e||(e=setTimeout(c,t)),f&&(a=n.apply(i,u),i=u=null),a}},m.wrap=function(n,t){return m.partial(t,n)},m.negate=function(n){return function(){return!n.apply(this,arguments)}},m.compose=function(){var n=arguments,t=n.length-1;return function(){for(var r=t,e=n[t].apply(this,arguments);r--;)e=n[r].call(this,e);return e}},m.after=function(n,t){return function(){return--n<1?t.apply(this,arguments):void 0}},m.before=function(n,t){var r;return function(){return--n>0&&(r=t.apply(this,arguments)),1>=n&&(t=null),r}},m.once=m.partial(m.before,2);var M=!{toString:null}.propertyIsEnumerable("toString"),I=["valueOf","isPrototypeOf","toString","propertyIsEnumerable","hasOwnProperty","toLocaleString"];m.keys=function(n){if(!m.isObject(n))return[];if(v)return v(n);var t=[];for(var r in n)m.has(n,r)&&t.push(r);return M&&e(n,t),t},m.allKeys=function(n){if(!m.isObject(n))return[];var t=[];for(var r in n)t.push(r);return M&&e(n,t),t},m.values=function(n){for(var t=m.keys(n),r=t.length,e=Array(r),u=0;r>u;u++)e[u]=n[t[u]];return e},m.mapObject=function(n,t,r){t=x(t,r);for(var e,u=m.keys(n),i=u.length,o={},a=0;i>a;a++)e=u[a],o[e]=t(n[e],e,n);return o},m.pairs=function(n){for(var t=m.keys(n),r=t.length,e=Array(r),u=0;r>u;u++)e[u]=[t[u],n[t[u]]];return e},m.invert=function(n){for(var t={},r=m.keys(n),e=0,u=r.length;u>e;e++)t[n[r[e]]]=r[e];return t},m.functions=m.methods=function(n){var t=[];for(var r in n)m.isFunction(n[r])&&t.push(r);return t.sort()},m.extend=_(m.allKeys),m.extendOwn=m.assign=_(m.keys),m.findKey=function(n,t,r){t=x(t,r);for(var e,u=m.keys(n),i=0,o=u.length;o>i;i++)if(e=u[i],t(n[e],e,n))return e},m.pick=function(n,t,r){var e,u,i={},o=n;if(null==o)return i;m.isFunction(t)?(u=m.allKeys(o),e=b(t,r)):(u=S(arguments,!1,!1,1),e=function(n,t,r){return t in r},o=Object(o));for(var a=0,c=u.length;c>a;a++){var f=u[a],l=o[f];e(l,f,o)&&(i[f]=l)}return i},m.omit=function(n,t,r){if(m.isFunction(t))t=m.negate(t);else{var e=m.map(S(arguments,!1,!1,1),String);t=function(n,t){return!m.contains(e,t)}}return m.pick(n,t,r)},m.defaults=_(m.allKeys,!0),m.create=function(n,t){var r=j(n);return t&&m.extendOwn(r,t),r},m.clone=function(n){return m.isObject(n)?m.isArray(n)?n.slice():m.extend({},n):n},m.tap=function(n,t){return t(n),n},m.isMatch=function(n,t){var r=m.keys(t),e=r.length;if(null==n)return!e;for(var u=Object(n),i=0;e>i;i++){var o=r[i];if(t[o]!==u[o]||!(o in u))return!1}return!0};var N=function(n,t,r,e){if(n===t)return 0!==n||1/n===1/t;if(null==n||null==t)return n===t;n instanceof m&&(n=n._wrapped),t instanceof m&&(t=t._wrapped);var u=s.call(n);if(u!==s.call(t))return!1;switch(u){case"[object RegExp]":case"[object String]":return""+n==""+t;case"[object Number]":return+n!==+n?+t!==+t:0===+n?1/+n===1/t:+n===+t;case"[object Date]":case"[object Boolean]":return+n===+t}var i="[object Array]"===u;if(!i){if("object"!=typeof n||"object"!=typeof t)return!1;var o=n.constructor,a=t.constructor;if(o!==a&&!(m.isFunction(o)&&o instanceof o&&m.isFunction(a)&&a instanceof a)&&"constructor"in n&&"constructor"in t)return!1}r=r||[],e=e||[];for(var c=r.length;c--;)if(r[c]===n)return e[c]===t;if(r.push(n),e.push(t),i){if(c=n.length,c!==t.length)return!1;for(;c--;)if(!N(n[c],t[c],r,e))return!1}else{var f,l=m.keys(n);if(c=l.length,m.keys(t).length!==c)return!1;for(;c--;)if(f=l[c],!m.has(t,f)||!N(n[f],t[f],r,e))return!1}return r.pop(),e.pop(),!0};m.isEqual=function(n,t){return N(n,t)},m.isEmpty=function(n){return null==n?!0:k(n)&&(m.isArray(n)||m.isString(n)||m.isArguments(n))?0===n.length:0===m.keys(n).length},m.isElement=function(n){return!(!n||1!==n.nodeType)},m.isArray=h||function(n){return"[object Array]"===s.call(n)},m.isObject=function(n){var t=typeof n;return"function"===t||"object"===t&&!!n},m.each(["Arguments","Function","String","Number","Date","RegExp","Error"],function(n){m["is"+n]=function(t){return s.call(t)==="[object "+n+"]"}}),m.isArguments(arguments)||(m.isArguments=function(n){return m.has(n,"callee")}),"function"!=typeof/./&&"object"!=typeof Int8Array&&(m.isFunction=function(n){return"function"==typeof n||!1}),m.isFinite=function(n){return isFinite(n)&&!isNaN(parseFloat(n))},m.isNaN=function(n){return m.isNumber(n)&&n!==+n},m.isBoolean=function(n){return n===!0||n===!1||"[object Boolean]"===s.call(n)},m.isNull=function(n){return null===n},m.isUndefined=function(n){return n===void 0},m.has=function(n,t){return null!=n&&p.call(n,t)},m.noConflict=function(){return u._=i,this},m.identity=function(n){return n},m.constant=function(n){return function(){return n}},m.noop=function(){},m.property=w,m.propertyOf=function(n){return null==n?function(){}:function(t){return n[t]}},m.matcher=m.matches=function(n){return n=m.extendOwn({},n),function(t){return m.isMatch(t,n)}},m.times=function(n,t,r){var e=Array(Math.max(0,n));t=b(t,r,1);for(var u=0;n>u;u++)e[u]=t(u);return e},m.random=function(n,t){return null==t&&(t=n,n=0),n+Math.floor(Math.random()*(t-n+1))},m.now=Date.now||function(){return(new Date).getTime()};var B={"&":"&","<":"<",">":">",'"':""","'":"'","`":"`"},T=m.invert(B),R=function(n){var t=function(t){return n[t]},r="(?:"+m.keys(n).join("|")+")",e=RegExp(r),u=RegExp(r,"g");return function(n){return n=null==n?"":""+n,e.test(n)?n.replace(u,t):n}};m.escape=R(B),m.unescape=R(T),m.result=function(n,t,r){var e=null==n?void 0:n[t];return e===void 0&&(e=r),m.isFunction(e)?e.call(n):e};var q=0;m.uniqueId=function(n){var t=++q+"";return n?n+t:t},m.templateSettings={evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,escape:/<%-([\s\S]+?)%>/g};var K=/(.)^/,z={"'":"'","\\":"\\","\r":"r","\n":"n","\u2028":"u2028","\u2029":"u2029"},D=/\\|'|\r|\n|\u2028|\u2029/g,L=function(n){return"\\"+z[n]};m.template=function(n,t,r){!t&&r&&(t=r),t=m.defaults({},t,m.templateSettings);var e=RegExp([(t.escape||K).source,(t.interpolate||K).source,(t.evaluate||K).source].join("|")+"|$","g"),u=0,i="__p+='";n.replace(e,function(t,r,e,o,a){return i+=n.slice(u,a).replace(D,L),u=a+t.length,r?i+="'+\n((__t=("+r+"))==null?'':_.escape(__t))+\n'":e?i+="'+\n((__t=("+e+"))==null?'':__t)+\n'":o&&(i+="';\n"+o+"\n__p+='"),t}),i+="';\n",t.variable||(i="with(obj||{}){\n"+i+"}\n"),i="var __t,__p='',__j=Array.prototype.join,"+"print=function(){__p+=__j.call(arguments,'');};\n"+i+"return __p;\n";try{var o=new Function(t.variable||"obj","_",i)}catch(a){throw a.source=i,a}var c=function(n){return o.call(this,n,m)},f=t.variable||"obj";return c.source="function("+f+"){\n"+i+"}",c},m.chain=function(n){var t=m(n);return t._chain=!0,t};var P=function(n,t){return n._chain?m(t).chain():t};m.mixin=function(n){m.each(m.functions(n),function(t){var r=m[t]=n[t];m.prototype[t]=function(){var n=[this._wrapped];return f.apply(n,arguments),P(this,r.apply(m,n))}})},m.mixin(m),m.each(["pop","push","reverse","shift","sort","splice","unshift"],function(n){var t=o[n];m.prototype[n]=function(){var r=this._wrapped;return t.apply(r,arguments),"shift"!==n&&"splice"!==n||0!==r.length||delete r[0],P(this,r)}}),m.each(["concat","join","slice"],function(n){var t=o[n];m.prototype[n]=function(){return P(this,t.apply(this._wrapped,arguments))}}),m.prototype.value=function(){return this._wrapped},m.prototype.valueOf=m.prototype.toJSON=m.prototype.value,m.prototype.toString=function(){return""+this._wrapped},"function"==typeof define&&define.amd&&define("underscore",[],function(){return m})}).call(this);
|
6
|
+
//# sourceMappingURL=underscore-min.map
|
Binary file
|
@@ -0,0 +1,169 @@
|
|
1
|
+
|
2
|
+
.upload-wrapper {
|
3
|
+
max-width: 750px;
|
4
|
+
background-color: #E4E4E4;
|
5
|
+
padding: 10px;
|
6
|
+
margin: 30px auto 0px;
|
7
|
+
border: 1px solid #DADADA;
|
8
|
+
box-shadow: 1px 2px 8px rgba(0, 0, 0, 0.14);
|
9
|
+
-webkit-box-shadow: 1px 2px 8px rgba(0, 0, 0, 0.14);
|
10
|
+
-moz-box-box-shadow: 1px 2px 8px rgba(0, 0, 0, 0.14);
|
11
|
+
}
|
12
|
+
|
13
|
+
|
14
|
+
.song-form-wrapper {
|
15
|
+
max-width: 800px;
|
16
|
+
padding: 10px;
|
17
|
+
margin: 30px auto 0px;
|
18
|
+
}
|
19
|
+
#dropzone{
|
20
|
+
border: 1px solid #C7C7C7;
|
21
|
+
padding: 20px;
|
22
|
+
text-align: center;
|
23
|
+
box-shadow: inset 0px 0px 12px rgba(0, 0, 0, 0.12);
|
24
|
+
-webkit-box-shadow: inset 0px 0px 12px rgba(0, 0, 0, 0.12);
|
25
|
+
-moz-box-box-shadow: inset 0px 0px 12px rgba(0, 0, 0, 0.12);
|
26
|
+
border-radius: 3px;
|
27
|
+
}
|
28
|
+
#dropzone i{
|
29
|
+
display: block;
|
30
|
+
font-size: small;
|
31
|
+
margin-bottom: 5px;
|
32
|
+
color: #CACACA;
|
33
|
+
text-shadow: 1px 1px 1px #fff;
|
34
|
+
}
|
35
|
+
.input-file {
|
36
|
+
position: relative;
|
37
|
+
overflow: hidden;
|
38
|
+
}
|
39
|
+
.input-file input[type=file] {
|
40
|
+
position: absolute;
|
41
|
+
top: 0;
|
42
|
+
right: 0;
|
43
|
+
min-width: 100%;
|
44
|
+
min-height: 100%;
|
45
|
+
font-size: 100px;
|
46
|
+
text-align: right;
|
47
|
+
filter: alpha(opacity=0);
|
48
|
+
-ms-filter: 'alpha(opacity=0)';
|
49
|
+
opacity: 0;
|
50
|
+
outline: none;
|
51
|
+
background: white;
|
52
|
+
cursor: pointer;
|
53
|
+
display: block;
|
54
|
+
}
|
55
|
+
.button{
|
56
|
+
position: relative;
|
57
|
+
overflow: hidden;
|
58
|
+
font-family: inherit;
|
59
|
+
padding: .5em 1em;
|
60
|
+
color: #444;
|
61
|
+
color: rgba(0,0,0,.8);
|
62
|
+
border: 1px solid #999;
|
63
|
+
border: 0 rgba(0,0,0,0);
|
64
|
+
text-decoration: none;
|
65
|
+
border-radius: 2px;
|
66
|
+
display: inline-block;
|
67
|
+
color: #fff;
|
68
|
+
font-size: 0.8em;
|
69
|
+
margin-left: 2px;
|
70
|
+
}
|
71
|
+
.button:hover{
|
72
|
+
box-shadow: inset 0 0 8px rgba(0, 0, 0, 0.4);
|
73
|
+
-webkit-box-shadow: inset 0 0 8px rgba(0, 0, 0, 0.4);
|
74
|
+
-moz-box-box-shadow: inset 0 0 8px rgba(0, 0, 0, 0.4);
|
75
|
+
}
|
76
|
+
.button:disabled{
|
77
|
+
background-color: #D4D4D4;
|
78
|
+
color: #B1B1B1;
|
79
|
+
text-shadow: 1px 1px 1px rgba(255, 255, 255, 0.52);
|
80
|
+
box-shadow:none;
|
81
|
+
-moz-box-box-shadow:none;
|
82
|
+
-webkit-box-shadow:none;
|
83
|
+
}
|
84
|
+
.btn-blue{
|
85
|
+
background-color: #468296;
|
86
|
+
}
|
87
|
+
.btn-red{
|
88
|
+
background-color: #EA6363;
|
89
|
+
}
|
90
|
+
.file-row {
|
91
|
+
padding: 10px;
|
92
|
+
background-color: #DCDCDC;
|
93
|
+
margin-top: 5px;
|
94
|
+
box-shadow: inset 0px 0px 12px rgba(0, 0, 0, 0.04);
|
95
|
+
-webkit-box-shadow: inset 0px 0px 12px rgba(0, 0, 0, 0.04);
|
96
|
+
-moz-box-box-shadow: inset 0px 0px 12px rgba(0, 0, 0, 0.04);
|
97
|
+
border: 1px solid #CECECE;
|
98
|
+
min-height:100px;
|
99
|
+
}
|
100
|
+
.file-row video{
|
101
|
+
width:100%;
|
102
|
+
}
|
103
|
+
.file-row audio{
|
104
|
+
width:100%;
|
105
|
+
}
|
106
|
+
.file-row .file-row-text{
|
107
|
+
text-align:right;
|
108
|
+
}
|
109
|
+
.file-row .file-remove{
|
110
|
+
float: right;
|
111
|
+
margin-top: -6px;
|
112
|
+
text-decoration: none;
|
113
|
+
color:#848484;
|
114
|
+
}
|
115
|
+
.file-uploaded{
|
116
|
+
background-color: #D2D6E0;
|
117
|
+
}
|
118
|
+
.file-row canvas{
|
119
|
+
float: left;
|
120
|
+
margin-right: 10px;
|
121
|
+
}
|
122
|
+
.file-row span {
|
123
|
+
display: block;
|
124
|
+
font-size: small;
|
125
|
+
color: #848484;
|
126
|
+
margin-bottom: 4px;
|
127
|
+
max-width: 500px;
|
128
|
+
overflow: hidden;
|
129
|
+
max-height: 16px;
|
130
|
+
}
|
131
|
+
.progress{
|
132
|
+
height: 18px;
|
133
|
+
overflow: hidden;
|
134
|
+
display: none;
|
135
|
+
padding: 1px;
|
136
|
+
width: 300px;
|
137
|
+
border-radius: 10px;
|
138
|
+
float: right;
|
139
|
+
}
|
140
|
+
.progress .progress-bar {
|
141
|
+
background-color: rgba(67, 196, 218, 0.99);
|
142
|
+
width: 0;
|
143
|
+
height: 18px;
|
144
|
+
float: left;
|
145
|
+
text-align: center;
|
146
|
+
border-radius: 10px;
|
147
|
+
font-size: 9px;
|
148
|
+
box-shadow: inset 0px 0px 9px rgba(49, 74, 56, 0.42);
|
149
|
+
-webkit-box-shadow: inset 0px 0px 9px rgba(49, 74, 56, 0.42);
|
150
|
+
-moz-box-box-shadow: inset 0px 0px 9px rgba(49, 74, 56, 0.42);
|
151
|
+
}
|
152
|
+
#error_output{
|
153
|
+
color: red;
|
154
|
+
}
|
155
|
+
.text-danger, .text-success{
|
156
|
+
float: left;
|
157
|
+
margin-top: -10px;
|
158
|
+
font-style: italic;
|
159
|
+
}
|
160
|
+
.text-danger {
|
161
|
+
color: #F00!important;
|
162
|
+
}
|
163
|
+
.text-success{
|
164
|
+
color: #0CAF00!important;
|
165
|
+
}
|
166
|
+
|
167
|
+
.inner-content {
|
168
|
+
margin-bottom: 60px;
|
169
|
+
}
|
@@ -0,0 +1,199 @@
|
|
1
|
+
.toast-title {
|
2
|
+
font-weight: bold;
|
3
|
+
}
|
4
|
+
.toast-message {
|
5
|
+
-ms-word-wrap: break-word;
|
6
|
+
word-wrap: break-word;
|
7
|
+
}
|
8
|
+
.toast-message a,
|
9
|
+
.toast-message label {
|
10
|
+
color: #ffffff;
|
11
|
+
}
|
12
|
+
.toast-message a:hover {
|
13
|
+
color: #cccccc;
|
14
|
+
text-decoration: none;
|
15
|
+
}
|
16
|
+
.toast-close-button {
|
17
|
+
position: relative;
|
18
|
+
right: -0.3em;
|
19
|
+
top: -0.3em;
|
20
|
+
float: right;
|
21
|
+
font-size: 20px;
|
22
|
+
font-weight: bold;
|
23
|
+
color: #ffffff;
|
24
|
+
-webkit-text-shadow: 0 1px 0 #ffffff;
|
25
|
+
text-shadow: 0 1px 0 #ffffff;
|
26
|
+
opacity: 0.8;
|
27
|
+
-ms-filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=80);
|
28
|
+
filter: alpha(opacity=80);
|
29
|
+
}
|
30
|
+
.toast-close-button:hover,
|
31
|
+
.toast-close-button:focus {
|
32
|
+
color: #000000;
|
33
|
+
text-decoration: none;
|
34
|
+
cursor: pointer;
|
35
|
+
opacity: 0.4;
|
36
|
+
-ms-filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=40);
|
37
|
+
filter: alpha(opacity=40);
|
38
|
+
}
|
39
|
+
/*Additional properties for button version
|
40
|
+
iOS requires the button element instead of an anchor tag.
|
41
|
+
If you want the anchor version, it requires `href="#"`.*/
|
42
|
+
button.toast-close-button {
|
43
|
+
padding: 0;
|
44
|
+
cursor: pointer;
|
45
|
+
background: transparent;
|
46
|
+
border: 0;
|
47
|
+
-webkit-appearance: none;
|
48
|
+
}
|
49
|
+
.toast-top-center {
|
50
|
+
top: 0;
|
51
|
+
right: 0;
|
52
|
+
width: 100%;
|
53
|
+
}
|
54
|
+
.toast-bottom-center {
|
55
|
+
bottom: 0;
|
56
|
+
right: 0;
|
57
|
+
width: 100%;
|
58
|
+
}
|
59
|
+
.toast-top-full-width {
|
60
|
+
top: 0;
|
61
|
+
right: 0;
|
62
|
+
width: 100%;
|
63
|
+
}
|
64
|
+
.toast-bottom-full-width {
|
65
|
+
bottom: 0;
|
66
|
+
right: 0;
|
67
|
+
width: 100%;
|
68
|
+
}
|
69
|
+
.toast-top-left {
|
70
|
+
top: 12px;
|
71
|
+
left: 12px;
|
72
|
+
}
|
73
|
+
.toast-top-right {
|
74
|
+
top: 60px;
|
75
|
+
right: 12px;
|
76
|
+
}
|
77
|
+
.toast-bottom-right {
|
78
|
+
right: 12px;
|
79
|
+
bottom: 12px;
|
80
|
+
}
|
81
|
+
.toast-bottom-left {
|
82
|
+
bottom: 12px;
|
83
|
+
left: 12px;
|
84
|
+
}
|
85
|
+
#toast-container {
|
86
|
+
position: fixed;
|
87
|
+
z-index: 999999;
|
88
|
+
/*overrides*/
|
89
|
+
|
90
|
+
}
|
91
|
+
#toast-container * {
|
92
|
+
-moz-box-sizing: border-box;
|
93
|
+
-webkit-box-sizing: border-box;
|
94
|
+
box-sizing: border-box;
|
95
|
+
}
|
96
|
+
#toast-container > div {
|
97
|
+
position: relative;
|
98
|
+
overflow: hidden;
|
99
|
+
margin: 0 0 6px;
|
100
|
+
padding: 15px 15px 15px 50px;
|
101
|
+
width: 300px;
|
102
|
+
-moz-border-radius: 3px 3px 3px 3px;
|
103
|
+
-webkit-border-radius: 3px 3px 3px 3px;
|
104
|
+
border-radius: 3px 3px 3px 3px;
|
105
|
+
background-position: 15px center;
|
106
|
+
background-repeat: no-repeat;
|
107
|
+
-moz-box-shadow: 0 0 12px #999999;
|
108
|
+
-webkit-box-shadow: 0 0 12px #999999;
|
109
|
+
box-shadow: 0 0 12px #999999;
|
110
|
+
color: #ffffff;
|
111
|
+
opacity: 0.8;
|
112
|
+
-ms-filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=80);
|
113
|
+
filter: alpha(opacity=80);
|
114
|
+
}
|
115
|
+
#toast-container > :hover {
|
116
|
+
-moz-box-shadow: 0 0 12px #000000;
|
117
|
+
-webkit-box-shadow: 0 0 12px #000000;
|
118
|
+
box-shadow: 0 0 12px #000000;
|
119
|
+
opacity: 1;
|
120
|
+
-ms-filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=100);
|
121
|
+
filter: alpha(opacity=100);
|
122
|
+
cursor: pointer;
|
123
|
+
}
|
124
|
+
#toast-container > .toast-info {
|
125
|
+
background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAGwSURBVEhLtZa9SgNBEMc9sUxxRcoUKSzSWIhXpFMhhYWFhaBg4yPYiWCXZxBLERsLRS3EQkEfwCKdjWJAwSKCgoKCcudv4O5YLrt7EzgXhiU3/4+b2ckmwVjJSpKkQ6wAi4gwhT+z3wRBcEz0yjSseUTrcRyfsHsXmD0AmbHOC9Ii8VImnuXBPglHpQ5wwSVM7sNnTG7Za4JwDdCjxyAiH3nyA2mtaTJufiDZ5dCaqlItILh1NHatfN5skvjx9Z38m69CgzuXmZgVrPIGE763Jx9qKsRozWYw6xOHdER+nn2KkO+Bb+UV5CBN6WC6QtBgbRVozrahAbmm6HtUsgtPC19tFdxXZYBOfkbmFJ1VaHA1VAHjd0pp70oTZzvR+EVrx2Ygfdsq6eu55BHYR8hlcki+n+kERUFG8BrA0BwjeAv2M8WLQBtcy+SD6fNsmnB3AlBLrgTtVW1c2QN4bVWLATaIS60J2Du5y1TiJgjSBvFVZgTmwCU+dAZFoPxGEEs8nyHC9Bwe2GvEJv2WXZb0vjdyFT4Cxk3e/kIqlOGoVLwwPevpYHT+00T+hWwXDf4AJAOUqWcDhbwAAAAASUVORK5CYII=") !important;
|
126
|
+
}
|
127
|
+
#toast-container > .toast-error {
|
128
|
+
background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAHOSURBVEhLrZa/SgNBEMZzh0WKCClSCKaIYOED+AAKeQQLG8HWztLCImBrYadgIdY+gIKNYkBFSwu7CAoqCgkkoGBI/E28PdbLZmeDLgzZzcx83/zZ2SSXC1j9fr+I1Hq93g2yxH4iwM1vkoBWAdxCmpzTxfkN2RcyZNaHFIkSo10+8kgxkXIURV5HGxTmFuc75B2RfQkpxHG8aAgaAFa0tAHqYFfQ7Iwe2yhODk8+J4C7yAoRTWI3w/4klGRgR4lO7Rpn9+gvMyWp+uxFh8+H+ARlgN1nJuJuQAYvNkEnwGFck18Er4q3egEc/oO+mhLdKgRyhdNFiacC0rlOCbhNVz4H9FnAYgDBvU3QIioZlJFLJtsoHYRDfiZoUyIxqCtRpVlANq0EU4dApjrtgezPFad5S19Wgjkc0hNVnuF4HjVA6C7QrSIbylB+oZe3aHgBsqlNqKYH48jXyJKMuAbiyVJ8KzaB3eRc0pg9VwQ4niFryI68qiOi3AbjwdsfnAtk0bCjTLJKr6mrD9g8iq/S/B81hguOMlQTnVyG40wAcjnmgsCNESDrjme7wfftP4P7SP4N3CJZdvzoNyGq2c/HWOXJGsvVg+RA/k2MC/wN6I2YA2Pt8GkAAAAASUVORK5CYII=") !important;
|
129
|
+
}
|
130
|
+
#toast-container > .toast-success {
|
131
|
+
background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAADsSURBVEhLY2AYBfQMgf///3P8+/evAIgvA/FsIF+BavYDDWMBGroaSMMBiE8VC7AZDrIFaMFnii3AZTjUgsUUWUDA8OdAH6iQbQEhw4HyGsPEcKBXBIC4ARhex4G4BsjmweU1soIFaGg/WtoFZRIZdEvIMhxkCCjXIVsATV6gFGACs4Rsw0EGgIIH3QJYJgHSARQZDrWAB+jawzgs+Q2UO49D7jnRSRGoEFRILcdmEMWGI0cm0JJ2QpYA1RDvcmzJEWhABhD/pqrL0S0CWuABKgnRki9lLseS7g2AlqwHWQSKH4oKLrILpRGhEQCw2LiRUIa4lwAAAABJRU5ErkJggg==") !important;
|
132
|
+
}
|
133
|
+
#toast-container > .toast-warning {
|
134
|
+
background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAGYSURBVEhL5ZSvTsNQFMbXZGICMYGYmJhAQIJAICYQPAACiSDB8AiICQQJT4CqQEwgJvYASAQCiZiYmJhAIBATCARJy+9rTsldd8sKu1M0+dLb057v6/lbq/2rK0mS/TRNj9cWNAKPYIJII7gIxCcQ51cvqID+GIEX8ASG4B1bK5gIZFeQfoJdEXOfgX4QAQg7kH2A65yQ87lyxb27sggkAzAuFhbbg1K2kgCkB1bVwyIR9m2L7PRPIhDUIXgGtyKw575yz3lTNs6X4JXnjV+LKM/m3MydnTbtOKIjtz6VhCBq4vSm3ncdrD2lk0VgUXSVKjVDJXJzijW1RQdsU7F77He8u68koNZTz8Oz5yGa6J3H3lZ0xYgXBK2QymlWWA+RWnYhskLBv2vmE+hBMCtbA7KX5drWyRT/2JsqZ2IvfB9Y4bWDNMFbJRFmC9E74SoS0CqulwjkC0+5bpcV1CZ8NMej4pjy0U+doDQsGyo1hzVJttIjhQ7GnBtRFN1UarUlH8F3xict+HY07rEzoUGPlWcjRFRr4/gChZgc3ZL2d8oAAAAASUVORK5CYII=") !important;
|
135
|
+
}
|
136
|
+
#toast-container.toast-top-center > div,
|
137
|
+
#toast-container.toast-bottom-center > div {
|
138
|
+
width: 300px;
|
139
|
+
margin: auto;
|
140
|
+
}
|
141
|
+
#toast-container.toast-top-full-width > div,
|
142
|
+
#toast-container.toast-bottom-full-width > div {
|
143
|
+
width: 96%;
|
144
|
+
margin: auto;
|
145
|
+
}
|
146
|
+
.toast {
|
147
|
+
background-color: #030303;
|
148
|
+
}
|
149
|
+
.toast-success {
|
150
|
+
background-color: #51a351;
|
151
|
+
}
|
152
|
+
.toast-error {
|
153
|
+
background-color: #bd362f;
|
154
|
+
}
|
155
|
+
.toast-info {
|
156
|
+
background-color: #2f96b4;
|
157
|
+
}
|
158
|
+
.toast-warning {
|
159
|
+
background-color: #f89406;
|
160
|
+
}
|
161
|
+
|
162
|
+
.toast-progress {
|
163
|
+
position: absolute;
|
164
|
+
left: 0;
|
165
|
+
bottom: 0;
|
166
|
+
height: 4px;
|
167
|
+
background-color: #000000;
|
168
|
+
opacity: 0.7;
|
169
|
+
-ms-filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=40);
|
170
|
+
filter: alpha(opacity=40);
|
171
|
+
}
|
172
|
+
|
173
|
+
/*Responsive Design*/
|
174
|
+
@media all and (max-width: 240px) {
|
175
|
+
#toast-container > div {
|
176
|
+
padding: 8px 8px 8px 50px;
|
177
|
+
width: 11em;
|
178
|
+
}
|
179
|
+
#toast-container .toast-close-button {
|
180
|
+
right: -0.2em;
|
181
|
+
top: -0.2em;
|
182
|
+
}
|
183
|
+
}
|
184
|
+
@media all and (min-width: 241px) and (max-width: 480px) {
|
185
|
+
#toast-container > div {
|
186
|
+
padding: 8px 8px 8px 50px;
|
187
|
+
width: 18em;
|
188
|
+
}
|
189
|
+
#toast-container .toast-close-button {
|
190
|
+
right: -0.2em;
|
191
|
+
top: -0.2em;
|
192
|
+
}
|
193
|
+
}
|
194
|
+
@media all and (min-width: 481px) and (max-width: 768px) {
|
195
|
+
#toast-container > div {
|
196
|
+
padding: 15px 15px 15px 50px;
|
197
|
+
width: 25em;
|
198
|
+
}
|
199
|
+
}
|
metadata
ADDED
@@ -0,0 +1,95 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: aflash
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.1.1
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Tauqeer Ahmad
|
8
|
+
autorequire:
|
9
|
+
bindir: exe
|
10
|
+
cert_chain: []
|
11
|
+
date: 2016-06-01 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: bundler
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '1.11'
|
20
|
+
type: :development
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '1.11'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: rake
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - "~>"
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '10.0'
|
34
|
+
type: :development
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - "~>"
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '10.0'
|
41
|
+
description: AFlash displays flash messages on ajax calls.
|
42
|
+
email:
|
43
|
+
- tauqeer.ahmad2008@gmail.com
|
44
|
+
executables: []
|
45
|
+
extensions: []
|
46
|
+
extra_rdoc_files: []
|
47
|
+
files:
|
48
|
+
- ".DS_Store"
|
49
|
+
- ".gitignore"
|
50
|
+
- CODE_OF_CONDUCT.md
|
51
|
+
- Gemfile
|
52
|
+
- LICENSE.txt
|
53
|
+
- README.md
|
54
|
+
- Rakefile
|
55
|
+
- aflash.gemspec
|
56
|
+
- bin/console
|
57
|
+
- bin/setup
|
58
|
+
- lib/aflash.rb
|
59
|
+
- lib/aflash/version.rb
|
60
|
+
- vendor/.DS_Store
|
61
|
+
- vendor/assets/.DS_Store
|
62
|
+
- vendor/assets/javascripts/.DS_Store
|
63
|
+
- vendor/assets/javascripts/ajax_flash.js
|
64
|
+
- vendor/assets/javascripts/flash.js
|
65
|
+
- vendor/assets/javascripts/toastr.min.js
|
66
|
+
- vendor/assets/javascripts/underscore-min.js
|
67
|
+
- vendor/assets/stylesheets/.DS_Store
|
68
|
+
- vendor/assets/stylesheets/flash.css
|
69
|
+
- vendor/assets/stylesheets/style.css
|
70
|
+
- vendor/assets/stylesheets/toastr.scss
|
71
|
+
homepage: https://github.com/tauqeer-ahmad/aflash
|
72
|
+
licenses:
|
73
|
+
- MIT
|
74
|
+
metadata: {}
|
75
|
+
post_install_message:
|
76
|
+
rdoc_options: []
|
77
|
+
require_paths:
|
78
|
+
- lib
|
79
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
80
|
+
requirements:
|
81
|
+
- - ">="
|
82
|
+
- !ruby/object:Gem::Version
|
83
|
+
version: '0'
|
84
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
85
|
+
requirements:
|
86
|
+
- - ">="
|
87
|
+
- !ruby/object:Gem::Version
|
88
|
+
version: '0'
|
89
|
+
requirements: []
|
90
|
+
rubyforge_project:
|
91
|
+
rubygems_version: 2.4.8
|
92
|
+
signing_key:
|
93
|
+
specification_version: 4
|
94
|
+
summary: AFlash displays flash messages on ajax calls.
|
95
|
+
test_files: []
|