def delteAll(self, controls, silent=False, fresh=False, timeout=None, **kwargs): return ClientSide.call("DynamicForm.get", controls, silent, scriptURL(kwargs), timeout, fresh)
def post(self, silent=False, timeout=None, fresh=False, params=None, **kwargs): return ClientSide.call("DynamicForm.post", self, silent, params or scriptURL(kwargs), timeout, fresh)
def putAll(self, controls, silent=False, timeout=None, fresh=False, params=None, **kwargs): return ClientSide.call("DynamicForm.put", controls, silent, params or scriptURL(kwargs), timeout, fresh)
def setUIData(self, ui, request): search = request.fields.get('search', '') if not search: usedProducts = [] for data in GuiBuilderConfig.sections: name = data['Name'] numberOfElements = len(data['Factory'].products) elements = data['Factory'].products.iteritems() section = ui.sections.addChildElement(self.buildElement("Accordion", name)) section.setLabel(name) section.toggle.attributes['tooltip'] = data['Factory'].__doc__ section.style['width'] = "100%" elementsContainer = section.addChildElement(self.buildElement("multiSelect")) elementsContainer.style['height'] = "%dpx" % (numberOfElements * 20) elementsContainer.style['width'] = "100%" elementsContainer.addJavascriptEvent('onchange', self.document.clientSide.get(load= ClientSide.Script("WebElements.selectedOption(this).value"))) for elementName, element in elements: if element in usedProducts: continue else: elementsContainer.addOption(elementName) ui.sections[0].addClass("First") ui.sections[-1].addClass("Last") return results = ui.sections.addChildElement(self.buildElement("multiSelect")) results.addClass("Results") results.style['width'] = "100%" results.addOptions([productName for productName in ELEMENTS if search.lower() in productName.lower()]) results.style['height'] = "%dpx" % (len(results.childElements) * 20) results.addJavascriptEvent('onchange', self.document.clientSide.get(load= ClientSide.Script("WebElements.selectedOption(this).value"))) return results
def move(self, to, makeTop=False): return ClientSide.move(self.id + ":Loading", to, makeTop)(WebElement.ClientSide.move( self, to, makeTop))
def delete(self, silent=False, params=None, timeout=None): return ClientSide.call("DynamicForm.delete", self, silent, params, timeout)
def delteAll(self, controls, silent=False, params=None, timeout=None): return ClientSide.call("DynamicForm.get", controls, silent, params, timeout)
def put(self, silent=False, params=None, timeout=None): return ClientSide.call("DynamicForm.put", self, silent, params, timeout)
def delete(self, silent=False, timeout=None, fresh=False, **kwargs): return ClientSide.call("DynamicForm.delete", self, silent, scriptURL(kwargs), timeout, fresh)
def postAll(self, controls, silent=False, timeout=None, fresh=False, params=None, **kwargs): return ClientSide.call("DynamicForm.post", controls, silent, params or scriptURL(kwargs), timeout, fresh)
def get(self, silent=False, timeout=None, fresh=True, **kwargs): return ClientSide.call("DynamicForm.get", self, silent, scriptURL(kwargs), timeout, fresh)
def move(self, to, makeTop=False): return ClientSide.move(self.id + ":Loading", to, makeTop)(WebElement.ClientSide.move(self, to, makeTop))
def put(self, silent=False, timeout=None, fresh=False, params=None, **kwargs): return ClientSide.call("DynamicForm.put", self, silent, params or scriptURL(kwargs), timeout, fresh)
def putAll(self, controls, silent=False, fresh=False, timeout=None): return ClientSide.call("DynamicForm.put", controls, silent, scriptURL(kwargs), timeout, fresh)
def initUI(self, ui, request): ui.search.clientSide.focus() ui.search.clientSide.on('keyup', ClientSide.hide('contact')(self.contacts.clientSide.get(timeout=500))) ui.create.clientSide.on('click', self.contacts.clientSide.put()) ui.contacts.replaceWith(self.contacts) ui.editor.replaceWith(self.editor)