express_ui 0.1.7 → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (58) hide show
  1. checksums.yaml +4 -4
  2. data/app/assets/javascripts/express_ui/application.js +46 -0
  3. data/app/assets/javascripts/express_ui/sidebar.js +6 -0
  4. data/app/assets/javascripts/express_ui/styleguide.js +9 -10
  5. data/app/assets/stylesheets/express_ui/application.css +3 -0
  6. data/app/assets/stylesheets/express_ui/atoms/_animations.sass +3 -0
  7. data/app/assets/stylesheets/express_ui/atoms/_buttons.sass +35 -28
  8. data/app/assets/stylesheets/express_ui/atoms/_headings.sass +5 -5
  9. data/app/assets/stylesheets/express_ui/atoms/_icons.sass +1 -1
  10. data/app/assets/stylesheets/express_ui/atoms/_typography.sass +6 -3
  11. data/app/assets/stylesheets/express_ui/atoms/_variables.sass +5 -1
  12. data/app/assets/stylesheets/express_ui/molecules/_container.sass +23 -0
  13. data/app/assets/stylesheets/express_ui/molecules/_form_groups.sass +30 -1
  14. data/app/assets/stylesheets/express_ui/molecules/_forms.sass +15 -8
  15. data/app/assets/stylesheets/express_ui/molecules/_nav.sass +29 -4
  16. data/app/assets/stylesheets/express_ui/molecules/_tables.sass +9 -18
  17. data/app/assets/stylesheets/express_ui/organisms/_header.sass +6 -2
  18. data/app/assets/stylesheets/express_ui/organisms/_sidebar.sass +2 -1
  19. data/app/assets/stylesheets/express_ui/scripts/_accordion.sass +39 -0
  20. data/app/assets/stylesheets/express_ui/scripts/_calendar.sass +35 -0
  21. data/app/assets/stylesheets/express_ui/scripts/_carousel.sass +43 -0
  22. data/app/assets/stylesheets/express_ui/scripts/_datepicker.sass +10 -0
  23. data/app/assets/stylesheets/express_ui/scripts/_popup.sass +48 -0
  24. data/app/assets/stylesheets/express_ui/scripts/_select.sass +12 -0
  25. data/app/assets/stylesheets/express_ui/scripts/_slider.sass +30 -0
  26. data/app/assets/stylesheets/express_ui/style.sass +19 -0
  27. data/app/assets/stylesheets/express_ui/styleguide.sass +0 -4
  28. data/app/assets/stylesheets/express_ui/templates/_content_sidebar.sass +2 -2
  29. data/app/components/code_demo.rb +2 -4
  30. data/app/controllers/express_ui/scripts_controller.rb +10 -0
  31. data/app/views/express_ui/molecules/_forms.html.erb +1 -1
  32. data/app/views/express_ui/molecules/_forms_select.html.erb +2 -2
  33. data/app/views/express_ui/molecules/_table.html.erb +0 -2
  34. data/app/views/express_ui/molecules/_table_with_filtering.html.erb +83 -54
  35. data/app/views/express_ui/scripts/_accordion.html.et +27 -0
  36. data/app/views/express_ui/scripts/_calendar.html.et +35 -0
  37. data/app/views/express_ui/scripts/_carousel.html.et +21 -0
  38. data/app/views/express_ui/scripts/_datepicker.html.et +37 -0
  39. data/app/views/express_ui/scripts/_popup.html.et +58 -0
  40. data/app/views/express_ui/scripts/_select.html.et +40 -0
  41. data/app/views/express_ui/scripts/_tabs.html.et +17 -0
  42. data/app/views/express_ui/scripts/index.html.erb +41 -0
  43. data/app/views/express_ui/shared/_header.html.erb +1 -0
  44. data/app/views/layouts/express_ui/_head.html.erb +3 -1
  45. data/config/routes.rb +1 -0
  46. data/lib/express_ui/engine.rb +5 -3
  47. data/lib/express_ui/version.rb +1 -1
  48. data/vendor/assets/javascripts/forms.js +39 -0
  49. data/vendor/assets/javascripts/ion.rangeSlider.js +2368 -0
  50. data/vendor/assets/javascripts/picker.date.js +1354 -0
  51. data/vendor/assets/javascripts/picker.js +1163 -0
  52. data/vendor/assets/stylesheets/classic.css +99 -0
  53. data/vendor/assets/stylesheets/default.css +4 -0
  54. data/vendor/assets/stylesheets/default.date.css +1 -0
  55. data/vendor/assets/stylesheets/ion.rangeSlider.css +146 -0
  56. data/vendor/assets/stylesheets/ion.rangeSlider.skinFlat.css +86 -0
  57. metadata +102 -20
  58. data/app/components/express_ui/table/express_table.rb +0 -6
@@ -0,0 +1,17 @@
1
+ code_demo {
2
+ %Q{
3
+ ul(class: 'ae-tabs') {
4
+ li(class: 'ae-tab active-tab', 'data-tab' => 'ae-tab-content1') {
5
+ 'Tab content 1'
6
+ }
7
+ li(class: 'ae-tab', 'data-tab' => 'ae-tab-content1') {
8
+ 'Tab content 2'
9
+ }
10
+ }
11
+
12
+ div(id: 'ae-tab-content1', class: 'ae-tab-content active-tab') { 'Tab content 2' }
13
+
14
+ div(id: 'ae-tab-content2', class: 'ae-tab-content') { 'Tab content 2' }
15
+ }
16
+ }
17
+
@@ -0,0 +1,41 @@
1
+ <%= render "express_ui/shared/header" %>
2
+ <div class="ae-template-content-sidebar-fixed">
3
+ <%= render "express_ui/shared/sidebar_left" %>
4
+
5
+ <div class="ae-content content">
6
+ <%= render "express_ui/shared/search_box" %>
7
+
8
+ <h1>Scripts</h1>
9
+ <div class="js-anchorific-content">
10
+ <p>We prefer gems.</p>
11
+ <h2>Accordion</h2>
12
+ <p>Accordion jquery ui</p>
13
+ <section>
14
+ <%= render "express_ui/scripts/accordion" %>
15
+ </section>
16
+ <h2>Calendar</h2>
17
+ <section>
18
+ <%= render "express_ui/scripts/calendar" %>
19
+ </section>
20
+
21
+ <h2>Carousel</h2>
22
+ <section>
23
+ <%= render "express_ui/scripts/carousel" %>
24
+ </section>
25
+ <h2>Datepicker</h2>
26
+ <section>
27
+ <%= render "express_ui/scripts/datepicker" %>
28
+ </section>
29
+ <h2>Pop-up</h2>
30
+ <section>
31
+ <%= render "express_ui/scripts/popup" %>
32
+ </section>
33
+ <h2>Select</h2>
34
+
35
+ <h2>Tabs</h2>
36
+ <section>
37
+ <%= render "express_ui/scripts/tabs" %>
38
+ </section>
39
+ </div>
40
+ </div>
41
+ </div>
@@ -4,6 +4,7 @@
4
4
  <ul class="ae-list-inline">
5
5
  <%= nav_link_to 'About Express UI', about_path %>
6
6
  <%= nav_link_to 'Style Guide', styleguide_url %>
7
+ <%= nav_link_to 'Scripts', scripts_url %>
7
8
  <%= nav_link_to 'UI Components', uicomponents_path %>
8
9
  </ul>
9
10
  </nav>
@@ -1,7 +1,9 @@
1
1
  <!--[if IE 7]><html class='no-js ie7 no-freight base #{yield :document_class}' data-topic="#{yield :topic}" lang='en'><![endif]-->
2
2
  <!--[if IE 8]><html class='no-js ie8 no-freight base #{yield :document_class}' data-topic="#{yield :topic}" lang='en'><![endif]-->
3
3
  <!--[if IE 9]><html class='no-js ie9 no-freight base #{yield :document_class}' data-topic="#{yield :topic}" lang='en'><![endif]-->
4
- <!--[if gt IE 9]><!--><html class='no-js no-freight base #{yield :document_class}' data-topic="#{yield :topic}" lang='en'><!--<![endif]-->
4
+ <!--[if gt IE 9]><!-->
5
+ <!DOCTYPE HTML>
6
+ <html class='no-js no-freight base #{yield :document_class}' data-topic="#{yield :topic}" lang='en'><!--<![endif]-->
5
7
  <head>
6
8
  <meta charset="utf-8"/>
7
9
  <meta content="AppExpress" name="author"/>
data/config/routes.rb CHANGED
@@ -3,6 +3,7 @@ ExpressUi::Engine.routes.draw do
3
3
 
4
4
  get '/ui_components', to: 'uicomponents#index', as: :uicomponents
5
5
  get '/about', to: 'styleguide#about', as: :about
6
+ get '/scripts', to: 'scripts#index', as: :scripts
6
7
 
7
8
  get '/ui_components/templates/master-detail', to: 'templates#master_detail'
8
9
  get '/ui_components/templates/master-detail-fixed', to: 'templates#master_detail_fixed'
@@ -4,11 +4,15 @@ module ExpressUi
4
4
  class Engine < ::Rails::Engine
5
5
  require 'jquery-rails'
6
6
  require 'font-awesome-sass'
7
+ require 'fullcalendar-rails'
8
+ require 'select2-rails'
9
+ require 'magnific-popup-rails'
10
+ require 'momentjs-rails'
11
+
7
12
  isolate_namespace ExpressUi
8
13
 
9
14
  initializer :assets do |config|
10
15
  Rails.application.config.assets.precompile << /\.(?:svg|eot|woff|ttf|png|jpg|jpeg|gif)$/
11
- # Rails.application.config.assets.precompile += %w( express_ui.js express_ui.css )
12
16
  Rails.application.config.assets.precompile += %w( express_ui/styleguide.css )
13
17
  Rails.application.config.assets.precompile += %w(
14
18
  appexpress/express_admin.svg
@@ -34,8 +38,6 @@ module ExpressUi
34
38
  # use rails autoloader
35
39
  pathified_name.classify.constantize
36
40
  end
37
-
38
41
  end
39
-
40
42
  end
41
43
  end
@@ -1,3 +1,3 @@
1
1
  module ExpressUi
2
- VERSION = '0.1.7'
2
+ VERSION = '0.2.0'
3
3
  end
@@ -0,0 +1,39 @@
1
+ // Form scripts
2
+
3
+ $(function() {
4
+
5
+ // Input Increment
6
+ $(".ae-btn-increment").on("click", function() {
7
+ var $button = $(this);
8
+ var oldValue = $('.ae-input-increment').val();
9
+
10
+ if ($button.text() == "+") {
11
+ var newVal = parseFloat(oldValue) + 1;
12
+ } else {
13
+ // Don't allow decrementing below zero
14
+ if (oldValue > 0) {
15
+ var newVal = parseFloat(oldValue) - 1;
16
+ } else {
17
+ newVal = 0;
18
+ }
19
+ }
20
+ $(".ae-input-increment").val(newVal);
21
+ });
22
+
23
+ // Button group selector
24
+ $(".ae-btn-group-single .ae-btn").click(function () {
25
+ $(this).addClass("ae-selected")
26
+ .removeClass("ae-btn-border")
27
+ .siblings()
28
+ .removeClass("ae-selected")
29
+ .addClass("ae-btn-border");
30
+ });
31
+ $(".ae-btn-group-multiple .ae-btn").click(function () {
32
+ $(this).toggleClass("ae-selected")
33
+ .toggleClass("ae-btn-border")
34
+ });
35
+
36
+
37
+ });
38
+
39
+