1(function () { 2 var factory = function () { 3 4 }; 5 factory.prototype._callback = undefined; 6 factory.prototype._queue = []; 7 factory.prototype.create = function (el, params, callback) { 8 if (this._callback) { 9 this._callback(el, params, callback); 10 } 11 else { 12 this._queue.push({ 13 el: el, 14 params: params, 15 callback: callback 16 }); 17 } 18 }; 19 factory.prototype.registerCallback = function (callback) { 20 this._callback = callback; 21 var queue = this._queue; 22 var length = queue.length; 23 for (var i = 0; i < length; i++) { 24 var item = queue[i]; 25 this._callback(item.el, item.params, item.callback); 26 } 27 this._queue = []; 28 }; 29 30 window.UserFormFactory = new factory(); 31 window.createUserForm = function (el, params, callback) { 32 window.UserFormFactory.create(el, params, callback); 33 }; 34 35 window.gcUserFormModal = function(formParams, modalParams){ 36 var auth = window.gcModalFactory.create(modalParams); 37 modalParams = undefined === modalParams ? { 38 show : false 39 } : modalParams; 40 auth.show(); 41 auth.hide(); 42 modalParams.show && auth.hide(); 43 var $modal = auth.get$Modal(); 44 $modal.find('.modal-dialog').addClass('auth'); 45 $modal.find('.modal-body').css('padding', '0'); 46 var id = auth.getContentId(); 47 createUserForm(document.getElementById(id), formParams); 48 49 return auth; 50 }; 51 52 var defaultAuth; 53 window.gcGetDefaultModalAuth = function () { 54 if (!defaultAuth) { 55 defaultAuth = window.gcUserFormModal({ 56 showSocialAuth: true 57 }); 58 } 59 return defaultAuth; 60 }; 61})();
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.