diff --git a/grunt/aliases.js b/grunt/aliases.js index e927f7ce68..7e4422fea5 100644 --- a/grunt/aliases.js +++ b/grunt/aliases.js @@ -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'], @@ -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']; } diff --git a/grunt/watch.js b/grunt/watch.js index 8bb6bd98f3..3f0ceeafad 100644 --- a/grunt/watch.js +++ b/grunt/watch.js @@ -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' diff --git a/misc/tutorial/116_fonts_and_installation.ngdoc b/misc/tutorial/116_fonts_and_installation.ngdoc index 83ba66d08e..bb574d5490 100644 --- a/misc/tutorial/116_fonts_and_installation.ngdoc +++ b/misc/tutorial/116_fonts_and_installation.ngdoc @@ -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 diff --git a/package.json b/package.json index d12538ac8a..f13bfc12e6 100644 --- a/package.json +++ b/package.json @@ -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", diff --git a/src/js/core/factories/GridOptions.js b/src/js/core/factories/GridOptions.js index e3a944cb7b..512988daaa 100644 --- a/src/js/core/factories/GridOptions.js +++ b/src/js/core/factories/GridOptions.js @@ -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 diff --git a/src/less/icons.less b/src/less/icons.less index 28a081a1f4..1519d14614 100644 --- a/src/less/icons.less +++ b/src/less/icons.less @@ -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 */ /* @@ -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); */ } @@ -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' +}