def _getAddProductPostDataForUrl(self, productUrl, zoundryServiceId): dom = ZDom(ADD_PRODUCT_REQUEST) dom.selectSingleNode(u"/Request/Authorization/Username").setText( zoundryServiceId) #$NON-NLS-1$ dom.selectSingleNode(u"/Request/AddProducts/Product/Url").setText( productUrl) #$NON-NLS-1$ return dom.serialize(True)
def _doHandleError(self, url, dndContext): ZShowInfoMessage(dndContext.getWindow(), _extstr(u"commonvideo.ErrorDiscoveringVideoEmbedInfoMsg"), _extstr(u"commonvideo.ErrorDiscoveringVideoEmbedInfoTitle")) #$NON-NLS-2$ #$NON-NLS-1$ dom = ZDom() dom.loadXML(u"<a href='' />") #$NON-NLS-1$ dom.documentElement.setAttribute(u"href", url) #$NON-NLS-1$ dom.documentElement.setText(url) return dom.serialize()
def _doHandleError(self, url, dndContext): ZShowInfoMessage( dndContext.getWindow(), _extstr(u"commonvideo.ErrorDiscoveringVideoEmbedInfoMsg"), _extstr(u"commonvideo.ErrorDiscoveringVideoEmbedInfoTitle" )) #$NON-NLS-2$ #$NON-NLS-1$ dom = ZDom() dom.loadXML(u"<a href='' />") #$NON-NLS-1$ dom.documentElement.setAttribute(u"href", url) #$NON-NLS-1$ dom.documentElement.setText(url) return dom.serialize()
def _getAddProductPostDataForUrl(self, productUrl, zoundryServiceId): dom = ZDom(ADD_PRODUCT_REQUEST) dom.selectSingleNode(u"/Request/Authorization/Username").setText(zoundryServiceId) #$NON-NLS-1$ dom.selectSingleNode(u"/Request/AddProducts/Product/Url").setText(productUrl) #$NON-NLS-1$ return dom.serialize(True)