|
Lines 56-62
Link Here
|
| 56 |
}; |
56 |
}; |
| 57 |
|
57 |
|
| 58 |
GitRepositoryExplorer.prototype.changedItem = function(parent, children) { |
58 |
GitRepositoryExplorer.prototype.changedItem = function(parent, children) { |
| 59 |
console.info("item changed: " + parent + " " + children); |
|
|
| 60 |
this.redisplayClonesList(); |
59 |
this.redisplayClonesList(); |
| 61 |
}; |
60 |
}; |
| 62 |
|
61 |
|
|
Lines 95-101
Link Here
|
| 95 |
that.displayCommits(repositories[0]); |
94 |
that.displayCommits(repositories[0]); |
| 96 |
that.displayBranches(repositories[0]); |
95 |
that.displayBranches(repositories[0]); |
| 97 |
that.displayTags(repositories[0]); |
96 |
that.displayTags(repositories[0]); |
| 98 |
that.displayRemotes(repositories[0]); |
97 |
that.displayRemotes(repositories[0]); |
|
|
98 |
that.displayConfig(repositories[0]); |
| 99 |
} else if (resp.Children[0].Type === "Clone"){ |
99 |
} else if (resp.Children[0].Type === "Clone"){ |
| 100 |
var repositories = resp.Children; |
100 |
var repositories = resp.Children; |
| 101 |
|
101 |
|
|
Lines 128-133
Link Here
|
| 128 |
|
128 |
|
| 129 |
that.displayRepositories(repositories, "mini", true); |
129 |
that.displayRepositories(repositories, "mini", true); |
| 130 |
that.displayTags(repositories[0], "full"); |
130 |
that.displayTags(repositories[0], "full"); |
|
|
131 |
}, function () { |
| 132 |
dojo.hitch(that, that.handleError)(error); |
| 133 |
} |
| 134 |
); |
| 135 |
} else if (resp.Children[0].Type === "Config"){ |
| 136 |
that.registry.getService("orion.git.provider").getGitClone(resp.CloneLocation).then( |
| 137 |
function(resp){ |
| 138 |
var repositories = resp.Children; |
| 139 |
|
| 140 |
that.initTitleBar(repositories[0], "Configuration"); |
| 141 |
|
| 142 |
that.displayRepositories(repositories, "mini", true); |
| 143 |
that.displayConfig(repositories[0], "full"); |
| 131 |
}, function () { |
144 |
}, function () { |
| 132 |
dojo.hitch(that, that.handleError)(error); |
145 |
dojo.hitch(that, that.handleError)(error); |
| 133 |
} |
146 |
} |
|
Lines 995-1000
Link Here
|
| 995 |
|
1008 |
|
| 996 |
}; |
1009 |
}; |
| 997 |
|
1010 |
|
|
|
1011 |
// Git Config |
| 1012 |
|
| 1013 |
GitRepositoryExplorer.prototype.displayConfig = function(repository, mode){ |
| 1014 |
|
| 1015 |
var configLocation = repository.ConfigLocation; |
| 1016 |
|
| 1017 |
var that = this; |
| 1018 |
|
| 1019 |
var tableNode = dojo.byId( 'table' ); |
| 1020 |
|
| 1021 |
var titleWrapper = dojo.create( "div", {"class":"auxpaneHeading sectionWrapper toolComposite", "id":"configSectionHeader"}, tableNode ); |
| 1022 |
|
| 1023 |
dojo.create( "div", { id: "configSectionTitle", "class":"layoutLeft", innerHTML: "Configuration" }, titleWrapper ); |
| 1024 |
dojo.create( "div", { id: "configSectionActionsArea", "class":"layoutRight sectionActions"}, titleWrapper ); |
| 1025 |
dojo.create( "div", { id: "viewAllConfigSectionActionsArea", "class":"layoutRight sectionActions"}, titleWrapper ); |
| 1026 |
|
| 1027 |
var parentId = "configSectionHeader"; |
| 1028 |
|
| 1029 |
var slideout = |
| 1030 |
'<div id="' + parentId + 'slideContainer" class="layoutBlock slideParameters slideContainer">' + |
| 1031 |
'<span id="' + parentId + 'slideOut" class="slide">' + |
| 1032 |
'<span id="' + parentId + 'pageCommandParameters" class="parameters"></span>' + |
| 1033 |
'<span id="' + parentId + 'pageCommandDismiss" class="parametersDismiss"></span>' + |
| 1034 |
'</span>' + |
| 1035 |
'</div>'; |
| 1036 |
|
| 1037 |
|
| 1038 |
dojo.place( slideout, titleWrapper ); |
| 1039 |
|
| 1040 |
if (mode === "full"){ |
| 1041 |
this.commandService.registerCommandContribution("eclipse.orion.git.addConfigEntryCommand", 1000, "configSectionActionsArea"); |
| 1042 |
this.commandService.renderCommands(dojo.byId("configSectionActionsArea"), "dom", repository, this, "button"); |
| 1043 |
} |
| 1044 |
|
| 1045 |
var content = |
| 1046 |
'<div class="git-table">' + |
| 1047 |
'<div class="plugin-settings">' + |
| 1048 |
'<list id="configNode" class="plugin-settings-list"></list>' + |
| 1049 |
'</div>' + |
| 1050 |
'</div>'; |
| 1051 |
|
| 1052 |
dojo.place( content, tableNode ); |
| 1053 |
|
| 1054 |
this.registry.getService("orion.git.provider").getGitCloneConfig(configLocation).then( |
| 1055 |
function(resp){ |
| 1056 |
var configurationEntries = resp.Children; |
| 1057 |
|
| 1058 |
if (mode !== "full" && configurationEntries.length !== 0){ |
| 1059 |
that.commandService.registerCommandContribution("eclipse.orion.git.repositories.viewAllCommand", 10, "viewAllConfigSectionActionsArea"); |
| 1060 |
that.commandService.renderCommands(dojo.byId("viewAllConfigSectionActionsArea"), "dom", |
| 1061 |
{"ViewAllLink":"/git/git-repository.html#" + configLocation, "ViewAllLabel":"View All", "ViewAllTooltip":"View all configuration entries"}, that, "button"); |
| 1062 |
} |
| 1063 |
|
| 1064 |
if (configurationEntries.length === 0){ |
| 1065 |
dojo.byId("configSectionTitle").innerHTML = "No Configuration"; |
| 1066 |
return; |
| 1067 |
} |
| 1068 |
|
| 1069 |
for(var i=0; i<configurationEntries.length ;i++){ |
| 1070 |
if (mode === "full" || configurationEntries[i].Key.indexOf("user.") !== -1) |
| 1071 |
that.renderConfigEntry(configurationEntries[i], i); |
| 1072 |
}; |
| 1073 |
}, function(error){ |
| 1074 |
dojo.hitch(that, that.handleError)(error); |
| 1075 |
} |
| 1076 |
); |
| 1077 |
}; |
| 1078 |
|
| 1079 |
GitRepositoryExplorer.prototype.renderConfigEntry = function(configEntry, index){ |
| 1080 |
var extensionListItem = dojo.create( "div", { "class":"git-list-item " + ((index % 2) ? "darkTreeTableRow" : "lightTreeTableRow") }, dojo.byId("configNode") ); |
| 1081 |
var horizontalBox = dojo.create( "div", null, extensionListItem ); |
| 1082 |
|
| 1083 |
var detailsView = dojo.create( "div", { "class":"stretch"}, horizontalBox ); |
| 1084 |
dojo.create( "span", { "class":"gitMainDescription", innerHTML: configEntry.Key }, detailsView ); |
| 1085 |
dojo.create( "span", { "class":"gitSecondaryDescription", "style":"margin-left:20px", innerHTML: configEntry.Value}, detailsView ); |
| 1086 |
|
| 1087 |
var actionsArea = dojo.create( "div", {"id":"configActionsArea", "class":"git-action-area" }, horizontalBox ); |
| 1088 |
this.commandService.renderCommands(actionsArea, "object", configEntry, this, "tool"); |
| 1089 |
|
| 1090 |
}; |
| 1091 |
|
| 998 |
return GitRepositoryExplorer; |
1092 |
return GitRepositoryExplorer; |
| 999 |
}()); |
1093 |
}()); |
| 1000 |
|
1094 |
|