Skip to content

Fix#4658 #5762

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Nov 8, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 1 addition & 6 deletions grunt/aliases.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ module.exports = function (grunt, options) {
'default': ['before-test', 'test:single', 'after-test'],

// Build with no testing
'build': ['ngtemplates', 'concat', 'uglify', 'fontello', 'less', 'ngdocs', 'copy:site', 'copy:less_customizer',],
'build': ['ngtemplates', 'concat', 'uglify', 'less', 'ngdocs', 'copy:site', 'copy:less_customizer',],

// Auto-test tasks for development
'autotest:unit': ['karmangular:start'],
Expand All @@ -36,11 +36,6 @@ module.exports = function (grunt, options) {
baseTasks['dev'].splice(baseTasks['dev'].indexOf('autotest:unit'), 1);
}

if (grunt.option('fontello') === false) {
grunt.log.writeln("Skipping fontello...");
baseTasks['build'].splice(baseTasks['build'].indexOf('fontello'), 1);
}

if (process.env.TRAVIS){
baseTasks['test:single'] = ['karma:travis'];
}
Expand Down
5 changes: 0 additions & 5 deletions grunt/watch.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,6 @@ module.exports = function( grunt, options ){
tasks: ['less', 'ngdocs', 'concat:customizer_less']
},

fontello: {
files: 'src/font/config.json',
tasks: ['fontello', 'less']
},

docs: {
files: ['misc/tutorial/**/*.ngdoc', 'misc/api/**/*.ngdoc', 'misc/doc/**'],
tasks: 'ngdocs'
Expand Down
2 changes: 1 addition & 1 deletion misc/tutorial/116_fonts_and_installation.ngdoc
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ This tutorial addresses the basics of the configuration.

Key points here are:

1. Fonts are a derivative of font-awesome via fontello, and are used for the dropdown icons and
1. Fonts are a derivative of font-awesome and are used for the dropdown icons and
various menu buttons and the like. When they're not working they show a "chinese looking" character.
2. The tutorial pages generally show the fonts correctly. If a tutorial page, when served from
ui-grid.info is not showing fonts correctly, then this is likely a defect with ui-grid. If it's
Expand Down
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@
"grunt-contrib-uglify": "~0.2",
"grunt-contrib-watch": "~0.5",
"grunt-conventional-changelog": "~1.0.0",
"grunt-fontello": "~0.1",
"grunt-gh-pages": "~0.9.0",
"grunt-jscs": "^0.7.1",
"grunt-karma": "~0.8",
Expand Down
11 changes: 9 additions & 2 deletions src/js/core/factories/GridOptions.js
Original file line number Diff line number Diff line change
Expand Up @@ -224,10 +224,17 @@ angular.module('ui.grid')
* @ngdoc property
* @name rowHeight
* @propertyOf ui.grid.class:GridOptions
* @description The height of the row in pixels, defaults to 30
* @description The height of the row in pixels, Can be passed as integer or string. defaults to 30.
*
*/
baseOptions.rowHeight = baseOptions.rowHeight || 30;

if (typeof baseOptions.rowHeight === "string") {
baseOptions.rowHeight = parseInt(baseOptions.rowHeight) || 30;
}

else {
baseOptions.rowHeight = baseOptions.rowHeight || 30;
}

/**
* @ngdoc integer
Expand Down
115 changes: 104 additions & 11 deletions src/less/icons.less
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,13 @@
font-family: 'ui-grid';
src: url('@{font-path}ui-grid.eot');
src: url('@{font-path}ui-grid.eot#iefix') format('embedded-opentype'),
url('@{font-path}ui-grid.woff') format('woff'),
url('@{font-path}ui-grid.ttf') format('truetype'),
url('@{font-path}ui-grid.svg?#ui-grid') format('svg');
url('@{font-path}ui-grid.woff') format('woff'),
url('@{font-path}ui-grid.ttf') format('truetype'),
url('@{font-path}ui-grid.svg?#ui-grid') format('svg');
font-weight: normal;
font-style: normal;
}

/* Chrome hack: SVG is rendered more smooth in Windozze. 100% magic, uncomment if you need it. */
/* Note, that will break hinting! In other OS-es font will be not as sharp as it could be */
/*
Expand All @@ -18,34 +19,34 @@
}
}
*/
[class^="ui-grid-icon"]:before, [class*=" ui-grid-icon"]:before {

[class^="ui-grid-icon"]:before, [class*=" ui-grid-icon"]:before {
font-family: "ui-grid";
font-style: normal;
font-weight: normal;
speak: none;

display: inline-block;
text-decoration: inherit;
width: 1em;
margin-right: .2em;
text-align: center;
/* opacity: .8; */

/* For safety - reset parent styles, that can break glyph codes*/
font-variant: normal;
text-transform: none;

/* fix buttons height, for twitter bootstrap */
line-height: 1em;

/* Animation center compensation - margins should be symmetric */
/* remove if not needed */
margin-left: .2em;

/* you can be more comfortable with increased icons size */
/* font-size: 120%; */

/* Uncomment for 3D effect */
/* text-shadow: 1px 1px 1px rgba(127, 127, 127, 0.3); */
}
Expand All @@ -54,3 +55,95 @@
width: 1em;
content: ' ';
}

.ui-grid-icon-plus-squared:before {
content: '\c350'
}

.ui-grid-icon-minus-squared:before {
content: '\c351'
}

.ui-grid-icon-search:before {
content: '\c352'
}

.ui-grid-icon-cancel:before {
content: '\c353'
}

.ui-grid-icon-info-circled:before {
content: '\c354'
}

.ui-grid-icon-lock:before {
content: '\c355'
}

.ui-grid-icon-lock-open:before {
content: '\c356'
}

.ui-grid-icon-pencil:before {
content: '\c357'
}

.ui-grid-icon-down-dir:before {
content: '\c358'
}

.ui-grid-icon-up-dir:before {
content: '\c359'
}

.ui-grid-icon-left-dir:before {
content: '\c35a'
}

.ui-grid-icon-right-dir:before {
content: '\c35b'
}

.ui-grid-icon-left-open:before {
content: '\c35c'
}

.ui-grid-icon-right-open:before {
content: '\c35d'
}

.ui-grid-icon-angle-down:before {
content: '\c35e'
}

.ui-grid-icon-filter:before {
content: '\c35f'
}

.ui-grid-icon-sort-alt-up:before {
content: '\c360'
}

.ui-grid-icon-sort-alt-down:before {
content: '\c361'
}

.ui-grid-icon-ok:before {
content: '\c362'
}

.ui-grid-icon-menu:before {
content: '\c363'
}

.ui-grid-icon-indent-left:before {
content: '\e800'
}

.ui-grid-icon-indent-right:before {
content: '\e801'
}

.ui-grid-icon-spin5:before {
content: '\ea61'
}