refactor(dom) getCurrentName

This commit is contained in:
coderaiser 2014-05-10 10:25:09 -04:00
parent c230918d2d
commit b8ee29db7a

View file

@ -1357,13 +1357,14 @@ var CloudCmd, Util, DOM, CloudFunc, Dialog;
* @param currentFile
*/
this.getCurrentName = function(currentFile) {
var lCurrent = currentFile || this.getCurrentFile(),
lLink = this.getCurrentLink( lCurrent );
var name = '',
current = currentFile || this.getCurrentFile(),
link = this.getCurrentLink(current);
if (Util.isObject(lLink))
lLink = lLink.title || lLink.textContent;
if (link)
name = link.title || link.textContent;
return lLink;
return name;
};
this.getSelectedNames = function(selected) {