diff --git a/configs/client-default.js b/configs/client-default.js index d6d31ec4..d8cf7b69 100644 --- a/configs/client-default.js +++ b/configs/client-default.js @@ -546,7 +546,7 @@ module.exports = function(options) { { packagePath: "plugins/c9.ide.layout.classic/preload", themePrefix: options.themePrefix, - defaultTheme: options.defaultTheme || "flat-light" + defaultTheme: options.defaultTheme || "dark" }, { packagePath: "plugins/c9.ide.tree/tree", diff --git a/node_modules/architect-build/compress.js b/node_modules/architect-build/compress.js index 343f5d70..75cf9808 100644 --- a/node_modules/architect-build/compress.js +++ b/node_modules/architect-build/compress.js @@ -11,8 +11,9 @@ function compress(sources, opts) { var literals = []; sources.forEach(function(pkg){ - if (/^"disable compress"/.test(pkg.source)) + if (/"disable compress"/.test(pkg.source)) { return literals.push(pkg.source); + } if (pkg.file) console.log("Adding '" + pkg.file + "'."); diff --git a/package.json b/package.json index 33d9df86..bf27706c 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "c9", "description": "New Cloud9 Client", - "version": "3.1.1432", + "version": "3.1.1483", "author": "Ajax.org B.V. ", "private": true, "main": "bin/c9", @@ -56,7 +56,7 @@ "c9" ], "c9plugins": { - "c9.ide.language": "#050c0de5a4", + "c9.ide.language": "#4c02a26baf", "c9.ide.language.css": "#be07d72209", "c9.ide.language.generic": "#a4023db7f6", "c9.ide.language.html": "#22fdc74869", @@ -90,7 +90,7 @@ "c9.ide.format": "#5ec97fb083", "c9.ide.help.support": "#e46a619c93", "c9.ide.imgeditor": "#612e75ef4f", - "c9.ide.immediate": "#a962119bec", + "c9.ide.immediate": "#19758abe08", "c9.ide.installer": "#0fde9f0067", "c9.ide.language.python": "#675ddb4c8f", "c9.ide.language.go": "#8f6d0beae7", @@ -102,7 +102,7 @@ "c9.ide.preview.browser": "#a732ce9853", "c9.ide.preview.markdown": "#bc846e1562", "c9.ide.pubsub": "#a85fb27eca", - "c9.ide.readonly": "#f5121c3a57", + "c9.ide.readonly": "#719881e192", "c9.ide.recentfiles": "#7c099abf40", "c9.ide.remote": "#301d2ab519", "c9.ide.processlist": "#2b12cd1bdd", diff --git a/plugins/c9.core/util.js b/plugins/c9.core/util.js index 0fdeb788..048e26ce 100644 --- a/plugins/c9.core/util.js +++ b/plugins/c9.core/util.js @@ -31,80 +31,38 @@ define(function(require, exports, module) { }; var SupportedIcons = { - "application/xhtml+xml":"html", - "text/css": "css", - "text/x-scss": "css", - "text/x-sass": "css", - "text/html":"html", - "application/pdf":"page_white_acrobat", - "image":"image", - "application/xml":"page_white_code_red", - "image/svg+xml": "page_white_picture", - "text/plain": "page_white_text", - "application/javascript": "page_white_code", - "application/json": "page_white_code", - "text/x-script.python": "page_white_code", - "text/x-script.ocaml": "page_white_code", - "text/x-script.clojure": "page_white_code", - "application/x-httpd-php": "page_white_php", - "application/x-sh": "page_white_wrench", - "text/x-coldfusion": "page_white_coldfusion", - "text/x-script.ruby": "page_white_ruby", - "text/x-script.coffeescript": "page_white_cup", - "text/cpp": "page_white_cplusplus", - "text/x-c": "page_white_c", - "text/x-logiql": "logiql", - "text/x-csharp": "page_white_csharp", - "text/x-java-source": "page_white_cup", - "text/x-markdown": "page_white_text", - "text/x-xquery": "page_white_code", - "text/x-go": "page_white_code", - }; - - var contentTypes = { - "c9search": "text/x-c9search", - - "js": "application/javascript", - "json": "application/json", - "run": "application/javascript", - "build": "application/javascript", - "css": "text/css", - "scss": "text/x-scss", - "sass": "text/x-sass", - - "xml": "application/xml", - "rdf": "application/rdf+xml", - "rss": "application/rss+xml", - "svg": "image/svg+xml", - "wsdl": "application/wsdl+xml", - "xslt": "application/xslt+xml", - "atom": "application/atom+xml", - "mathml": "application/mathml+xml", - "mml": "application/mathml+xml", - - "php": "application/x-httpd-php", - "phtml": "application/x-httpd-php", - "html": "text/html", - "xhtml": "application/xhtml+xml", - "coffee": "text/x-script.coffeescript", - "py": "text/x-script.python", - "go": "text/x-go", - "java": "text/x-java-source", - "logic": "text/x-logiql", - - "ru": "text/x-script.ruby", - "gemspec": "text/x-script.ruby", - "rake": "text/x-script.ruby", - "rb": "text/x-script.ruby", - - "c": "text/x-c", - "cc": "text/x-c", - "cpp": "text/x-c", - "cxx": "text/x-c", - "h": "text/x-c", - "hh": "text/x-c", - "hpp": "text/x-c", - + "c9search": "page_white_magnify", + "js": "page_white_code", + "jsx": "page_white_code_red", + "ts": "page_white_code", + "tsx": "page_white_code_red", + "json": "page_white_code", + "css": "css", + "scss": "css", + "sass": "css", + "less": "css", + "xml": "page_white_code_red", + "svg": "page_white_picture", + "php": "page_white_php", + "phtml": "page_white_php", + "html": "html", + "xhtml": "html", + "coffee": "page_white_cup", + "py": "page_white_code", + "go": "page_white_code", + "java": "page_white_cup", + "logic": "logiql", + "ru": "page_white_ruby", + "gemspec": "page_white_ruby", + "rake": "page_white_ruby", + "rb": "page_white_ruby", + "c": "page_white_c", + "cc": "page_white_c", + "cpp": "page_white_cplusplus", + "cxx": "page_white_c", + "h": "page_white_h", + "hh": "page_white_h", + "hpp": "page_white_h", "bmp": "image", "djv": "image", "djvu": "image", @@ -123,19 +81,32 @@ define(function(require, exports, module) { "tiff": "image", "xbm": "image", "xpm": "image", - - "clj": "text/x-script.clojure", - "ml": "text/x-script.ocaml", - "mli": "text/x-script.ocaml", - "cfm": "text/x-coldfusion", - "sql": "text/x-sql", - - "sh": "application/x-sh", - "bash": "application/x-sh", - - "xq": "text/x-xquery", - - "terminal": "terminal" + "pdf": "page_white_acrobat", + "clj": "page_white_code", + "ml": "page_white_code", + "mli": "page_white_code", + "cfm": "page_white_coldfusion", + "sql": "page_white_database", + "db": "page_white_database", + "sh": "page_white_wrench", + "bash": "page_white_wrench", + "xq": "page_white_code", + "xz": "page_white_zip", + "gz": "page_white_zip", + "bz": "page_white_zip", + "zip": "page_white_zip", + "tar": "page_white_zip", + "rar": "page_white_compressed", + "exe": "page_white_swoosh", + "o": "page_white_swoosh", + "lnk": "page_white_swoosh", + "txt": "page_white_text", + "settings": "page_white_gear", + "run": "page_white_gear", + "build": "page_white_gear", + "gitignore": "page_white_gear", + "profile": "page_white_gear", + "bashrc": "page_white_gear", }; plugin.getFileIcon = function(name) { @@ -144,7 +115,7 @@ define(function(require, exports, module) { if (name) { ext = name.split(".").pop().toLowerCase(); - icon = SupportedIcons[contentTypes[ext]] || "page_white_text"; + icon = SupportedIcons[ext] || "page_white_text"; } return icon; }; @@ -167,8 +138,8 @@ define(function(require, exports, module) { }; plugin.getContentType = function(filename) { - var type = filename.split(".").pop().split("!").pop().toLowerCase() || ""; - return contentTypes[type] || "text/plain"; + console.warn("util content type is deprecated"); + return "text/plain"; }; // taken from http://xregexp.com/ diff --git a/plugins/c9.core/util_test.js b/plugins/c9.core/util_test.js index 02c778b9..ef668547 100644 --- a/plugins/c9.core/util_test.js +++ b/plugins/c9.core/util_test.js @@ -25,11 +25,7 @@ require(["lib/architect/architect", "lib/chai/chai"], function (architect, chai) function main(options, imports, register) { var util = imports.util; - describe('getContentType, getFileIcon', function() { - it('should retrieve the content type based on a filename', function() { - expect(util.getContentType("test.js")).to.equal("application/javascript"); - expect(util.getContentType("test.html")).to.equal("text/html"); - }); + describe('getFileIcon', function() { it('should retrieve the icon class name based on a filename', function() { expect(util.getFileIcon("test.js")).to.equal("page_white_code"); expect(util.getFileIcon("test.html")).to.equal("html"); diff --git a/plugins/c9.fs/fs.cache.xml.js b/plugins/c9.fs/fs.cache.xml.js index de85131e..34b693b2 100644 --- a/plugins/c9.fs/fs.cache.xml.js +++ b/plugins/c9.fs/fs.cache.xml.js @@ -571,7 +571,6 @@ define(function(require, exports, module) { if (isFolder) { node.status = node.status || "pending"; } else { - node.contenttype = stat.mime || util.getContentType(name); node.status = "loaded"; } if (typeof stat.mtime !== "number" && stat.mtime) { diff --git a/plugins/c9.ide.ace/ace.js b/plugins/c9.ide.ace/ace.js index 19b2c1fa..ff712657 100644 --- a/plugins/c9.ide.ace/ace.js +++ b/plugins/c9.ide.ace/ace.js @@ -2058,8 +2058,8 @@ define(function(require, exports, module) { else { tab.classList.remove("dark"); html.style.boxShadow = skin.indexOf("flat") == -1 - "0 1px 0 0 rgba(255, 255, 255, .3) inset" - ""; + ? "0 1px 0 0 rgba(255, 255, 255, .3) inset" + : ""; } html.style.backgroundColor = theme.bg; @@ -2104,7 +2104,7 @@ define(function(require, exports, module) { value = false; // Own Implementations - switch(name) { + switch (name) { case "theme": ace.setTheme(value); return; @@ -2537,13 +2537,16 @@ define(function(require, exports, module) { var data = ace.getCopyText(); ace.onCut(); - e.clipboardData.setData("text/plain", data); + data && e.clipboardData.setData("text/plain", data); }); plugin.on("copy", function(e) { if (e.native) return; // Ace handles this herself var data = ace.getCopyText(); - e.clipboardData.setData("text/plain", data); + // check if user tries to copy text from line widget + if (!data && document.activeElement != ace.textInput.getElement()) + data = document.getSelection().toString().replace(/\xa0/, " "); + data && e.clipboardData.setData("text/plain", data); }); plugin.on("paste", function(e) { if (e.native) return; // Ace handles this herself @@ -2685,7 +2688,6 @@ define(function(require, exports, module) { else { return handle.theme; } - return theme; }, _events: [ diff --git a/plugins/c9.ide.layout.classic/images/loadingbgrepeat.png b/plugins/c9.ide.layout.classic/images/loadingbgrepeat.png new file mode 100644 index 00000000..36bf5231 Binary files /dev/null and b/plugins/c9.ide.layout.classic/images/loadingbgrepeat.png differ diff --git a/plugins/c9.ide.layout.classic/images/loadingbgrepeat_dark.png b/plugins/c9.ide.layout.classic/images/loadingbgrepeat_dark.png new file mode 100644 index 00000000..59b180f6 Binary files /dev/null and b/plugins/c9.ide.layout.classic/images/loadingbgrepeat_dark.png differ diff --git a/plugins/c9.ide.layout.classic/loading-flat.css b/plugins/c9.ide.layout.classic/loading-flat.css index ec126a23..ac1b168d 100644 --- a/plugins/c9.ide.layout.classic/loading-flat.css +++ b/plugins/c9.ide.layout.classic/loading-flat.css @@ -1,12 +1,16 @@ -BODY.loading{ - background: -moz-linear-gradient(top, rgba(255,255,255,1) 0%, rgba(251,251,251,1) 100%); /* FF3.6-15 */ - background: -webkit-linear-gradient(top, rgba(255,255,255,1) 0%,rgba(251,251,251,1) 100%); /* Chrome10-25,Safari5.1-6 */ - background: linear-gradient(to bottom, rgba(255,255,255,1) 0%,rgba(251,251,251,1) 100%); /* W3C, IE10+, FF16+, Chrome26+, Opera12+, Safari7+ */ +#loadingcontainer{ + background: url(images/loadingbgrepeat.png); + background-size: 1px 8px; + height: 100%; + width: 100%; + position: fixed; + z-index: 200000; + left: 0; + top: 0; } -BODY.loading.dark{ - background: -moz-linear-gradient(top, rgba(37,37,37,1) 0%, rgba(35,35,35,1) 100%); /* FF3.6-15 */ - background: -webkit-linear-gradient(top, rgba(37,37,37,1) 0%,rgba(35,35,35,1) 100%); /* Chrome10-25,Safari5.1-6 */ - background: linear-gradient(to bottom, rgba(37,37,37,1) 0%,rgba(35,35,35,1) 100%); /* W3C, IE10+, FF16+, Chrome26+, Opera12+, Safari7+ */ +#loadingcontainer.dark{ + background: url(images/loadingbgrepeat_dark.png); + background-size: 1px 8px; } #loadingide { @@ -16,15 +20,15 @@ BODY.loading.dark{ font-style: normal; height: 100%; width: 100%; - position: fixed; - text-align: center; + position: absolute; z-index: 200000; left: 0; top: 0; + text-align: center; -webkit-font-smoothing: antialiased !important; -moz-osx-font-smoothing: grayscale !important; } -#loadingide.dark { +.dark #loadingide{ background-image: url(images/c9-logo-white.png); } @@ -118,14 +122,14 @@ BODY.loading.dark{ width: 200px; text-align: center; top: 57%; - margin-top: 200px; + margin-top: 0; } #loadingide .cool-message { display: block; font-family: Arial; font-size: 30px; - color: #A7A7A7; + color: #717171; white-space: nowrap; position: absolute; top: 30%; @@ -133,7 +137,7 @@ BODY.loading.dark{ width: 1000px; text-align: center; margin-left: -500px; - margin-top: 250px; + margin-top: 350px; } #loadingide.dark .cool-message { color: #757575; @@ -143,10 +147,14 @@ BODY.loading.dark{ background: url(images/running_flat_light@2x.png); background-size: 300px 20px; animation: rotation 0.6s infinite steps(16); - width: 20px; - height: 20px; + width: 20px !important; + height: 20px !important; background-repeat: no-repeat; display: inline-block; + min-width: 20px !important; + min-height: 20px !important; + box-sizing: content-box; + border: 0; } @-webkit-keyframes rotation { 0% { -webkit-transform: rotate(0deg); transform: rotate(0deg); } 100% {-webkit-transform: rotate(359deg); transform: rotate(359deg);}} diff --git a/plugins/c9.ide.server/views/flat-load-screen.html b/plugins/c9.ide.server/views/flat-load-screen.html index f59a85e1..4d1d96b6 100644 --- a/plugins/c9.ide.server/views/flat-load-screen.html +++ b/plugins/c9.ide.server/views/flat-load-screen.html @@ -1,14 +1,16 @@ -
"> -
- - -
-
-