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

alloy-widget-nl.fokkezb.drawer

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

alloy-widget-nl.fokkezb.drawer - npm Package Compare versions

Comparing version 1.1.1 to 1.1.2

101

controllers/widget.js

@@ -57,2 +57,31 @@ var args = arguments[0] || {};

//transform properties
if (mod === 'dk.napp.drawer') {
if (_.has(args, 'drawerIndicatorEnabled')) {
args.hamburgerIcon = args.drawerIndicatorEnabled;
delete args.drawerIndicatorEnabled;
}
if (_.has(args, 'drawerArrowIcon')) {
args.arrowAnimation = args.drawerArrowIcon;
delete args.drawerArrowIcon;
}
if (_.has(args, 'drawerArrowIconColor')) {
args.hamburgerIconColor = args.drawerArrowIconColor;
delete args.drawerArrowIconColor;
}
} else {
if (_.has(args, 'hamburgerIcon')) {
args.drawerIndicatorEnabled = args.hamburgerIcon;
delete args.hamburgerIcon;
}
if (_.has(args, 'arrowAnimation')) {
args.drawerArrowIcon = args.arrowAnimation;
delete args.arrowAnimation;
}
if (_.has(args, 'hamburgerIconColor')) {
args.drawerArrowIconColor = args.hamburgerIconColor;
delete args.hamburgerIconColor;
}
}
// delete irrelevant args

@@ -63,26 +92,36 @@ delete args.id;

// create actual drawer
$.instance = $.module.createDrawer(_.omit(args, 'window'));
if (mod === 'dk.napp.drawer') {
if (mod === 'dk.napp.drawer') {
_.extend(args, args.window || {});
// create actual drawer
$.instance = $.module.createDrawer(_.omit(args, 'window'));
$.window = $.instance;
$.addTopLevelView($.instance);
} else {
$.window = Ti.UI.createWindow(_.defaults(args.window || {}, {
backgroundColor: 'white'
}));
// create actual drawer
$.instance = $.module.createDrawer(_.omit(args, 'window'));
$.window = Ti.UI.createWindow(_.extend(_.pick(args, ["orientationModes", "exitOnClose", "backgroundColor"]), args.window || {}));
$.window.add($.instance);
$.addTopLevelView($.window);
}
if (OS_ANDROID) {
$.window.addEventListener('open', function (e) {
var actionBar = e.source.activity.actionBar;
var actionBar = (mod === 'dk.napp.drawer' ? this : e.source).getActivity().getActionBar();
if (actionBar) {
actionBar.displayHomeAsUp = true;
actionBar.onHomeIconItemSelected = function () {
$.instance.toggleLeftWindow();
};
actionBar.setDisplayHomeAsUp(true);
actionBar.setOnHomeIconItemSelected(function () {
if ($.isRightWindowOpen()) {
return $.closeRightWindow();
}
$.toggleLeftWindow();
});
}
});
$.addTopLevelView($.window);
}

@@ -110,4 +149,6 @@

'parallaxAmount',
'statusBarStyle'
'statusBarStyle',
'hamburgerIcon',
'hamburgerIconColor',
'arrowAnimation'
];

@@ -197,2 +238,14 @@ } else {

$.drawerIndicatorEnabled = $.hamburgerIcon;
$.setDrawerIndicatorEnabled = $.setHamburgerIcon;
$.getDrawerIndicatorEnabled = $.getHamburgerIcon;
$.drawerArrowIcon = $.arrowAnimation;
$.setDrawerArrowIcon = $.setArrowAnimation;
$.getDrawerArrowIcon = $.getArrowAnimation;
$.drawerArrowIconColor = $.hamburgerIconColor;
$.setDrawerArrowIconColor = $.setHamburgerIconColor;
$.getDrawerArrowIconColor = $.getHamburgerIconColor;
} else {

@@ -209,11 +262,11 @@

$.isAnyWindowOpen = function () {
return $.instance.isLeftDrawerOpen() || $.instance.isRightDrawerOpen();
return $.instance.getIsLeftDrawerOpen() || $.instance.getIsRightDrawerOpen();
};
$.isLeftWindowOpen = function () {
return $.instance.isLeftDrawerOpen();
return $.instance.getIsLeftDrawerOpen();
};
$.isRightWindowOpen = function () {
return $.instance.isRightDrawerOpen();
return $.instance.getIsRightDrawerOpen();
};

@@ -232,2 +285,14 @@

$.getRightWindow = $.getRightView;
$.hamburgerIcon = $.drawerIndicatorEnabled;
$.setHamburgerIcon = $.setDrawerIndicatorEnabled;
$.getHamburgerIcon = $.getDrawerIndicatorEnabled;
$.arrowAnimation = $.drawerArrowIcon;
$.setArrowAnimation = $.setDrawerArrowIcon;
$.getArrowAnimation = $.getDrawerArrowIcon;
$.hamburgerIconColor = $.drawerArrowIconColor;
$.setHamburgerIconColor = $.setDrawerArrowIconColor;
$.getHamburgerIconColor = $.getDrawerArrowIconColor;
}

@@ -234,0 +299,0 @@

25

package.json
{
"version": "1.1.1",
"version": "1.1.2",
"description": "An Alloy widget wrapping the NappDrawer and DrawerLayout module for Facebook-like sliding side menus.",

@@ -13,14 +13,27 @@ "author": "Fokke Zandbergen",

"package.json"
]
],
"config": {
"nl.fokkezb.drawer": "1.1.2"
}
},
"repository": {
"type": "git",
"url": "git+https://github.com/fokkezb/nl.fokkezb.drawer.git"
},
"bugs": {
"url": "https://github.com/fokkezb/nl.fokkezb.drawer/issues"
},
"homepage": "https://github.com/fokkezb/nl.fokkezb.drawer#readme",
"keywords": [
"slide",
"alloy",
"alloy-widget",
"appc-npm",
"appcelerator",
"drawer",
"nappdrawer",
"drawerlayout",
"facebook",
"menu",
"nappdrawer",
"side",
"appc-npm",
"alloy-widget"
"slide"
],

@@ -27,0 +40,0 @@ "scripts": {

@@ -6,3 +6,3 @@ {

"author": "Fokke Zandbergen",
"version": "1.1.1",
"version": "1.1.2",
"copyright":"Copyright (c) 2015",

@@ -9,0 +9,0 @@ "license":"Apache License, Version 2.0",

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