Skip to content

Commit

Permalink
Significant bug fixes
Browse files Browse the repository at this point in the history
- Cleaned up less & css files
- Fixed Ace highlighting (modified `crunch` theme)
- Fixed Ace clipboard
  • Loading branch information
losnir committed Jul 30, 2013
1 parent 607a5b9 commit 742b6a4
Show file tree
Hide file tree
Showing 7 changed files with 132 additions and 2,901 deletions.
8 changes: 3 additions & 5 deletions css/skin2.css
Expand Up @@ -11,9 +11,7 @@ h3{color:#807540;font-size:17px;font-family:Quicksand,sans-serif;margin-top:0;ma
.CodeMirror{border:1px solid black;background:white}
#toolbar{background:url(../img/skin2/filebar-repeat.png) repeat-x top;height:27px;padding-left:10px}
body.modal{min-width:0;position:fixed;top:0;left:0;right:0;bottom:0;padding-left:138px;padding-top:20px;padding-right:20px;text-shadow:0 1px 0 rgba(255,255,255,0.43);background:url(../img/skin2/modal-icon.png) no-repeat left top,#f2f0ed url(../img/crunch-texture.png);font-size:13.2px;font-weight:bold}
.modal h2{padding:0;margin:0;font-size:16px}
.modal h3{padding:0;margin:4px 0 0 0;font-size:11px}
.modal p{margin-top:10px}
.modal h2{margin-bottom:10px;font-size:16px}
.modal .img{position:absolute;left:0;top:0;height:50px;width:65px}
.modal .save{background-image:url(../img/skin/app-icons.png);height:50px;width:65px;top:-15px;left:-8px;background-position:-146px 0}
.buttonbar{position:absolute;bottom:0px;left:0px;right:0px;height:39px;padding:10px;padding-top:20px;text-align:right;background:url(../img/crunch-texture.png) repeat,url(../img/skin2/modal-bottom-repeat.png) repeat-x}
Expand Down Expand Up @@ -81,7 +79,7 @@ body.modal{min-width:0;position:fixed;top:0;left:0;right:0;bottom:0;padding-left
#resize:before{background:url(../img/skin/resize.png) no-repeat left;display:block;width:100%;height:100%}
.CRD #resize{left:-1px}
#editor-bg{border-left:1px solid #bb9f8a;background:#f9f8f5 url(../img/skin2/editor-left-repeat.png) repeat-y left;background-position:0px 0}
.messages.show+.editor{bottom:80px}
.messages.show+.editor.ace-crunch{bottom:80px}
.messages{position:absolute;bottom:-4px;left:46px;right:0;height:0;font-size:10px;padding:15px;background:rgba(244,232,168,0.8);z-index:100;border-top:1px solid #b29681;height:52px;display:none;color:#817641;line-height:1}
.messages .description{font-family:Ubuntu,"Courier New",Courier,monospace;font-size:12px;font-weight:normal}
.messages.show{display:block}
Expand Down Expand Up @@ -157,4 +155,4 @@ body.modal .secondary{}
#actions li{width:63px;height:56px;opacity:0.5}#actions li:hover{opacity:1}
#actions li.active{opacity:1}
#tab-project{background:url("../img/skin2/sideicon-project.png") no-repeat center}#tab-project.active{background:url("../img/skin2/sideicon-project-active.png") no-repeat center,url("../img/skin2/sideicon-activebg.png") no-repeat}
#tab-prefs{background:url("../img/skin2/sideicon-prefs.png") no-repeat center}#tab-prefs.active{background:url("../img/skin2/sideicon-prefs-active.png") no-repeat center,url("../img/skin2/sideicon-activebg.png") no-repeat}
#tab-prefs{background:url("../img/skin2/sideicon-prefs.png") no-repeat center}#tab-prefs.active{background:url("../img/skin2/sideicon-prefs-active.png") no-repeat center,url("../img/skin2/sideicon-activebg.png") no-repeat}
15 changes: 11 additions & 4 deletions js/ace/ace.js
Expand Up @@ -3689,7 +3689,9 @@ var TextInput = function(parentNode, host) {
return;
}

var clipboardData = e.clipboardData || window.clipboardData;
/* Crunch; @losnir: Use old clipboard method for Adobe AIR - it does not support `clipboardData` data object natively
var clipboardData = e.clipboardData || window.clipboardData; */
var clipboardData = useragent.isAIR ? false : (e.clipboardData || window.clipboardData);

if (clipboardData && !BROKEN_SETDATA) {
var supported = clipboardData.setData("Text", data);
Expand Down Expand Up @@ -3719,7 +3721,10 @@ var TextInput = function(parentNode, host) {
return;
}

var clipboardData = e.clipboardData || window.clipboardData;
/* Crunch; @losnir: Use old clipboard method for Adobe AIR - it does not support `clipboardData` data object natively
var clipboardData = e.clipboardData || window.clipboardData; */
var clipboardData = useragent.isAIR ? false : (e.clipboardData || window.clipboardData);

if (clipboardData && !BROKEN_SETDATA) {
var supported = clipboardData.setData("Text", data);
if (supported) {
Expand All @@ -3741,7 +3746,9 @@ var TextInput = function(parentNode, host) {
};

var onPaste = function(e) {
var clipboardData = e.clipboardData || window.clipboardData;
/* Crunch; @losnir: Use old clipboard method for Adobe AIR - it does not support `clipboardData` data object natively
var clipboardData = e.clipboardData || window.clipboardData; */
var clipboardData = useragent.isAIR ? false : (e.clipboardData || window.clipboardData);

if (clipboardData) {
var data = clipboardData.getData("Text");
Expand Down Expand Up @@ -12788,7 +12795,7 @@ var VirtualRenderer = function(container, theme) {

this.$gutterLayer.element.style.marginTop = (-offset) + "px";
this.content.style.marginTop = (-offset) + "px";

/* Crunch; @losnir: I had to hack this part to prevent extremely long lines (typically data-uri's)
from cropping due to a bug in WebKit that turns CSS's high-value int to scientific notation,
which prevents the child elements from stretching to 100% width. The fix works by explicitly
Expand Down
30 changes: 30 additions & 0 deletions js/ace/ext-themelist.js
Expand Up @@ -55,6 +55,36 @@ module.exports.themes = module.exports.themes.map(function(name) {
define('ace/ext/themelist_utils/themes', ['require', 'exports', 'module' ], function(require, exports, module) {

module.exports.themes = [
"ambiance",
"chaos",
"chrome",
"clouds",
"clouds_midnight",
"cobalt",
"crimson_editor",
"dawn",
"dreamweaver",
"eclipse",
"github",
"idle_fingers",
"kr_theme",
"merbivore",
"merbivore_soft",
"monokai",
"mono_industrial",
"pastel_on_dark",
"solarized_dark",
"solarized_light",
"terminal",
"textmate",
"tomorrow",
"tomorrow_night",
"tomorrow_night_blue",
"tomorrow_night_bright",
"tomorrow_night_eighties",
"twilight",
"vibrant_ink",
"xcode",
"crunch"
];

Expand Down

0 comments on commit 742b6a4

Please sign in to comment.