From 2c671e2aacb545dc03cce373ab860f07ffacf554 Mon Sep 17 00:00:00 2001 From: Sergey Date: Wed, 4 May 2016 23:20:23 +0300 Subject: [PATCH] bump new version --- bower.json | 2 +- dist/js/jcf.button.js | 2 +- dist/js/jcf.checkbox.js | 2 +- dist/js/jcf.file.js | 2 +- dist/js/jcf.js | 4 ++-- dist/js/jcf.number.js | 2 +- dist/js/jcf.radio.js | 2 +- dist/js/jcf.range.js | 2 +- dist/js/jcf.scrollable.js | 2 +- dist/js/jcf.select.js | 2 +- dist/js/jcf.textarea.js | 2 +- js/jcf.button.js | 2 +- js/jcf.checkbox.js | 2 +- js/jcf.file.js | 2 +- js/jcf.js | 4 ++-- js/jcf.number.js | 2 +- js/jcf.radio.js | 2 +- js/jcf.range.js | 2 +- js/jcf.scrollable.js | 2 +- js/jcf.select.js | 2 +- js/jcf.textarea.js | 2 +- package.json | 2 +- 22 files changed, 24 insertions(+), 24 deletions(-) diff --git a/bower.json b/bower.json index 73c0d1e..e9048e0 100644 --- a/bower.json +++ b/bower.json @@ -1,6 +1,6 @@ { "name": "jcf", - "version": "1.2.2", + "version": "1.2.3", "homepage": "http://psd2html.com/jcf", "authors": [ "psd2html" diff --git a/dist/js/jcf.button.js b/dist/js/jcf.button.js index b34677d..d6442fe 100644 --- a/dist/js/jcf.button.js +++ b/dist/js/jcf.button.js @@ -4,6 +4,6 @@ * Copyright 2014-2015 PSD2HTML - http://psd2html.com/jcf * Released under the MIT license (LICENSE.txt) * - * Version: 1.2.2 + * Version: 1.2.3 */ !function(t){t.addModule(function(t){"use strict";return{name:"Button",selector:'button, input[type="button"], input[type="submit"], input[type="reset"]',options:{realElementClass:"jcf-real-element",fakeStructure:'',buttonContent:".jcf-button-content"},matchElement:function(t){return t.is(this.selector)},init:function(){this.initStructure(),this.attachEvents(),this.refresh()},initStructure:function(){this.page=t("html"),this.realElement=t(this.options.element).addClass(this.options.realElementClass),this.fakeElement=t(this.options.fakeStructure).insertBefore(this.realElement),this.buttonContent=this.fakeElement.find(this.options.buttonContent),this.fakeElement.css({position:"relative"}),this.realElement.prependTo(this.fakeElement).css({position:"absolute",opacity:0})},attachEvents:function(){this.realElement.on({focus:this.onFocus,"jcf-pointerdown":this.onPress})},onPress:function(){this.fakeElement.addClass(this.options.pressedClass),this.page.on("jcf-pointerup",this.onRelease)},onRelease:function(){this.fakeElement.removeClass(this.options.pressedClass),this.page.off("jcf-pointerup",this.onRelease)},onFocus:function(){this.fakeElement.addClass(this.options.focusClass),this.realElement.on("blur",this.onBlur)},onBlur:function(){this.fakeElement.removeClass(this.options.focusClass),this.realElement.off("blur",this.onBlur)},refresh:function(){this.buttonContent.html(this.realElement.html()||this.realElement.val()),this.fakeElement.toggleClass(this.options.disabledClass,this.realElement.is(":disabled"))},destroy:function(){this.realElement.removeClass(this.options.realElementClass).insertBefore(this.fakeElement),this.fakeElement.remove(),this.realElement.off({focus:this.onFocus,blur:this.onBlur,"jcf-pointerdown":this.onPress}),this.realElement.css({position:"",opacity:""})}}})}(jcf); \ No newline at end of file diff --git a/dist/js/jcf.checkbox.js b/dist/js/jcf.checkbox.js index 0be35e3..72acc3e 100755 --- a/dist/js/jcf.checkbox.js +++ b/dist/js/jcf.checkbox.js @@ -4,6 +4,6 @@ * Copyright 2014-2015 PSD2HTML - http://psd2html.com/jcf * Released under the MIT license (LICENSE.txt) * - * Version: 1.2.2 + * Version: 1.2.3 */ !function(e){e.addModule(function(e){"use strict";return{name:"Checkbox",selector:'input[type="checkbox"]',options:{wrapNative:!0,checkedClass:"jcf-checked",uncheckedClass:"jcf-unchecked",labelActiveClass:"jcf-label-active",fakeStructure:''},matchElement:function(e){return e.is(":checkbox")},init:function(){this.initStructure(),this.attachEvents(),this.refresh()},initStructure:function(){this.doc=e(document),this.realElement=e(this.options.element),this.fakeElement=e(this.options.fakeStructure).insertAfter(this.realElement),this.labelElement=this.getLabelFor(),this.options.wrapNative?this.realElement.appendTo(this.fakeElement).css({position:"absolute",height:"100%",width:"100%",opacity:0,margin:0}):this.realElement.addClass(this.options.hiddenClass)},attachEvents:function(){this.realElement.on({focus:this.onFocus,click:this.onRealClick}),this.fakeElement.on("click",this.onFakeClick),this.fakeElement.on("jcf-pointerdown",this.onPress)},onRealClick:function(e){var t=this;this.savedEventObject=e,setTimeout(function(){t.refresh()},0)},onFakeClick:function(e){this.options.wrapNative&&this.realElement.is(e.target)||this.realElement.is(":disabled")||(delete this.savedEventObject,this.stateChecked=this.realElement.prop("checked"),this.realElement.prop("checked",!this.stateChecked),this.fireNativeEvent(this.realElement,"click"),this.savedEventObject&&this.savedEventObject.isDefaultPrevented()?this.realElement.prop("checked",this.stateChecked):this.fireNativeEvent(this.realElement,"change"),delete this.savedEventObject)},onFocus:function(){this.pressedFlag&&this.focusedFlag||(this.focusedFlag=!0,this.fakeElement.addClass(this.options.focusClass),this.realElement.on("blur",this.onBlur))},onBlur:function(){this.pressedFlag||(this.focusedFlag=!1,this.fakeElement.removeClass(this.options.focusClass),this.realElement.off("blur",this.onBlur))},onPress:function(e){this.focusedFlag||"mouse"!==e.pointerType||this.realElement.focus(),this.pressedFlag=!0,this.fakeElement.addClass(this.options.pressedClass),this.doc.on("jcf-pointerup",this.onRelease)},onRelease:function(e){this.focusedFlag&&"mouse"===e.pointerType&&this.realElement.focus(),this.pressedFlag=!1,this.fakeElement.removeClass(this.options.pressedClass),this.doc.off("jcf-pointerup",this.onRelease)},getLabelFor:function(){var t=this.realElement.closest("label"),s=this.realElement.prop("id");return!t.length&&s&&(t=e('label[for="'+s+'"]')),t.length?t:null},refresh:function(){var e=this.realElement.is(":checked"),t=this.realElement.is(":disabled");this.fakeElement.toggleClass(this.options.checkedClass,e).toggleClass(this.options.uncheckedClass,!e).toggleClass(this.options.disabledClass,t),this.labelElement&&this.labelElement.toggleClass(this.options.labelActiveClass,e)},destroy:function(){this.options.wrapNative?this.realElement.insertBefore(this.fakeElement).css({position:"",width:"",height:"",opacity:"",margin:""}):this.realElement.removeClass(this.options.hiddenClass),this.fakeElement.off("jcf-pointerdown",this.onPress),this.fakeElement.remove(),this.doc.off("jcf-pointerup",this.onRelease),this.realElement.off({focus:this.onFocus,click:this.onRealClick})}}})}(jcf); \ No newline at end of file diff --git a/dist/js/jcf.file.js b/dist/js/jcf.file.js index 890cf3e..e17d7eb 100644 --- a/dist/js/jcf.file.js +++ b/dist/js/jcf.file.js @@ -4,6 +4,6 @@ * Copyright 2014-2015 PSD2HTML - http://psd2html.com/jcf * Released under the MIT license (LICENSE.txt) * - * Version: 1.2.2 + * Version: 1.2.3 */ !function(e){e.addModule(function(e){"use strict";return{name:"File",selector:'input[type="file"]',options:{fakeStructure:'',buttonText:"Choose file",placeholderText:"No file chosen",realElementClass:"jcf-real-element",extensionPrefixClass:"jcf-extension-",selectedFileBlock:".jcf-fake-input",buttonTextBlock:".jcf-button-content"},matchElement:function(e){return e.is('input[type="file"]')},init:function(){this.initStructure(),this.attachEvents(),this.refresh()},initStructure:function(){this.doc=e(document),this.realElement=e(this.options.element).addClass(this.options.realElementClass),this.fakeElement=e(this.options.fakeStructure).insertBefore(this.realElement),this.fileNameBlock=this.fakeElement.find(this.options.selectedFileBlock),this.buttonTextBlock=this.fakeElement.find(this.options.buttonTextBlock).text(this.options.buttonText),this.realElement.appendTo(this.fakeElement).css({position:"absolute",opacity:0})},attachEvents:function(){this.realElement.on({"jcf-pointerdown":this.onPress,change:this.onChange,focus:this.onFocus})},onChange:function(){this.refresh()},onFocus:function(){this.fakeElement.addClass(this.options.focusClass),this.realElement.on("blur",this.onBlur)},onBlur:function(){this.fakeElement.removeClass(this.options.focusClass),this.realElement.off("blur",this.onBlur)},onPress:function(){this.fakeElement.addClass(this.options.pressedClass),this.doc.on("jcf-pointerup",this.onRelease)},onRelease:function(){this.fakeElement.removeClass(this.options.pressedClass),this.doc.off("jcf-pointerup",this.onRelease)},getFileName:function(){var t="",s=this.realElement.prop("files");return s&&s.length?e.each(s,function(e,s){t+=(e>0?", ":"")+s.name}):t=this.realElement.val().replace(/^[\s\S]*(?:\\|\/)([\s\S^\\\/]*)$/g,"$1"),t},getFileExtension:function(){var e=this.realElement.val();return e.lastIndexOf(".")<0?"":e.substring(e.lastIndexOf(".")+1).toLowerCase()},updateExtensionClass:function(){var e=this.getFileExtension(),t=this.fakeElement.prop("className"),s=t.replace(new RegExp("(\\s|^)"+this.options.extensionPrefixClass+"[^ ]+","gi"),"");this.fakeElement.prop("className",s),e&&this.fakeElement.addClass(this.options.extensionPrefixClass+e)},refresh:function(){var e=this.getFileName()||this.options.placeholderText;this.fakeElement.toggleClass(this.options.disabledClass,this.realElement.is(":disabled")),this.fileNameBlock.text(e),this.updateExtensionClass()},destroy:function(){this.realElement.insertBefore(this.fakeElement).removeClass(this.options.realElementClass).css({position:"",opacity:""}),this.fakeElement.remove(),this.realElement.off({"jcf-pointerdown":this.onPress,change:this.onChange,focus:this.onFocus,blur:this.onBlur}),this.doc.off("jcf-pointerup",this.onRelease)}}})}(jcf); \ No newline at end of file diff --git a/dist/js/jcf.js b/dist/js/jcf.js index 4a9f75d..a721aef 100755 --- a/dist/js/jcf.js +++ b/dist/js/jcf.js @@ -4,6 +4,6 @@ * Copyright 2014-2015 PSD2HTML - http://psd2html.com/jcf * Released under the MIT license (LICENSE.txt) * - * Version: 1.2.2 + * Version: 1.2.3 */ -!function(e,t){"use strict";"function"==typeof define&&define.amd?define(["jquery"],t):"object"==typeof exports?module.exports=t(require("jquery")):e.jcf=t(jQuery)}(this,function(e){"use strict";var t="1.2.2",n=[],o={optionsKey:"jcf",dataKey:"jcf-instance",rtlClass:"jcf-rtl",focusClass:"jcf-focus",pressedClass:"jcf-pressed",disabledClass:"jcf-disabled",hiddenClass:"jcf-hidden",resetAppearanceClass:"jcf-reset-appearance",unselectableClass:"jcf-unselectable"},a="ontouchstart"in window||window.DocumentTouch&&document instanceof window.DocumentTouch,i=/Windows Phone/.test(navigator.userAgent);o.isMobileDevice=!(!a&&!i);var r=function(){var t=e("