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

angular-colorbox

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

angular-colorbox - npm Package Compare versions

Comparing version 1.1.3 to 1.1.5

.idea/jsLibraryMappings.xml

2

bower.json
{
"name": "angular-colorbox",
"version": "1.1.3",
"version": "1.1.5",
"author": {

@@ -5,0 +5,0 @@ "name": "Igor Lino",

@@ -9,2 +9,3 @@ (function () {

colorboxService.$inject = [];
function colorboxService() {

@@ -22,3 +23,5 @@

resize: resize,//This allows Colorbox to be resized based on it's own auto-calculations, or to a specific size. This must be called manually after Colorbox's content has loaded. The optional parameters object can accept width or innerWidth and height or innerHeight. Without specifying a width or height, Colorbox will attempt to recalculate the height of it's current content.
remove: remove//Removes all traces of Colorbox from the document. Not the same as $.colorbox.close(), which tucks colorbox away for future use.
remove: remove,//Removes all traces of Colorbox from the document. Not the same as $.colorbox.close(), which tucks colorbox away for future use.
getCurrentPhoto: getCurrentPhoto //Gets the current photo being shown, if any
};

@@ -29,3 +32,2 @@ return service;

function colorbox() {

@@ -71,6 +73,13 @@ return $.colorbox;

}
/**Gets the current photo being shown, if any.*/
function getCurrentPhoto() {
var anyPhoto = $('#cboxLoadedContent .cboxPhoto');
var photo = anyPhoto.length > 0 ? anyPhoto[0] : null;
return photo;
}
}
colorboxableDirective.$inject = ['$compile', '$rootScope', '$http', '$parse', '$timeout', 'colorboxService'];
function colorboxableDirective($compile, $rootScope, $http, $parse, $timeout, colorboxService) {
colorboxableDirective.$inject = ['$compile', '$rootScope', '$parse', '$timeout'];
function colorboxableDirective($compile, $rootScope, $parse, $timeout) {
var service = {

@@ -87,3 +96,3 @@ restrict: 'A',

colorboxableLink.$inject = ['$scope', '$element', '$attributes'];
function colorboxableLink($scope, $element, $attributes, controller) {
function colorboxableLink($scope, $element, $attributes) {
var cb = null;

@@ -106,3 +115,3 @@

//generic way that sets all (non-function) parameters of colorbox.
if ($attributes.colorboxable && $attributes.colorboxable.length>0) {
if ($attributes.colorboxable && $attributes.colorboxable.length > 0) {
var cbOptionsFunc = $parse($attributes.colorboxable);

@@ -134,11 +143,11 @@ var cbOptions = cbOptionsFunc($scope);

//$element.bind('load', function() {
/*$scope.$apply(function () {
options.href = $attributes.src ? $attributes.src : $attributes.href;
cb = $.colorbox(options);
});*/
//wait for the DOM view to be ready
$timeout(function () {
options.href = $attributes.src ? $attributes.src : $attributes.href;
cb = $($element).colorbox(options);
}, 300);
/*$scope.$apply(function () {
options.href = $attributes.src ? $attributes.src : $attributes.href;
cb = $.colorbox(options);
});*/
//wait for the DOM view to be ready
$timeout(function () {
options.href = $attributes.src ? $attributes.src : $attributes.href;
cb = $($element).colorbox(options);
}, 300);
//});

@@ -162,4 +171,4 @@ }

colorboxDirective.$inject = ['$compile', '$rootScope', '$http', '$parse', '$timeout', 'colorboxService'];
function colorboxDirective($compile, $rootScope, $http, $parse, $timeout, colorboxService) {
colorboxDirective.$inject = ['$compile', '$rootScope', '$timeout', 'colorboxService'];
function colorboxDirective($compile, $rootScope, $timeout, colorboxService) {
var service = {

@@ -179,5 +188,3 @@ restrict: 'E',

},
require: 'colorbox',
link: link,
controller: controller,
controllerAs: 'vm'

@@ -189,9 +196,4 @@ };

controller.$inject = ['$scope'];
function controller($scope) {
}
link.$inject = ['$scope', '$element', '$attributes'];
function link($scope, $element, $attributes, controller) {
function link($scope, $element, $attributes) {
var cb = null;

@@ -292,60 +294,4 @@

}
}
/*
app.directive('xhrModal', ['$http','$compile',
function ($http, $compile) {
function compile (elem, cAtts) {
var template,
$element,
loader;
loader = $http.get(cAtts.template).success(function (resp) {
template = resp;
});
return function (scope, elem, lAtts) {
loader.then(function () {
$element = $compile(template)(scope);
});
scope.close = function() {
jQuery.colorbox.close();
};
scope.submit = function() {
var result = scope.formSubmit();
if (Object.isObject(result)) {
result.success(function() {
jQuery.colorbox.close();
});
} else if (result === false) {
//noop
} else {
jQuery.colorbox.close();
}
};
elem.on('click', function(e) {
e.preventDefault();
jQuery.colorbox({inline: true, href: $element});
});
}
}
return {
scope: {
formObject: '=',
formErrors: '=',
title: '@',
template: '@',
okButtonText: '@',
formSubmit: '&'
},
compile: compile
}
}
]);
*/
})
();
{
"name": "angular-colorbox",
"version": "1.1.3",
"version": "1.1.5",
"title": "Angular Colorbox",

@@ -5,0 +5,0 @@ "description": "Angular directive for Colorbox, the jQuery lightbox and modal window plugin.",

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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