From 3db510e9f6fb3a0b61304e566071e7a27b4563f2 Mon Sep 17 00:00:00 2001 From: Yuusaku Miyazaki Date: Mon, 30 Oct 2017 09:07:44 +0900 Subject: [PATCH] v7.4.6 --- README.md | 9 +- dist/js/jquery.ajax-combobox.js | 25 +- dist/js/jquery.ajax-combobox.min.js | 4 +- package-lock.json | 2133 +++++++++++++++++++++++++++ package.json | 6 +- 5 files changed, 2154 insertions(+), 23 deletions(-) create mode 100644 package-lock.json diff --git a/README.md b/README.md index 31ca9db..0462500 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,6 @@ # jquery.ajax-combobox +[![npm version](https://img.shields.io/npm/v/jquery.ajax-combobox.svg)](https://www.npmjs.com/package/jquery.ajax-combobox) [![Build Status](https://travis-ci.org/sutara79/jquery.ajax-combobox.svg?branch=master)](https://travis-ci.org/sutara79/jquery.ajax-combobox) [![codecov](https://codecov.io/gh/sutara79/jquery.ajax-combobox/branch/master/graph/badge.svg)](https://codecov.io/gh/sutara79/jquery.ajax-combobox) [![dependencies Status](https://david-dm.org/sutara79/jquery.ajax-combobox/status.svg)](https://david-dm.org/sutara79/jquery.ajax-combobox) @@ -15,10 +16,10 @@ http://www.usamimi.info/~sutara/ajax-combobox/ ## Install - [GitHub](https://github.com/sutara79/jquery.ajax-combobox): Clone or download. Only you need is `dist/`. - [npm](https://www.npmjs.com/package/jquery.ajax-combobox): `npm i jquery.ajax-combobox` -- CDN ([jsDelivr](https://github.com/jsdelivr/jsdelivr#usage)): - - jquery.ajax-combobox.min.js: [v7.4.5](https://cdn.jsdelivr.net/npm/jquery.ajax-combobox@7.4.5/dist/js/jquery.ajax-combobox.min.js) - - jquery.ajax-combobox.min.css: [v7.4.5](https://cdn.jsdelivr.net/npm/jquery.ajax-combobox@7.4.5/dist/css/jquery.ajax-combobox.min.css) - - btn.png: [v7.4.5](https://cdn.jsdelivr.net/npm/jquery.ajax-combobox@7.4.5/dist/btn.png) +- CDN ([jsDelivr](https://www.jsdelivr.com/)): + - [jquery.ajax-combobox.min.js (v7.4.6)](https://cdn.jsdelivr.net/npm/jquery.ajax-combobox@7.4.6/dist/js/jquery.ajax-combobox.min.js) + - [jquery.ajax-combobox.min.css (v7.4.6)](https://cdn.jsdelivr.net/npm/jquery.ajax-combobox@7.4.6/dist/css/jquery.ajax-combobox.min.css) + - [btn.png (v7.4.6)](https://cdn.jsdelivr.net/npm/jquery.ajax-combobox@7.4.6/dist/btn.png) - In addition to above, `dist/php/*.php` is REQUIRED. diff --git a/dist/js/jquery.ajax-combobox.js b/dist/js/jquery.ajax-combobox.js index f2fd675..76cc291 100644 --- a/dist/js/jquery.ajax-combobox.js +++ b/dist/js/jquery.ajax-combobox.js @@ -1,6 +1,6 @@ /** * @file jquery.ajax-combobox - * @version 7.4.5 + * @version 7.4.6 * @author Yuusaku Miyazaki * @license MIT */ @@ -154,20 +154,17 @@ $.extend($.ajaxComboBox.prototype, /** @lends external:jQuery.ajaxComboBox.proto */ _setOption2nd: function(option) { // 検索するフィールド(カンマ区切りで複数指定可能) - option.search_field = (option.search_field === undefined) ? - option.field : - option.search_field; + option.search_field = (option.search_field) ? option.search_field : option.field; - // 大文字で統一 + // Unify with uppercase option.and_or = option.and_or.toUpperCase(); - // カンマ区切りのオプションを配列に変換する。 - var arr = ['hide_field', 'show_field', 'search_field']; - for (var i=0; i * @license MIT */ -!function(a){"object"==typeof module&&"object"==typeof module.exports?a(require("jquery"),window,document):a(jQuery,window,document)}(function(a,b,c,d){a.fn.ajaxComboBox=function(b,c){var e=[];return this.each(function(){e.push(new a.ajaxComboBox(this,b,c))}),c!==d&&c.instance!==d&&c.instance?a(e):this},a.ajaxComboBox=function(a,b,c){this.option=this._setOption(b,c),this._setMessage(),this._setCssClass(),this._setProp(),this._setElem(a),this._setButtonAttrDefault(),this._setInitRecord(),this._ehButton(),this._ehComboInput(),this._ehWhole(),this._ehTextArea(),this.option.shorten_btn&&this._findUrlToShorten(this)},a.extend(a.ajaxComboBox.prototype,{_setOption:function(a,b){return b=this._setOption1st(a,b),b=this._setOption2nd(b)},_setOption1st:function(b,c){return a.extend({source:b,lang:"en",plugin_type:"combobox",init_record:!1,db_table:"tbl",field:"name",and_or:"AND",per_page:10,navi_num:5,primary_key:"id",button_img:"dist/btn.png",bind_to:!1,navi_simple:!1,sub_info:!1,sub_as:{},show_field:"",hide_field:"",select_only:!1,tags:!1,shorten_btn:!1,shorten_src:"dist/bitly.php",shorten_min:20,shorten_reg:!1},c)},_setOption2nd:function(a){a.search_field=a.search_field===d?a.field:a.search_field,a.and_or=a.and_or.toUpperCase();for(var b=["hide_field","show_field","search_field"],c=0;c"),c.container=a(c.combo_input).parent().addClass(this.css_class.container),"combobox"==this.option.plugin_type?(c.button=a("
").addClass(this.css_class.button),c.img=a("").attr("src",this.option.button_img)):(c.button=!1,c.img=!1),c.result_area=a("
").addClass(this.css_class.re_area),c.navi=a("
").addClass(this.css_class.navi),c.navi_info=a("
").addClass("info"),c.navi_p=a("

"),c.results=a("