Gitlab CSE Unil

Commit 4e2987a6 authored by M. Chardon's avatar M. Chardon
Browse files

résolution bug marqueur : erreur ordre listener

parent f13d7103
...@@ -1587,6 +1587,7 @@ function($, _, Signal, paper, config, view, io, tools, attributes, Users, export ...@@ -1587,6 +1587,7 @@ function($, _, Signal, paper, config, view, io, tools, attributes, Users, export
* @param event * @param event
*/ */
function onPropertyChange(event) { function onPropertyChange(event) {
$(this).addClass("focus");
updateSelectedItemProp(event.data.pName); updateSelectedItemProp(event.data.pName);
} }
...@@ -1621,8 +1622,13 @@ function($, _, Signal, paper, config, view, io, tools, attributes, Users, export ...@@ -1621,8 +1622,13 @@ function($, _, Signal, paper, config, view, io, tools, attributes, Users, export
if (_.isFunction(pDef.onChange)) { if (_.isFunction(pDef.onChange)) {
elem.on('change', pDef.onChange); elem.on('change', pDef.onChange);
} else { } else {
var elemBtn = elem.find(".btn-cat");
if (elemBtn) {
elem.find(".btn-cat").on('change', null, {pName: pName}, onPropertyChange);
}else{
elem.on('change', null, {pName: pName}, onPropertyChange); elem.on('change', null, {pName: pName}, onPropertyChange);
} }
}
if (_.isFunction(pDef['onBlur'])) { if (_.isFunction(pDef['onBlur'])) {
elem.on('blur', pDef['onBlur']); elem.on('blur', pDef['onBlur']);
......
...@@ -31060,6 +31060,7 @@ function($, _, Signal, paper, config, view, io, tools, attributes, Users, export ...@@ -31060,6 +31060,7 @@ function($, _, Signal, paper, config, view, io, tools, attributes, Users, export
* @param event * @param event
*/ */
function onPropertyChange(event) { function onPropertyChange(event) {
$(this).addClass("focus");
updateSelectedItemProp(event.data.pName); updateSelectedItemProp(event.data.pName);
} }
   
...@@ -31094,8 +31095,13 @@ function($, _, Signal, paper, config, view, io, tools, attributes, Users, export ...@@ -31094,8 +31095,13 @@ function($, _, Signal, paper, config, view, io, tools, attributes, Users, export
if (_.isFunction(pDef.onChange)) { if (_.isFunction(pDef.onChange)) {
elem.on('change', pDef.onChange); elem.on('change', pDef.onChange);
} else { } else {
var elemBtn = elem.find(".btn-cat");
if (elemBtn) {
elem.find(".btn-cat").on('change', null, {pName: pName}, onPropertyChange);
}else{
elem.on('change', null, {pName: pName}, onPropertyChange); elem.on('change', null, {pName: pName}, onPropertyChange);
} }
}
   
if (_.isFunction(pDef['onBlur'])) { if (_.isFunction(pDef['onBlur'])) {
elem.on('blur', pDef['onBlur']); elem.on('blur', pDef['onBlur']);
...@@ -31062,6 +31062,7 @@ function($, _, Signal, paper, config, view, io, tools, attributes, Users, export ...@@ -31062,6 +31062,7 @@ function($, _, Signal, paper, config, view, io, tools, attributes, Users, export
* @param event * @param event
*/ */
function onPropertyChange(event) { function onPropertyChange(event) {
$(this).addClass("focus");
updateSelectedItemProp(event.data.pName); updateSelectedItemProp(event.data.pName);
} }
   
...@@ -31096,8 +31097,13 @@ function($, _, Signal, paper, config, view, io, tools, attributes, Users, export ...@@ -31096,8 +31097,13 @@ function($, _, Signal, paper, config, view, io, tools, attributes, Users, export
if (_.isFunction(pDef.onChange)) { if (_.isFunction(pDef.onChange)) {
elem.on('change', pDef.onChange); elem.on('change', pDef.onChange);
} else { } else {
var elemBtn = elem.find(".btn-cat");
if (elemBtn) {
elem.find(".btn-cat").on('change', null, {pName: pName}, onPropertyChange);
}else{
elem.on('change', null, {pName: pName}, onPropertyChange); elem.on('change', null, {pName: pName}, onPropertyChange);
} }
}
   
if (_.isFunction(pDef['onBlur'])) { if (_.isFunction(pDef['onBlur'])) {
elem.on('blur', pDef['onBlur']); elem.on('blur', pDef['onBlur']);
...@@ -31060,6 +31060,7 @@ function($, _, Signal, paper, config, view, io, tools, attributes, Users, export ...@@ -31060,6 +31060,7 @@ function($, _, Signal, paper, config, view, io, tools, attributes, Users, export
* @param event * @param event
*/ */
function onPropertyChange(event) { function onPropertyChange(event) {
$(this).addClass("focus");
updateSelectedItemProp(event.data.pName); updateSelectedItemProp(event.data.pName);
} }
   
...@@ -31094,8 +31095,13 @@ function($, _, Signal, paper, config, view, io, tools, attributes, Users, export ...@@ -31094,8 +31095,13 @@ function($, _, Signal, paper, config, view, io, tools, attributes, Users, export
if (_.isFunction(pDef.onChange)) { if (_.isFunction(pDef.onChange)) {
elem.on('change', pDef.onChange); elem.on('change', pDef.onChange);
} else { } else {
var elemBtn = elem.find(".btn-cat");
if (elemBtn) {
elem.find(".btn-cat").on('change', null, {pName: pName}, onPropertyChange);
}else{
elem.on('change', null, {pName: pName}, onPropertyChange); elem.on('change', null, {pName: pName}, onPropertyChange);
} }
}
   
if (_.isFunction(pDef['onBlur'])) { if (_.isFunction(pDef['onBlur'])) {
elem.on('blur', pDef['onBlur']); elem.on('blur', pDef['onBlur']);
...@@ -31060,6 +31060,7 @@ function($, _, Signal, paper, config, view, io, tools, attributes, Users, export ...@@ -31060,6 +31060,7 @@ function($, _, Signal, paper, config, view, io, tools, attributes, Users, export
* @param event * @param event
*/ */
function onPropertyChange(event) { function onPropertyChange(event) {
$(this).addClass("focus");
updateSelectedItemProp(event.data.pName); updateSelectedItemProp(event.data.pName);
} }
   
...@@ -31094,8 +31095,13 @@ function($, _, Signal, paper, config, view, io, tools, attributes, Users, export ...@@ -31094,8 +31095,13 @@ function($, _, Signal, paper, config, view, io, tools, attributes, Users, export
if (_.isFunction(pDef.onChange)) { if (_.isFunction(pDef.onChange)) {
elem.on('change', pDef.onChange); elem.on('change', pDef.onChange);
} else { } else {
var elemBtn = elem.find(".btn-cat");
if (elemBtn) {
elem.find(".btn-cat").on('change', null, {pName: pName}, onPropertyChange);
}else{
elem.on('change', null, {pName: pName}, onPropertyChange); elem.on('change', null, {pName: pName}, onPropertyChange);
} }
}
   
if (_.isFunction(pDef['onBlur'])) { if (_.isFunction(pDef['onBlur'])) {
elem.on('blur', pDef['onBlur']); elem.on('blur', pDef['onBlur']);
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment