wordjelly-auth 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/MIT-LICENSE +20 -0
- data/README.rdoc +3 -0
- data/Rakefile +35 -0
- data/app/assets/images/auth/activity.jpg +0 -0
- data/app/assets/images/auth/facebook.svg +1 -0
- data/app/assets/images/auth/google_oauth2.svg +1 -0
- data/app/assets/images/auth/js_pic3.jpg +0 -0
- data/app/assets/images/auth/profile.jpg +0 -0
- data/app/assets/javascripts/auth/admin_create_users.js +2 -0
- data/app/assets/javascripts/auth/application.js +20 -0
- data/app/assets/javascripts/auth/auth_dependencies.js +12 -0
- data/app/assets/javascripts/auth/auth_modals_and_navbar.js +218 -0
- data/app/assets/javascripts/auth/clients.js +2 -0
- data/app/assets/javascripts/auth/search.js +2 -0
- data/app/assets/javascripts/auth/shopping/discounts.js +2 -0
- data/app/assets/javascripts/auth/users/profiles.js +188 -0
- data/app/assets/stylesheets/auth/admin_create_users.css +4 -0
- data/app/assets/stylesheets/auth/application.scss +14 -0
- data/app/assets/stylesheets/auth/auth_default_css.scss +13 -0
- data/app/assets/stylesheets/auth/common-styles.scss +579 -0
- data/app/assets/stylesheets/auth/overrides.scss +26 -0
- data/app/assets/stylesheets/auth/search.css +4 -0
- data/app/assets/stylesheets/auth/shopping/discounts.css +4 -0
- data/app/assets/stylesheets/auth/users/profiles.scss +40 -0
- data/app/assets/stylesheets/scaffold.css +56 -0
- data/app/controllers/auth/admin_create_users_controller.rb +89 -0
- data/app/controllers/auth/application_controller.rb +97 -0
- data/app/controllers/auth/clients_controller.rb +105 -0
- data/app/controllers/auth/concerns/activity_controller_concern.rb +32 -0
- data/app/controllers/auth/concerns/devise_concern.rb +193 -0
- data/app/controllers/auth/concerns/omni_concern.rb +310 -0
- data/app/controllers/auth/concerns/otp_concern.rb +251 -0
- data/app/controllers/auth/concerns/shopping/cart_controller_concern.rb +105 -0
- data/app/controllers/auth/concerns/shopping/cart_item_controller_concern.rb +150 -0
- data/app/controllers/auth/concerns/shopping/discount_controller_concern.rb +97 -0
- data/app/controllers/auth/concerns/shopping/pay_u_money_controller_concern.rb +38 -0
- data/app/controllers/auth/concerns/shopping/payment_controller_concern.rb +101 -0
- data/app/controllers/auth/concerns/shopping/product_controller_concern.rb +68 -0
- data/app/controllers/auth/concerns/token_concern.rb +187 -0
- data/app/controllers/auth/confirmations_controller.rb +3 -0
- data/app/controllers/auth/mailgun_controller.rb +8 -0
- data/app/controllers/auth/omniauth_callbacks_controller.rb +6 -0
- data/app/controllers/auth/passwords_controller.rb +4 -0
- data/app/controllers/auth/profiles_controller.rb +156 -0
- data/app/controllers/auth/registrations_controller.rb +99 -0
- data/app/controllers/auth/search_controller.rb +61 -0
- data/app/controllers/auth/sessions_controller.rb +20 -0
- data/app/controllers/auth/shopping/cart_items_controller.rb +14 -0
- data/app/controllers/auth/shopping/carts_controller.rb +13 -0
- data/app/controllers/auth/shopping/discounts_controller.rb +19 -0
- data/app/controllers/auth/shopping/payments_controller.rb +13 -0
- data/app/controllers/auth/shopping/products_controller.rb +17 -0
- data/app/controllers/auth/shopping/shopping_controller.rb +86 -0
- data/app/controllers/auth/unlocks_controller.rb +3 -0
- data/app/controllers/auth/webhooks_controller.rb +3 -0
- data/app/helpers/auth/admin_create_users_helper.rb +2 -0
- data/app/helpers/auth/application_helper.rb +136 -0
- data/app/helpers/auth/clients_helper.rb +4 -0
- data/app/helpers/auth/resource_helper.rb +10 -0
- data/app/helpers/auth/search_helper.rb +2 -0
- data/app/helpers/auth/shopping/cart_items/cart_items_helper.rb +29 -0
- data/app/helpers/auth/shopping/carts/carts_helper.rb +25 -0
- data/app/helpers/auth/shopping/discounts/discounts_helper.rb +39 -0
- data/app/helpers/auth/shopping/payments/pay_u_money_helper.rb +56 -0
- data/app/helpers/auth/shopping/payments/payments_helper.rb +54 -0
- data/app/helpers/auth/shopping/products/products_helper.rb +52 -0
- data/app/helpers/auth/shopping/shopping_helper.rb +3 -0
- data/app/helpers/auth/users/profiles_helper.rb +12 -0
- data/app/jobs/otp_job.rb +92 -0
- data/app/mailers/application_mailer.rb +4 -0
- data/app/mailers/auth/notifier.rb +9 -0
- data/app/models/auth/admin_create_user.rb +3 -0
- data/app/models/auth/client.rb +52 -0
- data/app/models/auth/concerns/activity_concern.rb +112 -0
- data/app/models/auth/concerns/chief_model_concern.rb +73 -0
- data/app/models/auth/concerns/es_concern.rb +21 -0
- data/app/models/auth/concerns/notification_concern.rb +232 -0
- data/app/models/auth/concerns/notification_response_concern.rb +71 -0
- data/app/models/auth/concerns/owner_concern.rb +81 -0
- data/app/models/auth/concerns/shopping/cart_concern.rb +329 -0
- data/app/models/auth/concerns/shopping/cart_item_concern.rb +437 -0
- data/app/models/auth/concerns/shopping/discount_concern.rb +482 -0
- data/app/models/auth/concerns/shopping/discount_flow.txt +11 -0
- data/app/models/auth/concerns/shopping/pay_u_money_concern.rb +184 -0
- data/app/models/auth/concerns/shopping/payment_concern.rb +613 -0
- data/app/models/auth/concerns/shopping/product_concern.rb +102 -0
- data/app/models/auth/concerns/sms_otp_concern.rb +68 -0
- data/app/models/auth/concerns/user_concern.rb +788 -0
- data/app/models/auth/identity.rb +23 -0
- data/app/models/auth/shopping/cart.rb +3 -0
- data/app/models/auth/shopping/cart_item.rb +6 -0
- data/app/models/auth/shopping/cart_item_payment_result.rb +7 -0
- data/app/models/auth/shopping/discount.rb +4 -0
- data/app/models/auth/shopping/payment.rb +5 -0
- data/app/models/auth/shopping/product.rb +5 -0
- data/app/models/auth/user.rb +3 -0
- data/app/views/auth/admin_create_users/_admin_actions.html.erb +46 -0
- data/app/views/auth/admin_create_users/_form.html.erb +19 -0
- data/app/views/auth/admin_create_users/edit.html.erb +6 -0
- data/app/views/auth/admin_create_users/index.html.erb +25 -0
- data/app/views/auth/admin_create_users/new.html.erb +5 -0
- data/app/views/auth/admin_create_users/show.html.erb +8 -0
- data/app/views/auth/clients/_form.html.erb +41 -0
- data/app/views/auth/clients/edit.html.erb +6 -0
- data/app/views/auth/clients/index.html.erb +33 -0
- data/app/views/auth/clients/new.html.erb +5 -0
- data/app/views/auth/clients/show.html.erb +21 -0
- data/app/views/auth/confirmations/_enter_otp.html.erb +27 -0
- data/app/views/auth/confirmations/_get_otp_status.html.erb +25 -0
- data/app/views/auth/confirmations/_new_otp_input.js.erb +11 -0
- data/app/views/auth/confirmations/_resend_otp.js.erb +8 -0
- data/app/views/auth/confirmations/_resend_sms_otp.html.erb +18 -0
- data/app/views/auth/confirmations/_verify_otp.js.erb +64 -0
- data/app/views/auth/confirmations/create.js.erb +8 -0
- data/app/views/auth/confirmations/enter_otp.html.erb +7 -0
- data/app/views/auth/confirmations/get_otp_status.html.erb +3 -0
- data/app/views/auth/confirmations/new.html.erb +1 -0
- data/app/views/auth/confirmations/new.js.erb +16 -0
- data/app/views/auth/confirmations/otp_status_result.html.erb +20 -0
- data/app/views/auth/mailer/confirmation_instructions.html.erb +5 -0
- data/app/views/auth/mailer/password_change.html.erb +3 -0
- data/app/views/auth/mailer/reset_password_instructions.html.erb +8 -0
- data/app/views/auth/mailer/unlock_instructions.html.erb +7 -0
- data/app/views/auth/modals/_ajax_error_modal.html.erb +3 -0
- data/app/views/auth/modals/_ajax_error_modal_content.html.erb +0 -0
- data/app/views/auth/modals/_edit_account_content.html.erb +68 -0
- data/app/views/auth/modals/_edit_account_success_content.html.erb +5 -0
- data/app/views/auth/modals/_error_notification.html.erb +8 -0
- data/app/views/auth/modals/_forgot_password_content.html.erb +18 -0
- data/app/views/auth/modals/_forgot_password_success_content.html.erb +8 -0
- data/app/views/auth/modals/_login_default_content.html.erb +3 -0
- data/app/views/auth/modals/_login_forms.html.erb +13 -0
- data/app/views/auth/modals/_login_navigation_options.html.erb +12 -0
- data/app/views/auth/modals/_new_otp_input.html.erb +28 -0
- data/app/views/auth/modals/_oauth_and_submit.html.erb +21 -0
- data/app/views/auth/modals/_recaptcha_tags.html.erb +4 -0
- data/app/views/auth/modals/_resend_confirmation_content.html.erb +17 -0
- data/app/views/auth/modals/_resend_confirmation_success_content.html.erb +8 -0
- data/app/views/auth/modals/_resend_otp.html.erb +23 -0
- data/app/views/auth/modals/_resource_errors.js.erb +24 -0
- data/app/views/auth/modals/_sign_in_inputs.html.erb +10 -0
- data/app/views/auth/modals/_sign_in_needed_modal.html.erb +3 -0
- data/app/views/auth/modals/_sign_in_success_content.html.erb +5 -0
- data/app/views/auth/modals/_sign_up_inputs.html.erb +9 -0
- data/app/views/auth/modals/_sign_up_success_content.html.erb +1 -0
- data/app/views/auth/modals/_sign_up_success_inactive_content.html.erb +2 -0
- data/app/views/auth/modals/_unlock_content.html.erb +17 -0
- data/app/views/auth/modals/_verify_otp.html.erb +1 -0
- data/app/views/auth/modals/base_modal/_base.html.erb +25 -0
- data/app/views/auth/modals/login.js.erb +120 -0
- data/app/views/auth/modals/unlock_success_content.html.erb +8 -0
- data/app/views/auth/notifier/_email.html.erb +3 -0
- data/app/views/auth/notifier/notification.html.erb +2 -0
- data/app/views/auth/notifier/notification.text.erb +1 -0
- data/app/views/auth/omniauth_callbacks/failure.html.erb +4 -0
- data/app/views/auth/passwords/create.js.erb +12 -0
- data/app/views/auth/passwords/edit.html.erb +25 -0
- data/app/views/auth/passwords/new.html.erb +16 -0
- data/app/views/auth/passwords/new.js.erb +19 -0
- data/app/views/auth/profiles/_proxy_resource.html.erb +5 -0
- data/app/views/auth/profiles/set_proxy_resource.js.erb +1 -0
- data/app/views/auth/profiles/show.html.erb +8 -0
- data/app/views/auth/registrations/create.js.erb +40 -0
- data/app/views/auth/registrations/edit.html.erb +2 -0
- data/app/views/auth/registrations/edit.js.erb +5 -0
- data/app/views/auth/registrations/new.html.erb +33 -0
- data/app/views/auth/registrations/update.js.erb +47 -0
- data/app/views/auth/search/_search_bar.html.erb +11 -0
- data/app/views/auth/search/_search_result.html.erb +7 -0
- data/app/views/auth/search/_search_results.html.erb +4 -0
- data/app/views/auth/search/authenticated_user_search.js.erb +45 -0
- data/app/views/auth/search/authenticated_user_search.json +7 -0
- data/app/views/auth/sessions/create.js.erb +5 -0
- data/app/views/auth/sessions/new.html.erb +4 -0
- data/app/views/auth/sessions/new.js.erb +20 -0
- data/app/views/auth/shared/_devise_error_messages.html.erb +9 -0
- data/app/views/auth/shared/_links.html.erb +25 -0
- data/app/views/auth/shared/_object_errors.html.erb +12 -0
- data/app/views/auth/shared/_proxy_resource.html.erb +18 -0
- data/app/views/auth/shopping/cart_items/_form.html.erb +34 -0
- data/app/views/auth/shopping/cart_items/_show_cart_items_collection.html.erb +31 -0
- data/app/views/auth/shopping/cart_items/create_multiple.html.erb +6 -0
- data/app/views/auth/shopping/cart_items/create_multiple.json.erb +9 -0
- data/app/views/auth/shopping/cart_items/edit.html.erb +6 -0
- data/app/views/auth/shopping/cart_items/index.html.erb +52 -0
- data/app/views/auth/shopping/cart_items/new.html.erb +5 -0
- data/app/views/auth/shopping/cart_items/show.html.erb +13 -0
- data/app/views/auth/shopping/carts/_form.html.erb +35 -0
- data/app/views/auth/shopping/carts/_payment_links.html.erb +27 -0
- data/app/views/auth/shopping/carts/_remove_cart_item.html.erb +11 -0
- data/app/views/auth/shopping/carts/_show_cart_balance_info.html.erb +35 -0
- data/app/views/auth/shopping/carts/edit.html.erb +6 -0
- data/app/views/auth/shopping/carts/index.html.erb +43 -0
- data/app/views/auth/shopping/carts/new.html.erb +5 -0
- data/app/views/auth/shopping/carts/show.html.erb +46 -0
- data/app/views/auth/shopping/discounts/_form.html.erb +18 -0
- data/app/views/auth/shopping/discounts/_form_for_create_multiple_cart_items.html.erb +17 -0
- data/app/views/auth/shopping/discounts/_show_pending_discount_request.html.erb +17 -0
- data/app/views/auth/shopping/discounts/destroy.html.erb +2 -0
- data/app/views/auth/shopping/discounts/edit.html.erb +29 -0
- data/app/views/auth/shopping/discounts/index.html.erb +40 -0
- data/app/views/auth/shopping/discounts/new.html.erb +1 -0
- data/app/views/auth/shopping/discounts/show.html.erb +18 -0
- data/app/views/auth/shopping/discounts/update.html.erb +2 -0
- data/app/views/auth/shopping/payments/_approve_payment.html.erb +7 -0
- data/app/views/auth/shopping/payments/_cash_card_cheque.html.erb +24 -0
- data/app/views/auth/shopping/payments/_create_discount_coupon.html.erb +5 -0
- data/app/views/auth/shopping/payments/_form.html.erb +19 -0
- data/app/views/auth/shopping/payments/_gateway.html.erb +21 -0
- data/app/views/auth/shopping/payments/_proceed_to_gateway_or_verify_payment.html.erb +18 -0
- data/app/views/auth/shopping/payments/_refresh_payment.html.erb +7 -0
- data/app/views/auth/shopping/payments/_refund.html.erb +10 -0
- data/app/views/auth/shopping/payments/_show_payment_receipt.html.erb +12 -0
- data/app/views/auth/shopping/payments/edit.html.erb +6 -0
- data/app/views/auth/shopping/payments/index.html.erb +43 -0
- data/app/views/auth/shopping/payments/new.html.erb +13 -0
- data/app/views/auth/shopping/payments/show.html.erb +36 -0
- data/app/views/auth/shopping/products/_form.html.erb +27 -0
- data/app/views/auth/shopping/products/edit.html.erb +6 -0
- data/app/views/auth/shopping/products/index.html.erb +48 -0
- data/app/views/auth/shopping/products/index.json.erb +7 -0
- data/app/views/auth/shopping/products/new.html.erb +5 -0
- data/app/views/auth/shopping/products/show.html.erb +12 -0
- data/app/views/auth/shopping/products/show.json.erb +1 -0
- data/app/views/auth/unlocks/create.js.erb +12 -0
- data/app/views/auth/unlocks/new.html.erb +14 -0
- data/app/views/auth/unlocks/new.js.erb +17 -0
- data/app/views/auth/users/_search_result.html.erb +8 -0
- data/app/views/auth/users/profiles/_user_data.html.erb +4 -0
- data/app/views/auth/users/profiles/show.html.erb +54 -0
- data/app/views/layouts/auth/_modals.html.erb +2 -0
- data/app/views/layouts/auth/application.html.erb +17 -0
- data/app/views/layouts/auth/navbar/_navbar.html.erb +49 -0
- data/app/views/layouts/auth/navbar/_personalization.html.erb +17 -0
- data/app/views/layouts/auth/navbar/_progress_spinner.html.erb +11 -0
- data/app/views/layouts/mailer.html.erb +5 -0
- data/app/views/layouts/mailer.text.erb +1 -0
- data/config/initializers/active_model.rb +36 -0
- data/config/initializers/devise.rb +623 -0
- data/config/initializers/json.rb +10 -0
- data/config/initializers/omniauth.rb +447 -0
- data/config/initializers/redis.rb +2 -0
- data/config/initializers/redis.yml +14 -0
- data/config/locales/devise.en.yml +63 -0
- data/config/routes.rb +1 -0
- data/lib/assets/javascripts/data.js +126 -0
- data/lib/assets/javascripts/jquery.calendario.js +394 -0
- data/lib/assets/javascripts/jquery.tagcloud.js +92 -0
- data/lib/assets/javascripts/leanModal.js +236 -0
- data/lib/assets/javascripts/main.js +668 -0
- data/lib/assets/javascripts/modernizr.custom.63321.js +4 -0
- data/lib/assets/javascripts/payumoney.js +9 -0
- data/lib/assets/javascripts/search.js +36 -0
- data/lib/assets/javascripts/spinner.js +77 -0
- data/lib/assets/javascripts/trianglify.min.js +2 -0
- data/lib/assets/javascripts/you_need_to_sign_in.js.erb +478 -0
- data/lib/assets/stylesheets/calendar.css +111 -0
- data/lib/assets/stylesheets/calendar_modifications.scss +276 -0
- data/lib/auth.rb +32 -0
- data/lib/auth/custom_failure.rb +3 -0
- data/lib/auth/engine.rb +231 -0
- data/lib/auth/job_exception_handler.rb +7 -0
- data/lib/auth/mailgun.rb +28 -0
- data/lib/auth/notify.rb +8 -0
- data/lib/auth/omniauth/path.rb +104 -0
- data/lib/auth/partials.rb +12 -0
- data/lib/auth/rails/routes.rb +169 -0
- data/lib/auth/search/main.rb +97 -0
- data/lib/auth/sidekiq_up.rb +16 -0
- data/lib/auth/two_factor_otp.rb +202 -0
- data/lib/auth/url_shortener.rb +29 -0
- data/lib/auth/version.rb +3 -0
- data/lib/tasks/auth_tasks.rake +4 -0
- metadata +863 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 2ffe8282b6ea1d462eb89eed7de030bd648cecfe
|
4
|
+
data.tar.gz: e4757eeffc2769cf55cd05c7bb676997f7f3dd1e
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: cba2dc1e5b1ba17c37b1d27e1d3b5f20f07ed1b037103a15bd010242f90fae3d1fa70822177a47ad4d2ba75cd9f254c56ef20d56369309b76beee09fabb02053
|
7
|
+
data.tar.gz: 19a2b165482a8e50f0f08ef79717ced02c1ebca22798af8431b4f4c283f7563afe81fbb817a68e23f340d8cc85990b8bef6585cf9c51a1dddc86bdca2ddce772
|
data/MIT-LICENSE
ADDED
@@ -0,0 +1,20 @@
|
|
1
|
+
Copyright 2016 bhargav
|
2
|
+
|
3
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
4
|
+
a copy of this software and associated documentation files (the
|
5
|
+
"Software"), to deal in the Software without restriction, including
|
6
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
7
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
8
|
+
permit persons to whom the Software is furnished to do so, subject to
|
9
|
+
the following conditions:
|
10
|
+
|
11
|
+
The above copyright notice and this permission notice shall be
|
12
|
+
included in all copies or substantial portions of the Software.
|
13
|
+
|
14
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
15
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
16
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
17
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
18
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
19
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
20
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/README.rdoc
ADDED
data/Rakefile
ADDED
@@ -0,0 +1,35 @@
|
|
1
|
+
begin
|
2
|
+
require 'bundler/setup'
|
3
|
+
rescue LoadError
|
4
|
+
puts 'You must `gem install bundler` and `bundle install` to run rake tasks'
|
5
|
+
end
|
6
|
+
|
7
|
+
require 'rdoc/task'
|
8
|
+
|
9
|
+
RDoc::Task.new(:rdoc) do |rdoc|
|
10
|
+
rdoc.rdoc_dir = 'rdoc'
|
11
|
+
rdoc.title = 'Auth'
|
12
|
+
rdoc.options << '--line-numbers'
|
13
|
+
rdoc.rdoc_files.include('README.rdoc')
|
14
|
+
rdoc.rdoc_files.include('lib/**/*.rb')
|
15
|
+
end
|
16
|
+
|
17
|
+
|
18
|
+
|
19
|
+
load 'rails/tasks/statistics.rake'
|
20
|
+
|
21
|
+
|
22
|
+
|
23
|
+
Bundler::GemHelper.install_tasks
|
24
|
+
|
25
|
+
require 'rake/testtask'
|
26
|
+
|
27
|
+
Rake::TestTask.new(:test) do |t|
|
28
|
+
t.libs << 'lib'
|
29
|
+
t.libs << 'test'
|
30
|
+
t.pattern = 'test/**/*_test.rb'
|
31
|
+
t.verbose = false
|
32
|
+
end
|
33
|
+
|
34
|
+
|
35
|
+
task default: :test
|
Binary file
|
@@ -0,0 +1 @@
|
|
1
|
+
<?xml version="1.0" ?><svg height="60px" version="1.1" viewBox="0 0 60 60" width="60px" xmlns="http://www.w3.org/2000/svg" xmlns:sketch="http://www.bohemiancoding.com/sketch/ns" xmlns:xlink="http://www.w3.org/1999/xlink"><title/><desc/><defs/><g fill="none" fill-rule="evenodd" id="soical" stroke="none" stroke-width="1"><g id="social" transform="translate(-273.000000, -138.000000)"><g id="slices" transform="translate(173.000000, 138.000000)"/><g fill="#346DA6" id="square-flat" transform="translate(173.000000, 138.000000)"><path d="M102.995937,0 L157.004063,0 C158.658673,0 160,1.33730974 160,2.99593743 L160,57.0040626 C160,58.6586731 158.66269,60 157.004063,60 L102.995937,60 C101.341327,60 100,58.6626903 100,57.0040626 L100,2.99593743 C100,1.34132688 101.33731,0 102.995937,0 Z" id="square-2"/></g><g fill="#FFFFFF" id="icon" transform="translate(182.000000, 150.000000)"><path d="M116.462224,35.314313 L116.462224,17.9989613 L112.943289,17.9989612 L112.943289,12.2593563 L116.462224,12.2593563 L116.462224,8.78838641 C116.462224,4.10664222 117.861995,0.730618986 122.988102,0.730618986 L129.08636,0.730618986 L129.08636,6.45843996 L124.792255,6.45843996 C122.641894,6.45843996 122.151874,7.8873763 122.151874,9.38376095 L122.151874,12.2593553 L128.769423,12.2593558 L127.866173,17.9989613 L122.151874,17.9989613 L122.151874,35.3143123 L116.462224,35.314313 Z" id="facebook"/></g></g></g></svg>
|
@@ -0,0 +1 @@
|
|
1
|
+
<?xml version="1.0" ?><svg height="60px" version="1.1" viewBox="0 0 60 60" width="60px" xmlns="http://www.w3.org/2000/svg" xmlns:sketch="http://www.bohemiancoding.com/sketch/ns" xmlns:xlink="http://www.w3.org/1999/xlink"><title/><desc/><defs/><g fill="none" fill-rule="evenodd" id="soical" stroke="none" stroke-width="1"><g id="social" transform="translate(-473.000000, -138.000000)"><g id="slices" transform="translate(173.000000, 138.000000)"/><g fill="#CA4738" id="square-flat" transform="translate(173.000000, 138.000000)"><path d="M302.995937,0 L357.004063,0 C358.658673,0 360,1.33730974 360,2.99593743 L360,57.0040626 C360,58.6586731 358.66269,60 357.004063,60 L302.995937,60 C301.341327,60 300,58.6626903 300,57.0040626 L300,2.99593743 C300,1.34132688 301.33731,0 302.995937,0 Z" id="square-4"/></g><g fill="#FFFFFF" id="icon" transform="translate(182.000000, 150.000000)"><path d="M334.125214,16.5574012 L334.125214,12.9488585 L331.552316,12.9488585 L331.552316,16.5574012 L327.847341,16.5574012 L327.847341,19.1349317 L331.552316,19.1349317 L331.552316,22.8465756 L334.125214,22.8465756 L334.125214,19.1349317 L337.727273,19.1349317 L337.727273,16.5574012 L334.125214,16.5574012 Z M315.394511,16.3511988 L315.394511,20.4752475 C315.394511,20.4752475 319.388062,20.4698863 321.014134,20.4698863 C320.133585,23.143404 318.764391,24.5992963 315.394511,24.5992963 C311.984185,24.5992963 309.32247,21.8296882 309.32247,18.4132231 C309.32247,14.996758 311.984185,12.22715 315.394511,12.22715 C317.197599,12.22715 318.362093,12.8620473 319.430257,13.7469651 C320.285283,12.8904001 320.213859,12.7683283 322.389194,10.7103249 C320.542573,9.02647574 318.088233,8 315.394511,8 C309.653756,8 305,12.662134 305,18.4132231 C305,24.1642091 309.653756,28.8264463 315.394511,28.8264463 C323.975334,28.8264463 326.072659,21.3412978 325.377358,16.3511988 L315.394511,16.3511988 Z" id="google_plus"/></g></g></g></svg>
|
Binary file
|
Binary file
|
@@ -0,0 +1,20 @@
|
|
1
|
+
// This is a manifest file that'll be compiled into application.js, which will include all the files
|
2
|
+
// listed below.
|
3
|
+
//
|
4
|
+
// Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts,
|
5
|
+
// or any plugin's vendor/assets/javascripts directory can be referenced here using a relative path.
|
6
|
+
//
|
7
|
+
// It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the
|
8
|
+
// compiled file.
|
9
|
+
//
|
10
|
+
// Read Sprockets README (https://github.com/rails/sprockets#sprockets-directives) for details
|
11
|
+
// about supported directives.
|
12
|
+
//
|
13
|
+
|
14
|
+
//= require jquery
|
15
|
+
//= require jquery_ujs
|
16
|
+
//= require underscore
|
17
|
+
//= require turbolinks
|
18
|
+
//= require application.js
|
19
|
+
//= require modernizr.custom.63321.js
|
20
|
+
//= require data.js
|
@@ -0,0 +1,12 @@
|
|
1
|
+
// the following stuff is default usually provided in any application, but is necessary for the app to work.
|
2
|
+
|
3
|
+
//= require jquery
|
4
|
+
//= require jquery_ujs
|
5
|
+
//= require underscore
|
6
|
+
//= require turbolinks
|
7
|
+
//= require modernizr.custom.63321.js
|
8
|
+
//= require data.js
|
9
|
+
|
10
|
+
$(document).ready(function() {
|
11
|
+
$('select').material_select();
|
12
|
+
});
|
@@ -0,0 +1,218 @@
|
|
1
|
+
/***
|
2
|
+
all dependenceis listed here are considering that :
|
3
|
+
1. materialize based :
|
4
|
+
materialize-sprockets
|
5
|
+
main.js
|
6
|
+
spinner.js
|
7
|
+
leanModal.js
|
8
|
+
you_need_to_sign_in.js
|
9
|
+
all the above are for sign in / sign up using materialize css based modals and full ajax only requests.
|
10
|
+
|
11
|
+
2. for the user profile pages
|
12
|
+
|
13
|
+
jquery.calendario.js
|
14
|
+
moment
|
15
|
+
|
16
|
+
|
17
|
+
3. for payments if you use the default payment gateway provided by the engine: payumoney(india only)
|
18
|
+
|
19
|
+
payumoney.js
|
20
|
+
****/
|
21
|
+
|
22
|
+
//= require auth/auth_dependencies.js
|
23
|
+
//= require materialize-sprockets
|
24
|
+
//= require spinner.js
|
25
|
+
//= require main.js
|
26
|
+
//= require leanModal.js
|
27
|
+
//= require you_need_to_sign_in.js
|
28
|
+
//= require jquery.calendario.js
|
29
|
+
//= require moment
|
30
|
+
//= require search.js
|
31
|
+
//= require payumoney.js
|
32
|
+
|
33
|
+
/////THIS CODE SHOWS HOW TO OVERRIDE ALL THE CLIENT SIDE CODE NEEDED
|
34
|
+
/////FOR VALIDATIONS TO WORK FOR THE SIGN_IN_FORM.
|
35
|
+
var mobile_number_regex = /^([0]\+[0-9]{1,5})?([7-9][0-9]{9})$/;
|
36
|
+
var email_regex = /[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+(?:[A-Z]{2}|com|org|net|gov|mil|biz|info|mobi|name|aero|jobs|museum)\b/;
|
37
|
+
|
38
|
+
/***
|
39
|
+
1.WHY IS THIS NOT DONE WITH SIGN_IN?
|
40
|
+
BECAUSE WITH SIGN_IN FORM WE SEND THE PARAM AS LOGIN
|
41
|
+
THAT IS THEN USED IN THE FIND_FOR_DATABASE_AUTHENTICATABLE , AS PER THE DEVISE TUTORIAL.
|
42
|
+
SO THERE WE DONT NEED TO DO THE FOLLOWING HIDDEN-FIELD-JUGGLING ETC.
|
43
|
+
|
44
|
+
2.this entire handler takes over from the trigger on the login_submit, in the you_need_to_sign_in.js.erb
|
45
|
+
and it juggles the action and the attributes as required, for the otp.
|
46
|
+
***/
|
47
|
+
$(document).on('click','#login_submit',function(event){
|
48
|
+
console.log("detected login submit click");
|
49
|
+
|
50
|
+
var current_screen = $('#login_title').text();
|
51
|
+
if(current_screen == "Sign Up"){
|
52
|
+
//WHAT WE ARE DOING HERE IS CHECKING IF THE USER IS ENTERING A MOBILE OR A EMAIL, AND IF IT IS A MOBILE, THEN WE ARE ADDING A HIDDEN FIELD CALLED ADDITIONAL_LOGIN_PARAM and sending it alongwith the rest of the form.
|
53
|
+
var user_login = $("#" + resource_singular + "_login").val().trim();
|
54
|
+
var hidden_field_name = null;
|
55
|
+
hidden_field_name = user_login.match(mobile_number_regex) ? (resource_singular +'[additional_login_param]') : (resource_singular + '[email]');
|
56
|
+
|
57
|
+
$(this).append('<input type="hidden" name="' + hidden_field_name + '" value="'+ user_login +'" />');
|
58
|
+
}
|
59
|
+
|
60
|
+
else if(current_screen == "Forgot Password"){
|
61
|
+
//here i am just changing the action of the form, and the method.
|
62
|
+
//since in case of additional_login_param, we send it to send_sms_otp + intent.
|
63
|
+
var user_login = $("#" + resource_singular + "_email").val().trim();
|
64
|
+
if(user_login.match(mobile_number_regex)){
|
65
|
+
$("#login_form_password").attr("action","/" + resource + "/send_sms_otp?intent=reset_password");
|
66
|
+
$("#login_form_password").attr("method","GET");
|
67
|
+
}
|
68
|
+
else{
|
69
|
+
$("#login_form_password").attr("action","/" + resource + "/password");
|
70
|
+
$("#login_form_password").attr("method","POST");
|
71
|
+
}
|
72
|
+
}
|
73
|
+
|
74
|
+
else if(current_screen == "Unlock Your Account"){
|
75
|
+
//here i am just changing the action of the form, and the method.
|
76
|
+
//since in case of additional_login_param, we send it to send_sms_otp + intent.
|
77
|
+
var user_login = $("#" + resource_singular + "_email").val().trim();
|
78
|
+
if(user_login.match(mobile_number_regex)){
|
79
|
+
$("#login_form_unlock").attr("action","/" + resource + "/send_sms_otp?intent=unlock_account");
|
80
|
+
$("#login_form_unlock").attr("method","GET");
|
81
|
+
}
|
82
|
+
else{
|
83
|
+
$("#login_form_unlock").attr("action","/" + resource + "/unlock");
|
84
|
+
$("#login_form_unlock").attr("method","POST");
|
85
|
+
}
|
86
|
+
}
|
87
|
+
|
88
|
+
});
|
89
|
+
|
90
|
+
/***
|
91
|
+
this function should be defined before the validation settings
|
92
|
+
and not after it.
|
93
|
+
***/
|
94
|
+
var user_login_validation_function = function(def,e,field_id){
|
95
|
+
|
96
|
+
if($("#" + field_id).val().trim().match(mobile_number_regex)){
|
97
|
+
return true;
|
98
|
+
}
|
99
|
+
else if($("#" + field_id).val().trim().match(email_regex)){
|
100
|
+
return true;
|
101
|
+
}
|
102
|
+
return false;
|
103
|
+
}
|
104
|
+
|
105
|
+
/***
|
106
|
+
for the passwords, unlocks and confirmations views,
|
107
|
+
email is sent in as resource_email,and not as resource_login,
|
108
|
+
like in sign_in and sign_up forms.
|
109
|
+
so a parameter is passed into this function called login_parameter
|
110
|
+
it can be eiterh "email" or "login"
|
111
|
+
***/
|
112
|
+
var val_settings = function(login_parameter){
|
113
|
+
var s = {};
|
114
|
+
var format_failure_message = null;
|
115
|
+
if(resource_singular == "user"){
|
116
|
+
format_failure_message = "Please enter a valid email or mobile number";
|
117
|
+
}
|
118
|
+
else{
|
119
|
+
format_failure_message = "Please enter a valid email";
|
120
|
+
}
|
121
|
+
|
122
|
+
s["login_form"] = {};
|
123
|
+
s["login_form"][resource_singular + "_" + login_parameter] = {
|
124
|
+
"validation_events":{
|
125
|
+
"keyup" : true
|
126
|
+
},
|
127
|
+
"validate_with":[
|
128
|
+
{"required" : "true",
|
129
|
+
"failure_message": "this field is required"
|
130
|
+
},
|
131
|
+
{"format" : user_login_validation_function,
|
132
|
+
"failure_message": format_failure_message
|
133
|
+
}
|
134
|
+
]
|
135
|
+
};
|
136
|
+
s["login_form"][resource_singular + "_password"] = {
|
137
|
+
"validation_events":{
|
138
|
+
"keyup":true
|
139
|
+
},
|
140
|
+
"validate_with":[
|
141
|
+
{"required" : "true",
|
142
|
+
"failure_message": "this field is required"
|
143
|
+
}
|
144
|
+
]
|
145
|
+
};
|
146
|
+
return s;
|
147
|
+
}
|
148
|
+
|
149
|
+
var validation_toggle_on_sign_in = function(){
|
150
|
+
validation_settings = val_settings("login");
|
151
|
+
validation_settings["login_form"][resource_singular + "_password"]["validate_with"] = [
|
152
|
+
{"required" : "true",
|
153
|
+
"failure_message": "this field is required"
|
154
|
+
}
|
155
|
+
];
|
156
|
+
//remove the remote from the user_email part.
|
157
|
+
validation_settings["login_form"][resource_singular + "_login"]["validate_with"] = _.filter(validation_settings["login_form"][resource_singular + "_login"]["validate_with"],function(n){
|
158
|
+
return !("remote" in n);
|
159
|
+
});
|
160
|
+
return validation_settings;
|
161
|
+
}
|
162
|
+
|
163
|
+
var validation_toggle_on_sign_up = function(){
|
164
|
+
validation_settings = val_settings("login");
|
165
|
+
validation_settings["login_form"][resource_singular + "_password"]["validate_with"] = [
|
166
|
+
{"required" : "true",
|
167
|
+
"failure_message": "this field is required"
|
168
|
+
},
|
169
|
+
{
|
170
|
+
"should_be_equal":"true",
|
171
|
+
"failure_message":"fields do not match",
|
172
|
+
"field_array":[resource_singular + "_password_confirmation"]
|
173
|
+
}
|
174
|
+
];
|
175
|
+
validation_settings["login_form"][resource_singular + "_login"]["validate_with"].push({
|
176
|
+
"remote" : "true",
|
177
|
+
"ajax_settings" : credential_exists
|
178
|
+
});
|
179
|
+
return validation_settings;
|
180
|
+
}
|
181
|
+
|
182
|
+
//behaviour of the login_form when submitting the additional_login_parameter
|
183
|
+
//for verification.
|
184
|
+
$(document).on('click','#otp_submit',function(event){
|
185
|
+
$("#otp_form").submit();
|
186
|
+
});
|
187
|
+
|
188
|
+
|
189
|
+
/***
|
190
|
+
THIS STILL NEEDS TO BE TESTED.
|
191
|
+
if this is clicked from forgot_password or unlock account, then
|
192
|
+
should also send in the intent.
|
193
|
+
***/
|
194
|
+
$(document).on('click',
|
195
|
+
'#additional_login_param_resend_confirmation_message'
|
196
|
+
,function(event){
|
197
|
+
//the resource is set in the engine's you_need_to_sign_in.js.
|
198
|
+
//it gets set whenever we click sign_in in the nav bar.
|
199
|
+
$.get(
|
200
|
+
{url : "/" + resource + "/resend_sms_otp",
|
201
|
+
data : {},
|
202
|
+
success : function(data){},
|
203
|
+
dataType : "script"});
|
204
|
+
});
|
205
|
+
|
206
|
+
$(document).on('click','.additional_login_param_resend_confirmation_message',function(event){
|
207
|
+
var data_h = {};
|
208
|
+
data_h[resource_singular] = {};
|
209
|
+
data_h[resource_singular]["additional_login_param"] = $(this).attr("data-additional-login-param");
|
210
|
+
$.get(
|
211
|
+
{url : "/" + resource + "/send_sms_otp",
|
212
|
+
data : data_h,
|
213
|
+
success : function(data){},
|
214
|
+
dataType : "script"});
|
215
|
+
});
|
216
|
+
|
217
|
+
|
218
|
+
|
@@ -0,0 +1,188 @@
|
|
1
|
+
/***
|
2
|
+
HOW STUFF WORKS.
|
3
|
+
There are two scenarios that have to be covered.
|
4
|
+
a. the current month that loads when the page opens:
|
5
|
+
- for this purpose we have hooked into the basic constructor of the calendario object
|
6
|
+
- there was an option inside calendario.js, in the _init function, inside which is called a _generateTemplate function. INside that function there is an option to call a callback function at the end of the _generateTemplate.
|
7
|
+
- so I have defined a custom function here in this file, and passed it in the options of the calendario instance, labelled as "callback".
|
8
|
+
- this is then passed to the _generateTemplate function and called at the end of that function.
|
9
|
+
- the callback defined in this file is "load_current_month".
|
10
|
+
b. the months that load when we click , prev/next
|
11
|
+
- here we have hooked into the function called updateMonthYear.
|
12
|
+
- here we just get the current_month and year, from calendario itself and use that to calculate the start moment and end moment.
|
13
|
+
|
14
|
+
Common pathway for both functions in the end is as follows:
|
15
|
+
call get_activities(callback, start_moment, end_moment)
|
16
|
+
->
|
17
|
+
this makes the ajax calls to the server, and returns the data to the callback function mentioned in the get_activities function call.
|
18
|
+
->
|
19
|
+
the callback defined in this file is "update_calendar_images_and_popups", which basically uses the data got back to update the individual date cells, based on the data-attribute, which we added in the calendario.js file.
|
20
|
+
->end.
|
21
|
+
***/
|
22
|
+
|
23
|
+
/***
|
24
|
+
WORDJELLY FUNCTION
|
25
|
+
@param done_function[fn] : the function to be called after the data is done loading.
|
26
|
+
@param start_moment[Moment] : a Moment.js object reflecting the start_point from when to get the activities
|
27
|
+
@param end_moment[Moment] : a Moment.js object reflecting the end_point upto which to get the activities.
|
28
|
+
@returns : the result of the $.get call.
|
29
|
+
***/
|
30
|
+
var get_activities = function(done_function,start_moment,end_moment){
|
31
|
+
//if these are null then we will get inbuilt defaults from the server.
|
32
|
+
$.get( "/get_activities",
|
33
|
+
{ user_id: $("#user_data").data("resource").id, range: {from: start_moment.unix(), to: end_moment.unix()} , only:["image_url"]},
|
34
|
+
done_function,
|
35
|
+
"json"
|
36
|
+
);
|
37
|
+
}
|
38
|
+
|
39
|
+
/***
|
40
|
+
This should be called in the following style, wherever get_activities is called
|
41
|
+
first().then(second).then(third)
|
42
|
+
@param done_function[fn] :
|
43
|
+
@param start_moment[Moment] :
|
44
|
+
@returns : dateStrings of most active months, as an array
|
45
|
+
***/
|
46
|
+
var get_most_active_months = function(done_function,start_moment){
|
47
|
+
|
48
|
+
}
|
49
|
+
|
50
|
+
/***
|
51
|
+
WORDJELLY FUNCTION
|
52
|
+
The callback function for get_activities
|
53
|
+
@param data[Object] : object returned from server, from the get_activities call
|
54
|
+
@return: nil
|
55
|
+
***/
|
56
|
+
var update_calendar_images_and_popups = function(data){
|
57
|
+
for(epoch in data){
|
58
|
+
var dateStr = moment.utc(parseInt(epoch)*1000).format('MM-DD-YYYY');
|
59
|
+
//get that particular datestr data-attribute
|
60
|
+
var dateDiv = $("[data-strdate='" + dateStr +"']")[0];
|
61
|
+
var activity = data[epoch];
|
62
|
+
//now update the dateDiv as needed.
|
63
|
+
$(dateDiv).html("<span class='helper'></span><img class='calendar_day_background_image' src='" + activity["image_url"] + "'/>");
|
64
|
+
}
|
65
|
+
|
66
|
+
}
|
67
|
+
|
68
|
+
|
69
|
+
/***
|
70
|
+
The callback function for the get_most_active_months
|
71
|
+
***/
|
72
|
+
var update_most_active_months_dots = function(data){
|
73
|
+
//get the calendar div.
|
74
|
+
//then add the dots.
|
75
|
+
//fs-8
|
76
|
+
//m-15-left
|
77
|
+
//text-lighten or darken.
|
78
|
+
$(".fc-body").append("<div class='center m-10-top m-20-bottom'><i class='fa fa-circle fs-8 teal-text text-lighten-5'></i><i class='fa fa-circle fs-8 m-15-left teal-text'></i><i class='fa fa-circle fs-8 m-15-left teal-text'></i><i class='fa fa-circle fs-8 m-15-left teal-text'></i><i class='fa fa-circle fs-8 m-15-left teal-text text-lighten-3'></i><i class='fa fa-circle fs-8 m-15-left teal-text text-lighten-1'></i><i class='fa fa-circle fs-8 m-15-left teal-text '></i></div>");
|
79
|
+
}
|
80
|
+
|
81
|
+
/***
|
82
|
+
pads the given number to the required number of digits.
|
83
|
+
@used_in : #updateMonthYear, to get the month number , correctly padded.
|
84
|
+
@param number[Integer] : the number we have
|
85
|
+
@param digits[Integer] : required number of digits to pad it to.
|
86
|
+
@return[Integer] : the @number padded with zero's to get the number of @digits
|
87
|
+
***/
|
88
|
+
var padDigits = function(number, digits) {
|
89
|
+
return Array(Math.max(digits - String(number).length + 1, 0)).join(0) + number;
|
90
|
+
}
|
91
|
+
|
92
|
+
|
93
|
+
/***
|
94
|
+
called inside the jquery.calendario.js file.
|
95
|
+
calendar instance is passed into it, so that you can successfully determine the start date and end date.
|
96
|
+
whenever we do something.call , the current global object is passed in as "this" as the default argument.
|
97
|
+
so current_month_load is registered as "callback" property in the calendario instance, that was initialized above, and in the generate_template function inside calendario.js, it is passed in as the callback, and "called", so by default the calendario instance is passed to it(current_month_load function), and we use it to determine the start_momeht and end_moment.
|
98
|
+
@used_in : $calendario.calendario , below in this file, the basic constructor for the calendar object. This is used to populate the data for the month that loads by default on the page.
|
99
|
+
@param Calendario[Object] : the calendario instance
|
100
|
+
@return nil.
|
101
|
+
***/
|
102
|
+
var current_month_load = function(){
|
103
|
+
var base_moment = moment(this.today);
|
104
|
+
var start_moment = base_moment.startOf("month");
|
105
|
+
var end_moment = base_moment.endOf("month");
|
106
|
+
get_activities(update_calendar_images_and_popups,start_moment,end_moment);
|
107
|
+
}
|
108
|
+
|
109
|
+
$(document).ready(function(){
|
110
|
+
|
111
|
+
var transEndEventNames = {
|
112
|
+
'WebkitTransition' : 'webkitTransitionEnd',
|
113
|
+
'MozTransition' : 'transitionend',
|
114
|
+
'OTransition' : 'oTransitionEnd',
|
115
|
+
'msTransition' : 'MSTransitionEnd',
|
116
|
+
'transition' : 'transitionend'
|
117
|
+
},
|
118
|
+
transEndEventName = transEndEventNames[ Modernizr.prefixed( 'transition' ) ],
|
119
|
+
$wrapper = $( '#custom-inner' ),
|
120
|
+
$calendar = $( '#calendar' ),
|
121
|
+
cal = $calendar.calendario( {
|
122
|
+
onDayClick : function( $el, $contentEl, dateProperties ){
|
123
|
+
|
124
|
+
if( $contentEl.length > 0 ) {
|
125
|
+
showEvents( $contentEl, dateProperties );
|
126
|
+
}
|
127
|
+
|
128
|
+
},
|
129
|
+
caldata : codropsEvents,
|
130
|
+
displayWeekAbbr : true,
|
131
|
+
callback: current_month_load
|
132
|
+
} ),
|
133
|
+
|
134
|
+
$month = $( '#custom-month' ).html( cal.getMonthName() ),
|
135
|
+
$year = $( '#custom-year' ).html( cal.getYear() );
|
136
|
+
$( '#custom-next' ).on( 'click', function() {
|
137
|
+
cal.gotoNextMonth( updateMonthYear );
|
138
|
+
} );
|
139
|
+
$( '#custom-prev' ).on( 'click', function() {
|
140
|
+
cal.gotoPreviousMonth( updateMonthYear );
|
141
|
+
} );
|
142
|
+
|
143
|
+
|
144
|
+
|
145
|
+
|
146
|
+
function updateMonthYear() {
|
147
|
+
$month.html( cal.getMonthName() );
|
148
|
+
$year.html( cal.getYear() );
|
149
|
+
/****
|
150
|
+
from this point it is custom , for Wordjelly purpose.
|
151
|
+
****/
|
152
|
+
var month = cal.getMonth(),
|
153
|
+
year = cal.getYear(),
|
154
|
+
day = "01";
|
155
|
+
var start_moment = moment(year.toString() + "-" + padDigits(month,2).toString() + "-" + day);
|
156
|
+
var end_moment = (moment(year.toString() + "-" + padDigits(month,2).toString() + "-" + day)).endOf("month");
|
157
|
+
get_activities(update_calendar_images_and_popups,start_moment,end_moment);
|
158
|
+
}
|
159
|
+
|
160
|
+
// just an example..
|
161
|
+
function showEvents( $contentEl, dateProperties ) {
|
162
|
+
|
163
|
+
hideEvents();
|
164
|
+
|
165
|
+
var $events = $( '<div id="custom-content-reveal" class="custom-content-reveal"><h4>Events for ' + dateProperties.monthname + ' ' + dateProperties.day + ', ' + dateProperties.year + '</h4></div>' ),
|
166
|
+
$close = $( '<span class="custom-content-close"></span>' ).on( 'click', hideEvents );
|
167
|
+
|
168
|
+
$events.append( $contentEl.html() , $close ).insertAfter( $wrapper );
|
169
|
+
|
170
|
+
setTimeout( function() {
|
171
|
+
$events.css( 'top', '0%' );
|
172
|
+
}, 25 );
|
173
|
+
|
174
|
+
}
|
175
|
+
function hideEvents() {
|
176
|
+
|
177
|
+
var $events = $( '#custom-content-reveal' );
|
178
|
+
if( $events.length > 0 ) {
|
179
|
+
|
180
|
+
$events.css( 'top', '100%' );
|
181
|
+
Modernizr.csstransitions ? $events.on( transEndEventName, function() { $( this ).remove(); } ) : $events.remove();
|
182
|
+
|
183
|
+
}
|
184
|
+
|
185
|
+
}
|
186
|
+
|
187
|
+
})
|
188
|
+
|