mirror of
https://github.com/linuxserver/core.git
synced 2026-02-20 05:07:19 +08:00
Merge pull request +15536 from c9/ide-fix-various
Ide fix various
This commit is contained in:
commit
6ada42ef4c
@ -227,6 +227,11 @@ define(function(require, exports, module) {
|
||||
|
||||
// Modify
|
||||
|
||||
function confirmStatus(node) {
|
||||
if (node.status === "predicted")
|
||||
node.status = node.isFolder ? "pending" : "loaded";
|
||||
}
|
||||
|
||||
function afterHandler(e) {
|
||||
if (e.error) e.undo && e.undo();
|
||||
else e.confirm && e.confirm();
|
||||
@ -261,8 +266,7 @@ define(function(require, exports, module) {
|
||||
});
|
||||
};
|
||||
e.confirm = function () {
|
||||
if (node.status === "predicted")
|
||||
node.status = isFolder ? "pending" : "loaded";
|
||||
confirmStatus(node);
|
||||
};
|
||||
node.status = "predicted";
|
||||
}
|
||||
@ -355,9 +359,7 @@ define(function(require, exports, module) {
|
||||
createNode(newPath, null, node); // Move node
|
||||
recurPathUpdate(node, oldPath, newPath);
|
||||
}
|
||||
|
||||
if (node.status === "predicted")
|
||||
node.status = "pending";
|
||||
confirmStatus(node);
|
||||
};
|
||||
node.status = "predicted";
|
||||
}, plugin);
|
||||
@ -390,8 +392,7 @@ define(function(require, exports, module) {
|
||||
});
|
||||
};
|
||||
e.confirm = function() {
|
||||
if (node.status === "predicted")
|
||||
node.status = "pending";
|
||||
confirmStatus(node);
|
||||
};
|
||||
node.status = "predicted";
|
||||
}, plugin);
|
||||
@ -430,10 +431,8 @@ define(function(require, exports, module) {
|
||||
removeSingleNode({ path: to });
|
||||
};
|
||||
e.confirm = function() {
|
||||
if (toNode.status === "predicted")
|
||||
toNode.status = e.status;
|
||||
confirmStatus(node);
|
||||
};
|
||||
e._status = node.status == "predicted" ? "pending" : e.status;
|
||||
toNode.status = "predicted";
|
||||
}
|
||||
|
||||
|
||||
@ -256,12 +256,14 @@ define(function(require, exports, module) {
|
||||
|
||||
menus.addItemByPath("Window/Tabs/~", new apf.label({
|
||||
class: "splits",
|
||||
caption: "<span class='nosplit'></span>"
|
||||
+ "<span class='twovsplit'></span>"
|
||||
+ "<span class='twohsplit'></span>"
|
||||
+ "<span class='foursplit'></span>"
|
||||
+ "<span class='threeleft'></span>"
|
||||
+ "<span class='threeright'></span>",
|
||||
caption: [
|
||||
["span", { class: "nosplit" }],
|
||||
["span", { class: "twovsplit" }],
|
||||
["span", { class: "twohsplit" }],
|
||||
["span", { class: "foursplit" }],
|
||||
["span", { class: "threeleft" }],
|
||||
["span", { class: "threeright" }],
|
||||
],
|
||||
onclick: function(e) {
|
||||
var span = e.htmlEvent.target;
|
||||
if (!span || span.tagName != "SPAN") return;
|
||||
|
||||
@ -13796,7 +13796,12 @@ apf.label = function(struct, tagName) {
|
||||
*/
|
||||
this.$supportedProperties.push("caption", "for", "textalign");
|
||||
this.$propHandlers["caption"] = function(value) {
|
||||
this.$caption.textContent = value;
|
||||
if (typeof value == "string")
|
||||
this.$caption.textContent = value;
|
||||
else if (Array.isArray(value)) {
|
||||
this.$caption.textContent = "";
|
||||
apf.buildDom(value, this.$caption);
|
||||
}
|
||||
};
|
||||
this.$propHandlers["for"] = function(value) {
|
||||
forElement = typeof value == "string" ? self[value] : value;
|
||||
|
||||
@ -251,8 +251,10 @@
|
||||
var parts = ("/.c9/metadata" + path).split("/")
|
||||
var name = "!" + parts.pop();
|
||||
var parent = findNode(parts.join("/"), true);
|
||||
if (sync)
|
||||
if (sync) {
|
||||
parent[name] = JSON.stringify(value);
|
||||
return cb();
|
||||
}
|
||||
setTimeout(function() {
|
||||
parent[name] = JSON.stringify(value);
|
||||
cb();
|
||||
@ -405,6 +407,9 @@
|
||||
</script>
|
||||
<script>
|
||||
var start = Date.now();
|
||||
/*dev{*/
|
||||
var href = "/static";
|
||||
/*dev}*/
|
||||
/*packed{
|
||||
var href = location.href.split(/[#&]/)[0].replace(/[^\/]*$/, "");
|
||||
require.MODULE_LOAD_URL = href + "build/standalone/modules";
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user