Skip to content

OhmzTech/st-slidetoremove-plugin

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

st-slidetoremove-plugin

Slide to Remove Plugin for Sencha Touch Lists

SlideToRemove is a simple plugin for Sencha Touch 2 that adds the ability to swipe list items to remove them upon confirmation, very similar to the native iOS controls seen on iPhones/iPads.

There is an experimental next version that supports Sencha Touch 2.4, renamed as ListSwipeAction.js and located in the root directory. This version will be finalized in the near future for the upcoming release of Ext JS 6.

Currently supports Sencha Touch 2.1, 2.2, 2.4
Make sure you use the file for the correct version until they can be combined!

Usage Notes:

  1. Add this plugin to any list.
  2. User can now swipe the list item to display delete button, and swipe it back to hide the delete button. Multiple delete buttons can be open at one time.
  3. Set removeText in plugin configuration to change text on the delete button, and buttonWidth to change the width of the button.
  4. Easily change the button configuration manually in this plugin for advanced customization.
  5. By default the handler for the button will remove the record from the store.
  6. The closeDeletes method will close all open delete buttons.

2.4 Version Adds more customization, only tested with Sencha 2.4
You can specify:
*btnUI
*btnIcon
*hideDeletesOnTap (iOS like list functionality)
*itemTapFn (used in conjuntion with hideDeltesOnTap)

Usage Example:

Ext.create('Ext.List', {
    store: 'Bookmarks',
    plugins: {
        xclass: 'Ext.plugin.SlideToRemove',
        buttonWidth: '40%',
        removeText: 'Remove'
    },
    itemTpl: new Ext.XTemplate(
        '{Title}'
    )
});

About

Slide to Remove Plugin for Sencha Touch Lists

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •