├── image ├── curr.gif ├── line.png ├── top.png ├── graphy.png ├── bg-black.png ├── close-ie.jpg ├── mimiGlyphs.png ├── white_tiles.png ├── bg-paper-note.png ├── bright_squares.png ├── buttons-theme1.png ├── carbon_fibre.png ├── wood_pattern.png ├── mimiGlyphs-black.png ├── low_contrast_linen.png ├── glyphicons-halflings.png ├── glyphicons-halflings-8.png └── glyphicons-halflings-white.png ├── fonts ├── glyphicons-halflings-regular.eot ├── glyphicons-halflings-regular.ttf ├── glyphicons-halflings-regular.woff └── glyphicons-halflings-regular.svg ├── README.md ├── .gitattributes ├── .gitignore └── js ├── html5shiv.min.js ├── lxui-ie.min.js ├── lxui-ie.js ├── lxui.min.js └── lxui.js /image/curr.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lduo/LXUI/HEAD/image/curr.gif -------------------------------------------------------------------------------- /image/line.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lduo/LXUI/HEAD/image/line.png -------------------------------------------------------------------------------- /image/top.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lduo/LXUI/HEAD/image/top.png -------------------------------------------------------------------------------- /image/graphy.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lduo/LXUI/HEAD/image/graphy.png -------------------------------------------------------------------------------- /image/bg-black.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lduo/LXUI/HEAD/image/bg-black.png -------------------------------------------------------------------------------- /image/close-ie.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lduo/LXUI/HEAD/image/close-ie.jpg -------------------------------------------------------------------------------- /image/mimiGlyphs.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lduo/LXUI/HEAD/image/mimiGlyphs.png -------------------------------------------------------------------------------- /image/white_tiles.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lduo/LXUI/HEAD/image/white_tiles.png -------------------------------------------------------------------------------- /image/bg-paper-note.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lduo/LXUI/HEAD/image/bg-paper-note.png -------------------------------------------------------------------------------- /image/bright_squares.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lduo/LXUI/HEAD/image/bright_squares.png -------------------------------------------------------------------------------- /image/buttons-theme1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lduo/LXUI/HEAD/image/buttons-theme1.png -------------------------------------------------------------------------------- /image/carbon_fibre.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lduo/LXUI/HEAD/image/carbon_fibre.png -------------------------------------------------------------------------------- /image/wood_pattern.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lduo/LXUI/HEAD/image/wood_pattern.png -------------------------------------------------------------------------------- /image/mimiGlyphs-black.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lduo/LXUI/HEAD/image/mimiGlyphs-black.png -------------------------------------------------------------------------------- /image/low_contrast_linen.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lduo/LXUI/HEAD/image/low_contrast_linen.png -------------------------------------------------------------------------------- /image/glyphicons-halflings.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lduo/LXUI/HEAD/image/glyphicons-halflings.png -------------------------------------------------------------------------------- /image/glyphicons-halflings-8.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lduo/LXUI/HEAD/image/glyphicons-halflings-8.png -------------------------------------------------------------------------------- /image/glyphicons-halflings-white.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lduo/LXUI/HEAD/image/glyphicons-halflings-white.png -------------------------------------------------------------------------------- /fonts/glyphicons-halflings-regular.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lduo/LXUI/HEAD/fonts/glyphicons-halflings-regular.eot -------------------------------------------------------------------------------- /fonts/glyphicons-halflings-regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lduo/LXUI/HEAD/fonts/glyphicons-halflings-regular.ttf -------------------------------------------------------------------------------- /fonts/glyphicons-halflings-regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lduo/LXUI/HEAD/fonts/glyphicons-halflings-regular.woff -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | LXUI 2 |

良心UI

3 | 4 | 基于bootstrap的兼容IE6+的插件 5 | 6 |

感谢:

7 | -bootstrap开发团队 - 强大的twitter产生出强大的bootstrap 8 | -bootstrap中文网成员 - 翻译整理如此庞大的文档 9 | -@mdo - 编码规范供我们参考 10 | -Bsie作者ddouble 11 | 12 | 13 | -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | # Auto detect text files and perform LF normalization 2 | * text=auto 3 | 4 | # Custom for Visual Studio 5 | *.cs diff=csharp 6 | *.sln merge=union 7 | *.csproj merge=union 8 | *.vbproj merge=union 9 | *.fsproj merge=union 10 | *.dbproj merge=union 11 | 12 | # Standard to msysgit 13 | *.doc diff=astextplain 14 | *.DOC diff=astextplain 15 | *.docx diff=astextplain 16 | *.DOCX diff=astextplain 17 | *.dot diff=astextplain 18 | *.DOT diff=astextplain 19 | *.pdf diff=astextplain 20 | *.PDF diff=astextplain 21 | *.rtf diff=astextplain 22 | *.RTF diff=astextplain 23 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Windows image file caches 2 | Thumbs.db 3 | ehthumbs.db 4 | 5 | # Folder config file 6 | Desktop.ini 7 | 8 | # Recycle Bin used on file shares 9 | $RECYCLE.BIN/ 10 | 11 | # Windows Installer files 12 | *.cab 13 | *.msi 14 | *.msm 15 | *.msp 16 | 17 | # ========================= 18 | # Operating System Files 19 | # ========================= 20 | 21 | # OSX 22 | # ========================= 23 | 24 | .DS_Store 25 | .AppleDouble 26 | .LSOverride 27 | 28 | # Icon must ends with two \r. 29 | Icon 30 | 31 | # Thumbnails 32 | ._* 33 | 34 | # Files that might appear on external disk 35 | .Spotlight-V100 36 | .Trashes 37 | -------------------------------------------------------------------------------- /js/html5shiv.min.js: -------------------------------------------------------------------------------- 1 | /* 2 | HTML5 Shiv v3.7.0 | @afarkas @jdalton @jon_neal @rem | MIT/GPL2 Licensed 3 | */ 4 | (function(l,f){function m(){var a=e.elements;return"string"==typeof a?a.split(" "):a}function i(a){var b=n[a[o]];b||(b={},h++,a[o]=h,n[h]=b);return b}function p(a,b,c){b||(b=f);if(g)return b.createElement(a);c||(c=i(b));b=c.cache[a]?c.cache[a].cloneNode():r.test(a)?(c.cache[a]=c.createElem(a)).cloneNode():c.createElem(a);return b.canHaveChildren&&!s.test(a)?c.frag.appendChild(b):b}function t(a,b){if(!b.cache)b.cache={},b.createElem=a.createElement,b.createFrag=a.createDocumentFragment,b.frag=b.createFrag(); 5 | a.createElement=function(c){return!e.shivMethods?b.createElem(c):p(c,a,b)};a.createDocumentFragment=Function("h,f","return function(){var n=f.cloneNode(),c=n.createElement;h.shivMethods&&("+m().join().replace(/[\w\-]+/g,function(a){b.createElem(a);b.frag.createElement(a);return'c("'+a+'")'})+");return n}")(e,b.frag)}function q(a){a||(a=f);var b=i(a);if(e.shivCSS&&!j&&!b.hasCSS){var c,d=a;c=d.createElement("p");d=d.getElementsByTagName("head")[0]||d.documentElement;c.innerHTML="x"; 6 | c=d.insertBefore(c.lastChild,d.firstChild);b.hasCSS=!!c}g||t(a,b);return a}var k=l.html5||{},s=/^<|^(?:button|map|select|textarea|object|iframe|option|optgroup)$/i,r=/^(?:a|b|code|div|fieldset|h1|h2|h3|h4|h5|h6|i|label|li|ol|p|q|span|strong|style|table|tbody|td|th|tr|ul)$/i,j,o="_html5shiv",h=0,n={},g;(function(){try{var a=f.createElement("a");a.innerHTML="";j="hidden"in a;var b;if(!(b=1==a.childNodes.length)){f.createElement("a");var c=f.createDocumentFragment();b="undefined"==typeof c.cloneNode|| 7 | "undefined"==typeof c.createDocumentFragment||"undefined"==typeof c.createElement}g=b}catch(d){g=j=!0}})();var e={elements:k.elements||"abbr article aside audio bdi canvas data datalist details dialog figcaption figure footer header hgroup main mark meter nav output progress section summary template time video",version:"3.7.0",shivCSS:!1!==k.shivCSS,supportsUnknownElements:g,shivMethods:!1!==k.shivMethods,type:"default",shivDocument:q,createElement:p,createDocumentFragment:function(a,b){a||(a=f); 8 | if(g)return a.createDocumentFragment();for(var b=b||i(a),c=b.frag.cloneNode(),d=0,e=m(),h=e.length;dt&&(t=a)}),e(this).width(t)})};if(e.eb.ie6()){t=t||e("html");var n,s=["dropdown-submenu"];for(n=0;n a",t).after(''),e(".dropdown-submenu.pull-left",t).removeClass("pull-left").addClass("dropdown-submenu-pull-left"),a(e(".dropdown-menu:visible",t));var i=["btn-primary","btn-warning","btn-danger","btn-success","btn-info","btn-inverse"],l=["btn-mini","btn-small","btn-large"];e(".btn-group",t).parent().find(".btn-group:eq(0)").addClass("btn-group-first"),e(".btn",t).parent().find(".btn:eq(0)").addClass("btn-first"),e("body",t).on("mouseenter",".btn",function(){var t=e(this),a="btn-hover";t.data("ie6hover",a),e.each(i,function(e,n){return t.hasClass(n)?(a=n+"-hover",t.data("ie6hover",a),!1):void 0}),t.addClass(a)}).on("mouseleave",".btn",function(){var t=e(this),a=t.data("ie6hover");t.removeData("ie6hover"),a&&t.removeClass(a)}),e(".btn.dropdown-toggle",t).each(function(){var t=e(this),a="btn-dropdown-toggle";t.addClass(a),a=null,e.each(i,function(e,n){return t.hasClass(n)?(a=n+"-dropdown-toggle",!1):void 0}),a&&t.addClass(a),a=null,e.each(l,function(e,n){return t.hasClass(n)?(a=n+"-dropdown-toggle",!1):void 0}),a&&t.addClass(a)}),e(".btn + .btn.dropdown-toggle",t).each(function(){var t=e(this),a=t.css("background-color");t.css("background-color",e.eb.color.darken(a,.1))});var d=function(t){var n=e(this),s=t.data.cls,o=e(".dropdown-menu:visible",this);o.length&&a(o),n.hasClass("open")&&!n.hasClass(s+"-open")?n.addClass(s+"-open"):!n.hasClass("open")&&n.hasClass(s+"-open")&&n.removeClass(s+"-open"),n.one("propertychange",{cls:s},d)};e.each(["btn-group","dropdown"],function(a,n){e("."+n,t).one("propertychange",{cls:n},d)}),e(".btn.disabled",t).addClass("btn-disabled");var c=function(t){var a=e(this),n=t.data.cls;a.hasClass("disabled")&&!a.hasClass(n+"-disabled")?a.addClass(n+"-disabled"):!a.hasClass("disabled")&&a.hasClass(n+"-disabled")&&a.removeClass(n+"-disabled"),a.one("propertychange",{cls:n},c)};e.each(["btn"],function(a,n){e("."+n,t).one("propertychange",{cls:n},c)}),e("table.table-hover",t).on("mouseenter","tr",function(){e(this).addClass("tr-hover")}).on("mouseleave","tr",function(){e(this).removeClass("tr-hover")}),e('input[type="file"], input[type="image"], input[type="submit"], input[type="reset"], input[type="button"], input[type="radio"], input[type="checkbox"], input[type="text"], input[type="password"], input[type="datetime"], input[type="datetime-local"], input[type="date"], input[type="month"], input[type="time"], input[type="week"], input[type="number"], input[type="email"], input[type="url"], input[type="search"], input[type="tel"], input[type="color"]',t).each(function(){var t=e(this);t.addClass("input-"+t.attr("type"))}),e(".form-horizontal .controls:first-child",t).addClass("controls-first-child"),e(".checkbox.inline",t).addClass("checkbox-inline"),e(".radio.inline",t).addClass("radio-inline"),e("select[multiple]",t).addClass("select-multiple"),e("select[size]",t).addClass("select-size"),e("input[disabled], select[disabled], textarea[disabled]",t).each(function(){var t=e(this);t.addClass(t[0].tagName.toLowerCase()+"-disabled")}),e("input[readonly], select[readonly], textarea[readonly]",t).each(function(){var t=e(this);t.addClass(t[0].tagName.toLowerCase()+"-readonly")}),e('input[type="radio"][disabled], input[type="checkbox"][disabled]',t).each(function(){var t=e(this);t.addClass(t.attr("type").toLowerCase()+"-disabled")}),e('input[type="radio"][readonly], input[type="checkbox"][readonly]',t).each(function(){var t=e(this);t.addClass(t.attr("type").toLowerCase()+"-readonly")});var u=["warning","success","error","info"];e.each(u,function(a,n){e(".control-group."+n,t).addClass("control-group-"+n)});var p=function(t){if("classname"==t.originalEvent.propertyName.toLowerCase()){var a=e(this);e.each(u,function(e,t){var n="control-group-"+t;a.hasClass(t)?a.hasClass(n)||a.addClass(n):a.hasClass(n)&&a.removeClass(n)})}e(this).one("propertychange",p)};e(".control-group",t).one("propertychange",p),e(".pagination ul li:first-child",t).addClass("first-child"),e('[class^="icon-"],[class*=" icon-"]').each(function(){var t=e(this);t.hasClass("icon-xxx")||(t.addClass("icon-xxx"),t.css("background-position-y",parseInt(t.css("background-position-y"))+1+"px"))}),e(".carousel-control.left",t).removeClass("left").addClass("carousel-control-left"),e(".carousel-control.right",t).removeClass("right").addClass("carousel-control-right"),e(".carousel-caption").each(function(){var t=e(this),a=t.outerWidth()-t.width();t.width(t.parents(".carousel-inner .item").width()-a)})}}e.eb=e.eb||{},e.eb.ie6=function(){return navigator.userAgent.toLowerCase().indexOf("msie 6.0")>-1},e.eb.color=function(){var e=function(e,t){var a="0";for(e+="";e.length= min && v <= max) { 9 | // return true; 10 | // } 11 | // } 12 | // return false; 13 | // } 14 | $.eb.ie6 = function () { 15 | return navigator.userAgent.toLowerCase().indexOf('msie 6.0') > -1; 16 | // alert(navigator.userAgent.toLowerCase().indexOf('msie 6.0')); 17 | } 18 | 19 | 20 | $.eb.color = function () { 21 | var pad = function(num, totalChars) { 22 | var pad = '0'; 23 | num = num + ''; 24 | while (num.length < totalChars) { 25 | num = pad + num; 26 | } 27 | return num; 28 | }; 29 | 30 | // Ratio is between 0 and 1 31 | this.changeColor = function(color, ratio, darker) { 32 | // Trim trailing/leading whitespace 33 | color = color.replace(/^\s*|\s*$/, ''); 34 | 35 | // Expand three-digit hex 36 | color = color.replace( 37 | /^#?([a-f0-9])([a-f0-9])([a-f0-9])$/i, 38 | '#$1$1$2$2$3$3' 39 | ); 40 | 41 | // Calculate ratio 42 | var difference = Math.round(ratio * 256) * (darker ? -1 : 1), 43 | // Determine if input is RGB(A) 44 | rgb = color.match(new RegExp('^rgba?\\(\\s*' + 45 | '(\\d|[1-9]\\d|1\\d{2}|2[0-4][0-9]|25[0-5])' + 46 | '\\s*,\\s*' + 47 | '(\\d|[1-9]\\d|1\\d{2}|2[0-4][0-9]|25[0-5])' + 48 | '\\s*,\\s*' + 49 | '(\\d|[1-9]\\d|1\\d{2}|2[0-4][0-9]|25[0-5])' + 50 | '(?:\\s*,\\s*' + 51 | '(0|1|0?\\.\\d+))?' + 52 | '\\s*\\)$' 53 | , 'i')), 54 | alpha = !!rgb && rgb[4] != null ? rgb[4] : null, 55 | 56 | // Convert hex to decimal 57 | decimal = !!rgb? [rgb[1], rgb[2], rgb[3]] : color.replace( 58 | /^#?([a-f0-9][a-f0-9])([a-f0-9][a-f0-9])([a-f0-9][a-f0-9])/i, 59 | function() { 60 | return parseInt(arguments[1], 16) + ',' + 61 | parseInt(arguments[2], 16) + ',' + 62 | parseInt(arguments[3], 16); 63 | } 64 | ).split(/,/), 65 | returnValue; 66 | 67 | // Return RGB(A) 68 | return !!rgb ? 69 | 'rgb' + (alpha !== null ? 'a' : '') + '(' + 70 | Math[darker ? 'max' : 'min']( 71 | parseInt(decimal[0], 10) + difference, darker ? 0 : 255 72 | ) + ', ' + 73 | Math[darker ? 'max' : 'min']( 74 | parseInt(decimal[1], 10) + difference, darker ? 0 : 255 75 | ) + ', ' + 76 | Math[darker ? 'max' : 'min']( 77 | parseInt(decimal[2], 10) + difference, darker ? 0 : 255 78 | ) + 79 | (alpha !== null ? ', ' + alpha : '') + 80 | ')' : 81 | // Return hex 82 | [ 83 | '#', 84 | pad(Math[darker ? 'max' : 'min']( 85 | parseInt(decimal[0], 10) + difference, darker ? 0 : 255 86 | ).toString(16), 2), 87 | pad(Math[darker ? 'max' : 'min']( 88 | parseInt(decimal[1], 10) + difference, darker ? 0 : 255 89 | ).toString(16), 2), 90 | pad(Math[darker ? 'max' : 'min']( 91 | parseInt(decimal[2], 10) + difference, darker ? 0 : 255 92 | ).toString(16), 2) 93 | ].join(''); 94 | }; 95 | this.lighten = function(color, ratio) { 96 | return changeColor(color, ratio, false); 97 | }; 98 | this.darken = function(color, ratio) { 99 | return changeColor(color, ratio, true); 100 | }; 101 | return this; 102 | }(); 103 | 104 | 105 | function bootstrapIE6(el) { 106 | var dropdownWidthFix = function (el) { 107 | el.each(function () { 108 | var w = 0; 109 | $(this).children('li').each(function() { 110 | var aw = $(this).outerWidth(); 111 | if (aw > w) w = aw; 112 | }); 113 | 114 | $(this).width(w); 115 | }); 116 | } 117 | 118 | if ($.eb.ie6()) { 119 | el = el || $('html'); 120 | 121 | //------------- 122 | // GRID 123 | //------------- 124 | 125 | //------------- 126 | // dropdown 127 | //------------- 128 | // fix for IE6 not support li:hover 129 | var i, lis = ['dropdown-submenu']; 130 | for (i = 0; i < lis.length; i++) { 131 | var child = 'li.' + lis[i]; 132 | var hover = lis[i] + '-hover'; 133 | $('ul', el).on('mouseenter', child, function () { 134 | $(this).addClass(hover); 135 | }).on('mouseleave', child, function () { 136 | $(this).removeClass(hover); 137 | }); 138 | } 139 | 140 | /// fix :after selector -- dropdown-submenu > a:after 141 | $('.dropdown-submenu > a', el).after(''); 142 | 143 | /// fix multi class selector -- .dropdown-submenu.pull-left 144 | $('.dropdown-submenu.pull-left', el).removeClass('pull-left').addClass('dropdown-submenu-pull-left'); 145 | // $('.navbar .nav.pull-right').removeClass('pull-right').addClass('nav-pull-right'); 146 | 147 | /// fix ul li 100% width bug, set ul width to max width of it's sub li 148 | dropdownWidthFix($('.dropdown-menu:visible', el)); 149 | 150 | 151 | //------------- 152 | // buttons 153 | //------------- 154 | var btnColorCls = ['btn-primary','btn-warning','btn-danger','btn-success','btn-info','btn-inverse']; 155 | var btnSizeCls = ['btn-mini','btn-small','btn-large']; 156 | $('.btn-group', el).parent().find('.btn-group:eq(0)').addClass('btn-group-first'); 157 | $('.btn', el).parent().find('.btn:eq(0)').addClass('btn-first'); 158 | 159 | // fix button:hover 160 | $('body', el).on('mouseenter', '.btn', function () { 161 | var btn = $(this); 162 | var hover = 'btn-hover'; 163 | btn.data('ie6hover',hover); 164 | $.each(btnColorCls, function (k,v) { 165 | if (btn.hasClass(v)) { 166 | hover = v + '-hover'; 167 | btn.data('ie6hover',hover); 168 | return false; 169 | } 170 | }); 171 | btn.addClass(hover); 172 | }).on('mouseleave', '.btn', function () { 173 | var btn = $(this); 174 | var hover = btn.data('ie6hover'); 175 | btn.removeData('ie6hover'); 176 | if (hover) btn.removeClass(hover); 177 | }); 178 | 179 | // fix .btn.dropdown-toggle, .btn-primary.dropdown-toggle ... 180 | // fix .btn.dropdown-toggle, .btn-small.dropdown-toggle ... 181 | $('.btn.dropdown-toggle', el).each(function () { 182 | var btn = $(this); 183 | var ddt = 'btn-dropdown-toggle'; 184 | btn.addClass(ddt); 185 | 186 | ddt = null; 187 | $.each(btnColorCls, function (k,v) { 188 | if (btn.hasClass(v)) { 189 | ddt = v + '-dropdown-toggle'; 190 | return false; 191 | } 192 | }); 193 | if (ddt) btn.addClass(ddt); 194 | 195 | ddt = null; 196 | $.each(btnSizeCls, function (k,v) { 197 | if (btn.hasClass(v)) { 198 | ddt = v + '-dropdown-toggle'; 199 | return false; 200 | } 201 | }); 202 | if (ddt) btn.addClass(ddt); 203 | }); 204 | 205 | // fix split button dropdown toggle background color 206 | $('.btn + .btn.dropdown-toggle', el).each(function () { 207 | var btn = $(this); 208 | var c = btn.css('background-color'); 209 | // alert($.eb.color.darken(c, .2)); 210 | btn.css('background-color', $.eb.color.darken(c, .1)); 211 | }); 212 | 213 | // fix .btn-group.open 214 | var dropdownPropertyChange = function(e) { 215 | var self = $(this); 216 | var cls = e.data.cls; 217 | 218 | /// fix ul li 100% width bug, set ul width to max width of it's sub li 219 | var el = $('.dropdown-menu:visible', this); 220 | if (el.length) dropdownWidthFix(el); 221 | 222 | if (self.hasClass('open') && !self.hasClass(cls+'-open')) { 223 | self.addClass(cls+'-open'); 224 | } 225 | else if (!self.hasClass('open') && self.hasClass(cls+'-open')) { 226 | self.removeClass(cls+'-open'); 227 | } 228 | 229 | self.one('propertychange', {cls:cls}, dropdownPropertyChange); 230 | }; 231 | $.each(['btn-group', 'dropdown'], function (k,cls) { 232 | $('.'+cls, el).one('propertychange', {cls:cls}, dropdownPropertyChange); 233 | }); 234 | 235 | // fix .btn.disabled selector 236 | $('.btn.disabled', el).addClass('btn-disabled'); 237 | 238 | var btnPropertyChange = function (e) { 239 | var self = $(this); 240 | var cls = e.data.cls; 241 | 242 | if (self.hasClass('disabled') && !self.hasClass(cls+'-disabled')) { 243 | self.addClass(cls+'-disabled'); 244 | } 245 | else if (!self.hasClass('disabled') && self.hasClass(cls+'-disabled')) { 246 | self.removeClass(cls+'-disabled'); 247 | } 248 | 249 | self.one('propertychange', {cls:cls}, btnPropertyChange); 250 | } 251 | $.each(['btn'], function (k,cls) { 252 | $('.'+cls, el).one('propertychange', {cls:cls}, btnPropertyChange); 253 | }); 254 | 255 | 256 | //------------- 257 | // table 258 | //------------- 259 | 260 | // fix table-hover effect 261 | $('table.table-hover', el).on('mouseenter', 'tr', function () { 262 | $(this).addClass('tr-hover'); 263 | }).on('mouseleave', 'tr', function () { 264 | $(this).removeClass('tr-hover'); 265 | }); 266 | 267 | //------------- 268 | // form 269 | //------------- 270 | 271 | // fix input[type=xxx] selector 272 | $('input[type="file"], input[type="image"], input[type="submit"], input[type="reset"], input[type="button"], input[type="radio"], input[type="checkbox"], input[type="text"], input[type="password"], input[type="datetime"], input[type="datetime-local"], input[type="date"], input[type="month"], input[type="time"], input[type="week"], input[type="number"], input[type="email"], input[type="url"], input[type="search"], input[type="tel"], input[type="color"]', el).each(function () { 273 | var input = $(this); 274 | input.addClass('input-'+input.attr('type')); 275 | }); 276 | 277 | // fix form-horizontal controls margin-left 278 | $('.form-horizontal .controls:first-child', el).addClass('controls-first-child'); 279 | 280 | // fix .checkbox.inline 281 | $('.checkbox.inline', el).addClass('checkbox-inline'); 282 | $('.radio.inline', el).addClass('radio-inline'); 283 | 284 | // fix select[multiple], select[size] 285 | $('select[multiple]', el).addClass('select-multiple'); 286 | $('select[size]', el).addClass('select-size'); 287 | 288 | // fix tag[disabled] 289 | $('input[disabled], select[disabled], textarea[disabled]', el).each(function () { 290 | var self = $(this); 291 | self.addClass(self[0].tagName.toLowerCase()+'-disabled'); 292 | }); 293 | 294 | // $('input,select,textarea', el).on('propertychange', function() { 295 | // var self = $(this); 296 | // if (self.data('chgDisabled')) return; 297 | 298 | // var cls = self[0].tagName.toLowerCase(); 299 | // // alert(self.attr('disabled')); 300 | // if (self.attr('disabled') && !self.hasClass(cls+'-disabled')) { 301 | // // alert('abc'); 302 | // self.addClass(cls+'-disabled'); 303 | // self.data('chgDisabled', true); 304 | // } 305 | // else if (!self.attr('disabled') && self.hasClass(cls+'-disabled')) { 306 | // self.removeClass(cls+'-disabled'); 307 | // self.data('chgDisabled', true); 308 | // } 309 | // }); 310 | 311 | // $('input,select,textarea', el).on('propertychange', function() { 312 | // var self = $(this); 313 | // if (self.data('chgReadonly')) return; 314 | 315 | // var cls = self[0].tagName.toLowerCase(); 316 | 317 | // if (self.attr('readonly') && !self.hasClass(cls+'-readonly')) { 318 | // self.addClass(cls+'-readonly'); 319 | // self.data('chgReadonly', true); 320 | // } 321 | // else if (typeof self.attr('readonly') == 'undefined' && self.hasClass(cls+'-readonly')) { 322 | // self.removeClass(cls+'-readonly'); 323 | // self.data('chgReadonly', true); 324 | // } 325 | // }); 326 | 327 | // fix tag[readonly] 328 | $('input[readonly], select[readonly], textarea[readonly]', el).each(function () { 329 | var self = $(this); 330 | self.addClass(self[0].tagName.toLowerCase()+'-readonly'); 331 | }); 332 | 333 | // fix input[type=xxx][disabled] 334 | $('input[type="radio"][disabled], input[type="checkbox"][disabled]', el).each(function () { 335 | var self = $(this); 336 | self.addClass(self.attr('type').toLowerCase()+'-disabled'); 337 | }); 338 | 339 | // fix input[type=xxx][readonly] 340 | $('input[type="radio"][readonly], input[type="checkbox"][readonly]', el).each(function () { 341 | var self = $(this); 342 | self.addClass(self.attr('type').toLowerCase()+'-readonly'); 343 | }); 344 | 345 | // fix.control-group.warning ... 346 | var ctlGrpTypeCls = ['warning','success','error','info']; 347 | $.each(ctlGrpTypeCls, function (k,v) { 348 | $('.control-group.'+v, el).addClass('control-group-'+v); 349 | }); 350 | 351 | var controlGroupPropertyChange = function(e) { 352 | if(e.originalEvent.propertyName.toLowerCase() == 'classname') { 353 | var self = $(this); 354 | $.each(ctlGrpTypeCls, function (k,v) { 355 | var ieCls = 'control-group-'+v; 356 | if (self.hasClass(v)) { 357 | if (!self.hasClass(ieCls)) { 358 | self.addClass(ieCls); 359 | } 360 | } 361 | else { 362 | if (self.hasClass(ieCls)) { 363 | self.removeClass(ieCls); 364 | } 365 | } 366 | }); 367 | } 368 | $(this).one('propertychange', controlGroupPropertyChange); 369 | }; 370 | $('.control-group', el).one('propertychange', controlGroupPropertyChange); 371 | 372 | //------------- 373 | // popover 374 | //------------- 375 | // $('.popover .arrow', el).after(''); 376 | 377 | //------------- 378 | // pagination 379 | //------------- 380 | $('.pagination ul li:first-child', el).addClass('first-child'); 381 | 382 | 383 | //------------- 384 | // icons 385 | //------------- 386 | $('[class^="icon-"],[class*=" icon-"]').each(function () { 387 | var self = $(this); 388 | if (!self.hasClass('icon-xxx')) { 389 | self.addClass('icon-xxx'); 390 | self.css('background-position-y', 391 | (parseInt(self.css('background-position-y')) + 1)+'px'); 392 | } 393 | }); 394 | 395 | //------------- 396 | // carousel 397 | //------------- 398 | $('.carousel-control.left', el).removeClass('left').addClass('carousel-control-left'); 399 | $('.carousel-control.right', el).removeClass('right').addClass('carousel-control-right'); 400 | $('.carousel-caption').each(function() { 401 | var self = $(this); 402 | var padding = self.outerWidth() - self.width(); 403 | self.width(self.parents('.carousel-inner .item').width() - padding); 404 | }); 405 | 406 | 407 | } 408 | } 409 | $.bootstrapIE6 = bootstrapIE6; 410 | 411 | 412 | $(document).ready(function () { 413 | bootstrapIE6(); 414 | }); 415 | 416 | })(jQuery); 417 | -------------------------------------------------------------------------------- /js/lxui.min.js: -------------------------------------------------------------------------------- 1 | if("undefined"==typeof jQuery)throw new Error("Bootstrap's JavaScript requires jQuery");+function(t){"use strict";function e(){var t=document.createElement("bootstrap"),e={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"};for(var i in e)if(void 0!==t.style[i])return{end:e[i]};return!1}t.fn.emulateTransitionEnd=function(e){var i=!1,o=this;t(this).one("bsTransitionEnd",function(){i=!0});var n=function(){i||t(o).trigger(t.support.transition.end)};return setTimeout(n,e),this},t(function(){t.support.transition=e(),t.support.transition&&(t.event.special.bsTransitionEnd={bindType:t.support.transition.end,delegateType:t.support.transition.end,handle:function(e){return t(e.target).is(this)?e.handleObj.handler.apply(this,arguments):void 0}})})}(jQuery),+function(t){"use strict";function e(e){return this.each(function(){var i=t(this),n=i.data("bs.alert");n||i.data("bs.alert",n=new o(this)),"string"==typeof e&&n[e].call(i)})}var i='[data-dismiss="alert"]',o=function(e){t(e).on("click",i,this.close)};o.VERSION="3.2.0",o.prototype.close=function(e){function i(){s.detach().trigger("closed.bs.alert").remove()}var o=t(this),n=o.attr("data-target");n||(n=o.attr("href"),n=n&&n.replace(/.*(?=#[^\s]*$)/,""));var s=t(n);e&&e.preventDefault(),s.length||(s=o.hasClass("alert")?o:o.parent()),s.trigger(e=t.Event("close.bs.alert")),e.isDefaultPrevented()||(s.removeClass("in"),t.support.transition&&s.hasClass("fade")?s.one("bsTransitionEnd",i).emulateTransitionEnd(150):i())};var n=t.fn.alert;t.fn.alert=e,t.fn.alert.Constructor=o,t.fn.alert.noConflict=function(){return t.fn.alert=n,this},t(document).on("click.bs.alert.data-api",i,o.prototype.close)}(jQuery),+function(t){"use strict";function e(e){return this.each(function(){var o=t(this),n=o.data("bs.button"),s="object"==typeof e&&e;n||o.data("bs.button",n=new i(this,s)),"toggle"==e?n.toggle():e&&n.setState(e)})}var i=function(e,o){this.$element=t(e),this.options=t.extend({},i.DEFAULTS,o),this.isLoading=!1};i.VERSION="3.2.0",i.DEFAULTS={loadingText:"loading..."},i.prototype.setState=function(e){var i="disabled",o=this.$element,n=o.is("input")?"val":"html",s=o.data();e+="Text",null==s.resetText&&o.data("resetText",o[n]()),o[n](null==s[e]?this.options[e]:s[e]),setTimeout(t.proxy(function(){"loadingText"==e?(this.isLoading=!0,o.addClass(i).attr(i,i)):this.isLoading&&(this.isLoading=!1,o.removeClass(i).removeAttr(i))},this),0)},i.prototype.toggle=function(){var t=!0,e=this.$element.closest('[data-toggle="buttons"]');if(e.length){var i=this.$element.find("input");"radio"==i.prop("type")&&(i.prop("checked")&&this.$element.hasClass("active")?t=!1:e.find(".active").removeClass("active")),t&&i.prop("checked",!this.$element.hasClass("active")).trigger("change")}t&&this.$element.toggleClass("active")};var o=t.fn.button;t.fn.button=e,t.fn.button.Constructor=i,t.fn.button.noConflict=function(){return t.fn.button=o,this},t(document).on("click.bs.button.data-api",'[data-toggle^="button"]',function(i){var o=t(i.target);o.hasClass("btn")||(o=o.closest(".btn")),e.call(o,"toggle"),i.preventDefault()})}(jQuery),+function(t){"use strict";function e(e){return this.each(function(){var o=t(this),n=o.data("bs.carousel"),s=t.extend({},i.DEFAULTS,o.data(),"object"==typeof e&&e),a="string"==typeof e?e:s.slide;n||o.data("bs.carousel",n=new i(this,s)),"number"==typeof e?n.to(e):a?n[a]():s.interval&&n.pause().cycle()})}var i=function(e,i){this.$element=t(e).on("keydown.bs.carousel",t.proxy(this.keydown,this)),this.$indicators=this.$element.find(".carousel-indicators"),this.options=i,this.paused=this.sliding=this.interval=this.$active=this.$items=null,"hover"==this.options.pause&&this.$element.on("mouseenter.bs.carousel",t.proxy(this.pause,this)).on("mouseleave.bs.carousel",t.proxy(this.cycle,this))};i.VERSION="3.2.0",i.DEFAULTS={interval:5e3,pause:"hover",wrap:!0},i.prototype.keydown=function(t){switch(t.which){case 37:this.prev();break;case 39:this.next();break;default:return}t.preventDefault()},i.prototype.cycle=function(e){return e||(this.paused=!1),this.interval&&clearInterval(this.interval),this.options.interval&&!this.paused&&(this.interval=setInterval(t.proxy(this.next,this),this.options.interval)),this},i.prototype.getItemIndex=function(t){return this.$items=t.parent().children(".item"),this.$items.index(t||this.$active)},i.prototype.to=function(e){var i=this,o=this.getItemIndex(this.$active=this.$element.find(".item.active"));return e>this.$items.length-1||0>e?void 0:this.sliding?this.$element.one("slid.bs.carousel",function(){i.to(e)}):o==e?this.pause().cycle():this.slide(e>o?"next":"prev",t(this.$items[e]))},i.prototype.pause=function(e){return e||(this.paused=!0),this.$element.find(".next, .prev").length&&t.support.transition&&(this.$element.trigger(t.support.transition.end),this.cycle(!0)),this.interval=clearInterval(this.interval),this},i.prototype.next=function(){return this.sliding?void 0:this.slide("next")},i.prototype.prev=function(){return this.sliding?void 0:this.slide("prev")},i.prototype.slide=function(e,i){var o=this.$element.find(".item.active"),n=i||o[e](),s=this.interval,a="next"==e?"left":"right",r="next"==e?"first":"last",l=this;if(!n.length){if(!this.options.wrap)return;n=this.$element.find(".item")[r]()}if(n.hasClass("active"))return this.sliding=!1;var h=n[0],d=t.Event("slide.bs.carousel",{relatedTarget:h,direction:a});if(this.$element.trigger(d),!d.isDefaultPrevented()){if(this.sliding=!0,s&&this.pause(),this.$indicators.length){this.$indicators.find(".active").removeClass("active");var p=t(this.$indicators.children()[this.getItemIndex(n)]);p&&p.addClass("active")}var c=t.Event("slid.bs.carousel",{relatedTarget:h,direction:a});return t.support.transition&&this.$element.hasClass("slide")?(n.addClass(e),n[0].offsetWidth,o.addClass(a),n.addClass(a),o.one("bsTransitionEnd",function(){n.removeClass([e,a].join(" ")).addClass("active"),o.removeClass(["active",a].join(" ")),l.sliding=!1,setTimeout(function(){l.$element.trigger(c)},0)}).emulateTransitionEnd(1e3*o.css("transition-duration").slice(0,-1))):(o.removeClass("active"),n.addClass("active"),this.sliding=!1,this.$element.trigger(c)),s&&this.cycle(),this}};var o=t.fn.carousel;t.fn.carousel=e,t.fn.carousel.Constructor=i,t.fn.carousel.noConflict=function(){return t.fn.carousel=o,this},t(document).on("click.bs.carousel.data-api","[data-slide], [data-slide-to]",function(i){var o,n=t(this),s=t(n.attr("data-target")||(o=n.attr("href"))&&o.replace(/.*(?=#[^\s]+$)/,""));if(s.hasClass("carousel")){var a=t.extend({},s.data(),n.data()),r=n.attr("data-slide-to");r&&(a.interval=!1),e.call(s,a),r&&s.data("bs.carousel").to(r),i.preventDefault()}}),t(window).on("load",function(){t('[data-ride="carousel"]').each(function(){var i=t(this);e.call(i,i.data())})})}(jQuery),+function(t){"use strict";function e(e){return this.each(function(){var o=t(this),n=o.data("bs.collapse"),s=t.extend({},i.DEFAULTS,o.data(),"object"==typeof e&&e);!n&&s.toggle&&"show"==e&&(e=!e),n||o.data("bs.collapse",n=new i(this,s)),"string"==typeof e&&n[e]()})}var i=function(e,o){this.$element=t(e),this.options=t.extend({},i.DEFAULTS,o),this.transitioning=null,this.options.parent&&(this.$parent=t(this.options.parent)),this.options.toggle&&this.toggle()};i.VERSION="3.2.0",i.DEFAULTS={toggle:!0},i.prototype.dimension=function(){var t=this.$element.hasClass("width");return t?"width":"height"},i.prototype.show=function(){if(!this.transitioning&&!this.$element.hasClass("in")){var i=t.Event("show.bs.collapse");if(this.$element.trigger(i),!i.isDefaultPrevented()){var o=this.$parent&&this.$parent.find("> .panel > .in");if(o&&o.length){var n=o.data("bs.collapse");if(n&&n.transitioning)return;e.call(o,"hide"),n||o.data("bs.collapse",null)}var s=this.dimension();this.$element.removeClass("collapse").addClass("collapsing")[s](0),this.transitioning=1;var a=function(){this.$element.removeClass("collapsing").addClass("collapse in")[s](""),this.transitioning=0,this.$element.trigger("shown.bs.collapse")};if(!t.support.transition)return a.call(this);var r=t.camelCase(["scroll",s].join("-"));this.$element.one("bsTransitionEnd",t.proxy(a,this)).emulateTransitionEnd(350)[s](this.$element[0][r])}}},i.prototype.hide=function(){if(!this.transitioning&&this.$element.hasClass("in")){var e=t.Event("hide.bs.collapse");if(this.$element.trigger(e),!e.isDefaultPrevented()){var i=this.dimension();this.$element[i](this.$element[i]())[0].offsetHeight,this.$element.addClass("collapsing").removeClass("collapse").removeClass("in"),this.transitioning=1;var o=function(){this.transitioning=0,this.$element.trigger("hidden.bs.collapse").removeClass("collapsing").addClass("collapse")};return t.support.transition?(this.$element[i](0).one("bsTransitionEnd",t.proxy(o,this)).emulateTransitionEnd(350),void 0):o.call(this)}}},i.prototype.toggle=function(){this[this.$element.hasClass("in")?"hide":"show"]()};var o=t.fn.collapse;t.fn.collapse=e,t.fn.collapse.Constructor=i,t.fn.collapse.noConflict=function(){return t.fn.collapse=o,this},t(document).on("click.bs.collapse.data-api",'[data-toggle="collapse"]',function(i){var o,n=t(this),s=n.attr("data-target")||i.preventDefault()||(o=n.attr("href"))&&o.replace(/.*(?=#[^\s]+$)/,""),a=t(s),r=a.data("bs.collapse"),l=r?"toggle":n.data(),h=n.attr("data-parent"),d=h&&t(h);r&&r.transitioning||(d&&d.find('[data-toggle="collapse"][data-parent="'+h+'"]').not(n).addClass("collapsed"),n[a.hasClass("in")?"addClass":"removeClass"]("collapsed")),e.call(a,l)})}(jQuery),+function(t){"use strict";function e(e){e&&3===e.which||(t(n).remove(),t(s).each(function(){var o=i(t(this)),n={relatedTarget:this};o.hasClass("open")&&(o.trigger(e=t.Event("hide.bs.dropdown",n)),e.isDefaultPrevented()||o.removeClass("open").trigger("hidden.bs.dropdown",n))}))}function i(e){var i=e.attr("data-target");i||(i=e.attr("href"),i=i&&/#[A-Za-z]/.test(i)&&i.replace(/.*(?=#[^\s]*$)/,""));var o=i&&t(i);return o&&o.length?o:e.parent()}function o(e){return this.each(function(){var i=t(this),o=i.data("bs.dropdown");o||i.data("bs.dropdown",o=new a(this)),"string"==typeof e&&o[e].call(i)})}var n=".dropdown-backdrop",s='[data-toggle="dropdown"]',a=function(e){t(e).on("click.bs.dropdown",this.toggle)};a.VERSION="3.2.0",a.prototype.toggle=function(o){var n=t(this);if(!n.is(".disabled, :disabled")){var s=i(n),a=s.hasClass("open");if(e(),!a){"ontouchstart"in document.documentElement&&!s.closest(".navbar-nav").length&&t('