diff --git a/Gruntfile.js b/Gruntfile.js index 736df48e..4ee4b87c 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -60,6 +60,7 @@ module.exports = function(grunt) { 'js/datetime-picker.js', 'js/iscroll.js', 'js/scroller.js', + 'js/sortable.js', 'js/tabs.js', 'js/fixed-tab.js', 'js/pull-to-refresh-js-scroll.js', diff --git a/docs/demos/list/index.html b/docs/demos/list/index.html index 88b7a16e..e6366862 100644 --- a/docs/demos/list/index.html +++ b/docs/demos/list/index.html @@ -6,7 +6,7 @@
- 返回 + 返回

列表

@@ -62,6 +62,13 @@

列表

+
  • + +
    +
    可排序列表
    +
    +
    +
  • diff --git a/docs/demos/list/sortable-list.html b/docs/demos/list/sortable-list.html new file mode 100644 index 00000000..3fe3251e --- /dev/null +++ b/docs/demos/list/sortable-list.html @@ -0,0 +1,90 @@ +--- +layout: demo +title: SUI Mobile Demo +--- +
    +
    + + + 返回 + +

    可排序列表

    +
    +
    +
    可排序
    +
    +
      +
    • +
      +
      +
      +
      1 Jenna Smith
      +
      CEO
      +
      +
      +
      +
    • +
    • +
      +
      +
      +
      2 John Doe
      +
      Director
      +
      +
      +
      +
    • +
    • +
      +
      +
      +
      3 John Doe
      +
      Developer
      +
      +
      +
      +
    • +
    • +
      +
      +
      +
      4 Aaron Darling
      +
      Manager
      +
      +
      +
      +
    • +
    • +
      +
      +
      +
      5 Calvin Johnson
      +
      Accounter
      +
      +
      +
      +
    • +
    • +
      +
      +
      +
      6 John Smith
      +
      SEO
      +
      +
      +
      +
    • +
    • +
      +
      +
      +
      7 Chloe
      +
      Manager
      +
      +
      +
      +
    • +
    +
    +
    +
    diff --git a/js/init.js b/js/init.js index 5972ad47..6e494476 100644 --- a/js/init.js +++ b/js/init.js @@ -20,6 +20,7 @@ $.initPullToRefresh($content); $.initInfiniteScroll($content); $.initCalendar($content); + $.initSortable(); //extend if ($.initSwiper) $.initSwiper($content); diff --git a/less/lists.less b/less/lists.less index a8ec5d24..f3f65200 100644 --- a/less/lists.less +++ b/less/lists.less @@ -106,7 +106,7 @@ max-width: 100%; &.label { - width: 35%; + width: 55%; .flex-shrink(0); margin: 4px 0; } @@ -326,7 +326,6 @@ .hairline-remove(top); } // Sortable - /* .sortable-handler { position: absolute; right: 0; @@ -335,12 +334,12 @@ z-index: 10; background-repeat: no-repeat; background-size: 0.9rem 0.6rem; - background-image: url("@{imgBaseUrl}/i-sortable-handler.png"); + background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACQAAAAYCAYAAACSuF9OAAAAXUlEQVRIS+3UQQoAIAhEUT153c5Fl2pvxKwMg9+ugpLHqFtaEWua+cjnr/ZOQYK6v9CrrNz+OYQoKAkgpCLRX4hJrUKNkBJSXVB937/LqgXU+wj9L8QcUnMIoSS0ATBUKEUz4fuNAAAAAElFTkSuQmCC"); background-position: center; width: 1.75rem; opacity: 0; visibility: hidden; - right: 0; + cursor: pointer; } &.sortable { .item-inner { @@ -373,7 +372,6 @@ .hairline-remove(bottom); } } - */ // Last-childs li {