|
Lines 801-820
orion.GitStatusController = (function() {
Link Here
|
| 801 |
_initTitleBar:function(withBranchName){ |
801 |
_initTitleBar:function(withBranchName){ |
| 802 |
var title = "Git Status"; |
802 |
var title = "Git Status"; |
| 803 |
var location = ""; |
803 |
var location = ""; |
|
|
804 |
var branchName = this._curBranch ? this._curBranch.Name : "detached"; |
| 804 |
if(withBranchName) { |
805 |
if(withBranchName) { |
| 805 |
var name = this._curBranch ? this._curBranch.Name : "detached"; |
806 |
location = this._curClone.Name + " on " + branchName; |
| 806 |
location = this._curClone.Name + " on " + name; |
|
|
| 807 |
} |
807 |
} |
|
|
808 |
//render browser title |
| 808 |
document.title = location; |
809 |
document.title = location; |
| 809 |
// not good that these dom id's are known way down here |
810 |
|
|
|
811 |
//render page title |
| 810 |
dojo.place(document.createTextNode(title), "pageTitle", "only"); |
812 |
dojo.place(document.createTextNode(title), "pageTitle", "only"); |
| 811 |
dojo.place(document.createTextNode(location), "location", "only"); |
|
|
| 812 |
if(withBranchName) { |
813 |
if(withBranchName) { |
| 813 |
this._logTableRenderer.modifyHeader(this._curBranch ? this._curBranch.Name : "detached"); |
814 |
//render git log title on local branch |
| 814 |
if(this._curBranch && this._curRemote) |
815 |
this._logTableRenderer.modifyHeader(branchName); |
| 815 |
this._remoteTableRenderer.modifyHeader((this._curRemote ? this._curRemote.Name : "") + "/" + this._curBranch.Name); |
816 |
if(this._curBranch && this._curRemote){ |
|
|
817 |
branchName = (this._curBranch.RemoteLocation.length > 0 ? this._curBranch.RemoteLocation[0].Name : "") + "/" + this._curBranch.Name; |
| 818 |
//render git log title on remote branch |
| 819 |
this._remoteTableRenderer.modifyHeader(branchName); |
| 820 |
} |
| 821 |
//render page tilte details (clone name + remote name + local branch name) |
| 822 |
dojo.place(document.createTextNode(this._curClone.Name + " on " + branchName), "location", "only"); |
| 816 |
} |
823 |
} |
| 817 |
|
|
|
| 818 |
}, |
824 |
}, |
| 819 |
|
825 |
|
| 820 |
_getCloneInfo:function(){ |
826 |
_getCloneInfo:function(){ |