tags in editor metadata window
[redakcja.git] / redakcja / static / js / catalogue / catalogue.js
index a750b77..04fedce 100755 (executable)
             }
         });
 
-        $('.chosen-select').chosen().each(function() {
-            var widget = $(this.nextSibling), $t = $(this);
-            $.each($.merge([], this.attributes), function() {
-                if (this.name.substr(0, 5) === 'data-') {
-                    $t.removeAttr(this.name);
-                    widget.attr(this.name, this.value);
-                }
+        if ($.isFunction($.fn.chosen)) {
+            $('.chosen-select').chosen().each(function () {
+                var widget = $(this.nextSibling), $t = $(this);
+                $.each($.merge([], this.attributes), function () {
+                    if (this.name.substr(0, 5) === 'data-') {
+                        $t.removeAttr(this.name);
+                        widget.attr(this.name, this.value);
+                    }
+                });
             });
-        });
-
+        }
 
 
         // tutorial mode