How to use the kss.core.kssaction function in kss

To help you get started, weโ€™ve selected a few kss examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github ned14 / Easyshop / easyshop.kss / easyshop / kss / formatter.py View on Github external
    @kssaction
    def saveFormatter(self, portlethash):
        """
        """
        fi = IFormats(self.context)
        fi.setFormats(self.request.form)
        
        kss_core  = self.getCommandSet("core")
        kss_zope  = self.getCommandSet("zope")
        kss_plone = self.getCommandSet("plone")
        
        layout = self.request.form.get("layout")

        if layout == "categories-view":
            kss_zope.refreshViewlet(kss_core.getHtmlIdSelector("categories-list"),
                                    manager="easyshop.categories-manager",
                                    name="easyshop.categories-viewlet")
github ned14 / Easyshop / easyshop.kss / easyshop / kss / customers / address.py View on Github external
    @kssaction    
    def cancelAddress(self):
        """
        """
        # Refresh addresses
        kss_core = self.getCommandSet("core")
        kss_zope = self.getCommandSet("zope")

        selector = kss_core.getHtmlIdSelector("manage-address-book")
        kss_zope.refreshViewlet(selector,
                                manager="easyshop.manager.addresses",
                                name="easyshop.addresses")
github collective / transmogrify.ploneremote / pretaweb / funnelweb / browser / importers.py View on Github external
    @kssaction
    def funnelwebProgress(self):
        return
        sm = self.context.getSiteManager()
        #service = sm.getUtility(lovely.remotetask.interfaces.ITaskService, name="FunnelwebService")

        ksscore = self.getCommandSet('core')
        selector = ksscore.getHtmlIdSelector('form-widgets-results')
        session = self.context.REQUEST.SESSION
        jobid = session.get('jobid')
        if jobid:
            #status = service.getStatus(jobid)
            status = None
        else:
            status = None
        feedback = session.get('funnelwebfeedback')
        if feedback:
github ned14 / Easyshop / easyshop.kss / easyshop / kss / customers / address.py View on Github external
    @kssaction    
    def addAddress(self, form):
        """
        """
        shop = IShopManagement(self.context).getShop()
        customer = ICustomerManagement(shop).getAuthenticatedCustomer()
        
        id = self.context.generateUniqueId("Address")

        customer.invokeFactory("Address", id=id, title=form.get("address1"))
        address = getattr(customer, id)

        # set data
        address.setFirstname(form.get("firstname", ""))
        address.setLastname(form.get("lastname", ""))
        address.setLastname(form.get("companyName", ""))
        address.setAddress1(form.get("address1", ""))
github ned14 / Easyshop / easyshop.kss / easyshop / kss / catalog.py View on Github external
    @kssaction
    def showProducts(self, letter=None, form={}):
        """
        """
        catalog = getToolByName(self.context, "portal_catalog")
        kss_core  = self.getCommandSet("core")
                
        searchable_text = form.get("searchable_text", "")

        products = []        
        if searchable_text != "":
            products = catalog.searchResults(
                path = "/".join(self.context.getPhysicalPath()),
                object_provides = "easyshop.core.interfaces.catalog.IProduct",
                SearchableText = searchable_text,
                sort_on = "sortable_title",
            )
github ned14 / Easyshop / easyshop.kss / easyshop / kss / customers / address.py View on Github external
    @kssaction    
    def showAddAddressForm(self):
        """
        """
        html = self._getAddAddressForm()
        
        # refresh cart
        kss_core  = self.getCommandSet("core")
        kss_core.replaceHTML('#add-address-form', html)
github ned14 / Easyshop / easyshop.kss / easyshop / kss / catalog.py View on Github external
    @kssaction    
    def showProductDetails(self, uid):
        """
        """
        catalog = getToolByName(self.context, "portal_catalog")
        brains = catalog.searchResults(
            UID = uid
        )
        
        try:
            product = brains[0].getObject()
        except IndexError:
            return

        cm    = ICurrencyManagement(self.context)
        price = cm.priceToString(product.getPrice())
github ned14 / Easyshop / src / easyshop.kss / easyshop / kss / formatter.py View on Github external
    @kssaction
    def saveFormatter(self, portlethash):
        """
        """
        fi = IFormats(self.context)
        fi.setFormats(self.request.form)
        
        kss_core  = self.getCommandSet("core")
        kss_zope  = self.getCommandSet("zope")
        kss_plone = self.getCommandSet("plone")
        
        layout = self.request.form.get("layout")

        if layout == "categories-view":
            kss_zope.refreshViewlet(kss_core.getHtmlIdSelector("categories-list"),
                                    manager="easyshop.categories-manager",
                                    name="easyshop.categories-viewlet")
github ned14 / Easyshop / easyshop.kss / easyshop / kss / formatter.py View on Github external
    @kssaction
    def saveFormatter(self, form, portlethash):
        """
        """
        fi = IFormats(self.context)        
        fi.setFormats(form)
        
        kss_core  = self.getCommandSet("core")
        kss_zope  = self.getCommandSet("zope")
        kss_plone = self.getCommandSet("plone")
        
        layout = form.get("layout")

        if layout == "categories-view":
            kss_zope.refreshViewlet(kss_core.getHtmlIdSelector("categories-list"),
                                    manager="easyshop.categories-manager",
                                    name="easyshop.categories-viewlet")
github ned14 / Easyshop / easyshop.kss / easyshop / kss / customers / address.py View on Github external
    @kssaction    
    def showEditAddressForm(self, form):
        """
        """        
        catalog = getToolByName(self.context, "portal_catalog")
        brains = catalog.searchResults(
            UID = form.get("uid", "")
        )
        
        try: 
            address = brains[0].getObject()
        except:
            return 
        
        html = ""
        html += self._getEditAddressForm(address)
        html += ""

kss

A Toolkit for Korean sentence segmentation

BSD-3-Clause
Latest version published 6 months ago

Package Health Score

60 / 100
Full package analysis

Similar packages