How to use the monster.pub function in monster

To help you get started, we’ve selected a few monster examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github 2600hz / monster-ui / src / apps / common / submodules / numberFeaturesMenu / numberFeaturesMenu.js View on Github external
template.find('.failover-number').on('click', function() {
				// We add this at the moment of the event because in some cases, we bind the events before it's adding to a parent,
				// which means the account-section might not be loaded yet if we bound it before the event happened.
				if ($(this).parents('.account-section').length) {
					args.accountId = template.parents('.account-section').data('id');
				}

				monster.pub('common.failover.renderPopup', args);
			});
github 2600hz / monster-ui / src / apps / myaccount / app.js View on Github external
callback: function() {
					if (toggle) {
						/* when all the badges have been updated, display my account */
						if (!--countBadges) {
							monster.pub('core.showAppName', 'myaccount');
							self.toggle({
								callback: callback
							});
						}
					}
				}
			});
github 2600hz / monster-ui / apps / voip / app.js View on Github external
parent.find('.category#numbers').on('click', function() {
				monster.pub('voip.numbers.render', container);
			});
github 2600hz / monster-ui / src / apps / myaccount / submodules / errorTracker / errorTracker.js View on Github external
_errorTrackerRenderContent: function(args) {
			var self = this,
				dataTemplate = self.errorTrackerFormatData(monster.logs.error),
				listErrorTemplates = $(self.getTemplate({
					name: 'layout',
					data: dataTemplate,
					submodule: 'errorTracker'
				}));

			self.errorTrackerBindEvents(listErrorTemplates);

			monster.pub('myaccount.renderSubmodule', listErrorTemplates);

			args.callback && args.callback(listErrorTemplates);
		},
github 2600hz / monster-ui / src / apps / myaccount / submodules / user / user.js View on Github external
}, function(err, results) {
				var formattedData = self.userLayoutFormatData(results),
					userTemplate = $(self.getTemplate({
						name: 'layout',
						data: formattedData,
						submodule: 'user'
					}));

				self.userBindingEvents(userTemplate, results);

				monster.pub('myaccount.renderSubmodule', userTemplate);

				if (typeof args.callback === 'function') {
					args.callback(userTemplate);
				}
			});
		},
github 2600hz / monster-ui / src / apps / myaccount / submodules / balance / balance.js View on Github external
self.balanceDisplayGenericTable('per-minute-voip', balance, renderData.uiRestrictions.balance.show_credit, function() {
							monster.pub('myaccount.updateMenu', args);

							monster.pub('myaccount.renderSubmodule', balance);

							if (typeof argsCallback === 'function') {
								argsCallback(balance);
							}
						});
					}
github 2600hz / monster-ui / apps / myaccount / submodules / profile / profile.js View on Github external
self.profileFormatData(results, function(results) {
						var profile = $(monster.template(self, 'profile-layout', results));

						self.profileBindEvents(profile, results);

						monster.pub('myaccount.renderSubmodule', profile);

						if(args.uiTab) {
							profile.find('a[href="#'+args.uiTab+'"]').tab('show');
						}

						if(typeof args.callback === 'function') {
							args.callback(profile);
						}
					});
				}
github 2600hz / monster-ui / src / apps / myaccount / submodules / balance / balance.js View on Github external
self.balanceDisplayGenericTable('per-minute-voip', balance, renderData.uiRestrictions.balance.show_credit, function() {
							monster.pub('myaccount.updateMenu', args);

							monster.pub('myaccount.renderSubmodule', balance);

							if (typeof argsCallback === 'function') {
								argsCallback(balance);
							}
						});
					}
github 2600hz / monster-ui / apps / voip / submodules / strategy / strategy.js View on Github external
container.on('click', '.action-links .spare-link:not(.disabled)', function(e) {
				e.preventDefault();

				var args = {
					accountName: monster.apps['auth'].currentAccount.name,
					accountId: self.accountId,
					callback: function(numberList) {
						var numbers = $.map(numberList, function(val) {
							return val.phoneNumber;
						});
						addNumbersToMainCallflow(numbers);
					}
				}

				monster.pub('common.numbers.dialogSpare', args);
			});
github 2600hz / monster-ui-voip / submodules / strategy / strategy.js View on Github external
container.on('click', '.action-links .spare-link:not(.disabled)', function(e) {
				e.preventDefault();

				var args = {
					accountName: monster.apps.auth.currentAccount.name,
					accountId: self.accountId,
					callback: function(numberList) {
						var numbers = $.map(numberList, function(val) {
							return val.phoneNumber;
						});
						addNumbersToMainCallflow(numbers);
					}
				};

				monster.pub('common.numbers.dialogSpare', args);
			});

monster

Flying Spaghetti Machine/Finite State Monster

MIT
Latest version published 12 years ago

Package Health Score

42 / 100
Full package analysis

Popular monster functions