effective_bootstrap 0.7.3
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.md +644 -0
- data/app/assets/images/icons/activity.svg +13 -0
- data/app/assets/images/icons/airplay.svg +14 -0
- data/app/assets/images/icons/alert-circle.svg +15 -0
- data/app/assets/images/icons/alert-octagon.svg +15 -0
- data/app/assets/images/icons/alert-triangle.svg +15 -0
- data/app/assets/images/icons/align-center.svg +16 -0
- data/app/assets/images/icons/align-justify.svg +16 -0
- data/app/assets/images/icons/align-left.svg +16 -0
- data/app/assets/images/icons/align-right.svg +16 -0
- data/app/assets/images/icons/anchor.svg +15 -0
- data/app/assets/images/icons/aperture.svg +19 -0
- data/app/assets/images/icons/arrow-down-circle.svg +15 -0
- data/app/assets/images/icons/arrow-down-left.svg +14 -0
- data/app/assets/images/icons/arrow-down-right.svg +14 -0
- data/app/assets/images/icons/arrow-down.svg +14 -0
- data/app/assets/images/icons/arrow-left-circle.svg +15 -0
- data/app/assets/images/icons/arrow-left.svg +14 -0
- data/app/assets/images/icons/arrow-right-circle.svg +15 -0
- data/app/assets/images/icons/arrow-right.svg +14 -0
- data/app/assets/images/icons/arrow-up-circle.svg +15 -0
- data/app/assets/images/icons/arrow-up-left.svg +14 -0
- data/app/assets/images/icons/arrow-up-right.svg +14 -0
- data/app/assets/images/icons/arrow-up.svg +14 -0
- data/app/assets/images/icons/at-sign.svg +14 -0
- data/app/assets/images/icons/award.svg +14 -0
- data/app/assets/images/icons/bar-chart-2.svg +15 -0
- data/app/assets/images/icons/bar-chart.svg +15 -0
- data/app/assets/images/icons/battery-charging.svg +15 -0
- data/app/assets/images/icons/battery.svg +14 -0
- data/app/assets/images/icons/bell-off.svg +14 -0
- data/app/assets/images/icons/bell.svg +13 -0
- data/app/assets/images/icons/bluetooth.svg +13 -0
- data/app/assets/images/icons/bold.svg +14 -0
- data/app/assets/images/icons/book-open.svg +14 -0
- data/app/assets/images/icons/book.svg +14 -0
- data/app/assets/images/icons/bookmark.svg +13 -0
- data/app/assets/images/icons/box.svg +15 -0
- data/app/assets/images/icons/briefcase.svg +14 -0
- data/app/assets/images/icons/calendar.svg +16 -0
- data/app/assets/images/icons/camera-off.svg +14 -0
- data/app/assets/images/icons/camera.svg +14 -0
- data/app/assets/images/icons/cast.svg +14 -0
- data/app/assets/images/icons/check-circle.svg +14 -0
- data/app/assets/images/icons/check-square.svg +14 -0
- data/app/assets/images/icons/check.svg +13 -0
- data/app/assets/images/icons/chevron-down.svg +13 -0
- data/app/assets/images/icons/chevron-left.svg +13 -0
- data/app/assets/images/icons/chevron-right.svg +13 -0
- data/app/assets/images/icons/chevron-up.svg +13 -0
- data/app/assets/images/icons/chevrons-down.svg +14 -0
- data/app/assets/images/icons/chevrons-left.svg +14 -0
- data/app/assets/images/icons/chevrons-right.svg +14 -0
- data/app/assets/images/icons/chevrons-up.svg +14 -0
- data/app/assets/images/icons/chrome.svg +17 -0
- data/app/assets/images/icons/circle.svg +13 -0
- data/app/assets/images/icons/clipboard.svg +14 -0
- data/app/assets/images/icons/clock.svg +14 -0
- data/app/assets/images/icons/cloud-drizzle.svg +19 -0
- data/app/assets/images/icons/cloud-lightning.svg +14 -0
- data/app/assets/images/icons/cloud-off.svg +14 -0
- data/app/assets/images/icons/cloud-rain.svg +16 -0
- data/app/assets/images/icons/cloud-snow.svg +19 -0
- data/app/assets/images/icons/cloud.svg +13 -0
- data/app/assets/images/icons/code.svg +14 -0
- data/app/assets/images/icons/codepen.svg +17 -0
- data/app/assets/images/icons/command.svg +13 -0
- data/app/assets/images/icons/compass.svg +14 -0
- data/app/assets/images/icons/copy.svg +14 -0
- data/app/assets/images/icons/corner-down-left.svg +14 -0
- data/app/assets/images/icons/corner-down-right.svg +14 -0
- data/app/assets/images/icons/corner-left-down.svg +14 -0
- data/app/assets/images/icons/corner-left-up.svg +14 -0
- data/app/assets/images/icons/corner-right-down.svg +14 -0
- data/app/assets/images/icons/corner-right-up.svg +14 -0
- data/app/assets/images/icons/corner-up-left.svg +14 -0
- data/app/assets/images/icons/corner-up-right.svg +14 -0
- data/app/assets/images/icons/cpu.svg +22 -0
- data/app/assets/images/icons/credit-card.svg +14 -0
- data/app/assets/images/icons/crop.svg +14 -0
- data/app/assets/images/icons/crosshair.svg +17 -0
- data/app/assets/images/icons/database.svg +15 -0
- data/app/assets/images/icons/delete.svg +15 -0
- data/app/assets/images/icons/disc.svg +14 -0
- data/app/assets/images/icons/dollar-sign.svg +14 -0
- data/app/assets/images/icons/download-cloud.svg +15 -0
- data/app/assets/images/icons/download.svg +15 -0
- data/app/assets/images/icons/droplet.svg +13 -0
- data/app/assets/images/icons/edit-2.svg +13 -0
- data/app/assets/images/icons/edit-3.svg +14 -0
- data/app/assets/images/icons/edit.svg +14 -0
- data/app/assets/images/icons/external-link.svg +15 -0
- data/app/assets/images/icons/eye-off.svg +14 -0
- data/app/assets/images/icons/eye.svg +14 -0
- data/app/assets/images/icons/facebook-white.svg +7 -0
- data/app/assets/images/icons/facebook.svg +13 -0
- data/app/assets/images/icons/fast-forward.svg +14 -0
- data/app/assets/images/icons/feather.svg +15 -0
- data/app/assets/images/icons/file-minus.svg +15 -0
- data/app/assets/images/icons/file-plus.svg +16 -0
- data/app/assets/images/icons/file-text.svg +17 -0
- data/app/assets/images/icons/file.svg +14 -0
- data/app/assets/images/icons/film.svg +20 -0
- data/app/assets/images/icons/filter.svg +13 -0
- data/app/assets/images/icons/flag.svg +14 -0
- data/app/assets/images/icons/folder-minus.svg +14 -0
- data/app/assets/images/icons/folder-plus.svg +15 -0
- data/app/assets/images/icons/folder.svg +13 -0
- data/app/assets/images/icons/git-branch.svg +16 -0
- data/app/assets/images/icons/git-commit.svg +15 -0
- data/app/assets/images/icons/git-merge.svg +15 -0
- data/app/assets/images/icons/git-pull-request.svg +16 -0
- data/app/assets/images/icons/github.svg +13 -0
- data/app/assets/images/icons/gitlab.svg +13 -0
- data/app/assets/images/icons/globe.svg +15 -0
- data/app/assets/images/icons/google.svg +2 -0
- data/app/assets/images/icons/grid.svg +16 -0
- data/app/assets/images/icons/hard-drive.svg +16 -0
- data/app/assets/images/icons/hash.svg +16 -0
- data/app/assets/images/icons/headphones.svg +14 -0
- data/app/assets/images/icons/heart.svg +13 -0
- data/app/assets/images/icons/help-circle.svg +15 -0
- data/app/assets/images/icons/home.svg +14 -0
- data/app/assets/images/icons/image.svg +15 -0
- data/app/assets/images/icons/inbox.svg +14 -0
- data/app/assets/images/icons/info.svg +15 -0
- data/app/assets/images/icons/instagram.svg +15 -0
- data/app/assets/images/icons/italic.svg +15 -0
- data/app/assets/images/icons/layers.svg +15 -0
- data/app/assets/images/icons/layout.svg +15 -0
- data/app/assets/images/icons/life-buoy.svg +19 -0
- data/app/assets/images/icons/link-2.svg +14 -0
- data/app/assets/images/icons/link.svg +14 -0
- data/app/assets/images/icons/linkedin.svg +15 -0
- data/app/assets/images/icons/list.svg +18 -0
- data/app/assets/images/icons/loader.svg +20 -0
- data/app/assets/images/icons/lock.svg +14 -0
- data/app/assets/images/icons/log-in.svg +15 -0
- data/app/assets/images/icons/log-out.svg +15 -0
- data/app/assets/images/icons/mail.svg +14 -0
- data/app/assets/images/icons/map-pin.svg +14 -0
- data/app/assets/images/icons/map.svg +15 -0
- data/app/assets/images/icons/maximize-2.svg +16 -0
- data/app/assets/images/icons/maximize.svg +13 -0
- data/app/assets/images/icons/menu.svg +15 -0
- data/app/assets/images/icons/message-circle.svg +13 -0
- data/app/assets/images/icons/message-square.svg +13 -0
- data/app/assets/images/icons/mic-off.svg +17 -0
- data/app/assets/images/icons/mic.svg +16 -0
- data/app/assets/images/icons/minimize-2.svg +16 -0
- data/app/assets/images/icons/minimize.svg +13 -0
- data/app/assets/images/icons/minus-circle.svg +14 -0
- data/app/assets/images/icons/minus-square.svg +14 -0
- data/app/assets/images/icons/minus.svg +13 -0
- data/app/assets/images/icons/monitor.svg +15 -0
- data/app/assets/images/icons/moon.svg +13 -0
- data/app/assets/images/icons/more-horizontal.svg +15 -0
- data/app/assets/images/icons/more-vertical.svg +15 -0
- data/app/assets/images/icons/move.svg +18 -0
- data/app/assets/images/icons/music.svg +14 -0
- data/app/assets/images/icons/navigation-2.svg +13 -0
- data/app/assets/images/icons/navigation.svg +13 -0
- data/app/assets/images/icons/octagon.svg +13 -0
- data/app/assets/images/icons/package.svg +16 -0
- data/app/assets/images/icons/paperclip.svg +13 -0
- data/app/assets/images/icons/pause-circle.svg +15 -0
- data/app/assets/images/icons/pause.svg +14 -0
- data/app/assets/images/icons/percent.svg +15 -0
- data/app/assets/images/icons/phone-call.svg +13 -0
- data/app/assets/images/icons/phone-forwarded.svg +15 -0
- data/app/assets/images/icons/phone-incoming.svg +15 -0
- data/app/assets/images/icons/phone-missed.svg +15 -0
- data/app/assets/images/icons/phone-off.svg +14 -0
- data/app/assets/images/icons/phone-outgoing.svg +15 -0
- data/app/assets/images/icons/phone.svg +13 -0
- data/app/assets/images/icons/pie-chart.svg +14 -0
- data/app/assets/images/icons/play-circle.svg +14 -0
- data/app/assets/images/icons/play.svg +13 -0
- data/app/assets/images/icons/plus-circle.svg +15 -0
- data/app/assets/images/icons/plus-square.svg +15 -0
- data/app/assets/images/icons/plus.svg +14 -0
- data/app/assets/images/icons/pocket.svg +14 -0
- data/app/assets/images/icons/power.svg +14 -0
- data/app/assets/images/icons/printer.svg +15 -0
- data/app/assets/images/icons/radio.svg +14 -0
- data/app/assets/images/icons/refresh-ccw.svg +15 -0
- data/app/assets/images/icons/refresh-cw.svg +15 -0
- data/app/assets/images/icons/repeat.svg +16 -0
- data/app/assets/images/icons/rewind.svg +14 -0
- data/app/assets/images/icons/rotate-ccw.svg +14 -0
- data/app/assets/images/icons/rotate-cw.svg +14 -0
- data/app/assets/images/icons/rss.svg +15 -0
- data/app/assets/images/icons/save.svg +15 -0
- data/app/assets/images/icons/scissors.svg +17 -0
- data/app/assets/images/icons/search.svg +14 -0
- data/app/assets/images/icons/send.svg +14 -0
- data/app/assets/images/icons/server.svg +16 -0
- data/app/assets/images/icons/settings.svg +14 -0
- data/app/assets/images/icons/share-2.svg +17 -0
- data/app/assets/images/icons/share.svg +15 -0
- data/app/assets/images/icons/shield-off.svg +15 -0
- data/app/assets/images/icons/shield.svg +13 -0
- data/app/assets/images/icons/shopping-bag.svg +15 -0
- data/app/assets/images/icons/shopping-cart.svg +15 -0
- data/app/assets/images/icons/shuffle.svg +17 -0
- data/app/assets/images/icons/sidebar.svg +14 -0
- data/app/assets/images/icons/skip-back.svg +14 -0
- data/app/assets/images/icons/skip-forward.svg +14 -0
- data/app/assets/images/icons/slack.svg +17 -0
- data/app/assets/images/icons/slash.svg +14 -0
- data/app/assets/images/icons/sliders.svg +21 -0
- data/app/assets/images/icons/smartphone.svg +14 -0
- data/app/assets/images/icons/speaker.svg +15 -0
- data/app/assets/images/icons/spinner.svg +1 -0
- data/app/assets/images/icons/square.svg +13 -0
- data/app/assets/images/icons/star.svg +13 -0
- data/app/assets/images/icons/stop-circle.svg +14 -0
- data/app/assets/images/icons/sun.svg +21 -0
- data/app/assets/images/icons/sunrise.svg +20 -0
- data/app/assets/images/icons/sunset.svg +20 -0
- data/app/assets/images/icons/tablet.svg +22 -0
- data/app/assets/images/icons/tag.svg +14 -0
- data/app/assets/images/icons/target.svg +15 -0
- data/app/assets/images/icons/terminal.svg +14 -0
- data/app/assets/images/icons/thermometer.svg +13 -0
- data/app/assets/images/icons/thumbs-down.svg +13 -0
- data/app/assets/images/icons/thumbs-up.svg +13 -0
- data/app/assets/images/icons/toggle-left.svg +14 -0
- data/app/assets/images/icons/toggle-right.svg +14 -0
- data/app/assets/images/icons/trash-2.svg +16 -0
- data/app/assets/images/icons/trash.svg +14 -0
- data/app/assets/images/icons/trending-down.svg +14 -0
- data/app/assets/images/icons/trending-up.svg +14 -0
- data/app/assets/images/icons/triangle.svg +13 -0
- data/app/assets/images/icons/truck.svg +16 -0
- data/app/assets/images/icons/tv.svg +14 -0
- data/app/assets/images/icons/twitter.svg +13 -0
- data/app/assets/images/icons/type.svg +15 -0
- data/app/assets/images/icons/umbrella.svg +13 -0
- data/app/assets/images/icons/underline.svg +14 -0
- data/app/assets/images/icons/unlock.svg +14 -0
- data/app/assets/images/icons/upload-cloud.svg +16 -0
- data/app/assets/images/icons/upload.svg +15 -0
- data/app/assets/images/icons/user-check.svg +15 -0
- data/app/assets/images/icons/user-minus.svg +15 -0
- data/app/assets/images/icons/user-plus.svg +16 -0
- data/app/assets/images/icons/user-x.svg +16 -0
- data/app/assets/images/icons/user.svg +14 -0
- data/app/assets/images/icons/users.svg +16 -0
- data/app/assets/images/icons/video-off.svg +14 -0
- data/app/assets/images/icons/video.svg +14 -0
- data/app/assets/images/icons/voicemail.svg +15 -0
- data/app/assets/images/icons/volume-1.svg +14 -0
- data/app/assets/images/icons/volume-2.svg +14 -0
- data/app/assets/images/icons/volume-x.svg +15 -0
- data/app/assets/images/icons/volume.svg +13 -0
- data/app/assets/images/icons/watch.svg +15 -0
- data/app/assets/images/icons/wifi-off.svg +19 -0
- data/app/assets/images/icons/wifi.svg +16 -0
- data/app/assets/images/icons/wind.svg +13 -0
- data/app/assets/images/icons/x-circle.svg +15 -0
- data/app/assets/images/icons/x-square.svg +15 -0
- data/app/assets/images/icons/x.svg +14 -0
- data/app/assets/images/icons/zap-off.svg +16 -0
- data/app/assets/images/icons/zap.svg +13 -0
- data/app/assets/images/icons/zoom-in.svg +16 -0
- data/app/assets/images/icons/zoom-out.svg +15 -0
- data/app/assets/javascripts/effective_bootstrap.js +25 -0
- data/app/assets/javascripts/effective_bootstrap/base.js.coffee +22 -0
- data/app/assets/javascripts/effective_bootstrap/confirm.js.coffee.erb +23 -0
- data/app/assets/javascripts/effective_bootstrap/form.js.coffee +182 -0
- data/app/assets/javascripts/effective_bootstrap/logic.js.coffee +64 -0
- data/app/assets/javascripts/effective_bootstrap/other.js.coffee +4 -0
- data/app/assets/javascripts/effective_bootstrap/tabs.js +14 -0
- data/app/assets/javascripts/effective_checks/initialize.js.coffee +7 -0
- data/app/assets/javascripts/effective_checks/input.js +1 -0
- data/app/assets/javascripts/effective_ck_editor/initialize.js.coffee +72 -0
- data/app/assets/javascripts/effective_ck_editor/input.js +1 -0
- data/app/assets/javascripts/effective_clear/initialize.js.coffee +3 -0
- data/app/assets/javascripts/effective_clear/input.js +1 -0
- data/app/assets/javascripts/effective_date/initialize.js.coffee +7 -0
- data/app/assets/javascripts/effective_date/input.js +5 -0
- data/app/assets/javascripts/effective_datetime/bootstrap-datetimepicker.js +2636 -0
- data/app/assets/javascripts/effective_datetime/initialize.js.coffee +7 -0
- data/app/assets/javascripts/effective_datetime/input.js +5 -0
- data/app/assets/javascripts/effective_datetime/overrides.js.coffee +45 -0
- data/app/assets/javascripts/effective_datetime/turbolinks.js.coffee +5 -0
- data/app/assets/javascripts/effective_editor/image-drop-and-paste.js +3 -0
- data/app/assets/javascripts/effective_editor/image-resize.js +2 -0
- data/app/assets/javascripts/effective_editor/initialize.js.coffee +138 -0
- data/app/assets/javascripts/effective_editor/input.js +4 -0
- data/app/assets/javascripts/effective_editor/quill.js +11496 -0
- data/app/assets/javascripts/effective_file/initialize.js.coffee +19 -0
- data/app/assets/javascripts/effective_file/input.js +1 -0
- data/app/assets/javascripts/effective_integer/initialize.js.coffee +6 -0
- data/app/assets/javascripts/effective_integer/input.js +1 -0
- data/app/assets/javascripts/effective_number_text/initialize.js.coffee +6 -0
- data/app/assets/javascripts/effective_number_text/input.js +1 -0
- data/app/assets/javascripts/effective_percent/initialize.js.coffee +39 -0
- data/app/assets/javascripts/effective_percent/input.js +1 -0
- data/app/assets/javascripts/effective_phone/initialize.js.coffee +4 -0
- data/app/assets/javascripts/effective_phone/input.js +2 -0
- data/app/assets/javascripts/effective_phone/jquery.maskedInput.js +182 -0
- data/app/assets/javascripts/effective_price/initialize.js.coffee +43 -0
- data/app/assets/javascripts/effective_price/input.js +1 -0
- data/app/assets/javascripts/effective_radio/initialize.js.coffee +36 -0
- data/app/assets/javascripts/effective_radio/input.js +1 -0
- data/app/assets/javascripts/effective_select/initialize.js.coffee +56 -0
- data/app/assets/javascripts/effective_select/input.js +3 -0
- data/app/assets/javascripts/effective_select/overrides.js.coffee +60 -0
- data/app/assets/javascripts/effective_select/select2.js +5747 -0
- data/app/assets/javascripts/effective_select_or_text/initialize.js +30 -0
- data/app/assets/javascripts/effective_select_or_text/input.js +1 -0
- data/app/assets/javascripts/effective_time/initialize.js.coffee +7 -0
- data/app/assets/javascripts/effective_time/input.js +5 -0
- data/app/assets/javascripts/effective_time_zone_select/initialize.js.coffee +13 -0
- data/app/assets/javascripts/effective_time_zone_select/input.js +1 -0
- data/app/assets/javascripts/moment/locale/af.js +72 -0
- data/app/assets/javascripts/moment/locale/ar-dz.js +58 -0
- data/app/assets/javascripts/moment/locale/ar-kw.js +58 -0
- data/app/assets/javascripts/moment/locale/ar-ly.js +121 -0
- data/app/assets/javascripts/moment/locale/ar-ma.js +58 -0
- data/app/assets/javascripts/moment/locale/ar-sa.js +103 -0
- data/app/assets/javascripts/moment/locale/ar-tn.js +58 -0
- data/app/assets/javascripts/moment/locale/ar.js +134 -0
- data/app/assets/javascripts/moment/locale/az.js +104 -0
- data/app/assets/javascripts/moment/locale/be.js +131 -0
- data/app/assets/javascripts/moment/locale/bg.js +89 -0
- data/app/assets/javascripts/moment/locale/bm.js +57 -0
- data/app/assets/javascripts/moment/locale/bn.js +118 -0
- data/app/assets/javascripts/moment/locale/bo.js +118 -0
- data/app/assets/javascripts/moment/locale/br.js +107 -0
- data/app/assets/javascripts/moment/locale/bs.js +150 -0
- data/app/assets/javascripts/moment/locale/ca.js +87 -0
- data/app/assets/javascripts/moment/locale/cs.js +171 -0
- data/app/assets/javascripts/moment/locale/cv.js +62 -0
- data/app/assets/javascripts/moment/locale/cy.js +79 -0
- data/app/assets/javascripts/moment/locale/da.js +59 -0
- data/app/assets/javascripts/moment/locale/de-at.js +75 -0
- data/app/assets/javascripts/moment/locale/de-ch.js +75 -0
- data/app/assets/javascripts/moment/locale/de.js +75 -0
- data/app/assets/javascripts/moment/locale/dv.js +98 -0
- data/app/assets/javascripts/moment/locale/el.js +99 -0
- data/app/assets/javascripts/moment/locale/en-SG.js +66 -0
- data/app/assets/javascripts/moment/locale/en-au.js +66 -0
- data/app/assets/javascripts/moment/locale/en-ca.js +62 -0
- data/app/assets/javascripts/moment/locale/en-gb.js +66 -0
- data/app/assets/javascripts/moment/locale/en-ie.js +66 -0
- data/app/assets/javascripts/moment/locale/en-il.js +61 -0
- data/app/assets/javascripts/moment/locale/en-nz.js +66 -0
- data/app/assets/javascripts/moment/locale/eo.js +70 -0
- data/app/assets/javascripts/moment/locale/es-do.js +91 -0
- data/app/assets/javascripts/moment/locale/es-us.js +91 -0
- data/app/assets/javascripts/moment/locale/es.js +91 -0
- data/app/assets/javascripts/moment/locale/et.js +79 -0
- data/app/assets/javascripts/moment/locale/eu.js +65 -0
- data/app/assets/javascripts/moment/locale/fa.js +105 -0
- data/app/assets/javascripts/moment/locale/fi.js +108 -0
- data/app/assets/javascripts/moment/locale/fo.js +59 -0
- data/app/assets/javascripts/moment/locale/fr-ca.js +73 -0
- data/app/assets/javascripts/moment/locale/fr-ch.js +77 -0
- data/app/assets/javascripts/moment/locale/fr.js +82 -0
- data/app/assets/javascripts/moment/locale/fy.js +74 -0
- data/app/assets/javascripts/moment/locale/ga.js +76 -0
- data/app/assets/javascripts/moment/locale/gd.js +75 -0
- data/app/assets/javascripts/moment/locale/gl.js +76 -0
- data/app/assets/javascripts/moment/locale/gom-latn.js +122 -0
- data/app/assets/javascripts/moment/locale/gu.js +123 -0
- data/app/assets/javascripts/moment/locale/he.js +96 -0
- data/app/assets/javascripts/moment/locale/hi.js +123 -0
- data/app/assets/javascripts/moment/locale/hr.js +153 -0
- data/app/assets/javascripts/moment/locale/hu.js +109 -0
- data/app/assets/javascripts/moment/locale/hy-am.js +94 -0
- data/app/assets/javascripts/moment/locale/id.js +81 -0
- data/app/assets/javascripts/moment/locale/is.js +131 -0
- data/app/assets/javascripts/moment/locale/it-ch.js +68 -0
- data/app/assets/javascripts/moment/locale/it.js +68 -0
- data/app/assets/javascripts/moment/locale/ja.js +91 -0
- data/app/assets/javascripts/moment/locale/jv.js +81 -0
- data/app/assets/javascripts/moment/locale/ka.js +88 -0
- data/app/assets/javascripts/moment/locale/kk.js +86 -0
- data/app/assets/javascripts/moment/locale/km.js +109 -0
- data/app/assets/javascripts/moment/locale/kn.js +125 -0
- data/app/assets/javascripts/moment/locale/ko.js +80 -0
- data/app/assets/javascripts/moment/locale/ku.js +118 -0
- data/app/assets/javascripts/moment/locale/ky.js +86 -0
- data/app/assets/javascripts/moment/locale/lb.js +135 -0
- data/app/assets/javascripts/moment/locale/lo.js +69 -0
- data/app/assets/javascripts/moment/locale/lt.js +117 -0
- data/app/assets/javascripts/moment/locale/lv.js +96 -0
- data/app/assets/javascripts/moment/locale/me.js +111 -0
- data/app/assets/javascripts/moment/locale/mi.js +63 -0
- data/app/assets/javascripts/moment/locale/mk.js +89 -0
- data/app/assets/javascripts/moment/locale/ml.js +80 -0
- data/app/assets/javascripts/moment/locale/mn.js +103 -0
- data/app/assets/javascripts/moment/locale/mr.js +159 -0
- data/app/assets/javascripts/moment/locale/ms-my.js +81 -0
- data/app/assets/javascripts/moment/locale/ms.js +81 -0
- data/app/assets/javascripts/moment/locale/mt.js +59 -0
- data/app/assets/javascripts/moment/locale/my.js +92 -0
- data/app/assets/javascripts/moment/locale/nb.js +61 -0
- data/app/assets/javascripts/moment/locale/ne.js +122 -0
- data/app/assets/javascripts/moment/locale/nl-be.js +86 -0
- data/app/assets/javascripts/moment/locale/nl.js +86 -0
- data/app/assets/javascripts/moment/locale/nn.js +59 -0
- data/app/assets/javascripts/moment/locale/pa-in.js +123 -0
- data/app/assets/javascripts/moment/locale/pl.js +125 -0
- data/app/assets/javascripts/moment/locale/pt-br.js +60 -0
- data/app/assets/javascripts/moment/locale/pt.js +64 -0
- data/app/assets/javascripts/moment/locale/ro.js +74 -0
- data/app/assets/javascripts/moment/locale/ru.js +181 -0
- data/app/assets/javascripts/moment/locale/sd.js +97 -0
- data/app/assets/javascripts/moment/locale/se.js +59 -0
- data/app/assets/javascripts/moment/locale/si.js +70 -0
- data/app/assets/javascripts/moment/locale/sk.js +155 -0
- data/app/assets/javascripts/moment/locale/sl.js +172 -0
- data/app/assets/javascripts/moment/locale/sq.js +67 -0
- data/app/assets/javascripts/moment/locale/sr-cyrl.js +110 -0
- data/app/assets/javascripts/moment/locale/sr.js +110 -0
- data/app/assets/javascripts/moment/locale/ss.js +87 -0
- data/app/assets/javascripts/moment/locale/sv.js +68 -0
- data/app/assets/javascripts/moment/locale/sw.js +58 -0
- data/app/assets/javascripts/moment/locale/ta.js +128 -0
- data/app/assets/javascripts/moment/locale/te.js +88 -0
- data/app/assets/javascripts/moment/locale/tet.js +66 -0
- data/app/assets/javascripts/moment/locale/tg.js +115 -0
- data/app/assets/javascripts/moment/locale/th.js +66 -0
- data/app/assets/javascripts/moment/locale/tl-ph.js +61 -0
- data/app/assets/javascripts/moment/locale/tlh.js +121 -0
- data/app/assets/javascripts/moment/locale/tr.js +93 -0
- data/app/assets/javascripts/moment/locale/tzl.js +90 -0
- data/app/assets/javascripts/moment/locale/tzm-latn.js +57 -0
- data/app/assets/javascripts/moment/locale/tzm.js +57 -0
- data/app/assets/javascripts/moment/locale/ug-cn.js +118 -0
- data/app/assets/javascripts/moment/locale/uk.js +153 -0
- data/app/assets/javascripts/moment/locale/ur.js +97 -0
- data/app/assets/javascripts/moment/locale/uz-latn.js +57 -0
- data/app/assets/javascripts/moment/locale/uz.js +57 -0
- data/app/assets/javascripts/moment/locale/vi.js +78 -0
- data/app/assets/javascripts/moment/locale/x-pseudo.js +67 -0
- data/app/assets/javascripts/moment/locale/yo.js +59 -0
- data/app/assets/javascripts/moment/locale/zh-cn.js +109 -0
- data/app/assets/javascripts/moment/locale/zh-hk.js +102 -0
- data/app/assets/javascripts/moment/locale/zh-tw.js +102 -0
- data/app/assets/javascripts/moment/moment.js +4603 -0
- data/app/assets/stylesheets/effective_bootstrap.scss +12 -0
- data/app/assets/stylesheets/effective_bootstrap/base.scss +4 -0
- data/app/assets/stylesheets/effective_bootstrap/forms.scss +65 -0
- data/app/assets/stylesheets/effective_bootstrap/icons.scss +67 -0
- data/app/assets/stylesheets/effective_bootstrap/overrides.scss +14 -0
- data/app/assets/stylesheets/effective_checks/input.scss +8 -0
- data/app/assets/stylesheets/effective_date/input.scss +1 -0
- data/app/assets/stylesheets/effective_datetime/bootstrap-datetimepicker.scss +374 -0
- data/app/assets/stylesheets/effective_datetime/input.scss +2 -0
- data/app/assets/stylesheets/effective_datetime/overrides.scss +31 -0
- data/app/assets/stylesheets/effective_editor/input.scss +2 -0
- data/app/assets/stylesheets/effective_editor/overrides.scss +25 -0
- data/app/assets/stylesheets/effective_editor/quill.scss +948 -0
- data/app/assets/stylesheets/effective_file/input.scss +46 -0
- data/app/assets/stylesheets/effective_radio/input.scss +29 -0
- data/app/assets/stylesheets/effective_select/bootstrap-theme.css +564 -0
- data/app/assets/stylesheets/effective_select/input.scss +3 -0
- data/app/assets/stylesheets/effective_select/overrides.scss +115 -0
- data/app/assets/stylesheets/effective_select/select2.css +484 -0
- data/app/assets/stylesheets/effective_select_or_text/input.scss +6 -0
- data/app/assets/stylesheets/effective_time/input.scss +1 -0
- data/app/helpers/effective_bootstrap_helper.rb +371 -0
- data/app/helpers/effective_editor_helper.rb +29 -0
- data/app/helpers/effective_form_builder_helper.rb +74 -0
- data/app/helpers/effective_icons_helper.rb +51 -0
- data/app/models/effective/access_denied.rb +17 -0
- data/app/models/effective/form_builder.rb +199 -0
- data/app/models/effective/form_input.rb +434 -0
- data/app/models/effective/form_inputs/check_box.rb +70 -0
- data/app/models/effective/form_inputs/checks.rb +99 -0
- data/app/models/effective/form_inputs/ck_editor.rb +48 -0
- data/app/models/effective/form_inputs/clear.rb +22 -0
- data/app/models/effective/form_inputs/collection_input.rb +168 -0
- data/app/models/effective/form_inputs/date_field.rb +34 -0
- data/app/models/effective/form_inputs/datetime_field.rb +83 -0
- data/app/models/effective/form_inputs/delete.rb +26 -0
- data/app/models/effective/form_inputs/editor.rb +88 -0
- data/app/models/effective/form_inputs/email_cc_field.rb +19 -0
- data/app/models/effective/form_inputs/email_field.rb +20 -0
- data/app/models/effective/form_inputs/error_field.rb +47 -0
- data/app/models/effective/form_inputs/file_field.rb +135 -0
- data/app/models/effective/form_inputs/float_field.rb +20 -0
- data/app/models/effective/form_inputs/form_group.rb +15 -0
- data/app/models/effective/form_inputs/integer_field.rb +18 -0
- data/app/models/effective/form_inputs/number_field.rb +10 -0
- data/app/models/effective/form_inputs/number_text_field.rb +15 -0
- data/app/models/effective/form_inputs/password_field.rb +24 -0
- data/app/models/effective/form_inputs/percent_field.rb +38 -0
- data/app/models/effective/form_inputs/phone_field.rb +39 -0
- data/app/models/effective/form_inputs/price_field.rb +32 -0
- data/app/models/effective/form_inputs/radios.rb +175 -0
- data/app/models/effective/form_inputs/remote_link_to.rb +30 -0
- data/app/models/effective/form_inputs/reset.rb +22 -0
- data/app/models/effective/form_inputs/save.rb +22 -0
- data/app/models/effective/form_inputs/search_field.rb +15 -0
- data/app/models/effective/form_inputs/select.rb +176 -0
- data/app/models/effective/form_inputs/select_or_text.rb +70 -0
- data/app/models/effective/form_inputs/static_field.rb +41 -0
- data/app/models/effective/form_inputs/submit.rb +109 -0
- data/app/models/effective/form_inputs/text_area.rb +11 -0
- data/app/models/effective/form_inputs/text_field.rb +6 -0
- data/app/models/effective/form_inputs/time_field.rb +34 -0
- data/app/models/effective/form_inputs/time_zone_select.rb +15 -0
- data/app/models/effective/form_inputs/url_field.rb +20 -0
- data/app/models/effective/form_logic.rb +45 -0
- data/app/models/effective/form_logics/hide_if.rb +39 -0
- data/app/models/effective/form_logics/show_if.rb +39 -0
- data/app/models/effective/form_logics/show_if_any.rb +42 -0
- data/app/views/effective/style_guide/__fields.html.haml +43 -0
- data/app/views/effective/style_guide/__inline_fields.html.haml +4 -0
- data/app/views/effective/style_guide/_effective_form_with.html.haml +26 -0
- data/app/views/effective/style_guide/_feather_icons.html.haml +9 -0
- data/config/effective_bootstrap.rb +27 -0
- data/lib/effective_bootstrap.rb +33 -0
- data/lib/effective_bootstrap/engine.rb +15 -0
- data/lib/effective_bootstrap/version.rb +3 -0
- data/lib/generators/effective_bootstrap/install_generator.rb +14 -0
- metadata +650 -0
@@ -0,0 +1,19 @@
|
|
1
|
+
$(document).on 'direct-upload:initialize', (event) ->
|
2
|
+
$target = $(event.target)
|
3
|
+
template = $target.data('progress-template').replace('$ID$', event.detail.id).replace('$FILENAME$', event.detail.file.name)
|
4
|
+
$target.siblings('.uploads').append(template)
|
5
|
+
|
6
|
+
$(document).on 'direct-upload:start', (event) ->
|
7
|
+
$("[data-direct-upload-id=#{event.detail.id}]").removeClass('direct-upload--pending')
|
8
|
+
|
9
|
+
$(document).on 'direct-upload:progress', (event) ->
|
10
|
+
$("[data-direct-upload-id=#{event.detail.id}]").children('.direct-upload__progress').css('width', "#{event.detail.progress}%")
|
11
|
+
|
12
|
+
$(document).on 'direct-upload:error', (event) ->
|
13
|
+
$("[data-direct-upload-id=#{event.detail.id}]").addClass('direct-upload--error').attr('title', event.detail.error)
|
14
|
+
|
15
|
+
$(document).on 'direct-upload:end', (event) ->
|
16
|
+
$("[data-direct-upload-id=#{event.detail.id}]").addClass('direct-upload--complete')
|
17
|
+
|
18
|
+
$(document).on 'change', "input[type='file'][data-click-submit]", (event) ->
|
19
|
+
$(event.currentTarget).closest('form').find('button[type=submit],input[type=submit]').first().click()
|
@@ -0,0 +1 @@
|
|
1
|
+
//= require ./initialize
|
@@ -0,0 +1,6 @@
|
|
1
|
+
# Prevent non-currency buttons from being pressed
|
2
|
+
$(document).on 'keydown', "input.effective_integer", (event) ->
|
3
|
+
allowed = ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9']
|
4
|
+
|
5
|
+
if event.key && event.key.length == 1 && event.metaKey == false && allowed.indexOf(event.key) == -1
|
6
|
+
event.preventDefault()
|
@@ -0,0 +1 @@
|
|
1
|
+
//= require ./initialize
|
@@ -0,0 +1,6 @@
|
|
1
|
+
# Prevent non-currency buttons from being pressed
|
2
|
+
$(document).on 'keydown', "input[type='text'].effective_number_text", (event) ->
|
3
|
+
allowed = ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '-', ',', '.']
|
4
|
+
|
5
|
+
if event.key && event.key.length == 1 && event.metaKey == false && allowed.indexOf(event.key) == -1
|
6
|
+
event.preventDefault()
|
@@ -0,0 +1 @@
|
|
1
|
+
//= require ./initialize
|
@@ -0,0 +1,39 @@
|
|
1
|
+
# Prevent non-currency buttons from being pressed
|
2
|
+
$(document).on 'keydown', "input[type='text'].effective_percent", (event) ->
|
3
|
+
allowed = ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '-', '.']
|
4
|
+
|
5
|
+
if event.key && event.key.length == 1 && event.metaKey == false && allowed.indexOf(event.key) == -1
|
6
|
+
event.preventDefault()
|
7
|
+
|
8
|
+
# Assign the hidden input a value of 100x value
|
9
|
+
$(document).on 'change keyup', "input[type='text'].effective_percent", (event) ->
|
10
|
+
$input = $(event.target)
|
11
|
+
value = $input.val()
|
12
|
+
|
13
|
+
unless value == ''
|
14
|
+
value = (parseFloat(value || 0.00) * 1000.00).toFixed(0)
|
15
|
+
|
16
|
+
$input.siblings("input[type='hidden']").first().val(value)
|
17
|
+
|
18
|
+
# Format the value for display as percentage
|
19
|
+
$(document).on 'change', "input[type='text'].effective_percent", (event) ->
|
20
|
+
$input = $(event.target)
|
21
|
+
value = $input.siblings("input[type='hidden']").first().val()
|
22
|
+
max = 100000 # 100% is our max value
|
23
|
+
|
24
|
+
unless value == ''
|
25
|
+
value = parseInt(value || 0)
|
26
|
+
|
27
|
+
if value > max # 100% is our max value
|
28
|
+
value = max
|
29
|
+
$input.siblings("input[type='hidden']").first().val(max)
|
30
|
+
|
31
|
+
if value < -max # -100% is our min value
|
32
|
+
value = -max
|
33
|
+
$input.siblings("input[type='hidden']").first().val(-max)
|
34
|
+
|
35
|
+
value = (value / 1000.0) if value != 0
|
36
|
+
value = value.toFixed(3).toString()
|
37
|
+
value = value.replace('.000', '') if value.endsWith('.000')
|
38
|
+
|
39
|
+
$input.val(value)
|
@@ -0,0 +1 @@
|
|
1
|
+
//= require ./initialize
|
@@ -0,0 +1,182 @@
|
|
1
|
+
/*
|
2
|
+
jQuery Masked Input Plugin
|
3
|
+
Copyright (c) 2007 - 2014 Josh Bush (digitalbush.com)
|
4
|
+
Licensed under the MIT license (http://digitalbush.com/projects/masked-input-plugin/#license)
|
5
|
+
Version: 1.4.0
|
6
|
+
*/
|
7
|
+
!function(factory) {
|
8
|
+
"function" == typeof define && define.amd ? define([ "jquery" ], factory) : factory("object" == typeof exports ? require("jquery") : jQuery);
|
9
|
+
}(function($) {
|
10
|
+
var caretTimeoutId, ua = navigator.userAgent, iPhone = /iphone/i.test(ua), chrome = /chrome/i.test(ua), android = /android/i.test(ua);
|
11
|
+
$.mask = {
|
12
|
+
definitions: {
|
13
|
+
"9": "[0-9]",
|
14
|
+
a: "[A-Za-z]",
|
15
|
+
"*": "[A-Za-z0-9]"
|
16
|
+
},
|
17
|
+
autoclear: !0,
|
18
|
+
dataName: "rawMaskFn",
|
19
|
+
placeholder: "_"
|
20
|
+
}, $.fn.extend({
|
21
|
+
caret: function(begin, end) {
|
22
|
+
var range;
|
23
|
+
if (0 !== this.length && !this.is(":hidden")) return "number" == typeof begin ? (end = "number" == typeof end ? end : begin,
|
24
|
+
this.each(function() {
|
25
|
+
this.setSelectionRange ? this.setSelectionRange(begin, end) : this.createTextRange && (range = this.createTextRange(),
|
26
|
+
range.collapse(!0), range.moveEnd("character", end), range.moveStart("character", begin),
|
27
|
+
range.select());
|
28
|
+
})) : (this[0].setSelectionRange ? (begin = this[0].selectionStart, end = this[0].selectionEnd) : document.selection && document.selection.createRange && (range = document.selection.createRange(),
|
29
|
+
begin = 0 - range.duplicate().moveStart("character", -1e5), end = begin + range.text.length),
|
30
|
+
{
|
31
|
+
begin: begin,
|
32
|
+
end: end
|
33
|
+
});
|
34
|
+
},
|
35
|
+
unmask: function() {
|
36
|
+
return this.trigger("unmask");
|
37
|
+
},
|
38
|
+
mask: function(mask, settings) {
|
39
|
+
var input, defs, tests, partialPosition, firstNonMaskPos, lastRequiredNonMaskPos, len, oldVal;
|
40
|
+
if (!mask && this.length > 0) {
|
41
|
+
input = $(this[0]);
|
42
|
+
var fn = input.data($.mask.dataName);
|
43
|
+
return fn ? fn() : void 0;
|
44
|
+
}
|
45
|
+
return settings = $.extend({
|
46
|
+
autoclear: $.mask.autoclear,
|
47
|
+
placeholder: $.mask.placeholder,
|
48
|
+
completed: null
|
49
|
+
}, settings), defs = $.mask.definitions, tests = [], partialPosition = len = mask.length,
|
50
|
+
firstNonMaskPos = null, $.each(mask.split(""), function(i, c) {
|
51
|
+
"?" == c ? (len--, partialPosition = i) : defs[c] ? (tests.push(new RegExp(defs[c])),
|
52
|
+
null === firstNonMaskPos && (firstNonMaskPos = tests.length - 1), partialPosition > i && (lastRequiredNonMaskPos = tests.length - 1)) : tests.push(null);
|
53
|
+
}), this.trigger("unmask").each(function() {
|
54
|
+
function tryFireCompleted() {
|
55
|
+
if (settings.completed) {
|
56
|
+
for (var i = firstNonMaskPos; lastRequiredNonMaskPos >= i; i++) if (tests[i] && buffer[i] === getPlaceholder(i)) return;
|
57
|
+
settings.completed.call(input);
|
58
|
+
}
|
59
|
+
}
|
60
|
+
function getPlaceholder(i) {
|
61
|
+
return settings.placeholder.charAt(i < settings.placeholder.length ? i : 0);
|
62
|
+
}
|
63
|
+
function seekNext(pos) {
|
64
|
+
for (;++pos < len && !tests[pos]; ) ;
|
65
|
+
return pos;
|
66
|
+
}
|
67
|
+
function seekPrev(pos) {
|
68
|
+
for (;--pos >= 0 && !tests[pos]; ) ;
|
69
|
+
return pos;
|
70
|
+
}
|
71
|
+
function shiftL(begin, end) {
|
72
|
+
var i, j;
|
73
|
+
if (!(0 > begin)) {
|
74
|
+
for (i = begin, j = seekNext(end); len > i; i++) if (tests[i]) {
|
75
|
+
if (!(len > j && tests[i].test(buffer[j]))) break;
|
76
|
+
buffer[i] = buffer[j], buffer[j] = getPlaceholder(j), j = seekNext(j);
|
77
|
+
}
|
78
|
+
writeBuffer(), input.caret(Math.max(firstNonMaskPos, begin));
|
79
|
+
}
|
80
|
+
}
|
81
|
+
function shiftR(pos) {
|
82
|
+
var i, c, j, t;
|
83
|
+
for (i = pos, c = getPlaceholder(pos); len > i; i++) if (tests[i]) {
|
84
|
+
if (j = seekNext(i), t = buffer[i], buffer[i] = c, !(len > j && tests[j].test(t))) break;
|
85
|
+
c = t;
|
86
|
+
}
|
87
|
+
}
|
88
|
+
function androidInputEvent() {
|
89
|
+
var curVal = input.val(), pos = input.caret();
|
90
|
+
if (curVal.length < oldVal.length) {
|
91
|
+
for (checkVal(!0); pos.begin > 0 && !tests[pos.begin - 1]; ) pos.begin--;
|
92
|
+
if (0 === pos.begin) for (;pos.begin < firstNonMaskPos && !tests[pos.begin]; ) pos.begin++;
|
93
|
+
input.caret(pos.begin, pos.begin);
|
94
|
+
} else {
|
95
|
+
for (checkVal(!0); pos.begin < len && !tests[pos.begin]; ) pos.begin++;
|
96
|
+
input.caret(pos.begin, pos.begin);
|
97
|
+
}
|
98
|
+
tryFireCompleted();
|
99
|
+
}
|
100
|
+
function blurEvent() {
|
101
|
+
checkVal(), input.val() != focusText && input.change();
|
102
|
+
}
|
103
|
+
function keydownEvent(e) {
|
104
|
+
if (!input.prop("readonly")) {
|
105
|
+
var pos, begin, end, k = e.which || e.keyCode;
|
106
|
+
oldVal = input.val(), 8 === k || 46 === k || iPhone && 127 === k ? (pos = input.caret(),
|
107
|
+
begin = pos.begin, end = pos.end, end - begin === 0 && (begin = 46 !== k ? seekPrev(begin) : end = seekNext(begin - 1),
|
108
|
+
end = 46 === k ? seekNext(end) : end), clearBuffer(begin, end), shiftL(begin, end - 1),
|
109
|
+
e.preventDefault()) : 13 === k ? blurEvent.call(this, e) : 27 === k && (input.val(focusText),
|
110
|
+
input.caret(0, checkVal()), e.preventDefault());
|
111
|
+
}
|
112
|
+
}
|
113
|
+
function keypressEvent(e) {
|
114
|
+
if (!input.prop("readonly")) {
|
115
|
+
var p, c, next, k = e.which || e.keyCode, pos = input.caret();
|
116
|
+
if (!(e.ctrlKey || e.altKey || e.metaKey || 32 > k) && k && 13 !== k) {
|
117
|
+
if (pos.end - pos.begin !== 0 && (clearBuffer(pos.begin, pos.end), shiftL(pos.begin, pos.end - 1)),
|
118
|
+
p = seekNext(pos.begin - 1), len > p && (c = String.fromCharCode(k), tests[p].test(c))) {
|
119
|
+
if (shiftR(p), buffer[p] = c, writeBuffer(), next = seekNext(p), android) {
|
120
|
+
var proxy = function() {
|
121
|
+
$.proxy($.fn.caret, input, next)();
|
122
|
+
};
|
123
|
+
setTimeout(proxy, 0);
|
124
|
+
} else input.caret(next);
|
125
|
+
pos.begin <= lastRequiredNonMaskPos && tryFireCompleted();
|
126
|
+
}
|
127
|
+
e.preventDefault();
|
128
|
+
}
|
129
|
+
}
|
130
|
+
}
|
131
|
+
function clearBuffer(start, end) {
|
132
|
+
var i;
|
133
|
+
for (i = start; end > i && len > i; i++) tests[i] && (buffer[i] = getPlaceholder(i));
|
134
|
+
}
|
135
|
+
function writeBuffer() {
|
136
|
+
input.val(buffer.join(""));
|
137
|
+
}
|
138
|
+
function checkVal(allow) {
|
139
|
+
var i, c, pos, test = input.val(), lastMatch = -1;
|
140
|
+
for (i = 0, pos = 0; len > i; i++) if (tests[i]) {
|
141
|
+
for (buffer[i] = getPlaceholder(i); pos++ < test.length; ) if (c = test.charAt(pos - 1),
|
142
|
+
tests[i].test(c)) {
|
143
|
+
buffer[i] = c, lastMatch = i;
|
144
|
+
break;
|
145
|
+
}
|
146
|
+
if (pos > test.length) {
|
147
|
+
clearBuffer(i + 1, len);
|
148
|
+
break;
|
149
|
+
}
|
150
|
+
} else buffer[i] === test.charAt(pos) && pos++, partialPosition > i && (lastMatch = i);
|
151
|
+
return allow ? writeBuffer() : partialPosition > lastMatch + 1 ? settings.autoclear || buffer.join("") === defaultBuffer ? (input.val() && input.val(""),
|
152
|
+
clearBuffer(0, len)) : writeBuffer() : (writeBuffer(), input.val(input.val().substring(0, lastMatch + 1))),
|
153
|
+
partialPosition ? i : firstNonMaskPos;
|
154
|
+
}
|
155
|
+
var input = $(this), buffer = $.map(mask.split(""), function(c, i) {
|
156
|
+
return "?" != c ? defs[c] ? getPlaceholder(i) : c : void 0;
|
157
|
+
}), defaultBuffer = buffer.join(""), focusText = input.val();
|
158
|
+
input.data($.mask.dataName, function() {
|
159
|
+
return $.map(buffer, function(c, i) {
|
160
|
+
return tests[i] && c != getPlaceholder(i) ? c : null;
|
161
|
+
}).join("");
|
162
|
+
}), input.one("unmask", function() {
|
163
|
+
input.off(".mask").removeData($.mask.dataName);
|
164
|
+
}).on("focus.mask", function() {
|
165
|
+
if (!input.prop("readonly")) {
|
166
|
+
clearTimeout(caretTimeoutId);
|
167
|
+
var pos;
|
168
|
+
focusText = input.val(), pos = checkVal(), caretTimeoutId = setTimeout(function() {
|
169
|
+
writeBuffer(), pos == mask.replace("?", "").length ? input.caret(0, pos) : input.caret(pos);
|
170
|
+
}, 10);
|
171
|
+
}
|
172
|
+
}).on("blur.mask", blurEvent).on("keydown.mask", keydownEvent).on("keypress.mask", keypressEvent).on("input.mask paste.mask", function() {
|
173
|
+
input.prop("readonly") || setTimeout(function() {
|
174
|
+
var pos = checkVal(!0);
|
175
|
+
input.caret(pos), tryFireCompleted();
|
176
|
+
}, 0);
|
177
|
+
}), chrome && android && input.off("input.mask").on("input.mask", androidInputEvent),
|
178
|
+
checkVal();
|
179
|
+
});
|
180
|
+
}
|
181
|
+
});
|
182
|
+
});
|
@@ -0,0 +1,43 @@
|
|
1
|
+
# Prevent non-currency buttons from being pressed
|
2
|
+
$(document).on 'keydown', "input[type='text'].effective_price", (event) ->
|
3
|
+
allowed = ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '-', ',', '.']
|
4
|
+
|
5
|
+
if event.key && event.key.length == 1 && event.metaKey == false && allowed.indexOf(event.key) == -1
|
6
|
+
event.preventDefault()
|
7
|
+
|
8
|
+
# Assign the hidden input a value of 100x value
|
9
|
+
$(document).on 'change keyup', "input[type='text'].effective_price", (event) ->
|
10
|
+
$input = $(event.target)
|
11
|
+
value = $input.val().replace(/,/g, '')
|
12
|
+
|
13
|
+
unless value == ''
|
14
|
+
value = (parseFloat(value || 0.00) * 100.00).toFixed(0)
|
15
|
+
|
16
|
+
$input.siblings("input[type='hidden']").first().val(value)
|
17
|
+
|
18
|
+
# Format the value for display as currency (USD)
|
19
|
+
$(document).on 'change', "input[type='text'].effective_price", (event) ->
|
20
|
+
$input = $(event.target)
|
21
|
+
value = $input.siblings("input[type='hidden']").first().val()
|
22
|
+
max = 2000000000
|
23
|
+
|
24
|
+
unless value == ''
|
25
|
+
value = parseInt(value || 0)
|
26
|
+
|
27
|
+
if value > max # 20 million is our max value
|
28
|
+
value = max
|
29
|
+
$input.siblings("input[type='hidden']").first().val(max)
|
30
|
+
|
31
|
+
if value < -max # -20 million is our min value
|
32
|
+
value = -max
|
33
|
+
$input.siblings("input[type='hidden']").first().val(-max)
|
34
|
+
|
35
|
+
if isNaN(value) == false && value != ''
|
36
|
+
value = (value / 100.0) if value != 0
|
37
|
+
|
38
|
+
value = value.toFixed(2).toString()
|
39
|
+
value = value.toString().replace(/(\d+)(\d{3})/, '$1'+','+'$2') while (/(\d+)(\d{3})/.test(value))
|
40
|
+
else
|
41
|
+
value = ''
|
42
|
+
|
43
|
+
$input.val(value)
|
@@ -0,0 +1 @@
|
|
1
|
+
//= require ./initialize
|
@@ -0,0 +1,36 @@
|
|
1
|
+
$(document).on 'change', '[data-toggle=cards] input[type=radio]', (event) ->
|
2
|
+
$input = $(event.currentTarget)
|
3
|
+
return unless $input.is(':checked')
|
4
|
+
|
5
|
+
$card = $input.closest('.card')
|
6
|
+
return unless $card.length > 0
|
7
|
+
|
8
|
+
$cards = $input.closest('.card-deck').children('.card')
|
9
|
+
return unless $cards.length > 0
|
10
|
+
|
11
|
+
$cards.removeClass('active').removeClass('border-secondary')
|
12
|
+
$cards.find('.card-header').removeClass('bg-secondary text-white')
|
13
|
+
|
14
|
+
$card.addClass('active').addClass('border-secondary')
|
15
|
+
$card.find('.card-header').addClass('bg-secondary text-white')
|
16
|
+
true
|
17
|
+
|
18
|
+
$(document).on 'click', '[data-toggle=cards] [data-toggle=card]', (event) ->
|
19
|
+
$card = $(event.currentTarget).closest('.card')
|
20
|
+
return unless $card.length > 0
|
21
|
+
|
22
|
+
val = $card.find('input:radio').val()
|
23
|
+
$card.find('input:radio').val([val]).trigger('change')
|
24
|
+
false
|
25
|
+
|
26
|
+
$(document).on 'change', '.effective-radios input', (event) ->
|
27
|
+
$input = $(event.currentTarget)
|
28
|
+
$group = $input.closest('.effective-radios')
|
29
|
+
|
30
|
+
return unless ($group.hasClass('is-valid') || $group.hasClass('is-invalid'))
|
31
|
+
|
32
|
+
if $input.is(':valid')
|
33
|
+
$group.addClass('is-valid').removeClass('is-invalid')
|
34
|
+
else
|
35
|
+
$group.addClass('is-invalid').removeClass('is-valid')
|
36
|
+
|
@@ -0,0 +1 @@
|
|
1
|
+
//= require ./initialize
|
@@ -0,0 +1,56 @@
|
|
1
|
+
# https://select2.github.io/examples.html
|
2
|
+
|
3
|
+
formatWithGlyphicon = (data, container) ->
|
4
|
+
if data.element && data.element.className
|
5
|
+
$("<span><i class='glyphicon #{data.element.className}'></i> #{data.text}</span>")
|
6
|
+
else
|
7
|
+
data.text
|
8
|
+
|
9
|
+
formatWithHtml = (data, container) ->
|
10
|
+
if data.element && data.element.getAttribute('data-html')
|
11
|
+
$(data.element.getAttribute('data-html'))
|
12
|
+
else
|
13
|
+
data.text
|
14
|
+
|
15
|
+
matchWithHtml = (params, data) ->
|
16
|
+
return data if $.trim(params.term) == ''
|
17
|
+
return null unless data.element?
|
18
|
+
|
19
|
+
if $(data.element.getAttribute('data-html')).text().toLowerCase().indexOf(params.term.toLowerCase()) > -1 then data else null
|
20
|
+
|
21
|
+
(this.EffectiveBootstrap || {}).effective_select = ($element, options) ->
|
22
|
+
switch options['template']
|
23
|
+
when 'glyphicon'
|
24
|
+
options['templateResult'] = formatWithGlyphicon
|
25
|
+
options['templateSelection'] = formatWithGlyphicon
|
26
|
+
when 'html'
|
27
|
+
options['templateResult'] = formatWithHtml
|
28
|
+
options['templateSelection'] = formatWithHtml
|
29
|
+
options['matcher'] = matchWithHtml
|
30
|
+
|
31
|
+
if options['noResults']
|
32
|
+
noResults = options['noResults']
|
33
|
+
delete options['noResults']
|
34
|
+
options['language'] = { noResults: (_) -> noResults }
|
35
|
+
|
36
|
+
$select = $element.select2(options)
|
37
|
+
|
38
|
+
# effective_select custom class functionality
|
39
|
+
# select2 doesn't provide an initializer to add css classes to its input, so we manually support this feature
|
40
|
+
# js_options[:containerClass] and js_options[:dropdownClass]
|
41
|
+
$select.data('select2').$container.addClass(options['containerClass']) if options['containerClass']
|
42
|
+
$select.data('select2').$dropdown.addClass(options['dropdownClass']) if options['dropdownClass']
|
43
|
+
|
44
|
+
$(document).on 'turbolinks:before-cache', ->
|
45
|
+
$('select.effective_select.initialized').each (i, element) ->
|
46
|
+
$input = $(element)
|
47
|
+
$input.select2('destroy') if $input.data('select2')
|
48
|
+
$input.removeClass('initialized')
|
49
|
+
|
50
|
+
# If we're working with a polymorphic select, split out the ID and assign the hidden _type and _id fields
|
51
|
+
$(document).on 'change', "select.effective_select.polymorphic", (event) ->
|
52
|
+
$select = $(event.target)
|
53
|
+
value = $select.val() || ''
|
54
|
+
|
55
|
+
$select.siblings("input[type='hidden'][name$='_type]']").val(value.split('_')[0] || '')
|
56
|
+
$select.siblings("input[type='hidden'][name$='_id]']").val(value.split('_')[1] || '')
|
@@ -0,0 +1,60 @@
|
|
1
|
+
# Keep the order of selected tags
|
2
|
+
# Fixes https://github.com/select2/select2/issues/3106
|
3
|
+
$(document).on 'select2:select', 'select', (event) ->
|
4
|
+
$el = $(event.params.data.element)
|
5
|
+
|
6
|
+
if $el.closest('select').hasClass('tags-input')
|
7
|
+
$(this).append($el.detach()).trigger('change')
|
8
|
+
|
9
|
+
true
|
10
|
+
|
11
|
+
# Disable dropdown opening when clicking the clear button
|
12
|
+
# http://stackoverflow.com/questions/29618382/disable-dropdown-opening-on-select2-clear
|
13
|
+
$(document).on 'select2:unselecting', (event) -> $(event.target).data('state', 'unselected')
|
14
|
+
|
15
|
+
$(document).on 'select2:open', (event) ->
|
16
|
+
$select = $(event.target)
|
17
|
+
|
18
|
+
if $select.data('state') == 'unselected'
|
19
|
+
$select.removeData('state')
|
20
|
+
setTimeout ( => $select.select2('close') ), 0
|
21
|
+
|
22
|
+
# For tabbing through
|
23
|
+
# https://stackoverflow.com/questions/20989458/select2-open-dropdown-on-focus
|
24
|
+
$(document).on 'focus', '.select2-selection.select2-selection--single', (event) ->
|
25
|
+
$(event.currentTarget).closest('.select2-container').siblings('select:enabled:not(.disable-open-on-focus)').select2('open')
|
26
|
+
|
27
|
+
$(document).on 'select2:closing', (event) ->
|
28
|
+
$(event.target).data('select2').$selection.one('focus focusin', (event) -> event.stopPropagation())
|
29
|
+
|
30
|
+
# effective_select custom reinitialization functionality
|
31
|
+
# This is a custom event intended to be manually triggered when the underlying options change
|
32
|
+
# You can use this to dynamically disable options (with or without the effective_select hide_disabled: true)
|
33
|
+
# https://github.com/select2/select2/issues/2830
|
34
|
+
|
35
|
+
# To trigger this event,
|
36
|
+
# $(document).on 'change', "select[name$='[something_id]']", (event) ->
|
37
|
+
# ...add/remove/disable this select field's options...
|
38
|
+
# $(event.target).select2().trigger('select2:reinitialize')
|
39
|
+
$(document).on 'select2:reinitialize', (event) ->
|
40
|
+
$select = $(event.target)
|
41
|
+
|
42
|
+
# Get the existing options and value
|
43
|
+
options = $select.data('select2').options.options['inputJsOptions'] || {}
|
44
|
+
value = $select.find('option:selected').val()
|
45
|
+
|
46
|
+
# Clear/Restore the value appropriately
|
47
|
+
if value && $select.find("option:enabled[value='#{value}']").length > 0
|
48
|
+
$select.val(value)
|
49
|
+
else
|
50
|
+
$select.val('')
|
51
|
+
|
52
|
+
# Reinitialize select2
|
53
|
+
$select.select2('destroy').select2(options)
|
54
|
+
|
55
|
+
# Restore effective_select custom class functionality
|
56
|
+
$select.data('select2').$container.addClass(options['containerClass']) if options['containerClass']
|
57
|
+
$select.data('select2').$dropdown.addClass(options['dropdownClass']) if options['dropdownClass']
|
58
|
+
|
59
|
+
$select.trigger('change')
|
60
|
+
true
|