Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

backbone-toolbar

Package Overview
Dependencies
Maintainers
1
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

backbone-toolbar - npm Package Compare versions

Comparing version 0.0.2 to 0.0.3

369

dist/backbone-toolbar.js

@@ -10,3 +10,3 @@ (function webpackUniversalModuleDefinition(root, factory) {

root["backbone-toolbar"] = factory(root["underscore"], root["backbone"], root["jquery"]);
})(this, function(__WEBPACK_EXTERNAL_MODULE_3__, __WEBPACK_EXTERNAL_MODULE_5__, __WEBPACK_EXTERNAL_MODULE_26__) {
})(this, function(__WEBPACK_EXTERNAL_MODULE_5__, __WEBPACK_EXTERNAL_MODULE_7__, __WEBPACK_EXTERNAL_MODULE_28__) {
return /******/ (function(modules) { // webpackBootstrap

@@ -65,3 +65,3 @@ /******/ // The module cache

var _itemRegister = __webpack_require__(2);
var _itemRegister = __webpack_require__(4);

@@ -75,3 +75,3 @@ Object.defineProperty(exports, 'register', {

var _toolbarView = __webpack_require__(4);
var _toolbarView = __webpack_require__(6);

@@ -85,16 +85,18 @@ Object.defineProperty(exports, 'ToolbarView', {

var _toolbar = __webpack_require__(11);
var _toolbar = __webpack_require__(13);
var _button = __webpack_require__(15);
var _button = __webpack_require__(17);
var _dropdown = __webpack_require__(17);
var _dropdown = __webpack_require__(19);
var _dropdownItem = __webpack_require__(19);
var _dropdownItem = __webpack_require__(21);
var _dropdownHeader = __webpack_require__(21);
var _dropdownHeader = __webpack_require__(23);
var _dropdownDivider = __webpack_require__(23);
var _dropdownDivider = __webpack_require__(25);
var _dropdownRadioGroup = __webpack_require__(25);
var _dropdownRadioGroup = __webpack_require__(27);
var _dropdownSubmenu = __webpack_require__(32);
(0, _itemRegister.register)('toolbar', _toolbar.renderToolbar);

@@ -107,6 +109,9 @@ (0, _itemRegister.register)('button', _button.renderButton);

(0, _itemRegister.register)('dropdown-radio-group', _dropdownRadioGroup.renderDropdownRadioGroup);
(0, _itemRegister.register)('dropdown-submenu', _dropdownSubmenu.renderDropdownSubmenu);
/***/ },
/* 1 */,
/* 2 */
/* 2 */,
/* 3 */,
/* 4 */
/***/ function(module, exports, __webpack_require__) {

@@ -122,3 +127,3 @@

var _underscore = __webpack_require__(3);
var _underscore = __webpack_require__(5);

@@ -152,9 +157,9 @@ var _underscore2 = _interopRequireDefault(_underscore);

/***/ },
/* 3 */
/* 5 */
/***/ function(module, exports) {
module.exports = __WEBPACK_EXTERNAL_MODULE_3__;
module.exports = __WEBPACK_EXTERNAL_MODULE_5__;
/***/ },
/* 4 */
/* 6 */
/***/ function(module, exports, __webpack_require__) {

@@ -171,15 +176,15 @@

var _underscore = __webpack_require__(3);
var _underscore = __webpack_require__(5);
var _underscore2 = _interopRequireDefault(_underscore);
var _backbone = __webpack_require__(5);
var _backbone = __webpack_require__(7);
var _backbone2 = _interopRequireDefault(_backbone);
var _util = __webpack_require__(6);
var _util = __webpack_require__(8);
var _itemRegister = __webpack_require__(2);
var _itemRegister = __webpack_require__(4);
__webpack_require__(7);
__webpack_require__(9);

@@ -342,9 +347,9 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

/***/ },
/* 5 */
/* 7 */
/***/ function(module, exports) {
module.exports = __WEBPACK_EXTERNAL_MODULE_5__;
module.exports = __WEBPACK_EXTERNAL_MODULE_7__;
/***/ },
/* 6 */
/* 8 */
/***/ function(module, exports, __webpack_require__) {

@@ -360,3 +365,3 @@

var _underscore = __webpack_require__(3);
var _underscore = __webpack_require__(5);

@@ -404,3 +409,3 @@ var _underscore2 = _interopRequireDefault(_underscore);

/***/ },
/* 7 */
/* 9 */
/***/ function(module, exports, __webpack_require__) {

@@ -411,6 +416,6 @@

// load the styles
var content = __webpack_require__(8);
var content = __webpack_require__(10);
if(typeof content === 'string') content = [[module.id, content, '']];
// add the styles to the DOM
var update = __webpack_require__(10)(content, {});
var update = __webpack_require__(12)(content, {});
if(content.locals) module.exports = content.locals;

@@ -432,6 +437,6 @@ // Hot Module Replacement

/***/ },
/* 8 */
/* 10 */
/***/ function(module, exports, __webpack_require__) {
exports = module.exports = __webpack_require__(9)();
exports = module.exports = __webpack_require__(11)();
// imports

@@ -447,3 +452,3 @@

/***/ },
/* 9 */
/* 11 */
/***/ function(module, exports) {

@@ -504,3 +509,3 @@

/***/ },
/* 10 */
/* 12 */
/***/ function(module, exports, __webpack_require__) {

@@ -757,3 +762,3 @@

/***/ },
/* 11 */
/* 13 */
/***/ function(module, exports, __webpack_require__) {

@@ -768,9 +773,9 @@

var _underscore = __webpack_require__(3);
var _underscore = __webpack_require__(5);
var _underscore2 = _interopRequireDefault(_underscore);
var _util = __webpack_require__(6);
var _util = __webpack_require__(8);
var _toolbar = __webpack_require__(12);
var _toolbar = __webpack_require__(14);

@@ -809,6 +814,6 @@ var _toolbar2 = _interopRequireDefault(_toolbar);

/***/ },
/* 12 */
/* 14 */
/***/ function(module, exports, __webpack_require__) {
var jade = __webpack_require__(13);
var jade = __webpack_require__(15);

@@ -847,3 +852,3 @@ module.exports = function template(locals) {

/***/ },
/* 13 */
/* 15 */
/***/ function(module, exports, __webpack_require__) {

@@ -1068,3 +1073,3 @@

try {
str = str || __webpack_require__(14).readFileSync(filename, 'utf8')
str = str || __webpack_require__(16).readFileSync(filename, 'utf8')
} catch (ex) {

@@ -1101,3 +1106,3 @@ rethrow(err, null, lineno)

/***/ },
/* 14 */
/* 16 */
/***/ function(module, exports) {

@@ -1108,3 +1113,3 @@

/***/ },
/* 15 */
/* 17 */
/***/ function(module, exports, __webpack_require__) {

@@ -1119,7 +1124,7 @@

var _underscore = __webpack_require__(3);
var _underscore = __webpack_require__(5);
var _underscore2 = _interopRequireDefault(_underscore);
var _button = __webpack_require__(16);
var _button = __webpack_require__(18);

@@ -1155,6 +1160,6 @@ var _button2 = _interopRequireDefault(_button);

/***/ },
/* 16 */
/* 18 */
/***/ function(module, exports, __webpack_require__) {
var jade = __webpack_require__(13);
var jade = __webpack_require__(15);

@@ -1194,3 +1199,3 @@ module.exports = function template(locals) {

/***/ },
/* 17 */
/* 19 */
/***/ function(module, exports, __webpack_require__) {

@@ -1205,7 +1210,7 @@

var _underscore = __webpack_require__(3);
var _underscore = __webpack_require__(5);
var _underscore2 = _interopRequireDefault(_underscore);
var _dropdown = __webpack_require__(18);
var _dropdown = __webpack_require__(20);

@@ -1261,6 +1266,6 @@ var _dropdown2 = _interopRequireDefault(_dropdown);

/***/ },
/* 18 */
/* 20 */
/***/ function(module, exports, __webpack_require__) {
var jade = __webpack_require__(13);
var jade = __webpack_require__(15);

@@ -1271,3 +1276,3 @@ module.exports = function template(locals) {

var jade_interp;
;var locals_for_with = (locals || {});(function (button, classes, id, menu, undefined) {
;var locals_for_with = (locals || {});(function (button, classes, id, menu) {
jade_mixins["buttonMixin"] = jade_interp = function(options){

@@ -1287,8 +1292,8 @@ var block = (this && this.block), attributes = (this && this.attributes) || {};

};
buf.push("<div" + (jade.attr("id", id, true, true)) + (jade.cls(['dropdown',classes], [null,true])) + ">");
jade_mixins["buttonMixin"](button);
buf.push("<ul role=\"menu\"" + (jade.attr("aria-labeledby", button.id, true, true)) + (jade.attr("id", id, true, true)) + (jade.cls(['dropdown-menu',classes], [null,true])) + ">");
// iterate menu.items
jade_mixins["menuMixin"] = jade_interp = function(labeledby, options){
var block = (this && this.block), attributes = (this && this.attributes) || {};
buf.push("<ul role=\"menu\"" + (jade.attr("aria-labeledby", labeledby, true, true)) + (jade.attr("id", options.id, true, true)) + (jade.cls(['dropdown-menu',options.classes], [null,true])) + ">");
// iterate options.items
;(function(){
var $$obj = menu.items;
var $$obj = options.items;
if ('number' == typeof $$obj.length) {

@@ -1313,7 +1318,12 @@

buf.push("</ul></div>");}.call(this,"button" in locals_for_with?locals_for_with.button:typeof button!=="undefined"?button:undefined,"classes" in locals_for_with?locals_for_with.classes:typeof classes!=="undefined"?classes:undefined,"id" in locals_for_with?locals_for_with.id:typeof id!=="undefined"?id:undefined,"menu" in locals_for_with?locals_for_with.menu:typeof menu!=="undefined"?menu:undefined,"undefined" in locals_for_with?locals_for_with.undefined: false?undefined:undefined));;return buf.join("");
buf.push("</ul>");
};
buf.push("<div" + (jade.attr("id", id, true, true)) + (jade.cls(['dropdown',classes], [null,true])) + ">");
jade_mixins["buttonMixin"](button);
jade_mixins["menuMixin"](button.id, menu);
buf.push("</div>");}.call(this,"button" in locals_for_with?locals_for_with.button:typeof button!=="undefined"?button:undefined,"classes" in locals_for_with?locals_for_with.classes:typeof classes!=="undefined"?classes:undefined,"id" in locals_for_with?locals_for_with.id:typeof id!=="undefined"?id:undefined,"menu" in locals_for_with?locals_for_with.menu:typeof menu!=="undefined"?menu:undefined));;return buf.join("");
}
/***/ },
/* 19 */
/* 21 */
/***/ function(module, exports, __webpack_require__) {

@@ -1328,7 +1338,7 @@

var _underscore = __webpack_require__(3);
var _underscore = __webpack_require__(5);
var _underscore2 = _interopRequireDefault(_underscore);
var _dropdownItem = __webpack_require__(20);
var _dropdownItem = __webpack_require__(22);

@@ -1364,6 +1374,6 @@ var _dropdownItem2 = _interopRequireDefault(_dropdownItem);

/***/ },
/* 20 */
/* 22 */
/***/ function(module, exports, __webpack_require__) {
var jade = __webpack_require__(13);
var jade = __webpack_require__(15);

@@ -1389,3 +1399,3 @@ module.exports = function template(locals) {

/***/ },
/* 21 */
/* 23 */
/***/ function(module, exports, __webpack_require__) {

@@ -1400,7 +1410,7 @@

var _underscore = __webpack_require__(3);
var _underscore = __webpack_require__(5);
var _underscore2 = _interopRequireDefault(_underscore);
var _dropdownHeader = __webpack_require__(22);
var _dropdownHeader = __webpack_require__(24);

@@ -1418,6 +1428,6 @@ var _dropdownHeader2 = _interopRequireDefault(_dropdownHeader);

/***/ },
/* 22 */
/* 24 */
/***/ function(module, exports, __webpack_require__) {
var jade = __webpack_require__(13);
var jade = __webpack_require__(15);

@@ -1433,3 +1443,3 @@ module.exports = function template(locals) {

/***/ },
/* 23 */
/* 25 */
/***/ function(module, exports, __webpack_require__) {

@@ -1444,3 +1454,3 @@

var _dropdownDivider = __webpack_require__(24);
var _dropdownDivider = __webpack_require__(26);

@@ -1456,6 +1466,6 @@ var _dropdownDivider2 = _interopRequireDefault(_dropdownDivider);

/***/ },
/* 24 */
/* 26 */
/***/ function(module, exports, __webpack_require__) {
var jade = __webpack_require__(13);
var jade = __webpack_require__(15);

@@ -1471,3 +1481,3 @@ module.exports = function template(locals) {

/***/ },
/* 25 */
/* 27 */
/***/ function(module, exports, __webpack_require__) {

@@ -1482,15 +1492,15 @@

var _jquery = __webpack_require__(26);
var _jquery = __webpack_require__(28);
var _jquery2 = _interopRequireDefault(_jquery);
var _underscore = __webpack_require__(3);
var _underscore = __webpack_require__(5);
var _underscore2 = _interopRequireDefault(_underscore);
var _dropdownRadioGroup = __webpack_require__(27);
var _dropdownRadioGroup = __webpack_require__(29);
var _dropdownRadioGroup2 = _interopRequireDefault(_dropdownRadioGroup);
__webpack_require__(28);
__webpack_require__(30);

@@ -1547,12 +1557,12 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

/***/ },
/* 26 */
/* 28 */
/***/ function(module, exports) {
module.exports = __WEBPACK_EXTERNAL_MODULE_26__;
module.exports = __WEBPACK_EXTERNAL_MODULE_28__;
/***/ },
/* 27 */
/* 29 */
/***/ function(module, exports, __webpack_require__) {
var jade = __webpack_require__(13);
var jade = __webpack_require__(15);

@@ -1637,3 +1647,3 @@ module.exports = function template(locals) {

/***/ },
/* 28 */
/* 30 */
/***/ function(module, exports, __webpack_require__) {

@@ -1644,6 +1654,6 @@

// load the styles
var content = __webpack_require__(29);
var content = __webpack_require__(31);
if(typeof content === 'string') content = [[module.id, content, '']];
// add the styles to the DOM
var update = __webpack_require__(10)(content, {});
var update = __webpack_require__(12)(content, {});
if(content.locals) module.exports = content.locals;

@@ -1665,6 +1675,6 @@ // Hot Module Replacement

/***/ },
/* 29 */
/* 31 */
/***/ function(module, exports, __webpack_require__) {
exports = module.exports = __webpack_require__(9)();
exports = module.exports = __webpack_require__(11)();
// imports

@@ -1679,2 +1689,191 @@

/***/ },
/* 32 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.renderDropdownSubmenu = renderDropdownSubmenu;
var _jquery = __webpack_require__(28);
var _jquery2 = _interopRequireDefault(_jquery);
var _underscore = __webpack_require__(5);
var _underscore2 = _interopRequireDefault(_underscore);
var _dropdownSubmenu = __webpack_require__(33);
var _dropdownSubmenu2 = _interopRequireDefault(_dropdownSubmenu);
__webpack_require__(34);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function renderDropdownSubmenu(dropdownSubmenu, renderItem) {
var _dropdownSubmenu$butt = dropdownSubmenu.button;
var button = _dropdownSubmenu$butt === undefined ? {} : _dropdownSubmenu$butt;
var _dropdownSubmenu$menu = dropdownSubmenu.menu;
var menu = _dropdownSubmenu$menu === undefined ? {} : _dropdownSubmenu$menu;
var events = {};
var options = _underscore2.default.defaults({
button: _underscore2.default.defaults({
tabindex: dropdownSubmenu.tabindex,
attributes: _underscore2.default.defaults({
'data-toggle': 'dropdown',
'aria-haspopup': 'true',
'aria-expanded': 'false'
}, button.attributes),
classes: _underscore2.default.union(button.classes, ['dropdown-toggle'])
}, button, {
id: _underscore2.default.uniqueId('dropdown-submenu-button-'),
text: '',
iconLeft: null,
iconRight: ['glyphicon', 'glyphicon-triangle-right', 'pull-right']
}),
menu: _underscore2.default.defaults({
items: _underscore2.default.map(menu.items, function (item, index) {
return {
html: renderItem(_underscore2.default.defaults({
tabindex: index === 0 ? 0 : -1
}, item, {
type: 'dropdown-item'
}), events)
};
})
}, menu, {
classes: [],
id: _underscore2.default.uniqueId('menu-')
})
}, dropdownSubmenu);
var html = (0, _dropdownSubmenu2.default)(options);
events['click #' + options.button.id] = function (e) {
var $menu = this.$('#' + options.menu.id);
var hideMenu = function hideMenu() {
$menu.hide();
(0, _jquery2.default)(document).off('click', hideMenu);
};
var showMenu = function showMenu() {
$menu.show();
(0, _jquery2.default)(document).on('click', hideMenu);
};
if ($menu.is(':visible')) {
hideMenu();
} else {
showMenu();
}
e.stopPropagation();
e.preventDefault();
};
return { html: html, events: events };
}
/***/ },
/* 33 */
/***/ function(module, exports, __webpack_require__) {
var jade = __webpack_require__(15);
module.exports = function template(locals) {
var buf = [];
var jade_mixins = {};
var jade_interp;
;var locals_for_with = (locals || {});(function (button, classes, id, menu) {
jade_mixins["menuButtonMixin"] = jade_interp = function(options){
var block = (this && this.block), attributes = (this && this.attributes) || {};
buf.push("<a role=\"menuitem\"" + (jade.attr("id", options.id, true, true)) + (jade.cls([options.classes], [true])) + ">");
if ( options.iconLeft)
{
buf.push("<span" + (jade.cls(['icon-left',options.iconLeft], [null,true])) + "></span>");
}
buf.push("<span class=\"text\">" + (jade.escape(null == (jade_interp = options.text) ? "" : jade_interp)) + "</span>");
if ( options.iconRight)
{
buf.push("<span" + (jade.cls(['icon-right',options.iconRight], [null,true])) + "></span>");
}
buf.push("</a>");
};
jade_mixins["menuMixin"] = jade_interp = function(labeledby, options){
var block = (this && this.block), attributes = (this && this.attributes) || {};
buf.push("<ul role=\"menu\"" + (jade.attr("aria-labeledby", labeledby, true, true)) + (jade.attr("id", options.id, true, true)) + (jade.cls(['dropdown-menu',options.classes], [null,true])) + ">");
// iterate options.items
;(function(){
var $$obj = options.items;
if ('number' == typeof $$obj.length) {
for (var $index = 0, $$l = $$obj.length; $index < $$l; $index++) {
var item = $$obj[$index];
buf.push(null == (jade_interp = item.html) ? "" : jade_interp);
}
} else {
var $$l = 0;
for (var $index in $$obj) {
$$l++; var item = $$obj[$index];
buf.push(null == (jade_interp = item.html) ? "" : jade_interp);
}
}
}).call(this);
buf.push("</ul>");
};
buf.push("<li role=\"presentation\"" + (jade.attr("id", id, true, true)) + (jade.cls(['dropdown-submenu',classes], [null,true])) + ">");
jade_mixins["menuButtonMixin"](button);
jade_mixins["menuMixin"](id, menu);
buf.push("</li>");}.call(this,"button" in locals_for_with?locals_for_with.button:typeof button!=="undefined"?button:undefined,"classes" in locals_for_with?locals_for_with.classes:typeof classes!=="undefined"?classes:undefined,"id" in locals_for_with?locals_for_with.id:typeof id!=="undefined"?id:undefined,"menu" in locals_for_with?locals_for_with.menu:typeof menu!=="undefined"?menu:undefined));;return buf.join("");
}
/***/ },
/* 34 */
/***/ function(module, exports, __webpack_require__) {
// style-loader: Adds some css to the DOM by adding a <style> tag
// load the styles
var content = __webpack_require__(35);
if(typeof content === 'string') content = [[module.id, content, '']];
// add the styles to the DOM
var update = __webpack_require__(12)(content, {});
if(content.locals) module.exports = content.locals;
// Hot Module Replacement
if(false) {
// When the styles change, update the <style> tags
if(!content.locals) {
module.hot.accept("!!./../node_modules/css-loader/index.js!./../node_modules/less-loader/index.js!./dropdown-submenu.less", function() {
var newContent = require("!!./../node_modules/css-loader/index.js!./../node_modules/less-loader/index.js!./dropdown-submenu.less");
if(typeof newContent === 'string') newContent = [[module.id, newContent, '']];
update(newContent);
});
}
// When the module is disposed, remove the <style> tags
module.hot.dispose(function() { update(); });
}
/***/ },
/* 35 */
/***/ function(module, exports, __webpack_require__) {
exports = module.exports = __webpack_require__(11)();
// imports
// module
exports.push([module.id, ".toolbar .dropdown-submenu {\n position: relative;\n}\n.toolbar .dropdown-submenu > .dropdown-menu {\n position: absolute;\n left: 100%;\n top: 0;\n}\n", ""]);
// exports
/***/ }

@@ -1681,0 +1880,0 @@ /******/ ])

{
"main": "dist/backbone-toolbar.js",
"version": "0.0.2",
"version": "0.0.3",
"files": [

@@ -5,0 +5,0 @@ "dist"

@@ -0,0 +0,0 @@ # backbone-toolbar

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc