मैं slick.editors.js में ऐसा किया - कुछ बग हो सकता है, लेकिन काम करते हैं और मदद से आप आरंभ करने के लिए करना चाहिए:
$.extend(true, window, {
"Slick": {
"Editors": {
"Auto": AutoCompleteEditor,
"Text": TextEditor,
"Integer": IntegerEditor,
"Date": DateEditor,
"YesNoSelect": YesNoSelectEditor,
"Checkbox": CheckboxEditor,
"PercentComplete": PercentCompleteEditor,
"LongText": LongTextEditor
}
}
});
var availableTags = [
"ActionScript",
"AppleScript",
"Asp",
"BASIC",
"C",
"C++",
"Clojure",
"COBOL",
"ColdFusion",
"Erlang",
"Fortran",
"Groovy",
"Haskell",
"Java",
"JavaScript",
"Lisp",
"Perl",
"PHP",
"Python",
"Ruby",
"Scala",
"Scheme"
];
function AutoCompleteEditor(args) {
var $input;
var defaultValue;
var scope = this;
var calendarOpen = false;
this.init = function() {
$input = $("<INPUT id='tags' class='editor-text' />");
$input.appendTo(args.container);
$input.focus().select();
$input.autocomplete({
source: availableTags
});
};
this.destroy = function() {
$input.autocomplete("destroy");
};
this.focus = function() {
$input.focus();
};
this.loadValue = function (item) {
defaultValue = item[args.column.field];
$input.val(defaultValue);
$input[0].defaultValue = defaultValue;
$input.select();
};
this.serializeValue = function() {
return $input.val();
};
this.applyValue = function (item, state) {
item[args.column.field] = state;
};
this.isValueChanged = function() {
return (!($input.val() == "" && defaultValue == null)) && ($input.val() != defaultValue);
};
this.validate = function() {
return {
valid: true,
msg: null
};
};
this.init();
}
मुझे पता है कि अगर यह मदद करता है करते हैं।
हाय ganeshk, यही था कि मैं क्या चाहता था ... धन्यवाद ... लेकिन ... यह फायरबग कंसोल में सभी रिपोर्ट्स "$ input.autocomplete एक फ़ंक्शन नहीं है"। मैंने जो कुछ भी किया, वह स्वतः पूर्ण नहीं होता है। जैसा कि मैंने पढ़ा है, autocompare jquery-ui-1.8 का हिस्सा है। सही? कोई संकेत जो मैं कर सकता था? – user1596343
मदद की खुशी है - और एसओ में आपका स्वागत है! बस अपने एचटीएमएल में 'jquery-ui.js' और' jquery-ui.css' शामिल करें। आप http://www.jqueryui.com – ganeshk
दोनों से डाउनलोड कर सकते हैं। मुझे उम्मीद है कि यह आपके प्रश्न का उत्तर देगा। क्या आप इसे अपने उत्तर के रूप में स्वीकार कर लेंगे? – ganeshk