Permalink
Browse files

photo ready in joint.js should hide all icon and place holder display

  • Loading branch information...
runqingz committed Dec 4, 2017
1 parent 74dafed commit 3eab1b176aae49a1da79d716719012a908f2fdcf
Showing with 38 additions and 0 deletions.
  1. +19 −0 umpleonline/scripts/jjs/jjs_parse.js
  2. +19 −0 umpleonline/scripts/jjs/joint.shapes.umpleuml.js
@@ -385,6 +385,25 @@ var JJSdiagram = {
}
});
jQuery('#buttonPhotoReady').change(function () {
if (this.checked){
jQuery('.html-element button.delete').css('visibility', 'hidden');
jQuery('img#classIcon').css('visibility', 'hidden');
jQuery('img.edit').css('visibility', 'hidden');
jQuery('img.deleteAttr').css('visibility', 'hidden');
jQuery('img.deleteMet').css('visibility', 'hidden');
jQuery('.attributInput input').prop('placeholder', '');
jQuery('.methodInput input').prop('placeholder', '');
}else{
jQuery('img#classIcon').css('visibility', 'visible');
jQuery('img.edit').css('visibility', 'visible');
jQuery('img.deleteAttr').css('visibility', 'visible');
jQuery('img.deleteMet').css('visibility', 'visible');
jQuery('.attributInput input').prop('placeholder', 'Add More');
jQuery('.methodInput input').prop('placeholder', 'Add More');
}
});
},
@@ -74,6 +74,11 @@ joint.shapes.umpleuml.ClassView = joint.dia.ElementView.extend({
this.$box.find('#classIcon')[0].style.background = "#ff0000";
}
//hidden class Icon when photo ready checked
if (jQuery('#buttonPhotoReady').prop('checked')){
jQuery('img#classIcon').css('visibility', 'hidden');
}
//Prevent paper from handling pointerdown.
this.$box.find('input').on('mousedown click', function (e) {
e.stopPropagation();
@@ -473,6 +478,13 @@ joint.shapes.umpleuml.ClassView = joint.dia.ElementView.extend({
//add an extra empty one
this.addAttributeBox(i);
if (jQuery('#buttonPhotoReady').prop('checked')){
jQuery('img#classIcon').css('visibility', 'hidden');
jQuery('img.edit').css('visibility', 'hidden');
jQuery('img.deleteAttr').css('visibility', 'hidden');
jQuery('.attributInput input').prop('placeholder', '');
}
}
},
@@ -489,6 +501,13 @@ joint.shapes.umpleuml.ClassView = joint.dia.ElementView.extend({
}
this.addMethodBox(i);
}
if (jQuery('#buttonPhotoReady').prop('checked')){
jQuery('img#classIcon').css('visibility', 'hidden');
jQuery('img.edit').css('visibility', 'hidden');
jQuery('img.deleteMet').css('visibility', 'hidden');
jQuery('.methodInput input').prop('placeholder', '');
}
},
resetBoxsize: function () {

0 comments on commit 3eab1b1

Please sign in to comment.