chr 0.1.2 → 0.1.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +2 -0
- data/Gruntfile.coffee +57 -0
- data/app/assets/javascripts/chr-dist.js +5190 -0
- data/app/assets/javascripts/chr.coffee +1 -13
- data/app/assets/stylesheets/_chr.scss +12 -3
- data/app/assets/stylesheets/core/_main.scss +0 -39
- data/app/assets/stylesheets/core/_mixins.scss +24 -0
- data/app/assets/stylesheets/core/_settings.scss +9 -0
- data/app/assets/stylesheets/form/_form.scss +0 -9
- data/app/assets/stylesheets/form/_input_checkbox.scss +3 -3
- data/app/assets/stylesheets/form/_input_color.scss +1 -1
- data/app/assets/stylesheets/form/_input_file.scss +3 -3
- data/app/assets/stylesheets/form/_input_list.scss +2 -2
- data/app/assets/stylesheets/form/_input_string.scss +1 -1
- data/app/assets/stylesheets/form/_nested_form.scss +3 -3
- data/bower.json +36 -0
- data/chr.gemspec +1 -3
- data/lib/chr/version.rb +1 -1
- data/package.json +10 -0
- metadata +9 -19
- data/app/assets/stylesheets/form/_input_text.scss +0 -48
@@ -1,5 +1,3 @@
|
|
1
|
-
#= require jquery
|
2
|
-
#= require jquery_ujs
|
3
1
|
#= require ./chr/vendor/jquery.scrollparent
|
4
2
|
#= require ./chr/vendor/jquery.textarea_autosize
|
5
3
|
#= require ./chr/vendor/jquery.typeahead
|
@@ -28,14 +26,4 @@
|
|
28
26
|
#= require ./chr/store/_storeRails
|
29
27
|
|
30
28
|
#= require ./chr/core/_utils
|
31
|
-
#= require ./chr/core/_chr
|
32
|
-
|
33
|
-
# -------------------------------------
|
34
|
-
# Settings
|
35
|
-
# -------------------------------------
|
36
|
-
$.fx.speeds._default = 200
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
29
|
+
#= require ./chr/core/_chr
|
@@ -1,7 +1,16 @@
|
|
1
|
-
@import "normalize-rails";
|
2
1
|
@import "bourbon";
|
3
2
|
|
3
|
+
@import "core/settings";
|
4
|
+
@import "core/mixins";
|
5
|
+
@import "core/icons";
|
4
6
|
@import "core/main";
|
5
|
-
@import "
|
7
|
+
@import "core/list";
|
8
|
+
@import "core/responsive";
|
6
9
|
|
7
|
-
@import "
|
10
|
+
@import "form/form";
|
11
|
+
@import "form/input_checkbox";
|
12
|
+
@import "form/input_color";
|
13
|
+
@import "form/input_file";
|
14
|
+
@import "form/input_list";
|
15
|
+
@import "form/input_string";
|
16
|
+
@import "form/nested_form";
|
@@ -6,45 +6,6 @@ html { -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
|
|
6
6
|
}
|
7
7
|
html, body, .view { overflow: hidden; } // .module
|
8
8
|
|
9
|
-
/* Settings ---------------------------------------------------------------- */
|
10
|
-
$positiveColor: rgb( 74,135,238) !default;
|
11
|
-
$stableColor: rgb(178,178,178) !default;
|
12
|
-
$lightColor: rgb(210,210,210) !default;
|
13
|
-
$assertiveColor: rgb(239, 78, 58) !default;
|
14
|
-
$neutralColor: rgb(246,246,246) !default;
|
15
|
-
$contrastColor: rgb(230,230,230) !default;
|
16
|
-
$white: rgb(255,255,255) !default;
|
17
|
-
$black: #333 !default;
|
18
|
-
|
19
|
-
/* Mixins ------------------------------------------------------------------ */
|
20
|
-
@mixin absolutePosition($coordinates: null null null null) {
|
21
|
-
position: absolute; top: nth($coordinates, 1); right: nth($coordinates, 2); bottom: nth($coordinates, 3); left: nth($coordinates, 4); }
|
22
|
-
|
23
|
-
@mixin truncate {
|
24
|
-
text-overflow: ellipsis; white-space: nowrap; overflow: hidden; }
|
25
|
-
|
26
|
-
@mixin user-select-none {
|
27
|
-
-webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; -o-user-select: none; user-select: none;
|
28
|
-
}
|
29
|
-
|
30
|
-
@mixin border($color) {
|
31
|
-
&:after { content: ''; display: block; height: 1px; //width: 100%;
|
32
|
-
background-color: $color; @include position(absolute, 0px 0px null 1em); }
|
33
|
-
}
|
34
|
-
|
35
|
-
@mixin noBorder { &:after { display: none; } }
|
36
|
-
|
37
|
-
@mixin customScrollbar {
|
38
|
-
&::-webkit-scrollbar { width: 6px; background-color: $neutralColor; }
|
39
|
-
&::-webkit-scrollbar-thumb { background-color: $contrastColor; border-radius: 3px; }
|
40
|
-
}
|
41
|
-
|
42
|
-
@mixin scrollable { overflow: hidden; overflow-y: scroll; -webkit-overflow-scrolling: touch; }
|
43
|
-
|
44
|
-
/* Imports ----------------------------------------------------------------- */
|
45
|
-
@import "icons";
|
46
|
-
@import "list";
|
47
|
-
|
48
9
|
/* Menu -------------------------------------------------------------------- */
|
49
10
|
.menu:before { content: 'CHR'; font-weight: 800; color: $contrastColor; line-height: 2.7;
|
50
11
|
position: absolute; display: block; margin-top: -2.7em; padding-left: 1em;
|
@@ -0,0 +1,24 @@
|
|
1
|
+
/* Mixins ------------------------------------------------------------------ */
|
2
|
+
@mixin absolutePosition($coordinates: null null null null) {
|
3
|
+
position: absolute; top: nth($coordinates, 1); right: nth($coordinates, 2); bottom: nth($coordinates, 3); left: nth($coordinates, 4); }
|
4
|
+
|
5
|
+
@mixin truncate {
|
6
|
+
text-overflow: ellipsis; white-space: nowrap; overflow: hidden; }
|
7
|
+
|
8
|
+
@mixin user-select-none {
|
9
|
+
-webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; -o-user-select: none; user-select: none;
|
10
|
+
}
|
11
|
+
|
12
|
+
@mixin border($color) {
|
13
|
+
&:after { content: ''; display: block; height: 1px; //width: 100%;
|
14
|
+
background-color: $color; @include position(absolute, 0px 0px null 1em); }
|
15
|
+
}
|
16
|
+
|
17
|
+
@mixin noBorder { &:after { display: none; } }
|
18
|
+
|
19
|
+
@mixin customScrollbar {
|
20
|
+
&::-webkit-scrollbar { width: 6px; background-color: $neutralColor; }
|
21
|
+
&::-webkit-scrollbar-thumb { background-color: $contrastColor; border-radius: 3px; }
|
22
|
+
}
|
23
|
+
|
24
|
+
@mixin scrollable { overflow: hidden; overflow-y: scroll; -webkit-overflow-scrolling: touch; }
|
@@ -0,0 +1,9 @@
|
|
1
|
+
/* Settings ---------------------------------------------------------------- */
|
2
|
+
$positiveColor: rgb( 74,135,238) !default;
|
3
|
+
$stableColor: rgb(178,178,178) !default;
|
4
|
+
$lightColor: rgb(210,210,210) !default;
|
5
|
+
$assertiveColor: rgb(239, 78, 58) !default;
|
6
|
+
$neutralColor: rgb(246,246,246) !default;
|
7
|
+
$contrastColor: rgb(230,230,230) !default;
|
8
|
+
$white: rgb(255,255,255) !default;
|
9
|
+
$black: #333 !default;
|
@@ -33,15 +33,6 @@
|
|
33
33
|
@include absolutePosition(.4em .8em inherit inherit);
|
34
34
|
}
|
35
35
|
}
|
36
|
-
|
37
|
-
/* Imports --------------------------------------------------------------- */
|
38
|
-
@import "input_checkbox";
|
39
|
-
@import "input_color";
|
40
|
-
@import "input_file";
|
41
|
-
@import "input_list";
|
42
|
-
@import "input_string";
|
43
|
-
@import "input_text";
|
44
|
-
@import "nested_form";
|
45
36
|
}
|
46
37
|
|
47
38
|
|
@@ -1,5 +1,5 @@
|
|
1
1
|
/* Checkbox ---------------------------------------------------------------- */
|
2
|
-
.input-checkbox {
|
2
|
+
.view .input-checkbox {
|
3
3
|
padding: .8em 1em 1em;
|
4
4
|
|
5
5
|
input { display: inline; width: auto; margin-right: .5em; }
|
@@ -7,8 +7,8 @@
|
|
7
7
|
}
|
8
8
|
|
9
9
|
/* Switch ------------------------------------------------------------------ */
|
10
|
-
.input-switch { padding-top: .75em; }
|
11
|
-
.input-switch .switch {
|
10
|
+
.view .input-switch { padding-top: .75em; }
|
11
|
+
.view .input-switch .switch {
|
12
12
|
float: right;
|
13
13
|
margin-top: -1.8em;
|
14
14
|
|
@@ -1,6 +1,6 @@
|
|
1
1
|
/* File & Image ------------------------------------------------------------ */
|
2
|
-
.input-file,
|
3
|
-
.input-image {
|
2
|
+
.view .input-file,
|
3
|
+
.view .input-image {
|
4
4
|
min-height: 102px; // NOTE: calculated based on image thumbnail size
|
5
5
|
|
6
6
|
a { color: $positiveColor; @include truncate; }
|
@@ -15,7 +15,7 @@
|
|
15
15
|
}
|
16
16
|
}
|
17
17
|
|
18
|
-
.input-image:not(.empty) {
|
18
|
+
.view .input-image:not(.empty) {
|
19
19
|
padding-left: 6.5em;
|
20
20
|
position: relative;
|
21
21
|
img {
|
@@ -1,5 +1,5 @@
|
|
1
1
|
/* List -------------------------------------------------------------------- */
|
2
|
-
.input-list {
|
2
|
+
.view .input-list {
|
3
3
|
input { padding-left: 2em; margin-top: .1em; }
|
4
4
|
ul { line-height: 1.5; margin: 0 0 0 2em; list-style: none; padding: 0; }
|
5
5
|
ul li { @include user-select-none; position: relative; }
|
@@ -16,7 +16,7 @@
|
|
16
16
|
}
|
17
17
|
}
|
18
18
|
|
19
|
-
.input-list {
|
19
|
+
.view .input-list {
|
20
20
|
.twitter-typeahead { width: 100%; }
|
21
21
|
.twitter-typeahead:after {
|
22
22
|
content: '+';
|
@@ -1,5 +1,5 @@
|
|
1
1
|
/* Nested Form ------------------------------------------------------------- */
|
2
|
-
.nested-forms {
|
2
|
+
.view .nested-forms {
|
3
3
|
& > .label { margin-bottom: .25em; }
|
4
4
|
& > ul { margin: 0; padding: 0; }
|
5
5
|
& > ul > li { list-style-type: none; margin-top: 1em; @include position(relative); border: 1px solid $neutralColor; }
|
@@ -9,12 +9,12 @@
|
|
9
9
|
& > ul li.reorderable > .input-stacked:first-child { padding-left: 2.4em; }
|
10
10
|
}
|
11
11
|
|
12
|
-
.nested-form-new {
|
12
|
+
.view .nested-form-new {
|
13
13
|
color: $positiveColor; margin-top: .75em; display: inline-block; font-size: .9em;
|
14
14
|
&:hover { opacity: .5; }
|
15
15
|
}
|
16
16
|
|
17
|
-
.nested-form-delete {
|
17
|
+
.view .nested-form-delete {
|
18
18
|
@include position(absolute, .35em .3em null null); border-radius: 1em;
|
19
19
|
@include hide-text; width: 1.5em; height: 1.5em; background-color: rgba(0,0,0,.05);
|
20
20
|
&:before { content: '\00d7'; color: $stableColor; line-height: 1.35em; width: 1.5em; text-align: center; }
|
data/bower.json
ADDED
@@ -0,0 +1,36 @@
|
|
1
|
+
{
|
2
|
+
"name": "chr",
|
3
|
+
"version": "0.1.4",
|
4
|
+
"homepage": "https://github.com/slate-studio/chr",
|
5
|
+
"authors": [
|
6
|
+
"Slate Studio (http://www.slatestudio.com)"
|
7
|
+
],
|
8
|
+
"license": "MIT",
|
9
|
+
"description": "A simple and lightweight library for building data management web apps",
|
10
|
+
"main": "app/assets/stylesheets/_chr.scss, app/assets/javascripts/chr-dist.js",
|
11
|
+
"keywords": [
|
12
|
+
"library",
|
13
|
+
"javascript",
|
14
|
+
"application",
|
15
|
+
"cms",
|
16
|
+
"rest"
|
17
|
+
],
|
18
|
+
"ignore": [
|
19
|
+
"**/.*",
|
20
|
+
"lib",
|
21
|
+
"chr.gemspec",
|
22
|
+
"Gemfile",
|
23
|
+
"Gemfile.lock",
|
24
|
+
"Gruntfile.coffee",
|
25
|
+
"package.json",
|
26
|
+
"Rakefile"
|
27
|
+
],
|
28
|
+
"repository": {
|
29
|
+
"type": "git",
|
30
|
+
"url": "https://github.com/slate-studio/chr.git"
|
31
|
+
},
|
32
|
+
"dependencies": {
|
33
|
+
"bourbon": ">=4.0",
|
34
|
+
"normalize-scss": ">=3.0"
|
35
|
+
}
|
36
|
+
}
|
data/chr.gemspec
CHANGED
@@ -14,8 +14,7 @@ Gem::Specification.new do |s|
|
|
14
14
|
s.description = <<-DESC
|
15
15
|
Character is a library written in CoffeeScript with a help of jQuery that allows to
|
16
16
|
build data management web applications like CMS, news reader, email client etc. in a
|
17
|
-
very fast and flexible way. It's responsive by default and
|
18
|
-
out of the box: Rails, Firebase and localStorage.
|
17
|
+
very fast and flexible way. It's responsive by default and is data source independent.
|
19
18
|
DESC
|
20
19
|
|
21
20
|
s.rubyforge_project = 'chr'
|
@@ -24,7 +23,6 @@ out of the box: Rails, Firebase and localStorage.
|
|
24
23
|
s.require_paths = ['lib']
|
25
24
|
|
26
25
|
s.add_dependency('bourbon', '>= 3.2')
|
27
|
-
s.add_dependency('jquery-rails', '>= 3.1')
|
28
26
|
s.add_dependency('coffee-rails', '>= 4.0')
|
29
27
|
s.add_dependency('normalize-rails', '>= 3.0')
|
30
28
|
end
|
data/lib/chr/version.rb
CHANGED
data/package.json
ADDED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: chr
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Alexander Kravets
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-03-
|
11
|
+
date: 2015-03-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bourbon
|
@@ -24,20 +24,6 @@ dependencies:
|
|
24
24
|
- - ">="
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: '3.2'
|
27
|
-
- !ruby/object:Gem::Dependency
|
28
|
-
name: jquery-rails
|
29
|
-
requirement: !ruby/object:Gem::Requirement
|
30
|
-
requirements:
|
31
|
-
- - ">="
|
32
|
-
- !ruby/object:Gem::Version
|
33
|
-
version: '3.1'
|
34
|
-
type: :runtime
|
35
|
-
prerelease: false
|
36
|
-
version_requirements: !ruby/object:Gem::Requirement
|
37
|
-
requirements:
|
38
|
-
- - ">="
|
39
|
-
- !ruby/object:Gem::Version
|
40
|
-
version: '3.1'
|
41
27
|
- !ruby/object:Gem::Dependency
|
42
28
|
name: coffee-rails
|
43
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -69,8 +55,7 @@ dependencies:
|
|
69
55
|
description: |
|
70
56
|
Character is a library written in CoffeeScript with a help of jQuery that allows to
|
71
57
|
build data management web applications like CMS, news reader, email client etc. in a
|
72
|
-
very fast and flexible way. It's responsive by default and
|
73
|
-
out of the box: Rails, Firebase and localStorage.
|
58
|
+
very fast and flexible way. It's responsive by default and is data source independent.
|
74
59
|
email: alex@slatestudio.com
|
75
60
|
executables: []
|
76
61
|
extensions: []
|
@@ -79,9 +64,11 @@ files:
|
|
79
64
|
- ".gitignore"
|
80
65
|
- CONTRIBUTING.md
|
81
66
|
- Gemfile
|
67
|
+
- Gruntfile.coffee
|
82
68
|
- LICENSE.md
|
83
69
|
- README.md
|
84
70
|
- Rakefile
|
71
|
+
- app/assets/javascripts/chr-dist.js
|
85
72
|
- app/assets/javascripts/chr.coffee
|
86
73
|
- app/assets/javascripts/chr/core/_chr.coffee
|
87
74
|
- app/assets/javascripts/chr/core/_item.coffee
|
@@ -112,19 +99,22 @@ files:
|
|
112
99
|
- app/assets/stylesheets/core/_icons.scss
|
113
100
|
- app/assets/stylesheets/core/_list.scss
|
114
101
|
- app/assets/stylesheets/core/_main.scss
|
102
|
+
- app/assets/stylesheets/core/_mixins.scss
|
115
103
|
- app/assets/stylesheets/core/_responsive.scss
|
104
|
+
- app/assets/stylesheets/core/_settings.scss
|
116
105
|
- app/assets/stylesheets/form/_form.scss
|
117
106
|
- app/assets/stylesheets/form/_input_checkbox.scss
|
118
107
|
- app/assets/stylesheets/form/_input_color.scss
|
119
108
|
- app/assets/stylesheets/form/_input_file.scss
|
120
109
|
- app/assets/stylesheets/form/_input_list.scss
|
121
110
|
- app/assets/stylesheets/form/_input_string.scss
|
122
|
-
- app/assets/stylesheets/form/_input_text.scss
|
123
111
|
- app/assets/stylesheets/form/_nested_form.scss
|
112
|
+
- bower.json
|
124
113
|
- chr.gemspec
|
125
114
|
- lib/chr.rb
|
126
115
|
- lib/chr/engine.rb
|
127
116
|
- lib/chr/version.rb
|
117
|
+
- package.json
|
128
118
|
homepage: http://slatestudio.com
|
129
119
|
licenses:
|
130
120
|
- MIT
|
@@ -1,48 +0,0 @@
|
|
1
|
-
/* CodeMirror --------------------------------------------------------------- */
|
2
|
-
.input-html .CodeMirror {
|
3
|
-
border: 1px solid $contrastColor;
|
4
|
-
height: auto;
|
5
|
-
}
|
6
|
-
|
7
|
-
/* Redactor ---------------------------------------------------------------- */
|
8
|
-
.input-redactor {
|
9
|
-
.redactor-box { margin-bottom: 0; }
|
10
|
-
.redactor-toolbar { box-shadow: none; border-bottom: 2px solid $contrastColor; }
|
11
|
-
.redactor-editor { border: 1px solid $contrastColor; border-top: 0; }
|
12
|
-
}
|
13
|
-
|
14
|
-
.redactor-box textarea { background: $white; color: $black; }
|
15
|
-
|
16
|
-
.redactor-box-fullscreen {
|
17
|
-
.redactor-toolbar { box-shadow: none; border-bottom: 2px solid $contrastColor; }
|
18
|
-
.redactor-placeholder:after { content: ''; }
|
19
|
-
.redactor-editor { padding-bottom: 5em; border: none; }
|
20
|
-
}
|
21
|
-
|
22
|
-
.redactor-placeholder:after { color: $lightColor!important; }
|
23
|
-
|
24
|
-
/* Modals: Files & Images -------------------------------------------------- */
|
25
|
-
|
26
|
-
#redactor-modal-close { text-align: center; top: 5px; right: 5px; color: $stableColor; }
|
27
|
-
#redactor-modal-close:hover { color: $black; }
|
28
|
-
|
29
|
-
#redactor-modal header { padding: 1.25em 2em 1.25em; font-size: 14px; }
|
30
|
-
#redactor-modal section { padding: .5em 2em 2em; }
|
31
|
-
|
32
|
-
#redactor-modal-tabber a { border-color: $contrastColor; color: $black; }
|
33
|
-
#redactor-modal-tabber a:hover { background-color: $positiveColor; border-color: $positiveColor; color: $white; }
|
34
|
-
#redactor-modal-tabber a.active { cursor: default; background-color: $contrastColor; border-color: $contrastColor; color: $black; }
|
35
|
-
|
36
|
-
#redactor-modal label { margin: 20px 0 5px 0 !important; color: $stableColor; }
|
37
|
-
#redactor-modal input[type="text"] { box-shadow: none; border-color: $contrastColor; }
|
38
|
-
#redactor-modal input[type="text"]:focus { border-color: $positiveColor; box-shadow: none; }
|
39
|
-
|
40
|
-
#redactor-modal #redactor-modal-list { overflow: auto; margin: 0; max-height: 374px; }
|
41
|
-
#redactor-modal #redactor-modal-list li { border-bottom-color: $contrastColor; }
|
42
|
-
#redactor-modal #redactor-modal-list a:hover { background-color: $neutralColor; }
|
43
|
-
|
44
|
-
#redactor-modal-images-list { overflow: auto; height: 368px; margin: 1.5em 0 0; padding: 0; list-style: none; }
|
45
|
-
#redactor-modal-images-list li { float: left; margin: 0 1px 1px 0; width: 75px; height: 75px; display: inline-block; }
|
46
|
-
|
47
|
-
#redactor-modal-tabber + #redactor-modal-image-droparea { margin-top: 1.5em; }
|
48
|
-
#redactor-modal-image-droparea #redactor-droparea { padding: 172px 20px; }
|