@zenginehq/frontend-config
Advanced tools
Comparing version 3.11.2 to 3.12.0
{ | ||
"name": "@zenginehq/frontend-config", | ||
"version": "3.11.2", | ||
"version": "3.12.0", | ||
"description": "Helper module for implementing Zengine plugin configuration forms.", | ||
@@ -5,0 +5,0 @@ "scripts": { |
@@ -1072,3 +1072,3 @@ plugin.controller('wgnConfigCtrl', ['$scope', '$q', '$routeParams', 'znData', 'znModal', 'znMessage', 'wgnConfigSrv', | ||
// Load settings. | ||
return configService.load(_workspaceId, $scope.settings.multi).then(function (configs) { | ||
return configService.load(_workspaceId, $scope.settings.multi, $scope.settings.id).then(function (configs) { | ||
var def = $q.defer(); | ||
@@ -1075,0 +1075,0 @@ |
@@ -17,3 +17,3 @@ plugin.service('wgnConfigSrv', ['$q', '$firebase', 'znData', function ($q, $firebase, znData) { | ||
*/ | ||
function getFirebase (plugin, workspaceId, multi) { | ||
function getFirebase (plugin, workspaceId, multi, id) { | ||
// Make sure we have valid Firebase settings. | ||
@@ -37,2 +37,6 @@ if (!plugin.firebaseUrl) { | ||
if (id) { | ||
path += '/'.concat(id); | ||
} | ||
if (multi) { | ||
@@ -141,5 +145,5 @@ path += '/settings'; | ||
*/ | ||
srv.load = function (workspaceId, multi) { | ||
srv.load = function (workspaceId, multi, id) { | ||
return srv.getPlugin().then(function (plugin) { | ||
return getFirebase(plugin, workspaceId, multi); | ||
return getFirebase(plugin, workspaceId, multi, id); | ||
}); | ||
@@ -146,0 +150,0 @@ }; |
@@ -9,3 +9,4 @@ plugin.service('wgnConfigSettings', ['$q', 'wgnConfigInputs', function ($q, configInputs) { | ||
multi: false, | ||
toggle: true | ||
toggle: true, | ||
id: null | ||
}; | ||
@@ -509,2 +510,14 @@ | ||
/** | ||
* Sets an id for the configuration instance | ||
* Returns the service instance | ||
* | ||
* @param {string} id | ||
* @return {object} | ||
*/ | ||
srv.id = function (id) { | ||
_settings.id = slugify(id); | ||
return srv; | ||
}; | ||
/** | ||
* Transforms a string into a camelized slug. | ||
@@ -511,0 +524,0 @@ * |
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
298385
2068