def get(self): path = self.request.get("path")#already changed to unicode path = jsIdEncoding(path) try: p = ufsTreeItem.getUfsTreeItem(path) except ValueError: #No schema/protocol string. Normal dir p = localTreeItem.localTreeItem(path)
import libSys import libs.tree.jsTreeNamedItemFuncV3 as jsTreeNamedItemFunc import libs.html.response import libs.ufs.ufsTreeItem as ufsTreeItem #import libs.ufs.winUfs as winUfs import libs.ufs.ufs as ufs import desktopApp.lib.localTreeItem as localTreeItem gDebugFlag = False def jsIdEncoding(s): ''' This function is used to encode the item id of jstree as jstree can not manipulate id with ":" correctly ''' l = s.split(u"_", 1) if len(l[0]) == 1: s = u":".join(l) return s if __name__=='__main__': fields = libs.http.queryParam.queryInfo().getAllFieldStorageUnicode() path = fields.get("path", ["-1"])[0] path=jsIdEncoding(path) res = "Content-Type: text/html;charset=gbk\n\n" if gDebugFlag: h = libs.html.response.html() h.genHead('Collections') res += u'<!--' if path == "-1": p = ufs.ufsTreeUuidItem() #res = path