mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-11 03:53:13 +00:00
Merge pull request #693 from nlegoff/fix1518
[3.8] Fix #1518 Can not edit tags in metadatas settings
This commit is contained in:
@@ -125,8 +125,8 @@ define([
|
|||||||
var fieldTag = $(e.target);
|
var fieldTag = $(e.target);
|
||||||
var fieldTagId = fieldTag.attr("id");
|
var fieldTagId = fieldTag.attr("id");
|
||||||
var fieldTagValue = fieldTag.val();
|
var fieldTagValue = fieldTag.val();
|
||||||
|
var notValid = "" === fieldTagValue;
|
||||||
|
|
||||||
var notValid = "" !== fieldTagValue;
|
|
||||||
// check for format tag
|
// check for format tag
|
||||||
if (notValid) {
|
if (notValid) {
|
||||||
fieldTag
|
fieldTag
|
||||||
|
@@ -217,6 +217,14 @@ define([
|
|||||||
it("should render as a DIV element", function() {
|
it("should render as a DIV element", function() {
|
||||||
this.view.render().el.nodeName.should.equal("DIV");
|
this.view.render().el.nodeName.should.equal("DIV");
|
||||||
});
|
});
|
||||||
|
|
||||||
|
it("should render an error message if provided tag is empty", function() {
|
||||||
|
var view = this.view.render();
|
||||||
|
|
||||||
|
view.$('input#tag').val("").blur();
|
||||||
|
|
||||||
|
assert.isTrue(view.$('input#tag').closest(".control-group").hasClass("error"));
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
describe("FieldError Views", function() {
|
describe("FieldError Views", function() {
|
||||||
|
Reference in New Issue
Block a user