]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - js/util.js
Merge commit 'refs/merge-requests/47' of https://gitorious.org/social/mainline into...
[quix0rs-gnu-social.git] / js / util.js
index d2447864ac1b6fc1f5303b400ab36919eb69bfdc..6a1eb82b2e04139b6aed977a773be0cdb1cf4f2b 100644 (file)
@@ -1382,7 +1382,8 @@ var SN = { // StatusNet
          *
          * @param {String} tag
          */
-        switchInputFormTab: function (tag, setFocus=true) {
+        switchInputFormTab: function (tag, setFocus) {
+            if (typeof setFocus === 'undefined') { setFocus = true; }
             // The one that's current isn't current anymore
             $('.input_form_nav_tab.current').removeClass('current');
             if (tag != null) {
@@ -1579,7 +1580,7 @@ var SN = { // StatusNet
             // don't navigate away from the field on tab when selecting an item
             txtBox.on( "keydown", function ( event ) {
                 if ( event.keyCode === $.ui.keyCode.TAB &&
-                        $(this).data( "autocomplete" ).menu.active ) {
+                        $(this).data( "ui-autocomplete" ).menu.active ) {
                     event.preventDefault();
                 }
             }).autocomplete({
@@ -1600,7 +1601,7 @@ var SN = { // StatusNet
                     this.value = terms.join(" ");
                     return false;
                 }
-            }).data('autocomplete')._renderItem = function (ul, item) {
+            }).data('ui-autocomplete')._renderItem = function (ul, item) {
                     // FIXME: with jQuery UI you cannot have it highlight the match
                     var _l = '<a class="ptag-ac-line-tag">' + item.tag
                           + ' <em class="privacy_mode">' + item.mode + '</em>'