From 296f24eaa52a3ca752180d371ccb15a62823f21e Mon Sep 17 00:00:00 2001 From: benweet Date: Fri, 14 Mar 2014 15:00:11 +0000 Subject: [PATCH] Updated UI for publishing understandability --- .jshintrc | 14 +++++++ Gruntfile.js | 13 +----- bower.json | 2 +- public/res/core.js | 17 +++++--- .../res/extensions/dialogManagePublication.js | 17 ++------ public/res/extensions/documentPanel.js | 2 +- .../res/font/AnonymousPro-Bold-webfont.woff | Bin 0 -> 64580 bytes .../font/AnonymousPro-BoldItalic-webfont.woff | Bin 0 -> 59444 bytes .../res/font/AnonymousPro-Italic-webfont.woff | Bin 0 -> 61680 bytes .../font/AnonymousPro-Regular-webfont.woff | Bin 0 -> 67828 bytes public/res/html/bodyIndex.html | 39 ++++++++---------- public/res/html/dialogAutoSyncGdrive.html | 2 +- .../html/partialRenderingSettingsBlock.html | 2 +- public/res/html/scrollLinkSettingsBlock.html | 2 +- public/res/styles/base.less | 27 +++++++++++- public/res/styles/main.less | 27 ++++++++---- public/res/themes/original.less | 7 ++-- 17 files changed, 102 insertions(+), 69 deletions(-) create mode 100644 .jshintrc create mode 100644 public/res/font/AnonymousPro-Bold-webfont.woff create mode 100644 public/res/font/AnonymousPro-BoldItalic-webfont.woff create mode 100644 public/res/font/AnonymousPro-Italic-webfont.woff create mode 100644 public/res/font/AnonymousPro-Regular-webfont.woff diff --git a/.jshintrc b/.jshintrc new file mode 100644 index 00000000..f0b50c4c --- /dev/null +++ b/.jshintrc @@ -0,0 +1,14 @@ +{ + "curly": true, + "browser": true, + "devel": true, + "indent": 4, + "latedef": true, + "undef": true, + "unused": true, + "expr": true, + "globals": { + "define": false, + "require": false + } +} \ No newline at end of file diff --git a/Gruntfile.js b/Gruntfile.js index c83a2471..cae1fd7a 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -15,18 +15,7 @@ module.exports = function(grunt) { pkg: grunt.file.readJSON('package.json'), jshint: { options: { - curly: true, - browser: true, - devel: true, - indent: 4, - latedef: true, - undef: true, - unused: true, - expr: true, - globals: { - "define": false, - "require": false, - }, + jshintrc: true, ignores: [ 'node_modules/**/*.js', 'public/libs/**/*.js', diff --git a/bower.json b/bower.json index 5560045e..a3f0acca 100644 --- a/bower.json +++ b/bower.json @@ -17,7 +17,7 @@ "stacktrace": "~0.5.3", "requirejs-text": "~2.0.10", "bootstrap-tour": "~0.7.1", - "ace": "4bbe5346f2ae5ad35c0c47defa244ab27aedd451", + "ace": "https://github.com/benweet/ace.git#798a03b2f8b1315fa8ba2d867cee242b90960557", "pagedown-ace": "https://github.com/benweet/pagedown-ace.git#84d5e1b7ff233a1c8cafa9716e825228d275120c", "pagedown-extra": "https://github.com/jmcmanus/pagedown-extra.git#bd0870e3e871e15bde1fa5a427e3e10028a09789", "crel": "https://github.com/KoryNunn/crel.git#8dbda04b129fc0aec01a2a080d1cab26816e11c1", diff --git a/public/res/core.js b/public/res/core.js index 93938e8d..2295e41b 100644 --- a/public/res/core.js +++ b/public/res/core.js @@ -704,7 +704,7 @@ define([ screenWidth = screenWidth || 0; //var codeFontSize = settings.editorFontSize; //var codeLineHeight = Math.round(codeFontSize * 20 / 12); - var previewFontSize = Math.round(size * 8 / 7); + var previewFontSize = size * 13 / 12; styleContent += [ '@media (min-width: ' + screenWidth + 'px) {', '#wmd-input, .textarea-helper {', @@ -717,9 +717,9 @@ define([ '}', ].join('\n'); } - applyFont(14); - applyFont(15, 600); - applyFont(16, 1200); + applyFont(15); + applyFont(16, 600); + applyFont(17, 1200); function applyMaxWidth(maxWidth, screenWidth) { styleContent += [ @@ -837,7 +837,14 @@ define([ }); // Editor - if(window.lightMode) { + if(window.preMode) { + // In light mode, we replace ACE with a textarea + $('#wmd-input').addClass('form-control').attr('contenteditable', true); + + // Create UI layout after textarea + createLayout(); + } + else if(window.lightMode) { // In light mode, we replace ACE with a textarea $('#wmd-input').replaceWith(function() { return $('