Index: lams_central/web/author2.jsp
===================================================================
RCS file: /usr/local/cvsroot/lams_central/web/Attic/author2.jsp,v
diff -u -r1.10 -r1.11
--- lams_central/web/author2.jsp 15 Nov 2013 15:58:40 -0000 1.10
+++ lams_central/web/author2.jsp 18 Nov 2013 17:57:14 -0000 1.11
@@ -16,6 +16,7 @@
+
Index: lams_central/web/css/authoring.css
===================================================================
RCS file: /usr/local/cvsroot/lams_central/web/css/authoring.css,v
diff -u -r1.7 -r1.8
--- lams_central/web/css/authoring.css 15 Nov 2013 15:58:40 -0000 1.7
+++ lams_central/web/css/authoring.css 18 Nov 2013 17:57:14 -0000 1.8
@@ -43,7 +43,7 @@
input.groupName {
margin-bottom: 5px;
- width: 100%;
+ width: 98%;
}
@@ -54,7 +54,7 @@
div#ldStoreDialog > table {
width: 100%;
- height: 684px;
+ height: 682px;
table-layout: fixed;
border-top: thin dotted #2E6E9E;
}
@@ -145,7 +145,7 @@
}
div#templateContainer {
- height: 745px;
+ height: 741px;
overflow: auto;
}
@@ -168,7 +168,7 @@
#canvas {
overflow: auto;
- width: 100%;
- height: 745px;
+ width: 844px;
+ height: 741px;
vertical-align: top;
}
\ No newline at end of file
Index: lams_central/web/includes/javascript/jquery.ui.touch-punch.js
===================================================================
RCS file: /usr/local/cvsroot/lams_central/web/includes/javascript/jquery.ui.touch-punch.js,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ lams_central/web/includes/javascript/jquery.ui.touch-punch.js 18 Nov 2013 17:57:14 -0000 1.1
@@ -0,0 +1,11 @@
+/*
+ * jQuery UI Touch Punch 0.2.2
+ *
+ * Copyright 2011, Dave Furfero
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ *
+ * Depends:
+ * jquery.ui.widget.js
+ * jquery.ui.mouse.js
+ */
+(function(b){b.support.touch="ontouchend" in document;if(!b.support.touch){return;}var c=b.ui.mouse.prototype,e=c._mouseInit,a;function d(g,h){if(g.originalEvent.touches.length>1){return;}g.preventDefault();var i=g.originalEvent.changedTouches[0],f=document.createEvent("MouseEvents");f.initMouseEvent(h,true,true,window,1,i.screenX,i.screenY,i.clientX,i.clientY,false,false,false,false,0,null);g.target.dispatchEvent(f);}c._touchStart=function(g){var f=this;if(a||!f._mouseCapture(g.originalEvent.changedTouches[0])){return;}a=true;f._touchMoved=false;d(g,"mouseover");d(g,"mousemove");d(g,"mousedown");};c._touchMove=function(f){if(!a){return;}this._touchMoved=true;d(f,"mousemove");};c._touchEnd=function(f){if(!a){return;}d(f,"mouseup");d(f,"mouseout");if(!this._touchMoved){d(f,"click");}a=false;};c._mouseInit=function(){var f=this;f.element.bind("touchstart",b.proxy(f,"_touchStart")).bind("touchmove",b.proxy(f,"_touchMove")).bind("touchend",b.proxy(f,"_touchEnd"));e.call(f);};})(jQuery);
\ No newline at end of file
Index: lams_central/web/includes/javascript/authoring/authoringActivity.js
===================================================================
RCS file: /usr/local/cvsroot/lams_central/web/includes/javascript/authoring/authoringActivity.js,v
diff -u -r1.5 -r1.6
--- lams_central/web/includes/javascript/authoring/authoringActivity.js 15 Nov 2013 15:58:40 -0000 1.5
+++ lams_central/web/includes/javascript/authoring/authoringActivity.js 18 Nov 2013 17:57:14 -0000 1.6
@@ -261,14 +261,17 @@
$('input, select', content).change(function(){
// extract changed properties and redraw the activity
var redrawNeeded = false,
- newTitle = $('.propertiesContentFieldTitle', activity.propertiesContent).val();
+ newTitle = $('.propertiesContentFieldTitle', activity.propertiesContent).val();
if (newTitle != activity.title) {
activity.title = newTitle;
redrawNeeded = true;
}
-
- activity.grouping = $('.propertiesContentFieldGrouping option:selected', activity.propertiesContent)
+ var newGroupingValue = $('.propertiesContentFieldGrouping option:selected', activity.propertiesContent)
.data('grouping');
+ if (newGroupingValue != activity.grouping) {
+ activity.grouping = newGroupingValue;
+ redrawNeeded = true;
+ }
activity.defineInMonitor = $('.propertiesContentFieldDefineMonitor', activity.propertiesContent)
.is(':checked');
var newOfflineValue = $('.propertiesContentFieldOffline', activity.propertiesContent)
@@ -423,6 +426,8 @@
activity.items
.data('activity', activity)
.mousedown(HandlerLib.activityMousedownHandler)
+ //.touchstart(HandlerLib.activityMousedownHandler)
+ .touchmove(HandlerLib.dragItemsMoveHandler)
.click(HandlerLib.activityClickHandler)
.dblclick(HandlerLib.activityDblclickHandler)
.attr({
@@ -636,7 +641,7 @@
addSelectEffect : function (activity) {
// do not draw twice
if (!activity.items.selectEffect) {
- var box = activity.items.shape.getBBox();
+ var box = activity.items.getBBox();
// a simple rectange a bit wider than the actual activity boundaries
activity.items.selectEffect = paper.rect(
@@ -698,6 +703,9 @@
})
.toBack();
activity.items.push(activity.items.groupingEffect);
+
+ // this is needed, for some reason, otherwise the activity can not be selected
+ HandlerLib.resetCanvasMode();
}
},
Index: lams_central/web/includes/javascript/authoring/authoringHandler.js
===================================================================
RCS file: /usr/local/cvsroot/lams_central/web/includes/javascript/authoring/authoringHandler.js,v
diff -u -r1.4 -r1.5
--- lams_central/web/includes/javascript/authoring/authoringHandler.js 14 Nov 2013 13:11:43 -0000 1.4
+++ lams_central/web/includes/javascript/authoring/authoringHandler.js 18 Nov 2013 17:57:14 -0000 1.5
@@ -72,7 +72,6 @@
* Start dragging an activity or transition.
*/
dragItemsStartHandler : function(items, draggedElement, mouseupHandler, event, startX, startY) {
- items.toFront();
// clear "clicked" flag, just in case
items.clicked = false;
@@ -120,6 +119,7 @@
* Moves dragged elements on the canvas.
*/
dragItemsMoveHandler : function(items, event, startX, startY) {
+ alert('bbb');
var dx = event.pageX - startX,
dy = event.pageY - startY;
Index: lams_central/web/includes/javascript/authoring/authoringMenu.js
===================================================================
RCS file: /usr/local/cvsroot/lams_central/web/includes/javascript/authoring/authoringMenu.js,v
diff -u -r1.4 -r1.5
--- lams_central/web/includes/javascript/authoring/authoringMenu.js 14 Nov 2013 13:11:43 -0000 1.4
+++ lams_central/web/includes/javascript/authoring/authoringMenu.js 18 Nov 2013 17:57:14 -0000 1.5
@@ -342,7 +342,8 @@
if (paper) {
paper.clear();
} else {
- paper = Raphael('canvas');
+ // need to set size right away for Chrome
+ paper = Raphael('canvas', canvas.width() - 5, canvas.height() - 5);
}
resizePaper();