Merge pull request +12819 from c9/sdk

Sdk prs
pull/272/head
Harutyun Amirjanyan 2016-03-16 22:50:14 +04:00
commit 299120ab23
6 zmienionych plików z 46 dodań i 27 usunięć

Wyświetl plik

@ -26,7 +26,7 @@
"mkdirp": "~0.3.5",
"msgpack-js": "~0.1.1",
"msgpack-js-browser": "~0.1.4",
"nak": "git://github.com/cloud9ide/nak.git#719f2188ec1d8e4ce553286e80737d7e6434d777",
"nak": "git://github.com/cloud9ide/nak.git#6deef931594",
"netutil": "~0.0.2",
"optimist": "~0.6.0",
"qs": "0.6.6",
@ -105,11 +105,11 @@
"c9.ide.recentfiles": "#7c099abf40",
"c9.ide.remote": "#301d2ab519",
"c9.ide.processlist": "#2b12cd1bdd",
"c9.ide.run": "#4f0257bc0b",
"c9.ide.run": "#485f06bd22",
"c9.ide.run.build": "#0598fff697",
"c9.ide.run.debug.xdebug": "#9956689819",
"c9.ide.save": "#86f0f38160",
"c9.ide.scm": "#f1d190fa51",
"c9.ide.save": "#4cda35bfdb",
"c9.ide.scm": "#dc87315012",
"c9.ide.terminal.monitor": "#1a4092ede2",
"c9.ide.test": "#a282ec1619",
"c9.ide.test.mocha": "#fc053b23d2",

Wyświetl plik

@ -245,14 +245,16 @@ define(function(require, module, exports) {
dropdown.setAttribute("value", item.value);
break;
default:
if ("value" in item)
el.setAttribute('value', item.value);
if ("onclick" in item)
el.onclick = item.onclick;
if ("visible" in item)
el.setAttribute("visible", item.visible);
if ("zindex" in item)
el.setAttribute("zindex", item.zindex);
// supported attributes
var validAttributes = /^(value|visible|zindex|disabled|caption|tooltip|command|class|icon|src|submenu)$/;
Object.keys(item).forEach(function(key) {
// Check for onclick explictly
if (key === "onclick")
return el.onclick = item.onclick;
// Check for attributes we know exist and will directly set
if (validAttributes.test(key))
return el.setAttribute(key, item[key]);
});
break;
}
});

Wyświetl plik

@ -214,7 +214,7 @@ define(function(require, exports, module) {
}
}
function proposeLayoutChange(kind, force, type, reset) {
function proposeLayoutChange(kind, force, type) {
if (!force && settings.getBool("user/general/@propose"))
return;
@ -225,7 +225,7 @@ define(function(require, exports, module) {
ignoreTheme = true;
var theme = {"dark": "flat-dark", "light": "flat-light"}[kind];
settings.set("user/general/@skin", theme);
updateTheme(!!reset, type);
updateTheme(false, type);
ignoreTheme = false;
settings.set("user/general/@propose", question.dontAsk);
},
@ -357,6 +357,14 @@ define(function(require, exports, module) {
}), 300, plugin);
}
function resetTheme(theme, type) {
ignoreTheme = true;
settings.set("user/general/@skin", theme);
updateTheme(true);
emit("themeDefaults", {theme: theme, type: type});
ignoreTheme = false;
}
function resize(){
if (c9console && tabManager) {
var tRect = tabManager.container.$ext.getBoundingClientRect();
@ -597,7 +605,7 @@ define(function(require, exports, module) {
get theme(){
return theme;
},
/**
* Returns an AMLElement that can server as a parent.
* @param {Plugin} plugin The plugin for which to find the parent.
@ -613,6 +621,13 @@ define(function(require, exports, module) {
*/
initMenus: initMenus,
/**
* Resets theme (without questioning user).
* @param {String} theme Theme to use.
* @param {String} type Type of editor to use.
*/
resetTheme: resetTheme,
/**
* Sets the layout in one of two default modes:
* @param {"default"|"minimal"} type

Wyświetl plik

@ -38,8 +38,8 @@
<div id="mocha"></div>
<div id='jserror' width='100%' height='20px' style='font: 10px \"courier new\"; color: red; display: none;'></div>
<script src="/static/require.js"></script>
<script src="/static/lib/mocha/mocha.js"></script>
<script src="/static/require.js" crossorigin="true"></script>
<script src="/static/lib/mocha/mocha.js" crossorigin="true"></script>
<script>
/*global mocha*/
mocha.setup('bdd');
@ -57,4 +57,4 @@
});
//--></script>
</body>
</html>
</html>

Wyświetl plik

@ -481,14 +481,16 @@ define(function(require, exports, module) {
}
break;
default:
if ("value" in item)
el.lastChild.setAttribute('value', item.value);
if ("onclick" in item)
el.lastChild.onclick = item.onclick;
if ("visible" in item)
el.lastChild.setAttribute("visible", item.visible)
if ("zindex" in item)
el.lastChild.setAttribute("zindex", item.zindex)
// supported attributes
var validAttributes = /^(value|visible|zindex|disabled|caption|tooltip|command|class|icon|src|submenu)$/;
Object.keys(item).forEach(function(key) {
// Check for onclick explictly
if (key === "onclick")
return el.onclick = item.onclick;
// Check for attributes we know exist and will directly set
if (validAttributes.test(key))
return el.setAttribute(key, item[key]);
});
break;
}
})

Wyświetl plik

@ -96,7 +96,7 @@ updateNodeModules() {
echo "${magenta}--- Running npm install --------------------------------------------${resetColor}"
safeInstall(){
deps=(`"$NODE" -e 'console.log(Object.keys(require("./package.json").dependencies).join(" "))'`)
for m in $deps; do echo $m;
for m in ${deps[@]}; do echo $m;
"$NPM" install --loglevel warn $m || true
done
}