Index: lams_build/lib/lams/lams.jar
===================================================================
RCS file: /usr/local/cvsroot/lams_build/lib/lams/lams.jar,v
diff -u -r1.420.2.115 -r1.420.2.116
Binary files differ
Index: lams_central/conf/language/lams/ApplicationResources.properties
===================================================================
RCS file: /usr/local/cvsroot/lams_central/conf/language/lams/ApplicationResources.properties,v
diff -u -r1.138.2.50 -r1.138.2.51
--- lams_central/conf/language/lams/ApplicationResources.properties 2 Mar 2017 06:37:08 -0000 1.138.2.50
+++ lams_central/conf/language/lams/ApplicationResources.properties 10 Mar 2017 08:27:51 -0000 1.138.2.51
@@ -670,6 +670,7 @@
authoring.fla.page.prop.optional.activities.min =Min activities:
authoring.fla.page.prop.optional.activities.max =Max activities:
authoring.fla.page.prop.color =Color:
+authoring.fla.page.prop.size =Size:
authoring.fla.page.dialog.cond.output.choose =[ Choose Output ]
authoring.fla.page.dialog.cond.options.choose =[ Options ]
authoring.fla.page.dialog.cond.greater =Greater than or equal to
Index: lams_central/src/java/org/lamsfoundation/lams/authoring/ObjectExtractor.java
===================================================================
RCS file: /usr/local/cvsroot/lams_central/src/java/org/lamsfoundation/lams/authoring/ObjectExtractor.java,v
diff -u -r1.97.2.11 -r1.97.2.12
--- lams_central/src/java/org/lamsfoundation/lams/authoring/ObjectExtractor.java 28 Feb 2017 05:15:19 -0000 1.97.2.11
+++ lams_central/src/java/org/lamsfoundation/lams/authoring/ObjectExtractor.java 10 Mar 2017 08:27:51 -0000 1.97.2.12
@@ -886,6 +886,7 @@
annotation.setEndXcoord((Integer) JsonUtil.opt(annotationJSON, AuthoringJsonTags.END_XCOORD));
annotation.setEndYcoord((Integer) JsonUtil.opt(annotationJSON, AuthoringJsonTags.END_YCOORD));
annotation.setColor((String) JsonUtil.opt(annotationJSON, AuthoringJsonTags.COLOR));
+ annotation.setSize(Short.valueOf((String) JsonUtil.opt(annotationJSON, AuthoringJsonTags.SIZE)));
if (found) {
baseDAO.update(annotation);
Index: lams_central/web/authoring/authoring.jsp
===================================================================
RCS file: /usr/local/cvsroot/lams_central/web/authoring/authoring.jsp,v
diff -u -r1.6.2.48 -r1.6.2.49
--- lams_central/web/authoring/authoring.jsp 31 Jan 2017 14:09:18 -0000 1.6.2.48
+++ lams_central/web/authoring/authoring.jsp 10 Mar 2017 08:27:51 -0000 1.6.2.49
@@ -953,6 +953,23 @@
+
+
+
+ |
+
+
+ |
+
+
+
+
+ |
+
+
+ |
+
+
Index: lams_central/web/css/authoring.css
===================================================================
RCS file: /usr/local/cvsroot/lams_central/web/css/authoring.css,v
diff -u -r1.30.2.25 -r1.30.2.26
--- lams_central/web/css/authoring.css 7 Mar 2017 11:29:07 -0000 1.30.2.25
+++ lams_central/web/css/authoring.css 10 Mar 2017 08:27:51 -0000 1.30.2.26
@@ -137,6 +137,15 @@
width: 99%;
}
+.dialogContents .labelPlusSize {
+ cursor: pointer;
+}
+
+.dialogContents .labelMinusSize {
+ margin-left: 15px;
+ cursor: pointer;
+}
+
div#groupNamingDialog .btn-group,
div#gtbDialog .btn-group,
div#ctbDialog .btn-group,
Index: lams_central/web/includes/javascript/authoring/authoringDecoration.js
===================================================================
RCS file: /usr/local/cvsroot/lams_central/web/includes/javascript/authoring/authoringDecoration.js,v
diff -u -r1.11.2.6 -r1.11.2.7
--- lams_central/web/includes/javascript/authoring/authoringDecoration.js 4 Dec 2016 13:25:42 -0000 1.11.2.6
+++ lams_central/web/includes/javascript/authoring/authoringDecoration.js 10 Mar 2017 08:27:51 -0000 1.11.2.7
@@ -24,7 +24,7 @@
/**
* Constructor for label annotation.
*/
- Label : function(id, uiid, x, y, title){
+ Label : function(id, uiid, x, y, title, color, size){
this.id = +id || null;
this.uiid = +uiid || ++layout.ld.maxUIID;
// set a default title, if none provided
@@ -36,7 +36,7 @@
this.loadPropertiesDialogContent = PropertyDefs.labelProperties;
}
- this.draw(x, y);
+ this.draw(x, y, color || layout.colors.activityText, size || layout.conf.labelDefaultSize);
},
@@ -161,10 +161,18 @@
* Label methods
*/
label : {
- draw : function(x, y) {
+ draw : function(x, y, color, size) {
var x = x ? x : this.items.shape.attr('x'),
- y = y ? y : this.items.shape.attr('y');
+ y = y ? y : this.items.shape.attr('y'),
+ color = color ? color : this.items.shape.attr('fill'),
+ // do not grow/shrink over given limits
+ size = size ? Math.max(layout.conf.labelMinSize, Math.min(layout.conf.labelMaxSize, size)) : null;
+ if (!size) {
+ size = this.items.shape.attr('font-size');
+ size = size.substring(0, size.indexOf('px'));
+ }
+
if (this.items) {
this.items.remove();
}
@@ -174,7 +182,11 @@
this.items.attr('uiid', this.uiid);
this.items.shape = paper.text(x, y, this.title)
.attr(layout.defaultTextAttributes)
- .attr('text-anchor', 'start');
+ .attr({
+ 'text-anchor' : 'start',
+ 'font-size' : size,
+ 'fill' : color
+ });
this.items.append(this.items.shape);
this.items.attr('cursor', 'pointer')
@@ -250,8 +262,8 @@
/**
* Adds a string on the canvas
*/
- addLabel : function(x, y, title) {
- var label = new DecorationDefs.Label(null, null, x, y, title);
+ addLabel : function(x, y, title, color, size) {
+ var label = new DecorationDefs.Label(null, null, x, y, title, color, size);
layout.labels.push(label);
GeneralLib.setModified(true);
return label;
Index: lams_central/web/includes/javascript/authoring/authoringGeneral.js
===================================================================
RCS file: /usr/local/cvsroot/lams_central/web/includes/javascript/authoring/authoringGeneral.js,v
diff -u -r1.51.2.65 -r1.51.2.66
--- lams_central/web/includes/javascript/authoring/authoringGeneral.js 14 Feb 2017 10:29:11 -0000 1.51.2.65
+++ lams_central/web/includes/javascript/authoring/authoringGeneral.js 10 Mar 2017 08:27:51 -0000 1.51.2.66
@@ -90,6 +90,9 @@
'containerActivityChildrenPadding' : 10,
'regionEmptyWidth' : 20,
'regionEmptyHeight' : 20,
+ 'labelDefaultSize' : 11,
+ 'labelMinSize' : 9,
+ 'labelMaxSize' : 20,
'groupingEffectPadding' : 5,
'selectEffectPadding' : 7,
@@ -121,9 +124,9 @@
// highlight branching edges on mouse hover
'branchingEdgeMatch' : 'blue',
'gate' : 'red',
- 'gateBorder' : '#801515',
+ 'gateBorder' : '#801515',
'gateText' : 'white',
- 'grouping' : '#caddfb',
+ 'grouping' : '#caddfb',
'groupingBorder' : '#00007f',
'optionalActivity' : '#caddfb',
'optionalActivityBorder' : '#00007f',
@@ -1958,7 +1961,7 @@
DecorationLib.addRegion(this.xcoord, this.ycoord, this.endXcoord, this.endYcoord,
this. title, this.color);
} else {
- DecorationLib.addLabel(this.xcoord, this.ycoord, this.title);
+ DecorationLib.addLabel(this.xcoord, this.ycoord, this.title, this.color, this.size);
}
});
@@ -2422,7 +2425,11 @@
// iterate over labels and regions
$.each(layout.labels.concat(layout.regions), function(){
var box = this.items.shape.getBBox(),
- isRegion = this instanceof DecorationDefs.Region;
+ isRegion = this instanceof DecorationDefs.Region,
+ size = isRegion ? null : this.items.shape.attr('font-size');
+ if (size) {
+ size = size.substring(0, size.indexOf('px'));
+ }
annotations.push({
'id' : this.id,
@@ -2432,7 +2439,8 @@
'yCoord' : parseInt(box.y),
'endXCoord' : isRegion ? parseInt(box.x2) : null,
'endYCoord' : isRegion ? parseInt(box.y2) : null,
- 'color' : isRegion ? Snap.color(this.items.shape.attr('fill')).hex : null
+ 'color' : Snap.color(this.items.shape.attr('fill')).hex,
+ 'size' : size
});
});
Index: lams_central/web/includes/javascript/authoring/authoringProperty.js
===================================================================
RCS file: /usr/local/cvsroot/lams_central/web/includes/javascript/authoring/authoringProperty.js,v
diff -u -r1.25.2.16 -r1.25.2.17
--- lams_central/web/includes/javascript/authoring/authoringProperty.js 31 Jan 2017 14:09:18 -0000 1.25.2.16
+++ lams_central/web/includes/javascript/authoring/authoringProperty.js 10 Mar 2017 08:27:51 -0000 1.25.2.17
@@ -404,13 +404,29 @@
content = label.propertiesContent = $('#propertiesContentLabel').clone().attr('id', null)
.show().data('parentObject', label);
$('.propertiesContentFieldTitle', content).val(label.title);
+ var color = label.items.shape.attr('fill');
+ // init colour chooser
+ $('.propertiesContentFieldColor', content).val(color)
+ .simpleColor({
+ 'colors' : layout.colors.annotationPalette,
+ 'chooserCSS' : {
+ 'left' : 2,
+ 'top' : '25px',
+ 'margin' : '0'
+ }
+ });
- $('input', content).change(function(){
+ var changeFunction = function(){
// extract changed properties and redraw the label, if needed
var content = $(this).closest('.dialogContents'),
label = content.data('parentObject'),
redrawNeeded = false,
- newTitle = $('.propertiesContentFieldTitle', content).val();
+ newTitle = $('.propertiesContentFieldTitle', content).val(),
+ color = label.items.shape.attr('fill'),
+ newColor = $('.propertiesContentFieldColor', content).val(),
+ size = label.items.shape.attr('font-size');
+ size = +size.substring(0, size.indexOf('px'));
+
if (newTitle == '') {
newTitle = undefined;
}
@@ -424,12 +440,27 @@
}
}
+ redrawNeeded |= newColor != color;
+ redrawNeeded |= label.newSize && (label.newSize <= layout.conf.labelMaxSize
+ || label.newSize >= layout.conf.labelMinSize);
+
if (redrawNeeded) {
ActivityLib.removeSelectEffect(label);
- label.draw();
+ label.draw(null, null, newColor, label.newSize);
ActivityLib.addSelectEffect(label, true);
GeneralLib.setModified(true);
}
+
+ label.newSize = null;
+ };
+
+ $('input', content).change(changeFunction);
+
+ $('.labelPlusSize, .labelMinusSize', content).click(function(){
+ label.newSize = label.items.shape.attr('font-size');
+ label.newSize = +label.newSize.substring(0, label.newSize.indexOf('px'))
+ + ($(this).hasClass('labelPlusSize') ? 1 : -1);
+ changeFunction.call(content);
});
}
},
Index: lams_common/conf/hibernate/mappings/org/lamsfoundation/lams/learningdesign/LearningDesignAnnotation.hbm.xml
===================================================================
RCS file: /usr/local/cvsroot/lams_common/conf/hibernate/mappings/org/lamsfoundation/lams/learningdesign/LearningDesignAnnotation.hbm.xml,v
diff -u -r1.1.2.2 -r1.1.2.3
--- lams_common/conf/hibernate/mappings/org/lamsfoundation/lams/learningdesign/LearningDesignAnnotation.hbm.xml 15 Oct 2014 07:48:47 -0000 1.1.2.2
+++ lams_common/conf/hibernate/mappings/org/lamsfoundation/lams/learningdesign/LearningDesignAnnotation.hbm.xml 10 Mar 2017 08:28:18 -0000 1.1.2.3
@@ -25,6 +25,8 @@
+
+
\ No newline at end of file
Fisheye: Tag 1.1 refers to a dead (removed) revision in file `lams_common/src/java/org/lamsfoundation/lams/dbupdates/patch20170310.sql'.
Fisheye: No comparison available. Pass `N' to diff?
Index: lams_common/src/java/org/lamsfoundation/lams/learningdesign/LearningDesignAnnotation.java
===================================================================
RCS file: /usr/local/cvsroot/lams_common/src/java/org/lamsfoundation/lams/learningdesign/LearningDesignAnnotation.java,v
diff -u -r1.1.2.2 -r1.1.2.3
--- lams_common/src/java/org/lamsfoundation/lams/learningdesign/LearningDesignAnnotation.java 11 May 2016 07:07:22 -0000 1.1.2.2
+++ lams_common/src/java/org/lamsfoundation/lams/learningdesign/LearningDesignAnnotation.java 10 Mar 2017 08:28:18 -0000 1.1.2.3
@@ -43,6 +43,7 @@
private Integer endXcoord;
private Integer endYcoord;
private String color;
+ private Short size;
public Long getUid() {
return uid;
@@ -116,6 +117,14 @@
this.color = color;
}
+ public Short getSize() {
+ return size;
+ }
+
+ public void setSize(Short size) {
+ this.size = size;
+ }
+
@Override
public int hashCode() {
return new HashCodeBuilder().append(learningDesignId).append(annotationUIID).toHashCode();
Index: lams_common/src/java/org/lamsfoundation/lams/util/AuthoringJsonTags.java
===================================================================
RCS file: /usr/local/cvsroot/lams_common/src/java/org/lamsfoundation/lams/util/AuthoringJsonTags.java,v
diff -u -r1.4.2.3 -r1.4.2.4
--- lams_common/src/java/org/lamsfoundation/lams/util/AuthoringJsonTags.java 11 May 2016 07:07:25 -0000 1.4.2.3
+++ lams_common/src/java/org/lamsfoundation/lams/util/AuthoringJsonTags.java 10 Mar 2017 08:28:18 -0000 1.4.2.4
@@ -167,13 +167,14 @@
public static final String EXTERNAL_SIG = "externalSignature";
public static final String ENTRY = "entry";
- /** Branching Activity Specific Tags */
+ /** Annotation Specific Tags */
public static final String START_XCOORD = "startXCoord";
public static final String START_YCOORD = "startYCoord";
public static final String END_XCOORD = "endXCoord";
public static final String END_YCOORD = "endYCoord";
public static final String COLOR = "color";
-
+ public static final String SIZE = "size";
+
/** Branch Mapping and Tool Condition Tags */
public static final String BRANCH_ACTIVITY_ENTRY_ID = "entryID";
public static final String BRANCH_ACTIVITY_ENTRY_UIID = "entryUIID";