Просмотр исходного кода

Merge pull request #2095 from mkurz/readonly_chaining

Allow chaining for .select2('readonly', ...)
Kevin Brown 11 лет назад
Родитель
Сommit
3c28c35503
1 измененных файлов с 1 добавлено и 2 удалено
  1. 1 2
      select2.js

+ 1 - 2
select2.js

@@ -1151,12 +1151,11 @@ the specific language governing permissions and limitations under the Apache Lic
         // abstract
         readonly: function(enabled) {
             if (enabled === undefined) enabled = false;
-            if (this._readonly === enabled) return false;
+            if (this._readonly === enabled) return;
             this._readonly = enabled;
 
             this.opts.element.prop("readonly", enabled);
             this.enableInterface();
-            return true;
         },
 
         // abstract