pixelforce_cms 0.7 → 0.8

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: b3b33b071e31f30320d288854bb092c92f4daf92
4
- data.tar.gz: 53f3d29a3afd93dc5a4595eae79e8fadb01c87ad
3
+ metadata.gz: 34571a6cee516e994e5ebea2da74748fdfdef1de
4
+ data.tar.gz: 64d951a8b0641e9158653d5c9bf911e03d17c504
5
5
  SHA512:
6
- metadata.gz: 7ca09abad787ffb3b2c7546173938e538617136ad533db2a0b1124960fa2e8e2b102f6e4a5e84a5fb7f6a50e6cb7151c942f55d2cbf77fd5533bf21c4e5cdb2c
7
- data.tar.gz: df5768920dd5bfd547b4d605001de0cadabc3646b0cd14777c5fb0a7baf7ff1b69ce05b12f7c1598642ede08ec85ae454dc362ec1bb61ee1147910acb4fdf922
6
+ metadata.gz: f839413bcebb7aca0b67742b6d1a3d39f6967be0adb16e861b0f584a0878884ffa94f839b6182ab4fcb9490eeb690914b8aeabaac119d730c5c4c45c96c1d319
7
+ data.tar.gz: bce4464a139c3e92e0384c3dbe2dca7b8e7297c95d54c48f8d60cc3b6aabae3615fc755b275b6710d4d2cd65f330b132b0c65394c5723599e862cfef2f3f0928
@@ -7,11 +7,13 @@ module PixelforceCms
7
7
  argument :controller_name, type: :string
8
8
 
9
9
  def create_controller
10
+ @controller_name = controller_name
10
11
  template "base_controller.rb", "app/controllers/admin/base_controller.rb"
11
12
  template "admin_controller.rb", "app/controllers/admin/#{file_name.pluralize}_controller.rb"
12
13
  end
13
14
 
14
15
  def create_views
16
+ @controller_name = controller_name
15
17
  # template 'index.html.haml', "app/views/admin/#{file_name}/index.html.haml"
16
18
  template 'new.html.haml', "app/views/admin/#{file_name}/new.html.haml"
17
19
  template 'edit.html.haml', "app/views/admin/#{file_name}/edit.html.haml"
@@ -7,12 +7,15 @@ module PixelforceCms
7
7
 
8
8
  def copy_assets
9
9
  copy_file "javascripts/application.js", "app/assets/javascripts/application.js"
10
- copy_file "css/application.css", "app/assets/stylesheets/application.css"
11
- copy_file "css/_variables.css.scss", "vendor/assets/stylesheets/_variables.css.scss"
12
10
  copy_file "css/style.css.scss", 'vendor/assets/stylesheets/style.css.scss'
13
11
  copy_file "css/style.responsive.css.scss", 'vendor/assets/stylesheets/style.responsive.css.scss'
12
+ copy_file "css/application/application.css", "app/assets/stylesheets/application/application.css"
14
13
  copy_file "css/application/chromeframe.css.scss", 'vendor/assets/stylesheets/application/chromeframe.css.scss'
14
+ copy_file "css/application/document.css.scss", 'vendor/assets/stylesheets/application/document.css.scss'
15
15
  copy_file "css/application/html5.css.scss", 'vendor/assets/stylesheets/application/html5.css.scss'
16
+ copy_file "css/application/index.css.scss", 'vendor/assets/stylesheets/application/index.css.scss'
17
+ copy_file "css/application/variables.css.scss", "vendor/assets/stylesheets/application/variables.css.scss"
18
+ copy_file "css/pages/home.css.scss", "vendor/assets/stylesheets/pages/home.css.scss"
16
19
  end
17
20
 
18
21
  def copy_gemfile
@@ -18,7 +18,8 @@ gem 'meta-tags', :require => 'meta_tags'
18
18
  gem 'exception_notification'
19
19
 
20
20
  # pixelforce template
21
- gem 'pixelforce_cms', git: 'git@github.com:BenZhang/pixelforce_cms.git'
21
+ gem 'pixelforce_cms', '~> 0.7'
22
+ # gem 'pixelforce_cms', path: '/Users/ben/workspace/pixelforce_cms'
22
23
 
23
24
  # Gems used only for assets and not required
24
25
  # in production environments by default.
@@ -40,6 +41,9 @@ group :assets do
40
41
  gem 'font-awesome-sass-rails'
41
42
  gem 'anjlab-bootstrap-rails', :require => 'bootstrap-rails',
42
43
  :github => 'anjlab/bootstrap-rails'
44
+
45
+ gem 'jquery-ui-rails'
46
+ gem 'fancybox2-rails', '~> 0.2.4'
43
47
  end
44
48
 
45
49
  gem 'jquery-rails'
@@ -1,4 +1,4 @@
1
- <%= simple_form_for(@<%= controller_name.singularize.underscore %>, :html => { class: 'form-horizontal' }) do |f| %>
1
+ <%= simple_form_for(@<%= @controller_name.singularize.underscore %>, :html => { class: 'form-horizontal' }) do |f| %>
2
2
  <%= f.error_notification %>
3
3
 
4
4
  <div class="form-inputs">
@@ -7,6 +7,6 @@
7
7
 
8
8
  <div class="form-actions">
9
9
  <%= f.button :submit, 'Save Changes', class: 'btn btn-stones' %>
10
- <%= link_to 'Cancel', <%= controller_name.pluralize.underscore %>_path, class: 'btn' %>
10
+ <%= link_to 'Cancel', <%= @controller_name.pluralize.underscore %>_path, class: 'btn' %>
11
11
  </div>
12
12
  <% end %>
@@ -1,39 +1,39 @@
1
- class Admin::<%= controller_name.pluralize.capitalize %>Controller < Admin::BaseController
1
+ class Admin::<%= @controller_name.pluralize.capitalize %>Controller < Admin::BaseController
2
2
 
3
3
  def index
4
- @<%= controller_name.underscore.pluralize %> = <%= controller_name.singularize.capitalize %>.all
4
+ @<%= @controller_name.underscore.pluralize %> = <%= @controller_name.singularize.capitalize %>.all
5
5
  end
6
6
 
7
7
  def new
8
- @<%= controller_name.singularize.underscore %> = <%= controller_name.singularize.capitalize %>.new
8
+ @<%= @controller_name.singularize.underscore %> = <%= @controller_name.singularize.capitalize %>.new
9
9
  end
10
10
 
11
11
  def create
12
- @<%= controller_name.singularize.underscore %> = <%= controller_name.singularize.capitalize %>.new params[:<%= controller_name.singularize.underscore %>]
13
- if @<%= controller_name.singularize.underscore %>.save
14
- redirect_to <%= controller_name.underscore.pluralize %>_path
12
+ @<%= @controller_name.singularize.underscore %> = <%= @controller_name.singularize.capitalize %>.new params[:<%= @controller_name.singularize.underscore %>]
13
+ if @<%= @controller_name.singularize.underscore %>.save
14
+ redirect_to <%= @controller_name.underscore.pluralize %>_path
15
15
  else
16
16
  render action: :new
17
17
  end
18
18
  end
19
19
 
20
20
  def edit
21
- @<%= controller_name.singularize.underscore %> = <%= controller_name.singularize.capitalize %>.find params[:id]
21
+ @<%= @controller_name.singularize.underscore %> = <%= @controller_name.singularize.capitalize %>.find params[:id]
22
22
  end
23
23
 
24
24
  def update
25
- @<%= controller_name.singularize.underscore %> = <%= controller_name.singularize.capitalize %>.find params[:id]
26
- if @<%= controller_name.singularize.underscore %>.update_attributes params[:<%= controller_name.underscore %>]
27
- redirect_to <%= controller_name.underscore.pluralize %>_path
25
+ @<%= @controller_name.singularize.underscore %> = <%= @controller_name.singularize.capitalize %>.find params[:id]
26
+ if @<%= @controller_name.singularize.underscore %>.update_attributes params[:<%= @controller_name.underscore %>]
27
+ redirect_to <%= @controller_name.underscore.pluralize %>_path
28
28
  else
29
29
  render action: :edit
30
30
  end
31
31
  end
32
32
 
33
33
  def destroy
34
- @<%= controller_name.singularize.underscore %> = <%= controller_name.singularize.capitalize %>.find params[:id]
35
- @<%= controller_name.singularize.underscore %>.destroy
36
- redirect_to <%= controller_name.pluralize.underscore.pluralize %>_path
34
+ @<%= @controller_name.singularize.underscore %> = <%= @controller_name.singularize.capitalize %>.find params[:id]
35
+ @<%= @controller_name.singularize.underscore %>.destroy
36
+ redirect_to <%= @controller_name.pluralize.underscore.pluralize %>_path
37
37
  end
38
38
 
39
39
  end
@@ -12,6 +12,6 @@
12
12
  *= require application/chromeframe
13
13
  *= require twitter/bootstrap
14
14
  *= require _font-awesome
15
-
16
- *= require style
15
+ *= require jquery.ui.all
16
+ *= require fancybox
17
17
  */
@@ -0,0 +1,10 @@
1
+ // This file was generated by html5-rails
2
+ // https://github.com/sporkd/html5-rails
3
+ // Upgrade with: $ rails generate html5:install
4
+
5
+ //-----------------------------------------
6
+ // Document styles
7
+ //-----------------------------------------
8
+
9
+ html {}
10
+ body {}
@@ -24,7 +24,6 @@
24
24
  //-----------------------------------------
25
25
  @import "application/chromeframe";
26
26
  @import "application/document";
27
- @import "application/media_queries"; // Media queries last
28
27
 
29
28
  //-----------------------------------------
30
29
  // Append includes
@@ -0,0 +1,29 @@
1
+ // This file was generated by html5-rails
2
+ // https://github.com/sporkd/html5-rails
3
+ // Upgrade with: $ rails generate html5:install
4
+ //
5
+ // application styles
6
+
7
+ //-----------------------------------------
8
+ // Variables
9
+ //-----------------------------------------
10
+ @import 'variables';
11
+
12
+ //-----------------------------------------
13
+ // Vendor imports
14
+ //-----------------------------------------
15
+ // @import 'compass/css3';
16
+ @import 'h5bp';
17
+
18
+ //-----------------------------------------
19
+ // Vendor includes
20
+ //-----------------------------------------
21
+ @include h5bp-normalize;
22
+ @include h5bp-main;
23
+ @include h5bp-helpers;
24
+
25
+ //-----------------------------------------
26
+ // Custom imports
27
+ //-----------------------------------------
28
+ @import 'application';
29
+ @import 'style';
@@ -8,8 +8,17 @@
8
8
  //----------------------------------------------
9
9
  // Html5 Boilerplate overrides
10
10
  //----------------------------------------------
11
- $font-color: #222;
12
11
  $font-family: 'Roboto', sans-serif;
13
- $font-size: 1em;
14
- $link-color: #808285;
15
- $link-hover-color: #808285;
12
+
13
+ $background-color: #f2f1e6;
14
+ $font-color: #222;
15
+ $link-color: #949591;
16
+ $link-hover-color: #949591;
17
+
18
+ $white: #fff;
19
+ $gray: #808285;
20
+ $light-gray: #dfdfdf;
21
+
22
+ $placeholder: #ddd;
23
+
24
+ $gutter: 15px;
@@ -1,26 +1,20 @@
1
- @import "variables";
2
- @import "h5bp";
3
- @include h5bp-normalize;
4
- @include h5bp-main;
5
- @import "application/chromeframe";
6
- @include h5bp-helpers;
7
- @include h5bp-media;
8
-
9
1
  html, body { height:100%; }
10
2
  body {
11
3
  font: 14px/1.4 $font-family;
12
- background:#f2f1e6;
4
+ background: $background-color;
13
5
  color: $font-color;
14
6
  width:100%;
15
7
  }
16
8
 
17
9
  h1, h2, h3 {
10
+ font-family: $font-family;
18
11
  margin:0 0 15px;
19
12
  line-height:1.2;
20
13
  }
21
14
  h4, h5 { margin:0 0 10px; }
22
15
 
23
16
  a, .btn-link {
17
+ outline: 0 !important;
24
18
  color: $link-color;
25
19
  text-shadow:none;
26
20
  &:hover {
@@ -29,6 +23,12 @@ a, .btn-link {
29
23
  i { text-decoration:none; }
30
24
  }
31
25
  }
26
+ .btn {
27
+ &.btn-default {
28
+ color: $white;
29
+ background: $link-color;
30
+ }
31
+ }
32
32
 
33
33
  hr {
34
34
  height:10px;
@@ -37,48 +37,24 @@ hr {
37
37
  border-bottom:1px ridge rgba(0,0,0,0.1);
38
38
  }
39
39
 
40
- ::-moz-selection{ background: $link-color; color: #fff; text-shadow: none;}
41
- ::selection { background: $link-color; color: #fff; text-shadow: none;}
40
+ ::-moz-selection{ background: $link-color; color: $white; text-shadow: none;}
41
+ ::selection { background: $link-color; color: $white; text-shadow: none;}
42
42
  a:link {-webkit-tap-highlight-color: $link-color;}
43
43
 
44
- ins {background-color: $link-color; color: #fff; text-decoration: none;}
45
- mark {background-color: $link-color; color: #fff; font-style: italic; font-weight: bold;}
44
+ ins {background-color: $link-color; color: $white; text-decoration: none;}
45
+ mark {background-color: $link-color; color: $white; font-style: italic; font-weight: bold;}
46
46
 
47
- .w_5 { width:5% !important; }
48
- .w_10 { width:10% !important; }
49
- .w_15 { width:15% !important; }
50
- .w_20 { width:20% !important; }
51
- .w_25 { width:25% !important; }
52
- .w_30 { width:30% !important; }
53
- .w_33 { width:33% !important; }
54
- .w_40 { width:40% !important; }
55
- .w_50 { width:50% !important; }
56
- .w_60 { width:60% !important; }
57
- .w_70 { width:70% !important; }
58
- .w_80 { width:80% !important; }
59
- .w_90 { width:90% !important; }
60
- .w_100 {
61
- width:100% !important;
62
- [class^="w_"], [class*=" w_"] { float:left; }
63
- }
64
47
  .w_auto { width:auto !important; }
65
48
 
66
- .padd {
67
- padding:20px 25px;
68
- &.no-l { padding-left:0; }
69
- &.no-r { padding-right:0; }
70
- &.no-t { padding-top:0; }
71
- &.no-b { padding-bottom:0; }
72
- }
49
+ .padd { padding:20px 25px; }
73
50
  .padd-s { padding:15px; }
74
51
  .padd-n { padding:0 !important; }
75
- .bordered { border:1px solid #ccc; }
76
52
 
77
53
  .block { display:block !important; }
78
54
  .inline-block { display:inline-block !important; }
79
55
  .inline { display:inline !important; }
80
56
  .relative { position:relative; }
81
- .mb { margin-bottom:20px !important; }
57
+ .mb { margin-bottom: $gutter !important; }
82
58
  .mc { margin:0 !important; }
83
59
  .ma { margin:0 auto; }
84
60
 
@@ -91,11 +67,16 @@ mark {background-color: $link-color; color: #fff; font-style: italic; font-weigh
91
67
  .font-xxxlarge { font-size:22px !important; }
92
68
  .caps { text-transform:uppercase; }
93
69
 
70
+
94
71
  #main {
95
72
  min-height: 100%;
96
73
  height: auto !important;
97
74
  height: 100%;
98
75
  margin-bottom:-30px;
76
+ & > .main-content {
77
+ padding: 20px;
78
+ }
99
79
  }
100
80
 
101
81
  @import 'style.responsive';
82
+ @import 'pages/*';
@@ -1,17 +1,6 @@
1
- @media (min-width: 1200px) {
2
- .modal {
3
- width: 900px;
4
- margin-left: -450px;
5
- }
1
+ @media (max-width: 991px) {
6
2
  }
7
3
 
8
- @media (min-width: 980px) and (max-width: 1199px) {
9
- }
10
-
11
- @media (max-width: 979px) {
12
- }
13
4
 
14
5
  @media (max-width: 767px) {
15
- body { padding:0; }
16
- .txt_r { text-align:left !important; }
17
6
  }
@@ -1,8 +1,8 @@
1
- - set_meta_tags title: ' Edit <%= controller_name.camelize %>'
1
+ - set_meta_tags title: ' Edit <%= @controller_name.camelize %>'
2
2
 
3
- %section{id: '<%= controller_name.underscore %>'}
3
+ %section{id: '<%= @controller_name.underscore %>'}
4
4
  .widget
5
5
  .widget-header
6
- %h1 Edit <%= controller_name.camelize %>
6
+ %h1 Edit <%= @controller_name.camelize %>
7
7
  .widget-content
8
8
  = render 'form'
@@ -13,5 +13,20 @@
13
13
  //= require jquery
14
14
  //= require jquery_ujs
15
15
  //= require twitter/bootstrap
16
-
16
+ //= require fancybox
17
17
  //= require h5bp
18
+
19
+
20
+ $(function() {
21
+
22
+ $('a[rel=fancybox]').fancybox({
23
+ type: 'ajax',
24
+ maxWidth : 800,
25
+ maxHeight : 600,
26
+ fitToView : true,
27
+ width : '70%',
28
+ height : '70%',
29
+ autoSize : true
30
+ });
31
+
32
+ });
@@ -1,8 +1,8 @@
1
- - set_meta_tags title: ' New <%= controller_name.singularize.camelize %>'
1
+ - set_meta_tags title: ' New <%= @controller_name.singularize.camelize %>'
2
2
 
3
- %section{id: '<%= controller_name.singularize.underscore %>'}
3
+ %section{id: '<%= @controller_name.singularize.underscore %>'}
4
4
  .widget
5
5
  .widget-header
6
- %h1 New <%= controller_name.singularize.camelize %>
6
+ %h1 New <%= @controller_name.singularize.camelize %>
7
7
  .widget-content
8
8
  = render 'form'
@@ -1,3 +1,3 @@
1
1
  module PixelforceCms
2
- VERSION = "0.7"
2
+ VERSION = "0.8"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pixelforce_cms
3
3
  version: !ruby/object:Gem::Version
4
- version: '0.7'
4
+ version: '0.8'
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ben Zhang
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-10-14 00:00:00.000000000 Z
11
+ date: 2013-10-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -58,12 +58,13 @@ files:
58
58
  - lib/generators/pixelforce_cms/templates/admin_controller.rb
59
59
  - lib/generators/pixelforce_cms/templates/application.html.haml
60
60
  - lib/generators/pixelforce_cms/templates/base_controller.rb
61
- - lib/generators/pixelforce_cms/templates/css/_variables.css.scss
62
- - lib/generators/pixelforce_cms/templates/css/application.css
61
+ - lib/generators/pixelforce_cms/templates/css/application/application.css
63
62
  - lib/generators/pixelforce_cms/templates/css/application/chromeframe.css.scss
64
63
  - lib/generators/pixelforce_cms/templates/css/application/document.css.scss
65
64
  - lib/generators/pixelforce_cms/templates/css/application/html5.css.scss
66
- - lib/generators/pixelforce_cms/templates/css/application/media_queries.css.scss
65
+ - lib/generators/pixelforce_cms/templates/css/application/index.css.scss
66
+ - lib/generators/pixelforce_cms/templates/css/application/variables.css.scss
67
+ - lib/generators/pixelforce_cms/templates/css/pages/home.css.scss
67
68
  - lib/generators/pixelforce_cms/templates/css/style.css.scss
68
69
  - lib/generators/pixelforce_cms/templates/css/style.responsive.css.scss
69
70
  - lib/generators/pixelforce_cms/templates/deploy.rb