Browse Source

- Fixed css issue with highlighting class

- Make integer input suitable for float values
pull/4/head
Artur Arseniev 10 years ago
parent
commit
dbe4602f97
  1. 2
      dist/css/grapes.min.css
  2. 4
      dist/grapes.min.js
  3. 1
      package.json
  4. 9
      src/demo.js
  5. 10
      src/style_manager/view/PropertyIntegerView.js
  6. 6
      styles/css/main.css
  7. 2
      styles/css/main.css.map
  8. 6
      styles/scss/main.scss

2
dist/css/grapes.min.css

File diff suppressed because one or more lines are too long

4
dist/grapes.min.js

File diff suppressed because one or more lines are too long

1
package.json

@ -5,6 +5,7 @@
"author": "Artur Arseniev",
"license": "BSD-3-Clause",
"homepage": "http://grapesjs.com",
"main": "dist/grapes.min.js",
"repository": {
"type": "git",
"url": "https://github.com/artf/grapesjs.git"

9
src/demo.js

@ -18,7 +18,6 @@ require(['src/config/require-config.js'], function() {
components: {
defaults : [
//padding:10px;width:130px;min-height:50px;background-color:#ffffff;border-radius:5px;color:#4d114f;font-size:23px;text-align:center;line-height:30px;
{
style: {'width':'100%', 'min-height':'550px', 'background':'url("./img/bg-gr-v.png") repeat left top scroll, url("http://www.freewhd.com/wp-content/uploads/2014/01/work-desk-14949.jpg") no-repeat center center scroll'},
components: [
@ -120,7 +119,7 @@ require(['src/config/require-config.js'], function() {
style: {'margin':'70px 0 0 0','padding':'7px 7px 7px 7px'},
components: [
{
style: {'width':'33%','min-height':'75px','padding':'7px 7px 7px 7px','float':'left'},
style: {'width':'33.333%','min-height':'75px','padding':'7px 7px 7px 7px','float':'left'},
components:[
{
style: {'margin': '0 auto', 'width':'300px', 'min-height':'350px','padding':'0 20px 0 20px','background-color':'#d983a6','border-radius':'5px'},
@ -137,7 +136,7 @@ require(['src/config/require-config.js'], function() {
]
},
{
style: {'width':'33%','min-height':'75px','padding':'7px 7px 7px 7px','float':'left'},
style: {'width':'33.333%','min-height':'75px','padding':'7px 7px 7px 7px','float':'left'},
components:[
{
style: {'margin': '0 auto', 'width':'300px', 'min-height':'350px','padding':'0 20px 0 20px','background-color':'#da78a0','border-radius':'5px'},
@ -154,7 +153,7 @@ require(['src/config/require-config.js'], function() {
]
},
{
style: {'width':'33%','min-height':'75px','padding':'7px 7px 7px 7px','float':'left'},
style: {'width':'33.333%','min-height':'75px','padding':'7px 7px 7px 7px','float':'left'},
components:[
{
style: {'margin': '0 auto', 'width':'300px', 'min-height':'350px','padding':'0 20px 0 20px','background-color':'#d66a96','border-radius':'5px'},
@ -219,7 +218,7 @@ require(['src/config/require-config.js'], function() {
id : 'select',
className : 'fa fa-mouse-pointer',
command : 'select-comp',
attributes : { title : 'Select elements' }
attributes : { title : 'Select element' }
},{
id : 'create',
className : 'fa fa-plus-square-o icon-add-comp',

10
src/style_manager/view/PropertyIntegerView.js

@ -107,22 +107,28 @@ define(['backbone','./PropertyView', 'text!./../templates/propertyInteger.html']
},
/** @inheritdoc */
setValue: function(value){
setValue: function(value)
{
var u = this.unit,
v = this.model.get('value') || this.defaultValue;
if(value){
v = parseInt(value, 10);
// Make it suitable for replace
value += '';
v = parseFloat(value.replace(',', '.'));
v = !isNaN(v) ? v : this.defaultValue;
var uN = value.replace(v,'');
// Check if exists as unit
if(_.indexOf(this.units, uN) > -1)
u = uN;
}
if(this.$input)
this.$input.val(v);
if(this.$unit)
this.$unit.val(u);
this.model.set({value: v, unit: u,},{silent: true});
},

6
styles/css/main.css

@ -2686,15 +2686,15 @@ ol.example li.placeholder:before {
.wte-cv-canvas .wte-comp-selected {
outline: 3px solid #3b97e3 !important; }
div.wte-com-hover {
*.wte-com-hover, div.wte-com-hover {
outline: 1px solid #3b97e3; }
div.wte-com-hover-delete {
*.wte-com-hover-delete, div.wte-com-hover-delete {
outline: 2px solid #DD3636;
opacity: 0.5;
filter: alpha(opacity=50); }
div.wte-com-hover-move {
*.wte-com-hover-move, div.wte-com-hover-move {
outline: 3px solid #ffca6f; }
.wte-com-badge, .wte-com-badge-red, .wte-com-badge-yellow {

2
styles/css/main.css.map

File diff suppressed because one or more lines are too long

6
styles/scss/main.scss

@ -157,13 +157,13 @@ ol.example li.placeholder:before {position: absolute;}
outline: 3px solid $colorBlue !important;
}
div.#{$com-prefix}hover { outline: 1px solid $colorBlue; }
*.#{$com-prefix}hover, div.#{$com-prefix}hover { outline: 1px solid $colorBlue; }
div.#{$com-prefix}hover-delete{
*.#{$com-prefix}hover-delete, div.#{$com-prefix}hover-delete{
outline: 2px solid $colorRed;
@include opacity(0.50);
}
div.#{$com-prefix}hover-move{
*.#{$com-prefix}hover-move, div.#{$com-prefix}hover-move{
outline: 3px solid $colorYell;
}
.#{$com-prefix}badge{

Loading…
Cancel
Save