From 63067710c679cc0154746102209d07cd9ec11bb7 Mon Sep 17 00:00:00 2001 From: qiaohua Date: Sun, 1 Dec 2013 11:44:29 +0800 Subject: [PATCH] U: data-role -> data-switchable-role, fix #32 --- HISTORY.md | 3 +++ dist/accordion-debug.js | 2 +- dist/accordion.js | 2 +- dist/carousel-debug.js | 4 ++-- dist/carousel.js | 2 +- dist/slide-debug.js | 2 +- dist/slide.js | 2 +- dist/switchable-debug.js | 2 +- dist/switchable.js | 2 +- dist/tabs-debug.js | 2 +- dist/tabs.js | 2 +- examples/accordion.md | 16 ++++++++-------- examples/autorender.md | 30 +++++++++++++++--------------- examples/carousel.md | 12 ++++++------ examples/index.md | 10 +++++----- examples/slide.md | 12 ++++++------ src/carousel.js | 2 +- src/switchable.js | 6 +++--- tests/switchable-spec.js | 10 +++++----- 19 files changed, 63 insertions(+), 60 deletions(-) diff --git a/HISTORY.md b/HISTORY.md index a619e1e..8cf16e1 100644 --- a/HISTORY.md +++ b/HISTORY.md @@ -5,6 +5,9 @@ ## 1.0.2 `tag:improved` 有些地方 `$(selector, element)` 改成 `this.$(selector)`, 查找当前 element 下的元素 + +`tag:improved` [#32](https://github.com/aralejs/switchable/issues/32) data-role 应该换成 data-switchable-role + `tag:fixed` [#33](https://github.com/aralejs/switchable/issues/33) Effect width max value in 360. ## 1.0.1 diff --git a/dist/accordion-debug.js b/dist/accordion-debug.js index ce3ad2a..4e99ac9 100644 --- a/dist/accordion-debug.js +++ b/dist/accordion-debug.js @@ -116,7 +116,7 @@ define("arale/switchable/1.0.2/switchable-debug", [ "$-debug", "arale/widget/1.1 var role = {}; var roles = [ "trigger", "panel", "nav", "content" ]; $.each(roles, function(index, key) { - var elems = self.$("[data-role=" + key + "]"); + var elems = self.$("[data-switchable-role=" + key + "]"); if (elems.length) { role[key] = elems; } diff --git a/dist/accordion.js b/dist/accordion.js index 4bc90a1..0b19184 100644 --- a/dist/accordion.js +++ b/dist/accordion.js @@ -1 +1 @@ -define("arale/switchable/1.0.2/accordion",["./switchable","$","arale/widget/1.1.1/widget","arale/base/1.1.1/base","arale/class/1.1.0/class","arale/events/1.1.0/events","./plugins/effects","arale/easing/1.0.0/easing","./plugins/autoplay","./plugins/circular"],function(a,b,c){var d=a("./switchable"),e=d.extend({attrs:{triggerType:"click",multiple:!1,autoplay:!1},switchTo:function(a){this.get("multiple")?this._switchTo(a,a):d.prototype.switchTo.call(this,a)},_switchTrigger:function(a,b){this.get("multiple")?this.get("triggers").eq(a).toggleClass(this.get("activeTriggerClass")):d.prototype._switchTrigger.call(this,a,b)},_switchPanel:function(a){this.get("multiple")?a.toPanels.toggle():d.prototype._switchPanel.call(this,a)}});c.exports=e}),define("arale/switchable/1.0.2/switchable",["$","arale/widget/1.1.1/widget","arale/base/1.1.1/base","arale/class/1.1.0/class","arale/events/1.1.0/events","arale/switchable/1.0.2/plugins/effects","arale/easing/1.0.0/easing","arale/switchable/1.0.2/plugins/autoplay","arale/switchable/1.0.2/plugins/circular"],function(a,b,c){function d(a,b,c,d){for(var e=f("