Skip to content
This repository has been archived by the owner on Oct 2, 2023. It is now read-only.

Commit

Permalink
Merge pull request #50 from amitmawkin/master
Browse files Browse the repository at this point in the history
Fixed another bug with SourceControl widget
  • Loading branch information
amitmawkin committed Aug 8, 2015
2 parents 0124e77 + 3d0f886 commit c68101d
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 22 deletions.
1 change: 0 additions & 1 deletion UI/src/app/dashboard/directives/widget.js
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,6 @@
console.log($scope.owner);
if ($scope.owner == $cookies.username || $cookies.username == "admin")
{
console.log("Yeah you are the owner");
configModal();
}
else
Expand Down
35 changes: 14 additions & 21 deletions UI/src/components/widgets/repo/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,42 +21,35 @@
value: 'Subversion'
}];

console.log(JSON.stringify(widgetConfig)); //"{"options":{"id":"repo0"}}"
console.log(JSON.stringify(widgetConfig.options.id));

var myindex;

for (var v = 0; v < ctrl.repoOptions.length; v++) {
console.log(v+ctrl.repoOptions[v].name);
if (!widgetConfig.options.scm) {
ctrl.repoOption="";
}
else
{
var myindex;

if(ctrl.repoOptions[v].name == widgetConfig.options.scm.name)
{
myindex = v;
for (var v = 0; v < ctrl.repoOptions.length; v++) {
if (ctrl.repoOptions[v].name == widgetConfig.options.scm.name) {
myindex = v;
}
}
ctrl.repoOption=ctrl.repoOptions[myindex];
}


console.log("index is" + myindex);

ctrl.repoOption=ctrl.repoOptions[myindex];
ctrl.gitBranch = widgetConfig.options.branch;
ctrl.username = "";
ctrl.password = "";
ctrl.selectedOption=widgetConfig.options.scm.name;


// public variables
ctrl.submitted = false;
ctrl.collectors = [];
ctrl.repoUrl = widgetConfig.options.url;


console.log(JSON.stringify(widgetConfig.options));








// public methods
ctrl.submit = submitForm;

Expand Down

0 comments on commit c68101d

Please sign in to comment.