Permalink
Browse files

Merge branch 'temp' into cloud-new

Conflicts:
	src/node-webkit_shell.js
  • Loading branch information...
2 parents 211c2b5 + 08b1870 commit b6d317249c786340db4dcef6565f1fce357fe42b @zhizhangchen committed Mar 26, 2013
@@ -36,6 +36,7 @@ define(function CSSAgent(require, exports, module) {
require("thirdparty/path-utils/path-utils.min");
var Inspector = require("LiveDevelopment/Inspector/Inspector");
+ var DocumentManager = require("document/DocumentManager");
var _load; // {$.Deferred} load promise
var _urlToStyle; // {url -> loaded} style definition
@@ -51,6 +52,7 @@ define(function CSSAgent(require, exports, module) {
// WebInspector Event: Runtime.loadEventFired
function _onLoadingFinished(event, res) {
+ var doc = DocumentManager.getCurrentDocument();
_urlToStyle = {};
Inspector.CSS.getAllStyleSheets(function onGetAllStyleSheets(res) {
var i, header;
@@ -59,7 +61,10 @@ define(function CSSAgent(require, exports, module) {
_urlToStyle[_canonicalize(header.sourceURL)] = header;
}
_load.resolve();
+ if (doc.extension === "css")
+ reloadCSSForDocument(doc);
});
+
}
/** Get a style sheet for a url
@@ -85,6 +90,8 @@ define(function CSSAgent(require, exports, module) {
*/
function reloadCSSForDocument(doc) {
var style = styleForURL(doc.url);
+ if (!style)
+ return;
console.assert(style, "Style Sheet for document not loaded: " + doc.url);
Inspector.CSS.setStyleSheetText(style.styleSheetId, doc.getText(true));
}
@@ -148,7 +148,7 @@ everyone.now.startProject = function(device, projectRoot, callback){
child_process.exec("web-packaging", function (err, stdout, stderr) {
console.log(stdout);
console.log(stderr);
- _execDeviceCommand("shell mdkir -p " + projectInfo.TEST_WIDGETS_DIR, function () {
+ _execDeviceCommand("shell mkdir -p " + projectInfo.TEST_WIDGETS_DIR, function () {
_execDeviceCommand("push " + pkgName + " "+ projectInfo.tmpPkg, function(err, stdout, stderr) {
process.chdir(cwd);
console.log(stdout);
@@ -355,6 +355,14 @@ function OpenLiveBrowser(callback, url, enableRemoteDebugging){
"minimize" : true,
"dblclick": "collapse"
});
+ iframe.load( function () {
+ iframe.contents().find("#noVNC_canvas").click( function () {
+ iframe[0].contentWindow.focus();
+ })
+ $(window).click(function () {
+ window.focus();
+ })
+ })
$(Inspector).off('connect.RemoteEmulator');
$(Inspector).on('connect.RemoteEmulator', function () {
this.dialog("open");
Submodule CodeMirror2 updated 64 files
+4 −0 addon/dialog/dialog.js
+29 −0 addon/edit/closebrackets.js
+5 −5 addon/edit/closetag.js
+1 −1 addon/edit/continuecomment.js
+8 −5 addon/edit/matchbrackets.js
+49 −20 addon/hint/show-hint.js
+1 −1 addon/hint/xml-hint.js
+121 −0 addon/lint/javascript-lint.js
+14 −0 addon/lint/json-lint.js
+96 −0 addon/lint/lint.css
+182 −0 addon/lint/lint.js
+59 −0 demo/closebrackets.html
+1 −1 demo/complete.html
+7 −0 demo/formatting.html
+90 −0 demo/lint.html
+5 −3 demo/matchhighlighter.html
+73 −0 demo/spanaffectswrapping_shim.html
+1 −1 demo/variableheight.html
+1 −1 demo/xmlcomplete.html
+11 −0 doc/compress.html
+151 −57 doc/manual.html
+5 −0 doc/modes.html
+37 −0 doc/oldrelease.html
+5 −2 doc/realworld.html
+41 −41 index.html
+340 −165 keymap/vim.js
+8 −8 lib/codemirror.css
+409 −199 lib/codemirror.js
+1 −1 mode/clojure/clojure.js
+336 −234 mode/css/css.js
+142 −0 mode/css/scss.html
+77 −0 mode/css/scss_test.js
+4 −1 mode/css/test.js
+1 −0 mode/gfm/gfm.js
+5 −0 mode/gfm/index.html
+29 −1 mode/gfm/test.js
+33 −35 mode/htmlmixed/htmlmixed.js
+22 −1 mode/htmlmixed/index.html
+5 −3 mode/javascript/javascript.js
+76 −25 mode/markdown/markdown.js
+144 −87 mode/markdown/test.js
+4 −0 mode/meta.js
+149 −0 mode/mirc/index.html
+177 −0 mode/mirc/mirc.js
+1 −1 mode/php/php.js
+11 −0 mode/python/index.html
+7 −7 mode/python/python.js
+131 −0 mode/q/index.html
+124 −0 mode/q/q.js
+21 −0 mode/rst/LICENSE.txt
+9 −11 mode/rst/index.html
+486 −250 mode/rst/rst.js
+129 −0 mode/tcl/index.html
+131 −0 mode/tcl/tcl.js
+39 −0 mode/turtle/index.html
+145 −0 mode/turtle/turtle.js
+82 −171 mode/verilog/index.html
+2 −2 package.json
+8 −1 test/doc_test.js
+1 −0 test/index.html
+2 −2 test/mode_test.js
+74 −2 test/test.js
+186 −10 test/vim_test.js
+1 −1 theme/eclipse.css

0 comments on commit b6d3172

Please sign in to comment.