minor changes

This commit is contained in:
coderaiser 2012-09-27 06:12:03 -04:00
parent fe148b378a
commit 0ffd8cecfa
2 changed files with 9 additions and 8 deletions

View file

@ -717,12 +717,14 @@ CloudClient.Util = (function(){
return ( lCurrentFileClass.indexOf(lCurrentClass) >= 0 );
};
this.getCurrentLink = function(pCurrentFile){
var lCurrent = this.getCurrentFile();
this.getCurrentLink = function(pCurrentFile){
var lLink;
lLink = (pCurrentFile ? pCurrentFile : lCurrent)
.getElementsByTagName('a')[0];
if(pCurrentFile)
lLink = this.getByTag('a', pCurrentFile)[0];
else{
var lCurrentFile = this.getCurrentFile();
lLink = this.getByTag('a', lCurrentFile)[0];
}
if(!lLink)
this.addCloudStatus({

View file

@ -114,9 +114,8 @@ var CloudCommander, CloudFunc, CodeMirror;
var lA;
/* getting link */
lA = Util.getByTag('a', pCurrentFile);
lA = lA[0].href;
lA = Util.getCurrentLink(pCurrentFile);
lA = lA.href;
/* убираем адрес хоста*/
lA = '/' + lA.replace(document.location.href,'');