Merge branch 'master' of github.com:c9/newclient into integrate-upgrade-upsell-dialog

pull/282/head
Mutahhir 2016-02-22 08:12:06 +00:00
commit aa9b87a210
14 zmienionych plików z 139 dodań i 157 usunięć

Wyświetl plik

@ -546,7 +546,7 @@ module.exports = function(options) {
{ {
packagePath: "plugins/c9.ide.layout.classic/preload", packagePath: "plugins/c9.ide.layout.classic/preload",
themePrefix: options.themePrefix, themePrefix: options.themePrefix,
defaultTheme: options.defaultTheme || "flat-light" defaultTheme: options.defaultTheme || "dark"
}, },
{ {
packagePath: "plugins/c9.ide.tree/tree", packagePath: "plugins/c9.ide.tree/tree",

Wyświetl plik

@ -11,8 +11,9 @@ function compress(sources, opts) {
var literals = []; var literals = [];
sources.forEach(function(pkg){ sources.forEach(function(pkg){
if (/^"disable compress"/.test(pkg.source)) if (/"disable compress"/.test(pkg.source)) {
return literals.push(pkg.source); return literals.push(pkg.source);
}
if (pkg.file) console.log("Adding '" + pkg.file + "'."); if (pkg.file) console.log("Adding '" + pkg.file + "'.");

Wyświetl plik

@ -1,7 +1,7 @@
{ {
"name": "c9", "name": "c9",
"description": "New Cloud9 Client", "description": "New Cloud9 Client",
"version": "3.1.1432", "version": "3.1.1483",
"author": "Ajax.org B.V. <info@ajax.org>", "author": "Ajax.org B.V. <info@ajax.org>",
"private": true, "private": true,
"main": "bin/c9", "main": "bin/c9",
@ -56,7 +56,7 @@
"c9" "c9"
], ],
"c9plugins": { "c9plugins": {
"c9.ide.language": "#050c0de5a4", "c9.ide.language": "#4c02a26baf",
"c9.ide.language.css": "#be07d72209", "c9.ide.language.css": "#be07d72209",
"c9.ide.language.generic": "#a4023db7f6", "c9.ide.language.generic": "#a4023db7f6",
"c9.ide.language.html": "#22fdc74869", "c9.ide.language.html": "#22fdc74869",
@ -90,7 +90,7 @@
"c9.ide.format": "#5ec97fb083", "c9.ide.format": "#5ec97fb083",
"c9.ide.help.support": "#e46a619c93", "c9.ide.help.support": "#e46a619c93",
"c9.ide.imgeditor": "#612e75ef4f", "c9.ide.imgeditor": "#612e75ef4f",
"c9.ide.immediate": "#a962119bec", "c9.ide.immediate": "#19758abe08",
"c9.ide.installer": "#0fde9f0067", "c9.ide.installer": "#0fde9f0067",
"c9.ide.language.python": "#675ddb4c8f", "c9.ide.language.python": "#675ddb4c8f",
"c9.ide.language.go": "#8f6d0beae7", "c9.ide.language.go": "#8f6d0beae7",
@ -102,7 +102,7 @@
"c9.ide.preview.browser": "#a732ce9853", "c9.ide.preview.browser": "#a732ce9853",
"c9.ide.preview.markdown": "#bc846e1562", "c9.ide.preview.markdown": "#bc846e1562",
"c9.ide.pubsub": "#a85fb27eca", "c9.ide.pubsub": "#a85fb27eca",
"c9.ide.readonly": "#f5121c3a57", "c9.ide.readonly": "#719881e192",
"c9.ide.recentfiles": "#7c099abf40", "c9.ide.recentfiles": "#7c099abf40",
"c9.ide.remote": "#301d2ab519", "c9.ide.remote": "#301d2ab519",
"c9.ide.processlist": "#2b12cd1bdd", "c9.ide.processlist": "#2b12cd1bdd",

Wyświetl plik

@ -31,80 +31,38 @@ define(function(require, exports, module) {
}; };
var SupportedIcons = { var SupportedIcons = {
"application/xhtml+xml":"html", "c9search": "page_white_magnify",
"text/css": "css", "js": "page_white_code",
"text/x-scss": "css", "jsx": "page_white_code_red",
"text/x-sass": "css", "ts": "page_white_code",
"text/html":"html", "tsx": "page_white_code_red",
"application/pdf":"page_white_acrobat", "json": "page_white_code",
"image":"image", "css": "css",
"application/xml":"page_white_code_red", "scss": "css",
"image/svg+xml": "page_white_picture", "sass": "css",
"text/plain": "page_white_text", "less": "css",
"application/javascript": "page_white_code", "xml": "page_white_code_red",
"application/json": "page_white_code", "svg": "page_white_picture",
"text/x-script.python": "page_white_code", "php": "page_white_php",
"text/x-script.ocaml": "page_white_code", "phtml": "page_white_php",
"text/x-script.clojure": "page_white_code", "html": "html",
"application/x-httpd-php": "page_white_php", "xhtml": "html",
"application/x-sh": "page_white_wrench", "coffee": "page_white_cup",
"text/x-coldfusion": "page_white_coldfusion", "py": "page_white_code",
"text/x-script.ruby": "page_white_ruby", "go": "page_white_code",
"text/x-script.coffeescript": "page_white_cup", "java": "page_white_cup",
"text/cpp": "page_white_cplusplus", "logic": "logiql",
"text/x-c": "page_white_c", "ru": "page_white_ruby",
"text/x-logiql": "logiql", "gemspec": "page_white_ruby",
"text/x-csharp": "page_white_csharp", "rake": "page_white_ruby",
"text/x-java-source": "page_white_cup", "rb": "page_white_ruby",
"text/x-markdown": "page_white_text", "c": "page_white_c",
"text/x-xquery": "page_white_code", "cc": "page_white_c",
"text/x-go": "page_white_code", "cpp": "page_white_cplusplus",
}; "cxx": "page_white_c",
"h": "page_white_h",
var contentTypes = { "hh": "page_white_h",
"c9search": "text/x-c9search", "hpp": "page_white_h",
"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",
"bmp": "image", "bmp": "image",
"djv": "image", "djv": "image",
"djvu": "image", "djvu": "image",
@ -123,19 +81,32 @@ define(function(require, exports, module) {
"tiff": "image", "tiff": "image",
"xbm": "image", "xbm": "image",
"xpm": "image", "xpm": "image",
"pdf": "page_white_acrobat",
"clj": "text/x-script.clojure", "clj": "page_white_code",
"ml": "text/x-script.ocaml", "ml": "page_white_code",
"mli": "text/x-script.ocaml", "mli": "page_white_code",
"cfm": "text/x-coldfusion", "cfm": "page_white_coldfusion",
"sql": "text/x-sql", "sql": "page_white_database",
"db": "page_white_database",
"sh": "application/x-sh", "sh": "page_white_wrench",
"bash": "application/x-sh", "bash": "page_white_wrench",
"xq": "page_white_code",
"xq": "text/x-xquery", "xz": "page_white_zip",
"gz": "page_white_zip",
"terminal": "terminal" "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) { plugin.getFileIcon = function(name) {
@ -144,7 +115,7 @@ define(function(require, exports, module) {
if (name) { if (name) {
ext = name.split(".").pop().toLowerCase(); ext = name.split(".").pop().toLowerCase();
icon = SupportedIcons[contentTypes[ext]] || "page_white_text"; icon = SupportedIcons[ext] || "page_white_text";
} }
return icon; return icon;
}; };
@ -167,8 +138,8 @@ define(function(require, exports, module) {
}; };
plugin.getContentType = function(filename) { plugin.getContentType = function(filename) {
var type = filename.split(".").pop().split("!").pop().toLowerCase() || ""; console.warn("util content type is deprecated");
return contentTypes[type] || "text/plain"; return "text/plain";
}; };
// taken from http://xregexp.com/ // taken from http://xregexp.com/

Wyświetl plik

@ -25,11 +25,7 @@ require(["lib/architect/architect", "lib/chai/chai"], function (architect, chai)
function main(options, imports, register) { function main(options, imports, register) {
var util = imports.util; var util = imports.util;
describe('getContentType, getFileIcon', function() { describe('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");
});
it('should retrieve the icon class name based on a filename', 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.js")).to.equal("page_white_code");
expect(util.getFileIcon("test.html")).to.equal("html"); expect(util.getFileIcon("test.html")).to.equal("html");

Wyświetl plik

@ -571,7 +571,6 @@ define(function(require, exports, module) {
if (isFolder) { if (isFolder) {
node.status = node.status || "pending"; node.status = node.status || "pending";
} else { } else {
node.contenttype = stat.mime || util.getContentType(name);
node.status = "loaded"; node.status = "loaded";
} }
if (typeof stat.mtime !== "number" && stat.mtime) { if (typeof stat.mtime !== "number" && stat.mtime) {

Wyświetl plik

@ -2058,8 +2058,8 @@ define(function(require, exports, module) {
else { else {
tab.classList.remove("dark"); tab.classList.remove("dark");
html.style.boxShadow = skin.indexOf("flat") == -1 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; html.style.backgroundColor = theme.bg;
@ -2104,7 +2104,7 @@ define(function(require, exports, module) {
value = false; value = false;
// Own Implementations // Own Implementations
switch(name) { switch (name) {
case "theme": case "theme":
ace.setTheme(value); ace.setTheme(value);
return; return;
@ -2537,13 +2537,16 @@ define(function(require, exports, module) {
var data = ace.getCopyText(); var data = ace.getCopyText();
ace.onCut(); ace.onCut();
e.clipboardData.setData("text/plain", data); data && e.clipboardData.setData("text/plain", data);
}); });
plugin.on("copy", function(e) { plugin.on("copy", function(e) {
if (e.native) return; // Ace handles this herself if (e.native) return; // Ace handles this herself
var data = ace.getCopyText(); 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) { plugin.on("paste", function(e) {
if (e.native) return; // Ace handles this herself if (e.native) return; // Ace handles this herself
@ -2685,7 +2688,6 @@ define(function(require, exports, module) {
else { else {
return handle.theme; return handle.theme;
} }
return theme;
}, },
_events: [ _events: [

Plik binarny nie jest wyświetlany.

Po

Szerokość:  |  Wysokość:  |  Rozmiar: 934 B

Plik binarny nie jest wyświetlany.

Po

Szerokość:  |  Wysokość:  |  Rozmiar: 944 B

Wyświetl plik

@ -1,12 +1,16 @@
BODY.loading{ #loadingcontainer{
background: -moz-linear-gradient(top, rgba(255,255,255,1) 0%, rgba(251,251,251,1) 100%); /* FF3.6-15 */ background: url(images/loadingbgrepeat.png);
background: -webkit-linear-gradient(top, rgba(255,255,255,1) 0%,rgba(251,251,251,1) 100%); /* Chrome10-25,Safari5.1-6 */ background-size: 1px 8px;
background: linear-gradient(to bottom, rgba(255,255,255,1) 0%,rgba(251,251,251,1) 100%); /* W3C, IE10+, FF16+, Chrome26+, Opera12+, Safari7+ */ height: 100%;
width: 100%;
position: fixed;
z-index: 200000;
left: 0;
top: 0;
} }
BODY.loading.dark{ #loadingcontainer.dark{
background: -moz-linear-gradient(top, rgba(37,37,37,1) 0%, rgba(35,35,35,1) 100%); /* FF3.6-15 */ background: url(images/loadingbgrepeat_dark.png);
background: -webkit-linear-gradient(top, rgba(37,37,37,1) 0%,rgba(35,35,35,1) 100%); /* Chrome10-25,Safari5.1-6 */ background-size: 1px 8px;
background: linear-gradient(to bottom, rgba(37,37,37,1) 0%,rgba(35,35,35,1) 100%); /* W3C, IE10+, FF16+, Chrome26+, Opera12+, Safari7+ */
} }
#loadingide { #loadingide {
@ -16,15 +20,15 @@ BODY.loading.dark{
font-style: normal; font-style: normal;
height: 100%; height: 100%;
width: 100%; width: 100%;
position: fixed; position: absolute;
text-align: center;
z-index: 200000; z-index: 200000;
left: 0; left: 0;
top: 0; top: 0;
text-align: center;
-webkit-font-smoothing: antialiased !important; -webkit-font-smoothing: antialiased !important;
-moz-osx-font-smoothing: grayscale !important; -moz-osx-font-smoothing: grayscale !important;
} }
#loadingide.dark { .dark #loadingide{
background-image: url(images/c9-logo-white.png); background-image: url(images/c9-logo-white.png);
} }
@ -118,14 +122,14 @@ BODY.loading.dark{
width: 200px; width: 200px;
text-align: center; text-align: center;
top: 57%; top: 57%;
margin-top: 200px; margin-top: 0;
} }
#loadingide .cool-message { #loadingide .cool-message {
display: block; display: block;
font-family: Arial; font-family: Arial;
font-size: 30px; font-size: 30px;
color: #A7A7A7; color: #717171;
white-space: nowrap; white-space: nowrap;
position: absolute; position: absolute;
top: 30%; top: 30%;
@ -133,7 +137,7 @@ BODY.loading.dark{
width: 1000px; width: 1000px;
text-align: center; text-align: center;
margin-left: -500px; margin-left: -500px;
margin-top: 250px; margin-top: 350px;
} }
#loadingide.dark .cool-message { #loadingide.dark .cool-message {
color: #757575; color: #757575;
@ -143,10 +147,14 @@ BODY.loading.dark{
background: url(images/running_flat_light@2x.png); background: url(images/running_flat_light@2x.png);
background-size: 300px 20px; background-size: 300px 20px;
animation: rotation 0.6s infinite steps(16); animation: rotation 0.6s infinite steps(16);
width: 20px; width: 20px !important;
height: 20px; height: 20px !important;
background-repeat: no-repeat; background-repeat: no-repeat;
display: inline-block; 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);}} @-webkit-keyframes rotation { 0% { -webkit-transform: rotate(0deg); transform: rotate(0deg); } 100% {-webkit-transform: rotate(359deg); transform: rotate(359deg);}}

Wyświetl plik

@ -1,14 +1,16 @@
<link rel="stylesheet" type="text/css" href="<%=staticPrefix%>/plugins/c9.ide.layout.classic/loading-flat.css" /> <link rel="stylesheet" type="text/css" href="<%=staticPrefix%>/plugins/c9.ide.layout.classic/loading-flat.css" />
<div id="loadingide" class="<%-: theme + (isDark ? " dark" : "") %>"> <div id="loadingcontainer" class="<%-: theme + (isDark ? " dark" : "") %>">
<div class="cool-message"></div> <div id="loadingide">
<div class="status" style="display:none"><div class="spinner"></div></div> <div class="cool-message"></div>
<div class="status" style="display:none"><div class="spinner"></div></div>
<div id="content" class="loading-progress">
</div> <div id="content" class="loading-progress">
<div class="footer"> </div>
<a href="https://docs.c9.io">Documentation</a> | <div class="footer">
<a href="http://status.c9.io">Server Status</a> | <a href="https://docs.c9.io">Documentation</a> |
<a href="http://support.c9.io">Support</a> <a href="http://status.c9.io">Server Status</a> |
<a href="http://support.c9.io">Support</a>
</div>
</div> </div>
</div> </div>
<script> <script>
@ -19,30 +21,24 @@
"It's better up here.", "It's better up here.",
"Happy coding!", "Happy coding!",
"Everything as you left it.", "Everything as you left it.",
"Give some love to your colleague on the left!",
"Thank you Ada Lovelace!", "Thank you Ada Lovelace!",
"Feel the power of a full IDE &mdash; in the cloud.",
"Code for the cloud, in the cloud",
"Out with the old, in with the new",
"POST /desktop/era", "POST /desktop/era",
"#OnCloud9",
"I &#10084; Cloud9",
"My life. My code. My Cloud9.",
"For the love of code",
"Get Your Code On",
"Skip the hazing, love the coding",
"Stop cursing, start coding",
"GET /this/workspace#loaded",
"Use our Vim mode for extra addictive effect!", "Use our Vim mode for extra addictive effect!",
"Not your grandmother's IDE", "Not your grandmother's IDE",
"Now made with 20% more cloud!", "Now made with 20% more cloud!",
"Literally makes your laptop cooler", "Makes your laptop cooler"
]; ];
var idx = Math.floor(Math.random() * messages.length); var idx = Math.floor(Math.random() * messages.length);
if (idx == messages.length) idx = messages.length - 1; if (idx == messages.length) idx = messages.length - 1;
document.querySelector("#loadingide .cool-message").innerHTML = var msg = messages[idx];
messages[idx];
if (~location.hash.indexOf("create")) {
msg = "Creating Your New Workspace";
location.hash = location.hash.replace(/&?create/, "");
}
document.querySelector("#loadingide .cool-message").innerHTML = msg;
setTimeout(function(){ setTimeout(function(){
var s = document.querySelector("#loadingide .status"); var s = document.querySelector("#loadingide .status");
@ -50,7 +46,7 @@
}, 2000); }, 2000);
window.hideLoader = function(){ window.hideLoader = function(){
var loader = document.getElementById("loadingide"); var loader = document.getElementById("loadingcontainer");
loader.parentNode.removeChild(loader); loader.parentNode.removeChild(loader);
document.body.className = document.body.className.replace("loading " + loadingIde.className, ""); document.body.className = document.body.className.replace("loading " + loadingIde.className, "");

Wyświetl plik

@ -285,8 +285,7 @@ define(function(require, exports, module) {
* *
* Example: * Example:
* *
* anims.animateMultiple({ * anims.animate(node, {
* node : someDiv,
* width : "200px", * width : "200px",
* height : "300px" * height : "300px"
* }, function(){}); * }, function(){});

Wyświetl plik

@ -87,7 +87,7 @@ define(function(require, exports, module) {
// first time take the ones from the options // first time take the ones from the options
var _servers = servers; var _servers = servers;
if (_servers) { if (_servers && _servers.length) {
servers = null; servers = null;
return callback(null, _servers); return callback(null, _servers);
} }

Wyświetl plik

@ -101,13 +101,23 @@
// For Development only // For Development only
function done(){ function done(){
app.services.c9.ready(); var vfs = app.services.vfs;
app.services.c9.totalLoadTime = Date.now() - start; var c9 = app.services.c9;
c9.ready();
c9.totalLoadTime = Date.now() - start;
console.warn("Total Load Time: ", Date.now() - start); console.warn("Total Load Time: ", Date.now() - start);
if (window.hideLoader) if (window.hideLoader) {
window.hideLoader(); if (vfs.connected)
window.hideLoader();
else {
vfs.once("connect", function(){
window.hideLoader();
});
}
}
} }
}, function loadError(mod) { }, function loadError(mod) {
if (mod.id === "plugins/c9.ide.clipboard/html5") if (mod.id === "plugins/c9.ide.clipboard/html5")