@visual-framework/embl-conditional-edit
Advanced tools
Comparing version
@@ -1,15 +0,17 @@ | ||
# Change Log | ||
### 1.0.3 | ||
## 1.0.2 | ||
* JS linting | ||
* embl-breadcrumb-lookup.njk was loading demo embl-content-meta-properties that were only needed for an example, | ||
### 1.0.2 | ||
* embl-breadcrumb-lookup.njk was loading demo embl-content-meta-properties that were only needed for an example, | ||
this resulted in unneeded and wrong meta properties in the html body | ||
* https://github.com/visual-framework/vf-core/pull/838 | ||
## 1.0.1 | ||
### 1.0.1 | ||
* Bug: Avoid a recursion issue in embl-conditional-edit https://github.com/visual-framework/vf-core/pull/829 | ||
## 1.0.0 (2019-12-17) | ||
### 1.0.0 (2019-12-17) | ||
* Initial stable release |
@@ -9,3 +9,3 @@ // embl-conditional-edit | ||
function emblConditionalEdit() { | ||
const emblConditionalEditItems = document.querySelectorAll('[data-embl-js-conditional-edit]'); | ||
const emblConditionalEditItems = document.querySelectorAll("[data-embl-js-conditional-edit]"); | ||
if (!emblConditionalEditItems) { | ||
@@ -20,3 +20,3 @@ // exit: lists not found | ||
Array.prototype.forEach.call(emblConditionalEditItems, (element, i) => { | ||
Array.prototype.forEach.call(emblConditionalEditItems, (element) => { | ||
emblConditionalEditDetectParam(location.href,element); | ||
@@ -35,3 +35,3 @@ }); | ||
var captured = /embl-conditional-edit=([^&]+)/.exec(url); | ||
if (captured == null && referrer != 'iframe') { | ||
if (captured == null && referrer != "iframe") { | ||
// value not found | ||
@@ -41,4 +41,4 @@ | ||
if (window.self !== window.top) { | ||
console.log(url, parent.window.location.href) | ||
emblConditionalEditDetectParam(parent.window.location.href,element,'iframe'); | ||
console.log(url, parent.window.location.href); | ||
emblConditionalEditDetectParam(parent.window.location.href,element,"iframe"); | ||
} | ||
@@ -51,4 +51,4 @@ | ||
if (captured == '1' || captured == 'enabled' || captured == 'true') { | ||
element.className += ' ' + 'embl-coditional-edit__enabled'; | ||
if (captured == "1" || captured == "enabled" || captured == "true") { | ||
element.className += " " + "embl-coditional-edit__enabled"; | ||
} | ||
@@ -55,0 +55,0 @@ } |
{ | ||
"version": "1.0.2", | ||
"version": "1.0.3", | ||
"name": "@visual-framework/embl-conditional-edit", | ||
"description": "embl-conditional-edit component", | ||
"homepage": "https://visual-framework.github.io/vf-core", | ||
"homepage": "https://stable.visual-framework.dev", | ||
"author": "VF", | ||
@@ -23,3 +23,3 @@ "license": "Apache 2.0", | ||
], | ||
"gitHead": "a25e9b8fe26d743f3d01d6d15a8b8f4d90d1f5d3" | ||
"gitHead": "920255e3ff7624cff070cf0b524a247147b39707" | ||
} |
@@ -9,2 +9,4 @@ # EMBL Conditional Edit Links component | ||
## Usage | ||
Currently supported methods: | ||
@@ -18,3 +20,3 @@ - URL param: `?embl-conditional-edit=enabled` or `?embl-conditional-edit=1` | ||
This repository is distributed with [npm][npm]. After [installing npm][install-npm], you can install `primer-buttons` with this command. | ||
This repository is distributed with [npm](https://www.npmjs.com/). After [installing npm](https://nodejs.org/), you can install `primer-buttons` with this command. | ||
@@ -25,5 +27,5 @@ ``` | ||
## Usage | ||
### Sass/CSS | ||
The source files included are written in [Sass][sass] (`scss`) You can simply point your sass `include-path` at your `node_modules` directory and import it like this. | ||
The style files included are written in [Sass](https://sass-lang.com/). If you're using a VF-core project, you can import it like this: | ||
@@ -34,2 +36,8 @@ ``` | ||
_Make sure you import Sass requirements along with the modules._ | ||
Make sure you import Sass requirements along with the modules. You can use a [project boilerplate](https://stable.visual-framework.dev/building/) or the [`vf-sass-starter`](https://stable.visual-framework.dev/components/vf-sass-starter/) | ||
## Help | ||
- [Read the Visual Framework troubleshooting](https://stable.visual-framework.dev/troubleshooting/) | ||
- [Open a ticket](https://github.com/visual-framework/vf-core/issues) | ||
- [Chat on Slack](https://join.slack.com/t/visual-framework/shared_invite/enQtNDAxNzY0NDg4NTY0LWFhMjEwNGY3ZTk3NWYxNWVjOWQ1ZWE4YjViZmY1YjBkMDQxMTNlNjQ0N2ZiMTQ1ZTZiMGM4NjU5Y2E0MjM3ZGQ) |
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
No website
QualityPackage does not have a website.
Found 1 instance in 1 package
10516
9.4%134
8.06%0
-100%40
25%